summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/standalone
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-04-07 23:01:16 +0000
committerKarl Berry <karl@freefriends.org>2011-04-07 23:01:16 +0000
commit91851e5c767571e6cbab9de9dc575a9ef01dc3ba (patch)
tree4404d3d5355fae0789534b0a62c84cb816afb6a6 /Master/texmf-dist/source/latex/standalone
parent29415daadb70dd736d4b501cc341c63c536ac611 (diff)
standalone (7apr11)
git-svn-id: svn://tug.org/texlive/trunk@22017 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/standalone')
-rw-r--r--Master/texmf-dist/source/latex/standalone/Makefile82
-rw-r--r--Master/texmf-dist/source/latex/standalone/standalone.dtx138
2 files changed, 91 insertions, 129 deletions
diff --git a/Master/texmf-dist/source/latex/standalone/Makefile b/Master/texmf-dist/source/latex/standalone/Makefile
new file mode 100644
index 00000000000..d2ee40e776e
--- /dev/null
+++ b/Master/texmf-dist/source/latex/standalone/Makefile
@@ -0,0 +1,82 @@
+TEXMF=${HOME}/texmf
+INSTALLDIR=${TEXMF}/tex/latex/standalone
+DOCINSTALLDIR=${TEXMF}/doc/latex/standalone
+CP=cp
+RMDIR=rm -rf
+PDFLATEX=pdflatex -interaction=batchmode
+LATEXMK=latexmk -pdf -silent
+
+PACKEDFILES=standalone.cls standalone.sty standalone.cfg standalone.tex
+DOCFILES=standalone.pdf
+SRCFILES=standalone.dtx standalone.ins README Makefile
+
+all: unpack doc
+
+package: unpack
+class: unpack
+
+${PACKEDFILES}: standalone.dtx standalone.ins
+ yes | pdflatex standalone.ins
+
+unpack: ${PACKEDFILES}
+
+# 'doc' and 'standalone.pdf' call itself until everything is stable
+doc: standalone.pdf
+ @${MAKE} --no-print-directory standalone.pdf
+
+pdfopt: doc
+ @-pdfopt standalone.pdf .temp.pdf && mv .temp.pdf standalone.pdf
+
+%.pdf: %.dtx
+ ${PDFLATEX} $<
+ -makeindex -s gind.ist -o "$@" "$<"
+ -makeindex -s gglo.ist -o "$@" "$<"
+ ${PDFLATEX} $<
+ ${PDFLATEX} $<
+
+
+.PHONY: test
+
+test: unpack
+ for T in test*.tex; do echo "$$T"; pdflatex -interaction=batchmode $$T && echo "OK" || echo "Failure"; done
+
+clean:
+ -latexmk -C standalone.dtx
+ ${RM} ${PACKEDFILES} *.zip *.log *.aux *.toc *.vrb *.nav *.pdf *.snm *.out *.fdb_latexmk *.glo *.gls *.hd *.sta *.stp
+ ${RMDIR} tds
+
+install: unpack doc ${INSTALLDIR} ${DOCINSTALLDIR}
+ ${CP} ${PACKEDFILES} ${INSTALLDIR}
+ ${CP} ${DOCFILES} ${DOCINSTALLDIR}
+ texhash ${TEXMF}
+
+${INSTALLDIR}:
+ mkdir -p $@
+
+${DOCINSTALLDIR}:
+ mkdir -p $@
+
+ctanify: ${SRCFILES} ${DOCFILES} standalone.tds.zip
+ ${RM} standalone.zip
+ zip standalone.zip $^
+ unzip -t standalone.zip
+ unzip -t standalone.tds.zip
+
+zip: standalone.zip
+
+tdszip: standalone.tds.zip
+
+standalone.zip: ${SRCFILES} ${DOCFILES} | pdfopt
+ ${RM} $@
+ zip $@ $^
+
+standalone.tds.zip: ${SRCFILES} ${PACKEDFILES} ${DOCFILES} | pdfopt
+ ${RMDIR} tds
+ mkdir -p tds/tex/latex/standalone
+ mkdir -p tds/doc/latex/standalone
+ mkdir -p tds/source/latex/standalone
+ ${CP} ${DOCFILES} tds/doc/latex/standalone
+ ${CP} ${PACKEDFILES} tds/tex/latex/standalone
+ ${CP} ${SRCFILES} tds/source/latex/standalone
+ cd tds; zip -r ../$@ .
+
diff --git a/Master/texmf-dist/source/latex/standalone/standalone.dtx b/Master/texmf-dist/source/latex/standalone/standalone.dtx
index 41496f58f5f..aab494d2e19 100644
--- a/Master/texmf-dist/source/latex/standalone/standalone.dtx
+++ b/Master/texmf-dist/source/latex/standalone/standalone.dtx
@@ -21,19 +21,19 @@
% and the derived files standalone.cls, standalone.sty, standalone.tex and
% standalone.cfg.
%
-% $Id: standalone.dtx 2194 2011-02-28 19:26:29Z martin $
+% $Id: standalone.dtx 2451 2011-04-07 11:40:38Z martin $
% \fi
%
% \iffalse
-%<cls|sty|cfg|tex>% $Id: standalone.dtx 2194 2011-02-28 19:26:29Z martin $
+%<cls|sty|cfg|tex>% $Id: standalone.dtx 2451 2011-04-07 11:40:38Z martin $
%<cls|sty>\NeedsTeXFormat{LaTeX2e}
-%<cls>\ProvidesClass{standalone} [2010/02/28 v0.4 Class to compile TeX sub-files standalone]
-%<sty>\ProvidesPackage{standalone} [2010/02/28 v0.4 Package to include TeX sub-files with preambles]
-%<tex>\ProvidesFile{standalone.tex}[2010/02/28 v0.4 Provides if-switch to show if file is compiled standalone]%
-%<cfg>\ProvidesFile{standalone.cfg}[2010/02/28 v0.4 Default configuration file for 'standalone' class]%
+%<cls>\ProvidesClass{standalone} [2011/04/07 v0.4a Class to compile TeX sub-files standalone]
+%<sty>\ProvidesPackage{standalone} [2011/04/07 v0.4a Package to include TeX sub-files with preambles]
+%<tex>\ProvidesFile{standalone.tex}[2011/04/07 v0.4a Provides if-switch to show if file is compiled standalone]%
+%<cfg>\ProvidesFile{standalone.cfg}[2011/04/07 v0.4a Default configuration file for 'standalone' class]%
%<*driver>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{standalone.dtx}[2011/02/28 v0.4 DTX File for 'standalone' cls/sty/tex/cfg files]
+\ProvidesFile{standalone.dtx}[2011/04/07 v0.4a DTX File for 'standalone' cls/sty/tex/cfg files]
\documentclass{scrartcl}
\usepackage{ydoc}
\usepackage{ifpdf}
@@ -54,7 +54,7 @@
%</driver>
% \fi
%
-% \CheckSum{1298}
+% \CheckSum{1160}
%
% \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
@@ -77,6 +77,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{v0.4a}{2011/04/07}{Bug fix for \string`missing \cs{fi}'}
%
% \GetFileInfo{\jobname.dtx}
%
@@ -1572,127 +1573,6 @@
%</tex>
% \fi
%
-% \iffalse
-%<*sty>
-% \fi
-% \begin{macrocode}
-\expandafter\ifx\csname sa@mode\endcsname\relax\else
-% \end{macrocode}
-% \begin{macro}{\includestandalone}
-% \begin{macrocode}
-\RequirePackage{gincltex}
-\RequirePackage{ifpdf}
-\ifpdf
- \def\sa@graphicext{.pdf}
-\else
- \def\sa@graphicext{.eps}
-\fi
-
-\def\sa@comparegranpic#1{%
- \begingroup
- \let\next\empty
- \expandafter\sa@comparegranpic@\pdffilemoddate{#1\sa@graphicext}\relax
- \let\sa@picdate\sa@date
- \let\sa@pictime\sa@time
- \expandafter\sa@comparegranpic@\pdffilemoddate{#1.tex}\relax
- \ifnum\sa@date>\sa@picdate\relax
- \def\next{\sa@buildgraphic{#1}}%
- \else
- \ifnum\sa@date=\sa@picdate\relax
- \ifnum\sa@time>\sa@pictime\relax
- \def\next{\sa@buildgraphic{#1}}%
- \fi
- \fi
- \fi
- \expandafter
- \endgroup
- \next
-}
-
-\begingroup
-\@makeother\D
-\@makeother:
-\global\@namedef{sa@comparegranpic@}D:#1#2#3#4#5#6#7#8#9\relax{%
- \def\sa@date{#1#2#3#4#5#6#7#8}%
- \sa@comparegranpic@@#9\relax
-}
-\endgroup
-
-\def\sa@comparegranpic@@#1#2#3#4#5#6#7\relax{%
- \def\sa@time{#1#2#3#4#5#6}%
- \def\sa@tz{#7}%
-}
-
-\def\sa@compilecmd{\ifpdf pdf\fi latex --interaction=batchmode \image}%
-
-\def\sa@buildgraphic#1{%
- \ifeof18
- \PackageError{standalone}{Shell escape needed to create graphic!}{}%
- \else
- \begingroup
- \def\image{#1}%
- \immediate\write18{\sa@compilecmd}%
- \endgroup
- \fi
-}
-
-\newcommand*\includestandalone[2][]{%
- \begingroup
- \edef\@tempa{{#2\sa@graphicext}}%
- \expandafter\includestandalone@\@tempa{#2}{#1}%
- \endgroup
-}
-
-%% 0 = PDF if exists, TEX otherwise
-%% 1 = force TEX
-%% 2 = force PDF
-%% 3 = build PDF if not exists
-%% 4 = build PDF if older than TEX
-\def\includestandalone@#1#2#3{%
- \ifcase\sa@mode
- \relax% 0
- \IfFileExists{#1}%
- {\includegraphics[#3]{#1}}%
- {\includegraphics[#3]{#2.tex}}%
- \or% 1
- \includegraphics[#3]{#2.tex}%
- \or% 2
- \includegraphics[#3]{#1}%
- \or% 3
- \IfFileExists{#1}%
- {\includegraphics[#3]{#1}}%
- {\sa@buildgraphic{#2}%
- \IfFileExists{#1}%
- {\includegraphics[#3]{#1}}%
- {\PackageWarning{standalone}%
- {Graphic '#1' could not be build.^^J%
- Shell escape activated?}%
- \includegraphics[#3]{#2.tex}%
- }%
- }%
- \else% 4
- \IfFileExists{#1}%
- {\sa@comparegranpic{#2}}%
- {\sa@buildgraphic{#2}%
- \IfFileExists{#1}%
- {\includegraphics[#3]{#1}}%
- {\PackageWarning{standalone}%
- {Graphic '#1' could not be build.^^J%
- Shell escape activated?}%
- \includegraphics[#3]{#2.tex}%
- }%
- }%
- \fi
-}
-% \end{macrocode}
-%
-% \end{macro}
-% \begin{macrocode}
-\fi
-% \end{macrocode}
-% \iffalse
-%</sty>
-% \fi
%
% \subsection{Config File}
% Default content of the configuration file. Users can override this by placing an own