summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/srcltx/srctex.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/srcltx/srctex.sty')
-rw-r--r--Master/texmf-dist/tex/latex/srcltx/srctex.sty98
1 files changed, 98 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/srcltx/srctex.sty b/Master/texmf-dist/tex/latex/srcltx/srctex.sty
new file mode 100644
index 00000000000..aeb603238c1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/srcltx/srctex.sty
@@ -0,0 +1,98 @@
+%%
+%% This is file `srctex.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% srcltx.dtx (with options: `package,tex')
+%%
+%% 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>
+%%
+\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
+\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}
+\let\src@maybe@space\space
+\newcount\src@lastline
+\global\src@lastline=-1
+\def\src@debug#1{\ifsrc@debug@\typeout{DBG: |#1|}\fi}
+\def\MainFile{\jobname.tex}
+\gdef\CurrentInput{\MainFile}
+\def\WinEdt#1{\ifsrc@winedt@\typeout{:#1}\fi}
+\def\src@AfterFi#1\fi{\fi#1}
+\AtBeginDocument{%
+\ifx\SOUL@\relax
+\else
+ \let\src@SOUL@\SOUL@
+ \def\SOUL@#1{%
+ \ifSRCOK
+ \SRCOKfalse\src@SOUL@{#1}\SRCOKtrue
+ \else
+ \src@AfterFi\src@SOUL@{#1}%
+ \fi
+ }%
+\fi
+}
+\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
+}
+\def\src@before@file@hook#1{%
+ \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
+}
+\let\src@input\input
+\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}%
+}
+\ifsrc@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
+\ifsrc@everymath@
+ \everymath\expandafter{\the\everymath\src@spec}
+\fi
+\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}
+\catcode`\@=12
+\endinput
+%%
+%% End of file `srctex.sty'.