-
Notifications
You must be signed in to change notification settings - Fork 500
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
Allow markers (aka bullets) for unordered list items to be configured by theme #798
Comments
Another proposal is to use the array format in YAML to define the levels:
or
However, we've preferred the space-separated shorthand thus far in the theme. Another approach is to allow the keywords to be overridden:
The benefit here is that we can give different colors to different symbols. If we don't want to hard-code the symbol names, we could use 1-based indexes:
Once we settle on the configuration, implementation may proceed. |
I would prefer the last version. I would immediately want to use this with FontAwesome and caret and circle arrow characters for some of my stuff so calling it something non-specific would make more sense. My suggestion would be to use wording analogous to how heading in the TOC is defined by "levels". When I think of lists I think in levels. I'd imagine one of my use cases to look something like this: xxxx-theme.yaml
|
The problem with your suggestion is that you are missing a category level for "marker". Under your proposal, we would end up changing the font for the whole list content to FontAwesome. I'll just assume you forgot the marker category.
That seems like a reasonable proposal. I'll try to use something similar, if not exactly that. |
Absolutely. That would be the idea. |
In order to specify characters by unicode number, you have to use the syntax |
Our base font has missing characters for anything over the first level list. We tried working around this by using a fallback font where the characters exist. However, this mixing of fonts on the line seems to mess with the vertical spacing. The bullet appears to be at the bottom of the line, instead of vertical centred. I wondered if this could be due to the font heights being different. In this image you can see the first level looks normal (the base font has the glyph. In the second and third levels though, the fallback font has been used, and the alignment looks off. Any other suggested work arounds other than changing the base font? If #798 were implemented, I would override the other level characters to use the same as the first level, to avoid font mixing. |
Running into the exact same issue. |
The way Asciidoctor PDF is designed, you currently have to add these characters to your font. This is what I have done with the bundled fonts. I used fontforge to copy characters either from another font or other locations within the font into the the expected locations. Obviously, resolving this issue would make that unnecessary. |
The implementation of this issue would be very helpful to myself as well! |
I decided to go with the following config schema: ulist:
marker:
font_family: Noto Serif
font_size: 10
line_height: 1.5
font_color: ff0000
disc:
content: "\u2022"
font_color: 00ff00 To use an icon from Font Awesome, you'd set the font family to "fa" and the content to a unicode value like "\uf140". The alignment is a little strange because you have to express it using the line height instead of valign. I decided to use named markers because that's baked in deep to how Asciidoctor PDF currently works. The markers that can be replaced (by name) are disc, square, circle, checked, unchecked. |
Allow the marker (i.e., the bullet) for unordered list items to be configured in the theme. Use a space-separated list to control the glyph for each level. Leave room in the schema for applying a different color and font family as well.
Perhaps allow the keywords :disc, :circle, and :square to represent the built-in mappings.
At this point, we should break up the
outline_list
category so that ordered and unordered lists can be styled separately.The text was updated successfully, but these errors were encountered: