summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/srcltx/srctex.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-12-08 00:12:55 +0000
committerKarl Berry <karl@freefriends.org>2006-12-08 00:12:55 +0000
commit46b8a6fe6247a9476df0a843a54793d042ac2196 (patch)
treebaf017ba6a634f9f0fa7012a5c4544a1eee062a8 /Master/texmf-dist/tex/latex/srcltx/srctex.sty
parent7f549680dc21a5a0b6c80ce7b1252b232d8535ff (diff)
srcltx update (7dec06)
git-svn-id: svn://tug.org/texlive/trunk@2624 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/srcltx/srctex.sty')
-rw-r--r--Master/texmf-dist/tex/latex/srcltx/srctex.sty31
1 files changed, 27 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/srcltx/srctex.sty b/Master/texmf-dist/tex/latex/srcltx/srctex.sty
index aeb603238c1..8edc5a0f0d7 100644
--- a/Master/texmf-dist/tex/latex/srcltx/srctex.sty
+++ b/Master/texmf-dist/tex/latex/srcltx/srctex.sty
@@ -45,6 +45,10 @@
}%
\fi
}
+\def\srcIncludeHook#1{\xdef\CurrentInput{#1.tex}}
+\def\srcInputHook#1{%
+ \src@getfilename@with@ext{#1}%
+}
\def\src@spec{%
\ifSRCOK
\ifnum\inputlineno>\src@lastline
@@ -55,11 +59,10 @@
\fi
\fi
}
-\def\src@before@file@hook#1{%
- \xdef\CurrentInput{#1}%
+\def\src@before@file@hook{%
\WinEdt{<+ \CurrentInput}%
\global\src@lastline=0
- \ifSRCOK\special{src:1\CurrentInput}\fi
+ \ifSRCOK\special{src:1\src@maybe@space\CurrentInput}\fi
}
\def\src@after@file@hook#1{%
\WinEdt{<-}%
@@ -68,12 +71,32 @@
\gdef\CurrentInput{#1}%
\src@spec
}
+\def\src@tempa{}%
+\def\src@extensions@path#1.#2\end{%
+ \ifx\\#2\\
+ \edef\src@extensions@last{#1}%
+ \let\src@tempa\relax
+ \else
+ \def\src@tempa{\src@extensions@path#2\end}%
+ \fi
+ \src@tempa
+}
+\def\src@getfilename@with@ext#1{%
+ \expandafter\src@extensions@path#1.\end
+ \def\src@tempa{tex}%
+ \ifx\src@extensions@last\src@tempa
+ \xdef\CurrentInput{#1}%
+ \else
+ \xdef\CurrentInput{#1.tex}%
+ \fi
+}
\let\src@input\input
\def\Input#1{%
\expandafter\src@Input\expandafter{\CurrentInput}{#1}%
}
\def\src@Input#1#2{%
- \src@before@file@hook{#2}%
+ \srcInputHook{#2}%
+ \src@before@file@hook
\src@input #2
\src@after@file@hook{#1}%
}