summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/interfaces/interfaces-LaTeX.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-10-25 23:12:18 +0000
committerKarl Berry <karl@freefriends.org>2010-10-25 23:12:18 +0000
commitd74b95d250c7632cb73e7420db04e2e38adc3827 (patch)
treefbc6763253fbb9d309da7b613857d782ee5feccb /Master/texmf-dist/tex/latex/interfaces/interfaces-LaTeX.sty
parentec47c1b7880fd4f626f8aa8377e576e03d72c24f (diff)
new latex package interfaces (25oct10)
git-svn-id: svn://tug.org/texlive/trunk@20206 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/interfaces/interfaces-LaTeX.sty')
-rw-r--r--Master/texmf-dist/tex/latex/interfaces/interfaces-LaTeX.sty254
1 files changed, 254 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/interfaces/interfaces-LaTeX.sty b/Master/texmf-dist/tex/latex/interfaces/interfaces-LaTeX.sty
new file mode 100644
index 00000000000..9c1fb9afbc8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/interfaces/interfaces-LaTeX.sty
@@ -0,0 +1,254 @@
+%%
+%% This is file `interfaces-LaTeX.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% interfaces.dtx (with options: `LaTeX')
+%%
+%% This is a generated file.
+%%
+%% interfaces : 2010/10/20 v1.0 - interfaces : interfaces with keys for other packages (FC)
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 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
+%%
+%% This work consists of the main source file interfaces.dtx
+%% and the derived files
+%% interfaces.sty, interfaces.pdf, interfaces.ins,
+%% interfaces-base.sty,
+%% interfaces-LaTeX.sty,
+%% interfaces-tikz.sty,
+%% interfaces-titlesec.sty,
+%% interfaces-hyperref.sty,
+%% interfaces-bookmark.sty,
+%% interfaces-hypbmsec.sty,interfaces-hypbmsec.code.tex,
+%% interfaces-fancyhdr.sty,
+%% interfaces-marks.sty,
+%% interfaces-tocloft.sty,
+%% interfaces-makecell.sty,
+%% interfaces-enumitem.sty,
+%% interfaces-truncate.sty,
+%% interfaces-appendix.sty,
+%% interfaces-embedfile.sty,
+%% interfaces-environ.sty,
+%% interfaces-umrand.sty,
+%% interfaces-scrlfile.sty,
+%% interfaces-pgfkeys.sty,
+%% interfaces-etoolbox.sty,
+%% interfaces-fancyvrb.sty
+%%
+%% interfaces: interfaces with keys for other packages (FC)
+%% Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
+%%
+\ProvidesPackage{interfaces-LaTeX}
+ [2010/10/10 v1.0 pgfkeys macros for LaTeX (FC)]
+\RequirePackage{interfaces-base}
+\itf@pgfkeys
+\newrobustcmd*\changefont[1]{\itf@pgfkeys
+ \pgfqkeys{/itf/LaTeX/changefont}{#1}\selectfont
+}% \changefont
+\AfterPackage*{hyperref}
+ {\pdfstringdefDisableCommands{\let\changefont\@gobble}}
+\pgfqkeys{/itf/LaTeX/changefont}{%
+ encoding/.code=\fontencoding{#1},encoding/.value required,%
+ enc/.alias=encoding,%
+ family/.code=\fontfamily{#1},family/.value required,%
+ fam/.alias=family,%
+ series/.code=\fontseries{#1},series/.value required,%
+ ser/.alias=series,%
+ shape/.code=\fontshape{#1},shape/.value required,%
+ sha/.alias=shape,%
+ size/.estore as dimen in cs=f@size,%
+ size/.append code=\set@fontsize\f@linespread\f@size\f@baselineskip,%
+ siz/.alias*=size,%
+ baselineskip/.store as glue in cs=f@baselineskip,%
+ baselineskip/.append code=\set@fontsize\f@linespread\f@size\f@baselineskip,%
+ skip/.alias*=baselineskip,%
+ linespread/.estore as dimen in cs=f@linespread,%
+ linespread/.add code={\ifx\f@linespread\@empty\let\f@linespread\@ne\fi}%
+ {\edef\f@linespread{\expandafter\rem@pt\f@linespread}%
+ \set@fontsize\f@linespread\f@size\f@baselineskip},%
+ linespread+/.prefix code=\ifx\f@linespread\@empty\let\f@linespread\@ne\fi,%
+ linespread-/.prefix code=\ifx\f@linespread\@empty\let\f@linespread\@ne\fi,%
+ linespread*/.prefix code=\ifx\f@linespread\@empty\let\f@linespread\@ne\fi,%
+ spread/.alias*=linespread,%
+}% \pgfkeys definitions for \changefont
+\newtoks\itf@everycr@tok % better than colortbl turnaround for \everycr
+\newcommand*\rowfont{\noalign{\ifnum0=`}\fi\itf@rowfont}
+\newrobustcmd*\itf@rowfont[2][]{%
+ \global\itf@everycr@tok\everycr
+ \global\let\itf@@cellleft\itf@cellleft
+ \global\let\itf@@cellright\itf@cellright
+ \gdef\itf@cellfont{#2}%
+ \ifcsname itf@cell@#1\endcsname % row alignment
+ \csname itf@cell@#1\endcsname
+ \else\lowercase{%
+ \ifcsname itf@cell@#1\endcsname
+ \csname itf@cell@#1\endcsname
+ \fi
+ }\fi
+ \toks@\expandafter{\itf@cellleft\itf@cellfont}% inside \noalign group ok
+ \xdef\itf@cellleft{\the\toks@}%
+ \global\everycr\expandafter\expandafter\expandafter{%
+ \expandafter\the\expandafter\everycr\expandafter\itf@rowfont@reset}%
+ \ifnum0=`{\fi}% end of noalign group
+}% \rowfont
+\def\itf@rowfont@reset{%
+ \noalign{%
+ \global\let\itf@cellleft\itf@@cellleft
+ \global\let\itf@cellright\itf@@cellright
+ \global\let\itf@cellfont\@empty
+ \global\let\itf@celllalign\@empty
+ \global\let\itf@cellralign\@empty
+ \global\everycr\itf@everycr@tok
+ \global\itf@everycr@tok{}%
+ }%
+}% \itf@rowfont@reset
+\newif\ifitf@cellright
+\def\itf@prepnext@tok{% only if array is loaded
+ \itf@cnt = \count@
+ \advance \itf@cnt -\@tempcnta
+ \ifcase \itf@cnt % (case 0): previous token is left
+ \itf@cellrighttrue % consequently the token to prepare is right !
+ \toks\count@\expandafter{% augment the previous (left) token
+ \expandafter\itf@celllalign
+ \the\toks\count@
+ \itf@cellleft}%
+ \or % (case 1)
+ \ifitf@cellright % previous token is right
+ \itf@cellrightfalse% consequently the token to prepare is not right !
+ \toks\count@=\expandafter{% augment the previous (right) token
+ \the\toks\count@
+ \itf@cellright
+ \itf@cellralign}%
+ \fi
+ \else % special column: do not change the token
+ \itf@cellrightfalse % the token to prepare cannot be right !
+ \fi
+ \advance \count@ \@ne \toks\count@{}% \prepnext@tok original def
+}% \itf@prepnext@tok
+\AfterPackage*{array}{%
+ \global\let\array@prepnext@tok\prepnext@tok % frozen original definition
+ \global\let\prepnext@tok\itf@prepnext@tok
+}% \AfterPackage*{array}
+\let\itf@cellleft\@empty
+\let\itf@cellright\@empty
+\def\itf@celllalign{\itf@cellleft}% the row font spec. applies to pre-column material
+\let\itf@cellralign\@empty
+\let\itf@cellfont\@empty
+\let\ifitf@colortbl\iffalse
+\AfterPackage*{colortbl}{\let\ifitf@colortbl\iftrue}
+\def\itf@cell@l{% force alignment to left
+ \gdef\itf@celllalign{\itf@removehfil
+ \raggedright\arraybackslash
+ \itf@cellleft}%
+ \gdef\itf@cellralign{\itf@flush1\itf@ignorehfil}%
+ \toks@\expandafter{\itf@cellleft\raggedright\arraybackslash}% local (noalign group)
+ \xdef\itf@cellleft{\the\toks@}%
+}% \itf@cell@l
+\def\itf@cell@c{% force alignment to center
+ \gdef\itf@celllalign{\itf@removehfil
+ \centering\arraybackslash
+ \itf@flush{.5}\itf@cellleft}%
+ \gdef\itf@cellralign{\itf@flush{.5}\itf@ignorehfil}%
+ \toks@\expandafter{\itf@cellleft\centering\arraybackslash}% local (noalign group)
+ \xdef\itf@cellleft{\the\toks@}%
+}% \itf@cell@c
+\def\itf@cell@r{% force alignment to right
+ \gdef\itf@celllalign{\itf@removehfil
+ \raggedleft\arraybackslash
+ \itf@flush1\itf@cellleft}%
+ \gdef\itf@cellralign{\itf@ignorehfil}%
+ \toks@\expandafter{\itf@cellleft\raggedleft\arraybackslash}% local (noalign group)
+ \xdef\itf@cellleft{\the\toks@}%
+}% \itf@cell@r
+\def\itf@cell@j{% force justification (for p, m, b columns)
+ \gdef\itf@celllalign{\itf@justify\itf@cellleft}%
+ \global\let\itf@cellralign\@empty
+ \toks@\expandafter{\itf@cellleft\itf@justify}% local (noalign group)
+ \xdef\itf@cellleft{\the\toks@}%
+}% \itf@cell@j
+\def\itf@justify{%
+ \leftskip\z@skip \@rightskip\leftskip \rightskip\@rightskip
+ \parfillskip\@flushglue
+}% \itf@justify
+\AfterPackage*{ragged2e}{%
+\def\itf@cell@L{% force alignment to left (ragged2e)
+ \gdef\itf@celllalign{\itf@removehfil
+ \RaggedRight\arraybackslash
+ \itf@cellleft}%
+ \gdef\itf@cellralign{\itf@flush1\itf@ignorehfil}%
+ \toks@\expandafter{\itf@cellleft\RaggedRight\arraybackslash}%
+ \xdef\itf@cellleft{\the\toks@}%
+}% \itf@cell@L
+\def\itf@cell@C{% force alignment to center (ragged2e)
+ \gdef\itf@celllalign{\itf@removehfil
+ \Centering\arraybackslash
+ \itf@flush{.5}\itf@cellleft}%
+ \gdef\itf@cellralign{\itf@flush{.5}\itf@ignorehfil}%
+ \toks@\expandafter{\itf@cellleft\Centering\arraybackslash}%
+ \xdef\itf@cellleft{\the\toks@}%
+}% \itf@cell@C
+\def\itf@cell@R{% force alignment to right (ragged2e)
+ \gdef\itf@celllalign{\itf@removehfil
+ \RaggedLeft\arraybackslash
+ \itf@flush1\itf@cellleft}%
+ \gdef\itf@cellralign{\itf@ignorehfil}%
+ \toks@\expandafter{\itf@cellleft\RaggedLeft\arraybackslash}%
+ \xdef\itf@cellleft{\the\toks@}%
+}% \itf@cell@R
+\def\itf@cell@J{% force justification (ragged2e)
+ \gdef\itf@celllallign{\justifying\arraybackslash\itf@cellleft}%
+ \global\let\itf@cellralign\@empty
+ \toks@\expandafter{\itf@cellleft\justifying\arraybackslash}%
+ \xdef\itf@cellleft{\the\toks@}%
+}% \itf@cell@J
+}% AfterPackage ragged2e
+\def\itf@flush#1{%
+ \ifitf@colortbl % colortbl uses \hfill rather than \hfil
+ \hskip \ifnum\currentgrouptype>13 \stretch{#1}%
+ \else\ifdim#1pt<1pt \itf@cellskip
+ \else \stretch{#1}
+ \fi\fi \relax
+ \else % array.sty
+ \ifnum \currentgrouptype>13\relax
+ \hfil \hskip1sp
+ \fi
+ \fi
+}% \itf@flush
+\newskip\itf@cellskip
+\let\itf@hfil\hfil
+\let\itf@hfill\hfill
+\let\itf@hskip\hskip
+\def\itf@removehfil{%
+ \ifitf@colortbl
+ \unkern \itf@cellskip = \lastskip
+ \ifnum\gluestretchorder\itf@cellskip = \tw@ \hskip-\itf@cellskip
+ \else \itf@cellskip = \z@skip
+ \fi
+ \else
+ \ifdim\lastskip=1sp\unskip\fi
+ \ifnum\gluestretchorder\lastskip = \@ne
+ \hfilneg % \hfilneg for array.sty but not for colortbl...
+ \fi
+ \fi
+}% \itf@removehfil
+\def\itf@nohfil{% \hfil -> do nothing + restore original \hfil
+ \def\hfil{\let\hfil\itf@hfil}% local to (alignment template) group
+}% \itf@nohfil
+\AfterPackage*{colortbl}{%
+ \def\itf@nohfil{%
+ \def\hfil{\let\hfil\itf@hfil}% local to (alignment template) group
+ \def\hfill{\let\hfill\itf@hfill}% (colortbl uses \hfill) pfff...
+ \def\hskip##1\relax{\let\hskip\itf@hskip}}% local
+}% AfterPackage colortbl
+\def\itf@ignorehfil{%
+ \aftergroup\itf@nohfil
+}% \itf@ignorehfil
+\endinput
+%%
+%% End of file `interfaces-LaTeX.sty'.