-
Notifications
You must be signed in to change notification settings - Fork 11
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
Introduce CSS-classes for font families and font variants. #21
base: master
Are you sure you want to change the base?
Conversation
Add macro \oldstylenums. Rewrite and extend documentation accordingly.
We need to augment each style-changing macro that expands to a
I ran into the problem with the "Quattrocento" font which has bold, but no italics. \newstyle{.italic}{font-family: "TeX Gyre Pagella", serif} does work, but also changes slanted text and typewriter to Pagella. \newsavebox{\@top@style}
\newcommand{\@main@styles}{serif,sansserif,monospace,cursive,fantasy}
\newcommand{\@save@top@style}{\sbox{\@top@style}{\@top@pending@style{\@main@styles}}}
\newcommand{\@use@top@style}{\@getprint{\usebox{\@top@style}}}
\newenvironment{it}{\@save@top@style\@span{class="\@use@top@style italic"}}{} With this change we can write a more specific ("conjunction") CSS selector: \newstyle{.serif.italic}{font-family: "TeX Gyre Pagella", serif} The OCaml code already looks ok, but the HeVeA code with |
…if'. Make the font selection more fine-grained so that users can substitute e.g. the small-caps font of the serif class while leaving all other font classes (here: sans-serif and fixed) alone. The CSS-selectors are very easy to construct by abuttal; see documentation.
and add `\bf' to our system of saving and looking up the top-most style. Update the documentation. Explain the use-case of ".monospace.bold".
…est findings. Add "Dangerous Bend" sub-sections on particularly delicate properties.
by only checking the translation of the documentation with Hevea, which is much more forgiving.
Hevea "hard-codes"
font-family: monospace
for typewriter text.Obviously, this has not riled anybody until now. If you are chasing a
consistent appearance of the Hevea-translated document or simply
want to swap out this bland default monospace font, things change.
This P/R introduces CSS-classes for six font families or font
variants:
The existing
\@span
calls are adjusted accordingly and new\@span
sare introduced where necessary. The defaults leave unaffected the
appearance of all translated documents. So this is a visually neutral
change, which actually is quite small. The much larger change is a
rewrite of chapter B.15 "Font Selection" of the reference manual along
with an additional subsection on "Controlling Font Selection with
CSS".
Here is a little demo document to play around with.
What this P/R fixes:
monospace
allows the user to select and scale afont family for
\texttt
.serif
,sansserif
, andmonospace
togetherlets the user determine a font super family.
slanted
oritalic
can be used to remedymapping of
\textsl
and\textit
to the same font.smallcaps
class can be used to pair a dedicatedsmall-caps font for an existing regular one or to access built-in
small-caps in certain OpenType fonts.
\oldstylenums
and make it refer to classoldstyle
, which is undefined by default.Open questions:
Currently:
With
\newatrule{name}[arg, ...]{body}
:What doesn't work yet:
LaTeX document class options
11pt
and12pt
.