summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-04-16 00:35:32 +0000
committerKarl Berry <karl@freefriends.org>2008-04-16 00:35:32 +0000
commitdfc967cd868ad32efe600295b7279bd8a89d0c6b (patch)
tree9f65d4f2fb6b172f1f95d82a678d6ca227095308
parent852df5a4bca0e1a04205d6174789ce30fc96ec45 (diff)
new latex package varsfromjobname
git-svn-id: svn://tug.org/texlive/trunk@7434 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/varsfromjobname/README33
-rw-r--r--Master/texmf-dist/doc/latex/varsfromjobname/varsfromjobname.pdfbin0 -> 29271 bytes
-rw-r--r--Master/texmf-dist/doc/latex/varsfromjobname/varsfromjobname.tex32
-rw-r--r--Master/texmf-dist/tex/latex/varsfromjobname/varsfromjobname.sty103
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check3
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/varsfromjobname.tlpsrc2
7 files changed, 173 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/varsfromjobname/README b/Master/texmf-dist/doc/latex/varsfromjobname/README
new file mode 100644
index 00000000000..2077fd693f1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/varsfromjobname/README
@@ -0,0 +1,33 @@
+README
+---------
+
+varsfromjobname.sty extracts variables from the name of the LaTeX file.
+
+If the name of the file consists of tokens separated by hyphen, the
+package offers the following commands:
+
+\getonefromjobname
+\gettwofromjobname
+\getthreefromjobname
+\getfourfromjobname
+\getfivefromjobname
+\getsixfromjobname
+\getsevenfromjobname
+\geteightfromjobname
+\getninefromjobname
+
+Usage:
+
+a) Save your LaTeX-file under a name such as 2008-04-14-ziegenhagen.tex
+
+b) Load the package by putting \usepackage{varsfromjobname} in the preamble of
+ your document
+
+c) Use the commands given above to address the specific parts of the filename.
+
+d) Adressing a token which is not available gives an error, so make sure to request
+ only those tokens which are actually available.
+
+If you find this package useful, please give me feedback: <http://www.uweziegenhagen.de>
+
+Uwe Ziegenhagen, 2008-04-14 \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/varsfromjobname/varsfromjobname.pdf b/Master/texmf-dist/doc/latex/varsfromjobname/varsfromjobname.pdf
new file mode 100644
index 00000000000..3c6e4297795
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/varsfromjobname/varsfromjobname.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/varsfromjobname/varsfromjobname.tex b/Master/texmf-dist/doc/latex/varsfromjobname/varsfromjobname.tex
new file mode 100644
index 00000000000..e6031ad7ee5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/varsfromjobname/varsfromjobname.tex
@@ -0,0 +1,32 @@
+\documentclass{article}
+
+\nofiles
+
+\usepackage{varsfromjobname}
+
+\date{April 14th 2008}
+\author{Uwe Ziegenhagen}
+\title{Jobdate Description}
+
+\begin{document}
+\maketitle
+
+\noindent Using \texttt{varsfromjobname.sty} one can easily extract information from the filename, if it follows a certain form. The LaTeX command \verb|\|jobname returns the name of the LaTeX file. If the filename consists of tokens separated by hyphen we can easily extract certain tokens that can be used inside the document. The package expects the filename to be of the form
+
+\noindent\texttt{one-two-three-four-five-six-seven-eight-nine.tex}
+
+\noindent and offers the following commands:
+
+\begin{itemize}
+ \item \verb|\|getonefromjobname
+ \item \verb|\|gettwofromjobname
+ \item \verb|\|getthreefromjobname
+ \item \verb|\|getfourfromjobname
+ \item \verb|\|getfivefromjobname
+ \item \verb|\|getsixfromjobname
+ \item \verb|\|getsevenfromjobname
+ \item \verb|\|geteightfromjobname
+ \item \verb|\|getninefromjobname
+\end{itemize}
+
+\end{document}
diff --git a/Master/texmf-dist/tex/latex/varsfromjobname/varsfromjobname.sty b/Master/texmf-dist/tex/latex/varsfromjobname/varsfromjobname.sty
new file mode 100644
index 00000000000..a6694674b0a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/varsfromjobname/varsfromjobname.sty
@@ -0,0 +1,103 @@
+%% LaTeX2e file `varsfromjobname.sty'
+%% generated by the `filecontents' environment
+%% from source `one-two-three-four-five-six-seven' on 2008/04/10.
+%%
+%begin of varsfromjobname.sty
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{varsfromjobname}[2008/04/14 v. 0.3 extracts tokens from jobname (UZ)]
+
+%Author: Uwe Ziegenhagen
+% based on code supplied by Friedrich Vosberg and Markus Kohm
+% help by Rolf Niepraschk and Sven Naumann, Ulrich Schwarz
+% and Andreas Mathias was greatly appreciated
+% see posting <3983639.NRU96H2Y1Y@ID-107054.user.dfncis.de>
+% requires the filename to be of the following form
+% itemone-itemtwo-itemthree- ... -itemnine.tex
+
+\makeatletter
+
+\newcommand*{\getonefromjobname}{%
+ \expandafter\@getonefromfilename\jobname--------\@nil%
+}
+
+\newcommand*{\gettwofromjobname}{%
+ \expandafter\@gettwofromfilename\jobname--------\@nil%
+}
+
+\newcommand*{\getthreefromjobname}{%
+ \expandafter\@getthreefromfilename\jobname--------\@nil%
+}
+
+\newcommand*{\getfourfromjobname}{%
+ \expandafter\@getfourfromfilename\jobname--------\@nil%
+}
+
+\newcommand*{\getfivefromjobname}{%
+ \expandafter\@getfivefromfilename\jobname--------\@nil%
+}
+
+\newcommand*{\getsixfromjobname}{%
+ \expandafter\@getsixfromfilename\jobname--------\@nil%
+}
+
+\newcommand*{\getsevenfromjobname}{%
+ \expandafter\@getsevenfromfilename\jobname--------\@nil%
+}
+
+\newcommand*{\geteightfromjobname}{%
+ \expandafter\@geteightfromfilename\jobname--------\@nil%
+}
+
+\newcommand*{\getninefromjobname}{%
+ \expandafter\@getninefromfilename\jobname\@nil%
+}
+
+\newcommand*\@getonefromfilename{}
+\def\@getonefromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
+#1%
+}
+
+\newcommand*\@gettwofromfilename{}
+\def\@gettwofromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
+#2%
+}
+
+\newcommand*\@getthreefromfilename{}
+\def\@getthreefromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
+#3%
+}
+
+\newcommand*\@getfourfromfilename{}
+\def\@getfourfromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
+#4%
+}
+
+\newcommand*\@getfivefromfilename{}
+\def\@getfivefromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
+#5%
+}
+
+
+\newcommand*\@getsixfromfilename{}
+\def\@getsixfromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
+#6%
+}
+
+
+\newcommand*\@getsevenfromfilename{}
+\def\@getsevenfromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
+#7%
+}
+
+\newcommand*\@geteightfromfilename{}
+\def\@geteightfromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
+#8%
+}
+
+\newcommand*\@getninefromfilename{}
+\def\@getninefromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
+#9%
+}
+
+\makeatother
+% end of jobdate.sty
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 5ab019832a5..b618a03379d 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -184,7 +184,8 @@ my @WorkingTLP = qw(
uebungsblatt ucthesis uhrzeit uiucthesis ulsy umich-thesis uml umlaute
umthesis umtypewriter underlin undertilde units unitsdef unroman
upmethodology upquote ushort
- vancouver variations varindex vector velthuis verse versions
+ vancouver variations varindex varsfromjobname
+ vector velthuis verse versions
vhistory visualfaq vmargin vntex volumes vpe vxu
wallpaper warning warpcol williams wordcount wordlike wrapfig
xargs xbase xcolor xdoc xecyr xetexref xfor xfrac xgreek xifthen
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index dd9d94dbce8..ccaa070495b 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -543,6 +543,7 @@ depend upmethodology
depend upquote
depend ushort
depend varindex
+depend varsfromjobname
depend vector
depend versions
depend vhistory
diff --git a/Master/tlpkg/tlpsrc/varsfromjobname.tlpsrc b/Master/tlpkg/tlpsrc/varsfromjobname.tlpsrc
new file mode 100644
index 00000000000..b46cd990fb0
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/varsfromjobname.tlpsrc
@@ -0,0 +1,2 @@
+name varsfromjobname
+category Package