summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/listlbls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-07-26 23:03:58 +0000
committerKarl Berry <karl@freefriends.org>2014-07-26 23:03:58 +0000
commitf24688afffa8c38ec19dfb9cd0a0a3e5d4267f24 (patch)
tree2caf1cdd038a911514f4f0ebebbc5d194cde18cb /Master/texmf-dist/source/latex/listlbls
parent4a9987c60ecf28083f2701f4a5abfa724d6a56f0 (diff)
listlbls (26jul14)
git-svn-id: svn://tug.org/texlive/trunk@34735 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/listlbls')
-rw-r--r--Master/texmf-dist/source/latex/listlbls/listlbls.dtx241
-rw-r--r--Master/texmf-dist/source/latex/listlbls/listlbls.ins74
2 files changed, 315 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/listlbls/listlbls.dtx b/Master/texmf-dist/source/latex/listlbls/listlbls.dtx
new file mode 100644
index 00000000000..e900b5febef
--- /dev/null
+++ b/Master/texmf-dist/source/latex/listlbls/listlbls.dtx
@@ -0,0 +1,241 @@
+% \iffalse meta-comment
+%<*internal>
+\iffalse
+%</internal>
+%<*readme>
+----------------------------------------------------------------
+listlbls --- Creates a list of all labels used throughout a document
+Author: Norbert Melzer
+E-mail: timmelzer@gmail.com
+License: Released under the LaTeX Project Public License v1.3c or later
+See: http://www.latex-project.org/lppl.txt
+----------------------------------------------------------------
+
+Some text about the package: probably the same as the abstract.
+%</readme>
+%<*internal>
+\fi
+\def\nameofplainTeX{plain}
+\ifx\fmtname\nameofplainTeX\else
+ \expandafter\begingroup
+\fi
+%</internal>
+%<*install>
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\preamble
+----------------------------------------------------------------
+listlbls --- Creates a list of all labels used throughout a document
+Author: Norbert Melzer
+E-mail: timmelzer@gmail.com
+License: Released under the LaTeX Project Public License v1.3c or later
+See: http://www.latex-project.org/lppl.txt
+----------------------------------------------------------------
+
+\endpreamble
+\postamble
+
+Copyright (C) 2014 by Norbert Melzer <timmelzer@gmail.com>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License (LPPL), either
+version 1.3c of this license or (at your option) any later
+version. The latest version of this license is in the file:
+
+http://www.latex-project.org/lppl.txt
+
+This work is "maintained" (as per LPPL maintenance status) by
+Norbert Melzer.
+
+This work consists of the file listlbls.dtx and a Makefile.
+Running "make" generates the derived files README, listlbls.pdf and listlbls.sty.
+Running "make inst" installs the files in the user's TeX tree.
+Running "make install" installs the files in the local TeX tree.
+
+\endpostamble
+
+\usedir{tex/latex/listlbls}
+\generate{
+ \file{\jobname.sty}{\from{\jobname.dtx}{package}}
+}
+%</install>
+%<install>\endbatchfile
+%<*internal>
+\usedir{source/latex/listlbls}
+\generate{
+ \file{\jobname.ins}{\from{\jobname.dtx}{install}}
+}
+\nopreamble\nopostamble
+\usedir{doc/latex/listlbls}
+\generate{
+ \file{README.txt}{\from{\jobname.dtx}{readme}}
+}
+\ifx\fmtname\nameofplainTeX
+ \expandafter\endbatchfile
+\else
+ \expandafter\endgroup
+\fi
+%</internal>
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{listlbls.dtx}
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{listlbls}
+%<*package>
+ [2014/07/25 v1.01 Creates a list of all labels used throughout a document]
+%</package>
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry}
+\usepackage{colordoc}
+\usepackage{dox}
+\doxitem{Option}{option}{option}
+\usepackage[numbered]{hypdoc}
+\usepackage{xspace}
+\usepackage[draft]{listlbls}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\newcommand\TSE{\href{http://tex.stackexchange.com/}{\TeX-Stackexchange}\xspace}
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \GetFileInfo{\jobname.dtx}
+% \DoNotIndex{\newcommand,\newenvironment,\def,\detokenize,\dotfill,\else,\endinput,\expandafter,\fi,\ifeof,\ifx,\immediate,\jobname,\par,\pageref,\openin,\noindent,\newtoks,\newread,\newlabel,\loop,\long,\read,\ref,\relax,\repeat,\texttt,\the,\tmp,\zz,\ProcessOptions,\let,\ifdefined,\DeclareOption}
+%
+%\title{\textsf{listlbls} --- Creates a list of all labels used throughout a document\thanks{This file
+% describes version \fileversion, last revised \filedate.}
+%}
+%\author{Norbert Melzer\thanks{E-mail: \href{mailto:timmelzer@gmail.com}{timmelzer@gmail.com}}}
+%\date{Released \filedate}
+%
+%\maketitle
+%
+%\changes{v1.00}{2014/07/25}{First public release}
+%\changes{v1.01}{2014/07/25}{Changed maintainer email}
+%\changes{v1.01}{2014/07/25}{Changed some internal stuff to make it releaseable on CTAN}
+%
+% \begin{abstract}
+% This is a package meant to help a \LaTeX-writer to keep track all the defined labels by typesetting a complete list of labels whereever the author requests it. Keep in mind, that you might need to have additional \LaTeX\ runs to get the references right.
+%
+% This package is based on an answer \textsc{David Carlisle}\ gave on \TSE in the thread \href{http://tex.stackexchange.com/questions/147695/list-of-all-labels-with-hyperlinks/147705#147705}{List of all labels with hyperlinks}.
+% \end{abstract}
+%
+% \section{Installation}\label{sec:install}
+%
+% \begin{enumerate}
+% \item Check out the sourcecode from \href{https://github.com/}{GitHub}:\\
+% |git clone git@github.com:NobbZ/listlbls.git|
+% \item Switch to the source-folder:\\|cd listlbls|
+% \item Checkout the branch/tag you desire: |master| for latest release, |develop| for latest builds (might be broken) or the version number desired.\\
+% |git checkout <branch/tag>|
+% \item Compile the document using |make|:\\
+% |make all|
+% \item You can do either a user-installation or a system-wide installation:
+% \begin{description}
+% \item[user:] |make inst|
+% \item[system:] |make install| (will ask for root!)
+% \end{description}
+% \end{enumerate}
+%
+% Alternatively you might find the package at CTAN and download it. Instead of |git clone| you had to download the package, unzip it, change into that folder and then continue with compilation (step 4 above).
+%
+% \section{Usage}\label{sec:usage}
+%
+% \subsection{Initialization}\label{ssec:use-init}
+%
+% Just activate the package as usual: |\usepackage|\oarg{options}|{listlbls}|
+%
+% \DescribeOption{draft} If |draft| is given as option, |\listoflabels| will typeset the list of labels.
+%
+% \DescribeOption{final} If |final| is given as option, |\listoflabels| will do nothing.
+%
+% Then anywhere in your document, you can use the |\listoflabels|-macro to typeset a list of labels. An example can be seen on page \pageref{sec:lolabels}.
+%
+% \DescribeMacro{\label} Use |\label| as you are used to it!
+%
+% \DescribeMacro{\listoflabels} This macro will typeset the list of labels when this module is in draft mode.
+%
+%\StopEventually{^^A
+% \PrintChanges
+%
+% \PrintIndex
+%
+% \section{List of Labels}\label{sec:lolabels}
+% \listoflabels
+%}
+%
+% \section{Implementation}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% \begin{option}{draft}
+% \changes{1.01}{2014/07/25}{Added option}
+% Check for |draft|-option:
+% \begin{macrocode}
+\DeclareOption{draft}{\newcommand\@draftmode{true}}
+% \end{macrocode}
+% \end{option}
+% \begin{option}{final}
+% \changes{1.01}{2014/07/25}{Added option}
+% Check for |final|-option:
+% \begin{macrocode}
+\DeclareOption{final}{\let\@draftmode=\@undefined}
+% \end{macrocode}
+% \end{option}
+% Process the options:
+% \begin{macrocode}
+\ProcessOptions\relax
+% \end{macrocode}
+% \begin{macro}{\@findlabel}
+% No explanation yet.
+% \begin{macrocode}
+\long\def\@findlabel#1#2\@findlabel{%
+ \ifx\newlabel#1\lablist\expandafter{\the\lablist\@showlabel#2}\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@showlabel}
+% No explanation yet.
+% \begin{macrocode}
+\def\@showlabel#1#2{%
+ \par\noindent Label: \texttt{\detokenize{#1}}\dotfill\ref{#1} on page \pageref{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\newtoks\lablist
+\newread\zz
+\immediate\openin\zz=\jobname.aux
+\loop
+\ifeof\zz\else
+\read\zz to \tmp
+\expandafter\@findlabel\tmp\relax\@findlabel
+\repeat
+% \end{macrocode}
+% \begin{macrocode}
+\ifdefined\@draftmode
+% \end{macrocode}
+% \begin{macro}{\listoflabels}
+% Print a list of all available lables that are defined throughout the document.
+% \begin{macrocode}
+ \newcommand\listoflabels{%
+ \the\lablist}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\else
+ \let\listoflabels=\relax
+\fi
+\endinput
+%</package>
+% \end{macrocode}
+%\Finale
diff --git a/Master/texmf-dist/source/latex/listlbls/listlbls.ins b/Master/texmf-dist/source/latex/listlbls/listlbls.ins
new file mode 100644
index 00000000000..46ed4da88e1
--- /dev/null
+++ b/Master/texmf-dist/source/latex/listlbls/listlbls.ins
@@ -0,0 +1,74 @@
+%%
+%% This is file `listlbls.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% listlbls.dtx (with options: `install')
+%% ----------------------------------------------------------------
+%% listlbls --- Creates a list of all labels used throughout a document
+%% Author: Norbert Melzer
+%% E-mail: timmelzer@gmail.com
+%% License: Released under the LaTeX Project Public License v1.3c or later
+%% See: http://www.latex-project.org/lppl.txt
+%% ----------------------------------------------------------------
+%%
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\preamble
+----------------------------------------------------------------
+listlbls --- Creates a list of all labels used throughout a document
+Author: Norbert Melzer
+E-mail: timmelzer@gmail.com
+License: Released under the LaTeX Project Public License v1.3c or later
+See: http://www.latex-project.org/lppl.txt
+----------------------------------------------------------------
+
+\endpreamble
+\postamble
+
+Copyright (C) 2014 by Norbert Melzer <timmelzer@gmail.com>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License (LPPL), either
+version 1.3c of this license or (at your option) any later
+version. The latest version of this license is in the file:
+
+http://www.latex-project.org/lppl.txt
+
+This work is "maintained" (as per LPPL maintenance status) by
+Norbert Melzer.
+
+This work consists of the file listlbls.dtx and a Makefile.
+Running "make" generates the derived files README, listlbls.pdf and listlbls.sty.
+Running "make inst" installs the files in the user's TeX tree.
+Running "make install" installs the files in the local TeX tree.
+
+\endpostamble
+
+\usedir{tex/latex/listlbls}
+\generate{
+ \file{\jobname.sty}{\from{\jobname.dtx}{package}}
+}
+\endbatchfile
+%%
+%% Copyright (C) 2014 by Norbert Melzer <timmelzer@gmail.com>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License (LPPL), either
+%% version 1.3c of this license or (at your option) any later
+%% version. The latest version of this license is in the file:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status) by
+%% Norbert Melzer.
+%%
+%% This work consists of the file listlbls.dtx and a Makefile.
+%% Running "make" generates the derived files README, listlbls.pdf and listlbls.sty.
+%% Running "make inst" installs the files in the user's TeX tree.
+%% Running "make install" installs the files in the local TeX tree.
+%%
+%%
+%% End of file `listlbls.ins'.