%% %% This is file `fontaxes.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% fontaxes.dtx (with options: `package') %% %% Copyright (c) 2007 by Andreas Buehmann %% Copyright (c) 2011 by Michael Ummels %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. %% %% This work has the LPPL maintenance status `maintained'. %% %% The Current Maintainer of this work is Michael Ummels. %% %% This work consists of the files fontaxes.dtx, fontaxes.ins and %% the derived files fontaxes.sty, test-fontaxes.tex and fontaxes.pdf. %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{fontaxes}[2011/12/16 v1.0c Font selection axes] \DeclareRobustCommand\upshape{\not@math@alphabet\upshape\relax \fontprimaryshape\updefault\selectfont} \DeclareRobustCommand\itshape{\not@math@alphabet\itshape\mathit \fontprimaryshape\itdefault\selectfont} \DeclareRobustCommand\slshape{\not@math@alphabet\slshape\relax \fontprimaryshape\sldefault\selectfont} \DeclareRobustCommand\swshape{\not@math@alphabet\swshape\relax \fontprimaryshape\swdefault\selectfont} \DeclareRobustCommand\scshape{\not@math@alphabet\scshape\relax \fontsecondaryshape\scdefault\selectfont} \DeclareRobustCommand\sscshape{\not@math@alphabet\sscshape\relax \fontsecondaryshape\sscdefault\selectfont} \DeclareRobustCommand\ulcshape{\not@math@alphabet\ulcshape\relax \fontsecondaryshape\ulcdefault\selectfont} \let\noscshape\ulcshape \providecommand\swdefault{sw} \providecommand\ulcdefault{ulc} \providecommand\sscdefault{ssc} \DeclareTextFontCommand{\textsw}{\swshape} \DeclareTextFontCommand{\textssc}{\sscshape} \DeclareTextFontCommand{\textulc}{\ulcshape} \def\txfigures{\@nomath\txfigures \fontfigurestyle{text}\selectfont} \def\lnfigures{\@nomath\lnfigures \fontfigurestyle{lining}\selectfont} \def\tbfigures{\@nomath\tbfigures \fontfigurealignment{tabular}\selectfont} \def\prfigures{\@nomath\prfigures \fontfigurealignment{proportional}\selectfont} \newcommand\fontaxes@fv@prefix{fontaxes@fv@switch@} \newcommand*\fontaxes@fv@newoption[1]% {\expandafter\newcommand\csname\fontaxes@fv@prefix #1\endcsname} \fontaxes@fv@newoption{text}{\txfigures} \fontaxes@fv@newoption{osf}{\txfigures} \fontaxes@fv@newoption{lining}{\lnfigures} \fontaxes@fv@newoption{lf}{\lnfigures} \fontaxes@fv@newoption{tabular}{\tbfigures\tabularmath} \fontaxes@fv@newoption{tab}{\tbfigures\tabularmath} \fontaxes@fv@newoption{proportional}{\prfigures\proportionalmath} \fontaxes@fv@newoption{prop}{\prfigures\proportionalmath} \newcommand\fontaxes@fv@list{} \newcommand\fontaxes@fv{} \DeclareRobustCommand*\figureversion[1]{% \edef\fontaxes@fv@list{\zap@space#1 \@empty}% \@for\fontaxes@fv:=\fontaxes@fv@list\do{% \@ifundefined{\fontaxes@fv@prefix\fontaxes@fv}{% \PackageWarning{fontaxes}% {Unknown figure style `\fontaxes@fv'\MessageBreak specified as the argument to \string\figureversion.\MessageBreak Figure style not changed}% }{% \@nameuse{\fontaxes@fv@prefix\fontaxes@fv}% }% }% } \DeclareTextFontCommand{\textfigures}{\txfigures} \DeclareTextFontCommand{\liningfigures}{\lnfigures} \DeclareTextFontCommand{\tabularfigures}{\tbfigures\tabularmath} \DeclareTextFontCommand{\proportionalfigures} {\prfigures\proportionalmath} \def\boldmath{\@nomath\boldmath \mathweight{bold}} \def\unboldmath{\@nomath\unboldmath \mathweight{normal}} \def\tabularmath{\@nomath\tabularmath \mathfigurealignment{tabular}} \def\proportionalmath{\@nomath\proportionalmath \mathfigurealignment{proportional}} \DeclareRobustCommand\mathweight[1]{% \fontaxes@get@math\edef\fontaxes@math@weight{#1}\fontaxes@set@math} \DeclareRobustCommand\mathfigurealignment[1]{% \fontaxes@get@math\edef\fontaxes@math@align{#1}\fontaxes@set@math} \DeclareRobustCommand\fontfigurestyle[1]{% \fontaxes@get@family\edef\fontaxes@figure@style{#1}\fontaxes@set@family} \DeclareRobustCommand\fontfigurealignment[1]{% \fontaxes@get@family\edef\fontaxes@figure@align{#1}\fontaxes@set@family} \DeclareRobustCommand\fontbasefamily[1]{% \fontaxes@get@family\edef\fontaxes@family@base{#1}\fontaxes@set@family} \DeclareRobustCommand\fontprimaryshape[1]{% \fontaxes@get@shape\edef\fontaxes@shape@one{#1}\fontaxes@set@shape} \DeclareRobustCommand\fontsecondaryshape[1]{% \fontaxes@get@shape\edef\fontaxes@shape@two{#1}\fontaxes@set@shape} \AtBeginDocument{ \@ifpackageloaded{hyperref}{% \pdfstringdefDisableCommands{% \let\fontfigurestyle\@gobble \let\fontfigurealignment\@gobble \let\fontbasefamily\@gobble \let\textfigures\@firstofone \let\liningfigures\@firstofone \let\tabularfigures\@firstofone \let\proportionalfigures\@firstofone \let\textsw\@firstofone \let\textssc\@firstofone \let\textulc\@firstofone }% }{}% } \newcommand*\fontaxes@math@weight{normal} \newcommand*\fontaxes@math@align{proportional} \newcommand*\fontaxes@family@base{cmr} \newcommand*\fontaxes@figure@style{lining} \newcommand*\fontaxes@figure@align{proportional} \newcommand*\fontaxes@shape@one{n} \newcommand*\fontaxes@shape@two{ulc} \newcommand*\fontaxes@set@math{% \fontaxes@encode@math \mathversion{\fontaxes@code}% \fontaxes@save\math@version} \newcommand*\fontaxes@set@family{% \fontaxes@encode@family \fontfamily{\fontaxes@code}% \fontaxes@save\f@family} \newcommand*\fontaxes@set@shape{% \fontaxes@encode@shape \fontshape{\fontaxes@code}% \fontaxes@save\f@shape} \newcommand*\fontaxes@get@math{% \iffontaxes@changed\math@version{% \fontaxes@decode@{math}{\math@version}% \ifx\fontaxes@edoc\relax\else \edef\fontaxes@math@weight{\expandafter\@firstoftwo\fontaxes@edoc}% \edef\fontaxes@math@align{\expandafter\@secondoftwo\fontaxes@edoc}% \fi \fontaxes@save\math@version }{}% } \newcommand*\fontaxes@get@family{% \iffontaxes@changed\f@family{% \let\fontaxes@edoc\relax \expandafter\fontaxes@split@family\f@family--\@nnil \ifx\fontaxes@split@suffix\relax\else \fontaxes@decode@{figures}{\fontaxes@split@suffix}% \fi \ifx\fontaxes@edoc\relax \expandafter\fontaxes@split@familyalt\f@family \@empty\@empty\@empty\@empty\@nnil \ifx\fontaxes@split@suffix\relax\else \fontaxes@decode@{figuresalt}{\fontaxes@split@suffix}% \fi \ifx\fontaxes@edoc\relax \fontaxes@warn@undecodable{family `\f@family'}% \edef\fontaxes@family@base{\f@family}% \else \edef\fontaxes@family@base{\fontaxes@split@prefix}% \edef\fontaxes@figure@style{\expandafter\@firstoftwo\fontaxes@edoc}% \fi \else \edef\fontaxes@family@base{\fontaxes@split@prefix}% \edef\fontaxes@figure@style{\expandafter\@firstoftwo\fontaxes@edoc}% \edef\fontaxes@figure@align{\expandafter\@secondoftwo\fontaxes@edoc}% \fi }{}% } \newcommand*\fontaxes@get@shape{% \iffontaxes@changed\f@shape{% \fontaxes@decode@{shape}{\f@shape}% \ifx\fontaxes@edoc\relax\else \edef\fontaxes@shape@one{\expandafter\@firstoftwo\fontaxes@edoc}% \edef\fontaxes@shape@two{\expandafter\@secondoftwo\fontaxes@edoc}% \fi \fontaxes@save\f@shape }{}% } \newcommand*\fontaxes@encode@math{% \fontaxes@encode@{math}{{\fontaxes@math@weight}{\fontaxes@math@align}}% } \newcommand*\fontaxes@encode@math@default{% \edef\fontaxes@code{\fontaxes@math@weight\fontaxes@math@align}} \newcommand*\fontaxes@encode@family{% \fontaxes@encode@{family} {{\fontaxes@family@base}{\fontaxes@figure@style}{\fontaxes@figure@align}}% } \newcommand*\fontaxes@encode@family@default{% \fontaxes@encode@figures \edef\fontaxes@code{\fontaxes@family@base-\fontaxes@code}% \fontaxes@check@family\fontaxes@code \iffontaxes@exists\else \fontaxes@encode@figuresalt \edef\fontaxes@code{\fontaxes@family@base\fontaxes@code}% \fontaxes@check@family\fontaxes@code \iffontaxes@exists\else \edef\fontaxes@code{\fontaxes@family@base}% \fi \fi } \newcommand*\fontaxes@encode@figures{% \fontaxes@encode@{figures}{{\fontaxes@figure@style}{\fontaxes@figure@align}}% } \newcommand*\fontaxes@encode@figures@default{% \edef\fontaxes@code{OsF}% \PackageWarning{fontaxes}{Unknown figure version `\fontaxes@figure@style\space + \fontaxes@figure@align'\MessageBreak Encoding to `\fontaxes@code'}% } \newcommand*\fontaxes@encode@figuresalt{% \fontaxes@encode@{figuresalt}{{\fontaxes@figure@style}{\fontaxes@figure@align}}% } \newcommand*\fontaxes@encode@figuresalt@default{% \PackageWarning{fontaxes}{Unknown figure version `\fontaxes@figure@style\space + \fontaxes@figure@align'\MessageBreak Encoding to `\fontaxes@code'}% \edef\fontaxes@code{j}% } \newcommand*\fontaxes@encode@shape{% \fontaxes@encode@{shape}{{\fontaxes@shape@one}{\fontaxes@shape@two}}% } \newcommand*\fontaxes@encode@shape@default{% \edef\fontaxes@code{\fontaxes@shape@two\fontaxes@shape@one}% } \newcommand*\fontaxes@encode@[2]{% \@ifundefined{fontaxes@encode@#1#2} {\@nameuse{fontaxes@encode@#1@default}} {\edef\fontaxes@code{\@nameuse{fontaxes@encode@#1#2}}}% } \newcommand*\fontaxes@naming@exception[3]{% \expandafter\edef\csname fontaxes@encode@#1#2\endcsname{#3}% } \let\fa@naming@exception\fontaxes@naming@exception \fontaxes@naming@exception{shape}{{n}{ulc}}{n} \fontaxes@naming@exception{shape}{{n}{sc}}{sc} \fontaxes@naming@exception{shape}{{n}{ssc}}{ssc} \fontaxes@naming@exception{shape}{{it}{ulc}}{it} \fontaxes@naming@exception{shape}{{sl}{ulc}}{sl} \fontaxes@naming@exception{shape}{{sw}{ulc}}{sw} \fontaxes@naming@exception{math}{{normal}{proportional}}{normal} \fontaxes@naming@exception{math}{{normal}{tabular}}{tabular} \fontaxes@naming@exception{math}{{bold}{proportional}}{bold} \fontaxes@naming@exception{figures}{{text}{proportional}}{OsF} \fontaxes@naming@exception{figures}{{text}{tabular}}{TOsF} \fontaxes@naming@exception{figures}{{lining}{proportional}}{LF} \fontaxes@naming@exception{figures}{{lining}{tabular}}{TLF} \fontaxes@naming@exception{figuresalt}{{text}{proportional}}{j} \fontaxes@naming@exception{figuresalt}{{text}{tabular}}{j} \fontaxes@naming@exception{figuresalt}{{lining}{proportional}}{x} \fontaxes@naming@exception{figuresalt}{{lining}{tabular}}{x} \newcommand*\fontaxes@figure@style@domain{text,lining} \newcommand*\fontaxes@figure@align@domain{proportional,tabular} \newcommand*\fontaxes@shape@one@domain{n,it,sl,sw} \newcommand*\fontaxes@shape@two@domain{ulc,sc,ssc} \newcommand*\fontaxes@math@weight@domain{normal,bold} \newcommand*\fontaxes@math@align@domain{proportional,tabular} \newcommand*\fontaxes@create@decode@table[2]{% \begingroup \fontaxes@foreach{#2}{% \@nameuse{fontaxes@encode@#1}% \global\expandafter \edef\csname fontaxes@decode@#1{\fontaxes@code}\endcsname{#2}% }% \endgroup } \AtEndOfPackage{ \fontaxes@create@decode@table{figures} {{\fontaxes@figure@style}{\fontaxes@figure@align}} \fontaxes@create@decode@table{figuresalt} {{\fontaxes@figure@style}{\fontaxes@figure@align}} \fontaxes@create@decode@table{shape} {{\fontaxes@shape@one}{\fontaxes@shape@two}} \fontaxes@create@decode@table{math} {{\fontaxes@math@weight}{\fontaxes@math@align}} } \newcommand*\fontaxes@warn@undecodable[1]{% \PackageWarning{fontaxes}{I don't know how to decode\MessageBreak #1}} \newcommand*\fontaxes@decode@[2]{% \@ifundefined{fontaxes@decode@#1{#2}}{% \let\fontaxes@edoc\relax \fontaxes@warn@undecodable{#1 `#2'}% }{\edef\fontaxes@edoc{\@nameuse{fontaxes@decode@#1{#2}}}}% } \newcommand*\iffontaxes@changed[1]{% \expandafter\ifx\csname fontaxes@last@\string#1\endcsname#1% \expandafter\@secondoftwo \else \expandafter\@firstoftwo \fi } \newcommand*\fontaxes@save[1]{% \expandafter\let\csname fontaxes@last@\string#1\endcsname#1% } \AtBeginDocument{% \fontaxes@provide@mv@copy{tabular}{normal}% \fontaxes@provide@mv@copy{boldtabular}{bold}% } \newcommand*\fontaxes@provide@mv@copy[2]{% \@ifundefined{mv@#1}{% \DeclareMathVersion{#1}% \expandafter\let\csname mv@#1\expandafter\endcsname \csname mv@#2\endcsname }{}% } \newif\iffontaxes@exists \newcommand*\fontaxes@check@family[1]{% \begingroup \fontfamily{#1}\try@load@fontshape \expandafter \ifx\csname\curr@fontshape\endcsname\relax \aftergroup\fontaxes@existsfalse \else \aftergroup\fontaxes@existstrue \fi \endgroup } \newcommand*\fontaxes@split@prefix{} \newcommand*\fontaxes@split@suffix{} \newcommand*\fontaxes@split@family{} \def\fontaxes@split@family#1-#2-#3\@nnil{% \let\fontaxes@split@prefix\relax \let\fontaxes@split@suffix\relax \def\@tempa{#3}% \ifx\@tempa\@empty\else \def\fontaxes@split@suffix{#2}% \ifx\fontaxes@split@suffix\@empty \let\fontaxes@split@suffix\relax \else \def\fontaxes@split@prefix{#1}% \fi \fi } \newcommand*\fontaxes@split@familyalt{} \def\fontaxes@split@familyalt#1#2#3#4#5\@nnil{% \let\fontaxes@split@prefix\relax \let\fontaxes@split@suffix\relax \edef\@tempa{#5}% \ifx\@tempa\@empty \ifx\@empty#4% \def\fontaxes@split@prefix{#1#2#3}% \def\fontaxes@split@suffix{x}% \else \def\fontaxes@split@prefix{#1#2#3}% \def\fontaxes@split@suffix{#4}% \fi \fi } \newcommand\fontaxes@foreach[2]{% \begingroup \def\fontaxes@foreach@{#2}% \@tfor\@tempa:=#1\do{% \@temptokena\expandafter{\fontaxes@foreach@}% \edef\fontaxes@foreach@{% \noexpand\@for \expandafter\noexpand\@tempa:=% \expandafter\noexpand\csname \expandafter\expandafter \expandafter\@gobble \expandafter\string\@tempa @domain% \endcsname \noexpand\do{\the\@temptokena}% }% }% \expandafter\endgroup\fontaxes@foreach@ } %% %% %% End of file `fontaxes.sty'.