diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec/fontspec-code-xfss.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec-code-xfss.dtx | 102 |
1 files changed, 61 insertions, 41 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-xfss.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-xfss.dtx index 4f1bdd2d564..fef300a078b 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-xfss.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-xfss.dtx @@ -9,54 +9,28 @@ % % \subsection{Italic small caps and so on} \label{sec:sishape} % -% \begin{macro}{\sishape} -% \begin{macro}{\textsi} -% These commands for actually selecting italic small caps have been defined for many years; I'm inclined to drop them. -% They're probably used very infrequently; I personally prefer just writing -% |\textit{\textsc{...}}| instead. -% % \begin{macrocode} -\providecommand*\itscdefault{\itdefault\scdefault} -\providecommand*\slscdefault{\sldefault\scdefault} -\DeclareRobustCommand{\sishape} - { - \not@math@alphabet\sishape\relax - \fontshape{\itscdefault}\selectfont - } -\DeclareTextFontCommand{\textsi}{\sishape} +\providecommand*\scitdefault{\scdefault\itdefault} +\providecommand*\scsldefault{\scdefault\sldefault} % \end{macrocode} -% \end{macro} \end{macro} -% % \LaTeX's `shape' font axis needs to be overloaded to support italic small caps and slanted small caps. % These are the combinations to support: % \begin{macrocode} \cs_new:Nn \@@_shape_merge:nn { c_@@_shape_#1_#2_tl } \cs_new:Nn \@@_merge_default_shapes: { - \tl_const:cn { \@@_shape_merge:nn \itdefault \scdefault } {\itscdefault} - \tl_const:cn { \@@_shape_merge:nn \sldefault \scdefault } {\slscdefault} - \tl_const:cn { \@@_shape_merge:nn \scdefault \itdefault } {\itscdefault} - \tl_const:cn { \@@_shape_merge:nn \scdefault \sldefault } {\slscdefault} - \tl_const:cn { \@@_shape_merge:nn \slscdefault \itdefault } {\itscdefault} - \tl_const:cn { \@@_shape_merge:nn \itscdefault \sldefault } {\slscdefault} - \tl_const:cn { \@@_shape_merge:nn \itscdefault \updefault } {\scdefault} - \tl_const:cn { \@@_shape_merge:nn \slscdefault \updefault } {\scdefault} + \tl_const:cn { \@@_shape_merge:nn \itdefault \scdefault } {\scitdefault} + \tl_const:cn { \@@_shape_merge:nn \sldefault \scdefault } {\scsldefault} + \tl_const:cn { \@@_shape_merge:nn \scdefault \itdefault } {\scitdefault} + \tl_const:cn { \@@_shape_merge:nn \scdefault \sldefault } {\scsldefault} + \tl_const:cn { \@@_shape_merge:nn \scsldefault \itdefault } {\scitdefault} + \tl_const:cn { \@@_shape_merge:nn \scitdefault \sldefault } {\scsldefault} + \tl_const:cn { \@@_shape_merge:nn \scitdefault \shapedefault } {\scdefault} + \tl_const:cn { \@@_shape_merge:nn \scsldefault \shapedefault } {\scdefault} } \@@_merge_default_shapes: % \end{macrocode} % -% \begin{macro}{\@@_merge_shape:n} -% These macros enable the overload on the |\..shape| commands. -% First, a shape `new+current' (prefix) or `current+new' (suffix) is tried. -% If not found, fall back on the `new' shape. -% \begin{macrocode} -\cs_new:Nn \@@_merge_shape:n - { - \@@_if_merge_shape:nTF {#1} - { \fontshape { \tl_use:c { \@@_shape_merge:nn {\f@shape} {#1} } } \selectfont } - { \fontshape {#1} \selectfont } - } -% \end{macrocode} % The following is rather specific; it only returns true if the merged shape exists, % but more importantly also if the merged shape is defined for the current font. % \begin{macrocode} @@ -74,6 +48,45 @@ \prg_return_true: \prg_return_false: } % \end{macrocode} +% +% +% \begin{macrocode} +\cs_if_exist:NTF \DeclareFontSeriesChangeRule +{ + \cs_set_eq:NN \emfontdeclare \DeclareEmphSequence +} +{ +% \end{macrocode} +% +% \begin{macro}{\sishape} +% \begin{macro}{\textsi} +% These commands for actually selecting italic small caps have been defined for many years; I'm inclined to drop them. +% They're probably used very infrequently; I personally prefer just writing +% |\textit{\textsc{...}}| instead. +% +% \begin{macrocode} +\DeclareRobustCommand{\sishape} + { + \not@math@alphabet\sishape\relax + \fontshape{\scitdefault}\selectfont + } +\DeclareTextFontCommand{\textsi}{\sishape} +% \end{macrocode} +% \end{macro} \end{macro} +% +% +% \begin{macro}{\@@_merge_shape:n} +% These macros enable the overload on the |\..shape| commands. +% First, a shape `new+current' (prefix) or `current+new' (suffix) is tried. +% If not found, fall back on the `new' shape. +% \begin{macrocode} +\cs_new:Nn \@@_merge_shape:n + { + \@@_if_merge_shape:nTF {#1} + { \fontshape { \tl_use:c { \@@_shape_merge:nn {\f@shape} {#1} } } \selectfont } + { \fontshape {#1} \selectfont } + } +% \end{macrocode} % \end{macro} % % \begin{macro}{\itshape} \begin{macro}{\scshape} \begin{macro}{\upshape} \begin{macro}{\slshape} @@ -108,7 +121,7 @@ % % \begin{macro}{\emfontdeclare} % \begin{macrocode} -\cs_new_protected:Npn \emfontdeclare #1 +\cs_set_protected:Npn \emfontdeclare #1 { \prop_gclear:N \g_@@_em_prop \int_zero:N \l_@@_emdef_int @@ -183,13 +196,22 @@ % \end{macro} % \end{macro} % +% \begin{macrocode} +\emfontdeclare{ \emshape, \eminnershape } +\cs_new:Nn \fontspec_set_em_level:n { \int_set:Nn \l_@@_em_int {#1} } +% \end{macrocode} +% +% \begin{macrocode} +} +% \end{macrocode} +% % % % \subsection{Strong emphasis} % % \begin{macro}{\strongfontdeclare} % \begin{macrocode} -\cs_new_protected:Npn \strongfontdeclare #1 +\cs_set_protected:Npn \strongfontdeclare #1 { \prop_gclear:N \g_@@_strong_prop \int_zero:N \l_@@_strongdef_int @@ -257,14 +279,12 @@ % % Programmer's interface for setting nesting levels: % \begin{macrocode} -\cs_new:Nn \fontspec_set_em_level:n { \int_set:Nn \l_@@_em_int {#1} } \cs_new:Nn \fontspec_set_strong_level:n { \int_set:Nn \l_@@_strong_int {#1} } % \end{macrocode} % % Defaults: % \begin{macrocode} \strongfontdeclare{ \bfseries } -\emfontdeclare{ \emshape, \eminnershape } % \end{macrocode} % % \begin{macrocode} @@ -278,7 +298,7 @@ % ------------------------------------------------ % The FONTSPEC package <wspr.io/fontspec> % ------------------------------------------------ -% Copyright 2004-2019 Will Robertson, LPPL "maintainer" +% Copyright 2004-2020 Will Robertson, LPPL "maintainer" % Copyright 2009-2015 Khaled Hosny % Copyright 2013 Philipp Gesang % Copyright 2013-2016 Joseph Wright |