summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/standalone
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-05 22:01:17 +0000
committerKarl Berry <karl@freefriends.org>2012-05-05 22:01:17 +0000
commit6abbadaea9dfe91add570fd7a9804e80e4caba66 (patch)
tree122e7d7534c5853e8d51df94d78f2e615db65268 /Master/texmf-dist/tex/latex/standalone
parentec6c709096d127e4021310a662b63093efd108b8 (diff)
standalone 1.1 (5may12)
git-svn-id: svn://tug.org/texlive/trunk@26216 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/standalone')
-rw-r--r--Master/texmf-dist/tex/latex/standalone/standalone.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/standalone/standalone.cls61
-rw-r--r--Master/texmf-dist/tex/latex/standalone/standalone.sty11
3 files changed, 62 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/standalone/standalone.cfg b/Master/texmf-dist/tex/latex/standalone/standalone.cfg
index ab1ffbbba25..31967ccd210 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/13
- v1.0b
+ 2012/05/05
+ v1.1
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 a60e7bf0fd5..a5d9474da06 100644
--- a/Master/texmf-dist/tex/latex/standalone/standalone.cls
+++ b/Master/texmf-dist/tex/latex/standalone/standalone.cls
@@ -1,4 +1,4 @@
-%% Copyright (C) 2011 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (C) 2011-2012 by Martin Scharrer <martin@scharrer-online.de>
%% ---------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -12,13 +12,14 @@
%%
%% The Current Maintainer of this work is Martin Scharrer.
%%
-%% This work consists of the files <+name+>.dtx and <+name+>.ins
-%% and the derived filebase <+name+>.sty.
+%% This work consists of the files standalone.dtx and standalone.ins
+%% and the derived filebase standalone.sty, standalone.cls and
+%% standalone.cfg.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{standalone}[%
- 2012/04/13
- v1.0b
+ 2012/05/05
+ v1.1
Class to compile TeX sub-files standalone]
\newif\ifstandalone
\standalonetrue
@@ -126,6 +127,9 @@
\sa@clsoption{border}{%
\sa@readborder#1 {} {} {} {} \@nnil
}
+\sa@clsoption{margin}{%
+ \sa@readborder#1 {} {} {} {} \@nnil
+}
\def\sa@boolean#1#2{%
\sa@boolorvalue{#1}{#2}%
{\ClassError{standalone}{Invalid value '#2' for boolean key '#1'}{}}%
@@ -313,6 +317,11 @@
\sa@clsoption{png}[]{%
\setkeys{standalone.cls/convert}{png,#1}%
}
+\sa@convertoption{realmainfile}[]{%
+ \RequirePackage{currfile-abspath}%
+ \getmainfile
+ \let\sa@convert@mainfile\themainfile
+}
\sa@convertoption{jpg}[]{%
\setkeys{standalone.cls/convert}{true,outext={.jpg}}%
}
@@ -378,7 +387,11 @@
\sa@convertoption{ghostscript}[]{%
\def\sa@convert@command{\gsexe\space -dSAFER -dBATCH -dNOPAUSE -sDEVICE=\gsdevice\space -r\density\space -sOutputFile=\outfile\space \infile}%
}
+\sa@convertvar{latexoptions}{ -shell-escape }
\sa@convertvar{subjobname}{\jobname}
+\sa@convertvar{mainfile}{\jobname}
+\sa@convertvar{quote}{}
+\let\sa@convert@quote\relax
\sa@convertvar{size}{}
\sa@convertvar{inname}{\subjobname}
\sa@convertvar{infile}{\inname\inext}
@@ -460,6 +473,35 @@
\AtBeginDocument{%
\disable@keys{standalone.cls}{multi}%
}
+\ifsa@convert
+\ifx\sa@convert@quote\relax
+\begingroup
+\@tempswafalse
+\expandafter\ifx\csname pdftexbanner\endcsname\relax
+ \@tempswatrue
+\else
+\def\MiKTeX{MiKTeX}
+\@onelevel@sanitize\MiKTeX
+\expandafter\def\expandafter\testmiktex\expandafter#\expandafter1\MiKTeX#2\relax{%
+ \ifx\empty#2\empty
+ \@tempswafalse
+ \else
+ \@tempswatrue
+ \fi
+}
+\expandafter\expandafter
+\expandafter\testmiktex\expandafter\pdftexbanner\MiKTeX\relax\relax
+
+\fi
+\expandafter
+\endgroup
+\if@tempswa
+\def\sa@convert@quote{"}
+\else
+\def\sa@convert@quote{'}
+\fi
+\fi
+\fi
\expandafter\expandafter\expandafter\LoadClass
\expandafter\expandafter\expandafter[%
\expandafter\@classoptionslist
@@ -751,7 +793,10 @@
}{%
\def\filemodbefore{}%
}}}}%
- \immediate\write18{\sa@convert@latex\space -jobname '\sa@convert@subjobname' '\noexpand\expandafter\def\noexpand\csname sa@internal@run\noexpand\endcsname{1}\noexpand\input{\jobname}'}%
+ \immediate\write18{\sa@convert@latex\space\sa@convert@latexoptions\space
+ -jobname \sa@convert@quote\sa@convert@subjobname\sa@convert@quote\space
+ \sa@convert@quote\string\expandafter\string\def\string\csname\space
+ sa@internal@run\string\endcsname{1}\string\input{\sa@convert@mainfile}\sa@convert@quote}%
\edef\sa@convert@precommand{\sa@convert@precommand}%
\ifx\sa@convert@precommand\@empty\else
\immediate\write18{\sa@convert@precommand}%
@@ -781,13 +826,14 @@
\sa@convert@failuremsg{standalone}{#1}{}%
\fi
\else
- \ClassInfo{standalone}{Conversion successful.}%
+ \typeout{Class standalone:^^JOutput written on \outfile.}%
\fi
\else
\sa@convert@failuremsg{standalone}{#1}{}%
\fi
}
\let\subjobname\sa@convert@subjobname
+\let\mainfile\sa@convert@mainfile
\let\infile\sa@convert@infile
\let\inext\sa@convert@inext
\let\inname\sa@convert@inname
@@ -800,6 +846,7 @@
\let\outname\sa@convert@outname
\let\outfile\sa@convert@outfile
\let\percent\@percentchar
+\let\quote\sa@convert@quote
\ifcase0%
\expandafter\ifx\csname pdfshellescape\endcsname\relax
\ifeof18 \else 3\fi
diff --git a/Master/texmf-dist/tex/latex/standalone/standalone.sty b/Master/texmf-dist/tex/latex/standalone/standalone.sty
index 6a068a89654..51b32d2b2e9 100644
--- a/Master/texmf-dist/tex/latex/standalone/standalone.sty
+++ b/Master/texmf-dist/tex/latex/standalone/standalone.sty
@@ -1,4 +1,4 @@
-%% Copyright (C) 2011 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (C) 2011-2012 by Martin Scharrer <martin@scharrer-online.de>
%% ---------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -12,14 +12,15 @@
%%
%% The Current Maintainer of this work is Martin Scharrer.
%%
-%% This work consists of the files <+name+>.dtx and <+name+>.ins
-%% and the derived filebase <+name+>.sty.
+%% This work consists of the files standalone.dtx and standalone.ins
+%% and the derived filebase standalone.sty, standalone.cls and
+%% standalone.cfg.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{standalone}[%
- 2012/04/13
- v1.0b
+ 2012/05/05
+ v1.1
Package to include TeX sub-files with preambles]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\@ifundefined{ifstandalone}{%