diff options
author | Karl Berry <karl@freefriends.org> | 2012-04-13 22:12:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-04-13 22:12:38 +0000 |
commit | a4f01148777f706bc0182da96daaebf2e7224c96 (patch) | |
tree | 36aca06a5845290f16e97eae64f7511457387191 /Master/texmf-dist/tex/latex/standalone | |
parent | ebfea0e090398fb8c7a2c20a969250bf026efbee (diff) |
standalone 1.0b (13apr12)
git-svn-id: svn://tug.org/texlive/trunk@25951 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/standalone')
-rw-r--r-- | Master/texmf-dist/tex/latex/standalone/standalone.cfg | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/standalone/standalone.cls | 65 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/standalone/standalone.sty | 4 |
3 files changed, 67 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/standalone/standalone.cfg b/Master/texmf-dist/tex/latex/standalone/standalone.cfg index bd047b7e624..ab1ffbbba25 100644 --- a/Master/texmf-dist/tex/latex/standalone/standalone.cfg +++ b/Master/texmf-dist/tex/latex/standalone/standalone.cfg @@ -1,7 +1,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesFile{standalone.cfg}[% - 2012/04/10 - v1.0a + 2012/04/13 + v1.0b Default configuration file for 'standalone' class]% %% Enabled the "varwidth" option if the "varwidth" package is available: %%\IfFileExists{varwidth.sty}{% diff --git a/Master/texmf-dist/tex/latex/standalone/standalone.cls b/Master/texmf-dist/tex/latex/standalone/standalone.cls index d418be0450a..a60e7bf0fd5 100644 --- a/Master/texmf-dist/tex/latex/standalone/standalone.cls +++ b/Master/texmf-dist/tex/latex/standalone/standalone.cls @@ -17,8 +17,8 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesClass{standalone}[% - 2012/04/10 - v1.0a + 2012/04/13 + v1.0b Class to compile TeX sub-files standalone] \newif\ifstandalone \standalonetrue @@ -112,10 +112,12 @@ \newif\ifsa@multi \newif\ifsa@varwidth \newif\ifsa@ignorerest +\newif\ifsa@ignoreempty \newif\ifsa@tikz \newif\ifsa@pstricks \newif\ifsa@convert \newif\ifsa@float +\newif\ifsa@math \let\sa@beamertrue\standalonebeamertrue \let\sa@beamerfalse\standalonebeamerfalse \def\sa@clsoption{% @@ -165,9 +167,50 @@ \sa@clsoption{ignorerest}[true]{% \sa@boolean{ignorerest}{#1}% } +\sa@clsoption{ignoreempty}[true]{% + \sa@boolean{ignoreempty}{#1}% +} \sa@clsoption{multi}[true]{% \sa@boolorvalue{multi}{#1}{\sa@multitrue\AtBeginDocument{\standaloneenv{#1}}}% } +\sa@clsoption{math}[true]{% + \sa@boolean{math}{#1}% + \ifsa@math + \setkeys{standalone.cls}{multi=true,ignoreempty=true,border=0.50001bp}% + \fi +} +\AtBeginDocument{\ifsa@math\sa@math\fi} +\def\sa@math{% + \standaloneenv{math}% + \def\({\begingroup\math}% + \def\){\endmath\endgroup}% + \def\[{\(\displaystyle}% + \def\]{\)}% + \def\displaymath{\math\displaystyle}% + \def\enddisplaymath{\endmath}% + \newcommand*\multimathsep{% + \endmath + \math + \let\\\multimathsep + }% + \newenvironment{multimath}{% + \math + \let\\\multimathsep + }{% + \endmath + }% + \newcommand*\multidisplaymathsep{% + \endmath + \math\displaystyle + \let\\\multidisplaymathsep + }% + \newenvironment{multidisplaymath}{% + \math\displaystyle + \let\\\multidisplaymathsep + }{% + \endmath + }% +} \sa@clsoption{varwidth}[true]{% \sa@boolorvalue{varwidth}{#1}{\sa@varwidthtrue\def\sa@width{#1}}% \ifsa@varwidth @@ -322,6 +365,13 @@ } \@namedef{sa@gsdevice@.jpg}{jpeg}% \@namedef{sa@gsdevice@.png}{png16m}% +\sa@convertoption{command}{% + \def\sa@convert@command{#1}% +} +\sa@convertoption{pdf2svg}[]{% + \def\sa@convert@command{pdf2svg \infile\space\outfile}% + \sa@convertvar{outext}{.svg} +} \sa@convertoption{imagemagick}[]{% \def\sa@convert@command{\convertexe\space -density \density\space \infile\space \ifx\size\empty\else -resize \size\fi\space -quality 90 \outfile}% } @@ -553,6 +603,16 @@ }% \fi \def\sa@handlebox{% + \ifcase + 0% + \ifsa@ignoreempty + \ifdim\wd\sa@box=\z@ + \ifdim\ht\sa@box=\z@ + \ifdim\dp\sa@box=\z@ + 1% + \fi\fi\fi + \fi + \relax \sbox\sa@box{% \hskip\sa@border@left \@tempdima=\ht\sa@box @@ -566,6 +626,7 @@ \hskip\sa@border@right }% \sa@placebox + \fi } \ifcase0% \ifpdf\else\ifluatex\else\ifxetex\else 1\fi\fi\fi diff --git a/Master/texmf-dist/tex/latex/standalone/standalone.sty b/Master/texmf-dist/tex/latex/standalone/standalone.sty index 01d7a1046e2..6a068a89654 100644 --- a/Master/texmf-dist/tex/latex/standalone/standalone.sty +++ b/Master/texmf-dist/tex/latex/standalone/standalone.sty @@ -18,8 +18,8 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{standalone}[% - 2012/04/10 - v1.0a + 2012/04/13 + v1.0b Package to include TeX sub-files with preambles] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \@ifundefined{ifstandalone}{% |