diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/libertine/libertine.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/libertine/libertine.sty | 297 |
1 files changed, 215 insertions, 82 deletions
diff --git a/Master/texmf-dist/tex/latex/libertine/libertine.sty b/Master/texmf-dist/tex/latex/libertine/libertine.sty index e34cfd48f3b..cc2e23ec475 100644 --- a/Master/texmf-dist/tex/latex/libertine/libertine.sty +++ b/Master/texmf-dist/tex/latex/libertine/libertine.sty @@ -1,5 +1,5 @@ \ProvidesPackage{libertine}[% - 2012/11/13 (Bob Tennent) Supports Libertine and Biolinum fonts for all LaTeX engines. ] + 2012/11/26 (Bob Tennent) Supports Libertine and Biolinum fonts for all LaTeX engines. ] % with (partial) compatibilty with libertine-type1, biolinum-type1, % libertine, libertine-legacy and libertineotf packages @@ -19,27 +19,42 @@ \newif\iflibertine@rm \libertine@rmfalse \newif\iflibertine@sfdefault \libertine@sfdefaultfalse \newif\iflibertine@lining \libertine@liningfalse +\newif\ifbiolinum@lining \biolinum@liningfalse \newif\iflibertine@tabular \libertine@tabularfalse +\newif\ifbiolinum@tabular \biolinum@tabularfalse \newif\iflibertine@semibold \libertine@semiboldfalse +\DeclareOptionX{biolinum}{\libertine@sftrue} \DeclareOptionX{sf}{\libertine@sftrue} +\DeclareOptionX{libertine}{\libertine@rmtrue} \DeclareOptionX{rm}{\libertine@rmtrue} \DeclareOptionX{sfdefault}{\libertine@sftrue\libertine@sfdefaulttrue} \DeclareOptionX{type1}{\libertine@otffalse} -\DeclareOptionX{lining}{\libertine@liningtrue} -\DeclareOptionX{nf}{\libertine@liningtrue} -\DeclareOptionX{lf}{\libertine@liningtrue} -\DeclareOptionX{oldstyle}{\libertine@liningfalse} -\DeclareOptionX{osf}{\libertine@liningfalse} -\DeclareOptionX{tabular}{\libertine@tabulartrue} -\DeclareOptionX{proportional}{\libertine@tabularfalse} +\DeclareOptionX{lining}{\libertine@liningtrue\biolinum@liningtrue} +\DeclareOptionX{nf}{\libertine@liningtrue\biolinum@liningtrue} +\DeclareOptionX{lf}{\libertine@liningtrue\biolinum@liningtrue} +\DeclareOptionX{oldstyle}{\libertine@liningfalse\biolinum@liningfalse} +\DeclareOptionX{osf}{\libertine@liningfalse\biolinum@liningfalse} +\DeclareOptionX{sflining}{\biolinum@liningtrue} +\DeclareOptionX{sflf}{\biolinum@liningtrue} +\DeclareOptionX{sfoldstyle}{\biolinum@liningfalse} +\DeclareOptionX{sfosf}{\biolinum@liningfalse} +\DeclareOptionX{tabular}{\libertine@tabulartrue\biolinum@tabulartrue} +\DeclareOptionX{t}{\libertine@tabulartrue\biolinum@tabulartrue} +\DeclareOptionX{proportional}{\libertine@tabularfalse\biolinum@tabularfalse} +\DeclareOptionX{p}{\libertine@tabularfalse\biolinum@tabularfalse} +\DeclareOptionX{sftabular}{\biolinum@tabulartrue} +\DeclareOptionX{sft}{\biolinum@tabulartrue} +\DeclareOptionX{sfproportional}{\biolinum@tabularfalse} +\DeclareOptionX{sfp}{\biolinum@tabularfalse} \DeclareOptionX{semibold}{\libertine@semiboldtrue} +\DeclareOptionX{sb}{\libertine@semiboldtrue} \DeclareOptionX{bold}{\libertine@semiboldfalse} -\newcommand*{\LinuxLibertineO@scale}{1} % not adjustable -\newcommand*{\LinuxBiolinumO@scale}{1} -\DeclareOptionX{scaled}{\renewcommand*{\LinuxBiolinumO@scale}{#1}} -\DeclareOptionX{scale}{\renewcommand*{\LinuxBiolinumO@scale}{#1}} +\newcommand*{\LinuxLibertineT@scale}{1} % not adjustable +\newcommand*{\LinuxBiolinumT@scale}{1} +\DeclareOptionX{scaled}{\renewcommand*{\LinuxBiolinumT@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\LinuxBiolinumT@scale}{#1}} \ExecuteOptionsX{oldstyle,proportional,bold} \ProcessOptionsX\relax @@ -55,10 +70,20 @@ \else \def\libertine@figurealign{Proportional} \fi + \ifbiolinum@lining + \def\biolinum@figurestyle{} % lnum feature missing in RB (and hence RBO) + \else + \def\biolinum@figurestyle{OldStyle} + \fi + \ifbiolinum@tabular + \def\biolinum@figurealign{Monospaced} + \else + \def\biolinum@figurealign{Proportional} + \fi \iflibertine@semibold - \def\LibertineO@boldstyle{RZ} + \def\libertine@boldstyle{RZ} \else - \def\LibertineO@boldstyle{RB} + \def\libertine@boldstyle{RB} \fi \else % type1 @@ -73,6 +98,16 @@ \else \def\libertine@figurealign{} \fi + \ifbiolinum@lining + \def\biolinum@figurestyle{LF} + \else + \def\biolinum@figurestyle{OsF} + \fi + \ifbiolinum@tabular + \def\biolinum@figurealign{T} + \else + \def\biolinum@figurealign{} + \fi \iflibertine@semibold \renewcommand*{\bfdefault}{sb} \else @@ -106,90 +141,112 @@ [ Numbers = {\libertine@figurealign,\libertine@figurestyle}, UprightFont = *_R, ItalicFont = *_RI, - BoldFont = *_\LibertineO@boldstyle, - BoldItalicFont = *_\LibertineO@boldstyle I - ] {LinLibertine530} - \newfontfamily\libertine - [ Numbers = {\libertine@figurealign,\libertine@figurestyle}, - UprightFont = *_R, - ItalicFont = *_RI, - BoldFont = *_\LibertineO@boldstyle, - BoldItalicFont = *_\LibertineO@boldstyle I + BoldFont = *_\libertine@boldstyle, + BoldItalicFont = *_\libertine@boldstyle I ] {LinLibertine530} \fi \iflibertine@sf \setsansfont - [ Numbers = {\libertine@figurealign, \libertine@figurestyle} , - Scale = \LinuxBiolinumO@scale , - UprightFont = *_R , - ItalicFont = *_RI , - BoldFont = *_RB , - BoldItalicFont = *_RBO % oblique to fake italic - ] {LinBiolinum530} - \newfontfamily\biolinum - [ Numbers = {\libertine@figurealign, \libertine@figurestyle} , - Scale = \LinuxBiolinumO@scale , + [ Numbers = {\biolinum@figurealign, \biolinum@figurestyle} , + Scale = \LinuxBiolinumT@scale , UprightFont = *_R , ItalicFont = *_RI , BoldFont = *_RB , BoldItalicFont = *_RBO % oblique to fake italic ] {LinBiolinum530} % grab the \sfdefault in case it changes subsequently: - \let\biolinumfamily\sfdefault - \iflibertine@sfdefault\renewcommand*\familydefault{\biolinumfamily}\fi + \let\biolinum@family\sfdefault + \iflibertine@sfdefault\renewcommand*\familydefault{\biolinum@family}\fi \fi + \newfontfamily\libertine + [ Numbers = {\libertine@figurealign,\libertine@figurestyle}, + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_\libertine@boldstyle, + BoldItalicFont = *_\libertine@boldstyle I + ] {LinLibertine530} + \newfontfamily\libertineSB + [ Numbers = {\libertine@figurealign,\libertine@figurestyle}, + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_RZ, + BoldItalicFont = *_RZI + ] {LinLibertine530} + \newfontfamily\libertineOsF + [ Numbers = {\libertine@figurealign,OldStyle}, + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_\libertine@boldstyle, + BoldItalicFont = *_\libertine@boldstyle I + ] {LinLibertine530} + \newfontfamily\libertineLF + [ Numbers = {\libertine@figurealign,Lining}, + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_\libertine@boldstyle, + BoldItalicFont = *_\libertine@boldstyle I + ] {LinLibertine530} + \newfontfamily\biolinum + [ Numbers = {\biolinum@figurealign, \biolinum@figurestyle} , + Scale = \LinuxBiolinumT@scale , + UprightFont = *_R , + ItalicFont = *_RI , + BoldFont = *_RB , + BoldItalicFont = *_RBO % oblique to fake italic + ] {LinBiolinum530} + \newfontfamily\biolinumOsF + [ Numbers = {\biolinum@figurealign, OldStyle} , + Scale = \LinuxBiolinumT@scale , + UprightFont = *_R , + ItalicFont = *_RI , + BoldFont = *_RB , + BoldItalicFont = *_RBO % oblique to fake italic + ] {LinBiolinum530} + \newfontfamily\biolinumLF + [ Numbers = {\biolinum@figurealign} , % lnum feature missing + Scale = \LinuxBiolinumT@scale , + UprightFont = *_R , + ItalicFont = *_RI , + BoldFont = *_RB , + BoldItalicFont = *_RBO % oblique to fake italic + ] {LinBiolinum530} + + \newcommand\sufigures{\addfontfeatures{VerticalPosition=Superior}} \else % type1 - \def\libertinefamily{LinuxLibertineO-\libertine@figurealign\libertine@figurestyle} - \def\biolinumfamily{LinuxBiolinumO-\libertine@figurealign\libertine@figurestyle} + \def\libertine@family{LinuxLibertineT-\libertine@figurealign\libertine@figurestyle} + \def\biolinum@family{LinuxBiolinumT-\biolinum@figurealign\biolinum@figurestyle} - \iflibertine@rm\renewcommand*\rmdefault{\libertinefamily}\fi - \iflibertine@sf\renewcommand*\sfdefault{\biolinumfamily}\fi - \iflibertine@sfdefault\renewcommand*\familydefault{\biolinumfamily}\fi + \iflibertine@rm \renewcommand*\rmdefault{\libertine@family} \fi + \iflibertine@sf \renewcommand*\sfdefault{\biolinum@family} \fi + \iflibertine@sfdefault \renewcommand*\familydefault{\biolinum@family} \fi + \newcommand*\libertine{\fontfamily{\libertine@family}\selectfont} + \newcommand*\libertineSB{\fontfamily{\libertine@family}\selectfont\renewcommand\bfdefault{sb}} + \newcommand*\libertineOsF{\fontfamily{LinuxLibertineT-\libertine@figurealign OsF}\selectfont} + \newcommand*\libertineLF{\fontfamily{LinuxLibertineT-\libertine@figurealign LF}\selectfont} + \newcommand*\biolinum{\fontfamily{\biolinum@family}\selectfont} + \newcommand*\biolinumOsF{\fontfamily{LinuxBiolinumT-\biolinum@figurealign OsF}\selectfont} + \newcommand*\biolinumLF{\fontfamily{LinuxBiolinumT-\biolinum@figurealign LF}\selectfont} + + \fa@naming@exception{figures}{{superior}{proportional}}{Sup} + \fa@naming@exception{figures}{{superior}{tabular}}{Sup} + \def\sufigures{\@nomath\sufigures\fontfigurestyle{superior}\selectfont} \fi +\DeclareTextFontCommand{\textsu}{\sufigures} +\let\textsuperior\textsu % Define \oldstylenums[f] and \liningnums[f] \iflibertine@otf - \newfontfamily\libertineosf - [ Numbers = {\libertine@figurealign,OldStyle}, - UprightFont = *_R, - ItalicFont = *_RI, - BoldFont = *_\LibertineO@boldstyle, - BoldItalicFont = *_\LibertineO@boldstyle I - ] {LinLibertine530} - \newfontfamily\libertinelf - [ Numbers = {\libertine@figurealign,Lining}, - UprightFont = *_R, - ItalicFont = *_RI, - BoldFont = *_\LibertineO@boldstyle, - BoldItalicFont = *_\LibertineO@boldstyle I - ] {LinLibertine530} - \newfontfamily\biolinumosf - [ Numbers = {\libertine@figurealign,OldStyle}, - Scale = \LinuxBiolinumO@scale , - UprightFont = *_R, - ItalicFont = *_RI, - BoldFont = *_RB, - BoldItalicFont = *_RBO % oblique to fake italic - ] {LinBiolinum530} - \newfontfamily\biolinumlf - [ Numbers = {\libertine@figurealign,Lining}, - Scale = \LinuxBiolinumO@scale , - UprightFont = *_R, - ItalicFont = *_RI, - BoldFont = *_RB, - BoldItalicFont = *_RBO % oblique to fake italic - ] {LinBiolinum530} \iflibertine@rm - \renewcommand*\oldstylenums[1]{\libertineosf #1} - \renewcommand*\liningnums[1]{\libertinelf #1} + \renewcommand*\oldstylenums[1]{{\libertineOsF #1}} + \renewcommand*\liningnums[1]{{\libertineLF #1}} \fi \iflibertine@sf - \newcommand*\oldstylenumsf[1]{\biolinumosf #1} - \newcommand*\liningnumsf[1]{\biolinumlf #1} + \newcommand*\oldstylenumsf[1]{{\biolinumOsF #1}} + \newcommand*\liningnumsf[1]{{\biolinumLF #1}} \fi \iflibertine@rm \iflibertine@sf\else % Libertine only @@ -205,18 +262,18 @@ \iflibertine@rm \iflibertine@sf % Both Libertine and Biolinum \renewcommand*\oldstylenums [1] - {{\fontfamily{LinuxLibertineO-\libertine@figurealign OsF}\selectfont#1}} + {{\libertineOsF#1}} \newcommand*\liningnums [1] - {{\fontfamily{LinuxLibertineO-\libertine@figurealign LF}\selectfont#1}} + {{\libertineLF#1}} \newcommand*\oldstylenumsf [1] - {{\fontfamily{LinuxBiolinumO-\libertine@figurealign OsF}\selectfont#1}} + {{\biolinumOsF#1}} \newcommand*\liningnumsf [1] - {{\fontfamily{LinuxBiolinumO-\libertine@figurealign LF}\selectfont#1}} + {{\biolinumLF#1}} \else % Libertine only \renewcommand*\oldstylenums [1] - {{\fontfamily{LinuxLibertineO-\libertine@figurealign OsF}\selectfont#1}} + {{\libertineOsF#1}} \newcommand*\liningnums [1] - {{\fontfamily{LinuxLibertineO-\libertine@figurealign LF}\selectfont#1}} + {{\libertineLF#1}} \newcommand*\oldstylenumsf [1]{\textsf{\oldstylenums{#1}}} \newcommand*\liningnumsf [1]{\textsf{#1}} \fi @@ -224,12 +281,88 @@ % \oldstylenums defined by \textcomp? \newcommand*\liningnums [1]{#1} \newcommand*\oldstylenumsf [1] - {{\fontfamily{LinuxBiolinumO-\libertine@figurealign OsF}\selectfont#1}} + {{\biolinumOsF#1}} \newcommand*\liningnumsf [1] - {{\fontfamily{LinuxBiolinumO-\libertine@figurealign LF}\selectfont#1}} + {{\biolinumLF#1}} \fi \fi +% Define \tabularnums[f] and \proportionalnums[f] + +\iflibertine@otf + \newfontfamily\libertinetabular + [ Numbers = {Monospaced,\libertine@figurestyle}, + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_\libertine@boldstyle, + BoldItalicFont = *_\libertine@boldstyle I + ] {LinLibertine530} + \newfontfamily\libertineproportional + [ Numbers = {Proportional,\libertine@figurestyle}, + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_\libertine@boldstyle, + BoldItalicFont = *_\libertine@boldstyle I + ] {LinLibertine530} + \newfontfamily\biolinumtabular + [ Numbers = {Monospaced,\biolinum@figurestyle}, + Scale = \LinuxBiolinumT@scale , + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_RB, + BoldItalicFont = *_RBO % oblique to fake italic + ] {LinBiolinum530} + \newfontfamily\biolinumproportional + [ Numbers = {Proportional,\biolinum@figurestyle}, + Scale = \LinuxBiolinumT@scale , + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_RB, + BoldItalicFont = *_RBO % oblique to fake italic + ] {LinBiolinum530} + \iflibertine@rm + \newcommand*\tabularnums[1]{{\libertinetabular #1}} + \newcommand*\proportionalnums[1]{{\libertineproportional #1}} + \fi + \iflibertine@sf + \newcommand*\tabularnumsf[1]{{\biolinumtabular #1}} + \newcommand*\proportionalnumsf[1]{{\biolinumproportional #1}} + \fi +\else % type1 + \iflibertine@rm + \newcommand*\tabularnums[1] + {{\fontfamily{LinuxLibertineT-T\libertine@figurestyle}\selectfont#1}} + \newcommand*\proportionalnums[1] + {{\fontfamily{LinuxLibertineT-\libertine@figurestyle}\selectfont#1}} + \fi + \iflibertine@sf + \newcommand*\tabularnumsf[1] + {{\fontfamily{LinuxBiolinumT-T\biolinum@figurestyle}\selectfont#1}} + \newcommand*\proportionalnumsf[1] + {{\fontfamily{LinuxBiolinumT-\biolinum@figurestyle}\selectfont#1}} + \fi +\fi + +\iflibertine@otf + \def\lib@fxl{fxl} + \def\lib@fxb{fxb} + + \newcommand*\DeclareTextGlyphY[3]{% + % \DeclareTextGlyphY{fxl}{s_t}{64262} + % #1=basefont #2=glyphname, #3=position + \def\lib@temp{#1}% + \ifx\lib@temp\lib@fxl \@namedef{#1@#2}{{\libertine\char#3\relax}}\else% + \ifx\lib@temp\lib@fxb \@namedef{#1@#2}{{\biolinum\char#3\relax}}\else% + \fi\fi} + % + \input{fxluni.inc} + \input{fxbuni.inc} + % + \DeclareRobustCommand*\libertineGlyph[1]{\@nameuse{fxl@#1}} + \DeclareRobustCommand*\biolinumGlyph[1]{\@nameuse{fxb@#1}} +\fi + + % turn off defaults in case other fonts are selected: \iflibertine@otf \defaultfontfeatures{} |