summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/standalone/standalone.cls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-03-01 23:44:06 +0000
committerKarl Berry <karl@freefriends.org>2011-03-01 23:44:06 +0000
commit8f4172befed36d7074c76019c9ffd6b67a22ce17 (patch)
tree8ecf1ba5d6f28b0ae7b632569d8ff5b2322992ed /Master/texmf-dist/tex/latex/standalone/standalone.cls
parentf59620f253808e843e73159d36397cb4f15ec93a (diff)
standalone 0.4 (1mar11)
git-svn-id: svn://tug.org/texlive/trunk@21573 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/standalone/standalone.cls')
-rw-r--r--Master/texmf-dist/tex/latex/standalone/standalone.cls23
1 files changed, 21 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/standalone/standalone.cls b/Master/texmf-dist/tex/latex/standalone/standalone.cls
index c899c181ba2..e4fbcbc12c1 100644
--- a/Master/texmf-dist/tex/latex/standalone/standalone.cls
+++ b/Master/texmf-dist/tex/latex/standalone/standalone.cls
@@ -25,9 +25,9 @@
%% This work consists of the files standalone.dtx, standalone.ins
%% and the derived file standalone.sty.
%%
-% $Id: standalone.dtx 1772 2010-03-27 13:50:59Z martin $
+% $Id: standalone.dtx 2194 2011-02-28 19:26:29Z martin $
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{standalone} [2010/03/27 v0.3a Class to compile TeX sub-files standalone]
+\ProvidesClass{standalone} [2010/02/28 v0.4 Class to compile TeX sub-files standalone]
\newif\ifstandalone
\standalonetrue
\newif\ifstandalonebeamer
@@ -36,6 +36,8 @@
\RequirePackage{kvoptions}
\SetupKeyvalOptions{prefix=sa@}
\DeclareBoolOption[true]{preview}
+\DeclareStringOption{border}
+\let\sa@border\relax
\DeclareVoidOption{beamer}{%
\def\sa@class{beamer}%
\sa@previewfalse
@@ -63,6 +65,23 @@
{\endpreview}
}{}%
\RequirePackage{preview}
+ \ifx\sa@border\relax\else
+ \begingroup
+ \def\rem@bp#1bp\relax#2\@nnil{#1}%
+ \def\default@bp#1{\expandafter\rem@bp\the\dimexpr#1 bp\relax bp\relax\@nnil}%
+ \def\sa@readborder#1 #2 #3 #4 {%
+ \ifx\\#2#3#4\\%
+ \@defaultunits\global\PreviewBorder=\dimexpr#1 bp\relax\@nnil%
+ \else
+ \ifx\\#4\\%
+ \xdef\PreviewBbAdjust{-\default@bp{#1} -\default@bp{#2} \default@bp{#1} \default@bp{#2}}%
+ \else
+ \xdef\PreviewBbAdjust{-\default@bp{#1} -\default@bp{#2} \default@bp{#3} \default@bp{#4}}%
+ \fi\fi
+ }%
+ \@firstofone{\expandafter\sa@readborder\sa@border} {} {} {} {} \relax
+ \endgroup
+ \fi
\fi
\ifstandalonebeamer
\newenvironment{standaloneframe}{%