From ae89135e23ed84909287c5d84a2c38c044789b51 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 27 May 2023 03:00:50 +0000 Subject: CTAN sync 202305270300 --- macros/latex-dev/required/latex-lab/README.md | 2 +- .../latex-dev/required/latex-lab/TODOS-unsorted.md | 33 + .../latex-dev/required/latex-lab/blocks-code.pdf | Bin 864389 -> 878180 bytes macros/latex-dev/required/latex-lab/blocks-doc.pdf | Bin 439093 -> 439806 bytes macros/latex-dev/required/latex-lab/changes.txt | 37 + .../latex-lab/documentmetadata-support-code.pdf | Bin 517856 -> 518521 bytes .../latex-lab/documentmetadata-support-doc.pdf | Bin 382232 -> 382816 bytes .../required/latex-lab/latex-lab-amsmath.pdf | Bin 357221 -> 357654 bytes .../latex-dev/required/latex-lab/latex-lab-bib.dtx | 343 +++ .../latex-dev/required/latex-lab/latex-lab-bib.pdf | Bin 0 -> 372645 bytes .../required/latex-lab/latex-lab-block-tagging.dtx | 363 +++- .../required/latex-lab/latex-lab-block-tagging.pdf | Bin 864389 -> 878180 bytes .../required/latex-lab/latex-lab-float.dtx | 492 +++++ .../required/latex-lab/latex-lab-float.pdf | Bin 0 -> 442139 bytes .../required/latex-lab/latex-lab-footnotes.dtx | 4 +- .../required/latex-lab/latex-lab-footnotes.pdf | Bin 799900 -> 800608 bytes .../required/latex-lab/latex-lab-graphic.dtx | 1073 ++++++++++ .../required/latex-lab/latex-lab-graphic.pdf | Bin 0 -> 497477 bytes .../required/latex-lab/latex-lab-mathpkg.pdf | Bin 302106 -> 302484 bytes .../required/latex-lab/latex-lab-mathtagging.dtx | 5 +- .../required/latex-lab/latex-lab-mathtagging.pdf | Bin 608921 -> 609717 bytes .../required/latex-lab/latex-lab-mathtools.pdf | Bin 357221 -> 357654 bytes .../required/latex-lab/latex-lab-minipage.dtx | 202 ++ .../required/latex-lab/latex-lab-minipage.pdf | Bin 0 -> 277706 bytes .../required/latex-lab/latex-lab-new-or-1.dtx | 6 +- .../required/latex-lab/latex-lab-new-or-1.pdf | Bin 383590 -> 383733 bytes .../required/latex-lab/latex-lab-new-or-2.pdf | Bin 529680 -> 530325 bytes .../required/latex-lab/latex-lab-sec-tagging.dtx | 810 ------- .../required/latex-lab/latex-lab-sec-tagging.pdf | Bin 527032 -> 0 bytes .../latex-dev/required/latex-lab/latex-lab-sec.dtx | 818 +++++++ .../latex-dev/required/latex-lab/latex-lab-sec.pdf | Bin 0 -> 527427 bytes .../required/latex-lab/latex-lab-testphase.dtx | 7 +- .../required/latex-lab/latex-lab-testphase.pdf | Bin 296921 -> 297584 bytes .../latex-lab/latex-lab-toc-hyperref-changes.dtx | 6 +- .../latex-lab/latex-lab-toc-hyperref-changes.pdf | Bin 295610 -> 296379 bytes .../latex-lab/latex-lab-toc-kernel-changes.dtx | 11 +- .../latex-lab/latex-lab-toc-kernel-changes.pdf | Bin 341820 -> 342430 bytes .../latex-lab/latex-lab-toc-tagging-functions.dtx | 10 +- .../latex-lab/latex-lab-toc-tagging-functions.pdf | Bin 377979 -> 379057 bytes macros/latex-dev/required/latex-lab/latex-lab.ins | 34 +- .../required/latex-lab/usage-of-@footnotemark.md | 189 ++ .../required/latex-lab/usage-of-@footnotetext.md | 848 ++++++++ .../required/latex-lab/usage-of-@makefntext.md | 1751 +++++++++++++++ .../required/latex-lab/usage-of-kern-kern.md | 88 + macros/latex/contrib/covington/README | 11 +- macros/latex/contrib/covington/covington.pdf | Bin 513914 -> 520384 bytes macros/latex/contrib/covington/covington.sty | 31 +- macros/latex/contrib/covington/covington.tex | 186 +- macros/latex/contrib/hyperref/ChangeLog.txt | 8 + macros/latex/contrib/hyperref/README.md | 2 +- macros/latex/contrib/hyperref/doc/backref.pdf | Bin 206645 -> 206645 bytes macros/latex/contrib/hyperref/doc/hyperref-doc.css | 1 - .../latex/contrib/hyperref/doc/hyperref-doc.html | 2249 ++++++++++---------- macros/latex/contrib/hyperref/doc/hyperref-doc.pdf | Bin 319827 -> 321331 bytes macros/latex/contrib/hyperref/doc/hyperref-doc.tex | 179 +- .../contrib/hyperref/doc/hyperref-linktarget.pdf | Bin 439327 -> 440240 bytes macros/latex/contrib/hyperref/doc/hyperref.pdf | Bin 2360065 -> 2344173 bytes macros/latex/contrib/hyperref/doc/nameref.pdf | Bin 180085 -> 181585 bytes macros/latex/contrib/hyperref/hluatex.dtx | 4 +- .../latex/contrib/hyperref/hyperref-linktarget.dtx | 2 +- macros/latex/contrib/hyperref/hyperref-patches.dtx | 2 +- macros/latex/contrib/hyperref/hyperref.dtx | 373 +--- macros/latex/contrib/hyperref/hyperref.ins | 1 - macros/latex/contrib/hyperref/nameref.dtx | 94 +- macros/latex/contrib/hyperref/xr-hyper.sty | 64 +- macros/latex/contrib/msu-thesis/README.md | 2 +- .../latex/contrib/msu-thesis/docs/msu-thesis.tex | 17 +- macros/latex/contrib/msu-thesis/msu-thesis.cls | 13 +- macros/latex/contrib/msu-thesis/msu-thesis.pdf | Bin 109178 -> 114156 bytes .../samples/MSU-thesis-chapterbib-testfile.pdf | Bin 138559 -> 138593 bytes .../msu-thesis/samples/MSU-thesis-template.pdf | Bin 16293 -> 70914 bytes .../msu-thesis/samples/MSU-thesis-template.tex | 28 +- .../msu-thesis/samples/MSU-thesis-testfile.pdf | Bin 214045 -> 214046 bytes .../msu-thesis/samples/MSU-thesis-testfile.tex | 9 +- 74 files changed, 7917 insertions(+), 2491 deletions(-) create mode 100644 macros/latex-dev/required/latex-lab/TODOS-unsorted.md create mode 100644 macros/latex-dev/required/latex-lab/latex-lab-bib.dtx create mode 100644 macros/latex-dev/required/latex-lab/latex-lab-bib.pdf create mode 100644 macros/latex-dev/required/latex-lab/latex-lab-float.dtx create mode 100644 macros/latex-dev/required/latex-lab/latex-lab-float.pdf create mode 100644 macros/latex-dev/required/latex-lab/latex-lab-graphic.dtx create mode 100644 macros/latex-dev/required/latex-lab/latex-lab-graphic.pdf create mode 100644 macros/latex-dev/required/latex-lab/latex-lab-minipage.dtx create mode 100644 macros/latex-dev/required/latex-lab/latex-lab-minipage.pdf delete mode 100644 macros/latex-dev/required/latex-lab/latex-lab-sec-tagging.dtx delete mode 100644 macros/latex-dev/required/latex-lab/latex-lab-sec-tagging.pdf create mode 100644 macros/latex-dev/required/latex-lab/latex-lab-sec.dtx create mode 100644 macros/latex-dev/required/latex-lab/latex-lab-sec.pdf create mode 100644 macros/latex-dev/required/latex-lab/usage-of-@footnotemark.md create mode 100644 macros/latex-dev/required/latex-lab/usage-of-@footnotetext.md create mode 100644 macros/latex-dev/required/latex-lab/usage-of-@makefntext.md create mode 100644 macros/latex-dev/required/latex-lab/usage-of-kern-kern.md (limited to 'macros') diff --git a/macros/latex-dev/required/latex-lab/README.md b/macros/latex-dev/required/latex-lab/README.md index 53461372a3..ca44363c89 100644 --- a/macros/latex-dev/required/latex-lab/README.md +++ b/macros/latex-dev/required/latex-lab/README.md @@ -1,6 +1,6 @@ # LaTeX laboratory -Release 2023-06-01 pre-release 2 +Release 2023-06-01 pre-release 3 ## Overview diff --git a/macros/latex-dev/required/latex-lab/TODOS-unsorted.md b/macros/latex-dev/required/latex-lab/TODOS-unsorted.md new file mode 100644 index 0000000000..1e2771ae67 --- /dev/null +++ b/macros/latex-dev/required/latex-lab/TODOS-unsorted.md @@ -0,0 +1,33 @@ + +# A number of todos (unsorted and incomplete) + + +## Code extensions / cleanup + +### theorem-like envs + + - this can currently only handle the simple version from LaTeX2e + - it is missing a proper set of templates + - it is missing extensions to support different styles (a la amsmath and the like) + + +## Missing basic support + + - `\textbf` should probably mapt to `` + - `\emph` should probably map to `` + + - Logos such as `\TeX` and `\LaTeX` should produce proper ActualText + + + + +## Package Support + +### csquotes + + - we can't really grab TeX's basic quotes, e.g. + ``` + some quotes around ``text'' here +``` + at least not easily, but we can support `\enquote` and the like + diff --git a/macros/latex-dev/required/latex-lab/blocks-code.pdf b/macros/latex-dev/required/latex-lab/blocks-code.pdf index 300f15ecbf..26e27ee8ec 100644 Binary files a/macros/latex-dev/required/latex-lab/blocks-code.pdf and b/macros/latex-dev/required/latex-lab/blocks-code.pdf differ diff --git a/macros/latex-dev/required/latex-lab/blocks-doc.pdf b/macros/latex-dev/required/latex-lab/blocks-doc.pdf index ccff6f95eb..43851c76e7 100644 Binary files a/macros/latex-dev/required/latex-lab/blocks-doc.pdf and b/macros/latex-dev/required/latex-lab/blocks-doc.pdf differ diff --git a/macros/latex-dev/required/latex-lab/changes.txt b/macros/latex-dev/required/latex-lab/changes.txt index 853a06dc5f..baefa835e3 100644 --- a/macros/latex-dev/required/latex-lab/changes.txt +++ b/macros/latex-dev/required/latex-lab/changes.txt @@ -1,3 +1,40 @@ +2023-05-20 Ulrike Fischer + * renamed latex-lab-sec-tagging -> latex-lab-sec for consistency + + +2023-05-19 Ulrike Fischer + * new latex-lab-bib.dtx: + tagging support for cite and bibliography with standard LaTeX and natbib + * small corrections/adaptions in latex-lab-sec-tagging and latex-lab-toc-tagging + +2023-05-18 Ulrike Fischer + * new latex-lab-floats.dtx: + tagging support for float environments + * new latex-lab-graphic.dtx + tagging support for includegraphics and picture environment + * new latex-lab-minipage.dtx + tagging support for minipage and parbox + +2023-05-16 Frank Mittelbach + + * latex-lab-block-tagging.dtx (subsubsection{Verbatim instances}): + verbatim environments get their own block instances so that they can receive + special formatting instructions. + This also fixes a bug that we forgot to set par-skip to 0pt by default (tagpdf/74) + + (paragraph{Helper commands for verbatim}): + The \legacyverbatimsetup command needs to execute \@@par inside a group, because + we need to preserve any outer setup to \parshape (tagpdf/79) + +2023-04-09 Ulrike Fischer + * latex-lab-sec-tagging.dtx: + don't load extra glyphtounicode if \pdfglyphtounicode is not defined. + +2023-04-09 Ulrike Fischer + * latex-lab-footnotes.dtx: + made \footnote and \footnotetext long + + 2023-03-08 Frank Mittelbach * latex-lab-block-tagging.dtx: diff --git a/macros/latex-dev/required/latex-lab/documentmetadata-support-code.pdf b/macros/latex-dev/required/latex-lab/documentmetadata-support-code.pdf index f088c780ad..24e12ed18d 100644 Binary files a/macros/latex-dev/required/latex-lab/documentmetadata-support-code.pdf and b/macros/latex-dev/required/latex-lab/documentmetadata-support-code.pdf differ diff --git a/macros/latex-dev/required/latex-lab/documentmetadata-support-doc.pdf b/macros/latex-dev/required/latex-lab/documentmetadata-support-doc.pdf index 7f9430fe29..8922aaec6d 100644 Binary files a/macros/latex-dev/required/latex-lab/documentmetadata-support-doc.pdf and b/macros/latex-dev/required/latex-lab/documentmetadata-support-doc.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-amsmath.pdf b/macros/latex-dev/required/latex-lab/latex-lab-amsmath.pdf index 765870ac61..a302eebeb6 100644 Binary files a/macros/latex-dev/required/latex-lab/latex-lab-amsmath.pdf and b/macros/latex-dev/required/latex-lab/latex-lab-amsmath.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-bib.dtx b/macros/latex-dev/required/latex-lab/latex-lab-bib.dtx new file mode 100644 index 0000000000..20332d1c9e --- /dev/null +++ b/macros/latex-dev/required/latex-lab/latex-lab-bib.dtx @@ -0,0 +1,343 @@ +% \iffalse meta-comment +% +%% File: latex-lab-bib.dtx (C) Copyright 2023 LaTeX Project +% +% It 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 +% +% https://www.latex-project.org/lppl.txt +% +% +% The development version of the bundle can be found below +% +% https://github.com/latex3/latex2e/required/latex-lab +% +% for those people who are interested or want to report an issue. +% +%<*driver> +\documentclass{l3doc} +\EnableCrossrefs +\CodelineIndex +\begin{document} + \DocInput{latex-lab-bib.dtx} +\end{document} +% +% +% \fi +% +% \title{The \textsf{latex-lab-bib} package\\ +% Changes and additions to the kernel related to tagging and links in citations and +% bibliography entries} +% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}} +% \date{Version 0.80 2023-05-10} +% +% \maketitle +% +% \newcommand{\xt}[1]{\textsl{\textsf{#1}}} +% \newcommand{\TODO}[1]{\textbf{[TODO:} #1\textbf{]}} +% \newcommand{\docclass}{document class \marginpar{\raggedright document class +% customizations}} +% +% \providecommand\hook[1]{\texttt{#1}} +% +% \begin{abstract} +% \end{abstract} +% +% \section{Introduction} +% +% The followings contains small changes to improve tagging of +% bibliography entries and citations. +% +% The tagging of the bibliography is actually quite straightforward: +% A bibliography is typically a list with a heading and the sec and block tagging +% code handles that. +% +% There are here only two problems: +% +% \begin{itemize} +% \item The structure number of the \texttt{LI} element +% create by a \cs{bibitem} must be recorded somehow to allow to reference it in +% a \cs{cite}. +% \item \pkg{hyperref} redefines the item command and so breaks the list structure +% see \url{https://github.com/latex3/latex2e/discussions/1010#discussioncomment-5565418} +% \end{itemize} +% +% Both problems are rather easy to resolve, but it must be checked if other packages +% interfere again by redefining the commands. +% +% More difficult is the tagging of citation commands. Citations should be inside +% a Reference structure and contain a /Ref entry pointing to the relevant +% item in the bibliography. For simple citations like +% \enquote{[1]} or \enquote{Doody (2023)} this is easy, but it is not obvious how +% to handle combined citations like \enquote{Doody (2003,2018)} (or even compressed citations +% like \enquote{[1-3]}). The implementation follows here the links: whatever hyperref would +% link is set as the reference. +% +% An additional problem are the various packages trying to improve citation commands +% which all should be checked. Currently only natbib has been tried. +% +% The biblatex package isn't handled yet. +% +% +% \section{Implementation} +% \begin{macrocode} +%<*package> +%<@@=tag> +% \end{macrocode} +% \begin{macrocode} +\ProvidesExplPackage {latex-lab-testphase-bib} {2023-05-18} {0.8} + {Code related to the tagging of bibliography and cite command} +% \end{macrocode} +% We need at least the block tagging code. +% \begin{macrocode} +\RequirePackage{latex-lab-testphase-block-tagging} +% \end{macrocode} +% +% At first we suppress the patches from hyperref. This will only work with the next +% hyperref! +% \begin{macrocode} +\def\hyper@nopatch@bib{} +% \end{macrocode} + +% \begin{macro}{\@extra@binfo,\@extra@b@citeb} +% These are taken from hyperref, they are for chapterbib compability (and also +% signal to chapterbib not to change the citation commands) +% \begin{macrocode} +\providecommand*\@extra@binfo{}% +\providecommand\@extra@b@citeb{} +% \end{macrocode} +% \end{macro} +% +% \begin{variable}{\l_@@_bib_target_tl} +% Items should add a target, to avoid that user code +% interferes we don't rely on \cs{@currentHref} +% \begin{macrocode} +\tl_new:N\l_@@_bib_target_tl +% \end{macrocode} +% \end{variable} + +%\subsection{Handling the bibliography} +% \begin{macro}{\lbibitem} +% The item command if an optional argument is use. +% +% We only prepend some code. +% If we had already generic hooks with arguments +% we could probably use them \ldots +% \begin{macrocode} +\def\@lbibitem[#1]#2{% +% \end{macrocode} +% we store the target name for the following code. +% \begin{macrocode} + \tl_set:Nx\l_@@_bib_target_tl{cite.#2\@extra@b@citeb} +% \end{macrocode} +% The target is added at the begin of the paragraph. +% \begin{macrocode} + \AddToHookNext{para/begin}{\makebox[0pt][r]{\MakeLinkTarget*{\l_@@_bib_target_tl}\hspace{\leftmargin}}} + \item[\@biblabel{#1}\hfill]\if@filesw + {\let\protect\noexpand + \immediate + \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces} +% \end{macrocode} +% we make a copy to be able to reinstate the definition. This is e.g. +% currently needed with hyperref. +% \begin{macrocode} +\let\@kernel@copy@lbibitem\@lbibitem +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@bibitem} +% Similar for bibitem. +% TODO: If hyperref is loaded we will get a second target from the refstepcounter, +% but this is ignored for now. +% \begin{macrocode} +\def\@bibitem#1{ + \tl_set:Nx\l_@@_bib_target_tl{cite.#1\@extra@b@citeb}% + \AddToHookNext{para/begin}{\makebox[0pt][r]{\MakeLinkTarget*{\l_@@_bib_target_tl}\hspace{\leftmargin}}} + \item\if@filesw \immediate\write\@auxout + {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces} +\let\@kernel@copy@bibitem\@bibitem +% \end{macrocode} +% \end{macro} +% +% TODO The LI-structure should set a label, we redefine the internal command locally for +% now, but perhaps this need a receipe? +% +% \begin{macrocode} +\AddToHook{env/thebibliography/begin} + {\cs_set:Npn \__block_list_item_begin: + { \tagstructbegin{tag=\LItag,label=\l_@@_bib_target_tl}} + } +% \end{macrocode} +% +% \subsection{Handling citation commands} +% We redefine similar to hyperref the \cs{bibcite} command to inject link and +% structure. Even if it looks a bit odd it is now used for many years and so +% hopefully compatible with various packages. But differently to hyperref we use +% the new hooks with arguments. +% TODO: consider name. Perhaps use the generic names? +% \begin{macrocode} +\NewMirroredHookPairWithArguments{bibcite/before}{bibcite/after}{2} +\def\bibcite#1#2{% + \@newl@bel{b}{#1\@extra@binfo}{% + \UseHookWithArguments{bibcite/before}{2}{#1}{#2} + #2 + \UseHookWithArguments{bibcite/after}{2}{#1}{#2} + }% + }% +\let\@kernel@copy@bibcite\bibcite +% \end{macrocode} +% Now we add the tagging structure. +% TODO: the ref key should expand its argument directly! +% \begin{macrocode} +\AddToHookWithArguments{bibcite/before} + { + \tag_mc_end_push: + \exp_args:Nx\tagstructbegin{tag=Reference,ref=cite.#1\@extra@b@citeb} + \tagmcbegin{} + } +\AddToHookWithArguments{bibcite/after}[tag] + { + \tag_mc_end: + \tagstructend + \tag_mc_begin_pop:n{} + } +% \end{macrocode} +% At last the code for hyperref, the link will be inside the reference, but +% this can be changed with a rule. +% \begin{macrocode} +\AddToHook{package/hyperref/after} + { +% \end{macrocode} +% the next hyperref will allow to suppress the bib patches, but with older +% versions we muss reinstated them. +% \begin{macrocode} + \@ifpackagelater{hyperref}{2023-05-01}{} + { + \@ifpackageloaded{natbib}{} + {\let\@lbibitem\@kernel@copy@lbibitem + \let\@bibitem\@kernel@copy@bibitem + \let\bibcite\@kernel@copy@bibcite} + } + \AddToHookWithArguments{bibcite/before}{\hyper@linkstart{cite}{cite.#1\@extra@b@citeb}} + \AddToHookWithArguments{bibcite/after}{\hyper@linkend} + } +% \end{macrocode} +% +% \subsection{Natbib support} +% natbib offers various hooks that can be used. The main problem is +% to coordinate with the hyperref use of the same hooks. +% We also have to add something at the begin of \cs{@lbibitem}. +% As generic hooks with arguments aren't available yet, we have to copy the definition +% +% \begin{macrocode} +\AddToHook{package/natbib/after} + { + \def\hyper@natanchorstart#1{\MakeLinkTarget*{#1}} + \def\@lbibitem[#1]#2{% + \tl_set:Nx\l__tag_bib_target_tl{cite.#2\@extra@b@citeb} + \if\relax\@extra@b@citeb\relax\else + \@ifundefined{br@#2\@extra@b@citeb}{}{% + \@namedef{br@#2}{\@nameuse{br@#2\@extra@b@citeb}}% + }% + \fi + \@ifundefined{b@#2\@extra@b@citeb}{% + \def\NAT@num{}% + }{% + \NAT@parse{#2}% + }% + \def\NAT@tmp{#1}% + \expandafter\let\expandafter\bibitemOpen\csname NAT@b@open@#2\endcsname + \expandafter\let\expandafter\bibitemShut\csname NAT@b@shut@#2\endcsname + \@ifnum{\NAT@merge>\@ne}{% + \NAT@bibitem@first@sw{% + \@firstoftwo + }{% + \@ifundefined{NAT@b*@#2}{% + \@firstoftwo + }{% + \expandafter\def\expandafter\NAT@num\expandafter{\the\c@NAT@ctr}% + \@secondoftwo + }% + }% + }{% + \@firstoftwo + }% + {% + \global\advance\c@NAT@ctr\@ne + \@ifx{\NAT@tmp\@empty}{\@firstoftwo}{% + \@secondoftwo + }% + {% + \expandafter\def\expandafter\NAT@num\expandafter{\the\c@NAT@ctr}% + \global\NAT@stdbsttrue + }{}% + \bibitem@fin + \item[\hfil\NAT@anchor{#2}{\NAT@num}]% + \global\let\NAT@bibitem@first@sw\@secondoftwo + \NAT@bibitem@init + }% + {% + \NAT@anchor{#2}{}% + \NAT@bibitem@cont + \bibitem@fin + }% + \@ifx{\NAT@tmp\@empty}{% + \NAT@wrout{\the\c@NAT@ctr}{}{}{}{#2}% + }{% + \expandafter\NAT@ifcmd\NAT@tmp(@)(@)\@nil{#2}% + }% + }% +% \end{macrocode} +% we redefine the hook to use latex hooks. +% \begin{macrocode} + \NewMirroredHookPairWithArguments{natbib/linkstart}{natbib/linkend}{1} + \renewcommand\hyper@natlinkstart[1]{\UseHookWithArguments{natbib/linkstart}{1}{#1}} + \renewcommand\hyper@natlinkend{\UseHookWithArguments{natbib/linkend}{1}{}} + \AddToHookWithArguments{natbib/linkstart} + { + \leavevmode + \tag_mc_end_push: + \exp_args:Nx\tagstructbegin{tag=Reference,ref=cite.#1\@extra@b@citeb} + \tagmcbegin{} + } + \AddToHook{natbib/linkend} + { + \tag_mc_end: + \tagstructend + \tag_mc_begin_pop:n{} + } + } +% \end{macrocode} +% if hyperref is loaded we have to repeat the definition +% +% \begin{macrocode} +\AddToHook{package/hyperref/after} + { + \renewcommand\hyper@natlinkstart[1]{\UseHookWithArguments{natbib/linkstart}{1}{#1}} + \renewcommand\hyper@natlinkend{\UseHookWithArguments{natbib/linkend}{1}{}} + \AddToHookWithArguments{natbib/linkstart} + { + \Hy@backout{#1}% + \hyper@linkstart{cite}{cite.#1}% + \def\hyper@nat@current{#1} + } + \AddToHook{natbib/linkend} + { + \hyper@linkend + } + } +% \end{macrocode} +% \begin{macrocode} +% +% \end{macrocode} +% \begin{macrocode} +%<*latex-lab> +\ProvidesFile{bib-latex-lab-testphase.ltx} + [2023-05-18 v0.8 code related to the tagging of bib and citations] + +\RequirePackage{latex-lab-testphase-bib} + +% +% \end{macrocode} diff --git a/macros/latex-dev/required/latex-lab/latex-lab-bib.pdf b/macros/latex-dev/required/latex-lab/latex-lab-bib.pdf new file mode 100644 index 0000000000..f01786b536 Binary files /dev/null and b/macros/latex-dev/required/latex-lab/latex-lab-bib.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-block-tagging.dtx b/macros/latex-dev/required/latex-lab/latex-lab-block-tagging.dtx index 1a1dce3a64..124c51163c 100644 --- a/macros/latex-dev/required/latex-lab/latex-lab-block-tagging.dtx +++ b/macros/latex-dev/required/latex-lab/latex-lab-block-tagging.dtx @@ -26,8 +26,8 @@ % \fi % -\def\ltblocksversion{v0.8a} -\def\ltblocksdate{2023/03/08} +\def\ltblocksversion{v0.8c} +\def\ltblocksdate{2023/05/16} % % \title{Prototype reimplementation of \LaTeXe{}'s block environments using templates} @@ -1066,6 +1066,11 @@ \AddToHook{begindocument/before}{ \RenewDocumentEnvironment{verbatim}{ !O{} } { \UseInstance{blockenv}{verbatim} {#1} +% \end{macrocode} +% This is the part of the code where \env{verbatim} +% and\env{verbatim*} differ. +% \begin{macrocode} + \@setupverbinvisiblespace\frenchspacing\@vobeyspaces \@xverbatim } { \endblockenv } @@ -1088,7 +1093,15 @@ % % % \begin{macro}{\legacyverbatimsetup} -% +% +% This code resembles the \LaTeXe{} verbatim implementation with a +% slight twist: in \LaTeXe{} each code line was a paragraph using +% \cs{leftskip}=\cs{@totalleftmargin}. This was possible because +% the whole environment was implemented as a trivlist. As this is +% no longer the case setting \cs{leftskip} would alter the layout +% of a surrounding list. So instead we need to make sure that the +% paragraph end is executed in a group so that any parshape setup +% is preserved. % \begin{macrocode} %<@@=> \def\legacyverbatimsetup{% @@ -1096,10 +1109,10 @@ \@tempswafalse \def\par{% \if@tempswa - \leavevmode \null \@@par\penalty\interlinepenalty + \leavevmode \null {\@@par}\penalty\interlinepenalty \else \@tempswatrue - \ifhmode\@@par\penalty\interlinepenalty\fi + \ifhmode{\@@par}\penalty\interlinepenalty\fi \fi}% \let\do\@makeother \dospecials \obeylines \verbatim@font \@noligs @@ -1109,8 +1122,6 @@ % \begin{macrocode} \tl_set:Nn \l__tag_para_main_tag_tl {codeline} \tagtool{paratag=Code}% oder faster: \tl_set:Nn\l__tag_para_tag_tl{Code} - \@setupverbinvisiblespace - \frenchspacing \@vobeyspaces } %<@@=block> % \end{macrocode} @@ -1279,31 +1290,125 @@ % \subsubsection{Theorem-like environments} % % Theorem-like environments are defined in \LaTeX{} with the help of -% \cs{newtheorem} declarations. Internally they use a list with a -% single item. For now we keep this approach and only add appropriate -% tagging support wihtin the internal commands. -% +% \cs{newtheorem} declarations. Internally they used a list with a +% single item. Using lists was convenient back then, but in a tagged +% document you end up with a strange structure. We therefore alter the +% mechanism. % -% \begin{macro}{\@begintheorem,\@opargbegintheorem} % -% We use \struct{theorem-like} as the structure name and rollmap it -% to a list (\struct{L}). +% \begin{macro}{\newtheorem} +% This is a slightly streamlined version of \cs{newtheorem}, but it +% still uses a lot of the 2e code for now. Eventually this will change. % \begin{macrocode} -\tag_if_active:T { - \tagpdfsetup{add-new-tag={tag=theorem-like,role=L}} +\RenewDocumentCommand \newtheorem { m O{#1} m o } +{ + \expandafter\@ifdefinable\csname #1\endcsname + { + \str_if_eq:nnTF{#1}{#2} + { + \@definecounter {#2} + \IfNoValueTF {#4} + { % @ynthm + \tl_gset:cx { the #2 } + { + \@thmcounter{#2} + } + } + { % @xnthm + \@newctr{#1}[#4] + \tl_gset:cx { the #2 } + { + \expandafter\noexpand\csname the#4\endcsname + \@thmcountersep + \@thmcounter{#2} + } + } + } + { % @othm + \@ifundefined{c@#2} + { \@nocounterr{#2} } + { + \tl_gset:cn { the #1 } + { \UseName { the #2 } } + } + } + \global\@namedef{#1} { \@thm{#2}{#3} } + \global\@namedef{end#1}{ \@endtheorem } + } } % \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@begintheorem,\@opargbegintheorem} % -% With that done, we only have to tell the \env{trivlist} what -% \key{tag-name} it should use. +% The \cs{@thm} command expands to either \cs{@beginthorem} or +% \cs{@opargbegintheorem}. For the moment we stick with this as it +% will help with the transion. But instead of using a +% \env{trivlist} we use a blockenv and some tagging for the title +% (as a Caption). +% +% \begin{macrocode} +\def\@begintheorem#1#2{ + \UseInstance{blockenv}{theorem}{} + \tagpdfparaOff + \textbf{ + \tag_struct_begin:n{tag=Caption} + \tag_mc_begin:n {} + #1\ + \tag_mc_end: + \tag_struct_begin:n{tag=Lbl} + \tag_mc_begin:n {} + #2 + \tag_mc_end: + \tag_struct_end: + \tag_struct_end: + } + \tagpdfparaOn +% \end{macrocode} +% +% \begin{macrocode} + \@@_start_para_structure_unconditionally:n { \PARALABEL } +% \end{macrocode} +% +% \begin{macrocode} + \itshape + \hskip\labelsep + \ignorespaces +} +\def\@opargbegintheorem#1#2#3{ + \UseInstance{blockenv}{theorem}{} + \tagpdfparaOff + \textbf{ + \tag_struct_begin:n{tag=Caption} + \tag_mc_begin:n {} + #1\ + \tag_mc_end: + \tag_struct_begin:n{tag=Lbl} + \tag_mc_begin:n {} + #2 + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin:n {} + \ (#3) + \tag_mc_end: + \tag_struct_end: + } + \tagpdfparaOn +% \end{macrocode} +% +% \begin{macrocode} + \@@_start_para_structure_unconditionally:n { \PARALABEL } +% \end{macrocode} +% % \begin{macrocode} -\def\@begintheorem#1#2{\trivlist[tag-name=theorem-like]% - \item[\hskip \labelsep{\bfseries #1\ #2}]\itshape} + \itshape + \hskip\labelsep + \ignorespaces +} % \end{macrocode} % % \begin{macrocode} -\def\@opargbegintheorem#1#2#3{\trivlist[tag-name=theorem-like] - \item[\hskip \labelsep{\bfseries #1\ #2\ (#3)}]\itshape} +\def\@endtheorem{\endblockenv} % \end{macrocode} % \end{macro} % @@ -1569,15 +1674,24 @@ % So this is for now always done. Probably \cs{l_@@_topsepadd_skip} above % should be added only if the paragraph ends here and not if it % continues, so this need some further cleanup.\fmi{decide} + % \begin{macrocode} + \bool_if:NTF \l_@@_standalone_bool +% \end{macrocode} +% It is possible that \texttt{@endpe} is true because a +% displayblock has just ended before we end the standalone +% displayblock and in that casevthere is no outer +% \struct{text-unit} so we have to explicitly set \texttt{@endpe} +% back to false to prevent it from closing a structure later that +% isn't there. % \begin{macrocode} - \legacy_if_gset_true:n { @endpe } + { \legacy_if_gset_false:n { @endpe } } + { \legacy_if_gset_true:n { @endpe } } } % \end{macrocode} % % \end{macro} % % -% % \begin{macro}{\__kernel_displayblock_end:} % The kernel hook for tagging at the end of the block. % \begin{macrocode} @@ -1589,6 +1703,14 @@ % % % +% \begin{macro}{\l_@@_standalone_bool} +% +% \begin{macrocode} +\bool_new:N \l_@@_standalone_bool +\bool_set_false:N \l_@@_standalone_bool +% \end{macrocode} +% \end{macro} +% % % % @@ -2393,6 +2515,32 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\@@_recipe_standalone:} +% +% The \texttt{standalone} recipe produces a block that ensures that +% a previous \texttt{text-unit} ends and that after the block a new +% \texttt{text-unit} starts. +% \begin{macrocode} +\cs_new:Npn \@@_recipe_standalone: { + \cs_set_eq:NN \__kernel_displayblock_beginpar_hmode:w + \prg_do_nothing: + \cs_set_eq:NN \__kernel_displayblock_beginpar_vmode: + \prg_do_nothing: + \cs_set_eq:NN \__kernel_displayblock_begin: \@@_inner_begin: + \cs_set_eq:NN \__kernel_displayblock_end: \@@_inner_end: +% \end{macrocode} +% +% \begin{macrocode} + \bool_set_true:N \l_@@_standalone_bool +% \end{macrocode} +% +% \begin{macrocode} + \tl_if_empty:NTF \l_@@_tag_name_tl + { \tl_set:Nn \l_@@_tag_inner_tag_tl {Sect} } + { \tl_set_eq:NN \l_@@_tag_inner_tag_tl \l_@@_tag_name_tl } +} +% \end{macrocode} +% \end{macro} % % \begin{macro}{\@@_recipe_standard:} % The \texttt{standard} recipe does the following: @@ -2680,6 +2828,34 @@ % } % \end{macrocode} % + +% +% \begin{macrocode} +\DeclareInstance{blockenv}{theorem}{display} +{ + env-name = theorem-like, + tag-name = theorem-like, + tag-class = , + tagging-recipe = standalone, + inner-level-counter = , + level-increase = false, + setup-code = , + block-instance = displayblock , +% inner-instance-type = innerblock , +% inner-instance = theorem, +} +% \end{macrocode} +% +% We use \struct{theorem-like} as the structure name and rollmap it +% to a \struct{Sect} because that can hold a \struct{Caption}. +% \begin{macrocode} +\tag_if_active:T { + \tagpdfsetup{add-new-tag={tag=theorem-like,role=Sect}} +} +% \end{macrocode} +% +% +% % % \subsubsection{Verbatim instances} % @@ -2707,7 +2883,7 @@ inner-level-counter = , level-increase = false, setup-code = , - block-instance = displayblock , + block-instance = verbatimblock , inner-instance = , final-code = \legacyverbatimsetup , } @@ -2840,8 +3016,44 @@ \DeclareInstanceCopy{block}{displayblock-6}{displayblock-0} % \end{macrocode} % \end{instance} +% +% +% +% \subsubsection{Verbatim instances} +% +% Verbatim instances have there own levels so that one can specify +% specific indentations or vertical separations between line. % -% +% \begin{instance}{block verbatimblock-0, +% block verbatimblock-1, +% block verbatimblock-2, +% block verbatimblock-3, +% block verbatimblock-4, +% block verbatimblock-5, +% block verbatimblock-6 } +% +% \begin{macrocode} +\DeclareInstance{block}{verbatimblock-0}{display} + { + leftmargin = 0pt , + parindent = 0pt , + par-skip = 0pt , + } +% \end{macrocode} +% +% \begin{macrocode} +\DeclareInstanceCopy{block}{verbatimblock-1}{verbatimblock-0} +\DeclareInstanceCopy{block}{verbatimblock-2}{verbatimblock-0} +\DeclareInstanceCopy{block}{verbatimblock-3}{verbatimblock-0} +\DeclareInstanceCopy{block}{verbatimblock-4}{verbatimblock-0} +\DeclareInstanceCopy{block}{verbatimblock-5}{verbatimblock-0} +\DeclareInstanceCopy{block}{verbatimblock-6}{verbatimblock-0} +% \end{macrocode} +% \end{instance} +% +% +% +% % \subsubsection{Quote/quotationblock instances} % % Quote and quotation are not flattened, i.e., they change levels, @@ -2868,6 +3080,8 @@ % \end{macrocode} % \end{instance} % +% +% % \begin{instance}{block quotationblock-1, % block quotationblock-2, % block quotationblock-3, @@ -3147,7 +3361,6 @@ % then have to avoid adding another \texttt{text-unit}. % \begin{macrocode} { -% \typeout{-->G1~ (\int_use:N \l_@@_flattened_level_int)} \int_compare:nNnT \l_@@_flattened_level_int < 2 { \int_gincr:N \g__tag_para_main_begin_int @@ -3217,7 +3430,7 @@ \bool_if:NF \l__tag_para_flattened_bool { \@@_debug_typeout:n{Structure-end~ - \l__tag_para_main_tag_tl\space after~ list \on@line } + \l__tag_para_main_tag_tl\space after~ displayblock \on@line } \int_gincr:N \g__tag_para_main_end_int \tag_struct_end: %text-unit } @@ -3256,32 +3469,66 @@ % case we only start a new MC (because the \struct{text} tag is still open from % before the list --- one of the reasons why lists are always put % \enquote{inside} paragraphs. +% +% We do this in a separate command, because it is needed elsewhere too. % \begin{macrocode} - \@@_debug_typeout:n - { @endpe = \legacy_if:nTF { @endpe }{true}{false} - \on@line } - \legacy_if:nF { @endpe } - { - \bool_if:NF \l__tag_para_flattened_bool - { - \int_gincr:N \g__tag_para_main_begin_int - \tag_struct_begin:n{tag=\l__tag_para_main_tag_tl} - } - } - \int_gincr:N \g__tag_para_begin_int - \@@_debug_typeout:n{increment~ P \on@line } - \tag_struct_begin:n - { - tag=\l__tag_para_tag_tl - ,attribute-class=\l_tag_para_attr_class_tl - } - \__tag_check_para_begin_show:nn {green}{\PARALABEL} - \tag_mc_begin:n {} + \@@_start_para_structure:n { \PARALABEL } } } } % \end{macrocode} % +% +% \begin{macro}{\@@_start_para_structure:n} +% +% \begin{macrocode} +\cs_new_protected:Npn \@@_start_para_structure:n #1 { + \@@_debug_typeout:n + { @endpe = \legacy_if:nTF { @endpe }{true}{false} + \on@line } + \legacy_if:nF { @endpe } + { + \bool_if:NF \l__tag_para_flattened_bool + { + \int_gincr:N \g__tag_para_main_begin_int + \tag_struct_begin:n{tag=\l__tag_para_main_tag_tl} + } + } + \int_gincr:N \g__tag_para_begin_int + \@@_debug_typeout:n{increment~ P \on@line } + \tag_struct_begin:n + { + tag=\l__tag_para_tag_tl + ,attribute-class=\l_tag_para_attr_class_tl + } + \__tag_check_para_begin_show:nn {green}{#1} + \tag_mc_begin:n {} +} +% \end{macrocode} +% The same code, but without testing \texttt{@endpe}. This is not +% needed in the standalong e case and wrong inside lists. +% \begin{macrocode} +\cs_new_protected:Npn \@@_start_para_structure_unconditionally:n #1 { + \bool_if:NF \l__tag_para_flattened_bool + { + \int_gincr:N \g__tag_para_main_begin_int + \tag_struct_begin:n{tag=\l__tag_para_main_tag_tl} + } + \int_gincr:N \g__tag_para_begin_int + \@@_debug_typeout:n{increment~ P \on@line } + \tag_struct_begin:n + { + tag=\l__tag_para_tag_tl + ,attribute-class=\l_tag_para_attr_class_tl + } + \__tag_check_para_begin_show:nn {green}{#1} + \tag_mc_begin:n {} +} +% \end{macrocode} +% \end{macro} +% +% +% % \begin{macrocode} \tag_if_active:T { % \tagpdfsetup{add-new-tag={tag=text-unit,role=Part}} @@ -3400,25 +3647,7 @@ \cs_set:Npn \__kernel_list_label_after: { \bool_if:NT \l__tag_para_bool { - \bool_if:NF \l__tag_para_flattened_bool - { -% \typeout{-->G3} - \int_gincr:N \g__tag_para_main_begin_int - \tag_struct_begin:n{tag=\l__tag_para_main_tag_tl} - } - \int_gincr:N \g__tag_para_begin_int - \@@_debug_typeout:n{increment~ P \on@line } - \tag_struct_begin:n { - tag=\l__tag_para_tag_tl - ,attribute-class=\l_tag_para_attr_class_tl - } - \bool_if:NT \l__tag_para_show_bool - { - \tag_mc_begin:n {artifact} - \llap {\color_select:n {blue}\tiny Li-\int_use:N \g__tag_para_begin_int \ } - \tag_mc_end: - } - \tag_mc_begin:n {tag=P} + \@@_start_para_structure_unconditionally:n { LI- } } } % \end{macrocode} diff --git a/macros/latex-dev/required/latex-lab/latex-lab-block-tagging.pdf b/macros/latex-dev/required/latex-lab/latex-lab-block-tagging.pdf index 92be446ea7..46e660a451 100644 Binary files a/macros/latex-dev/required/latex-lab/latex-lab-block-tagging.pdf and b/macros/latex-dev/required/latex-lab/latex-lab-block-tagging.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-float.dtx b/macros/latex-dev/required/latex-lab/latex-lab-float.dtx new file mode 100644 index 0000000000..ed8b8390e2 --- /dev/null +++ b/macros/latex-dev/required/latex-lab/latex-lab-float.dtx @@ -0,0 +1,492 @@ +% \iffalse meta-comment +% +%% File: latex-lab-float.dtx (C) Copyright 2023 LaTeX Project +% +% It 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 +% +% https://www.latex-project.org/lppl.txt +% +% +% The development version of the bundle can be found below +% +% https://github.com/latex3/latex2e/required/latex-lab +% +% for those people who are interested or want to report an issue. +% +%<*driver> +\documentclass{l3doc} +\EnableCrossrefs +\CodelineIndex +\begin{document} + \DocInput{latex-lab-float.dtx} +\end{document} +% +% +% \fi +% +% +% \title{The \textsf{latex-lab-floats} package\\ +% Tagging of floats } +% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}} +% \date{v0.8 2023-05-17} +% +% \maketitle +% +% \newcommand{\xt}[1]{\textsl{\textsf{#1}}} +% \newcommand{\TODO}[1]{\textbf{[TODO:} #1\textbf{]}} +% \newcommand{\docclass}{document class \marginpar{\raggedright document class +% customizations}} +% +% \providecommand\hook[1]{\texttt{#1}} +% \begin{documentation} +% \begin{abstract} +% The following code implements a first draft for the tagging of float +% environments +% \end{abstract} +% +% +% \section{Introduction} +% +% The code here handle the tagging of float environments. +% +% Figures (and tables) are in \LaTeX{} typically typeset in float environments. +% These are boxes which can \emph{float} away to special float areas on the pages, +% e.g., to the top or the bottom of a page or to special float pages. +% If the rules allow it they can also be placed in the main text stream (\enquote{here}). +% Floats can also be collected at the end of the document. +% In either case the order within each type of floats +% (e.g., figures, tables, algorithms, etc.) is preserved. +% +% A special type, called a H-float, (provided by the float package) +% is always placed in the main text stream and does not +% necessarly preserve the order with normal floats of the same type: It is basically +% a minipage with a caption. +% +% Floats typically contain a figure (or a table, etc.) and a caption, +% but more complex constructions with subfigures, +% copyright statements, sources or additional description are possible too. +% +% In the \LaTeX{} source a float is normally more or less at the place of +% the first call-out, but when preparing a document for print the code +% is sometimes moved to place floats in a more visually pleasing way. +% +% \section{Tagging} +% +% Floats (with the exception of H-floats) do not belong into the text stream, they +% are \enquote{consultation objects}: Readers must be able to choose if and when they read the float. +% Floats have captions, the PDF rules require that a \texttt{Caption} is the first or last +% structure in its parent structure. +% This poses some challenges on a good tagging. +% +% In PDF~2.0 there is the suitable \texttt{Aside} tag which hopefully will +% be handled correctly regarding the reading order once processor actually support +% PDF~2.0. But in PDF~1.7 we rolemap it to \texttt{Note} and this doesn't lead to +% a good reading order. The code therefore collect the float structures and moves +% them to a \texttt{Sect} the end of the document or the chapter +% (H-floats once they are handled will not be moved). +% +% To fulfill the requirement that a \texttt{Caption} should be at the begin or end, we always +% move it to the begin of the structure. If a float has two captions the author +% has to insert a command which splits the float in two. +% +% Subfigures and subcaptions are currently not handled, but will be implemented +% as simple \texttt{Part} with their own \texttt{Caption}. +% +% \section{Links} +% The code disable the caption patches from hyperref. It will add an anchor at the +% begin of the float or a split. It changes caption so that a link to a caption label +% will go to the begin of the float. +% +% \section{Tools} +% +% The code add two keys for the \cs{tagtool} command +% +% \begin{description} +% \item[flush-floats] This will flush out the collected floats sofar (currently +% table and figure. The value is a sectioning level, e.g. \texttt{section} or \texttt{chapter}, +% the floats will then inserted as a \texttt{Sect} of this level (all \texttt{Sect} of smaller or equal +% level are closed). The key then starts a new container for following floats. +% If no value is given, the \texttt{Sect} is at the document level. The code automatically +% flush all open floats at the end of the document. +% +% \item[split-float] This can be used inside a float if there are two captions. +% It will only work reasonably well if the content of the float parts are in a sensible order +% and can be separated by this command. More complex setups with tabulars will need more +% thoughts +% +% \end{description} +% +% +% \begin{macrocode} +%<@@=tag> +%<*package> +% \end{macrocode} +% \end{documentation} +% \begin{implementation} +% \section{Implementation} +% \begin{macrocode} +\ProvidesExplPackage {latex-lab-testphase-float} {2023-04-28} {0.8} + {Code related to the tagging of floats} +% \end{macrocode} +% \subsection{Variables} +% We rolemap to Aside, and float sections to Sect +% +% \begin{macrocode} +\tagpdfsetup{add-new-tag=float/Aside} +\tagpdfsetup{add-new-tag=figures/Sect} +\tagpdfsetup{add-new-tag=tables/Sect} +% \end{macrocode} +% +% \begin{variable}{ +% \g_@@_float_sect_prop, +% \g_@@_float_types_seq +% } +% These variables will hold the structure number for the float container +% and the list of float types. Currently only figure and table are supported +% TODO: interface to declare new float types. +% \begin{macrocode} +\prop_new:N \g_@@_float_sect_prop +\seq_new:N \g_@@_float_types_seq +\seq_gput_right:Nn \g_@@_float_types_seq {figure} +\seq_gput_right:Nn \g_@@_float_types_seq {table} +% \end{macrocode} +% \end{variable} +% +% \begin{variable}{\g_@@_float_sect_bool} +% With this boolean float collection is switched on and off. +% Currently it is always on and set globally. +% TODO: think if an interface is needed. +% TODO: would a local variable make more sense? +% \begin{macrocode} +\bool_new:N \g_@@_float_sect_bool +\bool_gset_true:N \g_@@_float_sect_bool +% \end{macrocode} +% \end{variable} +% +% +%\subsection{Moving float structures} +% +% Currently it is for all float types or none. +% Probably we will need some more options here to select some float types. +% +% \begin{macro}{\@@_float_init_collect:} +% This initializes a container structure for every float type. +% It can be used more than once in a document, this allows to have e.g. +% chapter wise containers. +% \begin{macrocode} +\cs_new_protected:Npn\@@_float_init_collect: + { + \bool_if:NT\g_@@_float_sect_bool + { + \seq_map_inline:Nn\g_@@_float_types_seq + { + \tag_struct_begin:n{tag=##1s,stash} + \prop_gput:Nnx\g_@@_float_sect_prop {##1-struct}{\int_use:N\c@g__tag_struct_abs_int} + \tag_struct_end: + } + } + } +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\@@_float_stop_sect:} +% This pushes out the floats. For every type is checks if there is actually +% a float of this type and then writes out the container structure. +% \begin{macrocode} +\cs_new_protected:Npn \@@_float_stop_sect: + { + \bool_if:NT\g_@@_float_sect_bool + { + \seq_map_inline:Nn\g_@@_float_types_seq + { + \prop_get:NnNT\g_@@_float_sect_prop{##1-used}\l_@@_tmpa_tl + { + \exp_args:Ne + \tag_struct_use_num:n{\prop_item:Nn\g_@@_float_sect_prop{##1-struct}} + \prop_gremove:Nn \g_@@_float_sect_prop{##1-used} + } + } + } + } +% \end{macrocode} +% \end{macro} + +% \begin{macro}{flush-floats} +% This is a key for \cs{tagtool} to flush out the collected floats. +% The value allows to set to which level the create Sect contains. +% So \texttt{section} will close all previous Sect until the section level +% and create a new section. +% \begin{macrocode} +\keys_define:nn { tag / tool} + { + flush-floats .code:n = + { + \keys_set:nn {tag / tool} {sec-stop=#1} + \@@_float_stop_sect: + \@@_float_init_collect: + }, + flush-float .default:n = Document + } +% \end{macrocode} +% \end{macro} +% We need at least one pair +% \begin{macrocode} +\AddToHook{begindocument/end}[latex-lab/float] + {\@@_float_init_collect:} +\AddToHook{tagpdf/finish/before}[latex-lab/float] + {\par\__tag_sec_end:n{-10}\@@_float_stop_sect:} +\DeclareHookRule{tagpdf/finish/before}{latex-lab/float}{before}{tagpdf} +% \end{macrocode} +% \subsection{Splitting floats} +% \begin{macro}{split-float} +% TODO: check if the target affect spacing!! +% \begin{macrocode} +\keys_define:nn { tag / tool} + { + split-float .code:n = + { + \@@_float_end: + \@@_float_begin: + \MakeLinkTarget[tagstructure]{g__tag_struct_abs_int} + } + } +% \end{macrocode} +% \end{macro} + +% \subsection{Patching} +% \begin{macro}{\@@_float_stop_par:,\@@_float_start_par:} +% if a float is in a par, we need commands to stop and restart the P-mc +% \begin{macrocode} +\cs_new_protected:Npn \@@_float_stop_par: + { + \tag_mc_end: + \bool_if:NF \g_@@_float_sect_bool + { + \tag_struct_end: + } + } +\cs_new_protected:Npn \@@_float_start_par: + { + \bool_if:NF \g_@@_float_sect_bool + { + \tag_struct_begin:n{tag=text}% + } + \tag_mc_begin:n{tag=P} + } + +% \end{macrocode} +% \end{macro} +% These commands are the main commands to start and end the float tagging. +% +% \begin{macrocode} +\cs_new_protected:Npn \@@_float_begin: + {% +% \end{macrocode} +% We test if the float structure should be included directly or move to a dedicated section. +% \begin{macrocode} + \bool_if:NTF\g_@@_float_sect_bool + { + \exp_args:Ne + \tag_struct_begin:n{tag=float,parent=0\prop_item:No\g_@@_float_sect_prop{\@captype-struct}}% + \prop_gput:Nxx \g_@@_float_sect_prop {\@captype-used}{true} + } + { + \tag_struct_begin:n{tag=float} + } + \tl_set:Nx\@current@float@struct{\tag_get:n{struct_num}}% + \typeout{Float structure: \@current@float@struct} + } + +\cs_new_protected:Npn\@@_float_end:{\tag_struct_end:} %end Aside + +% \end{macrocode} +% This patches the main command \cs{@xfloat}. +% There is a : in the code, so we disable expl3 syntax +% \begin{macrocode} +\ExplSyntaxOff +\def\@xfloat #1[#2]{% + \@nodocument + \def \@captype {#1}% + \def \@fps {#2}% + \@onelevel@sanitize \@fps + \def \reserved@b {!}% + \ifx \reserved@b \@fps + \@fpsadddefault + \else + \ifx \@fps \@empty + \@fpsadddefault + \fi + \fi + \ifhmode + \@bsphack +% \end{macrocode} +% If the float is in hmode we have to interrupt the P +% \begin{macrocode} + \@nameuse{@@_float_stoppar:} %<---end P + \@floatpenalty -\@Mii + \else + \@floatpenalty-\@Miii + \fi + \ifinner + \@parmoderr\@floatpenalty\z@ + \else + \@next\@currbox\@freelist + {% + \@tempcnta \sixt@@@@n + \expandafter \@tfor \expandafter \reserved@a + \expandafter :\expandafter =\@fps + \do + {% + \if \reserved@a h% + \ifodd \@tempcnta + \else + \advance \@tempcnta \@ne + \fi + \else\if \reserved@a t% + \@setfpsbit \tw@ + \else\if \reserved@a b% + \@setfpsbit 4% + \else\if \reserved@a p% + \@setfpsbit 8% + \else\if \reserved@a !% + \ifnum \@tempcnta>15 + \advance\@tempcnta -\sixt@@@@n\relax + \fi + \else + \@latex@error{Unknown float option `\reserved@a'}% + {Option `\reserved@a' ignored and `p' used.}% + \@setfpsbit 8% + \fi\fi\fi\fi\fi + }% + \@tempcntb \csname ftype@\@captype \endcsname + \multiply \@tempcntb \@xxxii + \advance \@tempcnta \@tempcntb + \global \count\@currbox \@tempcnta + }% + \@fltovf + \fi +% \end{macrocode} +% This starts the structure for the float. +% \begin{macrocode} + \@nameuse{@@_float_begin:}% + \global \setbox\@currbox + \color@vbox + \normalcolor + \vbox \bgroup + \hsize\columnwidth + \@parboxrestore + \@floatboxreset +% \end{macrocode} +% We add a target for links. TODO: check that it doesn't affect spacing!! +% \begin{macrocode} + \MakeLinkTarget[tagstructure]{g__tag_struct_abs_int}% +}% +% \end{macrocode} +% The end code of the float ... +% \begin{macrocode} +\def\end@float{% + \@endfloatbox + \@nameuse{@@_float_end:}% + \ifnum\@floatpenalty <\z@ + \@largefloatcheck + \@cons\@currlist\@currbox + \ifnum\@floatpenalty <-\@Mii + \penalty -\@Miv + \@tempdima\prevdepth + \vbox{}% + \prevdepth\@tempdima + \penalty\@floatpenalty + \else + \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack + \@nameuse{@@_float_start_par:} %restart P safe here?? + \fi + \fi +} +\ExplSyntaxOn +% \end{macrocode} +% +% \subsection{Handling captions} +% +% To avoid that hyperref interferes we disable its patches: +% \begin{macrocode} +\def\hyper@nopatch@caption{} +% \end{macrocode} +% As we will use the structure number in the target, we need to provide a +% theH-representation. (Once the kernel will create +% theH-representation generally this will be provided automatically, as tagpdf uses +% \cs{newcounter}) +% \begin{macrocode} +\providecommand\theHg__tag_struct_abs_int{\int_use:N\c@g__tag_struct_abs_int} +% \end{macrocode} + +% \begin{macro}{\@makecaption} +% \cs{@makecaption} is defined by the classes so we overwrite it for now +% at begin document. +% \begin{macrocode} +\AddToHook{begindocument} + { + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \xdef\@currentHref{tagstructure.\@current@float@struct}% +% \end{macrocode} +% we don't want tagging when storing the caption for the singleline check +% \begin{macrocode} + \tag_stop:n{caption} + \sbox\@tempboxa{#1:~#2}% + \tag_start:n{caption} +% \end{macrocode} +% we stop paratagging. TODO: check +% \begin{macrocode} + \tagtool{para=false} + \tag_struct_begin:n{tag=Caption,parent=\@current@float@struct} +% \end{macrocode} +% move the caption to the begin of the float structure: +% \begin{macrocode} + \seq_gpop_right:cN {g__tag_struct_kids_\@current@float@struct _seq}\l_@@_tmpa_tl + \seq_gput_left:cV {g__tag_struct_kids_\@current@float@struct _seq}\l_@@_tmpa_tl + \ifdim \wd\@tempboxa >\hsize + \tag_struct_begin:n{tag=Lbl} + \tag_mc_begin:n{} + #1:~ + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin:n{} + #2\par + \tag_mc_end: + \else +% \end{macrocode} +% we don't reuse the box as it doesn't contain tagging, but set the text explicitly. +% \begin{macrocode} + \global \@minipagefalse + \hb@xt@\hsize{\hfil + \tag_struct_begin:n{tag=Lbl} + \tag_mc_begin:n{} + #1:~ + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin:n{} + #2\par + \tag_mc_end:\hfil}% + \fi + \tag_struct_end: %caption + \vskip\belowcaptionskip} + } +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +% +% \end{macrocode} + +% \begin{macrocode} +%<*latex-lab> +\ProvidesFile{float-latex-lab-testphase.ltx} + [2023-04-30 v0.8 code related to the tagging of floats] +\RequirePackage{latex-lab-testphase-float} +% +% \end{macrocode} +% \end{implementation} diff --git a/macros/latex-dev/required/latex-lab/latex-lab-float.pdf b/macros/latex-dev/required/latex-lab/latex-lab-float.pdf new file mode 100644 index 0000000000..120baf04fc Binary files /dev/null and b/macros/latex-dev/required/latex-lab/latex-lab-float.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-footnotes.dtx b/macros/latex-dev/required/latex-lab/latex-lab-footnotes.dtx index 29261a594b..4c8c9b73a6 100644 --- a/macros/latex-dev/required/latex-lab/latex-lab-footnotes.dtx +++ b/macros/latex-dev/required/latex-lab/latex-lab-footnotes.dtx @@ -1324,7 +1324,7 @@ % % \begin{macro}{\footnotetext} % \begin{macrocode} -\DeclareDocumentCommand\footnotetext {om} +\DeclareDocumentCommand\footnotetext {o+m} { \fnote_set_fnmark:nn {#1} \@mpfn \@footnotetext {#2} @@ -1335,7 +1335,7 @@ % % \begin{macro}{\footnote} % \begin{macrocode} -\DeclareDocumentCommand\footnote {om} +\DeclareDocumentCommand\footnote {o+m} { \fnote_step_fnmark:nn {#1} \@mpfn \cs_set_eq:NN \@@_footnotemark_finish: \prg_do_nothing: diff --git a/macros/latex-dev/required/latex-lab/latex-lab-footnotes.pdf b/macros/latex-dev/required/latex-lab/latex-lab-footnotes.pdf index de5dbb1e21..4012dd031a 100644 Binary files a/macros/latex-dev/required/latex-lab/latex-lab-footnotes.pdf and b/macros/latex-dev/required/latex-lab/latex-lab-footnotes.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-graphic.dtx b/macros/latex-dev/required/latex-lab/latex-lab-graphic.dtx new file mode 100644 index 0000000000..f9457e0524 --- /dev/null +++ b/macros/latex-dev/required/latex-lab/latex-lab-graphic.dtx @@ -0,0 +1,1073 @@ +% \iffalse meta-comment +% +%% File: latex-lab-graphic.dtx (C) Copyright 2022-2023 LaTeX Project +% +% It 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 +% +% https://www.latex-project.org/lppl.txt +% +% +% The development version of the bundle can be found below +% +% https://github.com/latex3/latex2e/required/latex-lab +% +% for those people who are interested or want to report an issue. +% +%<*driver> +\documentclass{l3doc} +\EnableCrossrefs +\CodelineIndex +\begin{document} + \DocInput{latex-lab-graphic.dtx} +\end{document} +% +% +% \fi +% +% +% \title{The \textsf{latex-lab-graphic} package\\ +% Tagging of included graphics } +% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}} +% \date{v0.8 2023-04-07} +% +% \maketitle +% +% \newcommand{\xt}[1]{\textsl{\textsf{#1}}} +% \newcommand{\TODO}[1]{\textbf{[TODO:} #1\textbf{]}} +% \newcommand{\docclass}{document class \marginpar{\raggedright document class +% customizations}} +% +% \providecommand\hook[1]{\texttt{#1}} +% \begin{documentation} +% \begin{abstract} +% The following code implements a first draft for the tagging of graphics +% included with \cs{includegraphics}. +% \end{abstract} +% +% +% \section{Introduction} +% +% The code here handle the tagging of pictures included with \cs{includegraphics} +% and the picture environment. Pictures drawn with \texttt{l3draw} or \texttt{tikz} +% or similar packages aren't handled yet. +% +% Tagging of graphics included with \cs{includegraphics} is at a first glance trivial: +% They are either only decorations, in which case they should be in a \texttt{artifact} +% MC-chunk or (in pdf 2.0) tagged as an \texttt{Artifact} structure, +% or they are meaningful and then they should be tagged as a \texttt{Figure}. +% Such a graphic is a simple box and no other content can interfere so adding the +% structure commands shouldn't pose much problems. +% +% But things are actually not so easy. +% +% At first there are two ways to add a graphic +% to a structure: similar to text as a marked content item (by surrounding +% it with \cs{tagmcbegin} and \cs{tagmcend}) or by referencing the XObject +% with an OBJR object (similar to a link annotation). Which method is more sensible +% (and if it actually matters) is unknown but should be tested. +% Currently the first method is used as the second require changes in the backend files. +% +% +% At second---and this is actually a \emph{much} larger problem---a +% \texttt{Figure} structure should have an attribute with an \texttt{BBox} entry. +% The value of a \texttt{BBox} is an array of four numbers that gives the +% coordinates of the left, bottom, right, and top edges +% of the structure element’s bounding box. That is the rectangle that completely encloses +% its \emph{visible} content so not necessarly the TeX bounding box: +% if \texttt{viewport} or \texttt{trim} is used and the +% graphic is not clipped, the visible content can be larger. +% +% Getting the \texttt{BBox} is quite straightforward for a graphic that is +% used once as is. But graphics can be trimmed, scaled, reflected, rotated and reused +% in various ways. This transformations typically involve a mix of \TeX{} commands +% like shifting a box or changing the bounding box and backend commands like +% inserting a pdfliteral with a transformation matrix and +% and not in all cases getting the \texttt{BBox} is possible +% without rewriting large parts of the graphics/x packages. Problematic are +% \begin{itemize} +% \item manipulations through external box commands +% (\cs{rotatebox}, \cs{reflectbox}, \cs{scalebox}). The current implementation +% in the graphics/x packages do not pass the transformation matrix in way +% that allows to track the changes for the \texttt{BBox} +% of an included graphic: sometimes +% the values are set to late (after the box is already stored), and often the +% values are not grouped and can leak out from earlier uses of the commands. +% +% \item some combination of keys in the optional argument of \cs{includegraphics}. +% Examples are \texttt{origin} and multiple calls to \texttt{scale} +% and \texttt{angle}) as they internally call the box commands. +% Examples of failing combinations can be found in the test file +% \texttt{graphic-faults}. +% +% \item graphics that are stored in a box and reused: to get the \texttt{BBox} +% one has to set a label that stores the position with \cs{pdfsavepos}, +% and if a box is reused one gets multiply defined labels. +% One possible solution here is to make +% use of the new delayed \cs{pdfliteral}. It allows to change the label names +% in the shipout, but this requires careful tracking the box usages +% and so various kernel changes. +% \end{itemize} +% +% +% +% \section{Restrictions and Todos} +% Correct tagging is currently +% implemented only for simple \cs{includegraphics} and the keys +% \texttt{viewport}, \texttt{trim}, +% \texttt{scale} and \texttt{angle} (used at most once). +% +% Not supported +% \begin{itemize} +% \item graphics inside \cs{rotatebox}, \cs{reflectbox}, \cs{scalebox}. +% +% TODO: A new implementation with \texttt{l3graphics} and \texttt{l3box} is +% probably needed here. +% +% \item multiple uses of the \texttt{scale} and \texttt{angle} keys +% +% \item multiple use of graphics stored in boxes. For such graphics automated tagging +% should be probably deactivated when storing the content +% and tagging should be added around the \cs{usebox}. (How to +% proceed when content is saved in boxes needs generally more testing). +% \end{itemize} +% +% +% \section{Additional keys} +% The code defines additional keys for \cs{includegraphics}: +% +% \begin{description} +% \item[\texttt{tag}] with the values +% \begin{description} +% \item[\texttt{artifact}] When used the graphic will be tagged as artifact. This doesn't +% require a \texttt{BBox} and so works also in some of the not yet supported cases described +% above. +% \item[\texttt{false}] When used tagging will be stopped completly. It is then the +% responsability of the surrounding code to add appropriate tagging commands. +% \item[\meta{name}] Other values will be used as tag names in the structure. If the tag is not +% known as a structure tag you will get an warning from tagpdf. The default name is currently +% \texttt{Figure} +% \end{description} +% \item[\texttt{actualtext}] This allows to add an /ActualText to the structure. +% This is useful for small graphics that represent single chars or a short word like a +% logo. If \texttt{actualtext} is used, the graphics is not enclosed in \texttt{Figure} +% structure but in a \texttt{Span} structure and no \texttt{/BBox} attribute is added. +% This in accordance with (the draft of) PDF/UA-2 but violates perhaps PDF/UA-1. +% \item[\texttt{correct-BBox}] If the calculated \texttt{/BBox} values are wrong +% they can be correct with this key. It expects four dimensions that are added to the +% \texttt{/BBox} values. +% \item[\texttt{debug}] The value \texttt{BBox} will show the calculated \texttt{/BBox} +% as a half transparent red rectangle. +% \end{description} +% +% The code also redefines the \texttt{alt} key to actually add its values +% as an alternative text. If no \texttt{alt} value is given, a warning is issued +% and the file name of the graphic is used. +% +% \begin{macrocode} +%<@@=tag> +%<*package> +% \end{macrocode} +% \end{documentation} +% \begin{implementation} +% \section{Implementation} +% \begin{macrocode} +\ProvidesExplPackage {latex-lab-testphase-graphic} {2023-04-07} {0.8} + {Code related to the tagging of graphics} +% \end{macrocode} +% We load l3opacity for the debug code +% \begin{macrocode} +\RequirePackage{l3opacity} +% \end{macrocode} +% +%\subsection{Saving the position} +% We need a replacement for zref-savepos. This uses l3ref which loaded +% by the pdfmanagement/tagpdf. +% +% TODO: this is perhaps needed in other places too and should be moved to +% l3ref!! +% \begin{macrocode} +\ref_attribute_gset:nnnn{xpos}{0}{shipout}{\int_use:N\tex_lastxpos:D} +\ref_attribute_gset:nnnn{ypos}{0}{shipout}{\int_use:N\tex_lastypos:D} +% \end{macrocode} + +% \begin{macro}{\@@_graphic_savepos:n} +% this is the command which stores the position. It uses +% two savepos in case bidi needs it (see zref-savepos). +% \begin{macrocode} +\cs_new_protected:Npn\@@_graphic_savepos:n #1 + { + \tex_savepos:D + \ref_label:nn{#1}{xpos,ypos,abspage} + \tex_savepos:D + } +\cs_generate_variant:Nn \@@_graphic_savepos:n {e} +% \end{macrocode} +% \end{macro} +% +% \subsection{Variables} +% \begin{variable}{\l_@@_graphic_debug_bool} +% A boolean for debug code +% \begin{macrocode} +\bool_new:N \l_@@_graphic_debug_bool +\keys_define:nn { document / metadata } + { + debug / BBox .code:n = { \bool_set_true:N \l_@@_graphic_debug_bool } + } +% \end{macrocode} +% \end{variable} +% \begin{variable}{\g_@@_graphic_int} +% This is used to get unique labels in the savepos code. +% \begin{macrocode} +\int_new:N\g_@@_graphic_int +% \end{macrocode} +% \end{variable} + +% \begin{variable} +% { +% \g_@@_graphic_lx_tl, +% \g_@@_graphic_ly_tl, +% \g_@@_graphic_ux_tl, +% \g_@@_graphic_uy_tl, +% \l_@@_graphic_bboxcorr_seq +% \l_@@_graphic_bboxcorr_bool +% } +% This commands will hold the calculated BBox values. Local variables +% would probably work too, but global variables can be easier retrieved +% in tests and debugging code ... +% \begin{macrocode} +\tl_new:N \g_@@_graphic_lx_tl +\tl_new:N \g_@@_graphic_ly_tl +\tl_new:N \g_@@_graphic_ux_tl +\tl_new:N \g_@@_graphic_uy_tl +\seq_new:N\l_@@_graphic_bboxcorr_seq +\bool_new:N\l_@@_graphic_bboxcorr_bool +% \end{macrocode} +% \end{variable} +% \begin{variable}{\l_@@_graphic_currentlabel_tl} +% This holds the label name of the savepos. +% \begin{macrocode} +\tl_new:N \l_@@_graphic_currentlabel_tl +% \end{macrocode} +% \end{variable} + +% \begin{variable} +% { +% \l_@@_graphic_alt_tl, +% \l_@@_graphic_alt_dft_tl, +% \l_@@_graphic_actual_tl, +% \l_@@_graphic_struct_tl, +% \l_@@_graphic_artifact_bool, +% \l_@@_graphic_BBox_bool +% } +% Variables for the alt text, the actualtext and the structure tag. +% \begin{macrocode} +\tl_new:N \l_@@_graphic_alt_tl +\tl_new:N \l_@@_graphic_alt_dflt_tl +\tl_set:Nn \l_@@_graphic_alt_dflt_tl {\Gin@base\Gin@ext} +\tl_new:N \l_@@_graphic_actual_tl +\tl_new:N \l_@@_graphic_struct_tl +\tl_set:Nn\l_@@_graphic_struct_tl {Figure} +\bool_new:N\l_@@_graphic_artifact_bool +\bool_new:N\l_@@_graphic_BBox_bool +\bool_set_true:N\l_@@_graphic_BBox_bool +% \end{macrocode} +% \end{variable} + +% \begin{variable} +% { +% \l_@@_graphic_sin_fp +% ,\l_@@_graphic_cos_fp +% ,\l_@@_graphic_scale_fp +% ,\l_@@_graphic_lxly_fp +% ,\l_@@_graphic_lxuy_fp +% ,\l_@@_graphic_uxly_fp +% ,\l_@@_graphic_uxuy_fp +% ,\l_@@_graphic_ux_fp +% ,\l_@@_graphic_ly_fp +% ,\l_@@_graphic_lx_fp +% ,\l_@@_graphic_uy_fp +% ,\l_@@_graphic_trim_ux_fp +% ,\l_@@_graphic_trim_ly_fp +% ,\l_@@_graphic_trim_lx_fp +% ,\l_@@_graphic_trim_uy_fp +% } +% A bunch of fp-variables (we don't use tl-vars, +% to avoid to have to take care about minus signs everwhere) +% \begin{macrocode} +\fp_new:N\l_@@_graphic_sin_fp +\fp_new:N\l_@@_graphic_cos_fp +\fp_new:N\l_@@_graphic_lxly_fp +\fp_new:N\l_@@_graphic_lxuy_fp +\fp_new:N\l_@@_graphic_uxly_fp +\fp_new:N\l_@@_graphic_uxuy_fp +\fp_new:N\l_@@_graphic_ux_fp +\fp_new:N\l_@@_graphic_ly_fp +\fp_new:N\l_@@_graphic_lx_fp +\fp_new:N\l_@@_graphic_uy_fp +% \end{macrocode} +% this holds the scale value. Currently this only the one from +% \cs{Gin@scalex} +% \begin{macrocode} +\fp_new:N\l_@@_graphic_scale_fp +% \end{macrocode} +% the follow variables hold the four trim values (or the equivalent calculated +% values if viewport is used. +% \begin{macrocode} +\fp_new:N\l_@@_graphic_trim_ux_fp +\fp_new:N\l_@@_graphic_trim_ly_fp +\fp_new:N\l_@@_graphic_trim_lx_fp +\fp_new:N\l_@@_graphic_trim_uy_fp +% \end{macrocode} +% \end{variable} +% +%\subsection{Tagging commands} +% +% \begin{macro}{\Gin@tag@struct@begin} +% The command to start the tagging. +% \begin{macrocode} +\msg_new:nnn {tag}{alt-text-missing} + { + Alternative~text~for~graphic~is~missing.\\ + Using~'#1'~instead + } +\cs_new_protected:Npn\Gin@tag@struct@begin + { + \tag_if_active:T + { + \tag_mc_end_push: +% \end{macrocode} +% we don't open a structure for artifacts to make it easier to use +% graphics in saveboxes. +% \begin{macrocode} + \bool_if:NTF\l_@@_graphic_artifact_bool + { + \tag_mc_begin:n{artifact} + } + { + \tl_if_empty:NTF\l_@@_graphic_actual_tl + { + \tl_if_empty:NT\l_@@_graphic_alt_tl + { + \msg_warning:nnx{tag}{alt-text-missing}{\l_@@_graphic_alt_dflt_tl} + \tl_set:Nx\l_@@_graphic_alt_tl {\l_@@_graphic_alt_dflt_tl} + } + \tag_struct_begin:n + { + tag=\l_@@_graphic_struct_tl, + alt=\l_@@_graphic_alt_tl, + } + } + { + \tag_struct_begin:n + { + tag=Span, + actualtext=\l_@@_graphic_actual_tl, + } + \bool_set_false:N\l_@@_graphic_BBox_bool + } + \tag_mc_begin:n{} + } + } + } +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\Gin@tag@struct@end} +% \begin{macrocode} +\cs_new_protected:Npn\Gin@tag@struct@end + { + \tag_if_active:T + { + \tag_mc_end: + \bool_if:NF\l_@@_graphic_artifact_bool + { + \tag_struct_end: + } + \tag_mc_begin_pop:n{} + } + } +% \end{macrocode} +% \end{macro} +% +% \subsection{Patching graphics commands} +% All changes are currently done in \cs{Gin@setfile}. +% \begin{macrocode} +\AddToHook{package/graphics/after} + { + \def\Gin@setfile#1#2#3{% + \ifx\\#2\\\Gread@false\fi + \ifGin@bbox\else + \ifGread@ + \csname Gread@% + \expandafter\ifx\csname Gread@#1\endcsname\relax + eps% + \else + #1% + \fi + \endcsname{\Gin@base#2}% + \else + \Gin@nosize{#3}% + \fi + \fi + \Gin@viewport@code + \Gin@nat@height\Gin@ury bp% + \advance\Gin@nat@height-\Gin@lly bp% + \Gin@nat@width\Gin@urx bp% + \advance\Gin@nat@width-\Gin@llx bp% + \Gin@req@sizes + \expandafter\ifx\csname Ginclude@#1\endcsname\relax + \Gin@drafttrue + \expandafter\ifx\csname Gread@#1\endcsname\relax + \@latex@error{Can not include graphics of type: #1}\@ehc + \global\expandafter\let\csname Gread@#1\endcsname\@empty + \fi + \fi + \leavevmode +% \end{macrocode} +% Here the tagging begins. We want to catch also the draft box, +% and for luatex tagging must be started before the \cs{setbox}. +% \begin{macrocode} + \Gin@tag@struct@begin %NEW + \ifGin@draft + \hb@xt@\Gin@req@width{% + \vrule\hss + \vbox to \Gin@req@height{% + \hrule \@width \Gin@req@width + \vss + \edef\@tempa{#3}% + \rlap{ \ttfamily\expandafter\strip@prefix\meaning\@tempa}% + \vss + \hrule}% + \hss\vrule}% + \else + \@addtofilelist{#3}% + \ProvidesFile{#3}[Graphic file (type #1)]% + \setbox\z@\hbox{\csname Ginclude@#1\endcsname{#3}}% + \dp\z@\z@ + \ht\z@\Gin@req@height + \wd\z@\Gin@req@width +% \end{macrocode} +% This the main command to calculate the BBox values. +% \begin{macrocode} + \Gin@tag@bbox@attribute %new + \box\z@ +% \end{macrocode} +% and here the tagging stops. +% \begin{macrocode} + \Gin@tag@struct@end %new + \fi} + } +% \end{macrocode} +% +% \subsection{Additional keys for the graphics command} +% TODO: this is a bit temporary and will perhaps need more refinement. +% we also ensure that graphicx is loaded for the keyval support. +% \begin{macrocode} +\AddToHook{package/graphicx/after}[latex-lab] + { + \define@key{Gin}{alt} {\tl_set:Nx\l_@@_graphic_alt_tl{\text_purify:n{#1}}} + \define@key{Gin}{artifact}[] + { + \bool_set_true:N \l_@@_graphic_artifact_bool + \bool_set_false:N \l_@@_graphic_BBox_bool + } + \define@key{Gin}{actualtext} + { + \tl_set:Nx\l_@@_graphic_actual_tl{\text_purify:n{#1}} + \bool_set_false:N \l_@@_graphic_BBox_bool + } + \define@key{Gin}{correct-BBox} + { + \bool_set_true:N \l_@@_graphic_bboxcorr_bool + \seq_set_split:Nnn\l_@@_graphic_bboxcorr_seq{~}{#1~0pt~0pt~0pt~0pt} + } + \define@key{Gin}{tag} + { + \str_case:nnF {#1} + { + {artifact} + { + \bool_set_true:N \l_@@_graphic_artifact_bool + \bool_set_false:N \l_@@_graphic_BBox_bool + } + {false}{\tag_stop:} + } + {\tl_set:Nn\l_@@_graphic_struct_tl{#1}} + } + } +\AddToHook{package/graphics/after}[latex-lab] + {\RequirePackage{graphicx}} +% \end{macrocode} +% For picture and other environments we need a similar set of keys. +% TODO: redefine \cs{includegraphics} to make use of these here?? +% \begin{macrocode} +\keys_define:nn{tag/picture} + { + ,alt .code:n = + {\tl_set:Nx\l_@@_graphic_alt_tl{\text_purify:n{#1}}} + ,artifact .code:n = + { + \bool_set_true:N \l_@@_graphic_artifact_bool + \bool_set_false:N \l_@@_graphic_BBox_bool + } + ,actualtext .code:n = + { + \tl_set:Nx\l_@@_graphic_actual_tl{\text_purify:n{#1}} + \bool_set_false:N \l_@@_graphic_BBox_bool + } + ,correct-BBox .code:n = + { + \bool_set_true:N \l_@@_graphic_bboxcorr_bool + \seq_set_split:Nnn\l_@@_graphic_bboxcorr_seq{~}{#1~0pt~0pt~0pt~0pt} + } + ,tag .code:n = + { + \str_case:nnF {#1} + { + {artifact} + { + \bool_set_true:N \l_@@_graphic_artifact_bool + \bool_set_false:N \l_@@_graphic_BBox_bool + } + {false}{\tag_stop:} + } + {\tl_set:Nn\l_@@_graphic_struct_tl{#1}} + } + } +% \end{macrocode} +% +% \subsection{Calculating the BBox} +% +% \begin{macro}{\@@_graphic_get_trim:} +% Graphics can be trimmed with the trim and the viewport key. +% If the graphic is not clipped the values must be taken into +% account when rotating. +% If viewport is used we have to calculate the trim. +% +% \begin{macrocode} +\cs_new_protected:Npn \@@_graphic_get_trim: + { + \legacy_if:nTF {Gin@clip} +% \end{macrocode} +% Setting to 0 is not strictly needed but looks cleaner. +% \begin{macrocode} + { + \fp_zero:N\l_@@_graphic_trim_lx_fp + \fp_zero:N\l_@@_graphic_trim_ly_fp + \fp_zero:N\l_@@_graphic_trim_ux_fp + \fp_zero:N\l_@@_graphic_trim_uy_fp + } + { + \fp_set:Nn \l_@@_graphic_trim_lx_fp {\l_@@_graphic_scale_fp*\Gin@vllx} + \fp_set:Nn \l_@@_graphic_trim_ly_fp {\l_@@_graphic_scale_fp*\Gin@vlly} + \fp_set:Nn \l_@@_graphic_trim_ux_fp {\l_@@_graphic_scale_fp*\Gin@vurx} + \fp_set:Nn \l_@@_graphic_trim_uy_fp {\l_@@_graphic_scale_fp*\Gin@vury} + \cs_if_exist:NT \Gin@ollx + { + \fp_set:Nn \l_@@_graphic_trim_ux_fp {\l_@@_graphic_scale_fp* (\Gin@ourx-(\Gin@urx)) } + \fp_set:Nn \l_@@_graphic_trim_uy_fp {\l_@@_graphic_scale_fp* (\Gin@oury-(\Gin@ury)) } + } + } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_graphic_get_scale:} +% \begin{macrocode} +\cs_new_protected:Npn \@@_graphic_get_scale: + { + \fp_set:Nn \l_@@_graphic_scale_fp { \Gin@scalex } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_graphic_applyangle:nnnn} +% This takes the current BBox and rotates it according to the use angle. +% This is the most laborious code, as we have to take also the trim values into +% account. We have to compare the values after the rotation to find the right corners +% for the BBox. Not sure, if this is the most effective code, +% the l3draw package has similar code to calculate a rotation, +% this can perhaps be reused ... +% \begin{macrocode} +\cs_new_protected:Npn \@@_graphic_applyangle:nnnn #1#2#3#4 %lx,ly,ux,uy + { + \bool_lazy_and:nnT + {\cs_if_exist_p:N \Grot@angle } + {! \int_compare_p:nNn { \Grot@angle }={0}} + { + \fp_set:Nn \l_@@_graphic_sin_fp { sind(\Grot@angle) } + \fp_set:Nn \l_@@_graphic_cos_fp { cosd(\Grot@angle) } + \fp_set:Nn \l_@@_graphic_lx_fp {#1} + \fp_set:Nn \l_@@_graphic_ly_fp {#2} + \fp_set:Nn \l_@@_graphic_ux_fp {#3} + \fp_set:Nn \l_@@_graphic_uy_fp {#4} +% \end{macrocode} +% get the x coordinates (cos,-sin) +% \begin{macrocode} + \fp_set:Nn\l_@@_graphic_lxly_fp + { + -\l_@@_graphic_trim_lx_fp * \l_@@_graphic_cos_fp + +\l_@@_graphic_trim_ly_fp * \l_@@_graphic_sin_fp + } + \fp_set:Nn\l_@@_graphic_lxuy_fp + { + (-\l_@@_graphic_trim_lx_fp) * \l_@@_graphic_cos_fp + + + (\l_@@_graphic_uy_fp-\l_@@_graphic_ly_fp-\l_@@_graphic_trim_ly_fp) + * (-\l_@@_graphic_sin_fp) + } + \fp_set:Nn\l_@@_graphic_uxly_fp + { + (\l_@@_graphic_ux_fp-\l_@@_graphic_lx_fp-\l_@@_graphic_trim_lx_fp) + * \l_@@_graphic_cos_fp + + + (\l_@@_graphic_trim_ly_fp) * (\l_@@_graphic_sin_fp) + } + \fp_set:Nn\l_@@_graphic_uxuy_fp + { + (\l_@@_graphic_ux_fp-\l_@@_graphic_lx_fp-\l_@@_graphic_trim_lx_fp) + * \l_@@_graphic_cos_fp + + + (\l_@@_graphic_uy_fp-\l_@@_graphic_ly_fp-\l_@@_graphic_trim_ly_fp) + * (-\l_@@_graphic_sin_fp) + } + \tl_gset:Nx\g_@@_graphic_lx_tl + { + \fp_eval:n + { + min + ( + \l_@@_graphic_lxly_fp, + \l_@@_graphic_lxuy_fp, + \l_@@_graphic_uxly_fp, + \l_@@_graphic_uxuy_fp, + ) + +\l_@@_graphic_lx_fp + +\l_@@_graphic_trim_lx_fp + } + } + \tl_gset:Nx\g_@@_graphic_ux_tl + { + \fp_eval:n + { + max + ( + \l_@@_graphic_lxly_fp, + \l_@@_graphic_lxuy_fp, + \l_@@_graphic_uxly_fp, + \l_@@_graphic_uxuy_fp + ) + +\l_@@_graphic_lx_fp + +\l_@@_graphic_trim_lx_fp + } + } +% \end{macrocode} +% get the y coordinates (sin,cos) +% \begin{macrocode} + \fp_set:Nn\l_@@_graphic_lxly_fp + { + -\l_@@_graphic_trim_lx_fp * \l_@@_graphic_sin_fp + -\l_@@_graphic_trim_ly_fp * \l_@@_graphic_cos_fp + } + \fp_set:Nn\l_@@_graphic_lxuy_fp + { + - \l_@@_graphic_trim_lx_fp * \l_@@_graphic_sin_fp + + + (\l_@@_graphic_uy_fp-\l_@@_graphic_ly_fp-\l_@@_graphic_trim_ly_fp) + * \l_@@_graphic_cos_fp + } + \fp_set:Nn\l_@@_graphic_uxly_fp + { + (\l_@@_graphic_ux_fp-\l_@@_graphic_lx_fp-\l_@@_graphic_trim_lx_fp) + * \l_@@_graphic_sin_fp + - \l_@@_graphic_trim_ly_fp * \l_@@_graphic_cos_fp + } + \fp_set:Nn\l_@@_graphic_uxuy_fp + { + (\l_@@_graphic_ux_fp-\l_@@_graphic_lx_fp-\l_@@_graphic_trim_lx_fp) + * \l_@@_graphic_sin_fp + + + (\l_@@_graphic_uy_fp-\l_@@_graphic_ly_fp-\l_@@_graphic_trim_ly_fp) + * \l_@@_graphic_cos_fp + } + \tl_gset:Nx\g_@@_graphic_ly_tl + { + \fp_eval:n + { + min + ( + \l_@@_graphic_lxly_fp, + \l_@@_graphic_lxuy_fp, + \l_@@_graphic_uxly_fp, + \l_@@_graphic_uxuy_fp + ) + + \l_@@_graphic_ly_fp + \l_@@_graphic_trim_ly_fp + } + } + \tl_gset:Nx\g_@@_graphic_uy_tl + { + \fp_eval:n + { + max + ( + \l_@@_graphic_lxly_fp, + \l_@@_graphic_lxuy_fp, + \l_@@_graphic_uxly_fp, + \l_@@_graphic_uxuy_fp, + ) + + \l_@@_graphic_ly_fp + \l_@@_graphic_trim_ly_fp + } + } + } + } +\cs_generate_variant:Nn\@@_graphic_applyangle:nnnn {VVVV} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@@_graphic_applycorr:NNNN} +% This command is used to add at the end the correction values. Quite dump ... +% \begin{macrocode} +\cs_new_protected:Npn \@@_graphic_applycorr:NNNN #1 #2 #3 #4 + { + \bool_if:NT\l_@@_graphic_bboxcorr_bool + { + \tl_set:Nx #1 + { + \fp_eval:n + { + #1 + + + \dim_to_decimal_in_bp:n {\seq_item:Nn \l_@@_graphic_bboxcorr_seq {1} } + } + } + \tl_set:Nx #2 + { + \fp_eval:n + { + #2 + + + \dim_to_decimal_in_bp:n {\seq_item:Nn \l_@@_graphic_bboxcorr_seq {2} } + } + } + \tl_set:Nx #3 + { + \fp_eval:n + { + #3 + + + \dim_to_decimal_in_bp:n {\seq_item:Nn \l_@@_graphic_bboxcorr_seq {3} } + } + } + \tl_set:Nx #4 + { + \fp_eval:n + { + #4 + + + \dim_to_decimal_in_bp:n {\seq_item:Nn \l_@@_graphic_bboxcorr_seq {4} } + } + } + } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Gin@tag@bbox@attribute} +% This is the main command to calculate and set the Bbox attribute +% \begin{macrocode} +\cs_new_protected:Npn \Gin@tag@bbox@attribute + { +% \end{macrocode} +% the attribute is only needed if tagging is active and there is not artifact. +% \begin{macrocode} + \bool_lazy_all:nT + { + {\tag_if_active_p:} + {!\l_@@_graphic_artifact_bool} + {\l_@@_graphic_BBox_bool} + } + { + \fp_set:Nn \l_@@_graphic_scale_fp { \Gin@scalex } + \@@_graphic_get_trim: + \int_gincr:N\g_@@_graphic_int + \tl_set:Nx\l_@@_graphic_currentlabel_tl {_@@_graphic_\int_use:N \g_@@_graphic_int} + \@@_graphic_savepos:e { \l_@@_graphic_currentlabel_tl } + \tl_gset:Nx\g_@@_graphic_lx_tl + { + \dim_to_decimal_in_bp:n + { \@@_ref_value:enn {\l_@@_graphic_currentlabel_tl}{xpos}{0}sp } + } + \tl_gset:Nx\g_@@_graphic_ly_tl + { + \dim_to_decimal_in_bp:n + { \@@_ref_value:enn {\l_@@_graphic_currentlabel_tl}{ypos}{0}sp } + } + \tl_gset:Nx\g_@@_graphic_ux_tl + { + \fp_eval:n + { + \g_@@_graphic_lx_tl + + + \dim_to_decimal_in_bp:n { \Gin@req@width } + } + } + \tl_gset:Nx\g_@@_graphic_uy_tl + { + \fp_eval:n + { + \g_@@_graphic_ly_tl + + + \dim_to_decimal_in_bp:n { \Gin@req@height } + } + } +% \end{macrocode} +% If the graphics is not clipped we must add the trim values. +% \begin{macrocode} + \legacy_if:nF {Gin@clip} + { + \tl_gset:Nx\g_@@_graphic_ux_tl + { + \fp_eval:n + { + \g_@@_graphic_ux_tl + + + \l_@@_graphic_trim_ux_fp + } + } + \tl_gset:Nx\g_@@_graphic_lx_tl + { + \fp_eval:n + { + \g_@@_graphic_lx_tl + - + \l_@@_graphic_trim_lx_fp + } + } + \tl_gset:Nx\g_@@_graphic_uy_tl + { + \fp_eval:n + { + \g_@@_graphic_uy_tl + + + \l_@@_graphic_trim_uy_fp + } + } + \tl_gset:Nx\g_@@_graphic_ly_tl + { + \fp_eval:n + { + \g_@@_graphic_ly_tl + - + \l_@@_graphic_trim_ly_fp + } + } + } +% \end{macrocode} +% If there is an angle we now rotate the values. +% \begin{macrocode} + \@@_graphic_applyangle:VVVV + \g_@@_graphic_lx_tl + \g_@@_graphic_ly_tl + \g_@@_graphic_ux_tl + \g_@@_graphic_uy_tl +% \end{macrocode} +% At last we have to add the correction values +% \begin{macrocode} + \@@_graphic_applycorr:NNNN + \g_@@_graphic_lx_tl + \g_@@_graphic_ly_tl + \g_@@_graphic_ux_tl + \g_@@_graphic_uy_tl +% \end{macrocode} +% \begin{macrocode} + \bool_if:NT\l_@@_graphic_debug_bool + { + \@@_graphic_show_bbox:VVVVne + \g_@@_graphic_lx_tl + \g_@@_graphic_ly_tl + \g_@@_graphic_ux_tl + \g_@@_graphic_uy_tl + {red} + {\int_use:N\g_@@_graphic_int} + } +% \end{macrocode} +% Now we add the attribute. We do it manually as it had to be delayed until now. +% The structure and the mc must be open earlier, before the \cs{setbox} (at least +% for luatex it has to). TODO: think about interface if more attributes are needed. +% \begin{macrocode} + \@@_prop_gput:cnx + { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_prop } + { A } + { + << + /O /Layout /BBox~ + [ + \g_@@_graphic_lx_tl\c_space_tl + \g_@@_graphic_ly_tl\c_space_tl + \g_@@_graphic_ux_tl\c_space_tl + \g_@@_graphic_uy_tl + ] + >> + } + } + } +% \end{macrocode} +% \end{macro} +% \subsection{Support for the picture environment} +% +% \begin{macro}{\picture@tag@bbox@attribute} +% Picture needs a similar command to calculate the bbox. But here we stay simple +% and use simply the size of the picbox. +% +% \begin{macrocode} +\newcommand\picture@tag@bbox@attribute + { + \bool_lazy_all:nT + { + {\tag_if_active_p:} + {!\l_@@_graphic_artifact_bool} + {\l_@@_graphic_BBox_bool} + } + { + \int_gincr:N\g_@@_graphic_int + \tl_set:Nx\l_@@_graphic_currentlabel_tl {_@@_graphic_\int_use:N \g_@@_graphic_int} + \@@_graphic_savepos:e { \l_@@_graphic_currentlabel_tl } + \tl_gset:Nx \g_@@_graphic_lx_tl + { + \dim_to_decimal_in_bp:n + { \@@_ref_value:enn {\l_@@_graphic_currentlabel_tl}{xpos}{0}sp } + } + \tl_gset:Nx \g_@@_graphic_ly_tl + { + \dim_to_decimal_in_bp:n + { \@@_ref_value:enn {\l_@@_graphic_currentlabel_tl}{ypos}{0}sp - \dp\@picbox } + } + \tl_gset:Nx \g_@@_graphic_ux_tl + { + \dim_to_decimal_in_bp:n + { + \g_@@_graphic_lx_tl bp + \wd\@picbox + } + } + \tl_gset:Nx \g_@@_graphic_uy_tl + { + \dim_to_decimal_in_bp:n + { + \g_@@_graphic_ly_tl bp + \ht\@picbox + \dp\@picbox + } + } + \@@_graphic_applycorr:NNNN + \g_@@_graphic_lx_tl + \g_@@_graphic_ly_tl + \g_@@_graphic_ux_tl + \g_@@_graphic_uy_tl + \bool_if:NT\l_@@_graphic_debug_bool + { + \@@_graphic_show_bbox:VVVVne + \g_@@_graphic_lx_tl + \g_@@_graphic_ly_tl + \g_@@_graphic_ux_tl + \g_@@_graphic_uy_tl + {red} + {\int_use:N\g_@@_graphic_int} + } + \@@_prop_gput:cnx + { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_prop } + { A } + { + << + /O /Layout /BBox~ + [ + \g_@@_graphic_lx_tl\c_space_tl + \g_@@_graphic_ly_tl\c_space_tl + \g_@@_graphic_ux_tl\c_space_tl + \g_@@_graphic_uy_tl + ] + >> + } + } + } + +% \end{macrocode} +% \end{macro} +% We redefine \cs{picture} to accept an optional argument and +% change the default alt text. We also ensure that we are in +% hmode, so that stopping tagging doesn't confuse the paratags. +% \begin{macrocode} +\RenewDocumentCommand\picture{O{}m} + { + \leavevmode + \keys_set:nn{tag/picture}{#1} % + \tl_set:Nn\l_@@_graphic_alt_dflt_tl {picture~environment} + \pictur@#2 + } +% \end{macrocode} +% inside the picture box we stop tagging. +% \begin{macrocode} +\def\@picture(#1,#2)(#3,#4){% + \@defaultunitsset\@picht{#2}\unitlength + \@defaultunitsset\@tempdimc{#1}\unitlength + \Gin@tag@struct@begin + \setbox\@picbox\hb@xt@\@tempdimc\bgroup + \tag_stop: %do not tag inside the picture box + \@defaultunitsset\@tempdimc{#3}\unitlength + \hskip -\@tempdimc + \@defaultunitsset\@tempdimc{#4}\unitlength + \lower\@tempdimc\hbox\bgroup + \ignorespaces} +% \end{macrocode} +% +% \begin{macrocode} +\def\endpicture{% + \egroup\hss\egroup + \ht\@picbox\@picht\dp\@picbox\z@ + \picture@tag@bbox@attribute + \mbox{\box\@picbox} + \Gin@tag@struct@end} +% \end{macrocode} +% +% \subsection{Debugging code} +% +% \begin{macro}{\@@_graphic_show_bbox:nnnnnn} +% \begin{macrocode} +\cs_new_protected:Npn \@@_graphic_show_bbox:nnnnnn #1#2#3#4#5#6%#5 color, #6 graphic + { + \iow_log:n {tag/graphic~debug:~BBox~of~graphics~#6~is~#1~#2~#3~#4} + \hook_gput_code:nnn + {shipout/foreground} + {tag/graphic} + { + \int_compare:nNnT + {\g_shipout_readonly_int} + = + {\@@_ref_value:enn{_@@_graphic_#6}{abspage}{0}} + { + \put + (#1 bp,\dim_eval:n{-\paperheight + \dim_eval:n{#2 bp}}) + { + \opacity_select:n{0.5}\color_select:n{#5} + \rule + {\dim_eval:n {#3 bp-\dim_eval:n{#1 bp}}} + {\dim_eval:n {#4 bp-\dim_eval:n{#2 bp}}} + } + } + } + } + \cs_generate_variant:Nn \@@_graphic_show_bbox:nnnnnn {VVVVne} +% \end{macrocode} +% \end{macro} + +% \begin{macrocode} +% +% \end{macrocode} + +% \begin{macrocode} +%<*latex-lab> +\ProvidesFile{graphic-latex-lab-testphase.ltx} + [2023-04-07 v0.8 code related to the tagging included graphics] +\RequirePackage{latex-lab-testphase-graphic} +% +% \end{macrocode} +% \end{implementation} diff --git a/macros/latex-dev/required/latex-lab/latex-lab-graphic.pdf b/macros/latex-dev/required/latex-lab/latex-lab-graphic.pdf new file mode 100644 index 0000000000..83de1b66cc Binary files /dev/null and b/macros/latex-dev/required/latex-lab/latex-lab-graphic.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-mathpkg.pdf b/macros/latex-dev/required/latex-lab/latex-lab-mathpkg.pdf index 219b39d6cb..25aede8aef 100644 Binary files a/macros/latex-dev/required/latex-lab/latex-lab-mathpkg.pdf and b/macros/latex-dev/required/latex-lab/latex-lab-mathpkg.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-mathtagging.dtx b/macros/latex-dev/required/latex-lab/latex-lab-mathtagging.dtx index 61818bde15..923001f559 100644 --- a/macros/latex-dev/required/latex-lab/latex-lab-mathtagging.dtx +++ b/macros/latex-dev/required/latex-lab/latex-lab-mathtagging.dtx @@ -770,11 +770,14 @@ % \typeout{==>~math~begin} % needs different handling if we support nesting \tl_gset:Nx\tmpmathcontent - {\exp_not:N\begin{\g__math_grabbed_env_tl} + { + LaTeX~ formula~ starts~ + \exp_not:N\begin{\g__math_grabbed_env_tl} \space \exp_not:V\g__math_grabbed_math_tl \space \exp_not:N\end{\g__math_grabbed_env_tl} + \space LaTeX~ formula~ ends~ } \tagstructbegin{tag=Formula, AFinline-o=\tmpmathcontent, diff --git a/macros/latex-dev/required/latex-lab/latex-lab-mathtagging.pdf b/macros/latex-dev/required/latex-lab/latex-lab-mathtagging.pdf index 270cf6d721..be06230f29 100644 Binary files a/macros/latex-dev/required/latex-lab/latex-lab-mathtagging.pdf and b/macros/latex-dev/required/latex-lab/latex-lab-mathtagging.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-mathtools.pdf b/macros/latex-dev/required/latex-lab/latex-lab-mathtools.pdf index 1272745dd9..ba5758f433 100644 Binary files a/macros/latex-dev/required/latex-lab/latex-lab-mathtools.pdf and b/macros/latex-dev/required/latex-lab/latex-lab-mathtools.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-minipage.dtx b/macros/latex-dev/required/latex-lab/latex-lab-minipage.dtx new file mode 100644 index 0000000000..00b1d649a1 --- /dev/null +++ b/macros/latex-dev/required/latex-lab/latex-lab-minipage.dtx @@ -0,0 +1,202 @@ +% \iffalse meta-comment +% +%% File: latex-lab-minipage.dtx (C) Copyright 2023 LaTeX Project +% +% It 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 +% +% https://www.latex-project.org/lppl.txt +% +% +% The development version of the bundle can be found below +% +% https://github.com/latex3/latex2e/required/latex-lab +% +% for those people who are interested or want to report an issue. +% +%<*driver> +\documentclass{l3doc} +\EnableCrossrefs +\CodelineIndex +\begin{document} + \DocInput{latex-lab-minipage.dtx} +\end{document} +% +% +% \fi +% + +\def\ltlistsversion{v0.81} +\def\ltlistsdate{2023/05/10} + +% +% \title{The \textsf{latex-lab-minipage} package\\ +% Changes related to the tagging of minipage and parbox} +% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}} +% \date{\ltlistsversion\ \ltlistsdate} +% +% \maketitle +% +% \newcommand{\xt}[1]{\textsl{\textsf{#1}}} +% \newcommand{\TODO}[1]{\textbf{[TODO:} #1\textbf{]}} +% \newcommand{\docclass}{document class \marginpar{\raggedright document class +% customizations}} +% +% \providecommand\hook[1]{\texttt{#1}} +% +% \begin{abstract} +% \end{abstract} +% +% \section{Introduction} +% +% How to tag minipages and parboxes is still under discussion. +% But as they start and contain paragraphs it is clear that +% hooks are needed to interrupt and restart the tagging. +% +% The tagging added is currently quite simple minded. See the todo-testfiles and the +% code comments for some open points. +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \section{Implementation} +% \begin{macrocode} +\ProvidesExplPackage {latex-lab-testphase-minipage} {2023-05-10} {0.81} + {Code related to the tagging of minipages and parboxes} +% \end{macrocode} +% + +% \subsection{Provide the kernel hooks} +% [kernel?] +% We need to check/set the status before the +% initial \cs{leavevmode} to decide how to handle the structure. +% Perhaps the same command will work for both? +% \begin{macrocode} +\def\@kernel@init@minipage{} +\def\@kernel@init@parbox{} +% \end{macrocode} +% We need a few hooks. +% \begin{macrocode} +\def\@kernel@before@minipage{} +\def\@kernel@after@minipage{} +\def\@kernel@before@parbox{} +\def\@kernel@after@parbox{} +% \end{macrocode} +% +% \subsection{Patch minipage} +% [kernel?] +% The begin hook is inserted in \cs{@iiiminipage} +% \begin{macrocode} +\def\@iiiminipage#1#2[#3]#4{% +% \end{macrocode} +% Before switching to hmode we insert a hook. It is currently unused +% but could for example check if we are in vmode and change the following +% paragraph tag. +% \begin{macrocode} + \@kernel@init@minipage + \leavevmode + \@pboxswfalse + \setlength\@tempdima{#4}% + \def\@mpargs{{#1}{#2}[#3]{#4}}% +% \end{macrocode} +% insert the hook +% \begin{macrocode} + \@kernel@before@minipage% new + \setbox\@tempboxa\vbox\bgroup + \color@begingroup + \hsize\@tempdima + \textwidth\hsize \columnwidth\hsize + \@parboxrestore + \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@ + \let\@footnotetext\@mpfootnotetext + \let\@listdepth\@mplistdepth \@mplistdepth\z@ + \@minipagerestore + \@setminipage} +% \end{macrocode} +% And a hook at the end +% \begin{macrocode} +\def\endminipage{% + \par + \unskip + \ifvoid\@mpfootins\else + \vskip\skip\@mpfootins + \normalcolor + \footnoterule + \unvbox\@mpfootins + \fi + \@minipagefalse %% added 24 May 89 + \color@endgroup + \egroup +% \end{macrocode} +% as the parbox command is called, we must prevent that it adds its additional +% tagging commands: +% \begin{macrocode} + \tag_stop:n{minipage} + \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}% + \tag_start:n{minipage} + \@kernel@after@minipage%new end ... + } +% \end{macrocode} +% +% And similar for \cs{parbox} +% \begin{macrocode} +\long\def\@iiiparbox#1#2[#3]#4#5{% + \@kernel@init@parbox + \leavevmode + \@pboxswfalse + \setlength\@tempdima{#4}% + \@kernel@before@parbox% new + \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}% + \ifx\relax#2\else + \setlength\@tempdimb{#2}% + \edef\@parboxto{to\the\@tempdimb}% + \fi + \if#1b\vbox + \else\if #1t\vtop + \else\ifmmode\vcenter + \else\@pboxswtrue $\vcenter + \fi\fi\fi + \@parboxto{\let\hss\vss\let\unhbox\unvbox + \csname bm@#3\endcsname}% + \if@pboxsw \m@th$\fi + \@end@tempboxa% + \@kernel@after@parbox%new end + } +% \end{macrocode} +% +% \subsection{Tagging commands} +% +% \begin{macrocode} +\tl_new:N \l__ltboxes_tag_tl +\tl_set:Nn \l__ltboxes_tag_tl {Div} +\cs_set_protected:Npn\@kernel@before@minipage + { +% \end{macrocode} +% As there was a \cs{leavevmode} before that is a P/text open that we have to close. +% \begin{macrocode} + \tag_mc_end_push:\tag_struct_end: +% \end{macrocode} +% TODO: the P can be further up, we need a proper method to test and handle this. +% \begin{macrocode} + \tag_struct_begin:n{tag=\l__ltboxes_tag_tl}} +\cs_set_protected:Npn\@kernel@after@minipage + {\tag_struct_end:\tag_struct_begin:n{tag=\l__tag_para_tag_tl}\tag_mc_begin_pop:n{}} +\cs_set_protected:Npn\@kernel@before@parbox + {\tag_mc_end_push:\tag_struct_end:\tag_struct_begin:n{tag=\l__ltboxes_tag_tl}} +\cs_set_protected:Npn\@kernel@after@parbox + {\tag_struct_end:\tag_struct_begin:n{tag=\l__tag_para_tag_tl}\tag_mc_begin_pop:n{}} +% \end{macrocode} +% \begin{macrocode} +% +% \end{macrocode} + +% \begin{macrocode} +%<*latex-lab> +\ProvidesFile{minipage-latex-lab-testphase.ltx} + [2022-10-26 v0.8 code related to the tagging of sectioning commands] +\RequirePackage{latex-lab-testphase-minipage} +% +% \end{macrocode} diff --git a/macros/latex-dev/required/latex-lab/latex-lab-minipage.pdf b/macros/latex-dev/required/latex-lab/latex-lab-minipage.pdf new file mode 100644 index 0000000000..79fd78a62c Binary files /dev/null and b/macros/latex-dev/required/latex-lab/latex-lab-minipage.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-new-or-1.dtx b/macros/latex-dev/required/latex-lab/latex-lab-new-or-1.dtx index b3e763ffdd..ef799e813c 100644 --- a/macros/latex-dev/required/latex-lab/latex-lab-new-or-1.dtx +++ b/macros/latex-dev/required/latex-lab/latex-lab-new-or-1.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -%% File: latex-lab-new-or-1.dtx (C) Copyright 2020-2022 Frank Mittelbach +%% File: latex-lab-new-or-1.dtx (C) Copyright 2020-2023 Frank Mittelbach % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -128,9 +128,9 @@ % % \begin{macrocode} \patchcmd\page@sofar - {\setbox\z@\hbox{p}\global\dimen\tw@\dp\z@}% + {\global\dimen\tw@\dp\z@}% {% - \setbox\z@\hbox{p}\global\dimen\tw@\dp\z@ + \global\dimen\tw@\dp\z@ \@mult@ptagging@hook }% {\typeout{Patching \string\page@sofar\space for tagging}}{\PATCHerror}% diff --git a/macros/latex-dev/required/latex-lab/latex-lab-new-or-1.pdf b/macros/latex-dev/required/latex-lab/latex-lab-new-or-1.pdf index e9f69f428b..429fb807c2 100644 Binary files a/macros/latex-dev/required/latex-lab/latex-lab-new-or-1.pdf and b/macros/latex-dev/required/latex-lab/latex-lab-new-or-1.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-new-or-2.pdf b/macros/latex-dev/required/latex-lab/latex-lab-new-or-2.pdf index 449f43110a..623ce1e27f 100644 Binary files a/macros/latex-dev/required/latex-lab/latex-lab-new-or-2.pdf and b/macros/latex-dev/required/latex-lab/latex-lab-new-or-2.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-sec-tagging.dtx b/macros/latex-dev/required/latex-lab/latex-lab-sec-tagging.dtx deleted file mode 100644 index dc90c76e99..0000000000 --- a/macros/latex-dev/required/latex-lab/latex-lab-sec-tagging.dtx +++ /dev/null @@ -1,810 +0,0 @@ -% \iffalse meta-comment -% -%% File: sec-tagging.dtx (C) Copyright 2022-2023 LaTeX Project -% -% It 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 -% -% https://www.latex-project.org/lppl.txt -% -% -% The development version of the bundle can be found below -% -% https://github.com/latex3/latex2e/required/latex-lab -% -% for those people who are interested or want to report an issue. -% -%<*driver> -\documentclass{l3doc} -\EnableCrossrefs -\CodelineIndex -\begin{document} - \DocInput{latex-lab-sec-tagging.dtx} -\end{document} -% -% -% \fi -% -% -% \title{The \textsf{sec-tagging} package\\ -% Changes related to the tagging of sectioning commands} -% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}} -% \date{v0.81 2023-02-12} -% -% \maketitle -% -% \newcommand{\xt}[1]{\textsl{\textsf{#1}}} -% \newcommand{\TODO}[1]{\textbf{[TODO:} #1\textbf{]}} -% \newcommand{\docclass}{document class \marginpar{\raggedright document class -% customizations}} -% -% \providecommand\hook[1]{\texttt{#1}} -% -% \begin{abstract} -% The following code implements a first draft for the tagging of sectioning commands. -% \end{abstract} -% -% \section{Limitations} -% -% Sectioning commands are in not defined by the format but by the classes. -% Their implementation vary: some are defined with the help of \cs{@startsection}, -% some are like \cs{chapter} handcrafted, -% some build with the help of extension packages or as in the KOMA classes -% with class code that extends the \cs{@startsection} functionality. -% -% The following code can therefore currently be used \emph{only} with the standard classes -% or with classes which do not overwrite the changed definitions. -% -% -% -% \section{Introduction} -% -% Tagging of sectioning commands consist of two parts: -% -% \begin{itemize} -% \item The heading/title text of the section should be surrounded by a -% heading tag, typically \texttt{Hn} with some value of \texttt{n}. -% The number of the section command can optionally be put in a \texttt{Lbl}. -% The number of the \texttt{Hn} tag should reflect the \enquote{natural} level. -% So in an article \cs{section} will use \texttt{H1}, in a book \cs{chapter} will use -% \texttt{H1} and \cs{section} \texttt{H2}. -% Titles of \cs{part} are a bit out of this system as they are normally -% not part of the hierarchy: often only some chapters are grouped under a part. -% Their title is therefore tagged as \texttt{Title}. -% \item -% The whole section should normally be surrounded by -% a \texttt{Sect} tag. Parts should be surrounded by \texttt{Part}. -% It is a bit unclear if the headings should be inside or outside of these -% structures---the best practice guide puts them outside---but on the whole -% it sounds more logical to group the heading with the text inside the \texttt{Sect}. -% For the part this is actually required, as there can be only one \texttt{Title} -% in a structure, so the part title can't be at the same level as the -% document \texttt{Title}. -% -% Starting such an enclosing \texttt{Sect} structure is rather easy, -% but closing it requires code in various place, -% for example the commands \cs{mainmatter}, \cs{backmatter}, -% \cs{frontmatter} and \cs{appendix} should typically close everything. -% Following sectioning commands should close all previous structures -% with a level equal or higher than their own level. -% \end{itemize} -% -% \section{Technical details and problems} -% -% The implementation has to take care of various details. -% -% \begin{itemize} -% -% \item As sections in \LaTeX{} are not environments, the -% \texttt{} structures can be wrongly nested with other structures. For example -% if a document puts a sectioning command into a list or a trivlist or -% a minipage then it can no longer close previous \texttt{} structures correctly. -% The problem can be detected by checking the structure stack -% and a warning can be issued, but the author then has to close the structures -% manually before the list or minipage. -% -% Thus there have to be user interfaces to handle such cases. -% It should also be possible not to create all the \texttt{} structures -% automatically but to tag only the headings so that the author can handle special -% cases manually. -% -% \item If hyperref is used, targets for links should be inserted, either with -% \cs{refstepcounter} or manually with \cs{MakeLinkTarget}. These targets must be -% in the correct structure for the structure destinations. They replace some -% of the current patches in hyperref. -% -% \item With lualatex the mc-commands set attributes \emph{locally}, so the -% commands must be at the right grouping level. -% \end{itemize} -% -% \subsection{Funktions and keys} -% -% \begin{function}{\tag_tool:n,\tagtool} -% -% \end{function} -% -% \subsection{TODO} -% -% \begin{itemize} -% \item A dedicated command to close a sectioning unit should be provided. -% -% \item A dedicated command to open a sectioning unit should be provided too. -% -% \item It should also be possible to suppress the sectioning unit in sectioning commands -% to allow e.g. to put an epigraph or similar in front. -% -% \item The number in \cs{part} and \cs{chapter} is currently not correctly -% tagged as a \texttt{Lbl} as this requires to redefine the internal (class dependant) -% commands too. -% -% \end{itemize} -% -% \begin{macrocode} -%<*package> -% \end{macrocode} -% -% \section{Implementation} -% \begin{macrocode} -\ProvidesExplPackage {latex-lab-testphase-sec-tagging} {2022-10-25} {0.8} - {Code related to the tagging of sectioning commands} -% \end{macrocode} -% -% \subsection{Surrounding by \texttt{Sect} structures} -% We use a stack to record the levels of the open \texttt{Sect}. The first item -% has level -100. A sectioning command will take a record from the stack. If its level is -% greater or equal it closes this structure and takes the next record from the stack. -% If the record has a smaller level then it puts it back and stops. -% The stack is compared with the main structure stack, if they don't match -% it means we can't safely close the \texttt{Sect} and so we issue a warning -% and do nothing. -% -% \subsubsection{Loading general kernel changes} -% [kernel?] -% Also loaded in the toc-tagging code. -% \begin{macrocode} -\RequirePackage{latex-lab-kernel-changes} -% \end{macrocode} -% \begin{macrocode} -% -% \end{macrocode} -% \subsubsection{Glyphtounicode improvements} -% -% As lualatex runs with legacy encodings in the test files, we enable and -% load glyphtounicode. For the math we load additional definitions. -% -% \begin{macrocode} -%<*kernelchange> -\ifdefined\directlua - \pdfvariable gentounicode =1 - \protected\def\pdfglyphtounicode {\pdfextension glyphtounicode } - \input{glyphtounicode} -\fi - \input{glyphtounicode-cmex} -% -% \end{macrocode} -% -% \subsubsection{updating \cs{@currentHref}} -% [kernel?] -% -% We must ensure that manual targets (e.g. in unnumbered sections) -% correctly update \cs{@currentHref}. For this we extend the kernel definition of -% \cs{MakeLinkTarget} -% -% \begin{macrocode} -%<*kernelchange> -\ExplSyntaxOn -\int_new:N\g__kernel_target_int -\RenewDocumentCommand\MakeLinkTarget{sO{}m} - {% - \ifvmode - \special{}% - \else - \@savsf\spacefactor - \smash{}% - \spacefactor\@savsf - \fi - \int_gincr:N\g__kernel_target_int - \tl_gset:Nx \@currentHref {target*.\int_use:N\g__kernel_target_int} - } -\ExplSyntaxOff -% -% \end{macrocode} -% -% \begin{macrocode} -%<*package> -% \end{macrocode} -% \subsubsection{Tagging commands} -% -% -% \begin{variable}{\g__tag_sec_stack_seq} -% The stack holds the tag and the level. -% \begin{macrocode} -\seq_new:N \g__tag_sec_stack_seq -\seq_gpush:Nn\g__tag_sec_stack_seq {{Document}{-100}} -% \end{macrocode} -% \end{variable} -% -% \begin{variable}{\l__tag_sec_Sect_bool} -% This boolean controls if a Sect structure is opened. -% \begin{macrocode} -\bool_new:N \l__tag_sec_Sect_bool -\bool_set_true:N\l__tag_sec_Sect_bool -% \end{macrocode} -% \end{variable} - -% -% \begin{macro}{\__tag_sec_begin:nn} -% This starts a sectioning structure. -% Currently the tag is fix, either Sect or Part, depending on the level, -% but this will perhaps change. The second argument is currently unused. -% \begin{macrocode} -\cs_new_protected:Npn\__tag_sec_begin:nn #1 #2 %#1 level #2 keyval - { - \tag_struct_begin:n - { - tag= {\int_compare:nNnTF {#1}={-1}{Part}{Sect}} - ,#2 - } - \seq_gpush:Nx \g__tag_sec_stack_seq {{\g__tag_struct_tag_tl}{#1}} - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\__tag_sec_end:n} -% \begin{macrocode} -\msg_new:nnn { tag } {wrong-sect-nesting} - { - The~structure~#1~can~not~be~closed.\\ - It~is~not~equal~to~the~current~structure~#2~on~the~main~stack - } - -\cs_new_protected:Npn\__tag_sec_end:n #1 % #1 level - { - \seq_get:NN \g__tag_sec_stack_seq \l__tag_tmpa_tl - \int_compare:nNnT {#1}<{\exp_last_unbraced:NV\use_ii:nn\l__tag_tmpa_tl+1} - { - \seq_get:NN\g__tag_struct_tag_stack_seq \l__tag_tmpb_tl - \exp_args:Nee - \tl_if_eq:nnTF - {\exp_last_unbraced:NV\use_i:nn\l__tag_tmpa_tl} - {\exp_last_unbraced:NV\use_i:nn\l__tag_tmpb_tl} - { - \seq_gpop:NN \g__tag_sec_stack_seq \l__tag_tmpa_tl - \tag_struct_end: - \__tag_sec_end:n {#1} - } - { - \msg_warning:nnxx {tag}{wrong-sect-nesting} - { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpa_tl } - { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpb_tl } - } - } - } -% \end{macrocode} -% \end{macro} - -% \begin{macro}{\__tag_tool_para_split:} -% Runin-sectioning command must separate the heading from the following text. -% -% \begin{macrocode} -\cs_new_protected:Npn \__tag_tool_para_split: - { - \tag_mc_end: - \tag_struct_end: - \tag_struct_begin:n{tag=\l__tag_para_tag_default_tl} - \tag_mc_begin:n{} - \__tag_setup_restore_para_default: - } -% \end{macrocode} -% \end{macro} - -% \begin{macro}{\__tag_setup_restore_para_default:} -% We change the para tagging in the sectioning code. -% This here restores the default. Currently it only resets the -% the tag, but perhaps more will be needed later. -% \begin{macrocode} -\cs_new_protected:Npn \__tag_setup_restore_para_default: - { - \tl_set:Nn \l__tag_para_main_tag_tl {text-unit} - \tl_set_eq:NN\l__tag_para_tag_tl\l__tag_para_tag_default_tl - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\__tag_sec_end_display:} -% \begin{macrocode} -\cs_new_protected:Npn \__tag_sec_end_display: - { - \tag_struct_end: %P = Hn - \__tag_setup_restore_para_default: - } -% \end{macrocode} -% \end{macro} -% -% Open sec structures should be closed at the end of the document. This should -% be done before tagpdf closes the Document structure. -% \begin{macrocode} -\hook_gput_code:nnn{tagpdf/finish/before}{tagpdf/sec}{\__tag_sec_end:n{-10}} -\hook_gset_rule:nnnn {tagpdf/finish/before}{tagpdf/sec}{before}{tagpdf} -% \end{macrocode} -% -% The commands \cs{mainmatter}, \cs{backmatter}, \cs{frontmatter} and -% \cs{appendix} close all \texttt{Sect} and \texttt{Part} structures. -% \begin{macrocode} -\AddToHook{cmd/frontmatter/before}{\__tag_sec_end:n{-10}} -\AddToHook{cmd/mainmatter/before} {\__tag_sec_end:n{-10}} -\AddToHook{cmd/backmatter/before} {\__tag_sec_end:n{-10}} -\AddToHook{cmd/appendix/before} {\__tag_sec_end:n{-10}} -% \end{macrocode} -% -% \subsection{Tagging tools} -% We need to provide user and package level commands -% -% \begin{macrocode} -\cs_if_free:NT \tag_tool:n - { - \cs_new_protected:Npn \tag_tool:n #1 - { - \tag_if_active:T { \keys_set:nn {tag / tool}{#1} } - } - \cs_set_eq:NN\tagtool\tag_tool:n - } -\keys_define:nn { tag / tool} - { - ,sec-start-part .code:n = - { - \bool_if:NT\l__tag_sec_Sect_bool - { - \__tag_sec_end:n {-1} - \__tag_sec_begin:nn{-1}{tag=Part} - } - \tag_struct_begin:n{tag=part,title=#1} -% \end{macrocode} -% We remap here the text-unit from the paragraph to NonStruct. -% It would be better to suppress it completly as with the other -% sectioning commands, but this would require to redefine \cs{@spart} -% and \cs{@part}, as there is the grouping, and these commands are -% all slightly different in the standard classes. So this is delayed -% to the time when sectioning commands are redefined with templates. -% \begin{macrocode} - \tl_set:Nn\l__tag_para_main_tag_tl {NonStruct} - \tl_set:Nn\l__tag_para_tag_tl {Span} - } - ,sec-stop-part .code:n = {\__tag_sec_end_display:} - ,sec-start-chapter .code:n = - { - \bool_if:NT\l__tag_sec_Sect_bool - { - \__tag_sec_end:n {0} - \__tag_sec_begin:nn{0}{tag=Sect} - } - \tag_struct_begin:n{tag=chapter,title=#1} -% \end{macrocode} -% similar to part we remap to NonStruct for now ... -% \begin{macrocode} - \tl_set:Nn\l__tag_para_main_tag_tl {NonStruct} - \tl_set:Nn\l__tag_para_tag_tl {Span} - } - ,sec-stop-chapter .meta:n = { sec-stop-part} - ,sec-start .code:n = % #1 is a name like "section" - { - \bool_if:NT\l__tag_sec_Sect_bool - { - \__tag_sec_end:n {\use:c{toclevel@#1}+0} - \__tag_sec_begin:nn {\use:c{toclevel@#1}+0}{tag=Sect} - } - \tl_set:Nn\l__tag_para_tag_tl{#1} - } - ,sec-start .value_required:n = true - ,sec-split-para .code:n = {\__tag_tool_para_split:} - ,restore-para .code:n = {\__tag_setup_restore_para_default:} - ,sec-stop .code:n = - { - \par\__tag_sec_end:n {\use:c{toclevel@#1}+0} - } - ,sec-stop .value_required:n = true - ,sec-add-grouping .bool_set:N = \l__tag_sec_Sect_bool - } -% \end{macrocode} -% -% -% \section{Sectioning commands} -% -% \subsection{\cs{part} and \cs{chapter}} -% -% \cs{part} and \cs{chapter} are defined by the classes. -% To tag them we redefine the user commands. -% This will probably break with various classes and with titlesec. -% The tagging inside relies on the para tagging. -% We do not yet use keyval in the optional argument, as this requires latex-dev -% and the naming of the keys and their key family is unclear. -% \begin{macrocode} -\AddToHook{class/after} - { - \@ifundefined{chapter} - { -% \end{macrocode} -% This redefines \cs{part} in article class. -% \begin{macrocode} - \RenewDocumentCommand\part{ s O{#3} m } - { - \if@noskipsec \leavevmode \fi - \par - \addvspace{4ex}% - \@afterindentfalse -% \end{macrocode} -% This are the tagging commands needed at the begin. They open a Part structure -% and the structure for the title of the heading. -% \begin{macrocode} - % tagging start commands - \tag_tool:n {sec-start-part=#2} - % end tagging start commands -% \end{macrocode} -% This adds a manual target if the part is unnumbered or starred. -% It replaces the hyperref patches. -% \begin{macrocode} - \bool_lazy_any:nT - { - { #1 } - { - \int_compare_p:nNn {\c@secnumdepth}<{-1} - } - } - { - \MakeLinkTarget[part]{} - } -% \end{macrocode} -% The main call to the underlying commands. -% \begin{macrocode} - \IfBooleanTF - {#1} - { \@spart {#3} } - { \@part [#2]{#3} } -% \end{macrocode} -% and now the closing command for the tagging of the title. -% \begin{macrocode} - \tag_tool:n {sec-stop-part} - } - } -% \end{macrocode} -% Redefinitions for book and report -% \begin{macrocode} - { - \RenewDocumentCommand\chapter{ s O{#3} m } - { - \if@openright\cleardoublepage\else\clearpage\fi - \thispagestyle{plain}% - \global\@topnum\z@ - \@afterindentfalse -% \end{macrocode} -% This are the tagging commands needed at the begin. They open a Sect structure -% and the structure for the title of the heading. -% \begin{macrocode} - \tag_tool:n { sec-start-chapter= #2 } -% \end{macrocode} -% This adds a manual target if the chapter is unnumbered or starred. -% It replaces the hyperref patches. -% \begin{macrocode} - \bool_lazy_any:nT - { - { #1 } - { - \int_compare_p:nNn {\c@secnumdepth}<{0} - } - { - %in book target also needed in frontmatter - \bool_lazy_and_p:nn - { \cs_if_exist_p:c { @mainmattertrue } } - { ! \legacy_if_p:n { @mainmatter } } - } - } - { - \MakeLinkTarget[chapter]{} - %todo public function for this update! - \tl_if_blank:VF \@currentHref - { - \prop_gput:Nxx \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}} - } - } -% \end{macrocode} -% The main call to the underlying commands. -% \begin{macrocode} - \IfBooleanTF - {#1} - { \@schapter {#3} } - { \@chapter [#2]{#3} } -% \end{macrocode} -% and now the closing command for the tagging of the title. -% \begin{macrocode} - \tag_tool:n {sec-stop-chapter} - } -% \end{macrocode} -% and similar for \cs{part} -% \begin{macrocode} - \RenewDocumentCommand\part{ s O{#3} m } - { - \if@openright - \cleardoublepage - \else - \clearpage - \fi - \thispagestyle{plain}% - \if@twocolumn - \onecolumn - \@tempswatrue - \else - \@tempswafalse - \fi - \null\vfil -% \end{macrocode} -% This are the tagging commands needed at the begin. They open a Part structure -% and the structure for the title of the heading. -% \begin{macrocode} - \tag_tool:n {sec-start-part=#2} -% \end{macrocode} -% This adds a manual target if the part is unnumbered or starred. -% It replaces the hyperref patches. -% \begin{macrocode} - \bool_lazy_any:nT - { - { #1 } - { - \int_compare_p:nNn {\c@secnumdepth}<{-1} - } - { - %in book target also needed in frontmatter - \bool_lazy_and_p:nn - { \cs_if_exist_p:c { @mainmattertrue } } - { ! \legacy_if_p:n { @mainmatter } } - } - } - { - \MakeLinkTarget[part]{} - \tl_if_blank:VF \@currentHref - { - \prop_gput:Nxx \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}} - } - } -% \end{macrocode} -% The main call to the underlying commands. -% \begin{macrocode} - \IfBooleanTF - {#1} - { \@spart {#3} } - { \@part [#2]{#3} } -% \end{macrocode} -% and now the closing command for the tagging of the title. -% \begin{macrocode} - \tag_tool:n{sec-stop-part} - } - } - } -% \end{macrocode} -% -% \subsection{Sectioning commands based on \cs{@startsection}} -% -% The tagging of relies again on the para tagging: -% we simply exchange the tag name by the one given as \#1. -% This assumes that a tag with the name of the sectioning type is defined. -% We don't try to pass the title, this will be done together with -% the new keyval handling in the user command. -% -% \subsubsection{Hyperref code} -% hyperref has to insert anchors. If the sectioning is numbered this is done by -% \cs{refstepcounter} (and so in vmode). For unnumbered section hyperref -% injects the anchor in hmode before the text, it also inserts a -% kern to compensate the indent. -% -% This means that the target of numbered and unnumbered sectioning commands -% differ, both regarding the location and in relation to the -% tagging structure: The anchor from the \cs{refstepcounter} is outside of -% the structure created by the heading title if the para tags are used, -% while the other anchors are inside and so the structure destinations are different. -% -% We unify this by suppressing the anchor from the refstepcounter. -% Also we only go back if the indent is positive. -% -% At first suppress all hyperref patches related to sectioning: -% \begin{macrocode} -\def\hyper@nopatch@sectioning{} -% \end{macrocode} -% -% \begin{macro}{\@hyp@section@target@nnn} -% A simple internal command. There is no need for something public, -% as packages defining their own version of \cs{@startsection} will -% probably need something slightly different based on \cs{MakeLinkTarget}. -% \begin{macrocode} -\cs_new_protected:Npn \@hyp@section@target@nnn #1 #2 #3 %#1 optarg #2 name/counter, #3 indent - { - \makebox[0pt][l] - { - \skip_set:Nn \@tempskipa {#3} - \dim_compare:nNnF {\@tempskipa}<{0pt}{\kern-\@tempskipa} - \MakeLinkTarget#1{#2} - } - \tl_if_blank:VF \@currentHref - { - \prop_gput:Nxx \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}} - } - } -% \end{macrocode} -% \end{macro} -% -% \subsection{Adaption of the heading commands} -% We add to \cs{@startsection} the commands to open the \texttt{Sect} -% structure and to change the para tag. -% -% \begin{macrocode} -\def\@startsection#1#2#3#4#5#6{% - \if@noskipsec \leavevmode \fi - \par - \@tempskipa #4\relax - \@afterindenttrue - \ifdim \@tempskipa <\z@ - \@tempskipa -\@tempskipa \@afterindentfalse - \fi - \if@nobreak - \everypar{}% - \else - \addpenalty\@secpenalty\addvspace\@tempskipa - \fi - \tag_tool:n { sec-start=#1}%new - \@ifstar - {\@ssect{#3}{#4}{#5}{#6}}% - {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}} -% \end{macrocode} -% To be able to correctly tag the number we need a special -% \cs{@hangfrom} variant. This is a bit tricky: -% As the paragraph starts after the \cs{setbox} luatex attributes -% are not set yet and numbers are unmarked if one doesn't pay attention. -% The code assumes that we are in vmode! -% \begin{macrocode} -\cs_new_protected:Npn \@kernel@tag@hangfrom #1 - { - \tagstructbegin{tag=\l__tag_para_tag_tl} - \tagstructbegin{tag=Lbl} - \setbox\@tempboxa - \hbox - { -% \end{macrocode} -% In lua mode we have to set the attributes inside the box! -% \begin{macrocode} - \bool_lazy_and:nnT - {\tag_if_active_p:} - {\g__tag_mode_lua_bool} - {\tagmcbegin{tag=Lbl}} - {#1} - } -% \end{macrocode} -% We stop tagging now, to avoid that the \cs{noindent} triggers -% the paratagging. We do not disable paratagging completely, to -% avoid that the numbering goes wrong. -% \begin{macrocode} - \tag_stop:n{hangfrom} - \hangindent \wd\@tempboxa\noindent -% \end{macrocode} -% Restart tagging and insert the box. -% \begin{macrocode} - \tag_start:n{hangfrom} - \tagmcbegin{}\box\@tempboxa\tagmcend\tagstructend\tagmcbegin{}} -% \end{macrocode} -% This command is used to tag the numbers of runin. We do not try -% to avoid the empty container from the paratagging, this would require -% more changes. -% \begin{macrocode} -\cs_new_protected:Npn \@kernel@tag@svsec - { - \tag_mc_end_push: - \tag_struct_begin:n{tag=Lbl} - \tag_mc_begin:n{} - \@svsec - \tag_mc_end: - \tag_struct_end: - \tag_mc_begin_pop:n{} - } -% \end{macrocode} -% \cs{@sect} is only changed to replace the hyperref patches -% and to use the new \cs{@kernel@tag@hangfrom} and \cs{@kernel@tag@svsec} -% \begin{macrocode} -\def\@sect#1#2#3#4#5#6[#7]#8{% - \ifnum #2>\c@secnumdepth - \def\@svsec{\@hyp@section@target@nnn{[section]}{}{#3}} - \else - \LinkTargetOff - \refstepcounter{#1}% - \LinkTargetOn - \protected@edef\@svsec{\@hyp@section@target@nnn{}{#1}{#3}\@seccntformat{#1}\relax}% - \fi - \@tempskipa #5\relax - \ifdim \@tempskipa>\z@ - \begingroup - \tagtool{para-flattened=true} % or \bool_set_true\l__tag_para_flattened_bool - #6{% - \ifnum #2>\c@secnumdepth - \@hangfrom {\hskip #3\relax\@svsec}% - \else - \@kernel@tag@hangfrom{\hskip #3\relax\@svsec}% - \fi - \interlinepenalty \@M #8\@@par}% - \endgroup - \csname #1mark\endcsname{#7}% - \addcontentsline{toc}{#1}{% - \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% - \fi - #7}% - \else - \def\@svsechd{% - #6{\hskip #3\relax - \ifnum #2>\c@secnumdepth - \@svsec - \else - \@kernel@tag@svsec - \fi #8}% - \csname #1mark\endcsname{#7}% - \addcontentsline{toc}{#1}{% - \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% - \fi - #7}}% - \fi - \@xsect{#5}} -% \end{macrocode} -% similar for \cs{@ssect} -% \begin{macrocode} -\def\@ssect#1#2#3#4#5{% - \@tempskipa #3\relax - \ifdim \@tempskipa>\z@ - \begingroup - \tagtool{para-flattened=true} - #4{% - \@hangfrom{\hskip #1\relax\@hyp@section@target@nnn{[section]}{}{#1}}% - \interlinepenalty \@M #5\@@par}% - \endgroup - \else - \def\@svsechd{#4{\hskip #1\relax\@hyp@section@target@nnn{[section]}{}{#3}\relax #5}}% - \fi - \@xsect{#3}} -% \end{macrocode} -% At last \cs{@xsect} needs code in two places. For display headings it has to -% restore the default para code, for run in headings it has to separated the -% heading from the following text. -% \begin{macrocode} -\def\@xsect#1{% - \@tempskipa #1\relax - \ifdim \@tempskipa>\z@ - \par \nobreak - \vskip \@tempskipa - \tag_tool:n {restore-para} - \@afterheading - \else - \@nobreakfalse - \global\@noskipsectrue - \everypar{% - \if@noskipsec - \global\@noskipsecfalse - {\setbox\z@\lastbox}% - \clubpenalty\@M - \begingroup \@svsechd \endgroup - \unskip - \tag_tool:n {sec-split-para} - \@tempskipa #1\relax - \hskip -\@tempskipa - \else - \clubpenalty \@clubpenalty - \everypar{}% - \fi}% - \fi - \ignorespaces} -% -% \end{macrocode} - -% \begin{macrocode} -%<*latex-lab> -\ProvidesFile{sec-tagging-latex-lab-testphase.ltx} - [2023-02-12 v0.81 code related to the tagging of sectioning commands] -\RequirePackage{latex-lab-testphase-sec-tagging} -% -% \end{macrocode} diff --git a/macros/latex-dev/required/latex-lab/latex-lab-sec-tagging.pdf b/macros/latex-dev/required/latex-lab/latex-lab-sec-tagging.pdf deleted file mode 100644 index 09e73151bc..0000000000 Binary files a/macros/latex-dev/required/latex-lab/latex-lab-sec-tagging.pdf and /dev/null differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-sec.dtx b/macros/latex-dev/required/latex-lab/latex-lab-sec.dtx new file mode 100644 index 0000000000..62a8d4c9bf --- /dev/null +++ b/macros/latex-dev/required/latex-lab/latex-lab-sec.dtx @@ -0,0 +1,818 @@ +% \iffalse meta-comment +% +%% File: latex-lab-sec.dtx (C) Copyright 2022-2023 LaTeX Project +% +% It 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 +% +% https://www.latex-project.org/lppl.txt +% +% +% The development version of the bundle can be found below +% +% https://github.com/latex3/latex2e/required/latex-lab +% +% for those people who are interested or want to report an issue. +% +%<*driver> +\documentclass{l3doc} +\EnableCrossrefs +\CodelineIndex +\begin{document} + \DocInput{latex-lab-sec.dtx} +\end{document} +% +% +% \fi +% +% +% \title{The \textsf{latex-lab-sec} package\\ +% Changes related to the tagging of sectioning commands} +% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}} +% \date{v0.82 2023-05-20} +% +% \maketitle +% +% \newcommand{\xt}[1]{\textsl{\textsf{#1}}} +% \newcommand{\TODO}[1]{\textbf{[TODO:} #1\textbf{]}} +% \newcommand{\docclass}{document class \marginpar{\raggedright document class +% customizations}} +% +% \providecommand\hook[1]{\texttt{#1}} +% +% \begin{abstract} +% The following code implements a first draft for the tagging of sectioning commands. +% \end{abstract} +% +% \section{Limitations} +% +% Sectioning commands are in not defined by the format but by the classes. +% Their implementation vary: some are defined with the help of \cs{@startsection}, +% some are like \cs{chapter} handcrafted, +% some build with the help of extension packages or as in the KOMA classes +% with class code that extends the \cs{@startsection} functionality. +% +% The following code can therefore currently be used \emph{only} with the standard classes +% or with classes which do not overwrite the changed definitions. +% +% +% +% \section{Introduction} +% +% Tagging of sectioning commands consist of two parts: +% +% \begin{itemize} +% \item The heading/title text of the section should be surrounded by a +% heading tag, typically \texttt{Hn} with some value of \texttt{n}. +% The number of the section command can optionally be put in a \texttt{Lbl}. +% The number of the \texttt{Hn} tag should reflect the \enquote{natural} level. +% So in an article \cs{section} will use \texttt{H1}, in a book \cs{chapter} will use +% \texttt{H1} and \cs{section} \texttt{H2}. +% Titles of \cs{part} are a bit out of this system as they are normally +% not part of the hierarchy: often only some chapters are grouped under a part. +% Their title is therefore tagged as \texttt{Title}. +% \item +% The whole section should normally be surrounded by +% a \texttt{Sect} tag. Parts should be surrounded by \texttt{Part}. +% It is a bit unclear if the headings should be inside or outside of these +% structures---the best practice guide puts them outside---but on the whole +% it sounds more logical to group the heading with the text inside the \texttt{Sect}. +% For the part this is actually required, as there can be only one \texttt{Title} +% in a structure, so the part title can't be at the same level as the +% document \texttt{Title}. +% +% Starting such an enclosing \texttt{Sect} structure is rather easy, +% but closing it requires code in various place, +% for example the commands \cs{mainmatter}, \cs{backmatter}, +% \cs{frontmatter} and \cs{appendix} should typically close everything. +% Following sectioning commands should close all previous structures +% with a level equal or higher than their own level. +% \end{itemize} +% +% \section{Technical details and problems} +% +% The implementation has to take care of various details. +% +% \begin{itemize} +% +% \item As sections in \LaTeX{} are not environments, the +% \texttt{} structures can be wrongly nested with other structures. For example +% if a document puts a sectioning command into a list or a trivlist or +% a minipage then it can no longer close previous \texttt{} structures correctly. +% The problem can be detected by checking the structure stack +% and a warning can be issued, but the author then has to close the structures +% manually before the list or minipage. +% +% Thus there have to be user interfaces to handle such cases. +% It should also be possible not to create all the \texttt{} structures +% automatically but to tag only the headings so that the author can handle special +% cases manually. +% +% \item If hyperref is used, targets for links should be inserted, either with +% \cs{refstepcounter} or manually with \cs{MakeLinkTarget}. These targets must be +% in the correct structure for the structure destinations. They replace some +% of the current patches in hyperref. +% +% \item With lualatex the mc-commands set attributes \emph{locally}, so the +% commands must be at the right grouping level. +% \end{itemize} +% +% \subsection{Funktions and keys} +% +% \begin{function}{\tag_tool:n,\tagtool} +% +% \end{function} +% +% \subsection{TODO} +% +% \begin{itemize} +% \item A dedicated command to close a sectioning unit should be provided. +% +% \item A dedicated command to open a sectioning unit should be provided too. +% +% \item It should also be possible to suppress the sectioning unit in sectioning commands +% to allow e.g. to put an epigraph or similar in front. +% +% \item The number in \cs{part} and \cs{chapter} is currently not correctly +% tagged as a \texttt{Lbl} as this requires to redefine the internal (class dependant) +% commands too. +% +% \end{itemize} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \section{Implementation} +% \begin{macrocode} +\ProvidesExplPackage {latex-lab-testphase-sec} {2023-05-20} {0.81} + {Code related to the tagging of sectioning commands} +% \end{macrocode} +% +% \subsection{Surrounding by \texttt{Sect} structures} +% We use a stack to record the levels of the open \texttt{Sect}. The first item +% has level -100. A sectioning command will take a record from the stack. If its level is +% greater or equal it closes this structure and takes the next record from the stack. +% If the record has a smaller level then it puts it back and stops. +% The stack is compared with the main structure stack, if they don't match +% it means we can't safely close the \texttt{Sect} and so we issue a warning +% and do nothing. +% +% \subsubsection{Loading general kernel changes} +% [kernel?] +% Also loaded in the toc-tagging code. +% \begin{macrocode} +\RequirePackage{latex-lab-kernel-changes} +% \end{macrocode} +% \begin{macrocode} +% +% \end{macrocode} +% \subsubsection{Glyphtounicode improvements} +% +% As lualatex runs with legacy encodings in the test files, we enable and +% load glyphtounicode. For the math we load additional definitions. +% +% \begin{macrocode} +%<*kernelchange> +\ifdefined\directlua + \pdfvariable gentounicode =1 + \protected\def\pdfglyphtounicode {\pdfextension glyphtounicode } + \input{glyphtounicode} +\fi +\ifdefined\pdfglyphtounicode + \input{glyphtounicode-cmex} +\fi +% +% \end{macrocode} +% +% \subsubsection{updating \cs{@currentHref}} +% [kernel?] +% +% We must ensure that manual targets (e.g. in unnumbered sections) +% correctly update \cs{@currentHref}. For this we extend the kernel definition of +% \cs{MakeLinkTarget} +% +% \begin{macrocode} +%<*kernelchange> +\ExplSyntaxOn +\int_new:N\g__kernel_target_int +\RenewDocumentCommand\MakeLinkTarget{sO{}m} + {% + \ifvmode + \special{}% + \else + \@savsf\spacefactor + \smash{}% + \spacefactor\@savsf + \fi + \IfBooleanTF {#1} + { + \tl_gset:Nx \@currentHref {#3} + } + { + \int_gincr:N\g__kernel_target_int + \tl_gset:Nx \@currentHref {target*.\int_use:N\g__kernel_target_int} + } + } +\ExplSyntaxOff +% +% \end{macrocode} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% \subsubsection{Tagging commands} +% +% +% \begin{variable}{\g__tag_sec_stack_seq} +% The stack holds the tag and the level. +% \begin{macrocode} +\seq_new:N \g__tag_sec_stack_seq +\seq_gpush:Nn\g__tag_sec_stack_seq {{Document}{-100}} +% \end{macrocode} +% \end{variable} +% +% \begin{variable}{\l__tag_sec_Sect_bool} +% This boolean controls if a Sect structure is opened. +% \begin{macrocode} +\bool_new:N \l__tag_sec_Sect_bool +\bool_set_true:N\l__tag_sec_Sect_bool +% \end{macrocode} +% \end{variable} + +% +% \begin{macro}{\__tag_sec_begin:nn} +% This starts a sectioning structure. +% Currently the tag is fix, either Sect or Part, depending on the level, +% but this will perhaps change. The second argument is currently unused. +% \begin{macrocode} +\cs_new_protected:Npn\__tag_sec_begin:nn #1 #2 %#1 level #2 keyval + { + \tag_struct_begin:n + { + tag= {\int_compare:nNnTF {#1}={-1}{Part}{Sect}} + ,#2 + } + \seq_gpush:Nx \g__tag_sec_stack_seq {{\g__tag_struct_tag_tl}{\int_eval:n{#1}}} + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\__tag_sec_end:n} +% \begin{macrocode} +\msg_new:nnn { tag } {wrong-sect-nesting} + { + The~structure~#1~can~not~be~closed.\\ + It~is~not~equal~to~the~current~structure~#2~on~the~main~stack + } + +\cs_new_protected:Npn\__tag_sec_end:n #1 % #1 level + { + \seq_get:NN \g__tag_sec_stack_seq \l__tag_tmpa_tl + \int_compare:nNnT {#1}<{\exp_last_unbraced:NV\use_ii:nn\l__tag_tmpa_tl+1} + { + \seq_get:NN\g__tag_struct_tag_stack_seq \l__tag_tmpb_tl + \exp_args:Nee + \tl_if_eq:nnTF + {\exp_last_unbraced:NV\use_i:nn\l__tag_tmpa_tl} + {\exp_last_unbraced:NV\use_i:nn\l__tag_tmpb_tl} + { + \seq_gpop:NN \g__tag_sec_stack_seq \l__tag_tmpa_tl + \tag_struct_end: + \__tag_sec_end:n {#1} + } + { + \msg_warning:nnxx {tag}{wrong-sect-nesting} + { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpa_tl } + { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpb_tl } + } + } + } +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\__tag_tool_para_split:} +% Runin-sectioning command must separate the heading from the following text. +% +% \begin{macrocode} +\cs_new_protected:Npn \__tag_tool_para_split: + { + \tag_mc_end: + \tag_struct_end: + \tag_struct_begin:n{tag=\l__tag_para_tag_default_tl} + \tag_mc_begin:n{} + \__tag_setup_restore_para_default: + } +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\__tag_setup_restore_para_default:} +% We change the para tagging in the sectioning code. +% This here restores the default. Currently it only resets the +% the tag, but perhaps more will be needed later. +% \begin{macrocode} +\cs_new_protected:Npn \__tag_setup_restore_para_default: + { + \tl_set:Nn \l__tag_para_main_tag_tl {text-unit} + \tl_set_eq:NN\l__tag_para_tag_tl\l__tag_para_tag_default_tl + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\__tag_sec_end_display:} +% \begin{macrocode} +\cs_new_protected:Npn \__tag_sec_end_display: + { + \tag_struct_end: %P = Hn + \__tag_setup_restore_para_default: + } +% \end{macrocode} +% \end{macro} +% +% Open sec structures should be closed at the end of the document. This should +% be done before tagpdf closes the Document structure. +% \begin{macrocode} +\hook_gput_code:nnn{tagpdf/finish/before}{tagpdf/sec}{\__tag_sec_end:n{-10}} +\hook_gset_rule:nnnn {tagpdf/finish/before}{tagpdf/sec}{before}{tagpdf} +% \end{macrocode} +% +% The commands \cs{mainmatter}, \cs{backmatter}, \cs{frontmatter} and +% \cs{appendix} close all \texttt{Sect} and \texttt{Part} structures. +% \begin{macrocode} +\AddToHook{cmd/frontmatter/before}{\__tag_sec_end:n{-10}} +\AddToHook{cmd/mainmatter/before} {\__tag_sec_end:n{-10}} +\AddToHook{cmd/backmatter/before} {\__tag_sec_end:n{-10}} +\AddToHook{cmd/appendix/before} {\__tag_sec_end:n{-10}} +% \end{macrocode} +% +% \subsection{Tagging tools} +% We need to provide user and package level commands +% +% \begin{macrocode} +\cs_if_free:NT \tag_tool:n + { + \cs_new_protected:Npn \tag_tool:n #1 + { + \tag_if_active:T { \keys_set:nn {tag / tool}{#1} } + } + \cs_set_eq:NN\tagtool\tag_tool:n + } +\keys_define:nn { tag / tool} + { + ,sec-start-part .code:n = + { + \bool_if:NT\l__tag_sec_Sect_bool + { + \__tag_sec_end:n {-1} + \__tag_sec_begin:nn{-1}{tag=Part} + } + \tag_struct_begin:n{tag=part,title=#1} +% \end{macrocode} +% We remap here the text-unit from the paragraph to NonStruct. +% It would be better to suppress it completly as with the other +% sectioning commands, but this would require to redefine \cs{@spart} +% and \cs{@part}, as there is the grouping, and these commands are +% all slightly different in the standard classes. So this is delayed +% to the time when sectioning commands are redefined with templates. +% \begin{macrocode} + \tl_set:Nn\l__tag_para_main_tag_tl {NonStruct} + \tl_set:Nn\l__tag_para_tag_tl {Span} + } + ,sec-stop-part .code:n = {\__tag_sec_end_display:} + ,sec-start-chapter .code:n = + { + \bool_if:NT\l__tag_sec_Sect_bool + { + \__tag_sec_end:n {0} + \__tag_sec_begin:nn{0}{tag=Sect} + } + \tag_struct_begin:n{tag=chapter,title=#1} +% \end{macrocode} +% similar to part we remap to NonStruct for now ... +% \begin{macrocode} + \tl_set:Nn\l__tag_para_main_tag_tl {NonStruct} + \tl_set:Nn\l__tag_para_tag_tl {Span} + } + ,sec-stop-chapter .meta:n = { sec-stop-part} + ,sec-start .code:n = % #1 is a name like "section" + { + \bool_if:NT\l__tag_sec_Sect_bool + { + \__tag_sec_end:n {\cs_if_exist_use:c{toclevel@#1}+0} + \__tag_sec_begin:nn {\cs_if_exist_use:c{toclevel@#1}+0}{tag=Sect} + } + \tl_set:Nn\l__tag_para_tag_tl{#1} + } + ,sec-start .value_required:n = true + ,sec-split-para .code:n = {\__tag_tool_para_split:} + ,restore-para .code:n = {\__tag_setup_restore_para_default:} + ,sec-stop .code:n = + { + \par\__tag_sec_end:n {\cs_if_exist_use:c{toclevel@#1}+0} + } + ,sec-stop .value_required:n = true + ,sec-add-grouping .bool_set:N = \l__tag_sec_Sect_bool + } +% \end{macrocode} +% +% +% \section{Sectioning commands} +% +% \subsection{\cs{part} and \cs{chapter}} +% +% \cs{part} and \cs{chapter} are defined by the classes. +% To tag them we redefine the user commands. +% This will probably break with various classes and with titlesec. +% The tagging inside relies on the para tagging. +% We do not yet use keyval in the optional argument, as this requires latex-dev +% and the naming of the keys and their key family is unclear. +% \begin{macrocode} +\AddToHook{class/after} + { + \@ifundefined{chapter} + { +% \end{macrocode} +% This redefines \cs{part} in article class. +% \begin{macrocode} + \RenewDocumentCommand\part{ s O{#3} m } + { + \if@noskipsec \leavevmode \fi + \par + \addvspace{4ex}% + \@afterindentfalse +% \end{macrocode} +% This are the tagging commands needed at the begin. They open a Part structure +% and the structure for the title of the heading. +% \begin{macrocode} + % tagging start commands + \tag_tool:n {sec-start-part=#2} + % end tagging start commands +% \end{macrocode} +% This adds a manual target if the part is unnumbered or starred. +% It replaces the hyperref patches. +% \begin{macrocode} + \bool_lazy_any:nT + { + { #1 } + { + \int_compare_p:nNn {\c@secnumdepth}<{-1} + } + } + { + \MakeLinkTarget[part]{} + } +% \end{macrocode} +% The main call to the underlying commands. +% \begin{macrocode} + \IfBooleanTF + {#1} + { \@spart {#3} } + { \@part [#2]{#3} } +% \end{macrocode} +% and now the closing command for the tagging of the title. +% \begin{macrocode} + \tag_tool:n {sec-stop-part} + } + } +% \end{macrocode} +% Redefinitions for book and report +% \begin{macrocode} + { + \RenewDocumentCommand\chapter{ s O{#3} m } + { + \if@openright\cleardoublepage\else\clearpage\fi + \thispagestyle{plain}% + \global\@topnum\z@ + \@afterindentfalse +% \end{macrocode} +% This are the tagging commands needed at the begin. They open a Sect structure +% and the structure for the title of the heading. +% \begin{macrocode} + \tag_tool:n { sec-start-chapter= #2 } +% \end{macrocode} +% This adds a manual target if the chapter is unnumbered or starred. +% It replaces the hyperref patches. +% \begin{macrocode} + \bool_lazy_any:nT + { + { #1 } + { + \int_compare_p:nNn {\c@secnumdepth}<{0} + } + { + %in book target also needed in frontmatter + \bool_lazy_and_p:nn + { \cs_if_exist_p:c { @mainmattertrue } } + { ! \legacy_if_p:n { @mainmatter } } + } + } + { + \MakeLinkTarget[chapter]{} + %todo public function for this update! + \tl_if_blank:VF \@currentHref + { + \prop_gput:Nxx \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}} + } + } +% \end{macrocode} +% The main call to the underlying commands. +% \begin{macrocode} + \IfBooleanTF + {#1} + { \@schapter {#3} } + { \@chapter [#2]{#3} } +% \end{macrocode} +% and now the closing command for the tagging of the title. +% \begin{macrocode} + \tag_tool:n {sec-stop-chapter} + } +% \end{macrocode} +% and similar for \cs{part} +% \begin{macrocode} + \RenewDocumentCommand\part{ s O{#3} m } + { + \if@openright + \cleardoublepage + \else + \clearpage + \fi + \thispagestyle{plain}% + \if@twocolumn + \onecolumn + \@tempswatrue + \else + \@tempswafalse + \fi + \null\vfil +% \end{macrocode} +% This are the tagging commands needed at the begin. They open a Part structure +% and the structure for the title of the heading. +% \begin{macrocode} + \tag_tool:n {sec-start-part=#2} +% \end{macrocode} +% This adds a manual target if the part is unnumbered or starred. +% It replaces the hyperref patches. +% \begin{macrocode} + \bool_lazy_any:nT + { + { #1 } + { + \int_compare_p:nNn {\c@secnumdepth}<{-1} + } + { + %in book target also needed in frontmatter + \bool_lazy_and_p:nn + { \cs_if_exist_p:c { @mainmattertrue } } + { ! \legacy_if_p:n { @mainmatter } } + } + } + { + \MakeLinkTarget[part]{} + \tl_if_blank:VF \@currentHref + { + \prop_gput:Nxx \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}} + } + } +% \end{macrocode} +% The main call to the underlying commands. +% \begin{macrocode} + \IfBooleanTF + {#1} + { \@spart {#3} } + { \@part [#2]{#3} } +% \end{macrocode} +% and now the closing command for the tagging of the title. +% \begin{macrocode} + \tag_tool:n{sec-stop-part} + } + } + } +% \end{macrocode} +% +% \subsection{Sectioning commands based on \cs{@startsection}} +% +% The tagging of relies again on the para tagging: +% we simply exchange the tag name by the one given as \#1. +% This assumes that a tag with the name of the sectioning type is defined. +% We don't try to pass the title, this will be done together with +% the new keyval handling in the user command. +% +% \subsubsection{Hyperref code} +% hyperref has to insert anchors. If the sectioning is numbered this is done by +% \cs{refstepcounter} (and so in vmode). For unnumbered section hyperref +% injects the anchor in hmode before the text, it also inserts a +% kern to compensate the indent. +% +% This means that the target of numbered and unnumbered sectioning commands +% differ, both regarding the location and in relation to the +% tagging structure: The anchor from the \cs{refstepcounter} is outside of +% the structure created by the heading title if the para tags are used, +% while the other anchors are inside and so the structure destinations are different. +% +% We unify this by suppressing the anchor from the refstepcounter. +% Also we only go back if the indent is positive. +% +% At first suppress all hyperref patches related to sectioning: +% \begin{macrocode} +\def\hyper@nopatch@sectioning{} +% \end{macrocode} +% +% \begin{macro}{\@hyp@section@target@nnn} +% A simple internal command. There is no need for something public, +% as packages defining their own version of \cs{@startsection} will +% probably need something slightly different based on \cs{MakeLinkTarget}. +% \begin{macrocode} +\cs_new_protected:Npn \@hyp@section@target@nnn #1 #2 #3 %#1 optarg #2 name/counter, #3 indent + { + \makebox[0pt][l] + { + \skip_set:Nn \@tempskipa {#3} + \dim_compare:nNnF {\@tempskipa}<{0pt}{\kern-\@tempskipa} + \MakeLinkTarget#1{#2} + } + \tl_if_blank:VF \@currentHref + { + \prop_gput:Nxx \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}} + } + } +% \end{macrocode} +% \end{macro} +% +% \subsection{Adaption of the heading commands} +% We add to \cs{@startsection} the commands to open the \texttt{Sect} +% structure and to change the para tag. +% +% \begin{macrocode} +\def\@startsection#1#2#3#4#5#6{% + \if@noskipsec \leavevmode \fi + \par + \@tempskipa #4\relax + \@afterindenttrue + \ifdim \@tempskipa <\z@ + \@tempskipa -\@tempskipa \@afterindentfalse + \fi + \if@nobreak + \everypar{}% + \else + \addpenalty\@secpenalty\addvspace\@tempskipa + \fi + \tag_tool:n { sec-start=#1}%new + \@ifstar + {\@ssect{#3}{#4}{#5}{#6}}% + {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}} +% \end{macrocode} +% To be able to correctly tag the number we need a special +% \cs{@hangfrom} variant. This is a bit tricky: +% As the paragraph starts after the \cs{setbox} luatex attributes +% are not set yet and numbers are unmarked if one doesn't pay attention. +% The code assumes that we are in vmode! +% \begin{macrocode} +\cs_new_protected:Npn \@kernel@tag@hangfrom #1 + { + \tagstructbegin{tag=\l__tag_para_tag_tl} + \tagstructbegin{tag=Lbl} + \setbox\@tempboxa + \hbox + { +% \end{macrocode} +% In lua mode we have to set the attributes inside the box! +% \begin{macrocode} + \bool_lazy_and:nnT + {\tag_if_active_p:} + {\g__tag_mode_lua_bool} + {\tagmcbegin{tag=Lbl}} + {#1} + } +% \end{macrocode} +% We stop tagging now, to avoid that the \cs{noindent} triggers +% the paratagging. We do not disable paratagging completely, to +% avoid that the numbering goes wrong. +% \begin{macrocode} + \tag_stop:n{hangfrom} + \hangindent \wd\@tempboxa\noindent +% \end{macrocode} +% Restart tagging and insert the box. +% \begin{macrocode} + \tag_start:n{hangfrom} + \tagmcbegin{}\box\@tempboxa\tagmcend\tagstructend\tagmcbegin{}} +% \end{macrocode} +% This command is used to tag the numbers of runin. We do not try +% to avoid the empty container from the paratagging, this would require +% more changes. +% \begin{macrocode} +\cs_new_protected:Npn \@kernel@tag@svsec + { + \tag_mc_end_push: + \tag_struct_begin:n{tag=Lbl} + \tag_mc_begin:n{} + \@svsec + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin_pop:n{} + } +% \end{macrocode} +% \cs{@sect} is only changed to replace the hyperref patches +% and to use the new \cs{@kernel@tag@hangfrom} and \cs{@kernel@tag@svsec} +% \begin{macrocode} +\def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2>\c@secnumdepth + \def\@svsec{\@hyp@section@target@nnn{[section]}{}{#3}} + \else + \LinkTargetOff + \refstepcounter{#1}% + \LinkTargetOn + \protected@edef\@svsec{\@hyp@section@target@nnn{}{#1}{#3}\@seccntformat{#1}\relax}% + \fi + \@tempskipa #5\relax + \ifdim \@tempskipa>\z@ + \begingroup + \tagtool{para-flattened=true} % or \bool_set_true\l__tag_para_flattened_bool + #6{% + \ifnum #2>\c@secnumdepth + \@hangfrom {\hskip #3\relax\@svsec}% + \else + \@kernel@tag@hangfrom{\hskip #3\relax\@svsec}% + \fi + \interlinepenalty \@M #8\@@par}% + \endgroup + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}% + \else + \def\@svsechd{% + #6{\hskip #3\relax + \ifnum #2>\c@secnumdepth + \@svsec + \else + \@kernel@tag@svsec + \fi #8}% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}}% + \fi + \@xsect{#5}} +% \end{macrocode} +% similar for \cs{@ssect} +% \begin{macrocode} +\def\@ssect#1#2#3#4#5{% + \@tempskipa #3\relax + \ifdim \@tempskipa>\z@ + \begingroup + \tagtool{para-flattened=true} + #4{% + \@hangfrom{\hskip #1\relax\@hyp@section@target@nnn{[section]}{}{#1}}% + \interlinepenalty \@M #5\@@par}% + \endgroup + \else + \def\@svsechd{#4{\hskip #1\relax\@hyp@section@target@nnn{[section]}{}{#3}\relax #5}}% + \fi + \@xsect{#3}} +% \end{macrocode} +% At last \cs{@xsect} needs code in two places. For display headings it has to +% restore the default para code, for run in headings it has to separated the +% heading from the following text. +% \begin{macrocode} +\def\@xsect#1{% + \@tempskipa #1\relax + \ifdim \@tempskipa>\z@ + \par \nobreak + \vskip \@tempskipa + \tag_tool:n {restore-para} + \@afterheading + \else + \@nobreakfalse + \global\@noskipsectrue + \everypar{% + \if@noskipsec + \global\@noskipsecfalse + {\setbox\z@\lastbox}% + \clubpenalty\@M + \begingroup \@svsechd \endgroup + \unskip + \tag_tool:n {sec-split-para} + \@tempskipa #1\relax + \hskip -\@tempskipa + \else + \clubpenalty \@clubpenalty + \everypar{}% + \fi}% + \fi + \ignorespaces} +% +% \end{macrocode} + +% \begin{macrocode} +%<*latex-lab> +\ProvidesFile{sec-tagging-latex-lab-testphase.ltx} + [2023-05-20 v0.82 code related to the tagging of sectioning commands] +\RequirePackage{latex-lab-testphase-sec} +% +% \end{macrocode} diff --git a/macros/latex-dev/required/latex-lab/latex-lab-sec.pdf b/macros/latex-dev/required/latex-lab/latex-lab-sec.pdf new file mode 100644 index 0000000000..55f295aba4 Binary files /dev/null and b/macros/latex-dev/required/latex-lab/latex-lab-sec.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-testphase.dtx b/macros/latex-dev/required/latex-lab/latex-lab-testphase.dtx index 217605d189..a2fb65ef4a 100644 --- a/macros/latex-dev/required/latex-lab/latex-lab-testphase.dtx +++ b/macros/latex-dev/required/latex-lab/latex-lab-testphase.dtx @@ -84,8 +84,11 @@ [2023-03-06 v0.1a latex-lab wrapper phase-III] \input{phase-II-latex-lab-testphase.ltx} \RequirePackage{latex-lab-testphase-block-tagging} -\RequirePackage{latex-lab-testphase-sec-tagging} -\RequirePackage{latex-lab-testphase-toc-tagging} +\RequirePackage{latex-lab-testphase-sec} +\RequirePackage{latex-lab-testphase-toc} +\RequirePackage{latex-lab-testphase-minipage} +\RequirePackage{latex-lab-testphase-graphic} +\RequirePackage{latex-lab-testphase-float} % % \end{macrocode} % diff --git a/macros/latex-dev/required/latex-lab/latex-lab-testphase.pdf b/macros/latex-dev/required/latex-lab/latex-lab-testphase.pdf index a525ce9013..c907166e23 100644 Binary files a/macros/latex-dev/required/latex-lab/latex-lab-testphase.pdf and b/macros/latex-dev/required/latex-lab/latex-lab-testphase.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.dtx b/macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.dtx index ea39e3a6a5..0b532c6a9b 100644 --- a/macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.dtx +++ b/macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -%% File: toc-hyperref-changes.dtx (C) Copyright 2022-2023 LaTeX Project +%% File: latex-lab-toc-hyperref-changes.dtx (C) Copyright 2022-2023 LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -26,10 +26,10 @@ % % % \fi -% \title{The \textsf{toc-hyperref-changes} package\\ +% \title{The \textsf{latex-lab-toc-hyperref-changes} package\\ % Changes and additions to hyperref related to toc entries} % \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}} -% \date{Version 0.81 2023-02-10} +% \date{Version 0.82 2023-05-20} % % \maketitle % diff --git a/macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.pdf b/macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.pdf index 444d701cdf..cea32c82bc 100644 Binary files a/macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.pdf and b/macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.dtx b/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.dtx index 7485b2c210..3a46b453e5 100644 --- a/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.dtx +++ b/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -%% File: toc-kernel-functions.dtx (C) Copyright 2022-2023 LaTeX Project +%% File: latex-lab-toc-kernel-functions.dtx (C) Copyright 2022-2023 LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -27,10 +27,10 @@ % % \fi % -% \title{The \textsf{toc-kernel-changes} package\\ +% \title{The \textsf{latex-lab-toc-kernel-changes} package\\ % Changes and additions to the kernel related to tagging and links in toc entries} % \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}} -% \date{Version 0.81 2023-02-10} +% \date{Version 0.82 2023-05-20} % % \maketitle % @@ -132,6 +132,7 @@ % once that heading stuff is turned into template % instances the template should set that number. % \begin{macrocode} +\def\toclevel@document{-10} \def\toclevel@part{-1} \def\toclevel@chapter{0} \def\toclevel@section{1} @@ -435,9 +436,9 @@ % \begin{macrocode} %<*latex-lab> \ProvidesFile{toc-tagging-latex-lab-testphase.ltx} - [2022-10-26 v0.8 code related to the tagging of toc and similar lists] + [2023-05-20 v0.81 code related to the tagging of toc and similar lists] -\RequirePackage{latex-lab-testphase-toc-tagging} +\RequirePackage{latex-lab-testphase-toc} % % \end{macrocode} diff --git a/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.pdf b/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.pdf index 1e8357e811..99d6624813 100644 Binary files a/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.pdf and b/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab-toc-tagging-functions.dtx b/macros/latex-dev/required/latex-lab/latex-lab-toc-tagging-functions.dtx index 179e5a868e..a39ace44e5 100644 --- a/macros/latex-dev/required/latex-lab/latex-lab-toc-tagging-functions.dtx +++ b/macros/latex-dev/required/latex-lab/latex-lab-toc-tagging-functions.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -%% File: toc-tagging-functions.dtx (C) Copyright 2022-2023 LaTeX Project +%% File: latex-lab-toc-tagging-functions.dtx (C) Copyright 2022-2023 LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -28,10 +28,10 @@ % \fi % % -% \title{The \textsf{toc-tagging-functions} package\\ +% \title{The \textsf{latex-lab-toc-tagging-functions} package\\ % Tagpdf functions related to the tagging of toc and similar lists} % \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}} -% \date{Version 0.81 2023-02-10} +% \date{Version 0.82 2023-05-20} % % \maketitle % @@ -48,7 +48,7 @@ % Header for the testphase package % \begin{macrocode} %<*header> -\ProvidesExplPackage {latex-lab-testphase-toc-tagging} {2023-02-10} {0.81} +\ProvidesExplPackage {latex-lab-testphase-toc} {2023-05-20} {0.82} { commands related to the tagging of toc-like lists} % % \end{macrocode} @@ -356,7 +356,7 @@ % % \begin{macrocode} \def\@dottedtocline@cfgpoint@leaders#1{% - \tag_mc_begin:n{artifact}\nobreak#1\nobreak\tag_mc_end:} + \tag_mc_begin:n{artifact}\tag_stop:n{leaders}\nobreak#1\nobreak\tag_start:n{leaders}\tag_mc_end:} % \end{macrocode} % diff --git a/macros/latex-dev/required/latex-lab/latex-lab-toc-tagging-functions.pdf b/macros/latex-dev/required/latex-lab/latex-lab-toc-tagging-functions.pdf index b0b3f531db..d5065171f8 100644 Binary files a/macros/latex-dev/required/latex-lab/latex-lab-toc-tagging-functions.pdf and b/macros/latex-dev/required/latex-lab/latex-lab-toc-tagging-functions.pdf differ diff --git a/macros/latex-dev/required/latex-lab/latex-lab.ins b/macros/latex-dev/required/latex-lab/latex-lab.ins index ab77bbb846..e2ca6049e5 100644 --- a/macros/latex-dev/required/latex-lab/latex-lab.ins +++ b/macros/latex-dev/required/latex-lab/latex-lab.ins @@ -90,11 +90,11 @@ where one can also log issues in case there are any. \generate{\file{latex-lab-mathtools.ltx}{\from{latex-lab-mathtools.dtx}{kernel}}} \generate{\file{latex-lab-mathpkg.ltx}{\from{latex-lab-mathpkg.dtx}{kernel}}} -\generate{\file{latex-lab-testphase-sec-tagging.sty}{\from{latex-lab-sec-tagging.dtx}{package}}} -\generate{\file{sec-tagging-latex-lab-testphase.ltx}{\from{latex-lab-sec-tagging.dtx}{latex-lab}}} +\generate{\file{latex-lab-testphase-sec.sty}{\from{latex-lab-sec.dtx}{package}}} +\generate{\file{sec-tagging-latex-lab-testphase.ltx}{\from{latex-lab-sec.dtx}{latex-lab}}} -\generate{\file{latex-lab-testphase-toc-tagging.sty}{% +\generate{\file{latex-lab-testphase-toc.sty}{% \from{latex-lab-toc-tagging-functions.dtx}{header} \from{latex-lab-toc-kernel-changes.dtx}{package} \from{latex-lab-toc-tagging-functions.dtx}{package} @@ -105,11 +105,37 @@ where one can also log issues in case there are any. \generate{\file{latex-lab-kernel-changes.sty} {\from{latex-lab-toc-kernel-changes.dtx}{kernelchange} - \from{latex-lab-sec-tagging.dtx}{kernelchange} + \from{latex-lab-sec.dtx}{kernelchange} }} +\generate{\file{latex-lab-testphase-graphic.sty}{% + \from{latex-lab-graphic.dtx}{package}}} + +\generate{\file{graphic-latex-lab-testphase.ltx}{% + \from{latex-lab-graphic.dtx}{latex-lab}}} + \generate{\file{latex-lab-testphase-block-tagging.sty}{\from{latex-lab-block-tagging.dtx}{package}}} \generate{\file{block-tagging-latex-lab-testphase.ltx}{\from{latex-lab-block-tagging.dtx}{latex-lab}}} +\generate{\file{latex-lab-testphase-minipage.sty}{% + \from{latex-lab-minipage.dtx}{package}}} + +\generate{\file{minipage-latex-lab-testphase.ltx}{% + \from{latex-lab-minipage.dtx}{latex-lab}}} + + \generate{\file{latex-lab-testphase-float.sty}{% + \from{latex-lab-float.dtx}{package}}} + +\generate{\file{float-latex-lab-testphase.ltx}{% + \from{latex-lab-float.dtx}{latex-lab}}} + +\generate{\file{latex-lab-testphase-bib.sty}{% + \from{latex-lab-bib.dtx}{package}}} + +\generate{\file{bib-latex-lab-testphase.ltx}{% + \from{latex-lab-bib.dtx}{latex-lab}}} + + + \endbatchfile diff --git a/macros/latex-dev/required/latex-lab/usage-of-@footnotemark.md b/macros/latex-dev/required/latex-lab/usage-of-@footnotemark.md new file mode 100644 index 0000000000..ad50b36732 --- /dev/null +++ b/macros/latex-dev/required/latex-lab/usage-of-@footnotemark.md @@ -0,0 +1,189 @@ +# Packages that alter \@footnotemark ... + +Scan of TeXlive 2022 for checking ... may not be longer accurate and may contain a few false positives + +``` +% bibarts + +\let\ba@footnmark=\@footnotemark +\def\@footnotemark{\ifhmode{\nobreak \hskip 0.04em plus 0.01em}\else\leavevmode\fi\ba@footnmark}% + + +% ./bxjscls/bxjsja-minimal.def + +\def\bxjs@cjk@loaded{% + \def\@footnotemark{% + \leavevmode + \ifhmode + \edef\@x@sf{\the\spacefactor}% + \ifdim\lastkern>\z@\ifdim\lastkern<5sp\relax + \unkern\unkern + \ifdim\lastskip>\z@ \unskip \fi + \fi\fi + \nobreak + \fi + \@makefnmark + \ifhmode \spacefactor\@x@sf \fi + \relax}% + \let\bxjs@cjk@loaded\relax +} + +% ./arabtex/afoot.sty + +\let \a@@footnotemark \@footnotemark + +\def \a@footnotemark {% inside Arabic environment +\iftrans \unskip \unskip \nobreak \@makefnmark \fi +\ifarab \a@spacefalse \putwordb@x \@makefnmark \a@spacetrue \fi } + +% ./hyperref/hyperref.sty + + \def\@footnotemark{% + \leavevmode + \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi + \stepcounter{Hfootnote}% + \global\let\Hy@saved@currentHref\@currentHref + \hyper@makecurrent{Hfootnote}% + \global\let\Hy@footnote@currentHref\@currentHref + \global\let\@currentHref\Hy@saved@currentHref + \hyper@linkstart{link}{\Hy@footnote@currentHref}% + \@makefnmark + \hyper@linkend + \ifhmode\spacefactor\@x@sf\fi + \relax + }% + + +% ./hypdvips/hypdvips.sty + + \def\@footnotemark{% + \leavevmode + \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi + \stepcounter{Hfootnote}% + \global\let\Hy@saved@currentHref\@currentHref + \hyper@makecurrent{Hfootnote}% + \global\let\Hy@footnote@currentHref\@currentHref + \global\let\@currentHref\Hy@saved@currentHref + \ifHy@draft% + \@makefnmark% + \else% + \pp@hyperfootnote% + \fi% + \ifhmode\spacefactor\@x@sf\fi + \relax + } + + \newcommand{\pp@hyperfootnote}{% + \ifx\pp@activerect\pp@true% + \@makefnmark% + \else% + \ifpp@smallfootnotes% + \let\pp@backup@@thefnmark\@thefnmark% + \renewcommand{\@thefnmark}{\pdf@rect{\pp@backup@@thefnmark}}% + \Hy@colorlink\@footnotecolor% + \@makefnmark% + \Hy@endcolorlink% + \pdfmark{% + pdfmark=/ANN,% + linktype=footnote,% + Subtype=/Link,% + AcroHighlight=\@pdfhighlight,% + Border=\@pdfborder,% + BorderStyle=\@pdfborderstyle,% + Color=\@footnotebordercolor,% + Dest=\Hy@footnote@currentHref,% + Raw=H.B% + }% + \let\@thefnmark\pp@backup@@thefnmark% + \else% + \pdfmark[\@makefnmark]{% + pdfmark=/ANN,% + linktype=footnote,% + Subtype=/Link,% + AcroHighlight=\@pdfhighlight,% + Border=\@pdfborder,% + BorderStyle=\@pdfborderstyle,% + Color=\@footnotebordercolor,% + Dest=\Hy@footnote@currentHref% + }% + \fi% + \fi% + } + + +% ./memoir/memhfixc.sty + +\ifHy@hyperfootnotes + \def\@footnotemark{% + \leavevmode + \ifhmode\edef\@x@sf{\the\spacefactor}% + \m@mmf@check% <--- added + \nobreak\fi + \stepcounter{Hfootnote}% + \global\let\Hy@saved@currentHref\@currentHref + \hyper@makecurrent{Hfootnote}% + \global\let\Hy@footnote@currentHref\@currentHref + \global\let\@currentHref\Hy@saved@currentHref + \hyper@linkstart{link}{\Hy@footnote@currentHref}% + \@makefnmark + \hyper@linkend + \m@mmf@prepare% <--- added + \ifhmode\spacefactor\@x@sf\fi + \relax + }% +\fi + + +% caption3.sty + +% this is altering the top-level when inside a float + + +% ./koma-script/scrlttr2.cls + +\newcommand*{\scr@footnotemark}{% + \leavevmode + \ifhmode\edef\@x@sf{\the\spacefactor}\FN@mf@check\nobreak\fi + \@makefnmark + \csname FN@mf@prepare\endcsname + \ifhmode\spacefactor\@x@sf\fi + \relax} + +% tested against this ... + +\newcommand*{\scr@saved@footnotemark}{% + \leavevmode + \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi + \@makefnmark + \ifhmode\spacefactor\@x@sf\fi + \relax} + + +% ./chextras/chextras.sty + +\ifstd@notes\else + \let\std@footnotemark\@footnotemark + \def\alt@footnotemark{\unskip\thinspace\std@footnotemark} + \let\@footnotemark\alt@footnotemark + +% footmisx.sty + + \newcommand*\@footmisxnotemark{% + \leavevmode + \ifhmode + \edef\@x@sf{\the\spacefactor}% + \FN@mf@check + \nobreak + \fi + \@footmicx@makefnmark + \ifFN@pp@towrite + \FN@pp@writetemp + \FN@pp@towritefalse + \fi + \FN@mf@prepare + \ifhmode\spacefactor\@x@sf\fi + \relax + } + + +``` diff --git a/macros/latex-dev/required/latex-lab/usage-of-@footnotetext.md b/macros/latex-dev/required/latex-lab/usage-of-@footnotetext.md new file mode 100644 index 0000000000..deda69fcd8 --- /dev/null +++ b/macros/latex-dev/required/latex-lab/usage-of-@footnotetext.md @@ -0,0 +1,848 @@ +# Packages that alter \@footnotetext ... + +Scan of TeXlive 2022 for checking ... may not be longer accurate and may contain a few false positives + +``` + +% ./bibarts/bibarts.sty + +\let\ba@footnotetext=\@footnotetext +\long\def\@footnotetext#1{\ba@footnotetext{% + \global\let\thisto@ba=-% + \global\let\thisti@ba=-% + \global\let\thisp@ba=-% + \global\let\thisvol@ba=-% + \global\let\thiss@ba=-% + \global\let\thisn@ba=-% + \global\let\pos@ba=0% + \kern 0.1em\nulskip@ba{\@footnotetrue\ignorespaces + #1\nulskip@ba\ba@textmode}\global\let\lastto@ba=\thisto@ba + \global\let\lastti@ba=\thisti@ba + \global\let\lastp@ba=\thisp@ba + \global\let\lastvol@ba=\thisvol@ba + \global\let\lasts@ba=\thiss@ba + \global\let\lastn@ba=\thisn@ba}}% + + +% ./fnbreak/fnbreak.sty + + \let\fnb@orig@footnotetext\@footnotetext + \long\def\@footnotetext#1{\fnb@orig@footnotetext{\fnb@fnstart#1\fnb@fnend}}% + + +% ./revtex4-1/revtex4-1.cls ./revtex/ltxutil.sty ./revtex/revtex4-2.cls ... + +\long\def\@footnotetext{% + \insert\footins\bgroup + \make@footnotetext +}% +\long\def\@mpfootnotetext{% + \minipagefootnote@pick + \make@footnotetext +}% +\long\def\make@footnotetext#1{% + \set@footnotefont + \set@footnotewidth + \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@\@mpfn\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1% + \@finalstrut\strutbox\vadjust{\vskip\z@skip}% + }% + \color@endgroup + \minipagefootnote@drop +}% + + +% ./nrc/nrc1.cls ./nrc/nrc2.cls + +% this is missing the \par at the end and \@currentcounter + +\long\def\@footnotetext#1{% + \insert\footins{% + \reset@font\smallt + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox + }% + \color@endgroup + }% +}% + +%------------------------------------- + +% ./bigfoot/bigfoot.sty + + \def\@footnotetext{\Footnotetextdefault{}}% + +%------------------------------------- + + +% ./uafthesis/uafthesis.cls + +% this is missing the \par at the end and \@currentcounter + +%% this little gem provides for single-spaced footnotes +\long\def\@footnotetext#1{\insert\footins{% + \ssp + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore + \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces + #1\strut}}} + +%------------------------------------- + + + +% ./resphilosophica/resphilosophica.cls + +% I wonder if this \, is really intended below ... + +\long\def\@footnotetext#1{% + \insert\footins{% + \normalfont\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep \splitmaxdepth \dp\strutbox + \floatingpenalty\@MM \hsize\columnwidth + \@parboxrestore \parindent\normalparindent \sloppy + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark}% + \@makefntext{% + \,\rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}} + +%------------------------------------- + + + +% ./setspace/setspace.sty + +% this is missing the \par at the end and \@currentcounter + +\long\def\@footnotetext#1{% + \insert\footins{% +% GT: Next line added. Hook desired here! + \def\baselinestretch {\setspace@singlespace}% + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth + \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% + \color@endgroup}} + +%------------------------------------- + + + +% ./linguex/linguex.sty + + +\let\predefinedfootnotetext=\@footnotetext +\long\def\@footnotetext#1{\@noftnotefalse\predefinedfootnotetext{#1}% + \@noftnotetrue} + + +%------------------------------------- + + +% ./fnpara/fnpara.sty + +\long\def\@footnotetext#1{\insert\footins{% + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \setbox0=\hbox{% + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox + \penalty -10 + \hskip\footglue + }% + }% + \dp0=0pt \ht0=\fudgefactor\wd0 \box0 + \color@endgroup}} + +%------------------------------------- + + +% ./footmisc/footmisc.sty (para option) + +% this is missing the \par at the end and \@currentcounter + + \long\def\FN@footnotetext#1{% + \insert\footins{% + \ifFN@setspace + \let\baselinestretch\FN@baselinestretch + \fi + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox + \floatingpenalty\@MM + \hsize\columnwidth + \@parboxrestore + \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}% + \color@begingroup + \setbox\FN@tempboxa\hbox{% + \@makefntext{\ignorespaces#1\strut + \penalty-10\relax + \hskip\footglue + }% end of \@makefntext parameter + }% end of \hbox + \dp\FN@tempboxa\z@ + \ht\FN@tempboxa\dimexpr\wd\FN@tempboxa *% + \footnotebaselineskip / \columnwidth\relax + \box\FN@tempboxa + \color@endgroup + }% + \FN@mf@prepare + } + +%------------------------------------- + + +% ./footmisc/footmisc.sty (normal) + +% this is missing the \par at the end and \@currentcounter + + \long\def\FN@footnotetext#1{% + \insert\footins{% + \ifFN@setspace + \let\baselinestretch\FN@baselinestretch + \fi + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox + \floatingpenalty\@MM + \hsize\columnwidth + \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \rule\z@\footnotesep + \ignorespaces#1\@finalstrut\strutbox + }% + \color@endgroup + }% + \FN@mf@prepare + }% + + + +%------------------------------------- + + +% ./footmisc/footmisc.sty (side option) + + \long\def\FN@footnotetext#1{% + \marginpar{% + \ifFN@setspace + \let\baselinestretch\FN@baselinestretch + \fi + \reset@font\footnotesize + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \ignorespaces#1% + }% + \color@endgroup + }% + \FN@mf@prepare + }% + + + +%------------------------------------- + + + +% ./bxjscls/bxjsarticle.cls ./bxjscls/bxjsbook.cls ... + +\long\def\@footnotetext{% + \insert\footins\bgroup + \normalfont\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \rule\z@\footnotesep\ignorespaces}% + \futurelet\jsc@next\jsc@fo@t} +\def\jsc@fo@t{\ifcat\bgroup\noexpand\jsc@next \let\jsc@next\jsc@f@@t + \else \let\jsc@next\jsc@f@t\fi \jsc@next} +\def\jsc@f@@t{\bgroup\aftergroup\jsc@@foot\let\jsc@next} +\def\jsc@f@t#1{#1\jsc@@foot} +\def\jsc@@foot{\@finalstrut\strutbox\color@endgroup\egroup + \ifx\pltx@foot@penalty\@undefined\else + \ifhmode\null\fi + \ifnum\pltx@foot@penalty=\z@\else + \penalty\pltx@foot@penalty + \pltx@foot@penalty\z@ + \fi + \fi} + + +not covered so far supports \footnote{ catcode changes ...} but also +\foonote A --- the latter is questionable I would say + + +%------------------------------------- + + +% ./fn2end/fn2end.sty + +obsolete I guess, ignored in evaluation + + +%------------------------------------- + + +% ./hyperref/hyperref.sty + + \long\def\@footnotetext#1{% + \H@@footnotetext{% + \ifHy@nesting + \expandafter\ltx@firstoftwo + \else + \expandafter\ltx@secondoftwo + \fi + {% + \expandafter\hyper@@anchor\expandafter{% + \Hy@footnote@currentHref + }{\ignorespaces #1}% + }{% + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{% + \Hy@footnote@currentHref + }{\relax}% + }% + \let\@currentHref\Hy@footnote@currentHref + \let\@currentlabelname\@empty + \ignorespaces #1% + }% + }% + }% + + +Handling of anchors (in nested context) I guess. This needs to be +married with the anchor setting that the tagging currently does and +the latter improved/adjusted + + +%------------------------------------- + +% ./biblatex-gb7714-2015/gb7714-2015ms.bbx ./biblatex-gb7714-2015/gb7714-2015mx.bbx ... + + \long\def\@footnotetext##1{\insert\footins{% + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \leftskip \footbibmargin%增加的左侧缩进 + \@makefntext{% + \rule\z@\footnotesep\ignorespaces##1\@finalstrut\strutbox% + }% + \color@endgroup}}% + +fits the structure +%------------------------------------- + + +% ./amscls/amsbook.cls ./amscls/amsproc.cls ./amscls/amsart.cls ... + +\long\def\@footnotetext#1{% + \insert\footins{% + \normalfont\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep \splitmaxdepth \dp\strutbox + \floatingpenalty\@MM \hsize\columnwidth + \@parboxrestore \parindent\normalparindent \sloppy + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark}% + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}} + +fits the structure +%------------------------------------- + + +% ./umich-thesis/umich-thesis.cls + +% change LaTeX's footnotes to get vertical spacing correct +\skip\footins \baselinestretch2\skip\footins +\long\def\@footnotetext#1{% + \insert\footins{% + \def\baselinestretch {\setspace@singlespace}% + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth + \@parboxrestore + \vskip 1.2\baselineskip + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% + \color@endgroup}} + +fits the structure +%------------------------------------- + + +% ./nostarch/nostarch.cls + +\long\def\@footnotetext#1{\insert\footins{% + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \rule\z@{13.5pt}\ignorespaces#1}% + \color@endgroup}}% + +fixed \footsep, probably very old +fits the structure +%------------------------------------- + + + +% ./coursepaper/coursepaper.cls + +\long\def\@footnotetext#1{% + \insert\footins{% + \def\baselinestretch {1}% + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth + \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% + \color@endgroup}} + +fits the structure +%------------------------------------- + + + +% ./ucthesis/ucthesis.cls + +% Single-space footnotes. +\long\def\@footnotetext#1{\insert\footins{\ssp\reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore + \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces + #1\strut}}} + +fits the structure +%------------------------------------- + + + +% ./jura/jura.cls + +\long\def\@footnotetext#1{\insert\footins{% + \linespread{\J@FootnoteSpread}\reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% + \color@endgroup}}% + +fits the structure +%------------------------------------- + + +% ./asaetr/asaesub.sty + +2.09 + +%------------------------------------- + + +% ./lineno/fnlineno.sty + +%% |\FNLN@@text| stores the `\@footnotetext' found, +%% we might check if it is `\FNLN@ltx@fntext' ... %% TODO +\let\FNLN@@text\@footnotetext +\def\@footnotetext{% + \ifLineNumbers \expandafter \FNLN@text + \else \expandafter \FNLN@@text + \fi} + + +\def \FNLN@text {% %% 2010/12/31 arg read later + \vadjust{\penalty-\FNLN@M@swap@codepen}% +%% Standard \LaTeX's `\@footnotetext' expands `\@thefnmark' +%% to produce the footnote mark at the page bottom, +%% right after it has been determined for the mark +%% in the main text. \emph{Here} the footnote text +%% will be typeset only when \emph{other} footnote marks +%% may have been formed for typesetting the main text +%% paragraph before. +%% %%% (TODO clearer wording) +%% In the \strong{footnote list} +%% macro |\FNLN@list|, the (\dqtd{`&\protect'ed}) +%% \emph{current} expansion of `\@thefnmark' +%% is stored as an item preceding the footnote text +%% . One footnote entry in `\FNLN@list' +%% thus has the form \lq`\@lt\@lt'\rq. +%% \LaTeX's internal `\g@addto@macro' is used to \emph{append} +%% an entry to the list (at the right). The OTR will later +%% take the entries from the left of the list. +%% +%% The argument of the auxiliary/temporary `\@tempa' +%% will contain the footnote text and thus must be able to +%% carry `\par' tokens. We therefore need a `\long' version of +%% `\protected@edef': + \let\@@protect\protect + \let\protect\@unexpandable@protect + \afterassignment\restore@protect + \long \edef \@tempa ##1{% + \noexpand\g@addto@macro \noexpand\FNLN@list {% + \@thefnmark \noexpand\@lt ##1\noexpand \@lt}}% +%% ... issuing +%% \lq`\g@addto@macro\FNLN@list{\elt\@lt}'\rq\ ... + \@tempa %% reads arg +} +%% Here we initialize |\FNLN@list|: +\let\FNLN@list\@empty + + + +probably continues working but needs separate checking + +%------------------------------------- + + + +% ./jurabib/jurabib.sty + + \long\def\@footnotetext#1{% + \Orig@tabularx@footnotetext{% + \jb@fntrue + #1% + \setcounter{jb@cites@in@footnote}{0}% + }% + }% + + \let\jbsaved@footnotetext\@footnotetext + \long\def\@footnotetext#1{% + \begingroup + \jb@fntrue + \jbsaved@footnotetext{#1}% + \setcounter{jb@cites@in@footnote}{0}% + \endgroup + }% + + +first is table notes, second +fits the structure +%------------------------------------- + + + +% ./york-thesis/york-thesis.cls + +\long\def\@footnotetext#1{% + \insert\footins{% + \def\baselinestretch {1}% + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth + \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark}% + \color@begingroup + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% + \color@endgroup}} + +fits the structure +%------------------------------------- + + +% ./ucdavisthesis/ucdavisthesis.cls + +\long\def\@footnotetext#1{\insert\footins{\renewcommand\baselinestretch{1} + \footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore + \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces + #1\strut}\renewcommand\baselinestretch{\@spacing}}} + +looks old ... +fits the structure +%------------------------------------- + + +% ./ledmac/afoot.sty + +fairly old and buggy in some aspects + +%%% Make the LaTeX \cs{footnote} catcode-safe, like in Plain TeX. + +\def \@footnotetext {% new, do not yet read footnote text + \insert \footins \bgroup + \ifx \footglue \undefined % prepare normal footnote + \interlinepenalty \interfootnotelinepenalty \floatingpenalty \@MM + \splittopskip \footnotesep \splitmaxdepth \dp \strutbox + \else + \global\long\def \@makefntext ##1{{$^{\@thefnmark }$}##1\nobreak }% + \setbox0=\hbox \bgroup % fnpara.sty is present + \floatingpenalty=20000 \footnotesize + \fi + \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}% + \a@fntext } + + +%------------------------------------- + + +% ./toptesi/toptesi.sty + + +\long\def\@footnotetext#1{\insert\footins{\linespread{1}\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore + \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}% + \@makefntext{\rule{\z@}{\footnotesep}\ignorespaces#1\strut}}} + + +fits the structure +%------------------------------------- + + +% ./gb4e/gb4e.sty + +\let\@gbsaved@footnotetext=\@footnotetext +\long\def\@footnotetext#1{% + \@noftnotefalse\setcounter{fnx}{0}% + \@gbsaved@footnotetext{#1}% + \@noftnotetrue} + +fits the structure +%------------------------------------- + + + +% ./koma-script/scrlttr2.cls ./koma-script/scrextend.sty ./koma-script/scrreprt.cls ... + +same bug as footmisc: the @prepare is in the wrong place + +fits the structure +%------------------------------------- + + + +% ./tabu/tabu.sty + +not checked what that does + + +%------------------------------------- + + +% ./uwthesis/uwthesis.cls + +does chapter notes -- ignore for now + +%------------------------------------- + + +% ./tools/multicol.sty + +\long\def\mult@footnotetext#1{\begingroup + \columnwidth\textwidth + \orig@footnotetext{#1}\endgroup} + + +fits the structure, but need to think what makes sense here as this a +temporary redefinition for the environment only + +%------------------------------------- + + +% ./fancyvrb/fancyvrb.sty + +\long\def\V@footnotetext{% + \afterassignment\V@@footnotetext + \let\@tempa} +\def\V@@footnotetext{% + \insert\footins\bgroup + \csname reset@font\endcsname + \footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth\dp\strutbox + \floatingpenalty \@MM + \hsize\columnwidth + \@parboxrestore + \def\@currentcounter{footnote}% + \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}% + \@makefntext{}% + \rule{\z@}{\footnotesep}% + \bgroup + \aftergroup\V@@@footnotetext + \ignorespaces} +\def\V@@@footnotetext{\strut\egroup} + + +another one of the footnote commands that do not read they argument as an argument + +%------------------------------------- + + +% ./savefnmark/savefnmark.sty + +obsolete + +%------------------------------------- + + +% ./changebar/changebar.sty + +\let\ltx@footnotetext\@footnotetext +\long\def\cb@footnotetext#1{% + \cb@trace@stack{end footnote on page \the\c@page}% + \cb@pop\cb@currentstack + \ifnum\cb@topleft=\cb@nil + \ltx@footnotetext{#1}% + \else + \cb@push\cb@currentstack + \edef\cb@temp{\the\cb@curbarwd}% + \ltx@footnotetext{\cb@start[\cb@temp]#1\cb@end}% + \fi} +\let\@footnotetext\cb@footnotetext + + +% ./eledmac/eledmac.sty + +\apptocmd{\@footnotetext}{\m@mmf@prepare}{}{} +\pretocmd{\@footnotetext}{% + \ifnumberedpar@ + \edtext{}{\l@dbfnote{#1}}% + \else + }{}{} +\apptocmd{\@footnotetext}{\fi}{}{}% + + +% ./yafoot/dblfnote.sty + +\long\def\dfn@footnotetext#1{{\setbox\dfn@boxa\vbox{ + \let\insert\dfn@gobble + \columnwidth\DFNcolumnwidth \hbadness\c@DFNsloppiness + \def\@makefnmark{\smash{\dfn@makefnmark}} + \dfn@latex@footnotetext{#1}\par \boxmaxdepth\dfn@fnmaxdp}% + \dfn@dima\ht\dfn@boxa \advance\dfn@dima\dp\dfn@boxa + \ifdim\dfn@dima>\z@\else + \dfn@dima1sp\relax + \setbox\dfn@boxa\vbox{\vbox to1sp{\unvbox\dfn@boxa\vfil}}\fi + \global\setbox\dfn@ins\vbox{\boxmaxdepth\dfn@fnmaxdp + \ifvoid\dfn@ins\else + \unvbox\dfn@ins \allowbreak \nointerlineskip \fi + \ifdfn@allowcbreak \unvbox \else \box \fi \dfn@boxa}% + \setbox\dfn@boxa\copy\dfn@ins + \dfn@split{.5\ht\dfn@boxa}\dfn@boxa\dfn@boxb\dfn@fnmaxdp\footnotesep + \advance\@tempdima\@tempdimb \@tempdimb\@tempdima + \advance\@tempdima-\dfn@fnht \global\dfn@fnht\@tempdimb + \insert\footins{\floatingpenalty\@MM \vbox to\@tempdima{}}% + \xdef\dfn@list{\dfn@list\@elt{\number\dfn@dima}{\number\@tempdima}}}} +\let\dfn@latex@footnotetext\@footnotetext +\let\@footnotetext\dfn@footnotetext + + +% ./ftnxtra/ftnxtra.sty + +not checked what this does + + +% ./acmart/acmart.cls + +\if@ACM@sigchiamode +\long\def\@footnotetext#1{\marginpar{% + \reset@font\small + \interlinepenalty\interfootnotelinepenalty + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% + \color@endgroup}}% +\fi + + +% ./memoir/memoir.cls + + this needs some further analysis + +``` diff --git a/macros/latex-dev/required/latex-lab/usage-of-@makefntext.md b/macros/latex-dev/required/latex-lab/usage-of-@makefntext.md new file mode 100644 index 0000000000..d7cb0a9b92 --- /dev/null +++ b/macros/latex-dev/required/latex-lab/usage-of-@makefntext.md @@ -0,0 +1,1751 @@ +# Packages that alter \@makefntext ... + +Scan of TeXlive 2022 for checking ... may not be longer accurate and may contain a few false positives + +``` + +% ./footmisc/footmisc.sty + +% latex def (used with para option) + + + + \long\def\@makefntext#1{% + \ifFN@hangfoot + \bgroup + \setbox\@tempboxa\hbox{% + \ifdim\footnotemargin>0pt + \hb@xt@\footnotemargin{\@makefnmark\hss}% + \else + \@makefnmark + \fi + }% + \leftmargin\wd\@tempboxa + \rightmargin\z@ + \linewidth \columnwidth + \advance \linewidth -\leftmargin + \parshape \@ne \leftmargin \linewidth + \footnotesize + \@setpar{{\@@par}}% + \leavevmode + \llap{\box\@tempboxa}% + \parskip\hangfootparskip\relax + \parindent\hangfootparindent\relax + \else + \parindent1em + \noindent + \ifdim\footnotemargin>\z@ + \hb@xt@ \footnotemargin{\hss\@makefnmark}% + \else + \ifdim\footnotemargin=\z@ + \llap{\@makefnmark}% + \else + \llap{\hb@xt@ -\footnotemargin{\@makefnmark\hss}}% + \fi + \fi + \fi + \footnotelayout#1% + \ifFN@hangfoot + \par\egroup + \fi + } + + + + +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/aastex/aastex631.cls +--------------------------------------------------------- +\def\@makefntext#1{\hsize=\columnwidth\mbox{}\hspace*{3mm}\@makefnmark~#1} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/paper/paper.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}% +... + \long\def\@makefntext#1{% + \leftskip 2.0em% + \noindent + \hbox to 0em{\hss\@makefnmark\kern 0.25em}#1} +... + \long\def\@makefntext#1{% + \parindent 1em% + \noindent + \hbox to 1.8em{\hss\@makefnmark\kern 0.25em}#1} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/revtex4-1/aip4-1.rtx +--------------------------------------------------------- +\def\@makefntext#1{% + \def\baselinestretch{1}% + \leftskip1em% + \parindent1em% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/revtex4-1/aps4-1.rtx +--------------------------------------------------------- +\long\def\@makefntext#1{% + \def\baselinestretch{1}% + \leftskip1em% + \parindent1em% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/revtex4-1/revtex4-1.cls +--------------------------------------------------------- +\def\@makefntext#1{% + \def\baselinestretch{1}% + \parindent1em% + \noindent +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/smflatex/smfart.cls +--------------------------------------------------------- +\def\@makefntext{\parindent0pt\sloppy\indent\@makefnmark} +\hfuzz=1pt \vfuzz=\hfuzz +\def\sloppy{\tolerance9999 \emergencystretch 3em\relax} +\setcounter{topnumber}{4} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/smflatex/smfbook.cls +--------------------------------------------------------- +\def\@makefntext{\parindent0pt\sloppy\indent\@makefnmark} +\hfuzz=1pt \vfuzz=\hfuzz +\def\sloppy{\tolerance9999 \emergencystretch 3em\relax} +\setcounter{topnumber}{4} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/koma-script/scrlttr2.cls +--------------------------------------------------------- + \long\def\@makefntext##1{% + \raggedfootnote + \leftskip #2 + \l@addto@macro\@trivlist{% +... + \long\def\@makefntext##1{% + \setlength{\@tempdimc}{#3}% + \def\@tempa{#1}\ifx\@tempa\@empty + \@setpar{\@@par +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/koma-script/scrextend.sty +--------------------------------------------------------- + \long\def\@makefntext##1{% + \raggedfootnote + \leftskip #2 + \l@addto@macro\@trivlist{% +... + \long\def\@makefntext##1{% + \setlength{\@tempdimc}{#3}% + \def\@tempa{#1}\ifx\@tempa\@empty + \@setpar{\@@par +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/koma-script/scrreprt.cls +--------------------------------------------------------- + \long\def\@makefntext##1{% + \raggedfootnote + \leftskip #2 + \l@addto@macro\@trivlist{% +... + \long\def\@makefntext##1{% + \setlength{\@tempdimc}{#3}% + \def\@tempa{#1}\ifx\@tempa\@empty + \@setpar{\@@par +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/koma-script/scrartcl.cls +--------------------------------------------------------- + \long\def\@makefntext##1{% + \raggedfootnote + \leftskip #2 + \l@addto@macro\@trivlist{% +... + \long\def\@makefntext##1{% + \setlength{\@tempdimc}{#3}% + \def\@tempa{#1}\ifx\@tempa\@empty + \@setpar{\@@par +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/koma-script/scrbook.cls +--------------------------------------------------------- + \long\def\@makefntext##1{% + \raggedfootnote + \leftskip #2 + \l@addto@macro\@trivlist{% +... + \long\def\@makefntext##1{% + \setlength{\@tempdimc}{#3}% + \def\@tempa{#1}\ifx\@tempa\@empty + \@setpar{\@@par +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/uafthesis/uafthesis.cls +--------------------------------------------------------- +\long\def\@makefntext#1{% + \parindent 1em% + \noindent + \hbox to 1.8em{\hss\@makefnmark}#1} +... + \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces + #1\strut}}} + +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/uwthesis/uwthesis.cls +--------------------------------------------------------- +\long\def\@makefntext#1{\parindent 1em\noindent \hangindent\parindent + \def\baselinestretch{1.0}\normalfont + \hb@xt@1.8em{\hss\@makefnmark}#1} + +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/uwa-letterhead/uwa-letterhead.sty +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \global\@topnum\z@ +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/onrannual/onrannual.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \newpage +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/thuthesis/thuthesis.cls +--------------------------------------------------------- +\long\def\@makefntext#1{% + \begingroup + % 序号取消上标 + \def\@makefnmark{\hbox{\normalfont\@thefnmark}}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/gaceta/gaceta.cls +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/jpsj/jpsj2.cls +--------------------------------------------------------- + \long\def\@makefntext##1{%\vskip2\p@ + \hangindent8\p@ \hangafter1 \noindent + \hb@xt@1em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/gmutils/gmtypos.sty +--------------------------------------------------------- + \ampulexdef#1{\long\def\@makefntext}% + \if@twocolumn{\gmu@ATfootnotes\if@twocolumn}% Ampulex redefinition + % of \incs{maketitle} for \pk{mwcls}. +} +... + \long\pdef\@makefntext##1{% + \ifdefined\@parindent \parindent\@parindent + \else \parindent 1em\relax + \fi +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/resphilosophica/resphilosophica.cls +--------------------------------------------------------- +\def\@makefntext{\noindent\@makefnmark + \if@enddoc\else + \immediate\write\@mainaux% + {\string\xdef\string\lastfootnote@page{\the\c@page}}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/tools/ftnright.sty +--------------------------------------------------------- +\long\def\@makefntext#1{\parindent 1em + \noindent\hbox to 2em{}% + \llap{\@thefnmark.\,\,}#1} +\setlength{\skip\footins} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/elegantnote/elegantnote.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ntgclass/rapport1.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent\z@ + \def\labelitemi{\textendash}\@revlabeltrue + \leavevmode\@textsuperscript{\@thefnmark}\kern1em\relax ##1} + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% +... + \long\def\@makefntext{\@xmakefntext{% + \@textsuperscript{\normalfont\@thefnmark}}}% + \if@twocolumn + \ifnum \col@number=\@ne +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ntgclass/brief.cls +--------------------------------------------------------- +\long\def\@makefntext#1{% + \noindent\hb@xt@\leftmargini{\normalfont\@thefnmark.\hfil}#1} +\newcommand*\dutchbrief{% + \def\uwbrieftekst{Uw brief van} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ntgclass/boek.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent\z@ + \def\labelitemi{\textendash}\@revlabeltrue + \leavevmode\@textsuperscript{\@thefnmark}\kern1em\relax ##1} + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ntgclass/rapport3.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent\z@ + \def\labelitemi{\textendash}\@revlabeltrue + \leavevmode\@textsuperscript{\@thefnmark}\kern1em\relax ##1} + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% +... + \long\def\@makefntext{\@xmakefntext{% + \@textsuperscript{\normalfont\@thefnmark}}}% + \if@twocolumn + \ifnum \col@number=\@ne +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ntgclass/boek3.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent\z@ + \def\labelitemi{\textendash}\@revlabeltrue + \leavevmode\@textsuperscript{\@thefnmark}\kern1em\relax ##1} + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ntgclass/artikel2.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent\z@ + \def\labelitemi{\textendash}\@revlabeltrue + \leavevmode\@textsuperscript{\@thefnmark}\kern1em\relax ##1} + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% +... + \long\def\@makefntext##1{\parindent\z@ + \def\labelitemi{\textendash}% + \leavevmode\hb@xt@.5\unitindent{% + \@textsuperscript{\normalfont\@thefnmark}\hfil}##1} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ntgclass/artikel3.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent\z@ + \def\labelitemi{\textendash}\@revlabeltrue + \leavevmode\@textsuperscript{\@thefnmark}\kern1em\relax ##1} + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% +... + \long\def\@makefntext{\@xmakefntext{% + \@textsuperscript{\normalfont\@thefnmark}}}% + \if@twocolumn + \ifnum \col@number=\@ne +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ntgclass/artikel1.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent\z@ + \def\labelitemi{\textendash}\@revlabeltrue + \leavevmode\@textsuperscript{\@thefnmark}\kern1em\relax ##1} + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% +... + \long\def\@makefntext{\@xmakefntext{% + \@textsuperscript{\normalfont\@thefnmark}}}% + \if@twocolumn + \ifnum \col@number=\@ne +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/cdpbundl/letteracdp.cls +--------------------------------------------------------- +\long\def\@makefntext#1{% + \noindent + \hangindent 5\p@ + \hb@xt@5\p@{\hss\@makefnmark}#1} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/courseoutline/courseoutline.cls +--------------------------------------------------------- +\setlength {\evensidemargin}{0.0in} % right margin 1.0 inch +\setlength {\textwidth}{6.5in} % right margin 1.0 inch +\setlength {\footnotesep}{14pt} % baseline skip for fn's 1st line +\setlength {\headheight}{0.2in} % make room for header +\setlength {\headsep}{0.2in} % modest header separation +\setlength {\parskip}{0.2in} % set a paragraph skip +\setlength {\parindent}{0.0in} % no para indents +% +% redefine the titlematter +% +\renewcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \thispagestyle{empty}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + % + \global\let\university\@empty + \global\let\department\@empty + \global\let\coursename\@empty +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/stellenbosch/ustitle.sty +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/chextras/chextras.sty +--------------------------------------------------------- + \long\def\@makefntext#1{\settowidth\@tempdima{.\kern\marginparsep} + \parindent\z@ + \advance\parindent-\@tempdima + \rule\z@\footnotesep +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/aiaa/aiaa-tc.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \newpage +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/oberdiek/enparen.sty +--------------------------------------------------------- + \long\def\@makefntext##1{% + \enparen@org@makefntext{% + \enparenBeginContext{footnote}% + ##1% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/cleveref/cleveref.sty +--------------------------------------------------------- +\long\def\@makefntext{% + \cref@constructprefix{footnote}{\cref@result}% + \protected@edef\cref@currentlabel{% + [footnote][\arabic{footnote}][\cref@result]% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ametsoc/ametsoc.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\footnotesize\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1 + \vskip1sp +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/combine/combine.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/active-conf/active-conf.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent##1}% + \@note + \setcounter{footnote}{0} + \global\def\note##1{% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/iso/isov2.cls +--------------------------------------------------------- +\long\def\@makefntext#1{% + \parindent 1em% + \noindent + \hbox to 1.8em{\hss\@makefnmark}#1} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/elegantpaper/elegantpaper.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@0.1em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/fnpara/fnpara.sty +--------------------------------------------------------- +\long\def\@makefntext#1{% +% \parindent 1em% +% \noindent +% \hb@xt@1.8em{\hss\@makefnmark}#1 +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\advance\leftskip 3\jsZw + \parindent 1\jsZw\noindent + \llap{\@textsuperscript{\normalfont\@thefnmark}\hskip0.3\jsZw}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/bxjscls/bxjsbook.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\advance\leftskip 3\jsZw + \parindent 1\jsZw\noindent + \llap{\@textsuperscript{\normalfont\@thefnmark}\hskip0.3\jsZw}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/bxjscls/bxjsslide.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\advance\leftskip 3\jsZw + \parindent 1\jsZw\noindent + \llap{\@textsuperscript{\normalfont\@thefnmark}\hskip0.3\jsZw}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/bxjscls/bxjsreport.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\advance\leftskip 3\jsZw + \parindent 1\jsZw\noindent + \llap{\@textsuperscript{\normalfont\@thefnmark}\hskip0.3\jsZw}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/lettre/lettre.cls +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/titlefoot/titlefoot.sty +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/revtex/aip4-2.rtx +--------------------------------------------------------- +\def\@makefntext#1{% + \def\baselinestretch{1}% + \leftskip1em% + \parindent1em% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/revtex/aps4-2.rtx +--------------------------------------------------------- +\long\def\@makefntext#1{% + \def\baselinestretch{1}% + \leftskip1em% + \parindent1em% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/revtex/revtex4-2.cls +--------------------------------------------------------- +\def\@makefntext#1{% + \def\baselinestretch{1}% + \parindent1em% + \noindent +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/revtex/sor4-2.rtx +--------------------------------------------------------- +\def\@makefntext#1{% + \def\baselinestretch{1}% + \leftskip1em% + \parindent1em% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/revtex/aapm4-2.rtx +--------------------------------------------------------- +\def\@makefntext#1{% + \def\baselinestretch{1}% + \leftskip1em% + \parindent1em% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/lni/lni.cls +--------------------------------------------------------- + \long\def\@makefntext##1{% + \@setpar{\@@par + \@tempdima = \hsize + \advance\@tempdima -1em +... +\long\def\@makefntext#1{% + \parindent \fnindent% + \leftskip \fnindent% Einrückung vor der footnotemark + \noindent +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/arabtex/arabrep.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{\hss\@makefnmark}##1}% + \if@twocolumn + \ifnum \col@number=\@ne +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/arabtex/arabrep1.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{\hss\@makefnmark}##1}% + \if@twocolumn + \ifnum \col@number=\@ne +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/llncs/llncs.cls +--------------------------------------------------------- +\long\def\@makefntext#1{% + \parindent \fnindent% + \leftskip \fnindent% + \noindent +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/frankenstein/blkcntrl.sty +--------------------------------------------------------- +\defcommand\@makefntext [1] {% + \setlength\parindent{\@ne em}% + \noindent + \hb@xt@ 1.8em{\hss\@makefnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/frankenstein/blkcntrl.stq +--------------------------------------------------------- +\defcommand\@makefntext [1] {% + \setlength\parindent{\@ne em}% + \noindent + \hb@xt@ 1.8em{\hss\@makefnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/cmpj/cmpj2.sty +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/cmpj/cmpj3.sty +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/cmpj/cmpj.sty +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/pracjourn/pracjourn.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \newpage +... +\def\@makefntext#1{% + \parindent 0em\relax + \makebox[1.5em][l]{\normalfont\footnotesize\@thefnmark.}#1} +\def\@ifx@empty#1{% Implicit #2#3 +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/extsizes/extbook.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/extsizes/extletter.cls +--------------------------------------------------------- +\long\def\@makefntext#1{% + \noindent + \hangindent 5\p@ + \hb@xt@5\p@{\hss\@makefnmark}#1} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/extsizes/extarticle.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/extsizes/extproc.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \twocolumn[\@maketitle]% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/extsizes/extreport.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/h2020proposal/h2020proposal.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \newpage +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx +--------------------------------------------------------- + \long\def\@makefntext##1{%增加了脚注标记与正文的间隔 + \parindent 1em\noindent \hb@xt@ 0em{\hss \@makefnmark\makebox[\footbiblabelsep]{}}##1} + + } +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.bbx +--------------------------------------------------------- + \long\def\@makefntext##1{%增加了脚注标记与正文的间隔 + \parindent 1em\noindent \hb@xt@ 0em{\hss \@makefnmark\makebox[\footbiblabelsep]{}}##1} + + } +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx +--------------------------------------------------------- + \long\def\@makefntext##1{%增加了脚注标记与正文的间隔 + \parindent 1em\noindent \hb@xt@ 0em{\hss \@makefnmark\makebox[\footbiblabelsep]{}}##1} + + } +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx +--------------------------------------------------------- + \long\def\@makefntext##1{%增加了脚注标记与正文的间隔 + \parindent 1em\noindent \hb@xt@ 0em{\hss \@makefnmark\makebox[\footbiblabelsep]{}}##1} + + } +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/suftesi/suftesi.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/mwcls/mwrep.cls +--------------------------------------------------------- + \long\def\@makefntext##1{ + \parindent\@parindent + \@textsuperscript{\normalfont\@thefnmark}\enspace##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/mwcls/mwart.cls +--------------------------------------------------------- + \long\def\@makefntext##1{ + \parindent\@parindent + \@textsuperscript{\normalfont\@thefnmark}\enspace##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/mwcls/mwbk.cls +--------------------------------------------------------- + \long\def\@makefntext##1{ + \parindent\@parindent + \@textsuperscript{\normalfont\@thefnmark}\enspace##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/tugboat/ltugboat.cls +--------------------------------------------------------- +\long\def\@makefntext#1{\parindent 1em\noindent\hb@xt@2em{}% + \llap{\@makefnmark}\null$\mskip5mu$#1} + +%% \long\def\@makefntext#1{\parindent 1em +... + \def\@makefntext##1{##1}% + \footnotetext{\noindent #1#2}% + \endgroup +} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ptptex/ptptex.cls +--------------------------------------------------------- +\long\def\@makefntext#1{% +\parindent 1.5em\noindent \footnotesize % +\hbox to 2.5em{\hss$^{\@thefnmark}$}\hskip3\p@#1} +\gdef\@thanks{} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/aguplus/aguplus.sty +--------------------------------------------------------- + \long\def\@makefntext##1{##1} + \footnotetext{{\parindent=1em\indent + \let\@elt=\par\@titlenote}} + \fi +... + \long\def\@makefntext##1{##1} + \footnotetext{{\parindent=10pt\indent + \parskip=6pt\let\@elt=\par\@titlenote}} + \fi +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/aguplus/aguplus.cls +--------------------------------------------------------- + \long\def\@makefntext##1{##1} + \footnotetext{{\parindent=1em\indent + \let\@elt=\par\@titlenote}} + \fi +... + \long\def\@makefntext##1{##1} + \footnotetext{{\parindent=10pt\indent + \parskip=6pt\let\@elt=\par\@titlenote}} + \fi +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/protocol/protocol.cls +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/cje/cje.cls +--------------------------------------------------------- + \long\def\@makefntext##1{%\parindent 1em + \noindent +% \hb@xt@1.8em{% +% \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% +... +\long\def\@makefntext#1{\raggedright\@setpar{\@@par\@tempdima \hsize + \advance\@tempdima-\@footindent + \parshape \@ne \@footindent \@tempdima}\par + \noindent \hbox to \z@{\hss\@thefnmark\enskip}#1} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/tufte-latex/tufte-common.def +--------------------------------------------------------- +\long\def\@makefntext#1{\@textsuperscript{\@tufte@sidenote@font\tiny\@thefnmark}\,\footnotelayout#1} + +% Set the in-text footnote mark in the same typeface as the body text itself. +\def\@makefnmark{\hbox{\@textsuperscript{\normalfont\footnotesize\@thefnmark}}} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/amscls/amsdtx.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}% + \if@twocolumn + \ifnum \col@number=\@ne +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/amscls/amsbook.cls +--------------------------------------------------------- +\def\@makefntext{\indent\@makefnmark} +\long\def\@footnotetext#1{% + \insert\footins{% + \normalfont\footnotesize +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/amscls/amsproc.cls +--------------------------------------------------------- +\def\@makefntext{\indent\@makefnmark} +\long\def\@footnotetext#1{% + \insert\footins{% + \normalfont\footnotesize +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/amscls/amsart.cls +--------------------------------------------------------- +\def\@makefntext{\indent\@makefnmark} +\long\def\@footnotetext#1{% + \insert\footins{% + \normalfont\footnotesize +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/quantumarticle/quantumarticle.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \ifbool{@twocolumn} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ltxmisc/iagproc.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \twocolumn[\@maketitle]% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/acmart/acmart.cls +--------------------------------------------------------- +\def\@makefntext{\noindent\@makefnmark} +\if@ACM@sigchiamode +\long\def\@footnotetext#1{\marginpar{% + \reset@font\small +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/memoir/memoir.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\makethanksmark ##1} + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/footnotebackref/footnotebackref.sty +--------------------------------------------------------- +% than redefine the \@makefntext and \@makefnmark +% The \@makefnmark macro is redefined in the space of +% the \@makefntext macro +% So the footnote numbers in the main text are not influenced +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/bangtex/barticle.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/bangtex/bletter.cls +--------------------------------------------------------- +\long\def\@makefntext#1{% + \noindent + \hangindent 5\p@ + \hb@xt@5\p@{\hss\@makefnmark}#1} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/bangtex/bbook.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\sbng\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/elbioimp/elbioimp.cls +--------------------------------------------------------- + \def \@makefntext ##1{\noindent + \small \@thefnmark. \it ##1} + \renewcommand{\thempfootnote}% + {\arabic{mpfootnote}} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ebsthesis/ebsthesis.cls +--------------------------------------------------------- + \long\def\@makefntext#1{% + \bgroup + \setbox\@tempboxa\hbox{% + \ifdim\footnotemargin>0pt +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/coursepaper/coursepaper.cls +--------------------------------------------------------- + \setlength {\evensidemargin}{0.5in} % right margin 1.5 inch + \setlength {\textwidth}{5.5in} % right margin 1.5 inch + \spacing{2} % double spacing for final + \renewenvironment{quote} % redef as single spaced + {\oldquote\spacing{1}} + {\oldendquote\spacing{2}} + \renewenvironment{quotation} % redef as single spaced + {\oldquotation\spacing{1}} + {\oldendquotation\spacing{2}} + \renewenvironment{verse} % redef as single spaced + {\oldquotation\spacing{1}} + {\oldendquotation\spacing{2}} +} +\setlength {\footnotesep}{14pt} % baseline skip for fn's 1st line +\setlength {\headheight}{0.2in} % make room for header +\setlength {\headsep}{0.2in} % modest header separation +\setlength {\parskip}{0.2in} % set a paragraph skip +\setlength {\parindent}{0.2in} % I hate unindented first lines +\renewenvironment{bibliography}[1] % automatically enter toc line + {\addcontentsline{toc}{chapter}{Bibliography}\oldbibliography {#1}} + {\oldendbibliography} +% +% Make footnotes single spaced +% +% code shamelessly stolen from setspace.sty +% written by Geoffrey Tobin +% +\long\def\@footnotetext#1{% + \insert\footins{% + \def\baselinestretch {1}% + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth + \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% + \color@endgroup}} +% +% redefine the titlematter +% +\renewcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \thispagestyle{empty}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + % + \global\let\@studentnumber\@empty + \global\let\@coursenumber\@empty + \global\let\@coursename\@empty + \global\let\@coursesection\@empty + \global\let\@instructor\@empty + \global\let\@college\@empty + % + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} +% +\def\@maketitle{% + \newpage + \null + \vskip 2em% + \begin{flushleft}% + \begin{spacing}{1}% + {\sffamily \LARGE \@title \par}% + \vskip 2em% + {\sffamily \large\lineskip .75em\@author}\\% + \sffamily \@studentnumber% + \vskip 1em% + \sffamily \@date + \vskip 3em% + \sffamily \@college\\% + \sffamily \@coursenumber\hskip 6pt\@coursesection\hskip 6pt% + \@coursename\\% + \sffamily For: \@instructor% + \par% + \end{spacing}% + \end{flushleft}\hrule\vskip 1em\par + \par + \vskip 1.5em} +% +% make section titles less obnoxious +% +\renewcommand\section{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\normalfont\large\bfseries}} +\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\normalsize\bfseries}} +\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\normalsize\bfseries}} +\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus1ex \@minus.2ex}% + {-1em}% + {\normalfont\normalsize\bfseries}} +\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% + {3.25ex \@plus1ex \@minus .2ex}% + {-1em}% + {\normalfont\normalsize\bfseries}} +% +% Set up headers +% +\def\ps@myheadings{% + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenhead{\thepage -- \slshape\leftmark\hfil}% + \def\@oddhead{\hfil{\slshape\rightmark} -- \thepage}% + \let\@mkboth\@gobbletwo + \let\sectionmark\@gobble + \let\subsectionmark\@gobble + } +% +% Position the abstract depending on presence of titlepage +% +\if@titlepage + \renewenvironment{abstract}{% + \titlepage + \null\vfil + \@beginparpenalty\@lowpenalty + \begin{center}% + \bfseries \abstractname + \@endparpenalty\@M + \end{center}}% + {\par\vfil\null\endtitlepage} +\fi +% +% change some names +% +\renewcommand\contentsname{Table of Contents} +\renewcommand\refname{Bibliography} +% +% \epigraph{text}{byline} +% +\newcommand{\epigraph}[2]{\begin{flushright}\begin{minipage}{4in}% + \spacing{1}#1\begin{flushright}#2\end{flushright}% + \hrule\end{minipage}\vskip 12pt\end{flushright}} +% +%% End of file `coursepaper.cls'. +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/kotex-utf/contrib/dhucsfn.sty +--------------------------------------------------------- + \long\def\@makefntext#1{ + \settowidth{\foot@parindent}{\fn@markstyle} + \@setpar{\@@par\@tempdima \hsize + \advance\@tempdima-\foot@parindent +... + \long\def\@makefntext#1{% + \hbox{\fn@markstyle\hskip\footnumbersep #1} + }% +} +... + \long\def\@makefntext#1{% + \fn@markstyle\ifdim\footnumbersep=\z@\else~\fi #1 + }% +} +... + \long\def\@makefntext#1{ + \settowidth{\foot@parindent}{\reset@font 각주} + \settowidth{\footnumbersep}{\reset@font 주} + \divide\footnumbersep by2 +... + \long\def\@makefntext#1{ + \settowidth{\leftskip}{\reset@font 각주} + \settowidth{\foot@parindent}{\fn@markstyle} + \settowidth{\footnumbersep}{\reset@font 주} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ucthesis/ucthesis.cls +--------------------------------------------------------- +% \long\def\@makefntext#1{\@setpar{\@@par\@tempdima \hsize +% \advance\@tempdima-10pt\parshape \@ne 10pt \@tempdima}\par +% \parindent 1em\noindent +% \hbox to \z@{\hss$\m@th^{\@thefnmark}$}#1} +... +\long\def\@makefntext#1{\parindent 1em\noindent + \hbox to 1.8em{\hss$\m@th^{\@thefnmark}$}#1} + +% \@makefnmark : A macro to generate the footnote marker that goes +... + \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces + #1\strut}}} + +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/apa/apa.cls +--------------------------------------------------------- +\long\def\@makefntext#1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont{\tiny\@thefnmark}\hspace{1.5pt}}}#1}% + +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/uestcthesis/uestcthesis.cls +--------------------------------------------------------- +\def\@makefntext #1{\ifFN@hangfoot \bgroup \setbox \@tempboxa \hbox {\ifdim +\footnotemargin >0pt \hb@xt@ \footnotemargin {\hbox { \normalfont \@thefnmark} +\hss }\else \hbox { \normalfont \@thefnmark} \fi }\leftmargin \wd \@tempboxa +\rightmargin \z@ \linewidth \columnwidth \advance \linewidth -\leftmargin +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/gmdoc/gmdoc.sty +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn \twocolumn [\@maketitle ]% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/titling/titling.sty +--------------------------------------------------------- + \long\def\@makefntext##1{\makethanksmark ##1} + \null\vfil + \vskip 60\p@ + \vspace*{\droptitle} +... + \long\def\@makefntext##1{\makethanksmark ##1} + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/chletter/chletter.cls +--------------------------------------------------------- +\long\def\@makefntext#1{\noindent\hb@xt@\z@{\hss\@makefnmark}#1} +\def\fromname{\@author} +\def\fromsig{\@author} +\let\fromlocation\@empty +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/jurarsp/jurarsp.sty +--------------------------------------------------------- +\long\def\@makefntext#1{% + \rsp@fntrue% + \@setpar{\@@par + \@tempdima = \hsize +... +/usr/local/texlive/2021/texmf-dist/tex/latex/kluwer/klunote.sty +--------------------------------------------------------- +% \long\def\@makefntext#1{\parindent 1em\noindent +% \hbox to 1.5em{\hss$^{\@thefnmark}$}\hskip0.5em\footnotesize#1} +% \def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}} +% SK: reimplemented with \textsuperscript, following LaTeX format +... +\long\def\@makefntext#1{\parindent 1em\noindent + \hbox to 1.5em{\hss\textsuperscript{\@thefnmark}}% + \hskip0.5em\footnotesize#1} +\def\@makefnmark{\hbox{\textsuperscript{\@thefnmark}}} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/kluwer/kluwer.cls +--------------------------------------------------------- +\long\def\@makefntext#1{\parindent 1em\noindent + \hbox to 1.5em{\hss\textsuperscript{\@thefnmark}}% + \hskip0.5em\footnotesize#1} +\def\@makefnmark{\hbox{\textsuperscript{\@thefnmark}}} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/asaetr/asaesub.sty +--------------------------------------------------------- + \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces + #1\strut}}} + +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/asaetr/asaetr.sty +--------------------------------------------------------- +\long\def\@makefntext#1{\parindent 1em\noindent + \hbox to 1.8em{\hss$^{\@thefnmark}$}#1} + + +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/refman/refrep.cls +--------------------------------------------------------- + \long\def\@makefntext##1{% + \@setpar{\@@par + \@tempdima = \hsize + \advance\@tempdima -1em +... + \long\def\@makefntext##1{% + \@setpar{\@@par + \@tempdima = \hsize + \advance\@tempdima -1em +... +\long\def\@makefntext#1{% + \@setpar{\@@par + \@tempdima = \hsize + \advance\@tempdima -1em +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/refman/refart.cls +--------------------------------------------------------- + \long\def\@makefntext##1{% + \@setpar{\@@par + \@tempdima = \hsize + \advance\@tempdima -1em +... + \long\def\@makefntext##1{% + \@setpar{\@@par + \@tempdima = \hsize + \advance\@tempdima -1em +... +\long\def\@makefntext#1{% + \@setpar{\@@par + \@tempdima = \hsize + \advance\@tempdima -1em +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty +--------------------------------------------------------- +\long\def\@makefntext#1{\textsuperscript{\@thefnmark}~#1} + +\LWR@ProvidesPackagePass{footnote}[1997/01/28] + +... +\long\def\@makefntext#1{\textsuperscript{\@thefnmark}~{#1}} + +\def\spewnotes{% + \endgroup% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/lwarp/lwarp.sty +--------------------------------------------------------- +\long\def\@makefntext#1{\textsuperscript{\@thefnmark}~{#1}} +\def\@makefnmark{% + \textsuperscript{\@thefnmark}% +} +... +\long\def\@makefntext##1{% +\textsuperscript{\@thefnmark}~% +{##1}% +}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/lwarp/lwarp-titling.sty +--------------------------------------------------------- + \long\def\@makefntext##1{% + \makethanksmark~% + {##1}% + }% \@makefntext +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/afthesis/afthesis.cls +--------------------------------------------------------- + \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces + #1\strut}}} + +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ijmart/ijmart.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\noindent\hangindent=2em\hangafter=1 + \hb@xt@2em{% + \hss\@textsuperscript{\normalfont\footnotesize\@thefnmark\space}}##1}% + \def\footnoterule{\kern-3pt\hrule width 2in\kern 2.6pt} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/oup-authoring-template/oup-authoring-template.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 3mm\noindent + \if@traditional\if@small\@hangfrom{{\normalfont\@thefnmark}\enskip}\else\@textsuperscript{\normalfont\@thefnmark}\fi\else\@textsuperscript{\normalfont\@thefnmark}\fi + ##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/akletter/akletter.cls +--------------------------------------------------------- +\long\def\@makefntext#1{% + \noindent + \hangindent 5\p@ + \hb@xt@5\p@{\hss\@makefnmark}#1} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/revtex4/aps.rtx +--------------------------------------------------------- +\def\@makefntext#1{% + \def\baselinestretch{1}% + \reset@font + \footnotesize +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/revtex4/revtex4.cls +--------------------------------------------------------- +\def\@makefntext#1{% + \def\baselinestretch{1}% + \reset@font\footnotesize + \parindent 1em% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hitreport/hitreport.cls +--------------------------------------------------------- +\long\def\@makefntext#1{% + \begingroup + % 序号取消上标 + \def\@makefnmark{\hbox{\normalfont\@thefnmark}}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/footnotehyper/footnotehyper.sty +--------------------------------------------------------- + \def\FNH@prefntext{\@makefntext{}}% + \iffootnotehyperwarn + \PackageInfo{footnotehyper}% + {Using the \string\@makefntext{} approach (see doc).\FNH@msgbk +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/basque-book/basque-book.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/dinbrief/dinbrief.cls +--------------------------------------------------------- +\long\def\@makefntext#1{% + \noindent + \hangindent 5pt% + \hbox to 5pt{\hss $^{\@thefnmark}$}#1} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/beamer/beamerbaseframecomponents.sty +--------------------------------------------------------- +\def\@makefntext#1{% + \def\insertfootnotetext{#1}% + \def\insertfootnotemark{\@makefnmark}% + \usebeamertemplate***{footnote}} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ucdavisthesis/ucdavisthesis.cls +--------------------------------------------------------- + \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext + {\rule{\z@}{\footnotesep}\ignorespaces + #1\strut}\renewcommand\baselinestretch{\@spacing}}} +\ps@plain % 'plain' page style +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/computational-complexity/cclayout.sty +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/footmisx/footmisx.sty +--------------------------------------------------------- + \long\def\@makefntext#1{\leavevmode + \@makefnmark\nobreak + \hskip.5em\relax#1% + } +... + \long\def\@makefntext#1{% + \ifFN@hangfoot + \bgroup + \setbox\@tempboxa\hbox{% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/amsdtx.hyp +--------------------------------------------------------- + \long\def\@makefntext##1{% + \hyper@currentfnmark% + \bgroup% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/slides.hyp +--------------------------------------------------------- +\long\def\@makefntext#1{% + \bgroup% + \hyper@currentfnmark% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/book.hyp +--------------------------------------------------------- +\long\def\@makefntext#1{% + \bgroup% + \hyper@currentfnmark% + \edef\@currenthyper{\hyper@current@fnmark}% +... + \long\def\@makefntext##1{% + \hyper@currentfnmark% + \bgroup% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/ltxguide.hyp +--------------------------------------------------------- +\long\def\@makefntext#1{% + \bgroup% + \hyper@currentfnmark% + \edef\@currenthyper{\hyper@current@fnmark}% +... + \long\def\@makefntext##1{% + \hyper@currentfnmark% + \bgroup% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/ltnews.hyp +--------------------------------------------------------- +\long\def\@makefntext#1{% + \bgroup% + \hyper@currentfnmark% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/doc.hyp +--------------------------------------------------------- + \long\def\@makefntext##1{% + \hyper@currentfnmark% + \bgroup + \edef\@currenthyper{\hyper@current@fnmark} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/ftnright.hyp +--------------------------------------------------------- +\long\def\@makefntext#1{% + \hyper@currentfnmark% + \bgroup% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/letter.hyp +--------------------------------------------------------- +\long\def\@makefntext#1{% + \bgroup% + \hyper@currentfnmark% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/amsbook.hyp +--------------------------------------------------------- +\long\def\@makefntext#1{\indent% + \hyper@currentfnmark% + \bgroup% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/ltxdoc.hyp +--------------------------------------------------------- +\long\def\@makefntext#1{% + \bgroup% + \hyper@currentfnmark% + \edef\@currenthyper{\hyper@current@fnmark}% +... + \long\def\@makefntext##1{% + \hyper@currentfnmark% + \bgroup% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/proc.hyp +--------------------------------------------------------- +\long\def\@makefntext#1{% + \bgroup% + \hyper@currentfnmark% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/amsart.hyp +--------------------------------------------------------- +\long\def\@makefntext#1{\indent% + \hyper@currentfnmark% + \bgroup% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/amsproc.hyp +--------------------------------------------------------- +\long\def\@makefntext#1{\indent% + \hyper@currentfnmark% + \bgroup% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/article.hyp +--------------------------------------------------------- +\long\def\@makefntext#1{% + \bgroup% + \hyper@currentfnmark% + \edef\@currenthyper{\hyper@current@fnmark}% +... + \long\def\@makefntext##1{% + \hyper@currentfnmark% + \bgroup% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hyper/report.hyp +--------------------------------------------------------- +\long\def\@makefntext#1{% + \bgroup% + \hyper@currentfnmark% + \edef\@currenthyper{\hyper@current@fnmark}% +... + \long\def\@makefntext##1{% + \hyper@currentfnmark% + \bgroup% + \edef\@currenthyper{\hyper@current@fnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/hitec/hitec.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \newpage +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/emulateapj/emulateapj.cls +--------------------------------------------------------- +\def\@makefntext#1{\mbox{}\hspace*{3mm}\@makefnmark~#1} + +\def\notetoeditor#1{}% % We do not need notes to editor in the preprint +\def\placetable#1{}% % We do not need notes to editor in the preprint +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ledmac/afoot.sty +--------------------------------------------------------- + \long\def\@makefntext#1{{$^{\@thefnmark}$}#1\nobreak } +\fi + +%%% Make the LaTeX \cs{footnote} catcode-safe, like in Plain TeX. +... + \global\long\def \@makefntext ##1{{$^{\@thefnmark }$}##1\nobreak }% + \setbox0=\hbox \bgroup % fnpara.sty is present + \floatingpenalty=20000 \footnotesize + \fi +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/footmisc/footmisc.sty +--------------------------------------------------------- + \long\def\@makefntext#1{\leavevmode + \@makefnmark\nobreak + \hskip.5em\relax#1% + } +... + \long\def\@makefntext#1{% + \ifFN@hangfoot + \bgroup + \setbox\@tempboxa\hbox{% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/footmisc/footmisc-2011-06-06.sty +--------------------------------------------------------- + \long\def\@makefntext#1{\leavevmode + \@makefnmark\nobreak + \hskip.5em\relax#1% + } +... + \long\def\@makefntext#1{% + \ifFN@hangfoot + \bgroup + \setbox\@tempboxa\hbox{% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/base/book.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/base/slides.cls +--------------------------------------------------------- +\long\def\@makefntext#1{ + \noindent + \hangindent 10\p@ + \hb@xt@10\p@{\hss\@makefnmark}#1} +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/base/doc.sty +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}% + \if@twocolumn \twocolumn [\@maketitle ]% + \else \newpage \global \@topnum \z@ \@maketitle \fi +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/base/proc.sty +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \twocolumn[\@maketitle]% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/base/proc.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \twocolumn[\@maketitle]% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/base/doc-v3beta.sty +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}% + \if@twocolumn \twocolumn [\@maketitle ]% + \else \newpage \global \@topnum \z@ \@maketitle \fi +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/base/article.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/base/report.cls +--------------------------------------------------------- + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/twoinone/2in1.sty +--------------------------------------------------------- +\long\def\@makefntext##1{\parindent 1em\noindent +\hb@xt@1.8em{% +\hss\@textsuperscript{\normalfont\@thefnmark}}##1}% +\@maketitle +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/ltxtools/ltxtools-review.sty +--------------------------------------------------------- + \long\def\@makefntext##1{\rule\z@\footnotesep\parindent1em\noindent + \hb@xt@2em{\hss\@textsuperscript + {\normalfont\textcolor{#1}{\@thefnmark}}}% + \hspace{2\p@}\ignorespaces\textcolor{#1}{##1}% +... + \long\def\@makefntext##1{% + \rule\z@\footnotesep\parindent1em\noindent + \hb@xt@0em{\hss\@textsuperscript{\normalfont\color{#1}\@thefnmark}}% + \hspace{2\p@}\color{#1}\ignorespaces##1% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/skeyval/skeyval-testclass.cls +--------------------------------------------------------- + \long\def\@makefntext##1{% + \parindent1em\relax\noindent + \hb@xt@1.8em{\hss\@textsuperscript{% + \normalfont\skv@fnsymbol\@thefnmark}% +... +--------------------------------------------------------- +/usr/local/texlive/2021/texmf-dist/tex/latex/newlfm/newlfm.cls +--------------------------------------------------------- +\long\def\@makefntext#1{% +\noindent \hangindent 5\p@% +\hb@xt@5\p@{\hss\@makefnmark}#1}% +\renewcommand{\thefigure}{\@arabic\c@figure}% +... +--------------------------------------------------------- + +``` diff --git a/macros/latex-dev/required/latex-lab/usage-of-kern-kern.md b/macros/latex-dev/required/latex-lab/usage-of-kern-kern.md new file mode 100644 index 0000000000..aac597db60 --- /dev/null +++ b/macros/latex-dev/required/latex-lab/usage-of-kern-kern.md @@ -0,0 +1,88 @@ +# Packages that use double \kern's + +Scan of TeXlive 2022 for checking ... may not be longer accurate and may contain a few false positives +(definitely contains bogus entries right now) + + +``` + + \ifdim\lastkern>\z@\ifdim\lastkern<5sp\relax +./bxjscls/bxjsja-minimal.def + + + + \ifdim\lastkern=-3sp \unkern + \ifdim\lastkern=3sp \kern-3sp + {\kern\MT@outer@kern\kern3sp\kern-3sp\relax}% +./microtype/letterspace.sty + + + \ifdim\lastkern=-3sp \unkern + \ifdim\lastkern=3sp \kern-3sp + {\kern\MT@outer@kern\kern3sp\kern-3sp\relax}% +./microtype/microtype-pdftex.def + + + \ifdim\lastkern=-3sp \unkern + \ifdim\lastkern=3sp \kern-3sp + {\kern\MT@outer@kern\kern3sp\kern-3sp\relax}% +./microtype/microtype-luatex.def + + + +\providecommand*{\multiplefootnotemarker}{3sp} +./eledmac/eledmac.sty + + + +\providecommand*{\multiplefootnotemarker}{3sp} +./reledmac/reledmac.sty + + +\edef\CJK@kern{\kern -2sp\kern 2sp} +\edef\CJK@CJK{\kern -1sp\kern 1sp} +./cjk/texinput/CJK.sty + + +\edef\ruby@kern{\kern -5sp\kern 5sp} +./cjk/texinput/ruby.sty + + +% hyphenation between pinyin syllables. Values 1sp-3sp are already used +\edef\py@sp{\kern -4sp\kern 4sp} +./cjk/texinput/pinyin.sty + + +\providecommand*{\multiplefootnotemarker}{3sp} +./tufte-latex/tufte-common.def + + + +\newcommand*{\multiplefootnotemarker}{3sp} +./memoir/memoir.cls + + +\providecommand*{\multiplefootnotemarker}{3sp} +./parnotes/parnotes.sty + + +\providecommand*{\multiplefootnotemarker}{3sp} +./lwarp/lwarp-footmisc.sty + + + \bgroup \kern-3sp\kern3sp % kerns so I can test for beginning of list +./examdesign/examdesign.cls + + + \kern-1sp \kern1sp } + \kern-2sp \kern2sp } + \kern-3sp \kern3sp } + \kern-4sp \kern4sp } +./polyglossia/gloss-korean.ldf + + + +\NewDocumentCommand \@sidenotes@multisign { } {3sp} +./sidenotes/sidenotes.sty + +``` diff --git a/macros/latex/contrib/covington/README b/macros/latex/contrib/covington/README index 0dba592c2d..4d1636aa59 100644 --- a/macros/latex/contrib/covington/README +++ b/macros/latex/contrib/covington/README @@ -3,7 +3,7 @@ The covington package LaTeX macros for Linguistics -Copyright 1991--2021 Michael A. Covington +Copyright 1991--2023 Michael A. Covington Robin Fairbairns Juergen Spitzmueller @@ -31,10 +31,15 @@ The package consists of the following files: == CHANGES == +* Version 2.9 (2023-05-26): + - Add postamble and postamble* options to example and subexamples environment. + - Add \expreamble, \subexpreamble, \expostamble and \subexpostamble macros. + - Some documentation fixes. + * Version 2.8 (2022-08-30): - - Add Add ownfncounter and ownfncounter* options to allow for separate counting + - Add ownfncounter and ownfncounter* options to allow for separate counting of examples in footnotes. The starred option resets the counter at each footnote. - - Add preamble option to example environment. + - Add preamble option to example environment. * Version 2.7 (2021-09-01): - Add postamble gloss macro option for arbitrary text that is appended to the free diff --git a/macros/latex/contrib/covington/covington.pdf b/macros/latex/contrib/covington/covington.pdf index cf67af6da0..a802c03ff1 100644 Binary files a/macros/latex/contrib/covington/covington.pdf and b/macros/latex/contrib/covington/covington.pdf differ diff --git a/macros/latex/contrib/covington/covington.sty b/macros/latex/contrib/covington/covington.sty index fd1921f182..5218249db1 100644 --- a/macros/latex/contrib/covington/covington.sty +++ b/macros/latex/contrib/covington/covington.sty @@ -42,8 +42,8 @@ %%% Metadata %%% -\def\filedate{2022/08/30} -\def\fileversion{2.8} +\def\filedate{2023/05/26} +\def\fileversion{2.9} \def\filename{covington.sty} % Force redefinition of environments? @@ -60,10 +60,10 @@ \newif\ifresetownfnexcounter\resetownfnexcounterfalse \@ifundefined{ProvidesPackage}{% -\typeout{* covington.sty : Covington's linguistic macros, \fileversion\ \filedate *} +\typeout{* covington.sty -- Macros for Linguistics, \fileversion\ \filedate *} }{% \ProvidesPackage{covington} - [\filedate\space v\fileversion\space Covington's linguistic macros] + [\filedate\space v\fileversion\space Macros for Linguistics] \DeclareOption{force}{\forceredeftrue} \DeclareOption{keeplayout}{\tweaklayoutfalse} \DeclareOption{noglossbreaks}{\noglossbreakstrue} @@ -222,12 +222,23 @@ % 2022-08-20 (v. 2.8): optional preceding example text \define@key{cov@ex}{preamble}{\def\cov@xp{#1}} \newcommand*\expreamblefs{\normalfont} +\newcommand\expreamble[1]{\bgroup\expreamblefs#1\egroup\par} + +\newif\if@cov@expst@star\@cov@expst@starfalse +\define@key{cov@ex}{postamble}{\def\cov@xpst{#1}\@cov@expst@starfalse} +\define@key{cov@ex}{postamble*}{\def\cov@xpst{#1}\@cov@expst@startrue} +% 2023.05.26 (v. 2.9): optional trailung subexample text +\newcommand*\expostamblefs{\normalfont} +\newcommand*\expostamble[1]{\bgroup\expostamblefs#1\egroup} \newenvironment{covexample}[1][]{% \ifx#1\empty\else\setkeys{cov@ex}{#1}\fi% \begin{covexamples} - \item\@ifundefined{cov@xp}{}{\bgroup\expreamblefs\cov@xp\egroup\par}% insert preamble if given -}{\end{covexamples}} + \item\@ifundefined{cov@xp}{}{\expreamble{\cov@xp}}% insert preamble if given +}{% + \@ifundefined{cov@xpst}{}{\if@cov@expst@star\unskip\fi\expostamble{\cov@xpst}}% + \end{covexamples}% +} \@ifundefined{example}{% \newenvironment{example}[1][]{\begin{covexample}[#1]}{\end{covexample}} @@ -353,6 +364,12 @@ % 2019-06-21 (v. 2.3): optional preceding subexample text \define@key{cov@subex}{preamble}{\def\cov@sxp{#1}} \newcommand*\subexpreamblefs{\normalfont} +\newcommand\subexpreamble[1]{\bgroup\subexpreamblefs#1\egroup\par} + +% 2023.05.26 (v. 2.9): optional trailung subexample text +\define@key{cov@subex}{postamble}{\def\cov@sxpst{#1}} +\newcommand*\subexpostamblefs{\normalfont} +\newcommand*\subexpostamble[1]{\bgroup\expostamblefs#1\egroup} \newenvironment{covsubexamples}[1][]% % define "subexamples" environment {% @@ -370,6 +387,8 @@ {% \let\cov@sxp\relax \end{enumerate} + \@ifundefined{cov@sxpst}{}{\subexpostamble{\cov@sxpst}}% insert postamble if given + \let\cov@sxpst\relax \end{covexample} } diff --git a/macros/latex/contrib/covington/covington.tex b/macros/latex/contrib/covington/covington.tex index 585d38ff47..5dbc41c275 100644 --- a/macros/latex/contrib/covington/covington.tex +++ b/macros/latex/contrib/covington/covington.tex @@ -94,8 +94,8 @@ % % Titling % -\def\pversion{Version 2.8} -\def\pdate{August 30, 2022} +\def\pversion{Version 2.9} +\def\pdate{May 26, 2023} \title{\textbf{The \cvt\ Package\\\Large Macros for Linguistics}} \author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer. @@ -164,8 +164,8 @@ The package has the following options: \item{\joption{ownfncounter}:} Use a separate counter for numbered examples in footnotes. By default, \cvt\ numbers examples in footnotes in sequence with the numbering used in the main text. With this option, - examples in footnotes get a different numbering. This uses by default roman numbering (see sec.~\ref{sec:custno} on how - to change this) and is incremented throughout the whole footnote apparatus. + examples in footnotes get a different numbering. This uses by default lowercase Roman numbering (see sec.~\ref{sec:custno} + on how to change this) and is incremented throughout the whole footnote apparatus. \item{\joption{ownfncounter*}:} Same as \joption{ownfncounter}, except that this variant resets the counter at each footnote (similar to \textsf{linguex} and \textsf{gb4e}). @@ -280,16 +280,26 @@ This is a sentence.\label{expl} \end{example} The example can be of any length; it can consist of many lines (separated by \verb"\\"), or even whole paragraphs. -The \jenv{example} environment provides the following option: +The \jenv{example} environment provides the following options: \begin{description} \item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is inserted on an own line - after the example number (preceding the actual example text). This might be useful, for instance, - to give context information, to specify the language or the source in case of cited examples. - The advantage over just adding a line manually in the example is that you can globally set the markup - (see sec.~\ref{sec:custno}). + after the example number (preceding the actual example text). This might be useful, for instance, + to give context information, to specify the language or the source in case of cited examples. + The advantage over just adding a line manually in the example is that you can globally set the markup + (see sec.~\ref{sec:custno}). + \item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is appended to example (on the + same line after a space). + This might be useful to add a reference or an explanation to the translation. + The advantage over just adding text manually in the example is that this uses its own markup + (see sec.~\ref{sec:custno}). + \item[\joption{postamble*=\{\jparam{arbitrary text}\}}] A variant of \joption{postamble} that does not add + a space. This might be preferred if you want to add a footnote. + Note that \joption{postamble} and \joption{postamble*} are mutually exclusive. \end{description} % +If you want the postamble text be on a line of its own, simply add a line break (i.\,e., \verb|postamble={\\Text}|). + If you need more space between the example number and the text, you can increase it by means of the length \jcsmacro{examplenumbersep} (which is preset to \texttt{0pt}). Doing \lstinline|\setlength\examplenumbersep{1em}|, for instance, will increase the space by 1\,em (negative values will decrease the space accordingly). @@ -327,10 +337,10 @@ convenient for this task. \subsection[The \texttt{examples} environment]{The \jenv{examples} environment}\label{sec:exs} -To display a series of examples together, each with its own example -number, use \jenv{examples} (or \jenv{covexamples}) instead of \jenv{example} or \jenv{covexample}. -The only drawback is that there is no \joption{preamble} option. On the other hand, there can be more -than one example with this environment, and each of them has to be introduced by \jfcsmacro{item}, like this: +To display a series of examples together, each with its own example number, use \jenv{examples} +(or \jenv{covexamples}) instead of \jenv{example} or \jenv{covexample}. +There can be more than one example with this environment, and each of them has to be introduced +by \jfcsmacro{item}, like this: \begin{lstlisting} \begin{examples} \item This is the first sentence. @@ -350,6 +360,61 @@ This prints as: \item This is the second sentence. \end{examples} % +To add additional text to specific items (analogous to the \joption{preamble} option of the \jenv{example} environment), +you can use the \jcsmacro{expreamble} macro, like this: +\begin{lstlisting}[moretexcs={expreamble}] +\begin{examples} +\item \expreamble{Here is Jakobson's famous poetic example:} + I like Ike +\item \expreamble{Here is the less poetic variant:} + I am in favor of Mr. Eisenhover +\end{examples} +\end{lstlisting} +% +which prints: +\begin{examples} + \item \expreamble{Here is Jakobson's famous poetic example:} + I like Ike + \item \expreamble{Here is the less poetic variant:} + I am in favor of Mr. Eisenhover +\end{examples} +% +Again, the advantage over just adding a line manually in the example is that you can globally set the markup +(see sec.~\ref{sec:custno}). + +Along the same line, trailing text (analogous to the \joption{postamble} option of the \jenv{example} environment) +can be added to specific items via the \jcsmacro{expostamble} macro, like this: +\begin{lstlisting}[moretexcs={expostamble}] +\begin{examples} +\item I like Ike \expostamble{(Jakobson 1960: 357)} +\item I am in favor of Mr. Eisenhover\expostamble{\footnote{He actually didn't.}} +\end{examples} +\end{lstlisting} +% +which results in: +\begin{examples} + \item I like Ike \expostamble{(Jakobson 1960: 357)} + \item I am in favor of Mr. Eisenhover\expostamble{\footnote{He actually didn't.}} +\end{examples} +% +The advantage over just adding text as is in the example is that this has its own, globally settable markup, +which is particularly relevant if you globally set examples to be italicized (see sec.~\ref{sec:custno}). + +Like in any other \LaTeX\ list, the numbering can be freely set via the optional argument of \jfcsmacro{item}. +For a somewhat practical example, consider +\begin{lstlisting}[moretexcs={covexnumber,exampleno}] +\begin{examples} +\item A proposition. +\item[\covexnumber{\exampleno*'}] An alternative proposition. +\end{examples} +\end{lstlisting} +% +which results in: +\begin{examples} + \item A proposition. + \item[\covexnumber{\exampleno*'}] An alternative proposition. +\end{examples} +% As for \jenv{example}, \cvt\ checks if there is already an \jenv{examples} environment defined, and if this is the case, \cvt\ does not define its own one. The alias environment \jenv{covexamples} is always available as a fallback. If you use the package option \joption{force}, \cvt\ will override @@ -390,48 +455,87 @@ is always available as a fallback. If you use the package option \joption{force} existing \jenv{subexamples} environments. The package will issue a warning if \jenv{subexamples} is already defined. \medskip -\noindent The \jenv{subexamples} environment provides the following option: +\noindent The \jenv{subexamples} environment provides the following options: \begin{description} \item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is inserted in the first line - (after the main number and before the first sub-example, which then follows in a new line). - This might be useful, for instance, to give context information, to specify the language or the source - in case of cited sub-examples. You can globally set the markup of this preamble text (see sec.~\ref{sec:custno}). + (after the main number and before the first sub-example, which then follows in a new line). + This might be useful, for instance, to give context information, to specify the language or the source + in case of cited sub-examples. You can globally set the markup of this preamble text (see sec.~\ref{sec:custno}). + \item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is appended after all sub-examples (on a + new line). This might be useful to add a reference or an explanation to the set. + The advantage over just adding text manually in the example is that this uses its own markup + (see sec.~\ref{sec:custno}). \end{description} % For instance, \begin{lstlisting} -\begin{subexamples}[preamble={Here are two sentences}] +\begin{subexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}] \item This is the first sentence. \item This is the second sentence. \end{subexamples} \end{lstlisting} or, respectively: \begin{lstlisting} -\begin{covsubexamples}[preamble={Here are two sentences}] +\begin{covsubexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}] \item This is the first sentence. \item This is the second sentence. \end{covsubexamples} \end{lstlisting} prints as: -\begin{subexamples}[preamble={Here are two sentences}] +\begin{subexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}] \item This is the first sentence. \item This is the second sentence. \end{subexamples} % +To add additional text to specific subitems, you can use the \jcsmacro{subexpreamble} macro, which uses the +same markup than the \joption{preamble} option, like this: +\begin{lstlisting}[moretexcs={subexpreamble}] +\begin{covsubexamples}[preamble={Here are two sentences}] +\item This is the first sentence. +\item \subexpreamble{Note particular this one} + This is the second sentence. +\end{covsubexamples} +\end{lstlisting} +% +which prints: +\begin{covsubexamples}[preamble={Here are two sentences}] + \item This is the first sentence. + \item \subexpreamble{Note particular this one} + This is the second sentence. +\end{covsubexamples} +% +Along the same line, trailing text (analogous to the \joption{postamble} option) +can be added to specific subitems via the \jcsmacro{subexpostamble} macro, like this: +\begin{lstlisting}[moretexcs={subexpostamble}] +\begin{subexamples} +\item This is the first sentence. \subexpostamble{(Miller 2022: 15)} +\item This is the second sentence.\subexpostamble{\footnote{My own.}} +\end{subexamples} +\end{lstlisting} +% +which results in: +\begin{subexamples} + \item This is the first sentence. \subexpostamble{(Miller 2022: 15)} + \item This is the second sentence.\subexpostamble{\footnote{My own.}} +\end{subexamples} +% +Again, the advantage over just adding text as is is that this has its own, globally settable markup, +which is particularly relevant if you globally set examples to be italicized (see sec.~\ref{sec:custno}). + The distance between example number and subnumber (letter) can be changed via the length \jcsmacro{examplenumbersep} (which is preset to \texttt{0pt}). The distance between example subnumber and text can be changed via the length \jcsmacro{subexamplenumbersep} (preset to \texttt{0pt} as well). In both cases, a positive value will increase, a negative value will decrease the respective distance. Doing \begin{lstlisting}[moretexcs={setlength,examplenumbersep,subexamplenumbersep}] -\setlength{\examplenumbersep}{-0.5em} -\setlength{\subexamplenumbersep}{0.5em} +\setlength{\examplenumbersep}{-0.4em} +\setlength{\subexamplenumbersep}{0.4em} \end{lstlisting} for instance, will come out like this: \bgroup -\setlength{\examplenumbersep}{-0.5em} -\setlength{\subexamplenumbersep}{0.5em} +\setlength{\examplenumbersep}{-0.4em} +\setlength{\subexamplenumbersep}{0.4em} \begin{subexamples} \item This is the first sentence. @@ -454,8 +558,8 @@ You can change the display of the example number by redefining (via \jfcsmacro{r with the variable \texttt{\#1} representing the number. If you use \joption{ownfncounter}, example numbers in footnote use this macro as well. If you want a different display, you can redefine -\begin{lstlisting}[moretexcs={covexfnnumber}] -\newcommand*\covexfnnumber[1]{\covennumber{#1}} +\begin{lstlisting}[moretexcs={covexnumberfn,covexnumber}] +\newcommand*\covexnumberfn[1]{\covexnumber{#1}} \end{lstlisting} % In the same vein, you can customize the display of the subexample letter by redefining @@ -479,20 +583,25 @@ Note that this does, deliberately, not include the numbers, since those are cont \jcsmacro{covexamplenofs}, which defaults to \jfcsmacro{normalfont}. Of course you are free to redefine this as well, if you wish do to so. -Finally, you can customize the markup of the example and sub-example preamble text by redefining the macro +Furthermore, you can customize the markup of the example and sub-example preamble text (supplied via the \joption{preamble} +option or the \jcsmacro{expreamble} or \jcsmacro{subexpreamble} macro) by redefining the macro \jcsmacro{expreamblefs} or \jcsmacro{subexpreamblefs}, which also both default to \jfcsmacro{normalfont}. To have them italicized, analogously do: -\begin{lstlisting}[moretexcs={\subexpreamblefs}] -\renewcommand*{\subexpreamblefs}{\itshape} +\begin{lstlisting}[moretexcs={expreamblefs}] +\renewcommand*{\expreamblefs}{\itshape} \end{lstlisting} or -\begin{lstlisting}[moretexcs={\expreamblefs}] -\renewcommand*{\expreamblefs}{\itshape} +\begin{lstlisting}[moretexcs={subexpreamblefs}] +\renewcommand*{\subexpreamblefs}{\itshape} \end{lstlisting} % -The separate footnote example number with \joption{ownfncounter} uses roman numbering by default. +Likewise, you can customize the markup of the example and sub-example postamble text (supplied via the +\joption{postamble[*]} option or the \jcsmacro{expostamble} or \jcsmacro{subexpostamble} macro) by redefining the macro +\jcsmacro{expostamblefs} or \jcsmacro{subexpostamblefs}, which also both default to \jfcsmacro{normalfont}. + +The separate footnote example number with \joption{ownfncounter} uses lowercase Roman numbering by default. This can be changed by redefining -\begin{lstlisting}[moretexcs={\thecovfnex}] +\begin{lstlisting}[moretexcs={thecovfnex}] \renewcommand{\thecovfnex}{\roman{covfnex}} \end{lstlisting} @@ -588,7 +697,7 @@ Note that: \begin{description} \item[\joption{ex=\jparam{true|false}}] Default: \emph{false}. Wraps the gloss in an example environment - (i.\,e., it is numberered). + (i.\,e., it is numbered). \item[\joption{tlr=\jparam{true|false}}] Default: \emph{false}. If set to true, the translation line (content of the \jparam{free translation} argument) is set right to the gloss lines, rather than into a new line below. Since the gloss itself is set in a box, this means the \jparam{free translation} will appear lined up with the @@ -1165,6 +1274,15 @@ it. \section{Release history} +\subsection*{2.9 (2023 May 26)} +\begin{itemize} + \item Add \joption{postamble} and \joption{postamble*} options to \jenv{example} and \jenv{subexamples} environment + (sec.~\ref{sec:exs} and \ref{sec:subexs}). + \item Add \jcsmacro{expreamble}, \jcsmacro{subexpreamble}, \jcsmacro{expostamble} and \jcsmacro{subexpostamble} + macros (sec.~\ref{sec:exs} and \ref{sec:subexs}). + \item Some documentation fixes. +\end{itemize} + \subsection*{2.8 (2022 August 30)} \begin{itemize} diff --git a/macros/latex/contrib/hyperref/ChangeLog.txt b/macros/latex/contrib/hyperref/ChangeLog.txt index dc719fbcf5..f471e51084 100644 --- a/macros/latex/contrib/hyperref/ChangeLog.txt +++ b/macros/latex/contrib/hyperref/ChangeLog.txt @@ -1,3 +1,11 @@ +2023-05-16 Ulrike Fischer + * remove puenc-greekbasic.def and load definitions from greek-fontenc instead. + * xr-hyper: unified and simplified the brace handling: all defined references have now + five brace groups. Together with the planed change in LaTeX 2023-06-01 this + will improve the combination of hyperref/non-hyperref documents and allow to merge with xr + * xr-hyper: changed default extension from dvi to pdf + * nameref: adapt label (re)definition to changes in LaTeX 2023-06-01 + 2023-04-22 Ulrike Fischer * fix cleveref/ntheorem incompability https://tex.stackexchange.com/q/683581/2388 * add nopatch option for \@thm diff --git a/macros/latex/contrib/hyperref/README.md b/macros/latex/contrib/hyperref/README.md index ca1e336ae6..a020d71328 100644 --- a/macros/latex/contrib/hyperref/README.md +++ b/macros/latex/contrib/hyperref/README.md @@ -1,6 +1,6 @@ # README for hyperref bundle -Version 2023-04-22 v7.00x +Version 2023-05-16 v7.00y ## INTRODUCTION diff --git a/macros/latex/contrib/hyperref/doc/backref.pdf b/macros/latex/contrib/hyperref/doc/backref.pdf index 0f907044c5..ed0fa58e7b 100644 Binary files a/macros/latex/contrib/hyperref/doc/backref.pdf and b/macros/latex/contrib/hyperref/doc/backref.pdf differ diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.css b/macros/latex/contrib/hyperref/doc/hyperref-doc.css index 328505fcb2..a135ec3c7e 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-doc.css +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.css @@ -318,4 +318,3 @@ span.HoLogo-LaTeX2e span.HoLogo-2{padding-left:.15em;} span.HoLogo-LaTeX2e span.HoLogo-e{position:relative;top:.35ex;text-decoration:none;} /* end css.sty */ - diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.html b/macros/latex/contrib/hyperref/doc/hyperref-doc.html index 69ea41dee6..1d029c9ed6 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-doc.html +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.html @@ -25,7 +25,7 @@ href="https://github.com/latex3/hyperref/issues" class="url" >https://github.com/latex3/hyperref/issues)
2023-04-20 v7.00w
+class="ec-lmr-12">2023-05-16 v7.00y

Contents

@@ -876,7 +876,8 @@ class="description">

  • -

    hyperref patches

    hyperref patches \@sect, \@ssect, \@chapter, nameref documentation about a way class="ec-lmbx-10">footnotes

    -

    To enable (partly) the linking of footnotes hyperref redefines or patches various commands, in part +

    To enable (partly) the linking of footnotes hyperref redefines or patches various commands, in part package dependant.

    • -

      hyperref redefines

      hyperref redefines \@xfootnotenext, \@xfootnotemark, \hyper@nopatch@footnote. Be amsmath tags

      -

      hyperref redefines two internal commands of amsmath related the

      hyperref redefines two internal commands of amsmath related the \tag command to add an anchor. This code can be suppressed by defining \hyper@nopatch@amsmath@tag. (This normally makes @@ -960,7 +964,8 @@ class="ec-lmvtt-10">\hyper@nopatch@amsmath@tag. (This normally makes counters

      -

      hyperref patches the kernel command

      hyperref patches the kernel command \@definecounter, \@newctr, \@addtoreset and @@ -976,7 +981,8 @@ class="ec-lmvtt-10">\hyper@nopatch@counter. (This normally makes no sense math environments

      -

      hyperref patches

      hyperref patches \equation/\endequation, \eqnarray, \hyper@nopatch@mathenv. table of contents

      -

      hyperref redefines

      hyperref redefines \contentsline to be able to add links to toc entries. It redefines \addcontentsline to create the bookmarks and pass the destination names to the toc entries. This code can be @@ -999,7 +1006,8 @@ class="ec-lmvtt-10">\hyper@nopatch@toc. captions

      -

      hyperref redefines

      hyperref redefines \caption and \@caption to insert targets for links. This code can be suppressed by defining caption package) side-effects must be carefully longtable

      -

      hyperref redefines

      hyperref redefines \LT@start and \LT@array to move the targets in a better place. This code can be suppressed by defining \hyper@nopatch@longtable

      -

      +class="ec-lmvtt-10">\hyper@nopatch@longtable +

    +

    +theorems

    +

    hyperref patches \@thm. This code can be suppressed by defining \hyper@nopatch@thm +

    +

    +citations and bibliography

    +

    If natbib is not loaded hyperref redefines \bibcite, \@lbibitem and \@bibitem. These redefinitions + can be suppressed by defining \hyper@nopatch@bib.

    +

    5 Package options

    -

    All user-configurable aspects of

    All user-configurable aspects of hyperref are set using a single ‘key=value’ scheme (using the keyval package) with the key \hypersetup macro. When the package is loaded, a file hyperref.cfg is read if it can be found, and this is a convenient place to set options on a site-wide basis. -

    Note however that some options (for example

    Note however that some options (for example unicode) can only be used as package options, and not in \hypersetup as the option settings are processed as the package is read. The following tabular lists (hopefully all) these options. Be aware that some of the option do nothing or -have changed behaviour if the new pdfmanagement and so the new generic hyperref driver is +have changed behaviour if the new pdfmanagement and so the new generic hyperref driver is used. @@ -1049,13 +1081,13 @@ id="TBL-2-2"> option

    remark +class="td11">

    remark



    all driver options, e.g. pdftex

    often +class="td11">

    often not needed, as @@ -1069,7 +1101,7 @@ class="ec-lmvtt-10">implicit style="vertical-align:baseline;" id="TBL-2-4-"> pdfa

    no-op +class="td11">

    no-op with new pdfmanagement, @@ -1083,7 +1115,7 @@ class="ec-lmvtt-10">\DeclareDocumentMetadata. style="vertical-align:baseline;" id="TBL-2-5-"> unicode

    is +class="td11">

    is the default now @@ -1092,7 +1124,7 @@ class="td11">

    is style="vertical-align:baseline;" id="TBL-2-6-"> pdfversion

    no-op +class="td11">

    no-op with new pdfmanagement, @@ -1106,7 +1138,7 @@ class="ec-lmvtt-10">\DeclareDocumentMetadata. style="vertical-align:baseline;" id="TBL-2-7-"> bookmarks

    this +class="td11">

    this will probably change @@ -1117,50 +1149,50 @@ class="td11">

    this style="vertical-align:baseline;" id="TBL-2-8-"> backref

    pagebackref

    +class="td11">

    destlabel

    pdfusetitle

    +class="td11">

    pdfpagelabels

    +class="td11">

    hyperfootnotes

    +class="td11">

    hyperfigures

    +class="td11">

    hyperindex

    +class="td11">

    encap

    +class="td11">

    CJKbookmarks

    only +class="td11">

    only with the new @@ -1179,7 +1211,7 @@ class="ec-lmvtt-10">\hypersetup style="vertical-align:baseline;" id="TBL-2-18-"> psdextra

    only +class="td11">

    only with the new @@ -1198,7 +1230,7 @@ class="ec-lmvtt-10">\hypersetup style="vertical-align:baseline;" id="TBL-2-19-"> nesting

    only +class="td11">

    only with the new @@ -1227,10 +1259,10 @@ class="ec-lmvtt-10">\hypersetup class="td11"> -

    As an example, the behavior of a particular file could be controlled by: +

    As an example, the behavior of a particular file could be controlled by:

    • -

      a site-wide

      a site-wide hyperref.cfg setting up the look of links, adding backreferencing, and setting a PDF display default: @@ -1240,20 +1272,20 @@ class="ec-lmvtt-10">hyperref.cfg setting up the look of links, adding bac pdfpagemode=FullScreen, colorlinks=true} -

      +

    • -

      A global option in the file, which is passed down to

      A global option in the file, which is passed down to hyperref:

            \documentclass[dvips]{article}
       
      -

      +

    • -

      File-specific options in the

      File-specific options in the \usepackage commands, which override the ones set in hyperref.cfg: @@ -1263,8 +1295,8 @@ class="ec-lmvtt-10">hyperref.cfg: \usepackage[colorlinks=false]{hyperref} \hypersetup{pdftitle={A Perfect Day}} -

    -

    As seen in the previous example, information entries (pdftitle, pdfauthor, …) should be set after the +

+

As seen in the previous example, information entries (pdftitle, pdfauthor, …) should be set after the package is loaded. Otherwise LaTeX expands the values of these options prematurely. Also LaTeX strips spaces in options. Especially option ‘pdfborder’ requires some care. Curly braces protect the value, if given as package option. They are not necessary in \hypersetup. \usepackage[pdfborder={0 0 0}]{hyperref} \hypersetup{pdfborder=0 0 0} -

-

Some options can be given at any time, but many are restricted: before

+

Some options can be given at any time, but many are restricted: before \begin{document}, only in \usepackage[...]{hyperref}, before first use, etc. -

In the key descriptions that follow, many options do not need a value, as they default to the value +

In the key descriptions that follow, many options do not need a value, as they default to the value true if used. These are the ones classed as ‘boolean’. The values true and false can always be specified, however. -

+

5.1 General options

-

Firstly, the options to specify general behavior and page size. -

+

Firstly, the options to specify general behavior and page size. +

-

+

5.2 Options for destination names

-

Destinations names (also anchor, target or link names) are internal names that identify a position on a +

Destinations names (also anchor, target or link names) are internal names that identify a position on a page in the document. They are used in link targets for inner document links or the bookmarks, for example. -

Usually anchor are set, if

Usually anchor are set, if \refstepcounter is called. Thus there is a counter name and value. Both are used to construct the destination name. By default the counter value follows the counter name separated by a dot. Example for the fourth chapter:

-

chapter.4

-

This scheme is used by: +

This scheme is used by:

-

+

\autoref

-

displays the description label for the reference depending on the counter name. +

displays the description label for the reference depending on the counter name.

-

+

\hyperpage

-

is used by the index to get page links. Page anchor setting (

is used by the index to get page links. Page anchor setting (pageanchor) must not be turned off.

-

It is very important that the destination names are unique, because two destinations must not share +

It is very important that the destination names are unique, because two destinations must not share the same name. The counter value \the<counter> is not always unique for the counter. For example, table and figures can be numbered inside the chapter without having the chapter number in their @@ -1412,7 +1444,7 @@ class="ec-lmvtt-10">table.2.4 is unique because it has used \theHtable that gives 2.4 in this case. -

Often the user do not need to set

Often the user do not need to set \theH<counter>. Defaults for standard cases (chapter, …) are provided. And after hyperref is loaded, new counters with parent counters also define \@addtoreset or \numberwithin of package amsmath are used. -

Usually problems with duplicate destination names can be solved by an appropriate definition of +

Usually problems with duplicate destination names can be solved by an appropriate definition of \theH<counter>. If option hypertexnames is disabled, then a unique artificial number is used instead of @@ -1432,11 +1464,11 @@ class="ec-lmvtt-10">plainpages the page anchors use the arabic form. In both latter cases \hyperpage for index links is affected and might not work properly. -

If an unnumbered entity gets an anchor (starred forms of chapters, sections, …) or

If an unnumbered entity gets an anchor (starred forms of chapters, sections, …) or \phantomsection is used, then the dummy counter name section* and an artificial unique number is used. -

If the final PDF file is going to be merged with another file, than the destination names might clash, +

If the final PDF file is going to be merged with another file, than the destination names might clash, because both documents might contain chapter.1 or page.1. Also \renewcommand*{\HyperDestNameFilter}[1]{\jobname-#1} -

-

In document

+

In document docA the destination name chapter.2 becomes docA-chapter.2. -

Destination names can also be used from the outside in URIs(, if the driver has not removed or +

Destination names can also be used from the outside in URIs(, if the driver has not removed or changed them), for example:

@@ -1467,8 +1499,8 @@ changed them), for example:
 http://somewhere/path/file.pdf#nameddest=chapter.4
 
-

-

However using a number seems unhappy. If another chapter is added before, the number changes. But it is +

+

However using a number seems unhappy. If another chapter is added before, the number changes. But it is very difficult to pass a new name for the destination to the anchor setting process that is usually deep hidden in the internals. The first name of \label after the anchor setting seems a good @@ -1480,8 +1512,8 @@ approximation:   \section{Introduction}   \label{intro} -

-

Option

+

Option destlabel checks for each \label, if there is a new destination name active and replaces the destination name by the label name. Because the destination name is already in use because of the @@ -1503,8 +1535,8 @@ class="ec-lmri-10">all destination names:   \jobname-\HyperDestLabelReplace{#1}% } -

-

The other case that only files prefixed that do not have a corresponding

+

The other case that only files prefixed that do not have a corresponding \label is more complicate, because \HyperDestLabelReplace needs the unmodified destination name as argument. This is solved by an @@ -1528,12 +1560,12 @@ LuaTEX): } \makeatother -

-

With option

+

With option destlabel destinations can also named manually, if the destination is not yet renamed:

-

\HyperDestRename{destinationnewname}

-

Hint: Anchors can also be named and set by

Hint: Anchors can also be named and set by \hypertarget. -

+

-

+

5.3 Configuration options

-

+

boolean @@ -1665,7 +1698,7 @@ class="td11"> boolean @@ -1677,7 +1710,7 @@ class="td11"> boolean +

Allows links to be nested; no drivers currently support this.

@@ -1694,35 +1727,35 @@ class="td11">
true -

In the hypertex driver, the height of links is normally +

In the hypertex driver, the height of links is normally calculated by the driver as simply the base line of contained text; this options forces \special commands to reflect the @@ -1651,7 +1683,8 @@ class="td11"> boolean

both -

This option is in hyperref only used in the dviwindo driver, +

This option is in hyperref only used in the dviwindo driver, in all other cases it doesn’t do anything sensible—it neither allows nor prevents links to be broken. The ocgx2 package checks the state of the boolean.

true -

Determines whether every page is given an implicit anchor +

Determines whether every page is given an implicit anchor at the top left corner. If this is turned off, \printindex will not contain valid hyperlinks.

false -

Allows links to be nested; no drivers currently support this.

-

Note for option

Note for option breaklinks: The correct value is automatically set according to the driver features. It can be overwritten for drivers that do not support broken links. However, at any case, the link area will be wrong and displaced. -

+

5.4 Backend drivers

-

If no driver is specified, the package tries to find a driver in the following order: +

If no driver is specified, the package tries to find a driver in the following order:

  1. -

    Autodetection, some TeX processors can be detected at TeX macro level (pdfTeX, XeTeX, +

    Autodetection, some TeX processors can be detected at TeX macro level (pdfTeX, XeTeX, VTeX).

  2. -

    Option

    Option driverfallback. If this option is set, its value is taken as driver option.

  3. -

    Macro

    Macro \Hy@defaultdriver. The macro takes a driver file name (without file extension).

  4. -

    Package default is

    Package default is hypertex.

-

Many distributions are using a driver file

Many distributions are using a driver file hypertex.cfg that define \Hy@defaultdriver with hdvips. This @@ -1730,9 +1763,9 @@ is recommended because driver dvips provides much more features than hypertex for PDF generation. -

+

class="td01">driverfallback +

Its value is used as driver option

+

if the driver is not given or autodetected.

dvipdfm driver. < class="td01">dvipdfmx @@ -1771,7 +1804,7 @@ class="ec-lmss-10">dvipdfmx driver. < class="td01">dvips dvips driver. class="td01">dvipsone dvipsone driver. class="td01">dviwindo dviwindo Windows previewer. class="td01">hypertex pdftex program. ps2pdf dvips. class="td01">tex4ht VTeX; the PDF and HTML backends are detected class="td01">vtexpdfmark +

For use with XeTeX (using backend for dvipdfm).

@@ -1883,7 +1916,7 @@ class="td01"> class="td01">
-

Its value is used as driver option

-

if the driver is not given or autodetected.

dvipdfm -

Sets up

Sets up hyperref for use with the dvipdfm driver.

-

Sets up

Sets up hyperref for use with the dvipdfmx driver.

-

Sets up

Sets up hyperref for use with the dvips driver.

-

Sets up

Sets up hyperref for use with the dvipsone driver.

-

Sets up

Sets up hyperref for use with the dviwindo Windows previewer.

-

Sets up

Sets up hyperref for use with the HyperTeX-compliant drivers.

latex2html -

Redefines a few macros for compatibility with

Redefines a few macros for compatibility with latex2html.

nativepdf -

An alias for

An alias for dvips

pdfmark -

An alias for

An alias for dvips

pdftex -

Sets up

Sets up hyperref for use with the pdftex program.

-

Redefines a few macros for compatibility with Ghostscript’s PDF writer, +

Redefines a few macros for compatibility with Ghostscript’s PDF writer, otherwise identical to dvips.

-

For use with

For use with TeX4ht

textures -

For use with

For use with Textures

vtex -

For use with MicroPress’

For use with MicroPress’ VTeX; the PDF and HTML backends are detected automatically.

-

For use with

For use with VTeX’s PostScript backend.

xetex -

For use with XeTeX (using backend for dvipdfm).

-

If you use

If you use dviwindo, you may need to redefine the macro \wwwbrowser (the default is -

-

+

+

5.5 Extension options

-

+

extension +

+

Sets encap character for hyperindex

@@ -2039,7 +2072,7 @@ class="td11"> boolean +

Color for normal internal links.

+

Color for anchor text. Ignored by most drivers.

+

Color for bibliographical citations in text.

+

Color for URLs which open local files.

+

Color for Acrobat menu items.

+

Color for run links (launch annotations).

+

Color for linked URLs.

+

Use small caps instead of color for links.

+

Hide links (removing color and border).

@@ -2153,15 +2186,15 @@ class="td11">
text -

Set the file extension (e.g. 

Set the file extension (e.g. dvi) which will be appended to file links created if you use the xr @@ -1929,7 +1962,7 @@ class="ec-lmvtt-10">hyperfigures

boolean -

text false -

Adds ‘backlink’ text to the end of each item in the +

Adds ‘backlink’ text to the end of each item in the bibliography, as a list of section numbers. This can only work properly if there is a blank line after each @@ -1960,7 +1993,7 @@ class="td11"> boolean

false -

Adds ‘backlink’ text to the end of each item in the +

Adds ‘backlink’ text to the end of each item in the bibliography, as a list of page numbers.

boolean true -

Makes the page +

Makes the page numbers of index entries into hyperlinks. Relays on unique page anchors (pageanchor, …) boolean

true -

Makes the footnote marks into hyperlinks to the +

Makes the footnote marks into hyperlinks to the footnote text. Easily broken …

encap -

Sets encap character for hyperindex

text section -

make text (

make text (section), page number (page), both (all) @@ -2017,7 +2050,7 @@ class="td11"> boolean

false -

make page number, not text, be link on TOC, LOF +

make page number, not text, be link on TOC, LOF and LOT

boolean false -

allow links to break over lines by making links over +

allow links to break over lines by making links over multiple lines into PDF links to the same target

false -

Colors the text of links and anchors. The colors +

Colors the text of links and anchors. The colors chosen depend on the the type of link. At present the only types of link distinguished are citations, page references, URLs, local file references, and other @@ -2053,7 +2086,7 @@ class="td11"> color

red -

Color for normal internal links.

color black -

Color for anchor text. Ignored by most drivers.

color green -

Color for bibliographical citations in text.

color cyan -

Color for URLs which open local files.

color red -

Color for Acrobat menu items.

color filecolor -

Color for run links (launch annotations).

color magenta -

Color for linked URLs.

allcolors color -

Set all color options (without border and field +

Set all color options (without border and field options).

boolean false -

Use small caps instead of color for links.

hidelinks -

Hide links (removing color and border).

-

Note that all color names must be defined before use, following the normal system of the standard +

Note that all color names must be defined before use, following the normal system of the standard LaTeX color package. -

+

5.6 PDF-specific display options

-

+

boolean @@ -2207,7 +2240,7 @@ class="ec-lmvtt-10">bookmarksopenlevel +

to specify which ‘toc’ file to mimic

@@ -2264,7 +2298,7 @@ class="td11"> name @@ -2276,7 +2310,7 @@ class="td11"> RGB color +

The color of the box around citations

+

The color of the box around links to files

+

The color of the box around normal links

+

The color of the box around Acrobat menu links

+

The color of the box around links to URLs

+

Color of border around ‘run’ links

+

Set all border color options

true -

A set of Acrobat bookmarks are written, in a +

A set of Acrobat bookmarks are written, in a manner similar to the table of contents, requiring two passes of LaTeX. Some postprocessing of the bookmark file (file extension boolean

false -

If Acrobat bookmarks are requested, show them +

If Acrobat bookmarks are requested, show them with all the subtrees expanded.

parameter -

level (

level (\maxdimen) to which bookmarks are open

boolean false -

If Acrobat bookmarks are requested, include +

If Acrobat bookmarks are requested, include section numbers.

text toc -

to specify which ‘toc’ file to mimic

boolean false -

This option should be used to produce CJK +

This option should be used to produce CJK bookmarks. Package hyperref supports both normal and preprocessed mode of the CJK it simply replaces CJK’s macros with special versions which expand to the corresponding character codes. Note that without the ‘unicode’ - option of hyperref you get PDF files which + option of hyperref you get PDF files which actually violate the PDF specification because non-Unicode character codes are used – some PDF readers localized for CJK languages (most notably Acroread itself) support this. Also note that option ‘CJKbookmarks’ cannot be used together with option ‘unicode’. -

No mechanism is provided to +

No mechanism is provided to translate non-Unicode bookmarks to Unicode; for portable PDF documents only Unicode encoding should be used.

/I -

How link buttons behave when selected; /I is +

How link buttons behave when selected; /I is for inverse (the default); the other possibilities are /N (no effect), /O (outline), and /P (inset highlighting).

0 1 0 -

The color of the box around citations

RGB color 0 .5 .5 -

The color of the box around links to files

RGB color 1 0 0 -

The color of the box around normal links

RGB color 1 0 0 -

The color of the box around Acrobat menu links

RGB color 0 1 1 -

The color of the box around links to URLs

RGB color 0 .7 .7 -

Color of border around ‘run’ links

allbordercolors -

Set all border color options

0 0 1 -

The style of box around links; defaults to a box +

The style of box around links; defaults to a box with lines of 1pt thickness, but the colorlinks option resets it to produce no border.

-

The color of link borders used to be specified

The color of link borders used to be specified only as 3 numbers in the range 0..1, giving an RGB color. Since version 6.76a, the usual color specifications of package (x)color can be used if hycolor. -

The bookmark commands are stored in a file called

The bookmark commands are stored in a file called jobname.out. The files is not processed by LaTeX so any markup is passed through. You can postprocess this file as needed; as an aid @@ -2378,13 +2412,13 @@ line

 \let\WriteBookmarks\relax
 
-

-

+

+

5.7 PDF display and information options

-

+

class="td01">baseurl +

Sets the base URL of the PDF document

pdftitle +

Sets the document information Title field

+

Sets the document information Author field

+

Sets the document information Subject field

+

Sets the document information Creator field

+

Sets the document information Keywords field

+

Sets the default PDF ‘view’ for each link

class="td01">pdfstartview +

Set the startup page view

+

Set the startup page view of remote PDF files

class="td01">pdfpagescrop @@ -2592,22 +2626,22 @@ class="ec-lmvtt-10">R2L (right to left) class="td01">pdfdisplaydoctitle +

resize document window to fit document size

+

PDF language identifier (RFC 3066)

+

make PDF viewer’s menu bar visible

class="td01">pdfnumcopies +

number of printed copies

+

set PDF page labels

@@ -2758,11 +2792,11 @@ class="td10"> class="td01">pdfprintarea class="td01">pdfprintclip class="td01">pdfprintpagerange +

set /PrintPageRange of viewer preferences

class="td01">pdftoolbar +

make PDF toolbar visible

class="td01">pdfviewclip class="td01">pdfwindowui +

make PDF user interface elements visible

+

Unicode encoded PDF strings

@@ -2902,7 +2936,7 @@ class="td11">
-

URL

URL

-

Sets the base URL of the PDF document

pdfpagemode -

name

name

empty -

Determines how the file is opening in +

Determines how the file is opening in Acrobat; the possibilities are UseNone, UseOutlines is used.

-

text

text

-

Sets the document information Title field

pdfauthor -

text

text

-

Sets the document information Author field

pdfsubject -

text

text

-

Sets the document information Subject field

pdfcreator -

text

text

-

Sets the document information Creator field

addtopdfcreator -

text

text

-

Adds additional text to the document +

Adds additional text to the document information Creator field

pdfkeywords -

text

text

-

Sets the document information Keywords field

pdftrapped -

name

name

empty -

Sets the document information Trapped entry. +

Sets the document information Trapped entry. Possible values are True, False and Unknown. class="td01">pdfinfo

-

key +

key value list

empty -

Alternative interface for setting the document +

Alternative interface for setting the document information.

pdfview -

name

name

XYZ -

Sets the default PDF ‘view’ for each link

pdfstartpage -

integer

integer

1 -

Determines on which page the PDF file is +

Determines on which page the PDF file is opened. An empty value means, the entry is not set.

-

name

name

Fit -

Set the startup page view

pdfremotestartview -

name

name

Fit -

Set the startup page view of remote PDF files

-

n +

n n n n

-

Sets the default PDF crop box for pages. This +

Sets the default PDF crop box for pages. This should be a set of four numbers

pdfcenterwindow -

boolean

boolean

false -

position the document window in the center +

position the document window in the center of the screen

pdfdirection -

name

name

empty -

direction setting. Possible values:

direction setting. Possible values: L2R (left to right) and R2L (right to left)

-

boolean

boolean

false -

display document title instead of file name in +

display document title instead of file name in title bar

pdfduplex -

name

name

empty -

paper handling option for print +

paper handling option for print dialog. Possible vatues are: Simplex (print single-sided), DuplexFlipLongEdge (duplex and flip on class="td01">pdffitwindow

-

boolean

boolean

false -

resize document window to fit document size

pdflang -

name

name

relax -

PDF language identifier (RFC 3066)

pdfmenubar -

boolean

boolean

true -

make PDF viewer’s menu bar visible

pdfnewwindow -

boolean

boolean

false -

make links that open another PDF file start a +

make links that open another PDF file start a new window

pdfnonfullscreenpagemode -

name

name

empty -

page mode setting on exiting full-screen mode. +

page mode setting on exiting full-screen mode. Possible values are UseNone, UseOutlines, @@ -2678,21 +2712,21 @@ class="ec-lmvtt-10">UseOC

-

integer

integer

empty -

number of printed copies

pdfpagelayout -

name

name

empty -

set layout of PDF pages. Possible values: +

set layout of PDF pages. Possible values: SinglePage, OneColumn, TwoPageRight class="td01">pdfpagelabels

-

boolean

boolean

true -

set PDF page labels

pdfpagetransition -

name

name

empty -

set PDF page transition style. Possible values +

set PDF page transition style. Possible values are Split, Blinds, R, which simply replaces the old page w class="td01">pdfpicktraybypdfsize

-

boolean

boolean

false -

specify whether PDF page size is used to select +

specify whether PDF page size is used to select input paper tray in print dialog

-

name

name

empty -

set /PrintArea of viewer preferences. Possible +

set /PrintArea of viewer preferences. Possible values are MediaBox, CropBox, CropBox

-

name

name

empty -

set /PrintClip of viewer preferences. Possible +

set /PrintClip of viewer preferences. Possible values are MediaBox, CropBox, CropBox

-

n +

n n (n n)*

empty -

set /PrintPageRange of viewer preferences

pdfprintscaling -

name

name

empty -

page scaling option for print dialog (option +

page scaling option for print dialog (option /PrintScaling of viewer preferences, PDF 1.6); valid values are None and AppDefault

-

boolean

boolean

true -

make PDF toolbar visible

pdfviewarea -

name

name

empty -

set /ViewArea of viewer preferences. Possible +

set /ViewArea of viewer preferences. Possible values are MediaBox, CropBox, CropBox

-

name

name

empty -

set /ViewClip of viewer preferences Possible +

set /ViewClip of viewer preferences Possible values are MediaBox, CropBox, CropBox

-

boolean

boolean

true -

make PDF user interface elements visible

unicode -

boolean

boolean

true -

Unicode encoded PDF strings

-

Each link in Acrobat carries its own magnification level, which is set using PDF coordinate space, which +

Each link in Acrobat carries its own magnification level, which is set using PDF coordinate space, which is not the same as TeX’s. The unit is bp and the origin is in the lower left corner. See also \hypercalcbp that is explained on page pdfview, pdfstartview and pdfremotestartview parameters. -

+

XYZ +

Fits the page to the window.

+

Fits the width of the page to the window.

+

Fits the height of the page to the window.

+

Fits the page bounding box to the window.

left top zoom -

Sets a coordinate and a zoom factor. If any one +

Sets a coordinate and a zoom factor. If any one is null, the source link value is used. null null Fit

-

Fits the page to the window.

FitH top -

Fits the width of the page to the window.

FitV left -

Fits the height of the page to the window.

FitR left bottom right top -

Fits the rectangle specified by the four +

Fits the rectangle specified by the four coordinates to the window.

FitB -

Fits the page bounding box to the window.

FitBH top -

Fits the width of the page bounding box to +

Fits the width of the page bounding box to the window.

FitBV left -

Fits the height of the page bounding box to +

Fits the height of the page bounding box to the window.

-

The

The pdfpagelayout can be one of the following values. -

+

class="td01">SinglePage +

Displays a single page; advancing flips the page

+

Displays the document in one column; continuous scrolling.

class="td01">
-

Displays a single page; advancing flips the page

OneColumn -

Displays the document in one column; continuous scrolling.

TwoColumnLeft -

Displays the document in two columns, odd-numbered pages to +

Displays the document in two columns, odd-numbered pages to the left.

TwoColumnRight -

Displays the document in two columns, odd-numbered pages to +

Displays the document in two columns, odd-numbered pages to the right.

TwoPageLeft -

Displays two pages, odd-numbered pages to the left (since PDF +

Displays two pages, odd-numbered pages to the left (since PDF 1.5).

TwoPageRight -

Displays two pages, odd-numbered pages to the right (since PDF +

Displays two pages, odd-numbered pages to the right (since PDF 1.5).

-

Finally, the

Finally, the pdfpagetransition can be one of the following values, where /Di stands for direction of motion in degrees, generally in 90Blinds /Dm /V), and /M is for motion, either in (/I) or out (/O). -

+

Blinds +

A box sweeps in or out.

Dissolve +

Two lines sweep across the screen to reveal the new page.

+

Simply replaces the old page with the new one.

Push Cover Fade
/Dm -

Multiple lines distributed evenly across the screen sweep +

Multiple lines distributed evenly across the screen sweep in the same direction to reveal the new page.

Box /M -

A box sweeps in or out.

-

The page image dissolves in a piecemeal fashion to reveal +

The page image dissolves in a piecemeal fashion to reveal the new page.

Glitter /Di -

Similar to Dissolve, except the effect sweeps across the +

Similar to Dissolve, except the effect sweeps across the screen.

Split /Dm /M -

Two lines sweep across the screen to reveal the new page.

Wipe /Di -

A single line sweeps across the screen to reveal the new +

A single line sweeps across the screen to reveal the new page.

R -

Simply replaces the old page with the new one.

Fly /Di /M -

Changes are flown out or in (as specified by /M), in the +

Changes are flown out or in (as specified by /M), in the direction specified by /Di, to or from a location that is offscreen except when /Di is None.

/Di -

The old page slides off the screen while the new page +

The old page slides off the screen while the new page slides in, pushing the old page out in the direction specified by /Di.

/Di -

The new page slides on to the screen in the direction +

The new page slides on to the screen in the direction specified by /Di, covering the old page.

Uncover /Di -

The old page slides off the screen in the direction +

The old page slides off the screen in the direction specified by /Di, uncovering the new page in the direction specified by /Di.

-

The new page gradually becomes visible through the old +

The new page gradually becomes visible through the old one.

-

+

5.8 Option pdfinfo

-

The information entries can be set using

The information entries can be set using pdftitle, pdfsubject, …. Option pdfinfo provides an alternative @@ -3246,15 +3280,15 @@ strings (see PDF specification). Example:   } } -

-

+

+

5.9 Big alphabetical list

-

The following is a complete listing of available options for

The following is a complete listing of available options for hyperref, arranged alphabetically. -

+

allbordercolors +

Set all border color options

+

set color of anchors, ignored by most drivers.

+

do bibliographical back references

+

set base URL for document

+

make bookmarks

+

put section numbers in bookmarks

+

open up bookmark tree

+

level to which bookmarks are open

+

to specify which ‘toc’ file to mimic

+

allow links to break over lines

+

to produce CJK bookmarks

+

color of border around cites

+

color of citation links

+

color links

debug @@ -3406,7 +3440,7 @@ class="ec-lmvtt-10">destlabel draft +

do not do any hyperlinking

+

default if no driver specified or detected

+

to set encap character for hyperindex

+

suffix of linked files

+

color of border around file links

+

color of file links

+

opposite of option draft

+

use small caps instead of color for links

+

Hide links (removing color and border)

+

make figures hyper links

+

set up hyperlinked footnotes

+

set up hyperlinked indices

+

use guessable names for links

+

redefine LaTeX internals

+

color of border around links

+

color of links

+

make text be link on TOC, LOF and LOT

+

color of border around menu links

+

color for menu links

+

use LaTeX-computed names for links

nesting +

allow nesting of links

+

allow to set the name of the next anchor

+

put an anchor on every page

+

backreference by page number

+

text for PDF Author field

+

width of PDF link border

+

border style for links

+

text for PDF Creator field

+

+

direction setting

+

paper handling option for print dialog

+

resize document window to fit document size

+

set highlighting of PDF links

+

text for PDF Keywords field

+

PDF language identifier (RFC 3066)

+

make PDF viewer’s menu bar visible

+

make links that open another PDF

+

file start a new window

+

page mode setting on exiting full-screen mode

+

number of printed copies

+

set PDF page labels

+

set layout of PDF pages

+

set default mode of PDF display

+

set crop size of PDF document

pdfpagetransition +

set PDF page transition style

+

set option for print dialog

+

set /PrintArea of viewer preferences

+

set /PrintClip of viewer preferences

+

set /PrintPageRange of viewer preferences

+

page scaling option for print dialog

+

text for PDF Producer field

+

starting view of remote PDF documents

+

page at which PDF document opens

+

starting view of PDF document

+

text for PDF Subject field

+

text for PDF Title field

+

make PDF toolbar visible

+

PDF ‘view’ when on link traversal

+

set /ViewArea of viewer preferences

+

set /ViewClip of viewer preferences

+

make PDF user interface elements visible

+

do page number anchors as plain Arabic

+

color of border around ‘run’ links

+

color of ‘run’ links

+

set page size by special driver commands

@@ -4115,7 +4149,7 @@ class="ec-lmvtt-10">unicode +

color of border around URL links

+

color of URL links

+

be chatty

-

Set all border color options

allcolors -

Set all color options (without border and field +

Set all color options (without border and field options)

anchorcolor black -

set color of anchors, ignored by most drivers.

backref false -

do bibliographical back references

baseurl empty -

set base URL for document

bookmarks true -

make bookmarks

bookmarksnumbered false -

put section numbers in bookmarks

bookmarksopen false -

open up bookmark tree

bookmarksopenlevel \maxdimen -

level to which bookmarks are open

bookmarkstype toc -

to specify which ‘toc’ file to mimic

breaklinks false -

allow links to break over lines

CJKbookmarks false -

to produce CJK bookmarks

citebordercolor 0 1 0 -

color of border around cites

citecolor green -

color of citation links

colorlinks false -

color links

true -

(

(tex4ht, dviwindo)

false -

provide details of anchors defined; same as +

provide details of anchors defined; same as verbose

false -

destinations are named by the first

destinations are named by the first \label after the anchor creation

false -

do not do any hyperlinking

driverfallback -

default if no driver specified or detected

dvipdfm -

use

use dvipdfm backend

dvipdfmx -

use

use dvipdfmx backend

dvips -

use

use dvips backend

dvipsone -

use

use dvipsone backend

dviwindo -

use

use dviwindo backend

encap -

to set encap character for hyperindex

extension dvi -

suffix of linked files

filebordercolor 0 .5 .5 -

color of border around file links

filecolor cyan -

color of file links

final true -

opposite of option draft

frenchlinks false -

use small caps instead of color for links

hidelinks -

Hide links (removing color and border)

hyperfigures false -

make figures hyper links

hyperfootnotes true -

set up hyperlinked footnotes

hyperindex true -

set up hyperlinked indices

hypertex -

use

use HyperTeX backend

hypertexnames true -

use guessable names for links

implicit true -

redefine LaTeX internals

latex2html -

use

use LaTeX2HTML backend

linkbordercolor 1 0 0 -

color of border around links

linkcolor red -

color of links

linktoc section -

make text be link on TOC, LOF and LOT

linktocpage false -

make page number, not text, be link on TOC, +

make page number, not text, be link on TOC, LOF and LOT

menubordercolor 1 0 0 -

color of border around menu links

menucolor red -

color for menu links

nativepdf false -

an alias for

an alias for dvips

naturalnames false -

use LaTeX-computed names for links

false -

allow nesting of links

next-anchor -

allow to set the name of the next anchor

pageanchor true -

put an anchor on every page

pagebackref false -

backreference by page number

pdfauthor empty -

text for PDF Author field

pdfborder 0 0 1 -

width of PDF link border

0 0 0 -

(

(colorlinks)

pdfborderstyle -

border style for links

pdfcenterwindow false -

position the document window in the center +

position the document window in the center of the screen

pdfcreator LaTeX with -

text for PDF Creator field

hyperref -

pdfdirection empty -

direction setting

pdfdisplaydoctitle false -

display document title instead of file name in +

display document title instead of file name in title bar

pdfduplex empty -

paper handling option for print dialog

pdffitwindow false -

resize document window to fit document size

pdfhighlight /I -

set highlighting of PDF links

pdfinfo empty -

alternative interface for setting document +

alternative interface for setting document information

pdfkeywords empty -

text for PDF Keywords field

pdflang relax -

PDF language identifier (RFC 3066)

pdfmark false -

an alias for

an alias for dvips

pdfmenubar true -

make PDF viewer’s menu bar visible

pdfnewwindow false -

make links that open another PDF

-

file start a new window

pdfnonfullscreenpagemode empty -

page mode setting on exiting full-screen mode

pdfnumcopies empty -

number of printed copies

pdfpagelabels true -

set PDF page labels

pdfpagelayout empty -

set layout of PDF pages

pdfpagemode empty -

set default mode of PDF display

pdfpagescrop empty -

set crop size of PDF document

empty -

set PDF page transition style

pdfpicktraybypdfsize empty -

set option for print dialog

pdfprintarea empty -

set /PrintArea of viewer preferences

pdfprintclip empty -

set /PrintClip of viewer preferences

pdfprintpagerange empty -

set /PrintPageRange of viewer preferences

pdfprintscaling empty -

page scaling option for print dialog

pdfproducer empty -

text for PDF Producer field

pdfremotestartview Fit -

starting view of remote PDF documents

pdfstartpage 1 -

page at which PDF document opens

pdfstartview Fit -

starting view of PDF document

pdfsubject empty -

text for PDF Subject field

pdftex -

use

use pdfTeX backend

pdftitle empty -

text for PDF Title field

pdftoolbar true -

make PDF toolbar visible

pdftrapped empty -

Sets the document information Trapped entry. +

Sets the document information Trapped entry. Possible values are True, False and pdfview

XYZ -

PDF ‘view’ when on link traversal

pdfviewarea empty -

set /ViewArea of viewer preferences

pdfviewclip empty -

set /ViewClip of viewer preferences

pdfwindowui true -

make PDF user interface elements visible

plainpages false -

do page number anchors as plain Arabic

ps2pdf -

use

use ps2pdf backend

psdextra false -

define more short names for PDF string +

define more short names for PDF string commands

raiselinks false -

raise up links (for

raise up links (for HyperTeX backend)

runbordercolor 0 .7 .7 -

color of border around ‘run’ links

runcolor filecolor -

color of ‘run’ links

setpagesize true -

set page size by special driver commands

tex4ht -

use

use TeX4ht backend

textures -

use

use Textures backend

true -

Unicode encoded pdf strings, starting with +

Unicode encoded pdf strings, starting with version v7.00g set by default to true for all engines. It will load a number of definitions in puenc.def. It can be set to false for pdflatex, @@ -4127,7 +4161,7 @@ class="ec-lmvtt-10">urlbordercolor

0 1 1 -

color of border around URL links

urlcolor magenta -

color of URL links

verbose false -

be chatty

vtex -

use

use VTeX backend

xetex -

use

use XeTeX backend

-

+

6 Additional user macros

-

If you need to make references to URLs, or write explicit links, the following low-level user macros are +

If you need to make references to URLs, or write explicit links, the following low-level user macros are provided: -

}{text}
-

The

The text is made a hyperlink to the URL; this must be a full URL (relative to the base URL, if that is defined). The special characters # and % do not need to be escaped in any way (unless the command is used in the argument of another command). -

The optional argument options recognizes the hyperref options

The optional argument options recognizes the hyperref options pdfremotestartview, pdfnewwindow and the following key value options:

-

+

page:

-

Specifies the start page number of remote PDF documents. First page is

Specifies the start page number of remote PDF documents. First page is 1.

-

+

ismap:

-

Boolean key, if set to

Boolean key, if set to true, the URL should appended by the coordinates as query parameters by the PDF viewer.

-

+

nextactionraw:

-

The value of key

The value of key /Next of action dictionaries, see PDF specification.

-

\url{URL}
-

Similar to

Similar to \href{URLURL}}. Depending on the driver \href also tries to detect the link type. Thus the result can be a url link, file link, … -

\nolinkurl{URL}
-

Write

Write URL in the same way as \url, without creating a hyperlink. -

{URL}
-

A base

A base URL is established, which is prepended to other specified URLs, to make it easier to write portable documents. -

}{text}
-

The link to the image referenced by the URL is inserted, using

The link to the image referenced by the URL is inserted, using text as the anchor. -

For drivers that produce HTML, the image itself is inserted by the browser, with the

For drivers that produce HTML, the image itself is inserted by the browser, with the text being ignored completely. -

}{text}
-

A target area of the document (the

A target area of the document (the text) is marked, and given the name category.name -

}{text}
-

text is made into a link to URL#category.name -

]{text}
-

text is made into a link to the same place as \ref{label} would be linked. -

}{text}
-

}{text}
-

A simple internal link is created with

A simple internal link is created with \hypertarget, with two parameters of an anchor name, and anchor \hyperlink has two arguments, the name class="ec-lmvtt-10">\hypertarget, and the text which be used as the link on the page. -

Note that in HTML parlance, the

Note that in HTML parlance, the \hyperlink command inserts a notional # in front of each link, making it relative to the current testdocument; \href expects a full URL. -

\phantomsection
-

This sets an anchor at this location. It works similar to

This sets an anchor at this location. It works similar to \hypertarget{}{} with an automatically chosen anchor name. Often it is used in conjunction with \addcontentsline for sectionlike things (index, @@ -4423,10 +4458,10 @@ Example: \addcontentsline{toc}{chapter}{\indexname} \printindex -

-

Now the entry in the table of contents (and bookmarks) for the index points to the start of the index page, +

+

Now the entry in the table of contents (and bookmarks) for the index points to the start of the index page, not to a location before this page. -

}{label}
-

This retrieves the anchor or the page anchor from a label in an expandable way. It takes +

This retrieves the anchor or the page anchor from a label in an expandable way. It takes \HyperDestNameFilter into account. It can e.g. be used with the \bookmark from the bookmark @@ -4455,12 +4490,12 @@ package to set a destination to a label:

 \bookmark[dest=\hyperget{anchor}{sec}]{section}
 
-

-

As

+

As pageanchor retrieves the page number from the label it can’t be use together with the option plainpages. -

{currentanchor}{}
-

This retrieves the last anchor that has been set. It too takes

This retrieves the last anchor that has been set. It too takes \HyperDestNameFilter into account. -

\autoref class="ec-lmvtt-10">{label}
-

This is a replacement for the usual

This is a replacement for the usual \ref command that places a contextual label in front of the reference. This gives your users a bigger target to click for hyperlinks (e.g. ‘section 2’ instead of merely the number ‘2’). -

The label is worked out from the context of the original

The label is worked out from the context of the original \label command by hyperref by using the macros listed below (shown with their default values). The macros can be (re)defined in documents using @@ -4496,16 +4531,16 @@ macros listed below (shown with their default values). The macros can be (re)def class="ec-lmvtt-10">\(re)newcommand; note that some of these macros are already defined in the standard document classes. The mixture of lowercase and uppercase initial letters is deliberate and corresponds to the author’s practice. -

For each macro below,

For each macro below, hyperref checks \*autorefname before \*name. For instance, it looks for \figureautorefname before \figurename. -

+

class="td01">Macro +

Figure

+

Table

+

Part

+

Appendix

+

Equation

+

item

+

chapter

+

section

+

subsection

+

subsubsection

+

paragraph

+

footnote

class="td01">\AMSname +

Equation

+

Theorem

+

page

@@ -4626,7 +4661,7 @@ class="td01"> class="td01">
-

Default

\figurename -

Figure

\tablename -

Table

\partname -

Part

\appendixname -

Appendix

\equationname -

Equation

\Itemname -

item

\chaptername -

chapter

\sectionname -

section

\subsectionname -

subsection

\subsubsectionname -

subsubsection

\paragraphname -

paragraph

\Hfootnotename -

footnote

-

Equation

\theoremname -

Theorem

\page -

page

-

Example for a redefinition if

Example for a redefinition if babel is used:

@@ -4637,8 +4672,8 @@ class="ec-lmss-10">babel is used:   \def\subsectionautorefname{Unterkapitel}% } -

-

Hint:

+

Hint: \autoref works via the counter name that the reference is based on. Sometimes \autoref chooses the wrong name, if the counter is used for different things. For example, it happens with @@ -4678,8 +4713,8 @@ We will use \autoref{a} to prove \auto \end{document} -

-

+

{label}
-

It replaces

It replaces \pageref and adds the name for page in front of the page reference. First \pageautorefname is checked before \pagename. -

For instances where you want a reference to use the correct counter, but not to create a +

For instances where you want a reference to use the correct counter, but not to create a link, there are starred forms (these starred forms exist even if hyperref has been loaded with implicit=false): -

\ref*{label}
-

{label}
-

\autoref*{label}
-

{label}
-

A typical use would be to write +

A typical use would be to write

 \hyperref[other]{that nice section (\ref*{other}) we read before}
 
-

-

We want

+

We want \ref*{other} to generate the correct number, but not to form a link, since we do this ourselves with \hyperref. -

}{TeXstring}
-

\pdfstringdef returns a macro containing the PDF string. (Currently this is done globally, but do not rely on it.) All the following tasks, definitions and redefinitions are made in a group to keep them local:

  • -

    Switching to PD1 or PU encoding +

    Switching to PD1 or PU encoding

  • -

    Defining the “octal sequence commands” (

    Defining the “octal sequence commands” (\345): \edef\3{\string\3}

  • -

    Special glyphs of TeX:

    Special glyphs of TeX: \{, \%, \&, \space, \dots, etc.

  • -

    National glyphs (

    National glyphs (german.sty, french.sty, etc.)

  • -

    Logos:

    Logos: \TeX, \eTeX, \MF, etc.

  • -

    Disabling commands that do not provide useful functionality in bookmarks:

    Disabling commands that do not provide useful functionality in bookmarks: \label, \index, \def, \let, etc.

  • -

    LaTeX’s font commands like

    LaTeX’s font commands like \textbf, etc.

  • -

    Support for

    Support for \xspace provided by the xspace package

-

In addition, parentheses are protected to avoid the danger of unsafe unbalanced parentheses in +

In addition, parentheses are protected to avoid the danger of unsafe unbalanced parentheses in the PDF string. For further details, see Heiko Oberdiek’s EuroTeX paper distributed with hyperref. -

{NoHyper}…\end{NoHyper}
-

Sometimes we just don’t want the wretched package interfering with us. Define an environment we +

Sometimes we just don’t want the wretched package interfering with us. Define an environment we can put in manually, or include in a style file, which stops the hypertext functions doing anything. This is used, for instance, in the Elsevier classes, to stop hyperref playing havoc in the front matter. -

+

6.1 Bookmark macros

-

+

6.1.1 Setting bookmarks
-

Usually

Usually hyperref automatically adds bookmarks for \section and similar macros. But they can also set manually. -

}{name}
-

creates a bookmark with the specified text and at the given level (default is 0). As name for the +

creates a bookmark with the specified text and at the given level (default is 0). As name for the internal anchor name is used (in conjunction with level). Therefore the name must be unique (similar to \label). -

}{name}
-

creates a bookmark at the current level. -

creates a bookmark at the current level. +

}{name}
-

creates a bookmark one step down in the bookmark hierarchy. Internally the current level is increased +

creates a bookmark one step down in the bookmark hierarchy. Internally the current level is increased by one. -

}{name}
-

creates a bookmark below the current bookmark level. However after the command the current +

creates a bookmark below the current bookmark level. However after the command the current bookmark level has not changed. -

Hint: Package bookmark replaces hyperref’s bookmark organization by a new algorithm:

  • -

    Usually only one LaTeX run is needed. +

    Usually only one LaTeX run is needed.

  • -

    More control over the bookmark appearance (color, font). +

    More control over the bookmark appearance (color, font).

  • -

    Different bookmark actions are supported (external file links, URLs, …).

-

Therefore I recommend using this package. -

+

Different bookmark actions are supported (external file links, URLs, …). +

Therefore I recommend using this package. +

6.1.2 Replacement macros
-

hyperref takes the text for bookmarks from the arguments of commands like \section, which can contain things like math, colors, or font changes, none of which will display in bookmarks as is. -

}{PDFstring}
-

For example, +

For example,

@@ -4960,8 +4995,8 @@ class="ec-lmvtt-10">}  
 }
 \section{\texorpdfstring{\textcolor{red}}{}{Red} Mars}
 
-

-

+

\pdfstringdef executes the hook before it expands the string. Therefore, you can use this hook to perform additional tasks or to disable additional commands. @@ -4973,8 +5008,8 @@ perform additional tasks or to disable additional commands.   \renewcommand{\mycommand}[1]{}% } -

-

However, for disabling commands, an easier way is via

+

However, for disabling commands, an easier way is via \pdfstringdefDisableCommands, which adds its argument to the definition of \pdfstringdefPreHook (‘@’ can here be used as letter in command @@ -4988,11 +5023,11 @@ names):   \let\textcolor\@gobble } -

-

+

+

6.2 Pagelabels

-

{page number format}
-

This allows to change format of the page number shown in the tool bar of a PDF viewer for a specific +

This allows to change format of the page number shown in the tool bar of a PDF viewer for a specific page, for example -

\thispdfpagelabel{Empty Page-\roman{page}} -

The command affects the page on which it is executed, so asynchronous page breaking should be +

The command affects the page on which it is executed, so asynchronous page breaking should be taken into account. It should be used in places where for example \thispagestyle can be use too. -

+

6.3 Utility macros

-

{dimen specification}
-

\hypercalcbp takes a TeX dimen specification and converts it to bp and returns the number without the unit. This is useful for options pdfview, -

-

The origin of the PDF coordinate system is the lower left corner. -

Note, for calculations you need either package

+

The origin of the PDF coordinate system is the lower left corner. +

Note, for calculations you need either package calc or ε-TEX. Nowadays the latter should automatically be enabled for LATEX formats. Users without ε-TEX, please, look in the source documentation hyperref.dtx for further limitations. -

Also

Also \hypercalcbp cannot be used in option specifications of \documentclass and \usepackage, because LATEX expands the option lists of these commands. However package hyperref is not yet loaded and an undefined control sequence error would arise. -

+

7 New Features5

7.1 Option ‘pdflinkmargin’

-

Option ‘pdflinkmargin’ is an experimental option for specifying a link margin, if the driver supports this. +

Option ‘pdflinkmargin’ is an experimental option for specifying a link margin, if the driver supports this. Default is 1 pt for supporting drivers. -

+

-

+

pdfTeX

-

+

  • -

    The link area also depends on the surrounding box. +

    The link area also depends on the surrounding box.

  • -

    Settings have local effect. +

    Settings have local effect.

  • -

    When a page is shipped out, pdfTeX uses the current setting of the link margin for all +

    When a page is shipped out, pdfTeX uses the current setting of the link margin for all links on the page.

-

+

pdfmark

-

+

  • -

    Settings have global effect.

+

Settings have global effect.

-

+

xetex

-

+

  • -

    Settings must be done in the preamble or the first page and then have global effect. +

    Settings must be done in the preamble or the first page and then have global effect. The key inserts the new (x)dvipdfmx special \special{dvipdfmx:config g #1} (with the unit removed).

-

+

Other drivers

-

Unsupported.

-

+

Unsupported. +

7.2 Field option ‘calculatesortkey’

-

Fields with calculated values are calculated in document order by default. If calculated field values +

Fields with calculated values are calculated in document order by default. If calculated field values depend on other calculated fields that appear later in the document, then the correct calculation order can be specified with option ‘calculatesortkey’. Its value is used as key to lexicographically sort the calculated fields. The sort key do not need to be unique. Fields that share the same key are sorted in document order. -

Currently the field option ‘calculatesortkey’ is only supported by the driver for pdfTeX. -

+

Currently the field option ‘calculatesortkey’ is only supported by the driver for pdfTeX. +

7.3 Option ‘next-anchor’

-

This option allows to overwrite the anchor name of the next anchor. This makes it possible to give for +

This option allows to overwrite the anchor name of the next anchor. This makes it possible to give for example the heading of the table of contents an anchor name which can be referenced with a bookmark command. @@ -5136,14 +5171,14 @@ command. \tableofcontents \bookmark[dest=\HyperDestNameFilter{toc},level=section]{\contentsname} -

-

+

+

7.4 Option ‘localanchorname’

-

WhenDeprecated 2022-04-27 v7.00o an anchor is set (e.g. via

WhenDeprecated 2022-04-27 v7.00o an anchor is set (e.g. via \refstepcounter, then the anchor name is globally set to the current anchor name. -

For example: +

For example:

@@ -5151,28 +5186,28 @@ globally set to the current anchor name.
     \begin{equation}\end{equation}
     \label{sec:foobar}
 
-

With the default global setting (localanchorname=false) a reference to ‘sec:foobar’ jumps to the +

With the default global setting (localanchorname=false) a reference to ‘sec:foobar’ jumps to the equation before. With option ‘localanchorname’ the anchor of the equation is forgotten after the environment and the reference ‘sec:foobar’ jumps to the section title. -

Option ‘localanchorname’ is an experimental option, there might be situations, where the anchor +

Option ‘localanchorname’ is an experimental option, there might be situations, where the anchor name is not available as expected. -

The option is deprecated: it makes it difficult for package authors to add targets for links if it is +

The option is deprecated: it makes it difficult for package authors to add targets for links if it is unclear if \@currentHref is set locally or globally. -

+

7.5 Option ‘customdriver’

-

The value of option ‘customdriver’ is the name of an external driver file without extension ‘.def’. The file +

The value of option ‘customdriver’ is the name of an external driver file without extension ‘.def’. The file must have \ProvidesFile with a version date and number that match the date and number of ‘hyperref’, otherwise a warning is given. -

Because the interface, what needs to be defined in the driver, is not well defined and +

Because the interface, what needs to be defined in the driver, is not well defined and quite messy, the option is mainly intended to ease developing, testing, debugging the driver part. -

+

7.6 Option ‘psdextra’

-

LaTeX’s NFSS is used to assist the conversion of arbitrary TeX strings to PDF strings (bookmarks, PDF +

LaTeX’s NFSS is used to assist the conversion of arbitrary TeX strings to PDF strings (bookmarks, PDF information entries). Many math command names (\geq, \notin, ...) are not in control of NFSS, @@ -5186,17 +5221,17 @@ on means that the short names are available. Then \geq can directly be used instead of \textgeq. -

+

7.7 \XeTeXLinkBox

-

When XeTeX generates a link annotation, it does not look at the boxes (as the other drivers), but only +

When XeTeX generates a link annotation, it does not look at the boxes (as the other drivers), but only at the character glyphs. If there are no glyphs (images, rules, ...), then it does not generate a link annotation. Macro \XeTeXLinkBox puts its argument in a box and adds spaces at the lower left and upper right corners. An additional margin can be specified by setting it to the dimen register \XeTeXLinkMargin. The default is 2pt. -

Example: +

Example:

@@ -5213,8 +5248,8 @@ class="ec-lmvtt-10">\XeTeXLinkMargin. The default is 2pt.
     }
     \end{document}
 
-

-

+

+

7.8 \IfHyperBooleanExists and \IfHyperBoolean

@@ -5222,7 +5257,8 @@ class="ec-lmvtt-10">\XeTeXLinkMargin. The default is 2pt.
  \IfHyperBooleanExists{OPTION}{YES}{NO}
 
-

If a hyperref OPTION is a boolean, that means it takes values ‘true’ or ‘false’, then

If a hyperref OPTION is a boolean, that means it takes values ‘true’ or ‘false’, then \IfHyperBooleanExists calls YES, otherwise NO. @@ -5230,23 +5266,25 @@ calls YES, otherwise NO.

  \IfHyperBoolean{OPTION}{YES}{NO}
 
-

Macro

Macro \IfHyperBoolean calls YES, if OPTION exists as boolean and is enabled. Otherwise NO is executed. -

Both macros are expandable. Additionally option ‘stoppedearly’ is available. It is enabled if +

Both macros are expandable. Additionally option ‘stoppedearly’ is available. It is enabled if \MaybeStopEarly or \MaybeStopNow end hyperref prematurely. -

+class="ec-lmvtt-10">\MaybeStopNow end hyperref prematurely. +

7.9 \unichar

-

If a Unicode character is not supported by puenc.def, it can be given by using

If a Unicode character is not supported by puenc.def, it can be given by using \unichar. Its name and syntax is inherited from package ‘ucs’. However it is defined independently for use in -hyperref’s hyperref’s \pdfstringdef (that converts arbitrary TeX code to PDF strings or tries to do this). -

Macro

Macro \unichar takes a TeX number as argument, examples for U+263A (WHITE SMILING FACE): @@ -5255,7 +5293,7 @@ FACE):     \unichar{"263A}% hexadecimal notation     \unichar{9786}% decimal notation -

‘"’ must not be a babel shorthand character or otherwise active. Otherwise prefix it with +

‘"’ must not be a babel shorthand character or otherwise active. Otherwise prefix it with \string: @@ -5263,18 +5301,18 @@ class="ec-lmvtt-10">\string:

     \unichar{\string"263A}% converts ‘"’ to ‘"’ with catcode 12 (other)
 
-

Users of (n)german packages or babel options may use

Users of (n)german packages or babel options may use \dq instead:

     \unichar{\dq 263A}% \dq is double quote with catcode 12 (other)
 
-

-

+

+

7.10 \ifpdfstringunicode

-

Some features of the PDF specification needs PDF strings. Examples are bookmarks or the entries in the +

Some features of the PDF specification needs PDF strings. Examples are bookmarks or the entries in the information dictionary. The PDF specification allows two encodings ‘PDFDocEncoding’ (8-bit encoding) and ‘Unicode’ (UTF-16). The user can help using \texorpdfstring to replace complicate TeX constructs @@ -5285,7 +5323,7 @@ class="ec-lmvtt-10">\ifpdfstringunicode. It is only allowed class="ec-lmvtt-10">\texorpdfstring and takes two arguments, the first allows the full range of Unicode. The second is limited to the characters available in PDFDocEncoding. -

As example we take a macro definition for the Vietnamese name of Hn Thế Thnh. Correctly written +

As example we take a macro definition for the Vietnamese name of Hn Thế Thnh. Correctly written it needs some accented characters, one character even with a double accent. Class ‘tugboat.cls’ defines a macro for the typesetted name: @@ -5297,9 +5335,10 @@ macro for the typesetted name:       ~Th\‘anh%     } -

It’s not entirely correct, the second accent over the ‘e’ is not an acute, but a hook. However standard +

It’s not entirely correct, the second accent over the ‘e’ is not an acute, but a hook. However standard LaTeX does not provide such an accent. -

Now we can extend the definition to support hyperref. The first and the last word are already +

Now we can extend the definition to support hyperref. The first and the last word are already supported automatically. Characters with two or more accents are a difficult business in LaTeX, because the NFSS2 macros of the LaTeX kernel do not support more than one accent. Therefore also puenc.def misses support for them. But we can provide it using     % U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE -

Thus we can put this together: +

Thus we can put this together:

@@ -5321,7 +5360,7 @@ is:
       ~Th\‘anh%
     }
 
-

For PDFDocEncoding (PD1) the variant above has dropped the second accent. Alternatively we could +

For PDFDocEncoding (PD1) the variant above has dropped the second accent. Alternatively we could provide a representation without accents instead of wrong accents: @@ -5340,12 +5379,13 @@ provide a representation without accents instead of wrong accents:       }%     } -

-

+

+

7.11 Customizing index style file with \nohyperpage

-

Since version 2008/08/14 v6.78f. -

For hyperlink support in the index, hyperref inserts

Since version 2008/08/14 v6.78f. +

For hyperlink support in the index, hyperref inserts \hyperpage into the index macros. After processing with Makeindex, \hyperpage analyzes its argument to detect page ranges and page comma @@ -5356,7 +5396,7 @@ lists. However, only the standard settings are supported directly:     delim_r "--"     delim_n ", " -

(See manual page/documentation of Makeindex that explains the keys that can be used in style files for +

(See manual page/documentation of Makeindex that explains the keys that can be used in style files for Makeindex.) Customized versions of delim_r, delim_n, -

(Depending on the typesetting tradition some space “

(Depending on the typesetting tradition some space “\\,” or “~” should be put before the first f inside \nohyperpage.) -

+

7.12 Experimental option ‘ocgcolorlinks’

-

The idea are colored links, when viewed, but printed without colors. This new experimental option +

The idea are colored links, when viewed, but printed without colors. This new experimental option ‘ocgcolorlinks’ uses Optional Content Groups, a feature introduced in PDF 1.5. -

A better implementation which hasn’t the disadvantage to prevent line breaks is in the ocgx2 +

A better implementation which hasn’t the disadvantage to prevent line breaks is in the ocgx2 package. Check its documentation for details how to use it.

  • -

    The option must be given for package loading:

    The option must be given for package loading: \usepackage[ocgcolorlinks]{hyperref}

  • -

    Main disadvantage: Links cannot be broken across lines. PDF reference 1.7: 4.10.2 “Making +

    Main disadvantage: Links cannot be broken across lines. PDF reference 1.7: 4.10.2 “Making Graphical Content Optional”: Graphics state operations, such as setting the color, ..., are still applied. Therefore the link text is put in a box and set twice, with and without color.

  • -

    The feature can be switched of by

    The feature can be switched of by \hypersetup{ocgcolorlinks=false} inside the document.

  • -

    Supported drivers: pdftex, dvipdfm +

    Supported drivers: pdftex, dvipdfm

  • -

    The PDF version should be at least 1.5. It is automatically set for pdfTeX, LuaTeX and +

    The PDF version should be at least 1.5. It is automatically set for pdfTeX, LuaTeX and dvipdfmx.

-

+

7.13 Option ‘pdfa’

-

The new option ‘pdfa’ tries to avoid violations of PDF/A in code generated by hyperref. However, the -result is usually not in PDF/A, because many features aren’t controlled by hyperref (XMP metadata, +

The new option ‘pdfa’ tries to avoid violations of PDF/A in code generated by hyperref. However, the +result is usually not in PDF/A, because many features aren’t controlled by hyperref (XMP metadata, fonts, colors, driver dependend low level stuff, ...). -

Currently, option ‘pdfa’ sets and disables the following items: +

Currently, option ‘pdfa’ sets and disables the following items:

  • -

    Enabled annotation flags: Print, NoZoom, NoRotate [PDF/A 6.5.3]. +

    Enabled annotation flags: Print, NoZoom, NoRotate [PDF/A 6.5.3].

  • -

    Disabled annotation flags: Hidden, Invisible, NoView [PDF/A 6.5.3]. +

    Disabled annotation flags: Hidden, Invisible, NoView [PDF/A 6.5.3].

  • -

    Disabled: Launch action (

    Disabled: Launch action ([PDF/A 6.6.1].

  • -

    Restricted: Named actions (NextPage, PrevPage, FirstPage, LastPage) [PDF/A 6.6.1]. +

    Restricted: Named actions (NextPage, PrevPage, FirstPage, LastPage) [PDF/A 6.6.1].

  • -

    Many things are disabled in PDF formulars: +

    Many things are disabled in PDF formulars:

    • -

      JavaScript actions [PDF/A 6.6.1] +

      JavaScript actions [PDF/A 6.6.1]

    • -

      Trigger events (additional actions) [PDF/A 6.6.2] +

      Trigger events (additional actions) [PDF/A 6.6.2]

    • -

      Push button (because of JavaScript) +

      Push button (because of JavaScript)

    • -

      Interactive Forms: Flag NeedAppearances is the default ‘false’ (Because of this, - hyperref’s implementation of Forms looks ugly). [PDF/A 6.9]

    +

    Interactive Forms: Flag NeedAppearances is the default ‘false’ (Because of this, + hyperref’s implementation of Forms looks ugly). [PDF/A 6.9]

-

The default value of the new option ‘pdfa’ is ‘false’. It influences the loading of the package and -cannot be changed after hyperref is loaded (

The default value of the new option ‘pdfa’ is ‘false’. It influences the loading of the package and +cannot be changed after hyperref is loaded (\usepackage{hyperref}). -

+

7.14 Option ‘linktoc’ added

-

The new option ‘linktoc’ allows more control which part of an entry in the table of contents is made into +

The new option ‘linktoc’ allows more control which part of an entry in the table of contents is made into a link:

  • -

    ‘linktoc=none’ (no links) +

    ‘linktoc=none’ (no links)

  • -

    ‘linktoc=section’ (default behaviour, same as ‘linktocpage=false’) +

    ‘linktoc=section’ (default behaviour, same as ‘linktocpage=false’)

  • -

    ‘linktoc=page’ (same as ‘linktocpage=true’) +

    ‘linktoc=page’ (same as ‘linktocpage=true’)

  • -

    ‘linktoc=all’ (both the section and page part are links)

-

+

‘linktoc=all’ (both the section and page part are links) +

7.15 Option ‘pdfnewwindow’ changed

-

Before 6.77b: +

Before 6.77b:

  • -

    pdfnewwindow=true

    pdfnewwindow=true /NewWindow true

  • -

    pdfnewwindow=false

    pdfnewwindow=false (absent)

  • -

    unused pdfnewwindow

    unused pdfnewwindow (absent)

-

Since 6.77b: +

Since 6.77b:

  • -

    pdfnewwindow=true

    pdfnewwindow=true /NewWindow true

  • -

    pdfnewwindow=false

    pdfnewwindow=false /NewWindow false

  • -

    pdfnewwindow=

    pdfnewwindow= (absent)

  • -

    unused pdfnewwindow

    unused pdfnewwindow (absent)

-

Rationale: There is a difference between setting to ‘false’ and an absent entry. In the former case the +

Rationale: There is a difference between setting to ‘false’ and an absent entry. In the former case the new document replaces the old one, in the latter case the PDF viewer application should respect the user preference. -

+

7.16 Flag options for PDF forms

-

PDF form field macros (

PDF form field macros (\TextField, \CheckBox, ...) support boolean flag options. The option name is the lowercase version of the names in the PDF specification (1.7): -

http://www.adobe.com/devnet/pdf/pdf_reference.html -

http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference.pdf -

Options (convert to lowercase) except flags in square brackets: +

Options (convert to lowercase) except flags in square brackets:

  • -

    Table 8.16 Annotation flags (page 608): -

    +

    Table 8.16 Annotation flags (page 608): +


    1 Invisible
    2 Hidden (PDF 1.2)
    3 Print (PDF 1.2) @@ -5534,23 +5578,23 @@ class="ec-lmvtt-10">http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference.pdf10 LockedContents (PDF 1.7)
  • -

    Table 8.70 Field flags common to all field types (page 676): -

    +

    Table 8.70 Field flags common to all field types (page 676): +


    1 ReadOnly
    2 Required
    3 NoExport
  • -

    Table 8.75 Field flags specific to button fields (page 686): -

    +

    Table 8.75 Field flags specific to button fields (page 686): +


    15 NoToggleToOff (Radio buttons only)
    16 Radio (set: radio buttons, clear: check box, pushbutton: clear)
    17 Pushbutton
    26 RadiosInUniso (PDF 1.5)
  • -

    Table 8.77 Field flags specific to text fields (page 691): -

    +

    Table 8.77 Field flags specific to text fields (page 691): +


    13 Multiline
    14 Password
    21 FileSelect (PDF 1.4) @@ -5561,8 +5605,8 @@ class="ec-lmvtt-10">http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference.pdf
  • -

    Table 8.79 Field flags specific to choice fields (page 693): -

    +

    Table 8.79 Field flags specific to choice fields (page 693): +


    18 Combo (set: combo box, clear: list box)
    19 Edit (only useful if Combo is set)
    20 (Sort) for authoring tools, not PDF viewers @@ -5571,8 +5615,8 @@ class="ec-lmvtt-10">http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference.pdf27 CommitOnSelChange (PDF 1.5)
  • -

    Table 8.86 Flags for submit-form actions (page 704): -

    +

    Table 8.86 Flags for submit-form actions (page 704): +


    [1 Include/Exclude] unsupported, use ‘noexport’ (table 8.70) instead
    2 IncludeNoValueFields
    [3 ExportFormat] handled by option ‘export’ @@ -5587,35 +5631,35 @@ class="ec-lmvtt-10">http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference.pdf12 ExclFKey (PDF 1.4)
    14 EmbedForm (PDF 1.5)
-

New option ‘export’ sets the export format of a submit action. Valid values are (upper- or +

New option ‘export’ sets the export format of a submit action. Valid values are (upper- or lowercase):

  • -

    FDF +

    FDF

  • -

    HTML +

    HTML

  • -

    XFDF +

    XFDF

  • -

    PDF (not supported by Acrobat Reader)

-

+

PDF (not supported by Acrobat Reader) +

7.17 Option ‘pdfversion’

-

This is an experimental option. It notifies ‘hyperref’ about the intended PDF version. Currently this is +

This is an experimental option. It notifies ‘hyperref’ about the intended PDF version. Currently this is used in code for PDF forms (implementation notes 116 and 122 of PDF spec 1.7). -

Values: 1.2, 1.3, 1.4, 1.5, 1.6, 1.7. Values below 1.2 are not supported, because most drivers expect +

Values: 1.2, 1.3, 1.4, 1.5, 1.6, 1.7. Values below 1.2 are not supported, because most drivers expect higher PDF versions. -

The option must be used early, not after

The option must be used early, not after \usepackage{hyperref}. -

In theory this option should also set the PDF version, but this is not generally supported. +

In theory this option should also set the PDF version, but this is not generally supported.

  • -

    pdfTeX below 1.10a: unsupported. pdfTeX

    pdfTeX below 1.10a: unsupported. pdfTeX 1.10a and < 1.30: \pdfoptionpdfminorversion pdfTeX 1.30: \pdfminorversion

  • -

    dvipdfm: configuration file, example: TeX Live 2007, texmf/dvipdfm/config/config, entry ‘V +

    dvipdfm: configuration file, example: TeX Live 2007, texmf/dvipdfm/config/config, entry ‘V 2’.

  • -

    dvipdfmx: configuration file, example: TeX Live 2007, texmf/dvipdfm/dvipdfmx.cfg, entry +

    dvipdfmx: configuration file, example: TeX Live 2007, texmf/dvipdfm/dvipdfmx.cfg, entry ‘V 4’.

  • -

    Ghostscript: option -dCompatibilityLevel (this is set in ‘ps2pdf12’, ‘ps2pdf13’, ‘ps2pdf14’).

-

The current PDF version is used as default if this version can be detected (only pdfTeX

Ghostscript: option -dCompatibilityLevel (this is set in ‘ps2pdf12’, ‘ps2pdf13’, ‘ps2pdf14’). +

The current PDF version is used as default if this version can be detected (only pdfTeX 1.10a). Otherwise the lowest version 1.2 is assumed. Thus ‘hyperref’ tries to avoid PDF code that breaks this version, but is free to use ignorable higher PDF features. -

+

7.18 Field option ‘name’

-

Many form objects uses the label argument for several purposes: +

Many form objects uses the label argument for several purposes:

  • -

    Layouted label. +

    Layouted label.

  • -

    As name in HTML structures.

-

Code that is suitable for layouting with TeX can break in the structures of the output format. If option +

As name in HTML structures. +

Code that is suitable for layouting with TeX can break in the structures of the output format. If option ‘name’ is given, then its value is used as name in the different output structures. Thus the value should consist of letters only. -

+

7.19 Option ‘pdfencoding’

-

The PDF format allows two encodings for bookmarks and entries in the information dictionary: +

The PDF format allows two encodings for bookmarks and entries in the information dictionary: PDFDocEncoding and Unicode as UTF-16BE. Option pdfencoding selects between these encodings:

  • -

    pdfdoc uses PDFDocEncoding. It uses just one byte per character, but the supported characters are limited (244 in PDF-1.7).

  • -

    unicode sets Unicode. It is encoded as UTF-16BE. Two bytes are used for most characters, surrogates need four bytes.

  • -

    auto PDFDocEncoding if the string does not contain characters outside the encoding (outside ascii if an unicode engine is used) and Unicode otherwise. This option is not intended for the unicode engines.

-

All drivers use

All drivers use unicode by default now. If another encoding should be forced, it should be done in hypersetup. -

+

7.20 Color options/package hycolor

-

See documentation of package ‘hycolor’. -

+

See documentation of package ‘hycolor’. +

7.21 Option pdfusetitle

-

If option pdfusetitle is set then hyperref tries to derive the values for pdftitle and pdfauthor +

If option pdfusetitle is set then hyperref tries to derive the values for pdftitle and pdfauthor from \title and \author. An optional argument for \title and \author is supported (class amsart). -

+

7.22 Starred form of \autoref

-

\autoref* generates a reference without link as \ref* or \pageref*. -

+

7.23 Link border style

-

Links can be underlined instead of the default rectangle or options

Links can be underlined instead of the default rectangle or options colorlinks, frenchlinks. This is done by option pdfborderstyle={/S/U/W 1} -

Some remarks: +

Some remarks:

  • -

    AR7/Linux seems to have a bug, that don’t use the default value

    AR7/Linux seems to have a bug, that don’t use the default value 1 for the width, but zero, thus that the underline is not visible without /W 1. The same applies for dashed pdfborderstyle=/S/D/D[3 2]/W 1

  • -

    The syntax is described in the PDF specification, look for “border style”, eg. Table 8.13 +

    The syntax is described in the PDF specification, look for “border style”, eg. Table 8.13 “Entries in a border style dictionary” (specification for version 1.6)

  • -

    The border style is removed by pdfborderstyle= This is automatically done if option +

    The border style is removed by pdfborderstyle= This is automatically done if option colorlinks is enabled.

  • -

    Be aware that not all PDF viewers support this feature, not even Acrobat Reader itself: -

    Some support: +

    Be aware that not all PDF viewers support this feature, not even Acrobat Reader itself: +

    Some support:

    • -

      AR7/Linux:

      AR7/Linux: underline and dashed, but the border width must be given.

    • -

      xpdf 3.00:

      xpdf 3.00: underline and dashed

    -

    Unsupported: +

    Unsupported:

    • -

      AR5/Linux +

      AR5/Linux

    • -

      ghostscript 8.50

    +

    ghostscript 8.50

-

+

7.24 Option bookmarksdepth

-

The depth of the bookmarks can be controlled by the new option

The depth of the bookmarks can be controlled by the new option bookmarksdepth. The option acts globally and distinguishes three cases:

  • -

    bookmarksdepth without value Then hyperref uses the current value of counter tocdepth. - This is the compatible behaviour and the default. +

    bookmarksdepth without value Then hyperref uses the current value of counter tocdepth. This + is the compatible behaviour and the default.

  • -

    bookmarksdepth=<number>, the value is number (also negative): The depth for the bookmarks are set to this number.

  • -

    bookmarksdepth=<name> The <name> is a document division name (part, chapter, ...). It must - not start with a digit or minus to avoid mixing up with the number case. Internally hyperref uses + not start with a digit or minus to avoid mixing up with the number case. Internally hyperref uses the value of macro \toclevel@<name>. Examples: @@ -5783,37 +5830,39 @@ class="ec-lmvtt-10">\toclevel@<name>. Example     \hypersetup{bookmarksdepth=4} % same as before     \hypersetup{bookmarksdepth} % counter "tocdepth" is used -

-

+

+

7.25 Option pdfescapeform

-

There are many places where arbitrary strings end up as PS or PDF strings. The PS/PDF strings in +

There are many places where arbitrary strings end up as PS or PDF strings. The PS/PDF strings in parentheses form require the protection of some characters, e.g. unmatched left or right parentheses need escaping or the escape character itself (backslash). Since 2006/02/12 v6.75a the PS/PDF driver should do this automatically. However I assume a problem with compatibility, especially regarding the form part where larger amounts of JavaScript code can be present. It would be a pain to remove all the escaping, because an additional escaping layer can falsify the code. -

Therefore a new option pdfescapeform was introduced: +

Therefore a new option pdfescapeform was introduced:

  • -

    pdfescapeform=false Escaping for the formulars are disabled, this is the compatibility +

    pdfescapeform=false Escaping for the formulars are disabled, this is the compatibility behaviour, therefore this is the default.

  • -

    pdfescapeform=true Then the PS/PDF drivers do all the necessary escaping. This is the +

    pdfescapeform=true Then the PS/PDF drivers do all the necessary escaping. This is the logical choice and the recommended setting. For example, the user writes JavaScript as JavaScript and do not care about escaping characters for PS/PDF output.

-

+

7.26 Default driver setting

-

(hyperref 6.72s) If no driver is given, hyperref tries its best to guess the most suitable +

(hyperref 6.72s) If no driver is given, hyperref tries its best to guess the most suitable driver. Thus it loads hpdftex, if pdfTeX is detected running in PDF mode. Or it loads the -corresponding VTeX driver for VTeX’s working modes. Unhappily many driver programs run -after the TeX compiler, so hyperref does not have a chance (dvips, dvipdfm, ...). In this +corresponding VTeX driver for VTeX’s working modes. Unhappily many driver programs +run after the TeX compiler, so hyperref does not have a chance (dvips, dvipdfm, ...). In this case driver hypertex is loaded that supports the HyperTeX features that are recognized by xdvi for example. This behaviour, however, can easily be changed in the configuration file @@ -5824,18 +5873,19 @@ class="ec-lmvtt-10">hyperref.cfg:

     \providecommand*{\Hy@defaultdriver}{hdvips}
 
-

for dvips, or +

for dvips, or

     \providecommand*{\Hy@defaultdriver}{hypertex}
 
-

for the default behaviour of hyperref. -

See also the new option ‘driverfallback’. -

+

for the default behaviour of hyperref. +

See also the new option ‘driverfallback’. +

7.27 Backref entries

-

Alternative interface for formatting of backref entries, example: +

Alternative interface for formatting of backref entries, example:

@@ -5928,11 +5978,11 @@ class="ec-lmvtt-10">hyperref.cfg:
 
 \end{document}
 
-

-

+

+

7.28 \phantomsection

-

Set an anchor at this location. It is often used in conjunction with

Set an anchor at this location. It is often used in conjunction with \addcontentsline for sectionlike things (index, bibliography, preface). \addcontentsline refers to the latest previous location where an anchor is @@ -5945,13 +5995,13 @@ set.   \addcontentsline{toc}{chapter}{\indexname}   \printindex -

-

Now the entry in the table of contents (and bookmarks) for the index points to the start of the index +

+

Now the entry in the table of contents (and bookmarks) for the index points to the start of the index page, not to a location before this page. -

+

7.29 puenc encoding, puenc-greekbasic.def and puenc-extra.def

-

The

The unicode option loads for the bookmarks puenc.def which contains quite a lot definitions of commands for the bookmarks. As hyperref uses two strategies.

  • -

    A number of command are only defined conditionally: The commands for the cyrillic block +

    A number of command are only defined conditionally: The commands for the cyrillic block if \CYRDZE is defined, greek if \textBeta is defined, and hebrew if \hebdalet is defined. -

    The greek block is in an extra file,

    The greek block is in an extra file, puenc-greekbasic.def, which can be loaded manually if needed.

  • -

    Other commands are moved to an extra file

    Other commands are moved to an extra file puenc-extra.def which is not loaded automatically, but can be loaded in the preamble if needed. Currently this file contains all definitions for the accent \G.

-

+

8 Acrobat-specific behavior

-

If you want to access the menu options of Acrobat Reader or Exchange, the following macro is provided +

If you want to access the menu options of Acrobat Reader or Exchange, the following macro is provided in the appropriate drivers: -

}{text}
-

The

The text is used to create a button which activates the appropriate menuoption. The following table lists the option names you can use—comparison of this with the menus in Acrobat Reader or Exchange will show what they do. Obviously some are only appropriate to Exchange. -

+

-

style="vertical-align:baseline;" id="TBL-44-1-"> class="td01">FileExport +

Properties

@@ -6096,7 +6146,7 @@ class="td10"> style="vertical-align:baseline;" id="TBL-44-9-"> +

About

@@ -6211,18 +6261,18 @@ class="td01"> class="td01">
File -

Open, +

Open, Close, Scan, Save, @@ -6028,7 +6078,7 @@ class="td10"> class="td01">FileImport

-

ImportImage, +

ImportImage, ImportNotes, AcroForm:ImportFDF

-

ExportNotes, +

ExportNotes, AcroForm:ExportFDF

FileDocumentInfo -

GeneralInfo, +

GeneralInfo, OpenInfo, FontsInfo, SecurityInfo, @@ -6054,7 +6104,7 @@ class="td10"> class="td01">FilePreferences

-

GeneralPrefs, +

GeneralPrefs, NotePrefs, FullScreenPrefs, Weblink:Prefs, @@ -6066,7 +6116,7 @@ class="td10"> style="vertical-align:baseline;" id="TBL-44-6-">

Edit -

Undo, +

Undo, Cut, Copy, Paste, @@ -6082,13 +6132,13 @@ class="td10"> style="vertical-align:baseline;" id="TBL-44-7-">

-

Properties

EditFields -

AcroForm:Duplicate, +

AcroForm:Duplicate, AcroForm:TabOrder

Document -

Cpt:CapturePages, +

Cpt:CapturePages, AcroForm:Actions, CropPages, RotatePages, @@ -6112,7 +6162,7 @@ class="td10"> style="vertical-align:baseline;" id="TBL-44-10-">

View -

ActualSize, +

ActualSize, FitVisible, FitWidth, FitPage, @@ -6136,7 +6186,7 @@ class="td10"> style="vertical-align:baseline;" id="TBL-44-11-">

Tools -

Hand, +

Hand, ZoomIn, ZoomOut, SelectText, @@ -6158,7 +6208,7 @@ class="td10"> class="td01">ToolsSearch

-

AcroSrch:Query, +

AcroSrch:Query, AcroSrch:Indexes, AcroSrch:Results, AcroSrch:Assist, @@ -6170,7 +6220,7 @@ class="td10"> style="vertical-align:baseline;" id="TBL-44-13-">

Window -

ShowHideToolBar, +

ShowHideToolBar, ShowHideMenuBar, ShowHideClipboard, Cascade, @@ -6181,7 +6231,7 @@ class="td10"> style="vertical-align:baseline;" id="TBL-44-14-">

Help -

HelpUserGuide, +

HelpUserGuide, HelpTutorial, HelpExchange, HelpScan, @@ -6196,7 +6246,7 @@ class="td10"> style="vertical-align:baseline;" id="TBL-44-15-">

Help(Windows) -

About

-

+

9 PDF and HTML forms

-

You must put your fields inside a

You must put your fields inside a Form environment. The environment does some general setups, so should be used only once in a document. Using simply \Form at the begin of the document is possible too. -

There are six macros to prepare fields: +

There are six macros to prepare fields: -

]{label}
-

]{label}
-

}{choices}
-

]{label}
-

]{label}
-

]{label}
-

The way forms and their labels are laid out is determined by: -

The way forms and their labels are laid out is determined by: +

}{field}
-

}{field}
-

}{field}
-

These macros default to #1 #2 -

What is actually shown in the field is determined by: -

These macros default to #1 #2 +

What is actually shown in the field is determined by: +

}{height}
-

}{height}
-

}{height}
-

}{height}
-

\MakeButtonField{text}
-

These macros default to

These macros default to \vbox to #2{\hbox #1{\hfill}\vfill}, except the l to #1; it is used for buttons, and the special \Submit and \Reset macros. -

You may also want to redefine the following macros: +

You may also want to redefine the following macros:

@@ -6431,13 +6481,13 @@ class="ec-lmvtt-10">\Reset macros.
 \def\DefaultHeightofTextMultiline{4\baselineskip}
 \def\DefaultWidthofText{3cm}
 
-

-

+

+

9.1 Forms environment parameters

-

+

action encoding method @@ -6492,16 +6542,16 @@ class="td01">
URL -

The URL that will receive the form data if a

The URL that will receive the form data if a Submit button is included in the form

name -

The encoding for the string set to the URL; FDF-encoding +

The encoding for the string set to the URL; FDF-encoding is usual, and html is the only valid value

name -

Used only when generating HTML; values can be

Used only when generating HTML; values can be post or get

-

+

9.2 Forms optional parameters

-

Note that all colors must be expressed as RGB triples, in the range 0..1 (i.e. 

Note that all colors must be expressed as RGB triples, in the range 0..1 (i.e. color=0 0 0.5) -

+

-

+

10 Defining a new driver

-

A hyperref driver has to provide definitions for eight macros: -

1.

A hyperref driver has to provide definitions for eight macros: +

1. \hyper@anchor -

2.

2. \hyper@link -

3.

3. \hyper@linkfile -

4.

4. \hyper@linkurl -

5.

5. \hyper@anchorstart -

6.

6. \hyper@anchorend -

7.

7. \hyper@linkstart -

8.

8. \hyper@linkend -

The draft option defines the macros as follows +

The draft option defines the macros as follows

@@ -6995,16 +7046,16 @@ class="ec-lmvtt-10">\hyper@linkend
 \let\hyper@linkstart\@gobbletwo
 \let\hyper@linkend\@empty
 
-

-

+

+

11 Special support for other packages

-

Package

Package hyperref aims to cooperate with other packages, but there are several possible sources for conflict, such as

  • -

    Packages that manipulate the bibliographic mechanism. Peter William’s

    Packages that manipulate the bibliographic mechanism. Peter William’s harvard package is supported. However, the recommended package is Patrick Daly’s natbib package that has @@ -7014,16 +7065,16 @@ class="ec-lmss-10">hyperref hooks to allow reliable interaction. This pac class="ec-lmss-10">hyperref.

  • -

    Packages that changes

    Packages that changes \label and \ref macros.

  • -

    Packages that do anything serious with the index. +

    Packages that do anything serious with the index.

  • -

    Packages that do anything serious with sectioning commands and the toc

-

The

Packages that do anything serious with sectioning commands and the toc +

The hyperref package is distributed with variants on two useful packages designed to work especially well with it. These are xr and minitoc, which support crossdocument links using \label/\ref mechanisms and per-chapter tables of contents, respectively. -

+

11.1 Package Compatibility

-

Currently only package loading orders are available: -

+

Currently only package loading orders are available: +

11.1.1 algorithm
@@ -7044,11 +7095,11 @@ class="ec-lmvtt-10">\ref mechanisms and per-chapter tables of contents, r   \usepackage{hyperref}   \usepackage[chapter]{algorithm}% eg. -

-

+

+

11.1.2 amsmath
-

The environments equation and eqnarray are not supported too well. For example, there might be +

The environments equation and eqnarray are not supported too well. For example, there might be spacing problems (eqnarray isn’t recommended anyway, see CTAN:info/l2tabu/, the situation for equation is unclear, because nobody is interested in investigating). Consider using the environments that package amsmath provide, e.g. gather for equation. The environment equation can even redefined to use @@ -7060,22 +7111,27 @@ gather:   \let\equation\gather   \let\endequation\endgather -

-

+

+

11.1.3 amsrefs
-

Package loading order: +

Package loading order:

   \usepackage{hyperref}
   \usepackage{amsrefs}
 
-

-

+

+

11.1.4 arydshln, longtable
-

Package longtable must be put before hyperref and arydshln, hyperref after arydshln generates an error, +

Package longtable must be put before hyperref and arydshln, hyperref after arydshln generates an error, thus the resulting package order is then: @@ -7084,16 +7140,16 @@ thus the resulting package order is then:   \usepackage{hyperref}   \usepackage{arydshln} -

-

+

+

11.1.5 babel/magyar.ldf
-

The old version 2005/03/30 v1.4j will not work. You need at least version 1.5, maintained by Pter +

The old version 2005/03/30 v1.4j will not work. You need at least version 1.5, maintained by Pter Szab, see CTAN:language/hungarian/babel/. -

+

11.1.6 babel/spanish.ldf
-

Babel’s spanish.ldf redefines ‘

Babel’s spanish.ldf redefines ‘\.’ to support ‘\...’. In bookmarks (\pdfstringdef) only ‘\.’ is supported. If ‘\...’ is needed, \texorpdfstring{\...}{\dots} can be used instead. -

+

11.1.7 bibentry
-

Workaround: +

Workaround:

@@ -7123,29 +7179,35 @@ class="ec-lmvtt-10">\texorpdfstring{\...}{\dots} can be use
     \nobibliography{database}
   \endgroup
 
-

-

+

+

11.1.8 bigfoot
-

Hyperref does not support package ‘bigfoot’. And package ‘bigfoot’ does not support hyperref’s footnotes -and disables them (hyperfootnotes=false). -

+

hyperref does not support package bigfoot. And package bigfoot does not support hyperref’s footnotes and +disables them (hyperfootnotes=false). +

11.1.9 chappg
-

Package ‘chappg’ uses \@addtoreset that is redefined by ‘hyperref’. The package order is -therefore: +

Package chappg uses \@addtoreset that is redefined by hyperref. The package order is therefore:

   \usepackage{hyperref}
   \usepackage{chappg}
 
-

-

+

+

11.1.10 cite
-

This is from Mike Shell: cite.sty cannot currently be used with hyperref. However, I can do a workaround +

This is from Mike Shell: cite.sty cannot currently be used with hyperref. However, I can do a workaround via: @@ -7156,14 +7218,15 @@ via:  \usepackage[hypertex]{hyperref} -

-

so that hyperref will not redefine any of the biblabel stuff - so cite.sty will work as normal - +

+

so that hyperref will not redefine any of the biblabel stuff - so cite.sty will work as normal - although the citations will not be hyperlinked, of course (But this may not be an issue for many people). -

+

11.1.11 count1to
-

Package ‘count1to’ adds several

Package ‘count1to’ adds several \@addtoreset commands that confuse ‘hyperref’. Therefore \theH<...> has to be fixed: @@ -7179,28 +7242,29 @@ has to be fixed:     \renewcommand*{\theHsubparagraph}{\theHparagraph.\arabic{subparagraph}}%   } -

-

+

+

11.1.12 dblaccnt
-

pd1enc.def or puenc.def should be loaded before: +

pd1enc.def or puenc.def should be loaded before:

   \usepackage{hyperref}
   \usepackage{dblaccnt}
 
-

or see entry for

or see entry for vietnam. -

+

11.1.13 easyeqn
-

Not compatible, breaks. -

+

Not compatible, breaks. +

11.1.14 ellipsis
-

This packages redefines \textellipsis after package hyperref (pd1enc.def/puenc.def should be loaded +

This packages redefines \textellipsis after package hyperref (pd1enc.def/puenc.def should be loaded before): @@ -7208,10 +7272,10 @@ before):   \usepackage{hyperref}   \usepackage{ellipsis} -

-

(this will lead to wrong ellipsis in the bookmarks, so

+

(this will lead to wrong ellipsis in the bookmarks, so \texorpdfstring is needed). -

+

11.1.15 float
@@ -7220,38 +7284,41 @@ class="ec-lmvtt-10">\texorpdfstring is needed).  \usepackage{float}   \usepackage{hyperref} -

+

  • -

    Several

    Several \caption commands are not supported inside one float object.

  • -

    Anchor are set at top of the float object, if its style is controlled by float.sty.

-

+

Anchor are set at top of the float object, if its style is controlled by float.sty. +

11.1.16 endnotes
-

Unsupported. -

+

Unsupported. +

11.1.17 foiltex
-

Update to version 2008/01/28 v2.1.4b: Since version 6.77a hyperref does not hack into

Update to version 2008/01/28 v2.1.4b: Since version 6.77a hyperref does not hack into \@begindvi, it uses package ‘atbegshi’ instead, that hooks into \shipout. Thus the patch of ‘foils.cls’ regarding hyperref +class="ec-lmvtt-10">\shipout. Thus the patch of ‘foils.cls’ regarding hyperref is now obsolete and causes an undefined error message about \@hyperfixhead. This is fixed in FoilTeX 2.1.4b. -

+

11.1.18 footnote
-

This package is not supported, you have to disable hyperref’s footnote support by using option +

This package is not supported, you have to disable hyperref’s footnote support by using option hyperfootnotes=false. -

+

11.1.19 geometry
-

Driver ‘dvipdfm’ and program ‘dvipdfm’ might generate a warning: Sorry. Too late to change page size +

Driver ‘dvipdfm’ and program ‘dvipdfm’ might generate a warning: Sorry. Too late to change page size Then prefer the program ‘dvipdfmx’ or use one of the following workarounds to move the \special of geometry to an earlier location: @@ -7284,24 +7351,24 @@ geometry to an earlier location:     ]{geometry}     \usepackage{hyperref} -

-

+

+

11.1.20 IEEEtran.cls
-

version

version V1.6b (because of \@makecaption, see ChangeLog) -

+

11.1.21 index
-

version

version 1995/09/28 v4.1 (because of \addcontentsline redefinition) -

+

11.1.22 lastpage
-

Compatible. -

+

Compatible. +

11.1.23 linguex
@@ -7310,8 +7377,8 @@ class="ec-lmvtt-10">\addcontentsline redefinition)  \usepackage{hyperref}   \usepackage{linguex} -

-

+

+

11.1.24 ltabptch
@@ -7321,20 +7388,27 @@ class="ec-lmvtt-10">\addcontentsline redefinition)   \usepackage{ltabptch}   \usepackage{hyperref} -

-

+

+

11.1.25 mathenv
-

Unsupported. -

Both ‘mathenv’ and ‘hyperref’ messes around with environment ‘eqnarray’. You can load ‘mathenv’ -after ‘hyperref’ to avoid an error message. But \label will not work inside environment ‘eqnarray’ -properly, for example. -

+

Unsupported. +

Both mathenv and hyperref messes around with environment eqnarray. You can load mathenv after +hyperref to avoid an error message. But \label will not work inside environment eqnarray properly, for +example. +

11.1.26 minitoc-hyper
-

This package is obsolete, use the up-to-date original package minitoc instead. -

+

This package is obsolete, use the up-to-date original package minitoc instead. +

11.1.27 multind
@@ -7343,8 +7417,8 @@ properly, for example.  \usepackage{multind}   \usepackage{hyperref} -

-

+

+

11.1.28 natbib
@@ -7353,22 +7427,23 @@ properly, for example.  \usepackage{natbib}   \usepackage{hyperref} -

-

+

+

11.1.29 nomencl
-

Example for introducing links for the page numbers: +

Example for introducing links for the page numbers:

       \renewcommand*{\pagedeclaration}[1]{\unskip, \hyperpage{#1}}
 
-

-

+

+

11.1.30 ntheorem-hyper
-

This package is obsolete, use the up-to-date original package ntheorem instead. -

For equations the following might work: +

This package is obsolete, use the up-to-date original package ntheorem instead. +

For equations the following might work:

@@ -7378,8 +7453,8 @@ properly, for example.
     But the mapping from the equation number to the anchor name
     is not available in general.
 
-

-

+

+

11.1.31 prettyref
@@ -7404,8 +7479,8 @@ properly, for example. %%% example for prettyref %%%        -

-

+

+

11.1.32 setspace
@@ -7414,18 +7489,18 @@ properly, for example.  \usepackage{setspace}   \usepackage{hyperref} -

-

+

+

11.1.33 sidecap
-

Nothing special is needed anymore. -

+

Nothing special is needed anymore. +

11.1.34 subfigure
-

The package is obsolete. Use either

The package is obsolete. Use either subfig or subcaption -

+

11.1.35 titleref
@@ -7435,24 +7510,29 @@ class="ec-lmss-10">subcaption   \usepackage{titleref}% without usetoc   \usepackage{hyperref} -

-

+

+

11.1.36 tabularx
-

Linked footnotes are not supported inside environment ‘tabularx’, because they uses the optional +

Linked footnotes are not supported inside environment tabularx, because they uses the optional argument of \footnotetext, see section ‘Limitations’. Before version 2011/09/28 6.82i hyperref had -disabled footnotes entirely by ‘hyperfootnotes=false’. -

+class="ec-lmvtt-10">\footnotetext, see section ‘Limitations’. Before version 2011/09/28 6.82i hyperref had +disabled footnotes entirely by hyperfootnotes=false. +

11.1.37 titlesec
-

nameref supports titlesec, but hyperref does not (unsolved is the anchor setting, missing with -unnumbered section, perhaps problems with page breaks with numbered ones). -

+

nameref supports titlesec, but hyperref does not (unsolved is the anchor setting, missing with unnumbered +section, perhaps problems with page breaks with numbered ones). +

11.1.38 ucs/utf8x.def
-

The first time a multibyte UTF8 sequence is called, it does some calculations and stores the result in a +

The first time a multibyte UTF8 sequence is called, it does some calculations and stores the result in a macro for speeding up the next calls of that UTF8 sequence. However this makes the first call non-expandable and will break if used in information entries or bookmarks. Package ucs offers @@ -7468,16 +7548,18 @@ class="ec-lmvtt-10">\PreloadUnicodePage to solve this:     \PrerenderUnicode{^^c3^^b6}% or \PrerenderUnicodePage{1}     \hypersetup{pdftitle={Umlaut example: ^^c3^^b6}} -

The notation with two carets avoids trouble with 8-bit bytes for the README file, you can use the +

The notation with two carets avoids trouble with 8-bit bytes for the README file, you can use the characters directly. -

Note: utf8 is now the default in LaTeX and

Note: utf8 is now the default in LaTeX and ucs is no longer recommended. -

+

11.1.39 varioref
-

There are too many problems with varioref. Nobody has time to sort them out. Therefore this package is +

There are too many problems with varioref. Nobody has time to sort them out. Therefore this package is now unsupported. -

Perhaps you are lucky and some of the features of varioref works with the following loading +

Perhaps you are lucky and some of the features of varioref works with the following loading order: @@ -7486,24 +7568,28 @@ order:     \usepackage{varioref}     \usepackage{hyperref} -

-

Also some babel versions can be problematic. For example, 2005/05/21 v3.8g contains a patch for -varioref that breaks the hyperref support for varioref. -

Also unsupported: +

+

Also some babel versions can be problematic. For example, 2005/05/21 v3.8g contains a patch for +varioref that breaks the hyperref support for varioref. +

Also unsupported:

  • -

    \Ref, \Vref do not uppercase the first letter.

  • -

    \vpageref[]{...} On the same page a previous space is not suppressed.

-

+

11.1.40 verse
-

Version 2005/08/22 v2.22 contains support for hyperref. -

For older versions see example from de.comp.text.tex (2005/08/11, slightly modified): +

Version 2005/08/22 v2.22 contains support for hyperref. +

For older versions see example from de.comp.text.tex (2005/08/11, slightly modified):

@@ -7548,8 +7634,8 @@ class="ec-lmvtt-10">\vpageref[]{...} On the same page a pre
 
   \end{document}
 
-

-

+

+

11.1.41 vietnam
@@ -7560,20 +7646,21 @@ class="ec-lmvtt-10">\vpageref[]{...} On the same page a pre   \usepackage{vietnam}   \usepackage{hyperref} -

-

+

+

11.1.42 XeTeX
-

Default for the encoding of bookmarks is

Default for the encoding of bookmarks is pdfencoding=unicode. That means the strings are always treated as unicode strings. If auto or pdfdoc is forced it applies only if the string restricts to the printable ASCII set, The reason is that the \special does not support PDFDocEncoding. -

In older versions hyperref contained special conversion code from UTF-16BE back to UTF-8 in a +

In older versions hyperref contained special conversion code from UTF-16BE back to UTF-8 in a number of places for xetex to avoid the xdvipdfmx warning -

Failed to convert input string to UTF16... -

This is no longer needed with a current xdvipdfmx, so this code has been removed. +

This is no longer needed with a current xdvipdfmx, so this code has been removed. \csname HyPsd@XeTeXBigCharstrue\endcsname should no longer be used. -

+

12 Limitations6

12.1 Wrapped/broken link support

-

Only few drivers support automatically wrapped/broken links, e.g. pdftex, dvipdfm, hypertex. Other +

Only few drivers support automatically wrapped/broken links, e.g. pdftex, dvipdfm, hypertex. Other drivers lack this feature, e.g. dvips, dvipsone. -

Workarounds: +

Workarounds:

  • -

    For long section or caption titles in the table of contents or list of figures/tables option +

    For long section or caption titles in the table of contents or list of figures/tables option linktocpage can be used. Then the page number will be a link, and the overlong section title is not forced into an one line link with overfull \hbox warning.

  • -

    \url”s are caught by package breakurl.

  • -

    The option

    The option breaklinks is intended for internal use. But it can be used to force link wrapping, e.g. when printing a document. However, when such a document is converted to PDF and viewed with a PDF viewer, the active link area will be misplaced. -

    Another limitation: some penalties are “optimized” by TeX, thus there are missing break +

    Another limitation: some penalties are “optimized” by TeX, thus there are missing break points, especially within \url. (See thread “hyperref.sty, breaklinks and url.sty 3.2” in comp.text.tex 2005-09).

-

+

12.2 Links across pages

-

In general they have problems: +

In general they have problems:

  • -

    Some driver doesn’t support them at all (see above). +

    Some driver doesn’t support them at all (see above).

  • -

    The driver allows it, but the link result might include the footer and/or header, or an error +

    The driver allows it, but the link result might include the footer and/or header, or an error message can occur sometimes.

-

+

12.3 Footnotes

-

LaTeX allows the separation of the footnote mark and the footnote text (

LaTeX allows the separation of the footnote mark and the footnote text (\footnotemark, \footnotetext). This interface might be enough for visual typesetting. But the relation between @@ -7645,18 +7732,19 @@ class="ec-lmvtt-10">\label. Therefore it is not clear in ge which \footnotemark references which \footnotetext. But that is necessary to implement hyperlinking. -Thus the implementation of hyperref does not support the optional argument of hyperref does not support the optional argument of \footnotemark and \footnotetext. -

+

13 Hints7

13.1 Spaces in option values

-

Unhappily LaTeX strips spaces from options if they are given in

Unhappily LaTeX strips spaces from options if they are given in \documentclass or \usepackage (or \RequirePackage), e.g.:

     \usepackage[pdfborder=0 0 1]{hyperref}
 
-

Package hyperref now gets +

Package hyperref now gets

     pdfborder=001
 
-

and the result is an invalid PDF file. As workaround braces can be used: +

and the result is an invalid PDF file. As workaround braces can be used:

     \usepackage[pdfborder={0 0 1}]{hyperref}
 
-

Some options can also be given in

Some options can also be given in \hypersetup

     \hypersetup{pdfborder=0 0 1}
 
-

In

In \hypersetup the options are directly processed as key value options (see package keyval) without space stripping in the value part. -

Alternatively, LaTeX’s option handling system can be adapted to key value options by one of the +

Alternatively, LaTeX’s option handling system can be adapted to key value options by one of the packages kvoptions-patch (from project kvoptions) or xkvltxp (from project xsetkeys). -

+

13.2 Index with makeindex

  • -

    Package hyperref adds

    Package hyperref adds \hyperpage commands by the encap mechanism (see documentation of Makeindex), if option hyperindex is set (default). \hyperpage uses the page anchors that - are set by hyperref at each page (default). However in the default case page numbers are used + are set by hyperref at each page (default). However in the default case page numbers are used in anchor names in arabic form. If the page numbers in other formats are used (book class with \frontmatter, \romannumbering, ...), then the page an class="ec-lmvtt-10">plainpages=false is recommended.

  • -

    The encap mechanism of Makeindex allows to use one command only (see documentation of - Makeindex). If the user sets such a command, hyperref suppresses its

    The encap mechanism of Makeindex allows to use one command only (see documentation of + Makeindex). If the user sets such a command, hyperref suppresses its \hyperpage command. With logical markup this situation can easily be solved: @@ -7726,25 +7818,26 @@ class="ec-lmvtt-10">\hyperpage command. With       ...       \index{Some example|main} -

    +

  • -

    Scientic Word/Scientific WorkPlace users can use package robustindex with hyperindex=false. +

    Scientic Word/Scientific WorkPlace users can use package robustindex with hyperindex=false.

  • -

    Other encap characters can be set by option

    Other encap characters can be set by option encap. Example for use of “?”:

                \usepackage[encap=?]{hyperref}
     
    -

    +

  • -

    Another possibility is the insertion of

    Another possibility is the insertion of \hyperpage by a style file for makeindex. For this case, - hyperref’s insertion will be disabled by hyperref’s insertion will be disabled by hyperindex=false. \hyperpage will be defined regardless of setting of hyperindex. @@ -7762,12 +7855,12 @@ class="ec-lmvtt-10">\hyperpage will be defined regardless o encap_suffix "}" %%% cut %%% hyperindex.ist %%% cut %%% -

-

+

+

13.3 Warning "bookmark level for unknown <foobar> defaults to 0"

-

Getting rid of it: +

Getting rid of it:

@@ -7775,16 +7868,17 @@ class="ec-lmvtt-10">"bookmark level for unknown <foobar> defaults
 \providecommand*{\toclevel@<foobar>}{0}
 \makeatother
 
-

-

+

+

13.4 Link anchors in figures

-

The caption command increments the counter and here is the place where hyperref set the corresponding +

The caption command increments the counter and here is the place where hyperref set the corresponding anchor. Unhappily the caption is set below the figure, so the figure is not visible if a link jumps to a figure. In this case, try package hypcap that implements a method to circumvent the problem. -

+

13.5 Additional unicode characters in bookmarks and pdf information entries:

@@ -7793,14 +7887,14 @@ problem. \documentclass[pdftex]{article} \usepackage[unicode]{hyperref} -

-

Support for additional unicode characters: -

Example:

+

Support for additional unicode characters: +

Example: \.{a} and \d{a} -

1. Get a list with unicode data, eg: -

http://www.unicode.org/Public/UNIDATA/UnicodeData.txt -

2. Identify the characters (

1. Get a list with unicode data, eg: +

http://www.unicode.org/Public/UNIDATA/UnicodeData.txt +

2. Identify the characters (\.{a}, \d{a}): @@ -7809,9 +7903,9 @@ class="ec-lmvtt-10">\d{a}):     0227;LATIN SMALL LETTER A WITH DOT ABOVE;...     1EA1;LATIN SMALL LETTER A WITH DOT BELOW;... -

-

3. Calculate the octal code: -

The first characters of the line in the file are hex values, convert each byte and prepend them with a +

+

3. Calculate the octal code: +

The first characters of the line in the file are hex values, convert each byte and prepend them with a backslash. (This will go into the PDF file.) @@ -7819,9 +7913,10 @@ backslash. (This will go into the PDF file.)     0227 -> \002\047     1EA1 -> \036\241 -

-

4. Transform into a form understood by hyperref: -

Hyperref must know where the first byte starts, this is marked by

+

4. Transform into a form understood by hyperref: +

Hyperref must know where the first byte starts, this is marked by 9 (8 and 9 cannot occur in octal numbers): @@ -7830,8 +7925,8 @@ numbers):     \002\047 -> \9002\047     \036\241 -> \9036\241 -

-

Optional:

+

Optional: 8 is used for abbreviations: @@ -7840,8 +7935,8 @@ class="ec-lmvtt-10">8 is used for abbreviations:     \9002\047 -> \82\047 -

-

5. Declare the character with LaTeX: +

+

5. Declare the character with LaTeX:

@@ -7853,15 +7948,16 @@ class="ec-lmvtt-10">8 is used for abbreviations:
 \end{document}
       
 
-

-

+

+

13.6 Footnotes

-

The footnote support is rather limited. It is beyond the scope to use

The footnote support is rather limited. It is beyond the scope to use \footnotemark and \footnotetext out of order or reusing \footnotemark. Here you can either disable hyperref’s footnote support by +class="ec-lmvtt-10">\footnotemark. Here you can either disable hyperref’s footnote support by hyperfootnotes=false or fiddle with internal macros, nasty examples: @@ -7915,27 +8011,32 @@ C% \end{document} -

+

-

+

13.7 Subordinate counters

-

Some counters do not have unique values and require the value of other counters to be unique. For +

Some counters do not have unique values and require the value of other counters to be unique. For example, sections or figures might be numbered within chapters or \newtheorem is used with an optional counter argument. Internally LaTeX uses \@addtoreset to reset a counter in dependency to -another counter. Package hyperref hooks into hyperref hooks into \@addtoreset to catch this situation. Also \numberwithin -of package amsmath is caught by hyperref. -

However, if the definition of subordinate counters take place before hyperref is loaded, the old +of package amsmath is caught by hyperref. +

However, if the definition of subordinate counters take place before hyperref is loaded, the old meaning of \@addtoreset is called without hyperref’s additions. Then the companion counter macro +class="ec-lmvtt-10">\@addtoreset is called without hyperref’s additions. Then the companion counter macro \theH<counter> can be redefined accordingly. Or move the definition of subordinate counters after -hyperref is loaded. -

Example for hyperref is loaded. +

Example for \newtheorem, problematic case: @@ -7943,14 +8044,14 @@ class="ec-lmvtt-10">\newtheorem, problematic case:     \newtheorem{corA}{CorollaryA}[section]     \usepackage{hyperref} -

Solution a) +

Solution a)

     \usepackage{hyperref}
     \newtheorem{corA}{CorollaryA}[section}
 
-

Solution b) +

Solution b)

@@ -7958,11 +8059,11 @@ class="ec-lmvtt-10">\newtheorem, problematic case:
     \usepackage{hyperref}
     \newcommand*{\theHcorA}{\theHsection.\number\value{corA}}
 
-

-

+

+

14 History and acknowledgments

-

The original authors of

The original authors of hyperbasics.tex and hypertex.sty, from which this package descends, are Tanmoy Bhattacharya and Thorsten Ohl. Package

Tanmoy found a great many of the bugs, and (even better) often provided fixes, which has +

Tanmoy found a great many of the bugs, and (even better) often provided fixes, which has made the package more robust. The days spent on RevTeX are entirely due to him! The investigations of Bill Moss into the later versions including native PDF support uncovered a good many bugs, and his testing is appreciated. Hans Hagen provided a lot of insight into PDF. -

Berthold Horn provided help, encouragement and sponsorship for the

Berthold Horn provided help, encouragement and sponsorship for the dvipsone and dviwindo drivers. Sergey Lesenko provided the changes needed for hyper package (developed in parallel with hyperref) showed me solutions for some problems. Hopefully the two packages will combine one day. -

The forms creation section owes a great deal to: T. V. Raman, for encouragement, support and +

The forms creation section owes a great deal to: T. V. Raman, for encouragement, support and ideas; Thomas Merz, whose book Web Publishing with Acrobat/PDF provided crucial insights; D. P. Story, whose detailed article about pdfmarks and forms solved many practical problems; and Hans Hagen, who explained how to do it in pdftex. -

Steve Peter recreated the manual source in July 2003 after it had been lost. -

Especial extra thanks to David Carlisle for the

Steve Peter recreated the manual source in July 2003 after it had been lost. +

Especial extra thanks to David Carlisle for the backref module, the ps2pdf and dviwindo support, frequent general rewrites of my bad code, and for working on changes to the xr package to suit @@ -8011,61 +8112,61 @@ class="ec-lmss-10">hyperref.

15 GNU Free Documentation License

-

Version 1.2, November 2002 -

Copyright

Version 1.2, November 2002 +

Copyright  2000,2001,2002 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -

+

Preamble

-

The purpose of this License is to make a manual, textbook, or other functional and useful document +

The purpose of this License is to make a manual, textbook, or other functional and useful document “free” in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. -

This License is a kind of “copyleft”, which means that derivative works of the document must +

This License is a kind of “copyleft”, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. -

We have designed this License in order to use it for manuals for free software, because free software +

We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. -

+

15.1 Applicability and definitions

-

This License applies to any manual or other work, in any medium, that contains a notice placed by +

This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The “Document”, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as “you”. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. -

A “Modified Version” of the Document means any work containing the Document or a +

A “Modified Version” of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -

A “Secondary Section” is a named appendix or a front-matter section of the Document that deals +

A “Secondary Section” is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document’s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. -

The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of +

The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. -

The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or +

The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. -

A “Transparent” copy of the Document means a machine-readable copy, represented in a format +

A “Transparent” copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or @@ -8074,7 +8175,7 @@ otherwise Transparent file format whose markup, or absence of markup, has been a discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not “Transparent” is called “Opaque”. -

Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo +

Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include @@ -8082,26 +8183,26 @@ proprietary formats that can be read and edited only by proprietary word process or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. -

The “Title Page” means, for a printed book, the title page itself, plus such following pages as are +

The “Title Page” means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, “Title Page” means the text near the most prominent appearance of the work’s title, preceding the beginning of the body of the text. -

A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely +

A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” of such a section when you modify the Document means that it remains a section “Entitled XYZ” according to this definition. -

The Document may include Warranty Disclaimers next to the notice which states that this +

The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. -

+

15.2 Verbatim copying

-

You may copy and distribute the Document in any medium, either commercially or noncommercially, +

You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the @@ -8109,14 +8210,14 @@ copies you make or distribute. However, you may accept compensation in exchange If you distribute a large enough number of copies you must also follow the conditions in section 15.3. -

You may also lend copies, under the same conditions stated above, and you may publicly display +

You may also lend copies, under the same conditions stated above, and you may publicly display copies. -

+

15.3 Copying in quantity

-

If you publish printed copies (or copies in media that commonly have printed covers) of the Document, +

If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document’s license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly @@ -8125,10 +8226,10 @@ words of the title equally prominent and visible. You may add other material on addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -

If the required texts for either cover are too voluminous to fit legibly, you should put the first ones +

If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. -

If you publish or distribute Opaque copies of the Document numbering more than 100, you must +

If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free @@ -8137,31 +8238,31 @@ begin distribution of Opaque copies in quantity, to ensure that this Transparent remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. -

It is requested, but not required, that you contact the authors of the Document well before +

It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. -

+

15.4 Modifications

-

You may copy and distribute a Modified Version of the Document under the conditions of sections 

You may copy and distribute a Modified Version of the Document under the conditions of sections 15.2 and 15.3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -

+

  1. -

    Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, +

    Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.

  2. -

    List on the Title Page, as authors, one or more persons or entities responsible for authorship +

    List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. @@ -8169,35 +8270,35 @@ Version:

  3. -

    State on the Title page the name of the publisher of the Modified Version, as the publisher. +

    State on the Title page the name of the publisher of the Modified Version, as the publisher.

  4. -

    Preserve all the copyright notices of the Document. +

    Preserve all the copyright notices of the Document.

  5. -

    Add an appropriate copyright notice for your modifications adjacent to the other copyright +

    Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.

  6. -

    Include, immediately after the copyright notices, a license notice giving the public permission +

    Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.

  7. -

    Preserve in that license notice the full lists of Invariant Sections and required Cover Texts +

    Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document’s license notice.

  8. -

    Include an unaltered copy of this License. +

    Include an unaltered copy of this License.

  9. -

    Preserve the section Entitled “History”, Preserve its Title, and add to it an item stating at +

    Preserve the section Entitled “History”, Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled “History” in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item @@ -8205,7 +8306,7 @@ Version:

  10. -

    Preserve the network location, if any, given in the Document for public access to a +

    Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the “History” section. You may omit a network location for a work that was published at least four years before the @@ -8215,96 +8316,96 @@ Version:

  11. -

    For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the +

    For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.

  12. -

    Preserve all the Invariant Sections of the Document, unaltered in their text and in their +

    Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.

  13. -

    Delete any section Entitled “Endorsements”. Such a section may not be included in the +

    Delete any section Entitled “Endorsements”. Such a section may not be included in the Modified Version.

  14. -

    Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with +

    Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with any Invariant Section.

  15. -

    Preserve any Warranty Disclaimers. +

    Preserve any Warranty Disclaimers.

-

If the Modified Version includes new front-matter sections or appendices that qualify as Secondary +

If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version’s license notice. These titles must be distinct from any other section titles. -

You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of +

You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of your Modified Version by various parties–for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. -

You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as +

You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. -

The author(s) and publisher(s) of the Document do not by this License give permission to use their +

The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -

+

15.5 Combining documents

-

You may combine the Document with other documents released under this License, under the terms +

You may combine the Document with other documents released under this License, under the terms defined in section 15.4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. -

The combined work need only contain one copy of this License, and multiple identical Invariant +

The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -

In the combination, you must combine any sections Entitled “History” in the various original +

In the combination, you must combine any sections Entitled “History” in the various original documents, forming one section Entitled “History”; likewise combine any sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled “Endorsements”. -

+

15.6 Collections of documents

-

You may make a collection consisting of the Document and other documents released under this License, +

You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. -

You may extract a single document from such a collection, and distribute it individually under this +

You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -

+

15.7 Aggregation with independent works

-

A compilation of the Document or its derivatives with other separate and independent documents or +

A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an “aggregate” if the copyright resulting from the compilation is not used to limit the legal rights of the compilation’s users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. -

If the Cover Text requirement of section 

If the Cover Text requirement of section 15.3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document’s Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. -

+

15.8 Translation

-

Translation is considered a kind of modification, so you may distribute translations of the Document +

Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 15.4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant @@ -8315,53 +8416,53 @@ provided that you also include the original English version of this License and versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. -

If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the +

If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the requirement (section 15.4) to Preserve its Title (section 15.1) will typically require changing the actual title. -

+

15.9 Termination

-

You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under +

You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -

+

15.10 Future revisions of this license

-

The Free Software Foundation may publish new, revised versions of the GNU Free Documentation +

The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. -

Each version of the License is given a distinguishing version number. If the Document specifies that a +

Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License “or any later version” applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. -

+

Addendum: how to use this license for your documents

-

To use this License in a document you have written, include a copy of the License in the document and +

To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: -

+

-

Copyright

Copyright  YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.

-

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with...Texts.” +

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with...Texts.” line with this: -

with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and +

with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. -

If you have Invariant Sections without Cover Texts, or some other combination of the three, merge +

If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. -

If your document contains nontrivial examples of program code, we recommend releasing these +

If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf b/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf index 63539a50a2..039f817ee3 100644 Binary files a/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf and b/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf differ diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.tex b/macros/latex/contrib/hyperref/doc/hyperref-doc.tex index d9c272e811..5db76cd05e 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-doc.tex +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.tex @@ -166,7 +166,7 @@ } \makeatother \title{Hypertext marks in \hologo{LaTeX}: a manual for \xpackage{hyperref}} -\date{2023-04-22 v7.00x} +\date{2023-05-16 v7.00y} \begin{document} @@ -510,7 +510,7 @@ the patches and to offer interfaces to suppress them in a more granular way. \begin{description} \item[sectioning commands] \begin{itemize} -\item hyperref patches \cs{@sect}, \cs{@ssect}, \cs{@chapter}, \cs{@schapter}, +\item \xpackage{hyperref} patches \cs{@sect}, \cs{@ssect}, \cs{@chapter}, \cs{@schapter}, \cs{@part}, \cs{@spart}. \item It adds to the starred commands a target for a link (with the @@ -532,9 +532,9 @@ to add commands to store the title text in \cs{@currentlabelname}. Check the \xpackage{nameref} documentation about a way to suppress these patches. \end{itemize} -\item[footnotes] To enable (partly) the linking of footnotes hyperref redefines or patches various commands, in part package dependant. +\item[footnotes] To enable (partly) the linking of footnotes \xpackage{hyperref} redefines or patches various commands, in part package dependant. \begin{itemize} -\item hyperref redefines \cs{@xfootnotenext}, \cs{@xfootnotemark}, \cs{@mpfootnotetext}, +\item \xpackage{hyperref} redefines \cs{@xfootnotenext}, \cs{@xfootnotemark}, \cs{@mpfootnotetext}, \cs{@footnotetext}, \cs{@footnotemark}. If \xpackage{tabularx} is loaded it changes \cs{TX@endtabularx}. If \xpackage{longtable} is loaded it changes \cs{LT@p@ftntext}. If \xpackage{fancyvfb} is loaded it redefines \cs{V@@footnotetext}. It also redefines \cs{footref} and \cs{maketitle}. @@ -542,13 +542,13 @@ Check the \xpackage{nameref} documentation about a way to suppress these patches \item \emph{All} those redefinitions can be suppressed by defining \cs{hyper@nopatch@footnote}. Be aware that this can suppress links but also make unwanted links appear. \end{itemize} -\item[amsmath tags] hyperref redefines two internal commands of amsmath +\item[amsmath tags] \xpackage{hyperref} redefines two internal commands of amsmath related the \cs{tag} command to add an anchor. This code can be suppressed by defining \cs{hyper@nopatch@amsmath@tag}. (This normally makes no sense in packages but will probably be needed when math environments are changed to allow tagging.) -\item[counters] hyperref patches the kernel command \cs{@definecounter}, +\item[counters] \xpackage{hyperref} patches the kernel command \cs{@definecounter}, \cs{@newctr}, \cs{@addtoreset} and the amsmath command \cs{numberwithin} to ensure that for every counter the correct \cs{theHcounter} representation is created or reset. This code can be suppressed by @@ -556,23 +556,26 @@ Check the \xpackage{nameref} documentation about a way to suppress these patches packages but will probably be needed when kernel commands are changed to allow tagging.) -\item[math environments] hyperref patches \cs{equation}/\cs{endequation}, \cs{eqnarray}, +\item[math environments] \xpackage{hyperref} patches \cs{equation}/\cs{endequation}, \cs{eqnarray}, \cs{endeqnarray}. This code can be suppressed by defining \cs{hyper@nopatch@mathenv}. -\item[table of contents] hyperref redefines \cs{contentsline} to be able to add links to +\item[table of contents] \xpackage{hyperref} redefines \cs{contentsline} to be able to add links to toc entries. It redefines \cs{addcontentsline} to create the bookmarks and pass the destination names to the toc entries. This code can be suppressed by defining \cs{hyper@nopatch@toc}. -\item[captions] hyperref redefines \cs{caption} and \cs{@caption} to insert targets for links. +\item[captions] \xpackage{hyperref} redefines \cs{caption} and \cs{@caption} to insert targets for links. This code can be suppressed by defining \cs{hyper@nopatch@caption} (additional helper commands are not suppressed). As various packages redefine captions too (e.g. the \xpackage{caption} package) side-effects must be carefully tested! -\item[longtable] hyperref redefines \cs{LT@start} and \cs{LT@array} to move the targets in a better place. +\item[longtable] \xpackage{hyperref} redefines \cs{LT@start} and \cs{LT@array} to move the targets in a better place. This code can be suppressed by defining \cs{hyper@nopatch@longtable} -\item[theorems] hyperref patches \cs{@thm}. This code can be suppressed by defining \cs{hyper@nopatch@thm} +\item[theorems] \xpackage{hyperref} patches \cs{@thm}. This code can be suppressed by defining \cs{hyper@nopatch@thm} + +\item[citations and bibliography] If \xpackage{natbib} is not loaded \xpackage{hyperref} redefines \cs{bibcite}, +\cs{@lbibitem} and \cs{@bibitem}. These redefinitions can be suppressed by defining \cs{hyper@nopatch@bib}. \end{description} \section{Package options} @@ -589,7 +592,7 @@ Note however that some options (for example \texttt{unicode}) can only be used a package options, and not in \verb|\hypersetup| as the option settings are processed as the package is read. The following tabular lists (hopefully all) these options. Be aware that some of the option do nothing or have -changed behaviour if the new pdfmanagement and so the new generic hyperref driver is used. +changed behaviour if the new pdfmanagement and so the new generic \xpackage{hyperref} driver is used. \begin{tabular}{>{\ttfamily}l>{\raggedright\arraybackslash}p{5cm}} option & remark \\\hline @@ -628,7 +631,7 @@ colorlinks=true} \end{verbatim} \item A global option in the file, which is passed down to -\textsf{hyperref}: +\xpackage{hyperref}: \begin{verbatim} \documentclass[dvips]{article} @@ -833,7 +836,7 @@ plainpages & boolean & false & Forces page anchors to be named by the Arabic raiselinks & boolean & true & In the hypertex driver, the height of links is normally calculated by the driver as simply the base line of contained text; this options forces \verb|\special| commands to reflect the real height of the link (which could contain a graphic) \\ -breaklinks & boolean & both & This option is in hyperref only used in the dviwindo driver, in all other cases it doesn't do anything sensible---it neither allows nor prevents links to be broken. The ocgx2 package +breaklinks & boolean & both & This option is in \xpackage{hyperref} only used in the dviwindo driver, in all other cases it doesn't do anything sensible---it neither allows nor prevents links to be broken. The ocgx2 package checks the state of the boolean.\\ pageanchor & boolean & true & Determines whether every page is given an implicit anchor at the top left corner. If this is turned off, \verb|\printindex| will not contain @@ -867,16 +870,16 @@ because driver \textsf{dvips} provides much more features than \begin{longtable}{@{}>{\ttfamily}lp{.8\hsize}@{}} driverfallback & Its value is used as driver option\\ & if the driver is not given or autodetected.\\ -dvipdfm & Sets up \textsf{hyperref} for use with the \textsf{dvipdfm} driver.\\ -dvipdfmx & Sets up \textsf{hyperref} for use with the \textsf{dvipdfmx} driver.\\ -dvips & Sets up \textsf{hyperref} for use with the \textsf{dvips} driver. \\ -dvipsone & Sets up \textsf{hyperref} for use with the \textsf{dvipsone} driver. \\ -dviwindo & Sets up \textsf{hyperref} for use with the \textsf{dviwindo} Windows previewer. \\ -hypertex & Sets up \textsf{hyperref} for use with the Hyper\TeX-compliant drivers. \\ +dvipdfm & Sets up \xpackage{hyperref} for use with the \textsf{dvipdfm} driver.\\ +dvipdfmx & Sets up \xpackage{hyperref} for use with the \textsf{dvipdfmx} driver.\\ +dvips & Sets up \xpackage{hyperref} for use with the \textsf{dvips} driver. \\ +dvipsone & Sets up \xpackage{hyperref} for use with the \textsf{dvipsone} driver. \\ +dviwindo & Sets up \xpackage{hyperref} for use with the \textsf{dviwindo} Windows previewer. \\ +hypertex & Sets up \xpackage{hyperref} for use with the Hyper\TeX-compliant drivers. \\ latex2html & Redefines a few macros for compatibility with \textsf{latex2html}. \\ nativepdf & An alias for \textsf{dvips} \\ pdfmark & An alias for \textsf{dvips} \\ -pdftex & Sets up \textsf{hyperref} for use with the \textsf{pdftex} program.\\ +pdftex & Sets up \xpackage{hyperref} for use with the \textsf{pdftex} program.\\ ps2pdf & Redefines a few macros for compatibility with Ghostscript's PDF writer, otherwise identical to \textsf{dvips}. \\ @@ -960,7 +963,7 @@ CJKbookmarks & boolean & false & supports both normal and preprocessed mode of the \xpackage{CJK} package; during the creation of bookmarks, it simply replaces CJK's macros with special versions which expand to the corresponding character - codes. Note that without the `unicode' option of hyperref you get + codes. Note that without the `unicode' option of \xpackage{hyperref} you get PDF files which actually violate the PDF specification because non-Unicode character codes are used -- some PDF readers localized for CJK languages (most notably Acroread itself) support this. @@ -1090,7 +1093,7 @@ is bp and the origin is in the lower left corner. See also pdf\TeX\ works by supplying default values for \texttt{XYZ} (horizontal $\times$ vertical $\times$ zoom) and \texttt{FitBH}. However, drivers using -\texttt{pdfmark} do not supply defaults, so \textsf{hyperref} passes in +\texttt{pdfmark} do not supply defaults, so \xpackage{hyperref} passes in a value of -32768, which causes Acrobat to set (usually) sensible defaults. The following are possible values for the \texttt{pdfview}, \texttt{pdfstartview} and \texttt{pdfremotestartview} parameters. @@ -1176,7 +1179,7 @@ Example: \subsection{Big alphabetical list} The following is a complete listing of available options for -\textsf{hyperref}, arranged alphabetically. +\xpackage{hyperref}, arranged alphabetically. \begin{longtable}{@{}>{\ttfamily}llp{7cm}@{}} allbordercolors & & Set all border color options\\ @@ -1312,7 +1315,7 @@ must be a full URL (relative to the base URL, if that is defined). The special characters \# and \%{} do \emph{not} need to be escaped in any way (unless the command is used in the argument of another command). -The optional argument \emph{options} recognizes the hyperref options +The optional argument \emph{options} recognizes the \xpackage{hyperref} options \texttt{pdfremotestartview}, \texttt{pdfnewwindow} and the following key value options: \begin{description} @@ -1454,14 +1457,14 @@ bigger target to click for hyperlinks (e.g.\ `section 2' instead of merely the number `2'). The label is worked out from the context of the original \verb|\label| -command by \textsf{hyperref} by using the macros listed below (shown +command by \xpackage{hyperref} by using the macros listed below (shown with their default values). The macros can be (re)defined in documents using \verb|\(re)newcommand|; note that some of these macros are already defined in the standard document classes. The mixture of lowercase and uppercase initial letters is deliberate and corresponds to the author's practice. -For each macro below, \textsf{hyperref} checks \ci{*autorefname} before +For each macro below, \xpackage{hyperref} checks \ci{*autorefname} before \ci{*name}. For instance, it looks for \ci{figureautorefname} before \ci{figurename}. @@ -1591,7 +1594,7 @@ definitions and redefinitions are made in a group to keep them local: In addition, parentheses are protected to avoid the danger of unsafe unbalanced parentheses in the PDF string. For further details, see Heiko -Oberdiek's Euro\TeX\ paper distributed with \textsf{hyperref}. +Oberdiek's Euro\TeX\ paper distributed with \xpackage{hyperref}. \begin{cmdsyntax} \ci{begin}\verb|{NoHyper}|\ldots\ci{end}\verb|{NoHyper}| @@ -1606,7 +1609,7 @@ Oberdiek's Euro\TeX\ paper distributed with \textsf{hyperref}. \subsubsection{Setting bookmarks} -Usually \textsf{hyperref} automatically adds bookmarks for +Usually \xpackage{hyperref} automatically adds bookmarks for \verb|\section| and similar macros. But they can also set manually. \begin{cmdsyntax} @@ -1634,7 +1637,7 @@ creates a bookmark below the current bookmark level. However after the command the current bookmark level has not changed. \noindent \textbf{Hint:} Package \textsf{bookmark} replaces -\textsf{hyperref}'s bookmark organization by a new algorithm: +\xpackage{hyperref}'s bookmark organization by a new algorithm: \begin{itemize} \item Usually only one \LaTeX\ run is needed. \item More control over the bookmark appearance (color, font). @@ -1645,7 +1648,7 @@ Therefore I recommend using this package. \subsubsection{Replacement macros}\label{sec:texorpdfstring} -\textsf{hyperref} takes the text for bookmarks from the arguments of +\xpackage{hyperref} takes the text for bookmarks from the arguments of commands like \ci{section}, which can contain things like math, colors, or font changes, none of which will display in bookmarks as is. @@ -1886,7 +1889,7 @@ an anchor name which can be referenced with a bookmark command. \begin{verbatim} \IfHyperBooleanExists{OPTION}{YES}{NO} \end{verbatim} - If a hyperref OPTION is a boolean, that means it takes values + If a \xpackage{hyperref} OPTION is a boolean, that means it takes values `true' or `false', then \verb|\IfHyperBooleanExists| calls YES, otherwise NO. @@ -1900,7 +1903,7 @@ an anchor name which can be referenced with a bookmark command. Both macros are expandable. Additionally option `stoppedearly' is available. It is enabled if \verb|\MaybeStopEarly| or \verb|\MaybeStopNow| - end hyperref prematurely. + end \xpackage{hyperref} prematurely. \subsection{\textbackslash unichar} @@ -1908,7 +1911,7 @@ an anchor name which can be referenced with a bookmark command. If a Unicode character is not supported by puenc.def, it can be given by using \verb|\unichar|. Its name and syntax is inherited from package `ucs'. However it is defined independently for - use in hyperref's \verb|\pdfstringdef| (that converts arbitrary + use in \xpackage{hyperref}'s \verb|\pdfstringdef| (that converts arbitrary TeX code to PDF strings or tries to do this). @@ -1961,7 +1964,7 @@ an anchor name which can be referenced with a bookmark command. an acute, but a hook. However standard LaTeX does not provide such an accent. - Now we can extend the definition to support hyperref. + Now we can extend the definition to support \xpackage{hyperref}. The first and the last word are already supported automatically. Characters with two or more accents are a difficult business in LaTeX, because the NFSS2 macros of the LaTeX kernel do not support @@ -2005,7 +2008,7 @@ an anchor name which can be referenced with a bookmark command. - For hyperlink support in the index, hyperref inserts \verb|\hyperpage| + For hyperlink support in the index, \xpackage{hyperref} inserts \verb|\hyperpage| into the index macros. After processing with Makeindex, \verb|\hyperpage| analyzes its argument to detect page ranges and page comma lists. However, only the standard settings are supported directly: @@ -2056,8 +2059,8 @@ an anchor name which can be referenced with a bookmark command. \subsection{Option `pdfa'} The new option `pdfa' tries to avoid violations of PDF/A in code - generated by hyperref. However, the result is usually not in PDF/A, - because many features aren't controlled by hyperref (XMP metadata, + generated by \xpackage{hyperref}. However, the result is usually not in PDF/A, + because many features aren't controlled by \xpackage{hyperref} (XMP metadata, fonts, colors, driver dependend low level stuff, ...). @@ -2075,7 +2078,7 @@ an anchor name which can be referenced with a bookmark command. \item Trigger events (additional actions) [PDF/A 6.6.2] \item Push button (because of JavaScript) \item Interactive Forms: Flag NeedAppearances is the default `false' - (Because of this, hyperref's implementation of Forms looks ugly). + (Because of this, \xpackage{hyperref}'s implementation of Forms looks ugly). [PDF/A 6.9] \end{itemize} \end{itemize} @@ -2083,7 +2086,7 @@ an anchor name which can be referenced with a bookmark command. The default value of the new option `pdfa' is `false'. It influences - the loading of the package and cannot be changed after hyperref is + the loading of the package and cannot be changed after \xpackage{hyperref} is loaded (\verb|\usepackage{hyperref}|). @@ -2292,7 +2295,7 @@ an anchor name which can be referenced with a bookmark command. \subsection{Option pdfusetitle} - If option pdfusetitle is set then hyperref tries to + If option pdfusetitle is set then \xpackage{hyperref} tries to derive the values for pdftitle and pdfauthor from \verb|\title| and \verb|\author|. An optional argument for \verb|\title| and \verb|\author| is supported (class amsart). @@ -2351,14 +2354,14 @@ an anchor name which can be referenced with a bookmark command. distinguishes three cases: \begin{itemize} \item \xoption{bookmarksdepth} without value - Then hyperref uses the current value of counter \xoption{tocdepth}. + Then \xpackage{hyperref} uses the current value of counter \xoption{tocdepth}. This is the compatible behaviour and the default. \item \verb"bookmarksdepth=", the value is number (also negative): The depth for the bookmarks are set to this number. \item \verb"bookmarksdepth=" The is a document division name (part, chapter, ...). It must not start with a digit or minus to avoid mixing up - with the number case. Internally hyperref uses the value + with the number case. Internally \xpackage{hyperref} uses the value of macro \verb|\toclevel@|. Examples: \begin{verbatim} @@ -2398,12 +2401,12 @@ an anchor name which can be referenced with a bookmark command. \subsection{Default driver setting} (hyperref $\ge$ 6.72s) - If no driver is given, hyperref tries its best to guess the + If no driver is given, \xpackage{hyperref} tries its best to guess the most suitable driver. Thus it loads \xoption{hpdftex}, if pdfTeX is detected running in PDF mode. Or it loads the corresponding VTeX driver for VTeX's working modes. Unhappily many driver programs run after the TeX compiler, - so hyperref does not have a chance (dvips, dvipdfm, ...). + so \xpackage{hyperref} does not have a chance (dvips, dvipdfm, ...). In this case driver \xoption{hypertex} is loaded that supports the HyperTeX features that are recognized by xdvi for example. This behaviour, however, can easily be changed in the configuration @@ -2415,7 +2418,7 @@ an anchor name which can be referenced with a bookmark command. \begin{verbatim} \providecommand*{\Hy@defaultdriver}{hypertex} \end{verbatim} - for the default behaviour of hyperref. + for the default behaviour of \xpackage{hyperref}. See also the new option `driverfallback'. @@ -2756,7 +2759,7 @@ width & dimen & & width of field box \end{longtable} \section{Defining a new driver} -A hyperref driver has to provide definitions for eight macros: +A \xpackage{hyperref} driver has to provide definitions for eight macros: \smallskip \noindent 1. \verb|\hyper@anchor| @@ -2857,8 +2860,8 @@ Currently only package loading orders are available: \subsubsection{arydshln, longtable} - Package longtable must be put before hyperref and arydshln, - hyperref after arydshln generates an error, thus the + Package \xpackage{longtable} must be put before \xpackage{hyperref} and \xpackage{arydshln}, + \xpackage{hyperref} after \xpackage{arydshln} generates an error, thus the resulting package order is then: \begin{verbatim} @@ -2906,14 +2909,14 @@ Currently only package loading orders are available: \subsubsection{bigfoot} - Hyperref does not support package `bigfoot'. And package - `bigfoot' does not support hyperref's footnotes and disables + \xpackage{hyperref} does not support package \xpackage{bigfoot}. And package + \xpackage{bigfoot} does not support \xpackage{hyperref}'s footnotes and disables them (hyperfootnotes=false). \subsubsection{chappg} - Package `chappg' uses \verb|\@addtoreset| that is redefined by `hyperref'. + Package \xpackage{chappg} uses \verb|\@addtoreset| that is redefined by \xpackage{hyperref}. The package order is therefore: \begin{verbatim} @@ -2924,7 +2927,7 @@ Currently only package loading orders are available: \subsubsection{cite} This is from Mike Shell: - cite.sty cannot currently be used with hyperref. + cite.sty cannot currently be used with \xpackage{hyperref}. However, I can do a workaround via: \begin{verbatim} @@ -2935,7 +2938,7 @@ Currently only package loading orders are available: \usepackage[hypertex]{hyperref} \end{verbatim} - so that hyperref will not redefine any of the biblabel stuff - so cite.sty + so that \xpackage{hyperref} will not redefine any of the biblabel stuff - so cite.sty will work as normal - although the citations will not be hyperlinked, of course (But this may not be an issue for many people). @@ -2973,7 +2976,7 @@ Currently only package loading orders are available: \subsubsection{ellipsis} This packages redefines \verb|\textellipsis| - after package hyperref (pd1enc.def/puenc.def should be loaded before): + after package \xpackage{hyperref} (pd1enc.def/puenc.def should be loaded before): \begin{verbatim} \usepackage{hyperref} \usepackage{ellipsis} @@ -2997,16 +3000,16 @@ Currently only package loading orders are available: \subsubsection{foiltex} Update to version 2008/01/28 v2.1.4b: - Since version 6.77a hyperref does not hack into \verb|\@begindvi|, + Since version 6.77a \xpackage{hyperref} does not hack into \verb|\@begindvi|, it uses package `atbegshi' instead, that hooks into \verb|\shipout|. - Thus the patch of `foils.cls' regarding hyperref is now obsolete + Thus the patch of `foils.cls' regarding \xpackage{hyperref} is now obsolete and causes an undefined error message about \verb|\@hyperfixhead|. This is fixed in FoilTeX 2.1.4b. \subsubsection{footnote} - This package is not supported, you have to disable hyperref's footnote + This package is not supported, you have to disable \xpackage{hyperref}'s footnote support by using option \verb"hyperfootnotes=false". @@ -3080,17 +3083,17 @@ Currently only package loading orders are available: - Both `mathenv' and `hyperref' messes around with - environment `eqnarray'. You can load `mathenv' after - `hyperref' to avoid an error message. But \verb|\label| - will not work inside environment `eqnarray' properly, + Both \xpackage{mathenv} and \xpackage{hyperref} messes around with + environment \texttt{eqnarray}. You can load \xpackage{mathenv} after + \xpackage{hyperref} to avoid an error message. But \verb|\label| + will not work inside environment \texttt{eqnarray} properly, for example. \subsubsection{minitoc-hyper} This package is obsolete, use the up-to-date original - package minitoc instead. + package \xpackage{minitoc} instead. @@ -3115,7 +3118,7 @@ Example for introducing links for the page numbers: \subsubsection{ntheorem-hyper} This package is obsolete, use the up-to-date original - package ntheorem instead. + package \xpackage{ntheorem} instead. For equations the following might work: @@ -3172,15 +3175,15 @@ or \xpackage{subcaption} \subsubsection{tabularx} - Linked footnotes are not supported inside environment `tabularx', + Linked footnotes are not supported inside environment \texttt{tabularx}, because they uses the optional argument of \verb|\footnotetext|, see section `Limitations'. Before version 2011/09/28 6.82i - hyperref had disabled footnotes entirely by `hyperfootnotes=false'. + \xpackage{hyperref} had disabled footnotes entirely by \texttt{hyperfootnotes=false}. \subsubsection{titlesec} - \xpackage{nameref} supports titlesec, but hyperref does not + \xpackage{nameref} supports \xpackage{titlesec}, but \xpackage{hyperref} does not (unsolved is the anchor setting, missing with unnumbered section, perhaps problems with page breaks with numbered ones). @@ -3208,10 +3211,10 @@ Note: utf8 is now the default in \LaTeX{} and \xpackage{ucs} is no longer recommended. \subsubsection{varioref} - There are too many problems with varioref. Nobody has time to + There are too many problems with \xpackage{varioref}. Nobody has time to sort them out. Therefore this package is now unsupported. - Perhaps you are lucky and some of the features of varioref works + Perhaps you are lucky and some of the features of \xpackage{varioref} works with the following loading order: \begin{verbatim} \usepackage{nameref} @@ -3221,8 +3224,8 @@ Note: utf8 is now the default in \LaTeX{} and \xpackage{ucs} is no Also some babel versions can be problematic. For example, - 2005/05/21 v3.8g contains a patch for varioref that breaks - the hyperref support for varioref. + 2005/05/21 v3.8g contains a patch for \xpackage{varioref} that breaks + the \xpackage{hyperref} support for \xpackage{varioref}. Also unsupported: @@ -3234,7 +3237,7 @@ Note: utf8 is now the default in \LaTeX{} and \xpackage{ucs} is no \subsubsection{verse} - Version 2005/08/22 v2.22 contains support for hyperref. + Version 2005/08/22 v2.22 contains support for \xpackage{hyperref}. For older versions see example from de.comp.text.tex (2005/08/11, slightly modified): @@ -3298,7 +3301,7 @@ Note: utf8 is now the default in \LaTeX{} and \xpackage{ucs} is no if the string restricts to the printable ASCII set, The reason is that the \verb|\special| does not support PDFDocEncoding. - In older versions hyperref contained special conversion code from + In older versions \xpackage{hyperref} contained special conversion code from UTF-16BE back to UTF-8 in a number of places for xetex to avoid the xdvipdfmx warning @@ -3355,7 +3358,7 @@ Note: utf8 is now the default in \LaTeX{} and \xpackage{ucs} is no \verb|\footnotemark| to \verb|\footnotetext| is not as strong as \verb|\ref| to \verb|\label|. Therefore it is not clear in general which \verb|\footnotemark| references which \verb|\footnotetext|. But that is necessary to implement hyperlinking. - Thus the implementation of hyperref does not support the optional + Thus the implementation of \xpackage{hyperref} does not support the optional argument of \verb|\footnotemark| and \verb|\footnotetext|. @@ -3369,7 +3372,7 @@ Note: utf8 is now the default in \LaTeX{} and \xpackage{ucs} is no \begin{verbatim} \usepackage[pdfborder=0 0 1]{hyperref} \end{verbatim} - Package hyperref now gets + Package \xpackage{hyperref} now gets \begin{verbatim} pdfborder=001 \end{verbatim} @@ -3394,11 +3397,11 @@ Note: utf8 is now the default in \LaTeX{} and \xpackage{ucs} is no \subsection{Index with makeindex} \begin{itemize} - \item Package hyperref adds \verb|\hyperpage| commands by the encap + \item Package \xpackage{hyperref} adds \verb|\hyperpage| commands by the encap mechanism (see documentation of Makeindex), if option hyperindex is set (default). \verb|\hyperpage| uses the page anchors that are set by - hyperref at each page (default). However in the + \xpackage{hyperref} at each page (default). However in the default case page numbers are used in anchor names in arabic form. If the page numbers in other formats are used (book class with \verb|\frontmatter|, \verb|\romannumbering|, ...), @@ -3406,7 +3409,7 @@ Note: utf8 is now the default in \LaTeX{} and \xpackage{ucs} is no \verb"plainpages=false" is recommended. \item The encap mechanism of Makeindex allows to use one command only (see documentation of Makeindex). - If the user sets such a command, hyperref suppresses its + If the user sets such a command, \xpackage{hyperref} suppresses its \verb|\hyperpage| command. With logical markup this situation can easily be solved: \begin{verbatim} @@ -3425,7 +3428,7 @@ Note: utf8 is now the default in \LaTeX{} and \xpackage{ucs} is no \usepackage[encap=?]{hyperref} \end{verbatim} \item Another possibility is the insertion of \verb|\hyperpage| by - a style file for makeindex. For this case, hyperref's + a style file for makeindex. For this case, \xpackage{hyperref}'s insertion will be disabled by \verb"hyperindex=false". \verb|\hyperpage| will be defined regardless of setting of hyperindex. \begin{verbatim} @@ -3454,7 +3457,7 @@ encap_suffix "}" \subsection{Link anchors in figures} The caption command increments the counter and here is the - place where hyperref set the corresponding anchor. Unhappily + place where \xpackage{hyperref} set the corresponding anchor. Unhappily the caption is set below the figure, so the figure is not visible if a link jumps to a figure. In this case, try package \xpackage{hypcap} that implements @@ -3492,7 +3495,7 @@ Support for additional unicode characters: 1EA1 -> \036\241 \end{verbatim} - 4. Transform into a form understood by hyperref: + 4. Transform into a form understood by \xpackage{hyperref}: Hyperref must know where the first byte starts, this is marked by \verb"9" (8 and 9 cannot occur in @@ -3526,7 +3529,7 @@ Support for additional unicode characters: The footnote support is rather limited. It is beyond the scope to use \verb|\footnotemark| and \verb|\footnotetext| out of order or reusing - \verb|\footnotemark|. Here you can either disable hyperref's footnote + \verb|\footnotemark|. Here you can either disable \xpackage{hyperref}'s footnote support by \verb"hyperfootnotes=false" or fiddle with internal macros, nasty examples: @@ -3587,16 +3590,16 @@ C% might be numbered within chapters or \verb|\newtheorem| is used with an optional counter argument. Internally LaTeX uses \verb|\@addtoreset| to reset a counter in dependency to another counter. Package - hyperref hooks into \verb|\@addtoreset| to catch this situation. - Also \verb|\numberwithin| of package amsmath is caught by hyperref. + \xpackage{hyperref} hooks into \verb|\@addtoreset| to catch this situation. + Also \verb|\numberwithin| of package amsmath is caught by \xpackage{hyperref}. However, if the definition of subordinate counters take place - before hyperref is loaded, the old meaning of \verb|\@addtoreset| is - called without hyperref's additions. Then the companion counter + before \xpackage{hyperref} is loaded, the old meaning of \verb|\@addtoreset| is + called without \xpackage{hyperref}'s additions. Then the companion counter macro \verb|\theH| can be redefined accordingly. Or move the - definition of subordinate counters after hyperref is loaded. + definition of subordinate counters after \xpackage{hyperref} is loaded. Example for \verb|\newtheorem|, problematic case: \begin{verbatim} @@ -3644,7 +3647,7 @@ the changes needed for \textsf{dvipdf}, and \Hologo{HanTheThanh} supplied all th information needed for \textsf{pdftex}. Patrick Daly kindly updated his \xpackage{natbib} package to allow easy integration with \xpackage{hyperref}. Michael Mehlich's \xpackage{hyper} package (developed -in parallel with \textsf{hyperref}) showed me solutions for some +in parallel with \xpackage{hyperref}) showed me solutions for some problems. Hopefully the two packages will combine one day. The forms creation section owes a great deal to: T.\ V.\ Raman, for diff --git a/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf b/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf index dc4e5313a7..8b0151bbfe 100644 Binary files a/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf and b/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf differ diff --git a/macros/latex/contrib/hyperref/doc/hyperref.pdf b/macros/latex/contrib/hyperref/doc/hyperref.pdf index 592cd5be4a..e4576ab482 100644 Binary files a/macros/latex/contrib/hyperref/doc/hyperref.pdf and b/macros/latex/contrib/hyperref/doc/hyperref.pdf differ diff --git a/macros/latex/contrib/hyperref/doc/nameref.pdf b/macros/latex/contrib/hyperref/doc/nameref.pdf index eabd2ab2a4..9d9b8a5905 100644 Binary files a/macros/latex/contrib/hyperref/doc/nameref.pdf and b/macros/latex/contrib/hyperref/doc/nameref.pdf differ diff --git a/macros/latex/contrib/hyperref/hluatex.dtx b/macros/latex/contrib/hyperref/hluatex.dtx index 876b0cedbb..6c335e5df4 100644 --- a/macros/latex/contrib/hyperref/hluatex.dtx +++ b/macros/latex/contrib/hyperref/hluatex.dtx @@ -1,6 +1,6 @@ % \iffalse % Source File: hluatex.dtx -% 2023-04-22 v7.00x +% 2023-05-16 v7.00y % % Copyright % 2016-2019 Oberdiek Package Support Group @@ -31,7 +31,7 @@ % % \begin{macrocode} %<*luatex> -%% 2023-04-22 v7.00x +%% 2023-05-16 v7.00y %% force unicode encoding, see issue #101 %% code mostly copied from hxetex.def \HyPsd@LoadUnicode diff --git a/macros/latex/contrib/hyperref/hyperref-linktarget.dtx b/macros/latex/contrib/hyperref/hyperref-linktarget.dtx index 6466ef0203..a13e0b9da7 100644 --- a/macros/latex/contrib/hyperref/hyperref-linktarget.dtx +++ b/macros/latex/contrib/hyperref/hyperref-linktarget.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 2023-04-22 v7.00x} +% \date{Version 2023-05-16 v7.00y} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/hyperref/hyperref-patches.dtx b/macros/latex/contrib/hyperref/hyperref-patches.dtx index 4dd20ba53a..7aaad9ac18 100644 --- a/macros/latex/contrib/hyperref/hyperref-patches.dtx +++ b/macros/latex/contrib/hyperref/hyperref-patches.dtx @@ -55,7 +55,7 @@ % }^^A % } % -% \date{Version 2023-04-22 v7.00x} +% \date{Version 2023-05-16 v7.00y} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/hyperref/hyperref.dtx b/macros/latex/contrib/hyperref/hyperref.dtx index dfe514a065..df20f32b36 100644 --- a/macros/latex/contrib/hyperref/hyperref.dtx +++ b/macros/latex/contrib/hyperref/hyperref.dtx @@ -48,11 +48,10 @@ %\ProvidesFile{pd1enc.def} %\ProvidesFile{puenc.def} %\ProvidesFile{puenc-extra.def} -%\ProvidesFile{puenc-greekbasic.def} %\ProvidesFile{puvnenc.def} %\ProvidesFile{puarenc.def} %\ProvidesFile{psdextra.def} -% [2023-04-22 v7.00x % +% [2023-05-16 v7.00y % % Hypertext links for LaTeX] % Dummy hyperref (SR)] % Hyperref documentation driver file] @@ -89,7 +88,6 @@ % Hyperref: PDFDocEncoding definition (HO)] % Hyperref: PDF Unicode definition (HO)] % Hyperref: PDF Unicode extra definition (HO)] -% Hyperref: PDF Unicode definition (greek block) (HO)] % Hyperref: Additions to puenc.def for VnTeX] % Hyperref: Additions to puenc.def for Arabi] % Hyperref: Additions to PDF string support] @@ -2047,10 +2045,6 @@ \def\HyPsd@LoadExtra{% \ifHy@psdextra \ltx@iffileloaded{puenc.def}{% - \ltx@iffileloaded{puenc-greekbasic.def}{}{% - \Hy@SaveCatcodeSettings{pu}% - \input{puenc-greekbasic.def}% - \Hy@RestoreCatcodeSettings{pu}}% \Hy@SaveCatcodeSettings{psdextra}% \input{psdextra.def}% \Hy@RestoreCatcodeSettings{psdextra}% @@ -4252,27 +4246,14 @@ % \end{macrocode} % % \subsection{Package xr and xr-hyper} -% The beta version of xr that supports \cmd{\XR@addURL} is called -% \verb|xr-hyper|. Therefore we test for the macro itself and not -% for the package name: -% \begin{macrocode} -\ltx@IfUndefined{XR@addURL}{% -}{% -% \end{macrocode} +% +% The beta version of xr that supports \cmd{\XR@addURL} is called +% \verb|xr-hyper|. % If reading external aux files check whether they have a non zero % fourth field in |\newlabel| and if so, add the URL as the fifth field. -% \begin{macrocode} - \def\XR@addURL#1{\XR@@dURL#1{}{}{}{}\\}% - \def\XR@@dURL#1#2#3#4#5\\{% - {#1}{#2}% - \if!#4!% - \else - {#3}{#4}{\XR@URL}% - \fi - }% -} -% \end{macrocode} +% Change 2023-05-14: xr-hyper adds the field. % +% % \begin{macrocode} \def\Hy@true{true} \def\Hy@false{false} @@ -11481,77 +11462,80 @@ % not expanded immediately, we use \cs{@extra@b@citeb}, so cites in a % chapter will link to the bibliography in that chapter. % \begin{macrocode} -\ltx@IfUndefined{NAT@parse}{% - \providecommand*\@extra@binfo{}% - \providecommand*\@extra@b@citeb{}% - \def\bibcite#1#2{% - \@newl@bel{b}{#1\@extra@binfo}{% - \hyper@@link[cite]{}{cite.#1\@extra@b@citeb}{#2}% - }% - }% - \gdef\@extra@binfo{}% +\@ifundefined{hyper@nopatch@bib} + {% + \ltx@IfUndefined{NAT@parse}{% + \providecommand*\@extra@binfo{}% + \providecommand*\@extra@b@citeb{}% + \def\bibcite#1#2{% + \@newl@bel{b}{#1\@extra@binfo}{% + \hyper@@link[cite]{}{cite.#1\@extra@b@citeb}{#2}% + }% + }% + \gdef\@extra@binfo{}% % \end{macrocode} % Package |babel| redefines \cmd{\bibcite} with % macro \cmd{\bbl@cite@choice}. It needs to be overwritten % to avoid the warning ``Label(s) may have changed.''. % \begin{macrocode} - \let\Hy@bibcite\bibcite - \begingroup - \@ifundefined{bbl@cite@choice}{}{% - \g@addto@macro\bbl@cite@choice{% - \let\bibcite\Hy@bibcite - }% - }% - \endgroup + \let\Hy@bibcite\bibcite + \begingroup + \@ifundefined{bbl@cite@choice}{}{% + \g@addto@macro\bbl@cite@choice{% + \let\bibcite\Hy@bibcite + }% + }% + \endgroup % \end{macrocode} % |\@BIBLABEL| is working around a `feature' of Rev\TeX. % \begin{macrocode} - \providecommand*{\@BIBLABEL}{\@biblabel}% - \def\@lbibitem[#1]#2{% - \@skiphyperreftrue - \H@item[% - \ifx\Hy@raisedlink\@empty - \hyper@anchorstart{cite.#2\@extra@b@citeb}% - \@BIBLABEL{#1}% - \hyper@anchorend - \else - \Hy@raisedlink{% - \hyper@anchorstart{cite.#2\@extra@b@citeb}\hyper@anchorend - }% - \@BIBLABEL{#1}% - \fi - \hfill - ]% - \@skiphyperreffalse - \if@filesw - \begingroup - \let\protect\noexpand - \immediate\write\@auxout{% - \string\bibcite{#2}{#1}% - }% - \endgroup - \fi - \ignorespaces - }% + \providecommand*{\@BIBLABEL}{\@biblabel}% + \def\@lbibitem[#1]#2{% + \@skiphyperreftrue + \H@item[% + \ifx\Hy@raisedlink\@empty + \hyper@anchorstart{cite.#2\@extra@b@citeb}% + \@BIBLABEL{#1}% + \hyper@anchorend + \else + \Hy@raisedlink{% + \hyper@anchorstart{cite.#2\@extra@b@citeb}\hyper@anchorend + }% + \@BIBLABEL{#1}% + \fi + \hfill + ]% + \@skiphyperreffalse + \if@filesw + \begingroup + \let\protect\noexpand + \immediate\write\@auxout{% + \string\bibcite{#2}{#1}% + }% + \endgroup + \fi + \ignorespaces + }% % \end{macrocode} % Since |\bibitem| is doing its own labelling, call the raw % version of |\item|, to avoid extra spurious labels % \begin{macrocode} - \def\@bibitem#1{% - \@skiphyperreftrue\H@item\@skiphyperreffalse - \Hy@raisedlink{% - \hyper@anchorstart{cite.#1\@extra@b@citeb}\relax\hyper@anchorend - }% - \if@filesw - \begingroup - \let\protect\noexpand - \immediate\write\@auxout{% - \string\bibcite{#1}{\the\value{\@listctr}}% - }% - \endgroup - \fi - \ignorespaces - }% + \def\@bibitem#1{% + \@skiphyperreftrue\H@item\@skiphyperreffalse + \Hy@raisedlink{% + \hyper@anchorstart{cite.#1\@extra@b@citeb}\relax\hyper@anchorend + }% + \if@filesw + \begingroup + \let\protect\noexpand + \immediate\write\@auxout{% + \string\bibcite{#1}{\the\value{\@listctr}}% + }% + \endgroup + \fi + \ignorespaces + }% + }{}% }{} % \end{macrocode} % @@ -21733,192 +21717,9 @@ % Greek is only loaded if \cs{textBeta} is defined. % \begin{macrocode} \ifx\textBeta\@undefined \else -\input{puenc-greekbasic.def} +\input{puenc-greek.def} \fi % -%<*pugreek> -% U+0374 GREEK NUMERAL SIGN; numeralsigngreek -\DeclareTextCommand{\textnumeralsigngreek}{PU}{\83\164}% U+0374 -\DeclareTextCommand{\textdexiakeraia}{PU}{\83\164}% U+0374 -% U+0375 GREEK LOWER NUMERAL SIGN; numeralsignlowergreek -\DeclareTextCommand{\textnumeralsignlowergreek}{PU}{\83\165}% U+0375 -\DeclareTextCommand{\textaristerikeraia}{PU}{\83\165}% U+0375 -% U+0386 GREEK CAPITAL LETTER ALPHA WITH TONOS; Alphatonos -\DeclareTextCompositeCommand{\'}{PU}{\textAlpha}{\83\206}% U+0386 -% U+0388 GREEK CAPITAL LETTER EPSILON WITH TONOS; Epsilontonos -\DeclareTextCompositeCommand{\'}{PU}{\textEpsilon}{\83\210}% U+0388 -% U+0389 GREEK CAPITAL LETTER ETA WITH TONOS; Etatonos -\DeclareTextCompositeCommand{\'}{PU}{\textEta}{\83\211}% U+0389 -% U+038A GREEK CAPITAL LETTER IOTA WITH TONOS; Iotatonos -\DeclareTextCompositeCommand{\'}{PU}{\textIota}{\83\212}% U+038A -% U+038C GREEK CAPITAL LETTER OMICRON WITH TONOS; Omicrontonos -\DeclareTextCompositeCommand{\'}{PU}{\textOmicron}{\83\214}% U+038C -% U+038E GREEK CAPITAL LETTER UPSILON WITH TONOS; Upsilontonos -\DeclareTextCompositeCommand{\'}{PU}{\textUpsilon}{\83\216}% U+038E -% U+038F GREEK CAPITAL LETTER OMEGA WITH TONOS; Omegatonos -\DeclareTextCompositeCommand{\'}{PU}{\textOmega}{\83\217}% U+038F -% U+0390 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS; -% iotadieresistonos -\DeclareTextCompositeCommand{\'}{PU}{\textIotadieresis}{\83\220}% U+0390 -% U+0391 GREEK CAPITAL LETTER ALPHA; Alpha -\DeclareTextCommand{\textAlpha}{PU}{\83\221}% U+0391 -% U+0392 GREEK CAPITAL LETTER BETA; Beta -\DeclareTextCommand{\textBeta}{PU}{\83\222}% U+0392 -% U+0393 GREEK CAPITAL LETTER GAMMA; Gamma; \Gamma (LaTeX) -\DeclareTextCommand{\textGamma}{PU}{\83\223}%* U+0393 -% U+0394 GREEK CAPITAL LETTER DELTA; Deltagreek, *Delta; \Delta (LaTeX) -\DeclareTextCommand{\textDelta}{PU}{\83\224}%* U+0394 -% U+0395 GREEK CAPITAL LETTER EPSILON; Epsilon -\DeclareTextCommand{\textEpsilon}{PU}{\83\225}% U+0395 -% U+0396 GREEK CAPITAL LETTER ZETA; Zeta -\DeclareTextCommand{\textZeta}{PU}{\83\226}% U+0396 -% U+0397 GREEK CAPITAL LETTER ETA; Eta -\DeclareTextCommand{\textEta}{PU}{\83\227}% U+0397 -% U+0398 GREEK CAPITAL LETTER THETA; Theta; \Theta (LaTeX) -\DeclareTextCommand{\textTheta}{PU}{\83\230}%* U+0398 -% U+0399 GREEK CAPITAL LETTER IOTA; Iota -\DeclareTextCommand{\textIota}{PU}{\83\231}% U+0399 -% U+039A GREEK CAPITAL LETTER KAPPA; Kappa -\DeclareTextCommand{\textKappa}{PU}{\83\232}% U+039A -% U+039B GREEK CAPITAL LETTER LAMDA; Lambda; \Lambda (LaTeX) -\DeclareTextCommand{\textLambda}{PU}{\83\233}%* U+039B -% U+039C GREEK CAPITAL LETTER MU; Mu -\DeclareTextCommand{\textMu}{PU}{\83\234}% U+039C -% U+039D GREEK CAPITAL LETTER NU; Nu -\DeclareTextCommand{\textNu}{PU}{\83\235}% U+039D -% U+039E GREEK CAPITAL LETTER XI; Xi; \Xi (LaTeX) -\DeclareTextCommand{\textXi}{PU}{\83\236}%* U+039E -% U+039F GREEK CAPITAL LETTER OMICRON; Omicron -\DeclareTextCommand{\textOmicron}{PU}{\83\237}% U+039F -% U+03A0 GREEK CAPITAL LETTER PI; Pi -\DeclareTextCommand{\textPi}{PU}{\83\240}%* U+03A0 -% U+03A1 GREEK CAPITAL LETTER RHO; Rho -\DeclareTextCommand{\textRho}{PU}{\83\241}% U+03A1 -% U+03A3 GREEK CAPITAL LETTER SIGMA; Sigma; \Sigma (LaTeX) -\DeclareTextCommand{\textSigma}{PU}{\83\243}%* U+03A3 -% U+03A4 GREEK CAPITAL LETTER TAU; Tau -\DeclareTextCommand{\textTau}{PU}{\83\244}% U+03A4 -% U+03A5 GREEK CAPITAL LETTER UPSILON; Upsilon; \Upsilon (LaTeX) -\DeclareTextCommand{\textUpsilon}{PU}{\83\245}%* U+03A5 -% U+03A6 GREEK CAPITAL LETTER PHI; Phi; \Phi (LaTeX) -\DeclareTextCommand{\textPhi}{PU}{\83\246}%* U+03A6 -% U+03A7 GREEK CAPITAL LETTER CHI; Chi -\DeclareTextCommand{\textChi}{PU}{\83\247}% U+03A7 -% U+03A8 GREEK CAPITAL LETTER PSI; Psi; \Psi (LaTeX) -\DeclareTextCommand{\textPsi}{PU}{\83\250}%* U+03A8 -% U+03A9 GREEK CAPITAL LETTER OMEGA; Omegagreek, *Omega; -% \Omega (LaTeX) -\DeclareTextCommand{\textOmega}{PU}{\83\251}%* U+03A9 -% U+03AA GREEK CAPITAL LETTER IOTA WITH DIALYTIKA; Iotadieresis -\DeclareTextCommand{\textIotadieresis}{PU}{\83\252}% U+03AA -\DeclareTextCompositeCommand{\"}{PU}{\textIota}{\83\252}% U+03AA -% U+03AB GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA; Upsilondieresis -\DeclareTextCompositeCommand{\"}{PU}{\textUpsilon}{\83\253}% U+03AB -% U+03AC GREEK SMALL LETTER ALPHA WITH TONOS; alphatonos -\DeclareTextCompositeCommand{\'}{PU}{\textalpha}{\83\254}%* U+03AC -% U+03AD GREEK SMALL LETTER EPSILON WITH TONOS; epsilontonos -\DeclareTextCompositeCommand{\'}{PU}{\textepsilon}{\83\255}% U+03AD -% U+03AE GREEK SMALL LETTER ETA WITH TONOS; etatonos -\DeclareTextCompositeCommand{\'}{PU}{\texteta}{\83\256}% U+03AE -% U+03AF GREEK SMALL LETTER IOTA WITH TONOS; iotatonos -\DeclareTextCompositeCommand{\'}{PU}{\textiota}{\83\257}% U+03AF -% U+03B0 GREEK SMALL LETTER UPSILON WITH DIALYTIKA -% AND TONOS; upsilondieresisto -\DeclareTextCompositeCommand{\"}{PU}{\textupsilonacute}{\83\260}% U+03B0 -% U+03B1 GREEK SMALL LETTER ALPHA; alpha; \alpha (LaTeX) -\DeclareTextCommand{\textalpha}{PU}{\83\261}%* U+03B1 -% U+03B2 GREEK SMALL LETTER BETA; beta; \beta (LaTeX) -\DeclareTextCommand{\textbeta}{PU}{\83\262}%* U+03B2 -% U+03B3 GREEK SMALL LETTER GAMMA; gamma; \gamma (LaTeX) -\DeclareTextCommand{\textgamma}{PU}{\83\263}%* U+03B3 -% U+03B4 GREEK SMALL LETTER DELTA; delta; \delta (LaTeX) -\DeclareTextCommand{\textdelta}{PU}{\83\264}%* U+03B4 -% U+03B5 GREEK SMALL LETTER EPSILON; epsilon; \epsilon (LaTeX) -\DeclareTextCommand{\textepsilon}{PU}{\83\265}%* U+03B5 -% U+03B6 GREEK SMALL LETTER ZETA; zeta; \zeta (LaTeX) -\DeclareTextCommand{\textzeta}{PU}{\83\266}%* U+03B6 -% U+03B7 GREEK SMALL LETTER ETA; eta; \eta (LaTeX) -\DeclareTextCommand{\texteta}{PU}{\83\267}%* U+03B7 -% U+03B8 GREEK SMALL LETTER THETA; theta; \theta (LaTeX) -\DeclareTextCommand{\texttheta}{PU}{\83\270}%* U+03B8 -% U+03B9 GREEK SMALL LETTER IOTA; iota; \iota (LaTeX) -\DeclareTextCommand{\textiota}{PU}{\83\271}%* U+03B9 -% U+03BA GREEK SMALL LETTER KAPPA; kappa; \kappa (LaTeX) -\DeclareTextCommand{\textkappa}{PU}{\83\272}%* U+03BA -% U+03BB GREEK SMALL LETTER LAMDA; lambda; \lambda (LaTeX) -\DeclareTextCommand{\textlambda}{PU}{\83\273}%* U+03BB -% U+03BC GREEK SMALL LETTER MU; mugreek, *mu; \mu (LaTeX) -\DeclareTextCommand{\textmugreek}{PU}{\83\274}%* U+03BC -% U+03BD GREEK SMALL LETTER NU; nu; \nu (LaTeX) -\DeclareTextCommand{\textnu}{PU}{\83\275}%* U+03BD -% U+03BE GREEK SMALL LETTER XI; xi; \xi (LaTeX) -\DeclareTextCommand{\textxi}{PU}{\83\276}%* U+03BE -% U+03BF GREEK SMALL LETTER OMICRON; omicron -\DeclareTextCommand{\textomicron}{PU}{\83\277}% U+03BF -% U+03C0 GREEK SMALL LETTER PI; pi; \pi (LaTeX) -\DeclareTextCommand{\textpi}{PU}{\83\300}%* U+03C0 -% U+03C1 GREEK SMALL LETTER RHO; rho; \rho (LaTeX) -\DeclareTextCommand{\textrho}{PU}{\83\301}%* U+03C1 -% U+03C2 GREEK SMALL LETTER FINAL SIGMA; *sigma1, sigmafinal -\DeclareTextCommand{\textvarsigma}{PU}{\83\302}%* U+03C2 -% U+03C3 GREEK SMALL LETTER SIGMA; sigma; \sigma (LaTeX) -\DeclareTextCommand{\textsigma}{PU}{\83\303}%* U+03C3 -% U+03C4 GREEK SMALL LETTER TAU; tau; \tau (LaTeX) -\DeclareTextCommand{\texttau}{PU}{\83\304}%* U+03C4 -% U+03C5 GREEK SMALL LETTER UPSILON; upsilon; \upsilon (LaTeX) -\DeclareTextCommand{\textupsilon}{PU}{\83\305}%* U+03C5 -% U+03C6 GREEK SMALL LETTER PHI; phi; \phi (LaTeX) -\DeclareTextCommand{\textphi}{PU}{\83\306}%* U+03C6 -% U+03C7 GREEK SMALL LETTER CHI; chi; \chi (LaTeX) -\DeclareTextCommand{\textchi}{PU}{\83\307}%* U+03C7 -% U+03C8 GREEK SMALL LETTER PSI; psi; \psi (LaTeX) -\DeclareTextCommand{\textpsi}{PU}{\83\310}%* U+03C8 -% U+03C9 GREEK SMALL LETTER OMEGA; omega; \omega (LaTeX) -\DeclareTextCommand{\textomega}{PU}{\83\311}%* U+03C9 -% U+03CA GREEK SMALL LETTER IOTA WITH DIALYTIKA; iotadieresis -\DeclareTextCompositeCommand{\"}{PU}{\textiota}{\83\312}% U+03CA -% U+03CB GREEK SMALL LETTER UPSILON WITH DIALYTIKA; upsilondieresis -\DeclareTextCompositeCommand{\"}{PU}{\textupsilon}{\83\313}% U+03CB -% U+03CC GREEK SMALL LETTER OMICRON WITH TONOS; omicrontonos -\DeclareTextCompositeCommand{\'}{PU}{\textomicron}{\83\314}% U+03CC -% U+03CD GREEK SMALL LETTER UPSILON WITH TONOS; upsilontonos -\DeclareTextCommand{\textupsilonacute}{PU}{\83\315}% U+03CD -\DeclareTextCompositeCommand{\'}{PU}{\textupsilon}{\83\315}% U+03CD -% U+03CE GREEK SMALL LETTER OMEGA WITH TONOS; omegatonos -\DeclareTextCompositeCommand{\'}{PU}{\textomega}{\83\316}% U+03CE -% U+03D8 GREEK LETTER ARCHAIC KOPPA; -\DeclareTextCommand{\textQoppa}{PU}{\83\330}% U+03D8 -% U+03D9 GREEK SMALL LETTER ARCHAIC KOPPA; -\DeclareTextCommand{\textqoppa}{PU}{\83\331}% U+03D9 -% U+03DA GREEK LETTER STIGMA; Stigmagreek -\DeclareTextCommand{\textStigmagreek}{PU}{\83\332}% U+03DA -\DeclareTextCommand{\textStigma}{PU}{\83\332}% U+03DA -% U+03DB GREEK SMALL LETTER STIGMA -\DeclareTextCommand{\textstigmagreek}{PU}{\83\333}% U+03DB -\DeclareTextCommand{\textstigma}{PU}{\83\333}% U+03DB -% U+03DC GREEK LETTER DIGAMMA; Digammagreek -\DeclareTextCommand{\textDigammagreek}{PU}{\83\334}% U+03DC -\DeclareTextCommand{\textDigamma}{PU}{\83\334}% U+03DC -% U+03DD GREEK SMALL LETTER DIGAMMA -\DeclareTextCommand{\textdigammagreek}{PU}{\83\335}% U+03DD -\DeclareTextCommand{\textdigamma}{PU}{\83\335}% U+03DD -%* \textdigammagreek -> \digamma (AmS) -% U+03DE GREEK LETTER KOPPA; Koppagreek -\DeclareTextCommand{\textKoppa}{PU}{\83\336}% U+03DE -\DeclareTextCommand{\textKoppagreek}{PU}{\83\336}% U+03DE -% U+03DF GREEK SMALL LETTER KOPPA -\DeclareTextCommand{\textkoppa}{PU}{\83\337}% U+03DF -\DeclareTextCommand{\textkoppagreek}{PU}{\83\337}% U+03DF -% U+03E0 GREEK LETTER SAMPI; Sampigreek -\DeclareTextCommand{\textSampigreek}{PU}{\83\340}% U+03E0 -\DeclareTextCommand{\textSampi}{PU}{\83\340}% U+03E0 -% U+03E1 GREEK SMALL LETTER SAMPI -\DeclareTextCommand{\textsampigreek}{PU}{\83\341}% U+03E1 -\DeclareTextCommand{\textsampi}{PU}{\83\341}% U+03E1 -% U+03F6 GREEK REVERSED LUNATE EPSILON SYMBOL; -% \backepsilon (AmS) -\DeclareTextCommand{\textbackepsilon}{PU}{\83\366}% U+03F6 -% % \end{macrocode} % % \subsubsection{Cyrillic: U+0400 to U+04FF} @@ -25515,6 +25316,42 @@ % \begin{macrocode} %<*psdextra> \Hy@VersionCheck{psdextra.def} +\DeclareTextCommand{\textGamma}{PU}{\83\223}%* U+0393 +\DeclareTextCommand{\textDelta}{PU}{\83\224}%* U+0394 +\DeclareTextCommand{\textTheta}{PU}{\83\230}%* U+0398 +\DeclareTextCommand{\textLambda}{PU}{\83\233}%* U+039B +\DeclareTextCommand{\textXi}{PU}{\83\236}%* U+039E +\DeclareTextCommand{\textPi}{PU}{\83\240}%* U+03A0 +\DeclareTextCommand{\textSigma}{PU}{\83\243}%* U+03A3 +\DeclareTextCommand{\textUpsilon}{PU}{\83\245}%* U+03A5 +\DeclareTextCommand{\textPhi}{PU}{\83\246}%* U+03A6 +\DeclareTextCommand{\textChi}{PU}{\83\247}% U+03A7 +\DeclareTextCommand{\textPsi}{PU}{\83\250}%* U+03A8 +\DeclareTextCommand{\textOmega}{PU}{\83\251}%* U+03A9 +\DeclareTextCommand{\textalpha}{PU}{\83\261}%* U+03B1 +\DeclareTextCommand{\textbeta}{PU}{\83\262}%* U+03B2 +\DeclareTextCommand{\textgamma}{PU}{\83\263}%* U+03B3 +\DeclareTextCommand{\textdelta}{PU}{\83\264}%* U+03B4 +\DeclareTextCommand{\textepsilon}{PU}{\83\265}%* U+03B5 +\DeclareTextCommand{\textzeta}{PU}{\83\266}%* U+03B6 +\DeclareTextCommand{\texteta}{PU}{\83\267}%* U+03B7 +\DeclareTextCommand{\texttheta}{PU}{\83\270}%* U+03B8 +\DeclareTextCommand{\textiota}{PU}{\83\271}%* U+03B9 +\DeclareTextCommand{\textkappa}{PU}{\83\272}%* U+03BA +\DeclareTextCommand{\textlambda}{PU}{\83\273}%* U+03BB +\DeclareTextCommand{\textmugreek}{PU}{\83\274}%* U+03BC +\DeclareTextCommand{\textnu}{PU}{\83\275}%* U+03BD +\DeclareTextCommand{\textxi}{PU}{\83\276}%* U+03BE +\DeclareTextCommand{\textpi}{PU}{\83\300}%* U+03C0 +\DeclareTextCommand{\textrho}{PU}{\83\301}%* U+03C1 +\DeclareTextCommand{\textvarsigma}{PU}{\83\302}%* U+03C2 +\DeclareTextCommand{\textsigma}{PU}{\83\303}%* U+03C3 +\DeclareTextCommand{\texttau}{PU}{\83\304}%* U+03C4 +\DeclareTextCommand{\textupsilon}{PU}{\83\305}%* U+03C5 +\DeclareTextCommand{\textphi}{PU}{\83\306}%* U+03C6 +\DeclareTextCommand{\textchi}{PU}{\83\307}%* U+03C7 +\DeclareTextCommand{\textpsi}{PU}{\83\310}%* U+03C8 +\DeclareTextCommand{\textomega}{PU}{\83\311}%* U+03C9 \newcommand*{\psdmapshortnames}{% \let\MVPlus\textMVPlus \let\MVComma\textMVComma diff --git a/macros/latex/contrib/hyperref/hyperref.ins b/macros/latex/contrib/hyperref/hyperref.ins index 263d0ef7c0..130c1c13e2 100644 --- a/macros/latex/contrib/hyperref/hyperref.ins +++ b/macros/latex/contrib/hyperref/hyperref.ins @@ -114,7 +114,6 @@ given in the file `manifest.txt'. \file{hxetex.def}{\from{hyperref.dtx}{xetex,pdfform,outlines}} \file{pd1enc.def}{\from{hyperref.dtx}{pd1enc}} \file{puenc.def}{\from{hyperref.dtx}{puenc}} - \file{puenc-greekbasic.def}{\from{hyperref.dtx}{pugreek}} \file{puenc-extra.def}{\from{hyperref.dtx}{puextra}} \file{puvnenc.def}{\from{hyperref.dtx}{puvnenc}} \file{puarenc.def}{\from{hyperref.dtx}{puarenc}} diff --git a/macros/latex/contrib/hyperref/nameref.dtx b/macros/latex/contrib/hyperref/nameref.dtx index 2baa4bb114..e370a40fe1 100644 --- a/macros/latex/contrib/hyperref/nameref.dtx +++ b/macros/latex/contrib/hyperref/nameref.dtx @@ -33,7 +33,7 @@ %\ProvidesFile{nameref.drv} % \fi % \ProvidesFile{nameref.dtx} - [2022-05-17 v2.50 Cross-referencing by name of section]% + [2023-05-16 v2.51 Cross-referencing by name of section]% % % % \iffalse @@ -220,7 +220,8 @@ \RequirePackage{ltxcmds}[2009/12/12] % \end{macrocode} % -% We redefine |\label| so that it also writes the name of the +% In formats older than 2023-06-01 +% we redefine |\label| so that it also writes the name of the % current section to the .aux file; if the name ends in a dot, % we zap it. To allow for the \xpackage{hyperref} package, also write % fourth and fifth fields (empty by default; @@ -269,57 +270,72 @@ \endgroup }{} % \end{macrocode} -% \end{macro} +% \end{macro} % \begin{macro}{\label@hook} +% Starting with LaTeX 2023-06-01 it is not longer needed to +% redefine \cs{label} as the kernel provides a hook and +% stores \cs{@currentlabelname}. We still support +% \cs{label@hook} for now as it is used below in \cs{slabel} +% and also in hyperref. % \begin{macrocode} \providecommand*{\label@hook}{} \ltx@GlobalAppendToMacro{\label@hook}{% - \NR@sanitize@labelname -} + \NR@sanitize@labelname + } +\@ifl@t@r\fmtversion{2023-06-01} + { + \AddToHookWithArguments{label}{\def\label@name{#1}\label@hook} + } + { + % \end{macrocode} % \end{macro} % \begin{macro}{\label} % \begin{macrocode} -\def\label#1{% - \@bsphack - \begingroup - \def\label@name{#1}% - \label@hook - \protected@write\@auxout{}{% - \string\newlabel{#1}{% - {\@currentlabel}% - {\thepage}% - {\@currentlabelname}% - {\@currentHref}{}% - }% - }% - \endgroup - \@esphack -}% -\ifNR@showkeys - \def\label#1{% - \@bsphack - \SK@\SK@@label{#1}% - \begingroup - \def\label@name{#1}% - \label@hook - \protected@write\@auxout{}{% - \string\newlabel{#1}{% - {\@currentlabel}% - {\thepage}% - {\@currentlabelname}% - {\@currentHref}{}% + \def\label#1{% + \@bsphack + \begingroup + \def\label@name{#1}% + \label@hook + \protected@write\@auxout{}{% + \string\newlabel{#1}{% + {\@currentlabel}% + {\thepage}% + {\@currentlabelname}% + {\@currentHref}{}% + }% }% + \endgroup + \@esphack + }% + \ifNR@showkeys + \def\label#1{% + \@bsphack + \SK@\SK@@label{#1}% + \begingroup + \def\label@name{#1}% + \label@hook + \protected@write\@auxout{}{% + \string\newlabel{#1}{% + {\@currentlabel}% + {\thepage}% + {\@currentlabelname}% + {\@currentHref}{}% + }% + }% + \endgroup + \@esphack }% - \endgroup - \@esphack - }% -\fi + \fi + } % \end{macrocode} % \end{macro} % \begin{macro}{\ltx@label} +% Starting with LaTeX 2023-06-01 it is not longer needed to update the +% amsmath command \cs{ltx@label} as nameref no longer changes \cs{label} % \begin{macrocode} -\let\ltx@label\label +\@ifl@t@r\fmtversion{2023-06-01} + {}{\let\ltx@label\label} % \end{macrocode} % \end{macro} % Needed for the \emph{subeqnarray} package. diff --git a/macros/latex/contrib/hyperref/xr-hyper.sty b/macros/latex/contrib/hyperref/xr-hyper.sty index b7871a4336..6235a941b2 100644 --- a/macros/latex/contrib/hyperref/xr-hyper.sty +++ b/macros/latex/contrib/hyperref/xr-hyper.sty @@ -16,18 +16,14 @@ %% which must be somewhere on TeX's input path. %% Some packages (eg hyperref) really need to know the location of the %% final document rather than the aux file. By default this is assumed -%% to be `document.dvi'. A package may redefine the command \XR@ext to -%% change this default extension (eg some of the hyperref backends -%% define this to be `document.pdf'). However sometimes the final +%% to be `document.pdf'. A package may redefine the command \XR@ext to +%% change this default extension. However sometimes the final %% document may be in a position unrelated to the aux file, or the %% browser may not be able to find files at an arbitrary point in %% TeX's input path, so the new final optional argument allows a full %% URL to the final document to be specified. %% -%% \externaldocument{file}[http://here.xxx.edu/this/path/to/file.dvi] -%% -%% Unless a package redefines \XR@addfile, the optional URL argument -%% will be ignored. +%% \externaldocument{file}[http://here.xxx.edu/this/path/to/file.pdf] %% %% Version beta2 also added another improvement unrelated %% to the hyperref support. Olivier Michel pointed out that @@ -61,7 +57,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{xr-hyper} - [2023-04-22 v7.00x eXternal References (DPC)] + [2023-05-16 v7.00y eXternal References (DPC)] \def\externaldocument{\@testopt\XR@cite{}} \let\externalcitedocument\externaldocument @@ -77,6 +73,7 @@ \else \let\XR@bibcite\bibcite \fi + \def\XR@useURL{}% \def\XR@URL{#4}% \filename@parse{#3}% \XR@next#3.aux\relax\\}} @@ -92,6 +89,19 @@ \long\def\@secondofthree#1#2#3{#2} \long\def\@thirdofthree #1#2#3{#3} +% 2023-05-13 we need to handle \newlabel's with two arguments differently +% to \newlabel's with five argument. For this we make use of +% XR@addURL: +\def\XR@addURL#1{\XR@@dURL#1{}{}{}{}\\} +\def\XR@@dURL#1#2#3#4#5\\{% + {#1}{#2}% + \if!#4!% + {#3}{#4}{}% new perhaps this could use \XR@URL too? + \else + {#3}{#4}{\XR@useURL}% + \fi + }% + \def\XR@explist{\expandafter\XR@next\XR@list\\} \def\XR@loop#1{% \openin\@inputcheck#1\relax @@ -100,18 +110,18 @@ \expandafter\XR@aux \else \PackageInfo{xr}{IMPORTING LABELS FROM #1}% + \let\XR@testnewlabel\XR@testnewlabel@aux \expandafter\XR@read\fi} \def\XR@read{% \read\@inputcheck to\XR@line \expandafter\XR@test\XR@line...\XR@} % 2019 update to match xr -% 2020 don't extend r@-arguments if hyperref has been detected in the source -% newlabel has already the right number of arguments -\def\XR@HYPcompargs{{}{}{}} \long\def\XR@test#1#2#3#4\XR@{% \let\XR@tempa\@gobblethree +% we set the file name only if the target has actually destinations. +% for this we test if hyperref has been used. \ifx#1\HyperFirstAtBeginDocument - \def\XR@HYPcompargs{}% + \let\XR@useURL\XR@URL \fi \ifx#1\newlabel \let\XR@tempa\@firstofthree @@ -121,32 +131,16 @@ \let\XR@tempa\@thirdofthree \fi\fi\fi \XR@tempa - {\expandafter\protected@xdef\csname r@\XR@prefix#2\endcsname{\XR@addURL{#3}\XR@HYPcompargs}}% + {% + \expandafter\protected@xdef\csname r@\XR@prefix#2\endcsname{\XR@addURL{#3}}% + }% {\expandafter\bibcite\expandafter{\XR@prefix#2}{#3}}% {\edef\XR@list{\XR@list\filename@area#2\relax}}% \ifeof\@inputcheck\expandafter\XR@aux \else\expandafter\XR@read\fi} -\providecommand*{\XR@addURL}[1]{#1} -% The above definition doesn't actually use the URL, hyperref 6 could -% make a definition like so to put the URL in the fifth field of its -% ref structure. - -\@ifpackageloaded{hyperref}{% - \PackageWarningNoLine{xr-hyper}{Load package `hyperref' after `xr-hyper'}% -}{} -%\def\XR@addURL#1{\XR@@dURL#1{}{}{}{}\\} - -%\def\XR@@dURL#1#2#3#4#5\\{% -% {#1}{#2}% -% \if!#4!% -% \else -% {#3}{#4}{\XR@URL}% -% \fi -%} - -\providecommand\XR@ext{dvi} +\providecommand\XR@ext{pdf} \endinput %% @@ -169,4 +163,8 @@ %% 2020-05-14 v7.00e %% add additional braces to \r@ only if hyperref is not detected in the aux %% of the source document (https://github.com/latex3/hyperref/issues/118) -%% +%% +%% 2023-05-15 v.7.00z +%% unified and simplified the brace handling: all defined references have now +%% five brace groups. Together with the planed change in LaTeX 2023-06-01 this +%% will improve the combination of hyperref/non-hyperref documents. diff --git a/macros/latex/contrib/msu-thesis/README.md b/macros/latex/contrib/msu-thesis/README.md index c5aeafbc16..27ad94a6f1 100644 --- a/macros/latex/contrib/msu-thesis/README.md +++ b/macros/latex/contrib/msu-thesis/README.md @@ -1,4 +1,4 @@ -# MSU Thesis Class Version 4.1 2023/05/18 +# MSU Thesis Class Version 4.1b 2023/05/25 Copyright 2011-2023 by Alan Munn diff --git a/macros/latex/contrib/msu-thesis/docs/msu-thesis.tex b/macros/latex/contrib/msu-thesis/docs/msu-thesis.tex index 48701cf2d8..cc84029d9b 100644 --- a/macros/latex/contrib/msu-thesis/docs/msu-thesis.tex +++ b/macros/latex/contrib/msu-thesis/docs/msu-thesis.tex @@ -2,8 +2,8 @@ \documentclass[11pt]{article} -\def\msuversion{4.1} -\def\msudate{2023/05/18} +\def\msuversion{4.1b} +\def\msudate{2023/05/25} \title{\textbf{Using the MSU Thesis Class}} \author{\textbf{Alan Munn}\\Department of Linguistics, Languages, and Cultures\\Michigan State University\\\texttt{\href{mailto:amunn@msu.edu}{amunn@msu.edu}}} \date{Version \msuversion\\\msudate} @@ -30,8 +30,7 @@ showstringspaces=false, breaklines=true, breakautoindent=true, - frame=single - captionpos=t + frame=tl, language=TeX } @@ -121,7 +120,8 @@ In addition to all the user functionality defined by \pkg{memoir}, the \pkg{msu- {\bs makededicationpage} & Creates the dedication page.\\ %{\bs makebibliographypage} & Creates the bibliography cover page.\\ {\{abbreviations\}} & Environment for the List of Abbreviations \\ -{msutocdeph} & Counter for setting the TOC depth. Default is 1 (sections+chapters). Set this to 0 to use the simplified (chapters only) format that the thesis office suggests but doesn’t require.\\ +{\bs abbrev\{\}\{\}} & add an abbreviation to the list of abbreviations\\ +{msutocdepth} & Counter for setting the TOC depth. Default is 1 (sections+chapters). Set this to 0 to use the simplified (chapters only) format that the thesis office suggests but doesn’t require.\\ \bottomrule \end{tabularx} \caption{Class titling commands} @@ -132,6 +132,7 @@ In addition to all the user functionality defined by \pkg{memoir}, the \pkg{msu- \begin{tabularx}{.8\textwidth}{>{\ttfamily}lX} \toprule {\bs msucaptiondelim} & Delimiter for floating elements (see section \ref{captiondelim}).\\ +{\bs msutocdelim} & Delimiter for table of contents chapter/section titles.\\ %{\bs setabstractnamespace} & Changes spacing after the name in the abstract (see section \ref{abstractspacing}).\\ \bottomrule \end{tabularx} @@ -199,7 +200,9 @@ The thesis guide suggests that you use a simplified table of contents that lists |\setcounter{msutocdepth}{0}| \end{quote} -\subsubsection{New lists} +\subsubsection{New lists and floats} +Note that the thesis office no longer seems to \emph{require} lists of anything other than the main table of contents. This is another odd decision on their part. If do include a List of Tables and List of Figures and need to add other lists, you can follow the directions here. Note that lists of algorithms require special treatment. See §\ref{algorithms}. + If you are using other kinds of floats such as listings, you should use the Memoir |\newlistof| command to make the relevant list. The class provides a macro |\msucaptiondelim| which can be used to make sure the formatting of the captions in the list-of-X match the setting you have for Figures and Tables. Here is an example of how you would add a listings list. For lists of algorithms, see section \ref{algorithms} below. The following code goes in your preamble: \begin{quote} \begin{lstlisting} @@ -443,7 +446,7 @@ current \pkg{hyperref} code. Thanks also to the following students who have rep problems over the years: Irina Agafonova, Ali Al-jiboory, Abubakr Ayesh, Julian Blank, Dmitriy Bryndin, Greg Christian, Kyle Crayne, Ciaron Hamilton, Matt Husband, Changkuk Jung, Claire Kopenhafer, Adam Liter, Vanessa Maldonado, Ben Miller, William Muir, Eureka -Pai, Alicia Parrish, Neil ver Planck, Nick Rekuski, Giacomo Romanini, William Sands, Adam +Pai, Alicia Parrish, Neil ver Planck, Taha Posos, Nick Rekuski, Giacomo Romanini, William Sands, Adam Soliman, Erik Stitt, Eremey Valetov, Matthew Vincent, Michael Wojcik, Stephen Yowono, Ali Zare, and Yisu Zhou. A special thank you to Non Thongprong who graciously provided a copy of his entire thesis which allowed me to debug some especially subtle spacing diff --git a/macros/latex/contrib/msu-thesis/msu-thesis.cls b/macros/latex/contrib/msu-thesis/msu-thesis.cls index 35dcb3c4f9..2b782988a3 100644 --- a/macros/latex/contrib/msu-thesis/msu-thesis.cls +++ b/macros/latex/contrib/msu-thesis/msu-thesis.cls @@ -180,12 +180,15 @@ % moment. % Version 4.0 2022/12/13 First version to conform to the updated requirements (September 2022) % Version 4.0b 2022/12/15 Made box for degree name larger -% Version 4.1 2023/05/18 Added msutocdepth to allow minimal chapters only TOC +% Version 4.1 2023/05/18 Added msutocdepth to allow minimal chapters only TOC +% Version 4.1b 2023/05/25 Removed stupid contents colon; fixed template file to actually +% reflect the current version of the class; reinstituted spacing +% after chapter titles. % % Report bugs/problems/questions to % -\def\msu@version{4.1} -\def\msu@date{2023/05/18} +\def\msu@version{4.1b} +\def\msu@date{2023/05/25} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{msu-thesis}[\msu@date\space Michigan State University Thesis Class version \msu@version] \newif\ifmsu@dissertation\msu@dissertationtrue % added v2.7 boolean for \msu@thesistype @@ -324,7 +327,7 @@ % set up the chapter titles \chapterstyle{thatcher} \setlength{\beforechapskip}{-1sp}% changed 2020/12/17 Need negative value to suppress indentation -\setlength{\afterchapskip}{0pt} % changed 2017/05/03 because of thesis office complaints; changed again for v4 since now they want "uniform" space +\setlength{\afterchapskip}{\onelineskip} % changed 2017/05/03 because of thesis office complaints; changed again for v4 since now they want "uniform" space % changed again 4.1 \renewcommand*{\chapnamefont}{\centering\bfseries} \renewcommand*{\chapnumfont}{\bfseries} \renewcommand*{\chaptitlefont}{\SingleSpacing\bfseries} @@ -644,7 +647,7 @@ % Make the caption delimiter a space instead of colon space so that the % contents lists don't look so stupid. Can be changed if necessary. \newcommand*\msucaptiondelim{\space} -\newcommand*\msutocdelim{:} +\newcommand*\msutocdelim{} % removed idiotic colon 5/25/23 \captiondelim{\msucaptiondelim} \pagestyle{plain} diff --git a/macros/latex/contrib/msu-thesis/msu-thesis.pdf b/macros/latex/contrib/msu-thesis/msu-thesis.pdf index 0e4d61d51c..a02826a93a 100644 Binary files a/macros/latex/contrib/msu-thesis/msu-thesis.pdf and b/macros/latex/contrib/msu-thesis/msu-thesis.pdf differ diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-chapterbib-testfile.pdf b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-chapterbib-testfile.pdf index 314819f5f8..c743e6786a 100644 Binary files a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-chapterbib-testfile.pdf and b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-chapterbib-testfile.pdf differ diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.pdf b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.pdf index 6a6d87acd1..304f9b7b0d 100644 Binary files a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.pdf and b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.pdf differ diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex index 5baa21732d..eb0b2e2b83 100644 --- a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex +++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex @@ -1,5 +1,5 @@ % This is a template for use with the MSU Thesis class -% Version 4.1 2023/05/18 +% Version 4.1b 2023/05/25 % % Class options: %[PhD] Doctor of Philosophy (default) @@ -108,18 +108,18 @@ Your acknowledgements here. %\clearpage %\listoffigures % comment this out if you have no figures % -% If you have a Key to Abbreviations/symbols you would add each abbreviation in its display order -% using as in the following examples: -\msuabbrev{ASU}{Arizona State University} -\msuabbrev{MIT}{Massachusetts Institute of Technology} -\msuabbrev{MSU}{Michigan State University} -% Then issue a \clearpage and print the list -\clearpage -\listofabbreviations -% Comment out the code above if you have no abbreviations -% See the documentation if you need to change the width or format of the abbreviation column - +% If you have a Key to Abbreviations/symbols you would add each abbreviation in its +% display order using as in the following examples: +\begin{abbreviations} +\abbrev{ASU}{Arizona State University} +\abbrev{MIT}{Massachusetts Institute of Technology} +\abbrev{MSU}{Michigan State University} +\end{abbreviations} +% Comment out the code above if you have no abbreviations. See the class documentation +% for information on how to change the formatting of the lists. % See the class documentation and the Memoir manual for how to create other lists +% Note that the thesis office no longer seems to require these lists at all, but +% you are still allowed to have them. % % If you are using an algorithm formatting package (e.g. algorithmicx or algorithm2e) % please read the class documentation carefully on how to use these packages with the class @@ -127,10 +127,6 @@ Your acknowledgements here. % \mainmatter % -% The next line removes the dots in chapter headings in the TOC -% May violate thesis office rules -%\addtocontents{toc}{\protect\renewcommand{\protect\cftchapterdotsep} {\cftnodots}} - % ALL documents using this class must have \chapter divisions % If you are using it for an MA/MS thesis you still need to have chapters, even if they are very small. diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.pdf b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.pdf index 28628d5403..effe1be1fe 100644 Binary files a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.pdf and b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.pdf differ diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.tex b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.tex index 68851f93cf..a6af9efbd8 100644 --- a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.tex +++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.tex @@ -1,5 +1,5 @@ % !TEX TS-program = pdflatexmk -% v3.0 Testfile +% v4.1b Testfile \listfiles \documentclass[lscape]{msu-thesis} @@ -28,10 +28,6 @@ \usepackage{enumitem} \usepackage[unit=in]{fgruler} \usepackage{gb4e} -\makeatletter -%\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} -\makeatother -\setlength{\cftchapternumwidth}{1.5em} \counterwithin{exx}{chapter} \singlegloss @@ -77,12 +73,11 @@ %\listoffigures \clearpage %\listoflistings -% Add all the abbreviations here in their sorted order using \msuabbrev +% Add all the abbreviations here in their sorted order using \abbrev \begin{abbreviations} \abbrev{ASA}{A small abbreviation} \abbrev{ABA}{An abbreviation with an explanation so long that the explanation should wrap to the next line and align properly with the previous line} \end{abbreviations} -% Then print the list \mainmatter % The next command changes chapters in the TOC to have no dotted leader %\addtocontents{toc}{\protect\renewcommand{\protect\cftchapterdotsep}{\cftnodots}} -- cgit v1.2.3