diff options
Diffstat (limited to 'macros/latex/contrib/listlbls/listlbls.dtx')
-rw-r--r-- | macros/latex/contrib/listlbls/listlbls.dtx | 86 |
1 files changed, 62 insertions, 24 deletions
diff --git a/macros/latex/contrib/listlbls/listlbls.dtx b/macros/latex/contrib/listlbls/listlbls.dtx index 52da33c381..a52b55a6cf 100644 --- a/macros/latex/contrib/listlbls/listlbls.dtx +++ b/macros/latex/contrib/listlbls/listlbls.dtx @@ -120,17 +120,17 @@ Running "make install" installs the files in the local TeX tree. %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{listlbls} %<*package> - [2014/08/04 v1.03 Creates a list of all labels used throughout a document] + [2023/05/24 v1.04 Creates a list of all labels used throughout a document] %</package> %<*driver> \documentclass{ltxdoc} \usepackage{microtype} -\usepackage{libertine} -\usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry} -\usepackage{colordoc} +\usepackage{lmodern} +\usepackage{fontawesome5} +\usepackage[a4paper,margin=25mm,left=45mm,nohead]{geometry} \usepackage{multicol} -\usepackage{dox} -\doxitem{Option}{option}{option} +\usepackage[reportchangedates]{doc} +\usepackage{dtxdescribe} \usepackage[numbered]{hypdoc} \usepackage{xspace} \usepackage{nameref} @@ -140,6 +140,10 @@ Running "make install" installs the files in the local TeX tree. \CodelineIndex \RecordChanges \newcommand\TSE{\href{http://tex.stackexchange.com/}{\TeX-Stackexchange}\xspace} + +\newcommand\link[2]{\href{#1}{#2}\footnote{\nolinkurl{#1}}} +\newcommand\ghissue[3]{\link{https://github.com/#1/#2/issues/#3}{\faIcon{github}~#1/#2\##3}} +\newcommand\thisissue[1]{\ghissue{nobbz}{listlbls}{#1}} \begin{document} \DocInput{\jobname.dtx} \end{document} @@ -160,9 +164,11 @@ Running "make install" installs the files in the local TeX tree. %\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} -%\changes{v1.02}{2014/07/26}{Local option wins agains global option} +%\changes{v1.02}{2014/07/27}{Local option wins agains global option} %\changes{v1.02}{2014/07/27}{Added languag-support for English, German and French.} %\changes{v1.03}{2014/08/04}{Proceeding with namespacing internal macros} +%\changes{v1.04}{2023/05/24}{Fix build problems due to bitrotten dependencies} +%\changes{v1.04}{2023/05/24}{Switch back to lmodern for documentation} % \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. % @@ -183,8 +189,10 @@ Running "make install" installs the files in the local TeX tree. % \subsection{From Github}\label{ssec:inst-gh} % % \begin{enumerate} -% \item Check out the sourcecode from \href{https://github.com/}{GitHub}:\\ -% |git clone git@github.com:NobbZ/listlbls.git| +% \item Check out the sourcecode from \link{https://github.com/}{GitHub}:\\ +% |git clone https://github.com/NobbZ/nixos-config.git| or\\ +% |git clone git@github.com:NobbZ/listlbls.git| or\\ +% |gh repo clone NobbZ/listlbls| % \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>| @@ -240,9 +248,12 @@ Running "make install" installs the files in the local TeX tree. % % 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{special:listoflabels}. % -% \DescribeMacro{\label} Use |\label| as you are used to it! +% \DescribeMacro{\label} \marg{name} +% 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. It will itself register the label ``|special:listoflabels|''. +% \DescribeMacro{\listoflabels} \oarg{label} +% This macro will typeset the list of labels when this module is in draft mode. +% It will itself register the label from the optional arg, defaulting to ``|special:listoflabels|''. % %\StopEventually{^^A % \PrintChanges @@ -254,11 +265,11 @@ Running "make install" installs the files in the local TeX tree. % % \section{Contribution and bugreports}\label{sec:contribute} % -% If you have feature-requests or bug-reports, please feel free to report them on the \href{https://github.com/NobbZ/listlbls}{project page at GitHub}. +% If you have feature-requests or bug-reports, please feel free to report them on the \link{https://github.com/NobbZ/listlbls}{project page at GitHub}. % % If you want to contribute then follow these steps: % \begin{enumerate} -% \item Visit the \href{https://github.com/NobbZ/listlbls}{project page at GitHub}, +% \item Visit the \link{https://github.com/NobbZ/listlbls}{project page at GitHub}, % \item forkt it, % \item clone it to your local machine, % \item create a branch ``|feature/|\meta{feature name}'', @@ -268,6 +279,17 @@ Running "make install" installs the files in the local TeX tree. % \item and wait for approval. % \end{enumerate} % After approval your code will be merged to the |development|-branch and I will generally not accept pull-requests that edit |develop| directly. +% +% \section{Known issues and limitations}\label{sec:issues} +% \changes{v1.04}{2023/05/24}{Add issues and limitations section} +% +% \subsection{\texttt{\textbackslash{}include}}\label{ssec:issues-include} +% +% Documents containing |\include| will not work. +% Currently there is no logic to recurse through the different |.aux|-files. +% +% Please see \thisissue{4} for more information. +% % \section{Implementation}\label{sec:implementation} % % \begin{macrocode} @@ -280,7 +302,7 @@ Running "make install" installs the files in the local TeX tree. % \subsection{Options}\label{ssec:impl-options} % \begin{option}{draft} % \changes{v1.01}{2014/07/25}{Added option} -% \changes{v1.02}{2014/07/26}{Introduced @ifdraft} +% \changes{v1.02}{2014/07/27}{Introduced @ifdraft} % Check for |draft|-option: % \begin{macrocode} \DeclareOption{draft}{\llbls@drafttrue} @@ -288,21 +310,21 @@ Running "make install" installs the files in the local TeX tree. % \end{option} % \begin{option}{final} % \changes{v1.01}{2014/07/25}{Added option} -% \changes{v1.02}{2014/07/26}{Introduced @ifdraft} +% \changes{v1.02}{2014/07/27}{Introduced @ifdraft} % Check for |final|-option: % \begin{macrocode} \DeclareOption{final}{\llbls@draftfalse} % \end{macrocode} % \end{option} % \begin{option}{totoc} -% \changes{v1.02}{2014/07/26}{Added option} +% \changes{v1.02}{2014/07/27}{Added option} % Check for |totoc|-option: % \begin{macrocode} \DeclareOption{totoc}{\llbls@totoctrue} % \end{macrocode} % \end{option} % \begin{option}{notoc} -% \changes{v1.02}{2014/07/26}{Added option} +% \changes{v1.02}{2014/07/27}{Added option} % Check for |notoc|-option: % \begin{macrocode} \DeclareOption{notoc}{\llbls@totocfalse} @@ -368,14 +390,27 @@ Running "make install" installs the files in the local TeX tree. {llbls-onpage}% {\`a la page} % \end{macrocode} +% \subsubsection{Portuguese}\label{sssec:impl-i18n-pt} +% \changes{v1.04}{2023/05/24}{Add Portuguese translation} +% \begin{macrocode} +\DeclareTranslation{Portuguese}% + {llbls-listoflabels}% + {Lista de R\'{o}tulos} +\DeclareTranslation{Portuguese}% + {llbls-onpage}% + {na p\'{a}gina} +% \end{macrocode} % \subsection{Internal stuff}\label{ssec:impl-internal} % \begin{macro}{\llbls@headline}\begin{macro}{\llbls@toccommand}\begin{macro}{\llbls@tocgroup} % Determine if we have |\chapter|s or not and create a command that maps to |\chapter| or |\section| as needed. % \begin{macrocode} -\ifdefined\chapter* +\ifdefined\chapter \ifllbls@numtoc \def\llbls@headline{% - \chapter{List of Labels}\label{special:listoflabels}} +% \end{macrocode} +% We are using |\llbls@labelname| here and in the other possible definitions of |\llbls@headline| to be able to set the label name in the |\listoflabels| macro. +% \begin{macrocode} + \chapter{List of Labels}\label{\llbls@labelname}} \else \def\llbls@toccommand{\chapter*} \def\llbls@tocgroup{chapter} @@ -383,7 +418,7 @@ Running "make install" installs the files in the local TeX tree. \else \ifllbls@numtoc \def\llbls@headline{% - \section{List of Labels}\label{special:listoflabels}} + \section{List of Labels}\label{\llbls@labelname}} \else \def\llbls@toccommand{\section*} \def\llbls@tocgroup{section} @@ -392,7 +427,7 @@ Running "make install" installs the files in the local TeX tree. \ifdefined\llbls@headline\else \def\llbls@headline{% \llbls@toccommand{\GetTranslation{llbls-listoflabels}}% - \label{special:listoflabels}% + \label{\llbls@labelname}% \ifllbls@totoc% \addcontentsline{toc}% {\llbls@tocgroup}% @@ -428,7 +463,7 @@ Running "make install" installs the files in the local TeX tree. % \end{macro} % % \begin{macro}{\llbls@showlabel} -% \changes{v1.03}{2014/07/27}{Add support for nameref-package} +% \changes{v1.02}{2014/08/04}{Add support for nameref-package} % Displays a single entry in the |\listoflabels| % \begin{macrocode} \def\llbls@showlabel#1#2{% @@ -454,13 +489,16 @@ Running "make install" installs the files in the local TeX tree. \ifllbls@draft % \end{macrocode} % \begin{macro}{\listoflabels} +% \changes{v1.04}{2023/05/24}{add optional argument to change the name of the label used.} +% \begin{macro}{\llbls@labelname} % Print a list of all available lables that are defined throughout the document. % \begin{macrocode} - \newcommand\listoflabels{% + \newcommand{\listoflabels}[1][special:listoflabels]{% + \def\llbls@labelname{#1}% \llbls@headline% \the\llbls@lablist} % \end{macrocode} -% \end{macro} +% \end{macro}\end{macro} % \begin{macrocode} \else \let\listoflabels=\relax |