-
Notifications
You must be signed in to change notification settings - Fork 361
typst logo partial #13108
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
typst logo partial #13108
Conversation
moves the logo declaration to a new partial the lua filter fills the logo object in the pandoc metadata declares new brand-logo and brand-logo-images dictionaries in Typst header
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
8101223
to
73d72e9
Compare
@mcanouil, does this suit the use case you had in mind? IIRC you ran into conflicts customizing |
It seems so, I'll check more thoroughly tomorrow to see how this can work with the workaround I've put in place to add side text in margins. My first thought is that I'm not sure we want to name that partial logo. |
I confirm having the Another thought, If the other
#set page(
paper: $if(papersize)$"$papersize$"$else$"us-letter"$endif$,
margin: $if(margin)$($for(margin/pairs)$$margin.key$: $margin.value$,$endfor$)$else$(x: 1.25in, y: 1.25in)$endif$,
pagenumbering: $if(page-numbering)$"$page-numbering$"$else$none$endif$,
background: $if(logo)$align($logo.location$, box(inset: $logo.inset$, image("$logo.path$", width: $logo.width$$if(logo.alt)$, alt: "$logo.alt$"$endif$)))$else$none$endif$,
) (not 100% sure of the syntax) |
Thanks @mcanouil! I'm definitely on board with I'm a bit wary of diverging further from the Pandoc template, and any unforeseen consequences of moving the other page stuff, but that is a neat idea as well. I know users have asked for more control over page numbering. Hmm. |
My main concern is the partial will be used so it will be harder to change any decisions without making a breaking change, regardless of doing any of the proposals. I do like the partial idea but I'm wondering if this should be a bigger work design not focusing on logo. Maybe a PR to Pandoc. |
Yeah... I think the fact that there are two The title block partial is better defined, maybe we should do that first. I'll convert this back to a draft for now. |
Replaced by #13120 |
Fixes #13107
This PR
Moves the Typst logo declaration to a new partial.
The
typst-brand-yaml.lua
filter populates thelogo
object in the pandoc metadata.So one can replace the partial, or change the
logo
properties after the Lua filter.Declares new
brand-logo
andbrand-logo-images
dictionaries in the Typst header, for access to all the resolved logos for the chosenbrand-mode
Not sure if it's too late to add new Typst partials for 1.8. If not, we might also consider