summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/standalone/README4
-rw-r--r--Master/texmf-dist/doc/latex/standalone/standalone.pdfbin253851 -> 427133 bytes
-rw-r--r--Master/texmf-dist/source/latex/standalone/standalone.dtx89
-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
6 files changed, 144 insertions, 25 deletions
diff --git a/Master/texmf-dist/doc/latex/standalone/README b/Master/texmf-dist/doc/latex/standalone/README
index 24e72b14c80..b88c7ecc2e9 100644
--- a/Master/texmf-dist/doc/latex/standalone/README
+++ b/Master/texmf-dist/doc/latex/standalone/README
@@ -1,7 +1,7 @@
LaTeX class and package 'standalone'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Copyright (c) 2010-2011 by Martin Scharrer <martin@scharrer-online.de>
-WWW: http://latex.scharrer-online.de/standalone/
+Copyright (c) 2010-2012 by Martin Scharrer <martin@scharrer-online.de>
+Repository: http://bitbucket.org/martin_scharrer/standalone
Allows TeX pictures or other TeX code in sub-files to be compiled standalone
or as part of a main document.
diff --git a/Master/texmf-dist/doc/latex/standalone/standalone.pdf b/Master/texmf-dist/doc/latex/standalone/standalone.pdf
index 7dd307f5e9c..96db9fa51f6 100644
--- a/Master/texmf-dist/doc/latex/standalone/standalone.pdf
+++ b/Master/texmf-dist/doc/latex/standalone/standalone.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/standalone/standalone.dtx b/Master/texmf-dist/source/latex/standalone/standalone.dtx
index 5901d00fffa..2d8143f71df 100644
--- a/Master/texmf-dist/source/latex/standalone/standalone.dtx
+++ b/Master/texmf-dist/source/latex/standalone/standalone.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%<=*COPYRIGHT>
-%% 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
@@ -14,8 +14,9 @@
%%
%% 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.
%%
%<=/COPYRIGHT>
% \fi
@@ -25,10 +26,10 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{standalone.dtx}[%
%<=*DATE>
- 2012/04/13
+ 2012/05/05
%<=/DATE>
%<=*VERSION>
- v1.0b
+ v1.1
%<=/VERSION>
DTX file of the standalone bundle]
\documentclass[a4paper,11pt]{ydoc}
@@ -42,7 +43,7 @@
\CodelineIndex
\RecordChanges
\colorlet{keydesc}{opt}
-\OnlyDescription
+%\OnlyDescription
\lstset{numbers=none,columns=fullflexible}
\begin{document}
\DocInput{\jobname.dtx}
@@ -52,7 +53,7 @@
%</driver>
% \fi
%
-% \CheckSum{3368}
+% \CheckSum{3555}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -75,6 +76,7 @@
% \changes{v0.3}{2010/03/26}{Added package options to automatically copy sub-preamble code to the main preamble.}
% \changes{v0.3a}{2010/03/27}{Fixed bug related to line endings in \texttt{.sta} file. Listed sub-files now have \texttt{.tex} as default extension.}
% \changes{v0.4}{2011/02/28}{Added option 'border' for easy adjustments of the preview border.}
+% \changes{v1.1}{2012/05/05}{Fixed conversion issue with MiKTeX.}
%
% \GetFileInfo{\jobname.dtx}
%
@@ -290,6 +292,7 @@
% \DescribeKey{border}'='{<length (left/right)>~<length (bottom/top)>}
% \DescribeKey{border}'='{<length (left)>~<length (right)>~<length (bottom)>~<length (top)>}
% This option allows to specify the border used by the \opt{preview} and \opt{crop} options.
+% An alternative name of this option is \opt{margin}.
% The border can either be given using a single value for all sides, separately for the horizontal and vertical borders or for all sides separately.
% Multiple values are separated by spaces, which require the whole value to be wrapped in braces.
%
@@ -1228,6 +1231,14 @@
% \end{macrocode}
% \end{key}
%
+% \begin{key}{standalone.cls}{margin}
+% Alias for \opt{border}.
+% \begin{macrocode}
+\sa@clsoption{margin}{%
+ \sa@readborder#1 {} {} {} {} \@nnil
+}
+% \end{macrocode}
+% \end{key}
%
% \begin{macro}{\sa@boolean}[2]{name of if-switch}{`true' or `false'}
% Sets if-switches.
@@ -1578,6 +1589,16 @@
% \end{macrocode}
% \end{key}
%
+% \begin{key}{standalone.cls/convert}{realmainfile}
+% \begin{macrocode}
+\sa@convertoption{realmainfile}[]{%
+ \RequirePackage{currfile-abspath}%
+ \getmainfile
+ \let\sa@convert@mainfile\themainfile
+}
+% \end{macrocode}
+% \end{key}
+%
%
% \begin{key}{standalone.cls/convert}{jpg}
% \begin{macrocode}
@@ -1698,7 +1719,11 @@
% \end{key}
%
% \begin{macrocode}
+\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}
@@ -1845,6 +1870,47 @@
}
% \end{macrocode}
%
+% Set correct quoting character for conversion option if none was set.
+% \begin{macrocode}
+\ifsa@convert
+\ifx\sa@convert@quote\relax
+\begingroup
+\@tempswafalse
+% \end{macrocode}
+% If \Macro\pdftexbanner is not defined (XeLaTeX) the distribution can not
+% be determined and double quotes are set to ensure proper operation under MiKTeX.
+% \begin{macrocode}
+\expandafter\ifx\csname pdftexbanner\endcsname\relax
+ \@tempswatrue
+\else
+% \end{macrocode}
+% Test if there is a `|MiKTeX|' in \Macro\pdftexbanner.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+%
+%
% Loads the class given by the |class| option with the rest of the options.
% \begin{macrocode}
\expandafter\expandafter\expandafter\LoadClass
@@ -2324,7 +2390,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}%
@@ -2354,7 +2423,7 @@
\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}{}%
@@ -2366,6 +2435,7 @@
% Provide the internal macros to the user level.
% \begin{macrocode}
\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
@@ -2378,6 +2448,7 @@
\let\outname\sa@convert@outname
\let\outfile\sa@convert@outfile
\let\percent\@percentchar
+\let\quote\sa@convert@quote
% \end{macrocode}
%
%
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}{%