diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex')
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex index 560a68e003b..61636f44ac0 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex @@ -180,16 +180,15 @@ For example, will produce small caps within |\emph{\emph{...}}|. \DescribeMacro{\emfontdeclare} -The \pkg{fontspec} package takes this idea one step further to allow arbitrary font changes (e.g., boldness) and arbitrary levels of nesting within emphasis. +The \pkg{fontspec} package takes this idea one step further to allow arbitrary font shape changes and arbitrary levels of nesting within emphasis. This is performed using the |\emfontdeclare| command, which takes a comma-separated list of font switches corresponding to increasing levels of emphasis. -Two examples: +An example: \begin{enumerate} \item |\emfontdeclare{\itshape,\upshape\scshape,\itshape}| will lead to `italics', `small caps', then `italic small caps' as the level of emphasis increases, as long as italic small caps are defined for the font. Note that |\upshape| is required because the font changes are cascading. -\item |\emfontdeclare{\bfseries,\fontseries{h}\selectfont,\fontseries{x}\selectfont}| could lead to (if fonts are set up correctly) `bold', `heavy', and `extra bold'. \end{enumerate} -The implementation of these feature tries to be `smart' and guess what level of emphasis to use in the case of manual font changing. -This is reliable only if you use series- and/or shape- changing commands in \cs{emfontdeclare}. +The implementation of this feature tries to be `smart' and guess what level of emphasis to use in the case of manual font changing. +This is reliable only if you use shape-changing commands in \cs{emfontdeclare}. For example: \begin{Verbatim} \emfontdeclare{\itshape,\upshape\scshape,\itshape} @@ -200,3 +199,31 @@ Here, the emphasised text `hello' will be printed in italic small caps since |\e \DescribeMacro{\emreset} Finally, if you have so much nested emphasis that |\emfontdeclare| runs out of options, it will insert |\emreset| (by default just |\upshape|) and start again from the beginning. + + +\subsection{Strong emphasis} + +\DescribeMacro{\strong} +\DescribeMacro{\strongenv} +The \cs{strong} macro is used analogously to \cs{emph} but produces variations in weight. +If you need it in environment form, use |\begin{strongenv}...\end{strongenv}|. + +As with emphasis, this font-switching command is intended to move through a range +of font weights. For example, if the fonts are set up correctly it allows usage such as +|\strong{...\strong{...}}| in which each nested \cs{strong} macro increases the +weight of the font. + +\DescribeMacro{\strongfontdeclare} +Currently this feature set is somewhat experimental and there is no syntactic sugar +to easily define a range of font weights using \pkg{fontspec} commands. +Use, say, the following to define first bold and then black (|k|) font faces for \cs{strong}: +\begin{Verbatim} + \strongfontdeclare{\bfseries,\fontseries{k}\selectfont} +\end{Verbatim} + +\DescribeMacro{\strongreset} +If too many levels of \cs{strong} are reached, \cs{strongreset} is inserted. +By default this is a no-op and the font will simply remain the same. +Use \cs{renewcommand}\cs{strongreset}|{\mdseries}| to start again from the beginning if desired. + +An example for setting up a font family for use with \cs{strong} is discussed in \vref{sec:strong-example}. |