summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/standalone/standalone.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-03-22 23:38:02 +0000
committerKarl Berry <karl@freefriends.org>2010-03-22 23:38:02 +0000
commitd27985a2ea5b8b0690397545661dea20ebf1f6a7 (patch)
tree5487c9f0fdb7f48adbbe62afded8c31c3db8151d /Master/texmf-dist/source/latex/standalone/standalone.dtx
parent3c0cf125d1f03a951969d0a9fa45d53e61674547 (diff)
standalone update (22mar10)
git-svn-id: svn://tug.org/texlive/trunk@17532 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/standalone/standalone.dtx')
-rw-r--r--Master/texmf-dist/source/latex/standalone/standalone.dtx72
1 files changed, 47 insertions, 25 deletions
diff --git a/Master/texmf-dist/source/latex/standalone/standalone.dtx b/Master/texmf-dist/source/latex/standalone/standalone.dtx
index 209824ae30a..70401808f37 100644
--- a/Master/texmf-dist/source/latex/standalone/standalone.dtx
+++ b/Master/texmf-dist/source/latex/standalone/standalone.dtx
@@ -20,46 +20,42 @@
% This work consists of the files standalone.dtx, standalone.ins
% and the derived file standalone.sty.
%
-% $Id: standalone.dtx 1704 2010-03-21 19:25:13Z martin $
+% $Id: standalone.dtx 1714 2010-03-22 14:44:37Z martin $
% \fi
%
% \iffalse
-%<cls|sty|cfg|tex>% $Id: standalone.dtx 1704 2010-03-21 19:25:13Z martin $
+%<cls|sty|cfg|tex>% $Id: standalone.dtx 1714 2010-03-22 14:44:37Z martin $
%<cls|sty>\NeedsTeXFormat{LaTeX2e}
-%<cls>\ProvidesClass{standalone} [2010/03/21 v0.1 Class to compile TeX sub-files standalone]
-%<sty>\ProvidesPackage{standalone} [2010/03/21 v0.1 Package to include TeX sub-files which use the 'standalone' class]
-%<tex>\ProvidesFile{standalone.tex}[2010/03/21 v0.1 Provides if-switch to show if file is compiled standalone]%
-%<cfg>\ProvidesFile{standalone.cfg}[2010/03/21 v0.1 Default configuration file for 'standalone' class and package]%
+%<cls>\ProvidesClass{standalone} [2010/03/22 v0.2 Class to compile TeX sub-files standalone]
+%<sty>\ProvidesPackage{standalone} [2010/03/22 v0.2 Package to include TeX sub-files which use the 'standalone' class]
+%<tex>\ProvidesFile{standalone.tex}[2010/03/22 v0.2 Provides if-switch to show if file is compiled standalone]%
+%<cfg>\ProvidesFile{standalone.cfg}[2010/03/22 v0.2 Default configuration file for 'standalone' class and package]%
%<*driver>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{standalone.dtx}[2010/03/21 v0.1 DTX File for 'standalone' cls/sty/tex]
+\ProvidesFile{standalone.dtx}[2010/03/22 v0.2 DTX File for 'standalone' cls/sty/tex/cfg files]
\documentclass{ltxdoc}
\usepackage{ifpdf}
\usepackage{listings}
+\IfFileExists{hypdoc.sty}{%
+\usepackage{hypdoc}
+}{%
\usepackage{hyperref}
-\usepackage{tabularx}
-\usepackage{array}
-\usepackage{flafter,fnpos}
-\usepackage{booktabs}
-\usepackage{amsmath}
-\usepackage{placeins}
-\makeFNbottom
-\makeFNbelow
+}
\EnableCrossrefs
-%\CodelineIndex
+\CodelineIndex
\RecordChanges
%\OnlyDescription
\providecommand{\env}[1]{\texttt{#1}}
\begin{document}
\DocInput{\jobname.dtx}
\PrintChanges
- %\newpage\PrintIndex
+ \newpage\PrintIndex
\end{document}
%</driver>
% \fi
%
-% \CheckSum{232}
+% \CheckSum{242}
%
% \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
@@ -79,6 +75,7 @@
%
%
% \changes{v0.1}{2010/03/21}{First released version}
+% \changes{v0.2}{2010/03/22}{Added support for beamer style settings in the config file using \cs{ifstandalonebeamer}. Updated documentation.}
%
% \GetFileInfo{\jobname.dtx}
%
@@ -91,6 +88,9 @@
% \DoNotIndex{\ignorespaces,\lccode,\sffamily,\@gobble,\@ifundefined,\@for,\or}
% \DoNotIndex{\@firstoftwo,\@ifnextchar,\@namedef,\@nameuse,\@secondoftwo}
% \DoNotIndex{\@temptokena,\toks@,\BODY,\do,\g@addto@macro,\lowercase,\uppercase,\the}
+% \DoNotIndex{\aftergroup,\CurrentOption,\DeclareBoolOption,\DeclareDefaultOption,\DeclareStringOption,\DeclareVoidOption}
+% \DoNotIndex{\endinput,\endpreview,\input,\LoadClass,\newif,\PassOptionsToPackage,\preview,\ProcessKeyvalOptions}
+% \DoNotIndex{\renewcommand,\renewenvironment,\setbeamertemplate,\SetupKeyvalOptions,\space,\unskip,\usepackage}
%
% \ifpdf
% \hypersetup{%
@@ -124,11 +124,11 @@
% picture files and make the main document ignore this code sections.
%
% The package |standalone| can be used in the main document to skip all extra preambles in included files.
+%
% A |standalone| class is also provided to minimise the extra preamble code needed in this files.
% It's usage is optional, but simplifies and standardises how picture files are compiled standalone.
-% The class uses by default the |preview| package to create a output file which only contains the picture with no extra
-% margins, page numbers or anything else.
-% Both the class and the package read a configuration file |standalone.cfg| which allows the user to adjust settings and macros easily
+% The class uses by default the |preview| package to create an output file which only contains the picture with no extra
+% margins, page numbers or anything else. A configuration file |standalone.cfg| read by the class allows the user to adjust settings and macros easily
% on a per directory base.
%
% \subsection*{Similar Packages}
@@ -259,6 +259,10 @@
% Therefore a second environment called |standaloneframe| is used in the beamer picture files. It will be equal to |frame| in standalone mode, but
% without effect otherwise.
%
+% \DescribeMacro{\ifstandalonebeamer}
+% This if switch is only true if the class is compiled with the |beamer| option. The package sets it to false.
+% It can be used to place beamer specific options in the configuration files, which should be skipped for non-beamer standalone files.
+%
% \begin{lstlisting}[language={[latex]tex},gobble=4,frame=lines,caption={Use of \emph{standalone} class.}]
% % Use of 'standalone' class with a beamer overlay:
% \documentclass[beamer]{standalone}
@@ -307,8 +311,13 @@
% \fi
% \end{lstlisting}
%
+% \subsection{Usage with \texttt{svn-multi} keywords}\label{sec:svnmulti}
+% If the version control package \texttt{svn-multi} is used, the keyword macros (|\svnid| or |\svnidlong|)
+% need to be placed after the |\begin{document}| to be taken into account by the main document.
+% The \texttt{svn-multi} package must be loaded by the sub-file preamble to avoid compile errors in standalone mode.
+% Alternative, if the keywords are not required in this mode, they can be surrounded by |\ifstandalone\else|\dots|\fi|.
+%
% \StopEventually{}
-% \FloatBarrier
% \clearpage
%
% \section{Implementation}
@@ -321,6 +330,12 @@
\expandafter\newif\csname ifstandalone\endcsname
\standalonefalse
% \end{macrocode}
+% \begin{macrocode}
+\@ifundefined{ifstandalonebeamer}{%
+\expandafter\newif\csname ifstandalonebeamer\endcsname
+\standalonebeamerfalse
+}{}%
+% \end{macrocode}
%
% \begin{macro}{\sa@documentclass}
% \begin{macrocode}
@@ -506,9 +521,11 @@
% The |beamer| option defines the \env{standalone} environment as a replacement
% of \env{frame}.
% \begin{macrocode}
+\newif\ifstandalonebeamer
\DeclareVoidOption{beamer}{%
\def\sa@class{beamer}%
\sa@previewfalse
+ \standalonebeamertrue
\newenvironment{standaloneframe}{%
\@ifnextchar<%
{\@standaloneframe}%
@@ -543,11 +560,9 @@
%
% \begin{macrocode}
\DeclareStringOption[article]{class}
-\DeclareStringOption[]{frameoptions}
\DeclareDefaultOption{%
\xdef\sa@classoptionslist{\sa@classoptionslist,\CurrentOption}%
}
-\input{standalone.cfg}
\ProcessKeyvalOptions*\relax
% \end{macrocode}
%
@@ -555,7 +570,10 @@
\let\@classoptionslist\sa@classoptionslist
\xdef\@tempa{[\sa@classoptionslist]{\sa@class}}
\expandafter\LoadClass\@tempa
-\@nameuse{sa@afterclassloaded}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\input{standalone.cfg}
% \end{macrocode}
%
% \subsubsection*{Preview Code}
@@ -633,6 +651,10 @@
% \fi
% \begin{macrocode}
\PassOptionsToPackage{active,tightpage}{preview}%
+
+\ifstandalonebeamer
+ \setbeamertemplate{navigation symbols}{}
+\fi
% \end{macrocode}
% \iffalse
%</cfg>