Introduce CSS-classes for font families and font variants.#21
Introduce CSS-classes for font families and font variants.#21cspiel wants to merge 8 commits intomaranget:masterfrom
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: monospacefor 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
\@spancalls are adjusted accordingly and new\@spansare 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:
monospaceallows the user to select and scale afont family for
\texttt.serif,sansserif, andmonospacetogetherlets the user determine a font super family.
slantedoritaliccan be used to remedymapping of
\textsland\textitto the same font.smallcapsclass 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.
\oldstylenumsand 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
11ptand12pt.