-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More generic handling of code blocks, divs, etc. #112
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Omikhleia
added
documentation
Improvements or additions to documentation
enhancement
New feature or request
refactor
Something needs to be refactored
labels
Feb 11, 2024
Omikhleia
force-pushed
the
more-generic-logic
branch
from
February 11, 2024 18:14
5c4e7f2
to
add84c1
Compare
This removes the hard-coded class specifiers, allowing any existing SILE raw handler or any embedder to be used. If the piecharts package is available (for instance), we can render blocks marked as `piechart` since the package provides a raw handler by that name.
Omikhleia
force-pushed
the
more-generic-logic
branch
from
February 11, 2024 18:37
c32cfdb
to
7065d78
Compare
We already added caption support on block quotes earlier. This adds it too for divs, interpreted as captioned figures.
Delegate the logic in a parent package class, as a better abstraction so we can focus separately on commands.
Omikhleia
force-pushed
the
more-generic-logic
branch
3 times, most recently
from
February 13, 2024 20:04
0ff8cdd
to
798d8e9
Compare
If we have liners (SILE 0.15 or resilient with sile-x compatibility layer) use them. Otherwise, fallback to an even simpler hbox, though this is not fully satisfying (as it cannot be broken across lines).
First, make all these inline elements from Djot or Markdown all equivalent to a corresponding span with certain classes, so both cases are implemented identically. We thus have a consistent mapping in all cases. Then, use styles, if available, to render them. So for instance, Markdown ~~xxx~~ is strictly equivalent to [xxx]{.strike}, and to [xxx]{custom-style=md-strikethrough} in resilient context if that style exists, for complete customization.
Omikhleia
force-pushed
the
more-generic-logic
branch
3 times, most recently
from
February 25, 2024 12:33
ce30aef
to
5bafb01
Compare
Omikhleia
force-pushed
the
more-generic-logic
branch
from
February 26, 2024 08:32
dd2f03f
to
aafc4ff
Compare
Omikhleia
force-pushed
the
more-generic-logic
branch
from
February 28, 2024 20:35
74410e9
to
e3318d2
Compare
Opinionated, for sure. Wrong? It's up to you.
OMG, did I just rewrite the full manual? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
documentation
Improvements or additions to documentation
enhancement
New feature or request
refactor
Something needs to be refactored
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Features
This removes the hard-coded class specifiers, allowing any existing SILE raw handler or any embedder to be used.
If the piecharts package is available (for instance), we can render blocks marked as
piechart
since the package provides a raw handler by that name.We already added caption support on block quotes earlier. This adds it too for divs, interpreted as captioned figures.
In addition to the generic processing on code blocks.
It offers an exact parity between these inline elements (from Djot and Markdown) with spans with a similar class, so both syntaxes are strictly equivalent. When resilient styles are used, this also offers the possibility to fully customize the appearance of these spans.
Documentation
Complete overhaul of the manual
Closes #111
Closes #107
Closes #110