diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-11 23:57:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-11 23:57:56 +0000 |
commit | cc3b86e0de9ace5565e8b58c71bd3c7d7423c8ee (patch) | |
tree | d6a489b0a557fad175471a7193e6ed6d8899ee29 /Master/texmf-dist/source | |
parent | 7ae0f3e92fd45d0f42c38ac06ca545161be45581 (diff) |
trunk/Master/texmf-dist/source/latex/srcltx
git-svn-id: svn://tug.org/texlive/trunk@523 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/srcltx/srcltx.dtx | 618 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/srcltx/srcltx.ins | 54 |
2 files changed, 672 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/srcltx/srcltx.dtx b/Master/texmf-dist/source/latex/srcltx/srcltx.dtx new file mode 100644 index 00000000000..86f7534725f --- /dev/null +++ b/Master/texmf-dist/source/latex/srcltx/srcltx.dtx @@ -0,0 +1,618 @@ +% \iffalse meta-comment +% This package is in the public domain. It comes with no guarantees +% and no reserved rights. You can use or modify this package at your +% own risk. +% +% Originally written by: Aleksander Simonic +% Currently maintained by: Stefan Ulrich <stefanulrich@users.sourceforge.net> +% \fi +% +% \iffalse +%<*package> +%<latex>\NeedsTeXFormat{LaTeX2e} +%<latex>\ProvidesPackage{srcltx}[2004/10/05 v1.5 Source specials for inverse search in DVI files] +%</package> +% +%<*driver> +\ProvidesFile{srcltx.drv}[2001/04/01 v1.0 Driver for srcltx package] +\documentclass{ltxdoc} +\usepackage{tabularx,calc} +\IfFileExists{url.sty}{\RequirePackage{url}}{\newcommand\url{\texttt}} +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\usepackage[inactive]{srcltx} +\def\MainFile{srcltx.dtx} +\newcommand\package{\textsf} +\newcommand\file{\texttt} +\renewcommand\topfraction{.85} +\renewcommand\textfraction{.15} +\renewcommand\floatpagefraction{.66} +\newenvironment{descr}{% + \renewcommand\descriptionlabel[1]{\hspace\labelsep\normalfont##1} + \begin{description} +}{% + \end{description} +} +\DeclareRobustCommand\Com[1]{\texttt{\bslash #1}} +\pagestyle{headings} +\frenchspacing +\usepackage[ +pdftitle={Documentation for the srcltx package}, +pdfauthor={Stefan Ulrich}, +pdfsubject={srcltx}, +pdfcreator={LaTeX/hyperref package}, +colorlinks=true, +% change ghastly default link colors +linkcolor=blue,citecolor=blue,filecolor=blue,menucolor=blue,pagecolor=blue,urlcolor=blue, +pdfpagemode=None, +]{hyperref} +% get rid of cheesy font settings ... +\let\sldefault\itdefault +\let\MakeUppercase\relax + +\OnlyDescription + +\begin{document} +\DocInput{srcltx.dtx} +\end{document} +%</driver> +% +% \fi +% +% +% \CheckSum{336} +% +% \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 +% Lower-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 +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% +% \GetFileInfo{srcltx.sty} +% +% \title{\package{srcltx.sty} $\cdot$ \package{srctex.sty}} +% \author{\normalsize Originally written by Aleksander Simonic\\ +% \normalsize Currenlty maintained by\\ \normalsize Stefan Ulrich \href{mailto:stefanulrich@users.sourceforge.net}{\texttt{<stefanulrich@users.sourceforge.net>}}} +% \date{\fileversion, \filedate} +% \maketitle +% +% \begin{abstract}\noindent +% This package provides source special insertion into DVI files, +% allowing to jump from the DVI file to the \file{.tex} source +% and back (given a DVI viewer that supports this). Additionally, +% it provides hooks for error tracking from the \file{.log} file +% for the WinEdt shell. +% \end{abstract} +% +% \tableofcontents +% +% \section{Warning} +% +% \textbf{Source specials may alter the paragraph spacing +% in your document. Always process the final version of your document with +% this package commented out, or deactivated:} +% |\usepackage[inactive]{srcltx}|. +% +% \section{Usage} +% To use the package with \LaTeX, put the line +% +% |\usepackage{srcltx}| +% +% \noindent +% into the preamble of your document. For \TeX, use +% +% |\input srctex.sty| +% +% \noindent +% instead. This will insert source specials at every +% start of a paragraph of your document and at every math environment +% (see the `Options' section below for how to customize this). A source +% special is only inserted if there hasn't already been one on the same +% source input line. +% +% For editors and DVI viewers that support it, source specials can be used for +% `inverse search' between the (La)\TeX\ source and the DVI file: +% The \file{.dvi} viewer can open a text editor with the file +% (and line) of the corresponding place in the \file{.tex} source +% (also called `reverse search'), and the editor can invoke the previewer +% with the corresponding place in the \file{.dvi} file (`forward search'). +% Examples for DVI previewers supporting this are: The Windows viewers YAP and Dviwin, +% and the Unix viewers xdvi(k) (versions $\geq$ 22.38) and KDVI (KDE $\geq$ 3.0). +% Editors supporting inverse search are e.g. WinEdt, (X)Emacs, nedit and vim. +% +% The package was originally written for use with the WinEdt shell, and +% it offers some special features to customize WinEdt's error +% tracking. These are shown in the example in figure~\ref{ex} on page~\pageref{ex}. +% +% The specials inserted by this package have the following format, which should +% be compatible with all DVI viewers: +% +% \begin{tabular}{@{}l@{}} +% |\special{src:|\textit{line-number}\textvisiblespace\textit{filename}|}| +% \end{tabular} +% +% +% \subsection{Options} +% +% The following options are only available for the \LaTeX2e\ version of +% this package. Unless noted otherwise, the Plain \TeX\ version \package{srctex.sty} +% has a command |\SRC|$\langle$\texttt{foo}$\rangle$ for each option +% $\langle$\texttt{foo}$\rangle$, e.g. |\SRCnopar| replaces the +% `\texttt{nopar}' option. +% \begin{descr} +% +% \item[\texttt{active}\slash\texttt{inactive}] +% With the \texttt{inactive} option, source specials are disabled, but +% the source file tracking for WinEdt is still active. +% +% The \texttt{active} option is only useful to override +% a global \texttt{inactive} option. +% +% For \package{srctex.sty}, use \Com{SRCOKtrue} and \Com{SRCOKfalse} +% instead. +% +% \item[\texttt{nowinedt}] Turn off the source file tracking used by WinEdt (the +% |:<+ |\texttt{\textit{filename}} line in the output every time +% an input file is opened, and the |:<-| line when it's closed again). +% +% \item[\texttt{dviwin}] Use specials in a format suitable for dviwin +% (without a space between the line number and the filename). +% +% \item[\texttt{debug}] Print debugging information on current +% input file and the input file stack. +% \end{descr} +% The following options can be used to turn off source specials for certain +% environments; try these options if you encounter problems with the default behaviour: +% \begin{descr} +% \item[\texttt{nopar}] Don't hook into |\everypar|. +% +% \item[\texttt{nomath}] Don't hook into |\everymath|. +% +% %BROKEN \item[\texttt{nodisplay}] Don't hook into |\everydisplay|. +% +% \end{descr} +% +% \begin{figure} +% \hrulefill +% \footnotesize\begin{verbatim} +% \documentclass{report} +% \usepackage{srcltx} +% % +% % ... Preamble ... +% % +% \begin{document} +% % +% % ... Title, Author etc. ... +% % +% \WinEdt{?0000} % Do not process any errors (overful/underful boxes) +% % ... Preface etc. ... +% \WinEdt{?1111} % Process all types of errors from here on +% \include{chapter1} +% \include{chapter2} +% \include{chapter3} +% \bibliographystyle{plain} +% \bibliography{xbib} +% \end{document} +% \end{verbatim} +% \hrulefill +% \caption{Example for using \package{srcltx.sty} with the WinEdt error tracking features.}\label{ex} +% \end{figure} +% +% \subsection{Commands} +% \begin{descr} +% +% \item[\Com{SRCOKtrue}, \Com{SRCOKfalse}] You can use these commands to +% activate\slash deactivate source specials at any place in your +% document, e.g. when you experience problems with some special +% constructions (see also `Bugs and Restrictions' in section +% \ref{sec:bugs}). +% +% \item[\Com{Input}\marg{filename}] In order to keep track +% of the current filename, the \LaTeX\ commands +% \Com{include}\marg{filename} and \Com{input}\marg{filename} +% are overloaded (note the braces enclosing the filename argument). The +% \Com{input} command where the filename can be specified +% without any delimiters is a \TeX\ primitive command that can +% not be overloaded easily. Therefore the package provides an +% alternative command |\Input| which you should use in Plain +% \TeX\ instead of \Com{input} if you want the specials in such +% files to point to the correct filename. For \LaTeX, you +% should always use the version with braces: +% \Com{input}\marg{filename}. \emph{Note}: For Winedt, you will +% also need to specify the file name extension (e.g. +% \file{.tex}) in the argument of this command. +% +% \item[\Com{MainFile}] By default, the \TeX\ primitive |\jobname| contains the name of the +% ``main'' TeX file, without the filename extension `\file{.tex}'. +% Accordingly, |\MainFile| is defined as |\jobname.tex|. +% If your implementation does already add the extension +% to |\jobname|, you should redefine this command as follows: +% +% \noindent\begin{tabular}{@{}l@{}} +% |\def\MainFile{\jobname}| +% \end{tabular} +% \end{descr} +% +% \section{Bugs and Restrictions}\label{sec:bugs} +% +% Since this macro package overloads some internal \LaTeX\ commands, it +% is not as robust as one might wish, and may interact badly with other +% packages. Furthermore, the spacing may be altered by using the +% package; for example, with the \file{amsmath} documentation \file{amsldoc.tex}, +% the bibliography is shifted from the bottom of page 31 to page 32. +% Therefore you should comment out the package or disable it with the +% \texttt{inactive} option when preparing the final version of your document. +% +% A somewhat more robust method of inserting source specials is to use \TeX\ +% (the program) instead of a macro solution. Some \TeX\ implementations +% provide a command line option for this.\footnote{% +% E.g. a `\file{-src}' option is available in Mik\TeX\ from version 1.20 upwards, +% or in te\TeX\ from version beta-20011103 or teTeX-2.0 upwards. See the manual of your +% \TeX\ implementation for details on this.} +% You can still load \package{srcltx.sty} with the `\texttt{inactive}' option to enable +% the WinEdt error tracking features. +% +% This section lists known incompatibilities with other packages and workarounds for these. +% If you know of any other problems, please send a bug report to +% \href{mailto:stefanulrich@users.sourceforge.net}{\texttt{<stefanulrich@users.sourceforge.net>}}. +% \begin{description} +% \item[{\normalfont\package{soul.sty}:}] Active source specials inside +% the soul tokenization routine may lead to a `reconstruction failed' +% error. As a workaround, the internal command |\SOUL@| is overloaded +% by \package{srcltx}. With the Plain \TeX\ version, \package{srctex.sty} +% needs to be loaded \emph{after} \package{soul.sty} to make this work. +% \item[{\normalfont\package{syntax.sty}:}] This style does extensive parsing +% of the input inside its `grammar' environment, which is incompatible +% with \package{srcltx.sty}. +% \end{description} +% +% \section{Related Packages} +% +% Heiko Oberdiek's \package{vpe.sty} provides source specials for +% forward search in PDF files. To our knowledge there exists no +% implementation for reverse search with PDF viewers, or inverse search +% in Postscript documents. +% +% \section{History} +% +% This package was originally written by A.~Simonic, the WinEdt Shell +% author, to implement a source file tracking and DVI source specials +% for \TeX. D.~P.~Carlisle and B.~K.~Horn have contributed bug +% fixes. Further changes and conversion to \file{ltxdoc} format by S.~Ulrich. +% Thanks for patches and suggestions to: A.~Cherepanov, J.~Rawnsley, D.~Kastrup, +% D.~Arseneau and M.~S.~Gr\o nsleth. +% +% +% \StopEventually{} +% \section{Implementation} +% +% \changes{v1.5}{2004/10/05}{Fixed version number in documentation, and made \Com{input} append .tex +% extension if not yet present (feature requested by Martin Sigurd Gr\o nsleth).} +% \changes{v1.4}{2004/05/15}{Fixed \Com{everypar} hook, as suggested by David Kastrup in comp.text.tex, +% for compatibility with chapterbib.sty} +% \changes{v1.3}{2003/03/10}{Also hook into \Com{everydisplay}; unreleased since this change broke +% regression for gentle.tex} +% \changes{v1.2c}{2002/03/01}{Added the `nowinedt' option} +% \changes{v1.2b}{2002/01/23}{Fixed spurious space introduced by uncommented linebreak} +% \changes{v1.2}{2002/01/21}{Replace stack by macro solution, as suggested by +% Alexander Cherepanov (cherepan at mccme.ru). +% Also overload LaTeX's \Com{input} command.} +% \changes{v1.1a}{2001/07/14}{Minor fixes in the documentation.} +% \changes{v1.1}{2001/03/31}{SU: converted to ltxdoc format, changed the +% push\slash pop commands to use a `real' stack, +% other minor modifications} +% \changes{v1.002}{1999/09/03}{modified to change \Com{everypar}, by David Carlisle} +% \changes{v1.001}{1998/12/23}{modified to change \Com{output}, by Berthold Horn} +% +% +% \begin{macrocode} +%<*package> +%<tex>\catcode`\@=11 +\newif\ifSRCOK \SRCOKtrue +\newif\ifsrc@debug@ +\newif\ifsrc@dviwin@ +\newif\ifsrc@winedt@\src@winedt@true +\newif\ifsrc@everypar@\src@everypar@true +\newif\ifsrc@everymath@\src@everymath@true +%<*latex> +\RequirePackage{ifthen} +\DeclareOption{active}{\SRCOKtrue} +\DeclareOption{inactive}{\SRCOKfalse} +\DeclareOption{nowinedt}{\src@winedt@false} +\DeclareOption{debug}{\src@debug@true} +\DeclareOption{nopar}{\global\src@everypar@false} +\DeclareOption{nomath}{\global\src@everymath@false} +%</latex> +%<*tex> +\def\SRCdebug{\src@debug@true} +\def\SRCnopar{\src@everypar@false} +\def\SRCnomath{\src@everymath@false} +\def\typeout#1{{\newlinechar`\^^J\message{#1^^J}}} +\def\AtBeginDocument#1{#1} +%</tex> +%<latex>\newcommand*\src@maybe@space{} +\let\src@maybe@space\space +%<latex>\DeclareOption{dviwin}{\let\src@maybe@space\relax} +% \end{macrocode} +% SU: Originally the default was |\ExecuteOptions{inactive}|, but this +% was rather unintuitive, so I changed it. +% \begin{macrocode} +%<latex>\ExecuteOptions{active} +%<latex>\ProcessOptions +\newcount\src@lastline +\global\src@lastline=-1 +%<latex>\newcommand*\src@debug{} +\def\src@debug#1{\ifsrc@debug@\typeout{DBG: |#1|}\fi} +% \end{macrocode} +% \begin{macro}{\MainFile} +% This is for compatibility with \TeX\ implementations that add already +% the `\file{.tex}' extension to \Com{jobname} (very rare): +% \begin{macrocode} +%<latex>\newcommand*\MainFile{} +\def\MainFile{\jobname.tex} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\CurrentInput} +% Used to keep track of current input file name: +% \begin{macrocode} +%<latex>\newcommand*\CurrentInput{} +\gdef\CurrentInput{\MainFile} +% \end{macrocode} +% \end{macro} +% Command to customize WinEdt's log mode, and enable its input file +% tracking. This is switched off when the option \texttt{nowinedt} is +% selected. +% \begin{macrocode} +%<latex>\newcommand*\WinEdt{} +\def\WinEdt#1{\ifsrc@winedt@\typeout{:#1}\fi} +% \end{macrocode} +% A hook for \package{soul}, which might otherwise break with +% a `reconstruction failed' error: +% \begin{macrocode} +%<latex>\newcommand\src@AfterFi{} +\def\src@AfterFi#1\fi{\fi#1} +\AtBeginDocument{% +%<latex> \@ifpackageloaded{soul}{% +%<tex>\ifx\SOUL@\relax +%<tex>\else + \let\src@SOUL@\SOUL@ + \def\SOUL@#1{% + \ifSRCOK + \SRCOKfalse\src@SOUL@{#1}\SRCOKtrue + \else + \src@AfterFi\src@SOUL@{#1}% + \fi + }% +%<tex>\fi +%<latex> }{}% +} +% \end{macrocode} +% \begin{macro}{\src@spec} +% Macro that actually inserts the special. +% \begin{macrocode} +%<latex>\newcommand*\src@spec{} +\def\src@spec{% + \ifSRCOK + \ifnum\inputlineno>\src@lastline + \global\src@lastline=\inputlineno + \src@debug{% + src:\the\inputlineno\src@maybe@space\CurrentInput}% + \special{src:\the\inputlineno\src@maybe@space\CurrentInput}% + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\src@before@file@hook} +% \begin{macro}{\src@after@file@hook} +% Hooks executed before and after a level of input happens: +% \begin{macrocode} +%<latex>\newcommand\src@before@file@hook{} +%<latex>\newcommand\src@after@file@hook{} +\def\src@before@file@hook#1{% +%<latex> \protected@xdef\CurrentInput{#1}% +%<tex> \xdef\CurrentInput{#1}% + \WinEdt{<+ \CurrentInput}% + \global\src@lastline=0 + \ifSRCOK\special{src:1\CurrentInput}\fi +} +\def\src@after@file@hook#1{% + \WinEdt{<-}% + \global\src@lastline=\inputlineno + \global\advance\src@lastline by -1% + \gdef\CurrentInput{#1}% + \src@spec +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\src@getfilename@with@ext} +% Check if \verb+#1+ has the extension \verb+#2+, and if not, append it, saving the +% result to \Com{src@fname}. +% \begin{macrocode} +%<*latex> +\newcommand*\src@fname{} +\newcommand*\src@getfilename@with@ext[2]{% + \src@@getfilename@with@ext#1.\end{#2}% + \PackageInfo{srcltx}{Expanded filename `#1' to `\src@fname'}% +} +\newcommand*\src@@getfilename@with@ext{} +\def\src@@getfilename@with@ext#1.#2\end#3{% + \ifthenelse{\equal{#2}{}}{% +% \end{macrocode} +% Empty extension: Add \verb+#3+. +% \begin{macrocode} + \def\src@fname{#1.#3}% + }{% + \ifthenelse{\equal{#2}{#3.}}{% +% \end{macrocode} +% \verb+#2+ is the correct extension, but now contains a trailing dot: +% replace with \verb+#3+. +% \begin{macrocode} + \def\src@fname{#1.#3}% + }{% +% \end{macrocode} +% \verb+#2+ is a wrong extension and contains a trailing dot: +% append \verb+#3+. +% \begin{macrocode} + \def\src@fname{#1.#2#3}% + }% + }% +} +%</latex> +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\include} +% Redefine the original \Com{include} command. This is done for LaTeX only. +% The \file{.tex} extension is added to the argument. +% \begin{macrocode} +%<*latex> +\newcommand*\src@include{} +\newcommand*\src@@include{} +\let\src@include\include +\def\include#1{% + \src@spec + \clearpage + \expandafter\src@@include\expandafter{\CurrentInput}{#1}% +}% +\def\src@@include#1#2{% + \src@before@file@hook{#2.tex}% + \src@include{#2}% + \src@after@file@hook{#1}% +} +%</latex> +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\input} +% For \Com{input}, we can only overload the LaTeX syntax, i.e. the usage +% with the argument in braces. For plain \TeX, we provide an alternative command +% \Com{Input} that can be used instead of \Com{input}. We can't redefine +% \Com{input}, since that is a \TeX\ primitive with a different way of parsing +% the argument line. +% +% A \file{.tex} extension is added to the argument if it's not already present. +% \begin{macrocode} +%<*latex> +\newcommand*\src@input{} +\newcommand*\src@@input{} +\newcommand*\src@@@input{} +%</latex> +\let\src@input\input +%<*latex> +\def\input{\src@spec\@ifnextchar\bgroup\src@@input\@@input}% +% \end{macrocode} +% \Com{@@input} is \LaTeX's alias for \TeX's \Com{input} command. +% \begin{macrocode} +\def\src@@input#1{% + \expandafter\src@@@input\expandafter{\CurrentInput}{#1}% +} +\def\src@@@input#1#2{% + \src@getfilename@with@ext{#2}{tex}% this sets \src@fname + \src@before@file@hook{\src@fname}% + \src@input{#2}% + \src@after@file@hook{#1}% +} +%</latex> +% \end{macrocode} +% \end{macro} +% \begin{macro}{\Input} +% \begin{macrocode} +%<*tex> +\def\Input#1{% + \expandafter\src@Input\expandafter{\CurrentInput}{#1}% +} +\def\src@Input#1#2{% + \src@before@file@hook{#2}% + \src@input #2 + \src@after@file@hook{#1}% +} +%</tex> +% \end{macrocode} +% For \LaTeX, \Com{Input} is just an alias for \Com{input}: +% \begin{macrocode} +%<*latex> +\newcommand\Input{} +\let\Input\input +%</latex> +% \end{macrocode} +% \end{macro} +% Hook into `everypar'. This should concatenate the \Com{src@spec} with +% whatever those token lists contained before, just in case they were not +% empty token lists (hoping that later hooks will do the same). David Kastrup +% writes in \url{<x5ekpmxh2j.fsf@lola.goethe.zz>}: +% \begin{quote} +% You need \emph{two} new tokens +% for a proper subversion. One to save the old meaning in when the +% package is loaded, and one to refer to [\dots] the old meaning at +% the time the package is running, even if somebody else subverts the +% \Com{everypar} token again. +% \end{quote} +% \begin{macrocode} +\ifsrc@everypar@ +%<latex> \newcommand*\src@old@everypar{} + \let\src@old@everypar\everypar + \newtoks\src@new@everypar + \let\everypar\src@new@everypar + \everypar\expandafter{\the\src@old@everypar} + \src@old@everypar{\the\src@new@everypar\src@spec} +\fi +% \end{macrocode} +% Use the `nomath' option to disable the following: +% \begin{macrocode} +\ifsrc@everymath@ +%<*latex> + \def\@tempa#1\the\everymath#2\delimiter{{#1\src@spec\the\everymath#2}} + \frozen@everymath=\expandafter\@tempa\the\frozen@everymath\delimiter +%</latex> +%<*tex> + \everymath\expandafter{\the\everymath\src@spec} +%</tex> +\fi +% \end{macrocode} +% \begin{macro}{\bibliography} +% Hook into the \Com{bibliography} command: +% \begin{macrocode} +%<*latex> +\newcommand*\src@bibliography{} +\newcommand*\src@@bibliography{} +\let\src@bibliography\bibliography +\def\bibliography#1{% + \expandafter\src@@bibliography\expandafter{\CurrentInput}{#1}% +} +\def\src@@bibliography#1#2{% + \src@before@file@hook{\jobname.bbl}% + \src@bibliography{#2}% + \src@after@file@hook{#1}% +} +%</latex> +% \end{macrocode} +% \end{macro} +% Hook into output routine to turn off \Com{src@spec} while \Com{output} is active: +% \begin{macrocode} +%<latex>\newcommand*\src@old@output{} +\let\src@old@output\output +\newtoks\src@new@output +\let\output\src@new@output +\output\expandafter{\the\src@old@output} +\src@old@output{\SRCOKfalse\the\src@new@output} +%<tex>\catcode`\@=12 +%</package> +% \end{macrocode} +% \Finale +\endinput diff --git a/Master/texmf-dist/source/latex/srcltx/srcltx.ins b/Master/texmf-dist/source/latex/srcltx/srcltx.ins new file mode 100644 index 00000000000..4fe1cc17602 --- /dev/null +++ b/Master/texmf-dist/source/latex/srcltx/srcltx.ins @@ -0,0 +1,54 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% +\input docstrip + +\keepsilent + +% !!!FIXME: add check for docstrip > 2.4d + +\preamble + +This package is in the public domain. It comes with no guarantees +and no reserved rights. You can use or modify this package at your +own risk. +Originally written by: Aleksander Simonic +Current maintainer: Stefan Ulrich <stefanulrich@users.sourceforge.net> + +\endpreamble + +\generate{% + \file{srcltx.sty}{\from{srcltx.dtx}{package,latex}}% + \file{srctex.sty}{\from{srcltx.dtx}{package,tex}}% +} + +\Msg{*****************************************************************} +\Msg{*} +\Msg{* To finish the installation, you need to move the following files} +\Msg{* into a directory searched by TeX:} +\Msg{*} +\Msg{* srcltx.sty} +\Msg{* srctex.tex} +\Msg{*} +\Msg{* To produce the documentation, run srcltx.dtx through LaTeX.} +\Msg{*} +\Msg{* To include the full source code into the documentation, } +\Msg{* create a file `ltxdoc.cfg' containing the following line: } +\Msg{* \space\space\space\string\AtBeginDocument\string{\string\AlsoImplementation\string} } +\Msg{*} +\Msg{*} +\Msg{* To produce the index for the documentation, run makeindex} +\Msg{* like this:} +\Msg{* \space\space makeindex -s gind.ist srcltx} +\Msg{*} +\Msg{* To produce a history of changes, run makeindex} +\Msg{* like this:} +\Msg{* \space\space makeindex -s gglo.ist -o srcltx.gls srcltx.glo} +\Msg{*} +\Msg{* Happy TeXing!} +\Msg{*****************************************************************} + +\endbatchfile |