-
-
Notifications
You must be signed in to change notification settings - Fork 939
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 different headings and captions in outline and bookmark #4643
Conversation
Doesn't this make |
That's what I meant with the second to-do item. One drawback is that something like |
Regarding the design, in principle this is already possible for arbitrary content in any context using |
Indeed. It would still require something for the bookmarked title though.
Do you mean something in the likes of (exact design aside) #heading(context if inside(outline) [ ... ] else [ ... ]) which would resemble the behavior of the commonly used
A nice to have would be to allow configuration of whether the heading number should be part of the bookmarked title, but that doesn't seem to be something that can be implemented nicely with either design. |
I generally like the context-based solution, though I see how even just As for the bookmark: Is it truly necessary to distinguish between the outline and the bookmark text or could the bookmark just always resolve to the outline variant? |
It seems to me that we need more discussion (ideally on Discord) before settling on a solution, so I'll close this for now. Thanks still! |
Closes #1889, closes #1295, implements #1892 (comment).
Summary
Added a (non-exposed)
outlined-content
element to be used for figure captions and headings. It is created internally by casting the dictionarywhere only the key
document
is required for the default value. If any of the other keys are omitted,outline
is derived from the default value, andbookmark
from theoutline
value. Thebookmark
value has to be of a string, while the other two can be any content. If this dictionary is not used when passing the body of a heading or figure caption, the element is still created implicitly with all fields having the same value (bookmark
being converted to a string).Example
Notes
title
parameter of outline and bibliography elements also supports this new type.bookmark
option for figure captions, even though it won't be displayed anywhere.heading.body
andfigure.caption.body
elements are now of the typeoutlined-content
which always has the fieldsdocument
,outline
andbookmark
available. The type itself also has a show rule and returns thedocument
value by default.document / outline / bookmark
style and not also forlong / short
becauselong
would only be a synonym fordocument
, and becausebookmark
inherits its value fromoutline
, soshort
would also basically only be a synonym foroutline
(when bookmark is not set).To-do
outlined-content
but couldn't think of anything better)outlined
andbookmarked
parameters of headings should somehow be replaced by this