diff options
author | Karl Berry <karl@freefriends.org> | 2008-09-20 18:36:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-09-20 18:36:02 +0000 |
commit | b421230ee4a88ea4c861ea1553e26129cba14ae0 (patch) | |
tree | e523f32052e1caf2bcd916fdad4d3aa4710d3213 /Master/texmf-dist/tex/xelatex/xelibertine/xelibertine.sty | |
parent | fa6b1986536ef299677cb5b71d0164fc9af2a759 (diff) |
new package xelibertine
git-svn-id: svn://tug.org/texlive/trunk@10663 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xelibertine/xelibertine.sty')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xelibertine/xelibertine.sty | 179 |
1 files changed, 179 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xelibertine/xelibertine.sty b/Master/texmf-dist/tex/xelatex/xelibertine/xelibertine.sty new file mode 100644 index 00000000000..44455bdb819 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/xelibertine/xelibertine.sty @@ -0,0 +1,179 @@ +% +% Paket fuer den Font "Libertine" (XeTeX) +% +% (c) Michael Niedermair +% +% (License GPL) +% +% $Id: xelibertine.sty 32 2008-08-20 07:43:25Z mgn $ +% +% 0.1beta Erste BETA-Version. +% 0.1i Version auf Makro umgestellt. +% 0.1h Umbenennung des Paketes +% 0.1g Umbenennung der Makros +% neue Makros erstellt +% Numbers und HyphenChar deaktiviert. +% 0.1f Als Standard Numbers und HyphenChar gesetzt. +% 0.1e Parameter 'draft'/'final' hinzugefuegt. +% Parameter 'drafttext' hizugefuegt. +% 0.1d Parameter 'dejavusans' hinzugefuegt. +% Parameter 'dejavusansmono' hinzugefuegt. +% 0.1c Ueberprueft, ob der Glyphname existiert. +% 0.1b Extrahieren alle Glyphen +% 0.1a Test der 'feature tags' +% 0.1 erster Start +% +% ------------------------------------- +\def\libertineVersion{0.1beta} +\def\libertineVersionDate{2008/08/20} +% +\ProvidesPackage{xelibertine}[% + \libertineVersionDate\space-\space\libertineVersion\space-XeTeX: + Font libertine - BETA (License GPL) + Michael Niedermair] +% +\RequirePackage{ifxetex,keyval,calc,ifthen,xcolor,xspace} +% +\ifxetex + \def\libertine@debug{false}% debug + \def\libertine@amsmath{true}% use amsmath + \def\libertine@lucida{false}% use lucida font + \def\libertine@rawfeature{}% use otf features + \def\libertine@script{}% otf scripts + \def\libertine@language{}% otf language + \def\libertine@dejavusans{false}% use the font DejaVu Sans + \def\libertine@dejavusansmono{false}% use the font DejaVu Sans Mono + \def\libertine@draft{false}% draft + \def\libertine@drafttext{Entwurf}% draft text + \def\libertine@quotes{true}% quotes + % + \define@key{libertine}{debug}[true]{\def\libertine@debug{#1}} + \define@key{libertine}{noamsmath}[false]{\def\libertine@amsmath{#1}} + \define@key{libertine}{lucida}[true]{\def\libertine@lucida{#1}} + \define@key{libertine}{rawfeature}[]{\def\libertine@rawfeature{#1}} + \define@key{libertine}{script}[]{\def\libertine@script{#1}} + \define@key{libertine}{language}[]{\def\libertine@language{#1}} + \define@key{libertine}{dejavusans}[true]{\def\libertine@dejavusans{#1}} + \define@key{libertine}{dejavusansmono}[true]{\def\libertine@dejavusansmono{#1}} + \define@key{libertine}{draft}[true]{\def\libertine@draft{true}} + \define@key{libertine}{final}[true]{\def\libertine@draft{false}} + \define@key{libertine}{drafttext}[Entwurf]{\def\libertine@drafttext{#1}} + \define@key{libertine}{noquotes}[true]{\def\libertine@quotes{false}} + % + \def\ProcessOptionsWithKV#1{% + \let\@tempc\relax + \let\libertine@tempa\@empty + \@for\CurrentOption:=\@classoptionslist\do{% + \@ifundefined{KV@#1@\CurrentOption}% + {}% + {% + \edef\libertine@tempa{\libertine@tempa,\CurrentOption,}% + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + }% + }% + \edef\libertine@tempa{% + \noexpand\setkeys{#1}{% + \libertine@tempa\@ptionlist{\@currname.\@currext}% + }% + }% + \libertine@tempa + \let\CurrentOption\@empty + } + \ProcessOptionsWithKV{libertine} + \AtEndOfPackage{% + \let\@unprocessedoptions\relax + } + % ------------------------------------------------------- + + % debug + \ifthenelse{\equal{\libertine@debug}{true}}{ + \typeout{------ libertine: DEBUG ---------------------------} + \typeout{debug = \libertine@debug} + \typeout{amsmath = \libertine@amsmath} + \typeout{lucida = \libertine@lucida} + \typeout{rawfeature = \libertine@rawfeature} + \typeout{script = \libertine@script} + \typeout{language = \libertine@language} + \typeout{Font DeJaVu Sans = \libertine@dejavusans} + \typeout{Font DeJaVu SansMono = \libertine@dejavusansmono} + \typeout{draft = \libertine@draft} + \typeout{drafttext = \libertine@drafttext} + \typeout{quotes = \libertine@quotes} + \typeout{---------- DEBUG ----------------------------------} + }{}% + + % amsmath + \ifthenelse{\equal{\libertine@amsmath}{true}}{ + \RequirePackage{amsmath} + }{}% + % lucida + \ifthenelse{\equal{\libertine@lucida}{true}}{ + \RequirePackage[expert]{lucidabr} + }{}% + + \RequirePackage{xltxtra} + \setromanfont[Mapping=tex-text% + ,RawFeature=\libertine@rawfeature% + ,Language=\libertine@language% + ,Script=\libertine@script% + ,HyphenChar="E130% + ]{Linux Libertine O} + \newfontfamily\libertine[RawFeature=\libertine@rawfeature% + ,Language=\libertine@language% + ,Script=\libertine@script% + ,HyphenChar="E130% + ]{Linux Libertine O} + + % dejavu sans + \ifthenelse{\equal{\libertine@dejavusans}{true}}{ + \setsansfont[Mapping=tex-text]{DejaVu Sans} + }{}% + % dejavu sans mono + \ifthenelse{\equal{\libertine@dejavusansmono}{true}}{ + \setmonofont[Mapping=tex-text]{DejaVu Sans Mono} + }{}% + % + % draft + \ifthenelse{\equal{\libertine@draft}{true}}{ + \RequirePackage{eso-pic} + \AddToShipoutPicture{% + \AtTextLowerLeft{% + \makebox(\LenToUnit{\textwidth},\LenToUnit{\textheight}){ + \fontsize{6cm}{6cm}\selectfont% + \rotatebox[origin=c]{-50}{\textcolor{lightgray}{\libertine@drafttext}} + }}}% + }{}% + % quotes + \ifthenelse{\equal{\libertine@quotes}{true}}{ + \ProvideTextCommand{\glqq}{EU1}{% + \textormath{\quotedblbase}{\mbox{\quotedblbase}}} + \ProvideTextCommand{\grqq}{EU1}{% + \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}} + }{}% + % ----------------------------------------------------------------- + % + \DeclareRobustCommand*\OTF[1]{\libertine\addfontfeature{RawFeature=#1}} + \DeclareRobustCommand*\Lglyph{\@ifstar{}{\libertine}\Lglyphx} + \DeclareRobustCommand*\Lglyphx[1]{% + \@tempcnta=\XeTeXglyphindex "#1"\relax% + \ifnum\@tempcnta>0% + \XeTeXglyph\@tempcnta% + \fi + } + \DeclareRobustCommand*\Leuro{\libertine\Lglyph{Euro}\xspace} + \DeclareRobustCommand*\Llogo{\mbox{% + \Lglyph{uniE041}% + \textcolor[HTML]{00710A}{\Lglyph{uniE042}}}} + \DeclareRobustCommand*\numprp{\OTF{-tnum;+pnum}} + \DeclareRobustCommand*\numtab{\OTF{-pnum;+tnum}} + \DeclareRobustCommand*\numold{\OTF{+onum}} + \DeclareRobustCommand*\numzero{\OTF{+zero}} + \DeclareRobustCommand*\numfrac{\OTF{+frac}} + % ------------------------------------------------------- +\else + \PackageWarning{xelibertine}{*** xelibertine.sty works only with xetex! ***^^J} +\fi +% +\endinput + |