diff options
author | Karl Berry <karl@freefriends.org> | 2013-07-23 22:26:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-07-23 22:26:44 +0000 |
commit | c053ff39827357f7a2b7c78400192d49274a1a7a (patch) | |
tree | 3d81a8aa4bc416c1c4c0824e76e2cab5a4e911ab /Master/texmf-dist/tex/latex/libertine/libertineRoman.sty | |
parent | 92d4baa14f458c225ecfdc514e33ee0a87d23020 (diff) |
libertine (23jul13)
git-svn-id: svn://tug.org/texlive/trunk@31272 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/libertine/libertineRoman.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/libertine/libertineRoman.sty | 297 |
1 files changed, 297 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/libertine/libertineRoman.sty b/Master/texmf-dist/tex/latex/libertine/libertineRoman.sty new file mode 100644 index 00000000000..7cbebc0c7d1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/libertine/libertineRoman.sty @@ -0,0 +1,297 @@ +\ProvidesPackage{libertineRoman}[% + 2013/07/19 (Bob Tennent) Supports Libertine Roman fonts for all LaTeX engines.] + +\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} + +\newif\iflibertine@otf +\ifxetex + \libertine@otftrue +\else\ifluatex + \libertine@otftrue +\else % [pdf]LaTeX + \libertine@otffalse +\fi\fi + +\newif\iflibertine@lining \libertine@liningtrue % NEW +\newif\iflibertine@tabular \libertine@tabulartrue % NEW +\newif\iflibertine@semibold \libertine@semiboldfalse + +\def\libertine@newfigdefaults{% +\PackageWarningNoLine{libertine}{% + ****************************************\MessageBreak + Figure defaults are now: lining, tabular; \MessageBreak + for options, see the documentation. \MessageBreak + ****************************************} +} +\DeclareOptionX{type1}[true]{% +\@nameuse{if#1}\libertine@otffalse\fi +} +\DeclareOptionX{nofontspec}[true]{% +\@nameuse{if#1}\libertine@otffalse\fi +} +\DeclareOptionX{lining}[true]{% +\@nameuse{libertine@lining#1} +\iflibertine@lining\libertine@newfigdefaults\fi +} +\DeclareOptionX{nf}[true]{% +\@nameuse{libertine@lining#1} +\iflibertine@lining\libertine@newfigdefaults\fi +} +\DeclareOptionX{lf}[true]{% +\@nameuse{libertine@lining#1} +\iflibertine@lining\libertine@newfigdefaults\fi +} +\DeclareOptionX{oldstyle}[true]{% +\@nameuse{if#1}% + \libertine@liningfalse +\else + \libertine@liningtrue +\fi +\iflibertine@lining\libertine@newfigdefaults\fi +} +\DeclareOptionX{osf}[true]{% +\@nameuse{if#1}% + \libertine@liningfalse +\else + \libertine@liningtrue +\iflibertine@lining\libertine@newfigdefaults\fi +\fi +} +\DeclareOptionX{tabular}[true]{% +\@nameuse{libertine@tabular#1} +\iflibertine@tabular\libertine@newfigdefaults\fi +} +\DeclareOptionX{t}[true]{% +\@nameuse{libertine@tabular#1} +\iflibertine@tabular\libertine@newfigdefaults\fi +} +\DeclareOptionX{proportional}[true]{% +\@nameuse{if#1}% + \libertine@tabularfalse +\else + \libertine@tabulartrue +\fi +\iflibertine@tabular\libertine@newfigdefaults\fi +} +\DeclareOptionX{p}[true]{% +\@nameuse{if#1}% + \libertine@tabularfalse +\else + \libertine@tabulartrue +\fi +\iflibertine@tabular\libertine@newfigdefaults\fi +} + +\DeclareOptionX{semibold}[true]{% +\@nameuse{libertine@semibold#1} +} +\DeclareOptionX{sb}[true]{% +\@nameuse{libertine@semibold#1} +} +\DeclareOptionX{bold}[true]{% +\@nameuse{if#1}libertine@semiboldfalse\else\libertine@semiboldtrue\fi +} + +\newcommand*{\LinuxLibertineT@scale}{1} +\newcommand*{\LinuxLibertineDisplayT@scale}{1} +\newcommand*{\LinuxLibertineInitialsT@scale}{1} + +\ProcessOptionsX\relax + +\iflibertine@otf + \iflibertine@lining + \def\libertine@figurestyle{Lining} + \else + \def\libertine@figurestyle{OldStyle} + \fi + \iflibertine@tabular + \def\libertine@figurealign{Monospaced} + \else + \def\libertine@figurealign{Proportional} + \fi + \iflibertine@semibold + \def\libertine@boldstyle{RZ} + \else + \def\libertine@boldstyle{RB} + \fi + +\else % type1 + + \iflibertine@lining + \def\libertine@figurestyle{LF} + \else + \def\libertine@figurestyle{OsF} + \fi + \iflibertine@tabular + \def\libertine@figurealign{T} + \else + \def\libertine@figurealign{} + \fi + \iflibertine@semibold + \def\bfseries@rm{sb} + \else + \def\bfseries@rm{b} + \fi +\fi + + +\iflibertine@otf + \RequirePackage{fontspec} +\else + \RequirePackage{mweights} + \RequirePackage{fontenc,fontaxes} +\fi + +% Set main and/or sans and mono fonts: + +\iflibertine@otf + + \def\libertine@base{LinLibertine} + \ifxetex\XeTeXtracingfonts=1\fi + \defaultfontfeatures{ + Ligatures = TeX , + Extension = .otf , + SmallCapsFeatures={Letters=SmallCaps} + } + \setmainfont + [ Numbers = {\libertine@figurealign,\libertine@figurestyle}, + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_\libertine@boldstyle, + BoldItalicFont = *_\libertine@boldstyle I, + ] {\libertine@base} + \newfontfamily\libertine + [ Numbers = {\libertine@figurealign,\libertine@figurestyle}, + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_\libertine@boldstyle, + BoldItalicFont = *_\libertine@boldstyle I, + ] {\libertine@base} + \newfontfamily\libertineSB + [ Numbers = {\libertine@figurealign,\libertine@figurestyle}, + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_RZ, + BoldItalicFont = *_RZI, + ] {\libertine@base} + \newfontfamily\libertineOsF + [ Numbers = {\libertine@figurealign,OldStyle}, + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_\libertine@boldstyle, + BoldItalicFont = *_\libertine@boldstyle I, + ] {\libertine@base} + \newfontfamily\libertineLF + [ Numbers = {\libertine@figurealign,Lining}, + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_\libertine@boldstyle, + BoldItalicFont = *_\libertine@boldstyle I, + ] {\libertine@base} + \newfontfamily\libertineDisplay + [ Numbers = {\libertine@figurealign,\libertine@figurestyle}, + UprightFont = *_DR, + ItalicFont = *_RI, + BoldFont = *_\libertine@boldstyle, + BoldItalicFont = *_\libertine@boldstyle I, + ] {\libertine@base} + \newfontface\libertineInitial{\libertine@base _I} + + \providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}} + +\else % type1 + + \edef\libertine@family{LinuxLibertineT-\libertine@figurealign\libertine@figurestyle} + + \def\rmdefault{\libertine@family} + \providecommand*\libertine{\fontfamily{\libertine@family}\selectfont} + \providecommand*\libertineSB{\fontfamily{\libertine@family}\selectfont\renewcommand\bfdefault{sb}} + \providecommand*\libertineOsF{\fontfamily{LinuxLibertineT-\libertine@figurealign OsF}\selectfont} + \providecommand*\libertineLF{\fontfamily{LinuxLibertineT-\libertine@figurealign LF}\selectfont} + \providecommand*\libertineDisplay{\fontfamily{LinuxLibertineDisplayT-\libertine@figurealign\libertine@figurestyle}\selectfont} + \providecommand*\libertineInitial{\fontfamily{LinuxLibertineInitialsT-\libertine@figurealign\libertine@figurestyle}\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 + \DeclareTextFontCommand{\oldstylenumsf}{\sffamily\oldstylenums} + \DeclareTextFontCommand{\liningnumsf}{\sffamily\liningnums} +\else % type1 + \DeclareTextFontCommand{\oldstylenums}{\libertineOsF} + \DeclareTextFontCommand{\liningnums}{\libertineLF} + \DeclareTextFontCommand{\oldstylenumsf}{\sffamily\oldstylenums} + \DeclareTextFontCommand{\liningnumsf}{\sffamily} +\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 , + ] {\libertine@base} + \newfontfamily\libertineproportional + [ Numbers = {Proportional,\libertine@figurestyle}, + UprightFont = *_R, + ItalicFont = *_RI, + BoldFont = *_\libertine@boldstyle, + BoldItalicFont = *_\libertine@boldstyle I, + ] {\libertine@base} + \DeclareTextFontCommand{\tabularnums}{\libertinetabular} + \DeclareTextFontCommand{\proportionalnums}{\libertineproportional} +\else % type1 + \DeclareTextFontCommand{\tabularnums}{\fontfamily{LinuxLibertineT-T\libertine@figurestyle}\selectfont} + \DeclareTextFontCommand{\proportionalnums}{\fontfamily{LinuxLibertineT-\libertine@figurestyle}\selectfont} +\fi + +\iflibertine@otf + \def\lib@fxl{LinLibertine_R} + \def\lib@fxi{LinLibertine_I} + + \providecommand*\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@fxi \@namedef{#1@#2}{{\libertineInitial\char#3\relax}}\else% + \fi\fi} + % + \input{LinLibertine_R} + \input{LinLibertine_I} + % + \DeclareRobustCommand*\libertineGlyph[1]{\@nameuse{LinLibertine_R@#1}} + \DeclareRobustCommand*\libertineInitialGlyph[1]{\@nameuse{LinLibertine_I@#1}} + +\else %type1 + + \def\lib@ini{LinLibertine_I} + \providecommand*\DeclareTextGlyphY[3]{% + % \DeclareTextGlyphY{fxl}{s_t}{64262} + % #1=basefont #2=glyphname, #3=position + \def\lib@temp{#1}% + \ifx\lib@temp\lib@ini \@namedef{#1@#2}{{\libertineInitial\char#3\relax}}\else% + \fi} + % + \input{LinLibertine_I} + % + \DeclareRobustCommand*\libertineInitialGlyph[1]{\@nameuse{LinLibertine_I@#1}} + +\fi + +\iflibertine@otf +% turn off defaults in case other fonts are selected: + \defaultfontfeatures{} +\fi + +\endinput |