From 314f2cf58d8c42409e06e1c52de09b77d6e5fe09 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 8 Feb 2021 03:01:14 +0000 Subject: CTAN sync 202102080301 --- .../latex/contrib/easybook/doc/easybook-demo.pdf | Bin 300438 -> 297365 bytes .../latex/contrib/easybook/doc/easybook-demo.tex | 29 +- macros/latex/contrib/easybook/doc/easybook.pdf | Bin 224735 -> 225630 bytes macros/latex/contrib/easybook/doc/easybook.tex | 50 +- .../latex/contrib/easybook/doc/pages/appendix.tex | 6 +- .../latex/contrib/easybook/doc/pages/chapter1.tex | 35 +- .../latex/contrib/easybook/doc/pages/chapter2.tex | 25 +- .../latex/contrib/easybook/doc/pages/chapter3.tex | 40 +- macros/latex/contrib/easybook/easybook.cls | 123 +- macros/latex/contrib/hyperref/ChangeLog.txt | 12 + macros/latex/contrib/hyperref/README.md | 6 +- macros/latex/contrib/hyperref/backref.dtx | 4 +- macros/latex/contrib/hyperref/bmhydoc.sty | 6 +- macros/latex/contrib/hyperref/doc/backref.pdf | Bin 198724 -> 198815 bytes macros/latex/contrib/hyperref/doc/cmmi10-22.gif | Bin 917 -> 0 bytes macros/latex/contrib/hyperref/doc/cmsy10-21.gif | Bin 956 -> 0 bytes macros/latex/contrib/hyperref/doc/hyperref-doc.css | 296 + .../latex/contrib/hyperref/doc/hyperref-doc.html | 7455 +++++++++++++++++++ macros/latex/contrib/hyperref/doc/hyperref-doc.pdf | Bin 0 -> 296810 bytes macros/latex/contrib/hyperref/doc/hyperref-doc.tex | 3816 ++++++++++ .../latex/contrib/hyperref/doc/hyperref-doc2.html | 20 + .../latex/contrib/hyperref/doc/hyperref-doc3.html | 18 + .../latex/contrib/hyperref/doc/hyperref-doc4.html | 24 + .../latex/contrib/hyperref/doc/hyperref-doc5.html | 18 + .../latex/contrib/hyperref/doc/hyperref-doc6.html | 18 + .../latex/contrib/hyperref/doc/hyperref-doc7.html | 18 + macros/latex/contrib/hyperref/doc/hyperref.pdf | Bin 2414308 -> 2421160 bytes macros/latex/contrib/hyperref/doc/manual.css | 296 - macros/latex/contrib/hyperref/doc/manual.html | 7468 -------------------- macros/latex/contrib/hyperref/doc/manual.pdf | Bin 297131 -> 0 bytes macros/latex/contrib/hyperref/doc/manual.tex | 3396 --------- macros/latex/contrib/hyperref/doc/manual2.html | 20 - macros/latex/contrib/hyperref/doc/manual3.html | 18 - macros/latex/contrib/hyperref/doc/manual4.html | 24 - macros/latex/contrib/hyperref/doc/manual5.html | 18 - macros/latex/contrib/hyperref/doc/manual6.html | 18 - macros/latex/contrib/hyperref/doc/manual7.html | 18 - macros/latex/contrib/hyperref/doc/nameref.pdf | Bin 188982 -> 188802 bytes macros/latex/contrib/hyperref/fdl.tex | 422 -- macros/latex/contrib/hyperref/hluatex.dtx | 8 +- macros/latex/contrib/hyperref/hyperref.dtx | 20 +- macros/latex/contrib/hyperref/hyperref.ins | 2 +- macros/latex/contrib/hyperref/manifest.txt | 14 +- macros/latex/contrib/hyperref/minitoc-hyper.sty | 2 +- macros/latex/contrib/hyperref/nameref.dtx | 6 +- macros/latex/contrib/hyperref/ntheorem-hyper.sty | 927 +-- macros/latex/contrib/hyperref/xr-hyper.sty | 40 +- macros/latex/contrib/l3backend/CHANGELOG.md | 12 +- macros/latex/contrib/l3backend/README.md | 2 +- .../latex/contrib/l3backend/l3backend-basics.dtx | 14 +- macros/latex/contrib/l3backend/l3backend-box.dtx | 2 +- macros/latex/contrib/l3backend/l3backend-code.pdf | Bin 805273 -> 805972 bytes macros/latex/contrib/l3backend/l3backend-color.dtx | 2 +- macros/latex/contrib/l3backend/l3backend-draw.dtx | 2 +- .../latex/contrib/l3backend/l3backend-graphics.dtx | 2 +- .../latex/contrib/l3backend/l3backend-header.dtx | 2 +- .../latex/contrib/l3backend/l3backend-opacity.dtx | 2 +- macros/latex/contrib/l3backend/l3backend-pdf.dtx | 22 +- macros/latex/contrib/l3experimental/CHANGELOG.md | 12 +- macros/latex/contrib/l3experimental/README.md | 2 +- .../latex/contrib/l3experimental/l3benchmark.dtx | 4 +- .../latex/contrib/l3experimental/l3benchmark.pdf | Bin 313934 -> 314447 bytes macros/latex/contrib/l3experimental/l3bitset.dtx | 4 +- macros/latex/contrib/l3experimental/l3bitset.pdf | Bin 382047 -> 382530 bytes macros/latex/contrib/l3experimental/l3color.dtx | 4 +- macros/latex/contrib/l3experimental/l3color.pdf | Bin 368500 -> 369039 bytes .../latex/contrib/l3experimental/l3draw-boxes.dtx | 4 +- .../latex/contrib/l3experimental/l3draw-code.pdf | Bin 606502 -> 606904 bytes .../latex/contrib/l3experimental/l3draw-layers.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-paths.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-points.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-scopes.dtx | 2 +- .../contrib/l3experimental/l3draw-softpath.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-state.dtx | 2 +- .../contrib/l3experimental/l3draw-transforms.dtx | 2 +- macros/latex/contrib/l3experimental/l3draw.dtx | 4 +- macros/latex/contrib/l3experimental/l3draw.pdf | Bin 489498 -> 490075 bytes macros/latex/contrib/l3experimental/l3galley.dtx | 4 +- macros/latex/contrib/l3experimental/l3galley.pdf | Bin 385433 -> 386004 bytes macros/latex/contrib/l3experimental/l3graphics.dtx | 4 +- macros/latex/contrib/l3experimental/l3graphics.pdf | Bin 362791 -> 363302 bytes macros/latex/contrib/l3experimental/l3pdf-code.pdf | Bin 278649 -> 279001 bytes macros/latex/contrib/l3experimental/l3pdf.dtx | 4 +- macros/latex/contrib/l3experimental/l3pdf.pdf | Bin 376888 -> 377364 bytes .../latex/contrib/l3experimental/l3str-format.dtx | 4 +- .../latex/contrib/l3experimental/l3str-format.pdf | Bin 344581 -> 345158 bytes .../latex/contrib/l3experimental/l3sys-shell.dtx | 4 +- .../latex/contrib/l3experimental/l3sys-shell.pdf | Bin 311407 -> 311867 bytes macros/latex/contrib/l3experimental/xcoffins.dtx | 7 +- macros/latex/contrib/l3experimental/xcoffins.pdf | Bin 372577 -> 373136 bytes macros/latex/contrib/l3experimental/xgalley.dtx | 9 +- macros/latex/contrib/l3experimental/xgalley.pdf | Bin 285358 -> 285978 bytes macros/latex/contrib/l3kernel/CHANGELOG.md | 8 +- macros/latex/contrib/l3kernel/README.md | 2 +- macros/latex/contrib/l3kernel/expl3.dtx | 4 +- macros/latex/contrib/l3kernel/expl3.pdf | Bin 589868 -> 590739 bytes macros/latex/contrib/l3kernel/interface3.pdf | Bin 1573345 -> 1575865 bytes macros/latex/contrib/l3kernel/interface3.tex | 2 +- macros/latex/contrib/l3kernel/l3basics.dtx | 2 +- macros/latex/contrib/l3kernel/l3bootstrap.dtx | 2 +- macros/latex/contrib/l3kernel/l3box.dtx | 18 +- macros/latex/contrib/l3kernel/l3candidates.dtx | 10 +- macros/latex/contrib/l3kernel/l3cctab.dtx | 2 +- macros/latex/contrib/l3kernel/l3clist.dtx | 2 +- macros/latex/contrib/l3kernel/l3coffins.dtx | 18 +- macros/latex/contrib/l3kernel/l3color-base.dtx | 2 +- macros/latex/contrib/l3kernel/l3debug.dtx | 2 +- macros/latex/contrib/l3kernel/l3deprecation.dtx | 2 +- macros/latex/contrib/l3kernel/l3doc.dtx | 10 +- macros/latex/contrib/l3kernel/l3docstrip.dtx | 2 +- macros/latex/contrib/l3kernel/l3docstrip.pdf | Bin 262745 -> 263501 bytes macros/latex/contrib/l3kernel/l3expan.dtx | 2 +- macros/latex/contrib/l3kernel/l3file.dtx | 2 +- macros/latex/contrib/l3kernel/l3flag.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-assign.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-aux.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-basics.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-convert.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-expo.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-extended.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-logic.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-parse.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-random.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-round.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-traps.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-trig.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp.dtx | 2 +- macros/latex/contrib/l3kernel/l3fparray.dtx | 2 +- macros/latex/contrib/l3kernel/l3int.dtx | 2 +- macros/latex/contrib/l3kernel/l3intarray.dtx | 2 +- .../latex/contrib/l3kernel/l3kernel-functions.dtx | 9 +- macros/latex/contrib/l3kernel/l3keys.dtx | 2 +- macros/latex/contrib/l3kernel/l3legacy.dtx | 2 +- macros/latex/contrib/l3kernel/l3luatex.dtx | 2 +- macros/latex/contrib/l3kernel/l3msg.dtx | 2 +- macros/latex/contrib/l3kernel/l3names.dtx | 2 +- macros/latex/contrib/l3kernel/l3news.pdf | Bin 379428 -> 380237 bytes macros/latex/contrib/l3kernel/l3news01.pdf | Bin 113600 -> 113669 bytes macros/latex/contrib/l3kernel/l3news02.pdf | Bin 140873 -> 140944 bytes macros/latex/contrib/l3kernel/l3news03.pdf | Bin 138073 -> 138141 bytes macros/latex/contrib/l3kernel/l3news04.pdf | Bin 107122 -> 107188 bytes macros/latex/contrib/l3kernel/l3news05.pdf | Bin 105090 -> 105169 bytes macros/latex/contrib/l3kernel/l3news06.pdf | Bin 140913 -> 140971 bytes macros/latex/contrib/l3kernel/l3news07.pdf | Bin 119094 -> 119190 bytes macros/latex/contrib/l3kernel/l3news08.pdf | Bin 152504 -> 152604 bytes macros/latex/contrib/l3kernel/l3news09.pdf | Bin 235891 -> 236052 bytes macros/latex/contrib/l3kernel/l3news10.pdf | Bin 140388 -> 140521 bytes macros/latex/contrib/l3kernel/l3news11.pdf | Bin 159248 -> 159391 bytes macros/latex/contrib/l3kernel/l3news12.pdf | Bin 192502 -> 192710 bytes macros/latex/contrib/l3kernel/l3prefixes.pdf | Bin 75619 -> 75619 bytes macros/latex/contrib/l3kernel/l3prg.dtx | 2 +- macros/latex/contrib/l3kernel/l3prop.dtx | 2 +- macros/latex/contrib/l3kernel/l3quark.dtx | 2 +- macros/latex/contrib/l3kernel/l3regex.dtx | 2 +- macros/latex/contrib/l3kernel/l3seq.dtx | 2 +- macros/latex/contrib/l3kernel/l3skip.dtx | 2 +- macros/latex/contrib/l3kernel/l3sort.dtx | 2 +- macros/latex/contrib/l3kernel/l3str-convert.dtx | 2 +- macros/latex/contrib/l3kernel/l3str.dtx | 2 +- macros/latex/contrib/l3kernel/l3styleguide.pdf | Bin 279525 -> 280295 bytes macros/latex/contrib/l3kernel/l3styleguide.tex | 2 +- macros/latex/contrib/l3kernel/l3syntax-changes.pdf | Bin 227809 -> 228483 bytes macros/latex/contrib/l3kernel/l3syntax-changes.tex | 2 +- macros/latex/contrib/l3kernel/l3sys.dtx | 2 +- macros/latex/contrib/l3kernel/l3term-glossary.pdf | Bin 217177 -> 217942 bytes macros/latex/contrib/l3kernel/l3term-glossary.tex | 2 +- macros/latex/contrib/l3kernel/l3text-case.dtx | 2 +- macros/latex/contrib/l3kernel/l3text-purify.dtx | 2 +- macros/latex/contrib/l3kernel/l3text.dtx | 2 +- macros/latex/contrib/l3kernel/l3tl-analysis.dtx | 2 +- macros/latex/contrib/l3kernel/l3tl.dtx | 2 +- macros/latex/contrib/l3kernel/l3token.dtx | 2 +- macros/latex/contrib/l3kernel/l3unicode.dtx | 2 +- macros/latex/contrib/l3kernel/source3.pdf | Bin 5995035 -> 5998896 bytes macros/latex/contrib/l3kernel/source3.tex | 2 +- macros/latex/contrib/moodle/README.md | 6 +- macros/latex/contrib/moodle/moodle.dtx | 827 ++- macros/latex/contrib/moodle/moodle.pdf | Bin 241634 -> 260933 bytes macros/luatex/latex/innerscript/README.txt | 2 +- macros/luatex/latex/innerscript/innerscript.dtx | 531 +- macros/luatex/latex/innerscript/innerscript.pdf | Bin 168070 -> 123627 bytes 181 files changed, 12967 insertions(+), 13468 deletions(-) delete mode 100644 macros/latex/contrib/hyperref/doc/cmmi10-22.gif delete mode 100644 macros/latex/contrib/hyperref/doc/cmsy10-21.gif create mode 100644 macros/latex/contrib/hyperref/doc/hyperref-doc.css create mode 100644 macros/latex/contrib/hyperref/doc/hyperref-doc.html create mode 100644 macros/latex/contrib/hyperref/doc/hyperref-doc.pdf create mode 100644 macros/latex/contrib/hyperref/doc/hyperref-doc.tex create mode 100644 macros/latex/contrib/hyperref/doc/hyperref-doc2.html create mode 100644 macros/latex/contrib/hyperref/doc/hyperref-doc3.html create mode 100644 macros/latex/contrib/hyperref/doc/hyperref-doc4.html create mode 100644 macros/latex/contrib/hyperref/doc/hyperref-doc5.html create mode 100644 macros/latex/contrib/hyperref/doc/hyperref-doc6.html create mode 100644 macros/latex/contrib/hyperref/doc/hyperref-doc7.html delete mode 100644 macros/latex/contrib/hyperref/doc/manual.css delete mode 100644 macros/latex/contrib/hyperref/doc/manual.html delete mode 100644 macros/latex/contrib/hyperref/doc/manual.pdf delete mode 100644 macros/latex/contrib/hyperref/doc/manual.tex delete mode 100644 macros/latex/contrib/hyperref/doc/manual2.html delete mode 100644 macros/latex/contrib/hyperref/doc/manual3.html delete mode 100644 macros/latex/contrib/hyperref/doc/manual4.html delete mode 100644 macros/latex/contrib/hyperref/doc/manual5.html delete mode 100644 macros/latex/contrib/hyperref/doc/manual6.html delete mode 100644 macros/latex/contrib/hyperref/doc/manual7.html delete mode 100644 macros/latex/contrib/hyperref/fdl.tex (limited to 'macros') diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf index a30d93392e..5fb27f8d90 100644 Binary files a/macros/latex/contrib/easybook/doc/easybook-demo.pdf and b/macros/latex/contrib/easybook/doc/easybook-demo.pdf differ diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.tex b/macros/latex/contrib/easybook/doc/easybook-demo.tex index 3d9712293f..57801d4faf 100644 --- a/macros/latex/contrib/easybook/doc/easybook-demo.tex +++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex @@ -9,7 +9,7 @@ { style = { - color = forest, + color = seaside, % capdash = true, % multoc = true, % withpart = true, @@ -34,11 +34,11 @@ }, elfont = { - tabfont = \sffamily\small, - figfont = \sffamily\small, - lstfont = \sffamily\small, + tabfont = \sffamily\zihao{5}, + figfont = \sffamily\zihao{5}, + lstfont = \sffamily\zihao{5}, fnfont = \rmfamily, - marfont = \sffamily\footnotesize + marfont = \sffamily\zihao{-5} }, thmset = { @@ -57,9 +57,9 @@ }, hdrset = { - \fancyhead[EC]{\color{DarkViolet}\kaishu\leftmark} - \fancyhead[OC]{\color{DarkViolet}\kaishu\rightmark} - \fancyhead[EL,OR]{\color{DarkViolet}\thepage} + \easyhead[EC]{\color{DarkViolet}\kaishu\leftmark} + \easyhead[OC]{\color{DarkViolet}\kaishu\rightmark} + \easyhead[EL,OR]{\color{DarkViolet}\thepage} }, tocset = { @@ -93,10 +93,9 @@ 瞿毅\thanks{texeasybook@foxmail.com.} \\ \git~\url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。} \\ \github~\url{https://github.com/texl3/easybook} \\ - \edge~\url{https://latexstudio.net} \\ - \url{https://ctan.org/pkg/easybook} + \edge~\url{https://latexstudio.net} } - \date{2021/02/02\hskip\ccwd\relax v1.23} + \date{2021/02/08\hskip\ccwd\relax v1.23a} } \begin{document} @@ -106,10 +105,10 @@ \mainmatter \part{使用示例} -\subfile{pages/chapter1} -\subfile{pages/chapter2} -\subfile{pages/chapter3} -\subfile{pages/appendix} +\include{pages/chapter1} +\include{pages/chapter2} +\include{pages/chapter3} +\include{pages/appendix} \backmatter \printbibliography diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf index 6dac946312..cea72f04f6 100644 Binary files a/macros/latex/contrib/easybook/doc/easybook.pdf and b/macros/latex/contrib/easybook/doc/easybook.pdf differ diff --git a/macros/latex/contrib/easybook/doc/easybook.tex b/macros/latex/contrib/easybook/doc/easybook.tex index d2a9be0bdf..4cd23121b7 100644 --- a/macros/latex/contrib/easybook/doc/easybook.tex +++ b/macros/latex/contrib/easybook/doc/easybook.tex @@ -1,13 +1,9 @@ \documentclass{ctxdoc} -\hypersetup - { - linkcolor = blue, - urlcolor = blue - } +\hypersetup{linkcolor = blue,urlcolor = blue} \title{\sffamily easybook书籍文档类} \author{瞿毅} -\date{2021/02/02\hskip\ccwd\relax v1.23\thanks{\url{https://gitee.com/texl3/easybook}}} +\date{2021/02/08\hskip\ccwd\relax v1.23a\thanks{\url{https://gitee.com/texl3/easybook}}} \begin{document} \maketitle @@ -19,7 +15,7 @@ \tableofcontents \section{编译方式} -模板含有一个使用示例文件,编译前建议满足以下的条件 +模板含有一个使用示例文件 \opt{easybook-demo.tex},编译前建议满足以下的条件 \begin{itemize} \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。 \item 参考文献支持用 \hologo{BibTeX}(默认)或 \hologo{biber} 后端处理。 @@ -40,7 +36,8 @@ LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. \end{frameverb} -\subsection{字体设置}\label{font settings} +\subsection{字体设置} +\label{font settings} 默认使用\CTeX 预置中文字库,当开启 \opt{font = noto} 选项时需要安装开源字体,中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体使用 \pkg{notomath}。相关选项可以见小节 \ref{document class options} 中的 \opt{font} 选项,字体点击此处下载\href{https://wws.lanzous.com/b01ns361i}{下载地址}。 如果您不想使用\CTeX 默认字体和方正、思源字体,\textbf{自定义字体}需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。 @@ -50,7 +47,8 @@ \setCJKmonofont{FangSong} \end{ctexexam} -\section{文档类选项}\label{document class options} +\section{文档类选项} +\label{document class options} 标准 \cls{book} 文类与 \cls{ctexbook} 文类的选项同样适用于本文档。除此之外选项分为两类 \begin{itemize} \item 带有 \rexptarget\rexpstar{} 号的选项,需要在引入文档类的时候设定。 @@ -111,9 +109,9 @@ \end{function} \subsection{风格} -\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-02]{style/color,style/capdash,style/multoc,style/withpart,style/perpart,style/perpage,style/notomath} +\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-08]{style/color,style/capdash,style/multoc,style/withpart,style/perpart,style/perpage,style/notomath} \begin{syntax} - color = <(none)|forest|energy|cyberpunk> + color = <(none)|seaside|energy|cyberpunk> capdash = multoc = withpart = @@ -143,7 +141,8 @@ \item[notomath] 使用 \opt{noto} 风格的数学字体,将会加载 \pkg{newtxmath} 宏包。 \end{optdesc} -\subsection{超链接}\label{hyperlinks} +\subsection{超链接} +\label{hyperlinks} \begin{function}[EXP,added = 2021-01-05,updated = 2021-01-08]{link/hyperlink,link/linkcolor,link/linktopage} \begin{syntax} hyperlink = <(edge)|various|none> @@ -189,7 +188,7 @@ \end{optdesc} \subsection{其它字体} -\begin{function}[EXP,added = 2021-01-08]{elfont/tabfont,elfont/figfont,elfont/lstfont,elfont/fnfont,elfont/marfont} +\begin{function}[EXP,added = 2021-01-08,updated = 2021-02-08]{elfont/tabfont,elfont/figfont,elfont/lstfont,elfont/fnfont,elfont/marfont} \begin{syntax} tabfont = <\tn{sffamily}\tn{small}> figfont = <\tn{sffamily}\tn{small}> @@ -198,6 +197,7 @@ marfont = <\tn{rmfamily}\tn{footnotesize}> \end{syntax} \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。} +\changes{v1.23a}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。} \end{function} \begin{optdesc} @@ -291,23 +291,23 @@ \end{function} \subsection{页眉页脚} -\begin{function}[EXP,added = 2021-01-13,updated = 2021-01-15]{hdrset,\fancyhead,\fancyfoot,...} +\begin{function}[EXP,added = 2021-01-13,updated = 2021-02-08]{hdrset,\easyhead,\easyfoot,...} \begin{syntax} hdrset = <载入 \opt{fancyhdr} 的设置> - \tn{fancyhead}\oarg{位置}\marg{内容} - \tn{fancyfoot}\oarg{位置}\marg{内容} + \tn{easyhead}\oarg{位置}\marg{内容} + \tn{easyfoot}\oarg{位置}\marg{内容} \end{syntax} \changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。} \changes{v1.21c}{2021/01/13}{增加配置页眉页脚的选项。} -\opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。 +\opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,命令 \tn{easyhead} 和 \tn{easyfoot} 的含义与 \tn{fancyhead} 和 \tn{fancyfoot} 相同,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。 \begin{ctexexam} \ctexset { hdrset = { - \fancyhead[ER]{\leftmark} - \fancyhead[OL]{\rightmark} - \fancyhead[EL,OR]{\textbf{\thepage}} + \easyhead[ER]{\leftmark} + \easyhead[OL]{\rightmark} + \easyhead[EL,OR]{\textbf{\thepage}} } } \end{ctexexam} @@ -365,7 +365,7 @@ \tn{item} <列表内容> \tn{end}\marg{环境名} \end{syntax} -\pkg{enumitem} 宏包为系统自带的列表环境提供了更灵活的标签以及间距的控制。已设置默认格式,若自定义标签可例如 +\pkg{enumitem} 宏包为系统自带的列表环境提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已设置默认格式,若自定义标签可例如 \begin{ctexexam} \begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume] \begin{itemize}[label = \textbullet] @@ -373,7 +373,8 @@ \end{ctexexam} \end{function} -\subsubsection{排序列表}\label{sort list} +\subsubsection{排序列表} +\label{sort list} 使用 \opt{enumerate} 环境可创建排序列表,使用 \opt{enumerate*} 环境产生行内部列表,可以使用\textbf{A、a、I、i和1}作为可选项为 \opt{enumerate} 与 \opt{enumerate*} 格式化标签。若生成\textbf{Item I、Item II、Item III}格式可以这样 \begin{ctexexam} \begin{enumerate*}[(a)] @@ -409,12 +410,13 @@ \end{function} \subsection{习题} -\begin{function}[added = 2021-01-05]{exercise} +\begin{function}[added = 2021-01-05,updated = 2021-02-08]{exercise} \begin{syntax} \tn{begin}\marg{exercise}\oarg{颜色名}\oarg{编号}\oarg{标题} \tn{item} <习题内容> \tn{end}\marg{exercise} \end{syntax} +\changes{v1.23a}{2021/02/08}{增加准确的习题盒子标题目录锚点。} 习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称(深色),正文编号格式与小节 \ref{sort list} 排序列表相同,标题名默认为摘要,参数只能\textbf{从右往左}省略。 \begin{ctexexam} \begin{exercise}[black][1.][习题] @@ -478,7 +480,7 @@ <行间代码> \tn{end}\marg{lstlisting} \end{syntax} -使用 \pkg{listings} 宏包可以对代码格式进行高度定制,\tn{listoflistings} 命令用于输出代码目录。 +加载了 \pkg{listings} 宏包以对代码格式进行高度定制,代码样式可使用 \tn{lstset} 命令设置,\tn{listoflistings} 命令用于输出代码目录。 \end{function} \subsection{物理量} diff --git a/macros/latex/contrib/easybook/doc/pages/appendix.tex b/macros/latex/contrib/easybook/doc/pages/appendix.tex index f5981487b1..e05362d02d 100644 --- a/macros/latex/contrib/easybook/doc/pages/appendix.tex +++ b/macros/latex/contrib/easybook/doc/pages/appendix.tex @@ -1,11 +1,7 @@ % 附录 -\documentclass[../easybook-demo]{subfiles} -\begin{document} \appendix \chapter{维基百科} \section{阿司匹林} -\zhlipsum[50-52][name = aspirin] - -\end{document} \ No newline at end of file +\zhlipsum[50-52][name = aspirin] \ No newline at end of file diff --git a/macros/latex/contrib/easybook/doc/pages/chapter1.tex b/macros/latex/contrib/easybook/doc/pages/chapter1.tex index 80157ecaac..28df558200 100644 --- a/macros/latex/contrib/easybook/doc/pages/chapter1.tex +++ b/macros/latex/contrib/easybook/doc/pages/chapter1.tex @@ -1,10 +1,9 @@ % Chapter 1 -\documentclass[../easybook-demo]{subfiles} -\begin{document} \chapter{常用环境} -\section{公式}\index{g@公式} +\section{公式} +\index{g@公式} \zhlipsum*[42][name = aspirin] \begin{equation}\label{eq:matrix} \bm{A} = \left[ @@ -44,7 +43,8 @@ \vfill{\small\doclicenseThis} \clearpage -\section{插图}\index{c@插图} +\section{插图} +\index{c@插图} 当我们需要排列一组子图共享标题的图片时,可以使用依赖于 \lstinline{caption} 宏包的 \lstinline{subcaption} 宏包的功能,效果见\cref{fig:example}。 \begin{figure}[htbp] \centering @@ -56,7 +56,8 @@ \bicaption[使用subcaption排版子图]{使用subcaption宏包的subcaptionbox命令排版子图}[Use subcaption to typeset subgraphs]{Use the subcaptionbox command of the subcaption package to typeset sub-pictures}\label{fig:example} \end{figure} -\section{表格}\index{b@表格} +\section{表格} +\index{b@表格} 合并表格列使用 \lstinline{\multicolumn} 命令,合并行使用 \lstinline{\multirowcell} 命令。当插入的表格内容过长以至于一行放不下的情况可以使用 \lstinline{tabularx} 环境,设置了\textsf{L、C和R}三个列对齐选项,一个例子如\cref{tab:example} 所示。 \begin{table}[htbp] \centering @@ -74,31 +75,33 @@ \end{table} \clearpage -\section{列表}\index{l@列表} -\zhlipsum*[10][name = aspirin] +\section{列表} +\index{l@列表} +\zhlipsum*[42][name = aspirin] -\subsection{排序列表}\label{subsec1}\index{l@列表!p@排序列表} +\subsection{排序列表} +\index{l@列表!p@排序列表} \begin{enumerate} - \item \zhlipsum*[41][name = aspirin] + \item \zhlipsum*[42][name = aspirin] \begin{enumerate} \item \zhlipsum*[42][name = aspirin] \end{enumerate} - \item \zhlipsum*[41][name = aspirin] + \item \zhlipsum*[42][name = aspirin] \end{enumerate} -\subsection{常规列表}\index{l@列表!c@常规列表} +\subsection{常规列表} +\index{l@列表!c@常规列表} \begin{itemize} \item \zhlipsum[41-42][name = aspirin] \begin{itemize} \item \zhlipsum*[42][name = aspirin] \end{itemize} - \item \zhlipsum*[41][name = aspirin] + \item \zhlipsum*[42][name = aspirin] \end{itemize} -\subsection{主题列表}\index{l@列表!z@主题列表} +\subsection{主题列表} +\index{l@列表!z@主题列表} \begin{description} \item[主题一] \zhlipsum*[42][name = aspirin] \item[主题二] \zhlipsum*[42][name = aspirin] -\end{description} - -\end{document} \ No newline at end of file +\end{description} \ No newline at end of file diff --git a/macros/latex/contrib/easybook/doc/pages/chapter2.tex b/macros/latex/contrib/easybook/doc/pages/chapter2.tex index 49e9d1e824..bf2bbf7798 100644 --- a/macros/latex/contrib/easybook/doc/pages/chapter2.tex +++ b/macros/latex/contrib/easybook/doc/pages/chapter2.tex @@ -1,16 +1,18 @@ % Chapter 2 -\documentclass[../easybook-demo]{subfiles} -\begin{document} \chapter{定理盒子} -\begin{outline}\index{zhaiyao@摘要盒子} +\begin{outline} +\index{zhaiyao@摘要盒子} \item 这是一个摘要盒子。 \item 它的标题是可选参数,默认标题是摘要。 \end{outline} -\section{定理}\index{d@定理} -\begin{theorem}[(高斯公式\footnote{选自高等数学公式。})]\label{theorem:gauss formula}\index{d@定理!g@高斯公式} +\section{定理} +\index{d@定理} +\begin{theorem}[(高斯公式\footnote{选自高等数学公式。})] +\label{theorem:gauss formula} +\index{d@定理!g@高斯公式} 设空间闭区域$\Omega$是由分片光滑的闭曲面$\Sigma$围成,若函数$P(x,y,z)$,$Q(x,y,z)$,$R(x,y,z)$在$\Omega$上具有一节连续偏导数,则有 \begin{align} \iiint_\Omega\left(\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial R}{\partial x}\right)\mathrm{d}V & =\oiint_\Sigma P\mathrm{d}y\mathrm{d}z+Q\mathrm{d}z\mathrm{d}x+R\mathrm{d}x\mathrm{d}y @@ -20,7 +22,8 @@ 这里$\Sigma$是整个边界曲面$\Omega$的外侧,$\cos\alpha,\cos\beta,\cos\gamma$是$\Sigma$在点$(x,y,z)$处的法向量的方向余弦。引用这个公式如\cref{theorem:gauss formula}。 \end{theorem} -\begin{definition}[(Stokes formula)]\index{d@定理!s@Stokes formula} +\begin{definition}[(Stokes formula)] +\index{d@定理!s@Stokes formula} Let $\Gamma$ be a piecewise smooth directed closed curve, $\Sigma$ is a piecewise smooth directed surface bounded by $\Gamma$, the side of $\Gamma$ and the positive direction of $\Sigma$ According to the right-hand rule, if the function $P(x,y,z)$, $Q(x,y,z)$, $R(x,y,z)$ has a first-order continuous deviation on the curve $\Sigma$ Derivative, then \begin{multline} \iint_\Sigma\left(\frac{\partial R}{\partial y}-\frac{\partial Q}{\partial z}\right)\mathrm{d}y\mathrm{d}z+\left(\frac{\partial P}{\partial z}-\frac{\partial R}{\partial x}\right)\mathrm{d}z\mathrm{d}x+\left(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\right)\mathrm{d}x\mathrm{d}y @@ -55,14 +58,16 @@ The Stokes formula is an extension of the basic calculus formula in the case of 这是一个证明,末尾自动添加证明结束符。 \end{proof} -\begin{mybox}*[My title]\index{z@自定义盒子} +\begin{mybox}*[My title] +\index{z@自定义盒子} \zhlipsum*[3][name = aspirin] \tcblower \zhlipsum*[8][name = aspirin] \end{mybox} \zhlipsum*[3][name = aspirin] -\begin{exercise}[black][1.][习题]\index{x@习题环境} +\begin{exercise}[black][1.][习题] +\index{x@习题环境} \item 设$w = f(x+y+z,xyz)$,$f$具有二阶连续偏导数,求$\dfrac{{\partial w}}{{\partial x}}$和$\dfrac{{{\partial ^2}w}}{{\partial x\partial z}}$。 \item 已知$y = y(x)$在任意点$x$处的增量$\Delta y = \dfrac{y\Delta x}{1+x^2}+\alpha$,其中$\alpha$是$\Delta x$的高阶无穷小($\Delta x\to 0$时),$y(0) = \pi$,则$y(1) = \uline{\mbox{\hspace{2em}}}$。 \item 设函数$f(x)$在$(-\infty,+\infty)$上有定义,则下述命题中正确的是 \mbox{(\hspace{1.5em})} @@ -72,6 +77,4 @@ The Stokes formula is an extension of the basic calculus formula in the case of \task 若$f''(x_0) = 0$,则$(x_0,f(x_0))$是曲线$y = f(x)$的拐点坐标。 \task 若$f'(x_0) = 0$, $f''(x_0) = 0$,$f'''(x_0)\ne 0$,则$x_0$一定不是$f(x)$的极值点。 \end{tasks} -\end{exercise} - -\end{document} \ No newline at end of file +\end{exercise} \ No newline at end of file diff --git a/macros/latex/contrib/easybook/doc/pages/chapter3.tex b/macros/latex/contrib/easybook/doc/pages/chapter3.tex index 04fa95dc34..8670c10975 100644 --- a/macros/latex/contrib/easybook/doc/pages/chapter3.tex +++ b/macros/latex/contrib/easybook/doc/pages/chapter3.tex @@ -1,10 +1,10 @@ % Chapter 3 -\documentclass[../easybook-demo]{subfiles} -\begin{document} -\chapter{其它格式}\label{chap:other formats} +\chapter{其它格式} +\label{chap:other formats} -\section{代码}\index{d@代码} +\section{代码} +\index{d@代码} \zhlipsum[42][name = aspirin] \begin{lstlisting}[language = Python,caption = {python程序练习题}] #!/usr/bin/python @@ -18,10 +18,12 @@ if __name__ == '__main__': print ptr \end{lstlisting} -\section{物理量}\index{w@物理量} +\section{物理量} +\index{w@物理量} 阿司匹林还有三种作用方式 \num{-21x.3e5}。一是使线粒体的氧化磷酸化解偶联。阿司匹林会携带质子从线粒体膜间隙扩散进入线粒体基质,然后再次电离释放质子 \SI{.5}{mol}。 -\section{化学式}\index{h@化学式} +\section{化学式} +\index{h@化学式} 阿司匹林还有三种作用方式。一是使线粒体的氧化磷酸化解偶联。阿司匹林会携带质子从线粒体膜间隙扩散进入线粒体基质,然后再次电离释放质子\ch{(NH4)2S}、\ch{[Cu(NH3)4]^2+}。 \[\ch{$x$ Na(NH4)HPO4 ->[$\Delta$] (NaPO3)_{$x$} + $x$ NH3 ^ + $x$ H2O}\] 阿司匹林还有三种作用方式。 @@ -29,26 +31,28 @@ if __name__ == '__main__': HN-[::+60]CH_3)=-(-HO)=)}\] \clearpage -\section{引用}\index{y@引用} +\section{引用} +\index{y@引用} \zhlipsum[8][name = aspirin] -\subsection{索引}\index{y@引用!s@索引} +\subsection{索引} +\index{y@引用!s@索引} \zhlipsum[8][name = aspirin] -\subsection{脚注}\index{y@引用!j@脚注} +\subsection{脚注} +\index{y@引用!j@脚注} 六年之后的1859年,冯·基尔姆让水杨酸和乙酰氯反应,制得了分析纯的乙酰水杨酸,他称之为“乙酰化水杨酸”(acetylierte*Salicyls+"aure)\footnote{这是一个悬挂缩进的脚注。\par 这是分段将会缩进两字符。}。 60和70年代,约翰·范恩等人发现了阿司匹林的作用机理,60至80年代的其他研究和临床试验证明该药有抗凝血的药效,可降低血栓疾病的发病率\Footnote{*}{这是可以自定义标记的脚注。}。 -\subsection{边注}\index{y@引用!b@边注} -对乙酰氨基酚和布洛芬\marginnote{这是一个边注。}于1956年和1959年相继问世以后,阿司匹林的使用率开始下降。 - -\subsection{引用章节}\label{subsec:reference section}\index{y@引用!s@索引} +\subsection{引用章节} +\label{subsec:reference section} +\index{y@引用!s@索引} 兽医有时用阿司匹林来镇痛或抗血栓,主要给狗用\cref{chap:other formats},有时给马用\cref{subsec:reference section},不过现在一般会用副作用较少的新疗法。 -\subsection{参考文献}\index{y@引用!c@参考文献} +\subsection{参考文献} +\index{y@引用!c@参考文献} 这是一个参考文献引用的范例\cite{1979Prospect}。引用多个文献,将引用标号中的多个文献序号按升序排列,若其中有2个以上的连续序号,则改用范围序号,例如\cite{1979Prospect,1989The,2010An}。 -\section{行内盒子}\index{h@行内盒子} -对乙酰氨基酚和布洛芬 \concise[Aqua][fontupper = \rmfamily]{concise} 于1956年和1959年相继问世以后,阿司匹林 \fuzzy[DarkSeaGreen][fontupper = \ttfamily,colupper = black]{fuzzy} 的使用率开始下降。 - -\end{document} \ No newline at end of file +\section{行内盒子} +\index{h@行内盒子} +对乙酰氨基酚和布洛芬 \concise[Aqua][fontupper = \rmfamily]{concise} 于1956年和1959年相继问世以后,阿司匹林 \fuzzy[DarkSeaGreen][fontupper = \ttfamily,colupper = black]{fuzzy} 的使用率开始下降。 \ No newline at end of file diff --git a/macros/latex/contrib/easybook/easybook.cls b/macros/latex/contrib/easybook/easybook.cls index 3460278512..d0d8ae2c1e 100644 --- a/macros/latex/contrib/easybook/easybook.cls +++ b/macros/latex/contrib/easybook/easybook.cls @@ -9,7 +9,7 @@ %% https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e} \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/02/02}{1.23}{} +\ProvidesExplClass{easybook}{2021/02/08}{1.23a}{} \cs_generate_variant:Nn \keys_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} @@ -43,18 +43,12 @@ font .choice:, font .value_required:n = true, font/overleaf .code:n = {}, - font/adobe .code:n = - {\__put_ctexbook:n {fontset = #1}}, - font/founder .code:n = - {\__put_ctexbook:n {fontset = #1}}, - font/mac .code:n = - {\__put_ctexbook:n {fontset = #1}}, - font/windows .code:n = - {\__put_ctexbook:n {fontset = #1}}, - font/linux .code:n = - {\__put_ctexbook:n {fontset = ubuntu}}, - font/none .code:n = - {\__put_ctexbook:n {fontset = #1}}, + font/adobe .code:n = {\__put_ctexbook:n {fontset = #1}}, + font/founder .code:n = {\__put_ctexbook:n {fontset = #1}}, + font/mac .code:n = {\__put_ctexbook:n {fontset = #1}}, + font/windows .code:n = {\__put_ctexbook:n {fontset = #1}}, + font/linux .code:n = {\__put_ctexbook:n {fontset = ubuntu}}, + font/none .code:n = {\__put_ctexbook:n {fontset = #1}}, font/noto .code:n = { \bool_set_true:N \l__font_noto_bool @@ -64,16 +58,14 @@ paper .choice:, paper .value_required:n = true, - paper/unknown .code:n = - {\PassOptionsToPackage{#1}{geometry}}, + paper/unknown .code:n = {\PassOptionsToPackage{#1}{geometry}}, paper .initial:n = a4paper, - oneside .value_forbidden:n = true, - twoside .value_forbidden:n = true, - oneside .code:n = - {\bool_set_false:N \l__page_twoside_bool}, + oneside .value_forbidden:n = true, + twoside .value_forbidden:n = true, + oneside .code:n = {\bool_set_false:N \l__page_twoside_bool}, - unknown .code:n = + unknown .code:n = {\clist_gput_right:No \g__options_clist{\CurrentOption}} } @@ -150,8 +142,7 @@ \RequirePackage { xcolor, - pdfpages,subfiles, - footmisc, + pdfpages,footmisc, setspace,zhlineskip, amsthm,thmtools,cases, chemformula,chemfig,siunitx,ulem, @@ -183,8 +174,7 @@ \RequirePackage[noto,upint]{newtxmath} \RequirePackage{bm} } - \tl_if_empty:NF \g__config_tl - {\file_input:n {\g__config_tl}} + \tl_if_empty:NF \g__config_tl{\file_input:n {\g__config_tl}} } \sys_if_engine_xetex:TF @@ -316,15 +306,17 @@ \@mainmatterfalse \pagenumbering{Roman} } - +\cs_gset_eq:NN \easyhead\fancyhead +\cs_gset_eq:NN \easyfoot\fancyfoot +\cs_gset_eq:NN \easypagestyle\fancypagestyle \ctex_define:n { hdrset .tl_set:N = \l__fancyhf_content_tl, hdrset .initial:n = { - \fancyhead[EC]{\color{ctex@frame}\kaishu\leftmark} - \fancyhead[OC]{\color{ctex@frame}\kaishu\rightmark} - \fancyhead[EL,OR]{\color{ctex@frame}\thepage} + \easyhead[EC]{\color{ctex@frame}\kaishu\leftmark} + \easyhead[OC]{\color{ctex@frame}\kaishu\rightmark} + \easyhead[EL,OR]{\color{ctex@frame}\thepage} } } \ctex_at_end_preamble:n @@ -402,8 +394,8 @@ \bool_if:NT \l__draft_bool { \bool_if:NTF \l__page_twoside_bool - {\fancyfoot[C]{\color{gray!60}\sffamily\today}} - {\fancyhead[L]{\color{gray!60}\sffamily\today}} + {\easyfoot[C]{\color{gray!60}\sffamily\today}} + {\easyhead[L]{\color{gray!60}\sffamily\today}} \geometry{showframe} } } @@ -419,16 +411,14 @@ \__ctex_define:nn {tocset} { part/format .tl_set:N = \l__toc_part_format_tl, - part/format .initial:n = - {\addvspace{1pc}\sffamily\large}, + part/format .initial:n = \addvspace{1pc}\sffamily\large, part/indent .tl_set:N = \l__toc_part_indent_tl, part/indent .initial:n = 0\ccwd, part/rule .tl_set:N = \l__toc_part_rule_tl, part/rule .initial:n = \tocrule{}[\bfseries], chapter/format .tl_set:N = \l__toc_chap_format_tl, - chapter/format .initial:n = - {\addvspace{1pc}\sffamily\large}, + chapter/format .initial:n = \addvspace{1pc}\sffamily\large, chapter/indent .tl_set:N = \l__toc_chap_indent_tl, chapter/indent .initial:n = 0\ccwd, chapter/rule .tl_set:N = \l__toc_chap_rule_tl, @@ -662,30 +652,20 @@ format = hang, % figurewithin = section, % tablewithin = section, + font = {stretch = \l__cap_spread_tl}, + labelfont = {color = ctex@frame}, labelsep = ccwd, belowskip = 0pt,aboveskip = 10pt } -\captionsetup[table] - { - labelfont = {tabfont,color = ctex@frame}, - textfont = {tabfont,stretch = \l__cap_spread_tl} - } -\captionsetup[figure] - { - labelfont = {figfont,color = ctex@frame}, - textfont = {figfont,stretch = \l__cap_spread_tl} - } +\captionsetup[table]{font += tabfont} +\captionsetup[figure]{font += figfont} +\captionsetup[lstlisting]{singlelinecheck = false,font += lstfont} \captionsetup[subfigure] { labelformat = parens, + font += figfont, belowskip = 2pt,aboveskip = 6pt } -\captionsetup[lstlisting] - { - singlelinecheck = false, - labelfont = {lstfont,color = ctex@frame}, - textfont = {lstfont,stretch = \l__cap_spread_tl} - } \captionsetup[figure][bi-second]{name = Figure} \captionsetup[table][bi-second]{name = Table} \cs_new:Npn \__arabic:n #1{\int_to_arabic:v {c@#1}} @@ -770,11 +750,6 @@ \skip_set:Nn \plpartopsep{0ex} \skip_set:Nn \plitemsep{.75ex plus .1ex} \skip_set:Nn \plparsep{0ex} -\cs_new:Npn \circled#1 - { - \lower .7ex - \hbox{\tikz\draw(0pt,0pt)circle(.5\ccwd)node{\makebox[\ccwd][c]{\small#1}};} - } \cs_new_protected:Npn \__thmname_set:nn #1#2 {\tl_const:cn {c__name_#1_tl}{#2}} @@ -972,13 +947,6 @@ } \NewDocumentEnvironment{exercise}{sO{black}O{1.}O{\c__name_exercise_tl}} { - \IfBooleanF{#1} - { - \CTEX@ifnametrue - \refstepcounter{section} - \CTEX@addtocline{section}{#4} - \markright{\CTEXthesection\hspace{0.5\ccwd}#4} - } \begin{center} \bool_if:NTF \l__thmbox_bool { @@ -986,9 +954,25 @@ exsty, colback = #2!8!white,colframe = #2!50!black, drop~fuzzy~shadow = #2!50!white, + phantom = + \IfBooleanF{#1} + { + \CTEX@ifnametrue + \refstepcounter{section} + \markright{\CTEXthesection\hspace{0.5\ccwd}#4} + \CTEX@addtocline{section}{#4} + }, ]{\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#4} }{ - \sffamily\Large\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#4 + \sffamily\Large + \IfBooleanF{#1} + { + \CTEX@ifnametrue + \refstepcounter{section} + \markright{\CTEXthesection\hspace{0.5\ccwd}#4} + \CTEX@addtocline{section}{#4} + \CTEXthesection\hspace{0.5\ccwd} + }#4 } \end{center} \begin{compactenum}[#3] @@ -1148,8 +1132,10 @@ \lstdefinestyle{mystyle} { language = [LaTeX]TeX, - texcsstyle = *\lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi, - basicstyle = \ttfamily\lst@ifdisplaystyle\small\else\color{ctex@verb}\fi, + texcsstyle = + *\lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi, + basicstyle = + \ttfamily\lst@ifdisplaystyle\small\else\color{ctex@verb}\fi, framexleftmargin = 0pt, framexrightmargin = 0pt, xleftmargin = 0pt, @@ -1160,7 +1146,8 @@ commentstyle = \color{gray}, emphstyle = \color{ctex@emph}, emph = {caption,subcaption,tabularx}, - keywordstyle = \lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi, + keywordstyle = + \lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi, morekeywords = { includegraphics,setmainfont,setsansfont,setmonofont,setCJKmainfont,setCJKsansfont,setCJKmonofont,setCJKfamilyfont,RequirePackage @@ -1172,7 +1159,7 @@ breaklines = true, resetmargins = true, numbers = left, - numberstyle = \small, + numberstyle = \footnotesize, abovecaptionskip = -1ex, belowcaptionskip = 1ex, aboveskip = 1.5ex plus .2ex minus .1ex, @@ -1262,7 +1249,7 @@ \clist_map_function:nN { {none, 000000,000000,000000}, - {forest, 005752,004986,a40000}, + {seaside, 13abae,004986,a40000}, {energy, f39800,00a0e9,893895}, {cyberpunk, 005982,eb6877,a4005b} } diff --git a/macros/latex/contrib/hyperref/ChangeLog.txt b/macros/latex/contrib/hyperref/ChangeLog.txt index 6eeff73b71..b784bc129e 100644 --- a/macros/latex/contrib/hyperref/ChangeLog.txt +++ b/macros/latex/contrib/hyperref/ChangeLog.txt @@ -1,3 +1,15 @@ +2021-02-07 Ulrike Fischer/David Carlisle + * renamed the manual to hyperref-doc + * moved the license of the documentation into the file + * puenc.def defines cyrillic command, specially \C, only if + \CYRDZE has been defined previously + * puenc.def defines greek commands only if + \textBeta has been defined previously + * puenc.def defines hebrew command only if + \hebdalet has been defined previously + * ntheorem-hyper.sty made an obsolete stub + as ntheorem has been hyperref-compatible for some years. + 2021-02-04 Ulrike Fischer * corrected the definition of \begin/\end in \pdfstringdef * removed patches for russian, new version is on ctan diff --git a/macros/latex/contrib/hyperref/README.md b/macros/latex/contrib/hyperref/README.md index 828532e08e..fb1c2ac9fd 100644 --- a/macros/latex/contrib/hyperref/README.md +++ b/macros/latex/contrib/hyperref/README.md @@ -1,6 +1,6 @@ # README for hyperref bundle -Version 2021-02-04 v7.00g +Version 2021-02-07 v7.00h ## INTRODUCTION @@ -69,7 +69,7 @@ Example for TeXLive: The exception is `bmhydoc.sty`, it belongs to the source files (`TDS:source/latex/hyperref/`). 4. Copy the documentation files to "`TDS:doc/latex/hyperref/`": - manual.pdf, README.md, ChangeLog.txt, + hyperref-doc.pdf, README.md, ChangeLog.txt, slides.pdf, paper.pdf, hyperref.pdf, backref.pdf, nameref.pdf (Also the HTML version of the manual can be put there). 5. Update the databases if necessary, eg. for TeXLive: @@ -79,7 +79,7 @@ Example for TeXLive: * Sebastian Rahtz (died 2016) * Heiko Oberdiek (inactive) - * The LaTeX3 Project + * The LaTeX Project ## LICENSE diff --git a/macros/latex/contrib/hyperref/backref.dtx b/macros/latex/contrib/hyperref/backref.dtx index 2687a448de..3fe08479a5 100644 --- a/macros/latex/contrib/hyperref/backref.dtx +++ b/macros/latex/contrib/hyperref/backref.dtx @@ -3,7 +3,7 @@ %% Copyright (C) 1995-2000 David Carlisle, Sebastian Rahtz, Heiko Oberdiek %% 2001-2012 Heiko Oberdiek %% 2016-2019 Oberdiek Package Suport Group -%% 2019-2021 The LaTeX3 Project +%% 2019-2021 The LaTeX Project %% https://github.com/latex3/hyperref/issues %% %% This file is part of the `Hyperref Bundle'. @@ -19,7 +19,7 @@ %% %% This work has the LPPL maintenance status `maintained'. %% -%% The Current Maintainer of this work is The LaTeX3 Project. +%% The Current Maintainer of this work is The LaTeX Project. %% %% The list of all files belonging to the `Hyperref Bundle' is %% given in the file `manifest.txt'. diff --git a/macros/latex/contrib/hyperref/bmhydoc.sty b/macros/latex/contrib/hyperref/bmhydoc.sty index d25c4d6bf8..f41634002c 100644 --- a/macros/latex/contrib/hyperref/bmhydoc.sty +++ b/macros/latex/contrib/hyperref/bmhydoc.sty @@ -1,7 +1,7 @@ %% Copyright %% 1995-2015 Heiko Oberdiek %% 2016-2019 Oberdiek Package Support Group -%% 2019-2020 LaTeX3 Project +%% 2019-2020 LaTeX Project %% https://github.com/latex3/hyperref/issues %% %% This file is part of the `Hyperref Bundle'. @@ -49,7 +49,7 @@ }% } \AtEndDocument{% - \@bmhydoc[open=false]{0}{manual.pdf}{Hyperref manual} + \@bmhydoc[open=false]{0}{hyperref-doc.pdf}{Hyperref manual} \@bmhydoc{1}{slides.pdf}{Bookmark talk, slides} \@bmhydoc{2}{paper.pdf}{Bookmark talk, paper} \@bmhydoc{1}{hyperref.pdf}{Sources: hyperref.dtx} @@ -78,7 +78,7 @@ \ignorespaces }% \begin{description} - \entry{manual.pdf}{\textbf{Manual}} + \entry{hyperref-doc.pdf}{\textbf{Manual}} The \textbf{USER MANUAL} (also available as HTML). \entry{ChangeLog.txt}{ChangeLog} This file records the version history. diff --git a/macros/latex/contrib/hyperref/doc/backref.pdf b/macros/latex/contrib/hyperref/doc/backref.pdf index 0e0a9b0bef..f610fbc67d 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/cmmi10-22.gif b/macros/latex/contrib/hyperref/doc/cmmi10-22.gif deleted file mode 100644 index ab41b85ae2..0000000000 Binary files a/macros/latex/contrib/hyperref/doc/cmmi10-22.gif and /dev/null differ diff --git a/macros/latex/contrib/hyperref/doc/cmsy10-21.gif b/macros/latex/contrib/hyperref/doc/cmsy10-21.gif deleted file mode 100644 index dd190e44e9..0000000000 Binary files a/macros/latex/contrib/hyperref/doc/cmsy10-21.gif and /dev/null differ diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.css b/macros/latex/contrib/hyperref/doc/hyperref-doc.css new file mode 100644 index 0000000000..ea1c3e45c1 --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.css @@ -0,0 +1,296 @@ + +/* start css.sty */ +.ec-lmr-17{font-size:170%;} +.ec-lmss-17{font-size:170%; font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmss-17{ font-family: sans-serif;} +.ec-lmr-12{font-size:120%;} +.ec-lmvtt-10x-x-120{font-size:120%; font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmvtt-10{ font-family: monospace,monospace;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmss-10{ font-family: sans-serif;} +.ec-lmr-9{font-size:90%;} +.ec-lmr-8{font-size:80%;} +.ec-lmvtt-10x-x-80{font-size:80%; font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.ec-lmri-10{ font-style:italic;} +.lmsy7-{font-size:70%;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmbx-10{ font-weight: bold;} +.ec-lmss-8{font-size:80%; font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmss-8{ font-family: sans-serif;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtk-10{ font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} +p{margin-top:0;margin-bottom:0} +p.indent{text-indent:0;} +p + p{margin-top:1em;} +p + div, p + pre {margin-top:1em;} +div + p, pre + p {margin-top:1em;} +a { overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; hyphens: auto; } +@media print {div.crosslinks {visibility:hidden;}} +a img { border-top: 0; border-left: 0; border-right: 0; } +center { margin-top:1em; margin-bottom:1em; } +td center { margin-top:0em; margin-bottom:0em; } +.Canvas { position:relative; } +img.math{vertical-align:middle;} +div.par-math-display, div.math-display{text-align:center;} +li p.indent { text-indent: 0em } +li p:first-child{ margin-top:0em; } +li p:last-child, li div:last-child { margin-bottom:0.5em; } +li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; } +.enumerate1 {list-style-type:decimal;} +.enumerate2 {list-style-type:lower-alpha;} +.enumerate3 {list-style-type:lower-roman;} +.enumerate4 {list-style-type:upper-alpha;} +div.newtheorem { margin-bottom: 2em; margin-top: 2em;} +.obeylines-h,.obeylines-v {white-space: nowrap; } +div.obeylines-v p { margin-top:0; margin-bottom:0; } +.overline{ text-decoration:overline; } +.overline img{ border-top: 1px solid black; } +td.displaylines {text-align:center; white-space:nowrap;} +.centerline {text-align:center;} +.rightline {text-align:right;} +pre.verbatim {font-family: monospace,monospace; text-align:left; clear:both; } +.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.fbox {display:table} +div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.minipage{width:100%;} +div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} +div.center div {text-align: left;} +div.flushright, div.flushright div.flushright {text-align: right;} +div.flushright div {text-align: left;} +div.flushleft {text-align: left;} +.underline{ text-decoration:underline; } +.underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } +.framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +.framebox-c {text-align:center;} +.framebox-l {text-align:left;} +.framebox-r {text-align:right;} +span.thank-mark{ vertical-align: super } +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } +table.tabular td p{margin-top:0em;} +table.tabular {margin-left: auto; margin-right: auto;} +td p:first-child{ margin-top:0em; } +td p:last-child{ margin-bottom:0em; } +div.td00{ margin-left:0pt; margin-right:0pt; } +div.td01{ margin-left:0pt; margin-right:5pt; } +div.td10{ margin-left:5pt; margin-right:0pt; } +div.td11{ margin-left:5pt; margin-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +td.td00{ padding-left:0pt; padding-right:0pt; } +td.td01{ padding-left:0pt; padding-right:5pt; } +td.td10{ padding-left:5pt; padding-right:0pt; } +td.td11{ padding-left:5pt; padding-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +.hline hr, .cline hr{ height : 0px; margin:0px; } +.hline td, .cline td{ padding: 0; } +.hline hr, .cline hr{border:none;border-top:1px solid black;} +.tabbing-right {text-align:right;} +div.float, div.figure {margin-left: auto; margin-right: auto;} +div.float img {text-align:center;} +div.figure img {text-align:center;} +.marginpar,.reversemarginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} +.marginpar p,.reversemarginpar p{margin-top:0.4em; margin-bottom:0.4em;} +.reversemarginpar{float:left;} +table.equation {width:100%;} +.equation td{text-align:center; } +td.equation { margin-top:1em; margin-bottom:1em; } +td.equation-label { width:5%; text-align:center; } +td.eqnarray4 { width:5%; white-space: normal; } +td.eqnarray2 { width:5%; } +table.eqnarray-star, table.eqnarray {width:100%;} +div.eqnarray{text-align:center;} +div.array {text-align:center;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.pmatrix img{vertical-align:middle;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.bar-css {text-decoration:overline;} +img.cdots{vertical-align:middle;} +.partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} +.chapterToc a, .chapterToc, .likechapterToc a, .likechapterToc, .appendixToc a, .appendixToc {line-height: 200%; font-weight:bold;} +.index-item, .index-subitem, .index-subsubitem {display:block} +div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;} +div.caption span.id{font-weight: bold; white-space: nowrap; } +h1.partHead{text-align: center} +p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +.paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} +.subparagraphHead, .likesubparagraphHead { font-weight: bold;} +.verse{white-space:nowrap; margin-left:2em} +div.maketitle {text-align:center;} +h2.titleHead{text-align:center;} +div.maketitle{ margin-bottom: 2em; } +div.author, div.date {text-align:center;} +div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } +div.author{white-space: nowrap;} +div.abstract p {margin-left:5%; margin-right:5%;} +div.abstract {width:100%;} +.abstracttitle{text-align:center;margin-bottom:1em;} +div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } +table.tabular td p{margin-top:0em;} +table.tabular {margin-left: auto; margin-right: auto;} +td p:first-child{ margin-top:0em; } +td p:last-child{ margin-bottom:0em; } +div.td00{ margin-left:0pt; margin-right:0pt; } +div.td01{ margin-left:0pt; margin-right:5pt; } +div.td10{ margin-left:5pt; margin-right:0pt; } +div.td11{ margin-left:5pt; margin-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +td.td00{ padding-left:0pt; padding-right:0pt; } +td.td01{ padding-left:0pt; padding-right:5pt; } +td.td10{ padding-left:5pt; padding-right:0pt; } +td.td11{ padding-left:5pt; padding-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +.hline hr, .cline hr{ height : 0px; margin:0px; } +.hline td, .cline td{ padding: 0; } +.hline hr, .cline hr{border:none;border-top:1px solid black;} +div.array {text-align:center;} +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +div.longtable{text-align:center;} +table.longtable{margin-left:auto; margin-right: auto;} +span.HoLogo-LaTeX span.HoLogo-a{position:relative;top:-.5ex;margin-left:-.36em;margin-right:-.15em;font-size:85%;} +span.HoLogo-TeX span.HoLogo-e{position:relative;top:.5ex;margin-left:-.1667em;margin-right:-.125em;} +a span.HoLogo-TeX span.HoLogo-e{text-decoration:none;} +span.HoLogo-XeTeX span.HoLogo-TeX{margin-left:-.15em;} +span.HoLogo-Xe span.HoLogo-e{position:relative;top:.5ex;left-margin:-.1em;} +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 new file mode 100644 index 0000000000..7b4ce3d361 --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.html @@ -0,0 +1,7455 @@ + + +Hypertext marks in LATEX: a manual for hyperref + + + + + + + +
+ + + + + +

Hypertext marks in LATEX: a manual for hyperref

+
Sebastian Rahtz (deceased)
Heiko Oberdiek (inactive)
The LaTeX3 Project (https://github.com/latex3/hyperref/issues)

+
2021-02-07 v7.00h
+
+

Contents

+
+  1 Introduction +
 2 Implicit behavior +
 3 Package options +
  3.1 General options +
  3.2 Options for destination names +
  3.3 Configuration options +
  3.4 Backend drivers +
  3.5 Extension options +
  3.6 PDF-specific display options +
  3.7 PDF display and information options +
  3.8 Option pdfinfo +
  3.9 Big alphabetical list +
 4 Additional user macros +
  4.1 Bookmark macros +
  4.2 Pagelabels +
  4.3 Utility macros +
 5 New Features +
  5.1 Option ‘pdflinkmargin’ +
  5.2 Field option ‘calculatesortkey’ +
  5.3 Option ‘localanchorname’ +
  5.4 Option ‘customdriver’ +
  5.5 Option ‘psdextra’ +
  5.6 \XeTeXLinkBox +
  5.7 \IfHyperBooleanExists and \IfHyperBoolean +
  5.8 \unichar +
  5.9 \ifpdfstringunicode +
  5.10 Customizing index style file with \nohyperpage +
  5.11 Experimental option ‘ocgcolorlinks’ +
  5.12 Option ‘pdfa’ +
  5.13 Option ‘linktoc’ added +
  5.14 Option ‘pdfnewwindow’ changed + +
  5.15 Flag options for PDF forms +
  5.16 Option ‘pdfversion’ +
  5.17 Field option ‘name’ +
  5.18 Option ‘pdfencoding’ +
  5.19 Color options/package hycolor +
  5.20 Option pdfusetitle +
  5.21 Starred form of \autoref +
  5.22 Link border style +
  5.23 Option bookmarksdepth +
  5.24 Option pdfescapeform +
  5.25 Default driver setting +
  5.26 Backref entries +
  5.27 \phantomsection +
 6 Acrobat-specific behavior +
 7 PDF and HTML forms +
  7.1 Forms environment parameters +
  7.2 Forms optional parameters +
 8 Defining a new driver +
 9 Special support for other packages +
  9.1 Package Compatibility +
 10 Limitations +
  10.1 Wrapped/broken link support +
  10.2 Links across pages +
  10.3 Footnotes +
 11 Hints +
  11.1 Spaces in option values +
  11.2 Index with makeindex +
  11.3 Warning "bookmark level for unknown <foobar> defaults to 0" +
  11.4 Link anchors in figures +
  11.5 Additional unicode characters in bookmarks and pdf information entries: +
  11.6 Footnotes +
  11.7 Subordinate counters +
 12 History and acknowledgments +
 13 GNU Free Documentation License +
  13.1 Applicability and definitions +
  13.2 Verbatim copying +
  13.3 Copying in quantity +
  13.4 Modifications +
  13.5 Combining documents +
  13.6 Collections of documents +
  13.7 Aggregation with independent works +
  13.8 Translation +
  13.9 Termination +
  13.10 Future revisions of this license +
+ + +

+

1 Introduction

+

The package derives from, and builds on, the work of the HyperTEX project, described at +http://xxx.lanl.gov/hypertex/1 . +It extends the functionality of all the LATEX cross-referencing commands (including the table of +contents, bibliographies etc) to produce \special commands which a driver can turn into hypertext links; +it also provides new commands to allow the user to write ad hoc hypertext links, including those to +external documents and URLs. +

The package is currently maintained at https://github.com/latex3/hyperref/ and issues should be +reported there. +

This manual provides a brief overview of the hyperref package. For more details, you should read the +additional documentation distributed with the package, as well as the complete documentation by +processing hyperref.dtx. You should also read the chapter on hyperref in The LATEX Web Companion, +where you will find additional examples. +

The HyperTEX specification2 +says that conformant viewers/translators must recognize the following set of \special constructs: +

+href:
html:<a href = "href_string"> +
+name:
html:<a name = "name_string"> +
+end:
html:</a> +
+image:
html:<img src = "href_string"> +
+base_name:
html:<base href = "href_string">
+

The href, name and end commands are used to do the basic hypertext operations of establishing links +between sections of documents. The image command is intended (as with current HTML +viewers) to place an image of arbitrary graphical format on the page in the current location. +The base_name command is be used to communicate to the DVI viewer the full (URL) +location of the current document so that files specified by relative URLs may be retrieved +correctly. +

The href and name commands must be paired with an end command later in the TeX file—the +TeX commands between the two ends of a pair form an anchor in the document. In the case of an href +command, the anchor is to be highlighted in the DVI viewer, and when clicked on will cause the scene to +shift to the destination specified by href_string. The anchor associated with a name command represents +a possible location to which other hypertext links may refer, either as local references (of +the form href="#name_string" with the name_string identical to the one in the name +command) or as part of a URL (of the form URL#name_string). Here href_string is a valid URL +or local identifier, while name_string could be any string at all: the only caveat is that ‘"’ +characters should be escaped with a backslash (\), and if it looks like a URL name it may cause +problems. + + +

However, the drivers intended to produce only PDF use literal PostScript or PDF \special +commands. The commands are defined in configuration files for different drivers, selected by package +options; at present, the following drivers are supported: +

+hypertex
DVI processors conforming to the HyperTeX guidelines (i.e. xdvi, dvips (with the -z + option), OzTeX, and Textures) +
+dvips
produces \special commands tailored for dvips +
+dvipsone
produces \special commands tailored for dvipsone +
+ps2pdf
a special case of output suitable for processing by earlier versions of Ghostscript’s PDF + writer; this is basically the same as that for dvips, but a few variations remained before + version 5.21 +
+tex4ht
produces \special commands for use with TeX4ht +
+pdftex
pdfTeX, Hn Th Thnh’s TeX variant that writes PDF directly +
+luatex
luaTeX, Unicode TeX variant that writes PDF directly +
+dvipdfm
produces \special commands for Mark Wicks’ DVI to PDF driver dvipdfm +
+dvipdfmx
produces \special commands for driver dvipdfmx, a successor of dvipdfm +
+dviwindo
produces \special commands that Y&Y’s Windows previewer interprets as hypertext + jumps within the previewer +
+vtex
produces \special commands that MicroPress’ HTML and PDF-producing TeX variants + interpret as hypertext jumps within the previewer +
+textures
produces \special commands that Textures interprets as hypertext jumps within the + previewer +
+xetex
produces \special commands for XeTeX
+

Output from dvips or dvipsone must be processed using Acrobat Distiller to obtain a PDF +file.3 +The result is generally preferable to that produced by using the hypertex driver, and then +processing with dvips -z, but the DVI file is not portable. The main advantage of using the +HyperTeX \special commands is that you can also use the document in hypertext DVI viewers, such as +xdvi. + +

+driverfallback
If a driver is not given and cannot be autodetected, then use the driver option, given as + value to this option driverfallback. Example: +
+

driverfallback=dvipdfm

+

Autodetected drivers (pdftex, xetex, vtex, vtexpdfmark) are recognized from within TeX and + therefore cannot be given as value to option driverfallback. However a DVI driver program is run + after the TeX run is finished. Thus it cannot be detected at TeX macro level. Then package + hyperref uses the driver, given by driverfallback. If the driver is already specified or can be + autodetected, then option driverfallback is ignored.

+

2 Implicit behavior

+

This package can be used with more or less any normal LaTeX document by specifying in the document +preamble + + +

+\usepackage{hyperref}
+
+

+

Make sure it comes last of your loaded packages, to give it a fighting chance of not being over-written, +since its job is to redefine many LaTeX commands. Hopefully you will find that all cross-references work +correctly as hypertext. For example, \section commands will produce a bookmark and a link, whereas +\section* commands will only show links when paired with a corresponding \addcontentsline +command. +

In addition, the hyperindex option (see below) attempts to make items in the index by hyperlinked +back to the text, and the option backref inserts extra ‘back’ links into the bibliography for each entry. +Other options control the appearance of links, and give extra control over PDF output. For example, +colorlinks, as its name well implies, colors the links instead of using boxes; this is the option used in this +document. +

+

3 Package options

+

All user-configurable aspects of hyperref are set using a single ‘key=value’ scheme (using the keyval +package) with the key Hyp. The options can be set either in the optional argument to the +\usepackage command, or using the \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 unicode) can only be used as package options, and not +in \hypersetup as the option settings are processed as the package is read. +

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

    +
  • a site-wide hyperref.cfg setting up the look of links, adding backreferencing, and setting a + PDF display default: + + +
    +     \hypersetup{backref,
    +     pdfpagemode=FullScreen,
    +     colorlinks=true}
    +
    +

    +

  • +
  • A global option in the file, which is passed down to hyperref: + + +
    +     \documentclass[dvips]{article}
    +
    +

    +

  • +
  • File-specific options in the \usepackage commands, which override the ones set in + 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 +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}
+
+

+

Package ‘kvoptions-patch’ patches LaTeX to make it aware of key value options and to prevent +premature value expansions. +

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 +true if used. These are the ones classed as ‘boolean’. The values true and false can always be specified, +however. +

+

3.1 General options

+

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

+ + + + + + + + + + + +
draft boolean false all hypertext options are turned off
final boolean true all hypertext options are turned on
debug boolean false extra diagnostic messages are printed in
the log file
verbose boolean false same as debug
implicit boolean true redefines LaTeX internals
setpagesize boolean true sets page size by special driver commands
+

+

3.2 Options for destination names

+

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 \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: +

+\autoref
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 (pageanchor) must not + be turned off.
+

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 +number. Therefore hyperref has introduced \theH<counter> that allows a unique counter value without +messing up with the appearance of the counter number. For example, the number of the +second table in the third chapter might be printed as 2, the result of \thetable. But the +destination name 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 \theH<counter>. Defaults for standard cases (chapter, …) are +provided. And after hyperref is loaded, new counters with parent counters also define \theH<counter> +automatically, if \newcounter, \@addtoreset or \numberwithin of package amsmath are +used. +

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 +the counter value. In case of page anchors the absolute page anchor is used. With option 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 \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, +because both documents might contain chapter.1 or page.1. Also hyperref sets anchor with name +Doc-Start at the begin of the document. This can be resolved by redefining \HyperDestNameFilter. +Package hyperref calls this macro each time, it uses a destination name. The macro must be expandable +and expects the destination name as only argument. As example, the macro is redefined to add a prefix +to all destination names: +

+ + +
+\renewcommand*{\HyperDestNameFilter}[1]{\jobname-#1}
+
+

+

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 +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 +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 +approximation: +

+ + +
+  \section{Introduction}
+  \label{intro}
+
+

+

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 +anchor setting, the new name is recorded in the .aux file and used in the subsequent LATEX +run. The renaming is done by a redefinition of \HyperDestNameFilter. That leaves the old +destination names intact (e.g., they are needed for \autoref). This redefinition is also available as +\HyperDestLabelReplace, thus that an own redefinition can use it. The following example also adds a +prefix for all destination names: +

+ + +
+\renewcommand*{\HyperDestNameFilter}[1]{%
+  \jobname-\HyperDestLabelReplace{#1}%
+}
+
+

+

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 +expandable string test (\pdfstrcmp of pdfTEX or \strcmp of XƎTEX, package pdftexcmds also supports +LuaTEX): +

+ + +
+\usepackage{pdftexcmds}
+\makeatletter
+\renewcommand*{\HyperDestNameFilter}[1]{%
+  \ifcase\pdf@strcmp{#1}{\HyperDestLabelReplace{#1}} %
+    \jobname-#1%
+  \else
+    \HyperDestLabelReplace{#1}%
+  \fi
+}
+\makeatother
+
+

+

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

+

\HyperDestRename{destination}{newname}

+

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

+ + + + + + + + + + + +
destlabel boolean false destinations are named by first \label
after anchor creation
hypertexnames boolean true use guessable names for links
naturalnames boolean false use LaTeX-computed names for links
plainpages boolean false Forces page anchors to be named by the Arabic form
of the page number, rather than the formatted form.
+

+

3.3 Configuration options

+
+ + + + + + + + + + +
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 \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 + 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, \printindex will + not contain valid hyperlinks.

nesting boolean false +

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

+

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. +

+

3.4 Backend drivers

+

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, + VTeX). +
  2. +
  3. Option driverfallback. If this option is set, its value is taken as driver option. +
  4. +
  5. Macro \Hy@defaultdriver. The macro takes a driver file name (without file extension). +
  6. +
  7. Package default is hypertex.
+

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

+ + + + + + + + + + + + + + + + + + + + + + + + +
driverfallback +

Its value is used as driver option

+

if the driver is not given or autodetected.

dvipdfm +

Sets up hyperref for use with the dvipdfm driver.

dvipdfmx +

Sets up hyperref for use with the dvipdfmx driver.

dvips +

Sets up hyperref for use with the dvips driver.

dvipsone +

Sets up hyperref for use with the dvipsone driver.

dviwindo +

Sets up hyperref for use with the dviwindo Windows previewer.

hypertex +

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

latex2html +

Redefines a few macros for compatibility with latex2html.

nativepdf +

An alias for dvips

pdfmark +

An alias for dvips

pdftex +

Sets up hyperref for use with the pdftex program.

ps2pdf +

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

tex4ht +

For use with TeX4ht

textures +

For use with Textures

vtex +

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

vtexpdfmark +

For use with VTeX’s PostScript backend.

xetex +

For use with XeTeX (using backend for dvipdfm).

+

If you use dviwindo, you may need to redefine the macro \wwwbrowser (the default is +C:\netscape\netscape) to tell dviwindo what program to launch. Thus, users of Internet Explorer might +add something like this to hyperref.cfg: + + +

+\renewcommand{\wwwbrowser}{C:\string\Program\space
+  Files\string\Plus!\string\Microsoft\space
+  Internet\string\iexplore.exe}
+
+

+

+

3.5 Extension options

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
extension text +

Set the file extension (e.g. dvi) which will be + appended to file links created if you use the xr + package.

hyperfigures boolean +

backref text false +

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 + \bibitem. Supported values are section, slide, page, + none, or false. If no value is given, section is taken + as default.

pagebackref boolean false +

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

hyperindex boolean true +

Makes the page + numbers of index entries into hyperlinks. Relays on + unique page anchors (pageanchor, …) pageanchors + and plainpages=false.

hyperfootnotes boolean true +

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

encap +

Sets encap character for hyperindex

linktoc text section +

make text (section), page number (page), both (all) + or nothing (none) be link on TOC, LOF and LOT

linktocpage boolean false +

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

breaklinks boolean false +

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

colorlinks boolean false +

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 + links. Unlike colored boxes, the colored text remains + when printing.

linkcolor color red +

Color for normal internal links.

anchorcolor color black +

Color for anchor text. Ignored by most drivers.

citecolor color green +

Color for bibliographical citations in text.

filecolor color cyan +

Color for URLs which open local files.

menucolor color red +

Color for Acrobat menu items.

runcolor color filecolor +

Color for run links (launch annotations).

urlcolor color magenta +

Color for linked URLs.

allcolors color +

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

frenchlinks 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 +LaTeX color package. +

+

3.6 PDF-specific display options

+
+ + + + + + + + + + + + + + + + + + + + + +
bookmarks boolean true +

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 .out) may + be needed to translate LaTeX codes, since + bookmarks must be written in PDFEncoding. To + aid this process, the .out file is not rewritten + by LaTeX if it is edited to contain a line + \let\WriteBookmarks\relax

bookmarksopen boolean false +

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

bookmarksopenlevel parameter +

level (\maxdimen) to which bookmarks are open

bookmarksnumbered boolean false +

If Acrobat bookmarks are requested, include + section numbers.

bookmarkstype text toc +

to specify which ‘toc’ file to mimic

CJKbookmarks boolean false +

This option should be used to produce CJK + bookmarks. Package hyperref supports both + normal and preprocessed mode of the 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 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 + translate non-Unicode bookmarks to Unicode; for + portable PDF documents only Unicode encoding + should be used.

pdfhighlight name /I +

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).

citebordercolor RGB color 0 1 0 +

The color of the box around citations

filebordercolor RGB color 0 .5 .5 +

The color of the box around links to files

linkbordercolor RGB color 1 0 0 +

The color of the box around normal links

menubordercolor RGB color 1 0 0 +

The color of the box around Acrobat menu links

urlbordercolor RGB color 0 1 1 +

The color of the box around links to URLs

runbordercolor RGB color 0 .7 .7 +

Color of border around ‘run’ links

allbordercolors +

Set all border color options

pdfborder 0 0 1 +

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.

+

Note that the color of link borders can be specified only as 3 numbers in the range 0..1, giving an RGB +color. You cannot use colors defined in TeX. Since version 6.76a this is no longer true. Especially with +the help of package xcolor the usual color specifications of package (x)color can be used. For further + + +information see description of package hycolor. +

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 +for this, the .out file is not overwritten on the next TeX run if it is edited to contain the +line + + +

+\let\WriteBookmarks\relax
+
+

+

+

3.7 PDF display and information options

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
baseurl +

URL

+

Sets the base URL of the PDF document

pdfpagemode +

name

empty +

Determines how the file is opening in + Acrobat; the possibilities are UseNone, + UseThumbs (show thumbnails), UseOutlines + (show bookmarks), FullScreen, UseOC (PDF + 1.5), and UseAttachments (PDF 1.6). If no + mode if explicitly chosen, but the bookmarks + option is set, UseOutlines is used.

pdftitle +

text

+

Sets the document information Title field

pdfauthor +

text

+

Sets the document information Author field

pdfsubject +

text

+

Sets the document information Subject field

pdfcreator +

text

+

Sets the document information Creator field

addtopdfcreator +

text

+

Adds additional text to the document + information Creator field

pdfkeywords +

text

+

Sets the document information Keywords field

pdftrapped +

name

empty +

Sets the document information Trapped entry. + Possible values are True, False and Unknown. + An empty value means, the entry is not set.

pdfinfo +

key + value + list

empty +

Alternative interface for setting the document + information.

pdfview +

name

XYZ +

Sets the default PDF ‘view’ for each link

pdfstartpage +

integer

1 +

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

pdfstartview +

name

Fit +

Set the startup page view

pdfremotestartview +

name

Fit +

Set the startup page view of remote PDF files

pdfpagescrop +

n + n + n + n

+

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

pdfcenterwindow +

boolean

false +

position the document window in the center + of the screen

pdfdirection +

name

empty +

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

pdfdisplaydoctitle +

boolean

false +

display document title instead of file name in + title bar

pdfduplex +

name

empty +

paper handling option for print + dialog. Possible vatues are: Simplex (print + single-sided), DuplexFlipShortEdge (duplex + and flip on the short edge of the sheet), + DuplexFlipLongEdge (duplex and flip on the + long edge of the sheet)

pdffitwindow +

boolean

false +

resize document window to fit document size

pdflang +

name

relax +

PDF language identifier (RFC 3066)

pdfmenubar +

boolean

true +

make PDF viewer’s menu bar visible

pdfnewwindow +

boolean

false +

make links that open another PDF file start a + new window

pdfnonfullscreenpagemode +

name

empty +

page mode setting on exiting full-screen mode. + Possible values are UseNone, UseOutlines, + UseThumbs, and UseOC

pdfnumcopies +

integer

empty +

number of printed copies

pdfpagelayout +

name

empty +

set layout of PDF pages. Possible values: + SinglePage, OneColumn, TwoColumnLeft, + TwoColumnRight, TwoPageLeft, and + TwoPageRight

pdfpagelabels +

boolean

true +

set PDF page labels

pdfpagetransition +

name

empty +

set PDF page transition style. Possible values + are Split, Blinds, Box, Wipe, Dissolve, + Glitter, R, Fly, Push, Cover, Uncover, Fade. + The default according to the PDF Reference + is R, which simply replaces the old page with + the new one.

pdfpicktraybypdfsize +

boolean

false +

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

pdfprintarea +

name

empty +

set /PrintArea of viewer preferences. Possible + values are MediaBox, CropBox, BleedBox, + TrimBox, and ArtBox. The dafault according + to the PDF Refence is CropBox

pdfprintclip +

name

empty +

set /PrintClip of viewer preferences. Possible + values are MediaBox, CropBox, BleedBox, + TrimBox, and ArtBox. The dafault according + to the PDF Refence is CropBox

pdfprintpagerange +

n + n + (n + n)*

empty +

set /PrintPageRange of viewer preferences

pdfprintscaling +

name

empty +

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

pdftoolbar +

boolean

true +

make PDF toolbar visible

pdfviewarea +

name

empty +

set /ViewArea of viewer preferences. Possible + values are MediaBox, CropBox, BleedBox, + TrimBox, and ArtBox. The dafault according + to the PDF Refence is CropBox

pdfviewclip +

name

empty +

set /ViewClip of viewer preferences Possible + values are MediaBox, CropBox, BleedBox, + TrimBox, and ArtBox. The dafault according + to the PDF Refence is CropBox

pdfwindowui +

boolean

true +

make PDF user interface elements visible

unicode +

boolean

true +

Unicode encoded PDF strings

+

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 46. pdfTeX works by supplying default values for XYZ (horizontal × +vertical × zoom) and FitBH. However, drivers using pdfmark do not supply defaults, so +hyperref passes in a value of -32768, which causes Acrobat to set (usually) sensible defaults. +The following are possible values for the pdfview, pdfstartview and pdfremotestartview +parameters. +

+ + + + + + + + + + + + + + + +
XYZ left top zoom +

Sets a coordinate and a zoom factor. If any one + is null, the source link value is used. null null + null will give the same values as the current + page.

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 + coordinates to the window.

FitB +

Fits the page bounding box to the window.

FitBH top +

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

FitBV left +

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

+

The pdfpagelayout can be one of the following values. +

+ + + + + + + + + + +
SinglePage +

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 + the left.

TwoColumnRight +

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

TwoPageLeft +

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 + 1.5).

+

Finally, the pdfpagetransition can be one of the following values, where /Di stands for direction of +motion in degrees, generally in 90 steps, /Dm is a horizontal (/H) or vertical (/V) dimension +(e.g. Blinds /Dm /V), and /M is for motion, either in (/I) or out (/O). +

+ + + + + + + + + + + + + + + + + + +
Blinds /Dm +

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.

Dissolve +

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

Glitter /Di +

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 + 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 + direction specified by /Di, to or from a location that is + offscreen except when /Di is None.

Push /Di +

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

Cover /Di +

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 + specified by /Di, uncovering the new page in the + direction specified by /Di.

Fade +

The new page gradually becomes visible through the old + one.

+

+

3.8 Option pdfinfo

+

The information entries can be set using pdftitle, pdfsubject, …. Option pdfinfo provides an alternative +interface. It takes a key value list. The key names are the names that appear in the PDF information +dictionary directly. Known keys such as Title, Subject, Trapped and other are mapped to options +pdftitle, subject, trapped, …Unknown keys are added to the information dictionary. Their values are text +strings (see PDF specification). Example: +

+ + +
+\hypersetup{
+  pdfinfo={
+    Title={My Title},
+    Subject={My Subject},
+    NewKey={Foobar},
+    % ...
+  }
+}
+
+

+

+

3.9 Big alphabetical list

+

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

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
allbordercolors +

Set all border color options

allcolors +

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)

debug false +

provide details of anchors defined; same as + verbose

destlabel false +

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

draft false +

do not do any hyperlinking

driverfallback +

default if no driver specified or detected

dvipdfm +

use dvipdfm backend

dvipdfmx +

use dvipdfmx backend

dvips +

use dvips backend

dvipsone +

use dvipsone backend

dviwindo +

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 HyperTeX backend

hypertexnames true +

use guessable names for links

implicit true +

redefine LaTeX internals

latex2html +

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, + LOF and LOT

menubordercolor 1 0 0 +

color of border around menu links

menucolor red +

color for menu links

nativepdf false +

an alias for dvips

naturalnames false +

use LaTeX-computed names for links

nesting false +

allow nesting of links

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 + 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 + 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 + information

pdfkeywords empty +

text for PDF Keywords field

pdflang relax +

PDF language identifier (RFC 3066)

pdfmark false +

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

pdfpagetransition 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 pdfTeX backend

pdftitle empty +

text for PDF Title field

pdftoolbar true +

make PDF toolbar visible

pdftrapped empty +

Sets the document information Trapped entry. + Possible values are True, False and Unknown. + An empty value means, the entry is not set.

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 ps2pdf backend

psdextra false +

define more short names for PDF string + commands

raiselinks false +

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 TeX4ht backend

textures +

use Textures backend

unicode true +

Unicode encoded pdf strings, starting with + version 2021-02-07 v7.00h set by default to + true for all engines.

urlbordercolor 0 1 1 +

color of border around URL links

urlcolor magenta +

color of URL links

verbose false +

be chatty

vtex +

use VTeX backend

xetex +

use XeTeX backend

+

+

4 Additional user macros

+

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

+

+
\href[options]{URL}{text}
+

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 pdfremotestartview, pdfnewwindow +and the following key value options: +

+page:
Specifies the start page number of remote PDF documents. First page is 1. +
+ismap:
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 /Next of action dictionaries, see PDF specification.
+

+

\url{URL}
+

Similar to \href{URL}{\nolinkurl{URL}}. 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 URL in the same way as \url, without creating a hyperlink. + +

+

+
\hyperbaseurl{URL}
+

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

+

+
\hyperimage{imageURL}{text}
+

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 text being +ignored completely. +

+

+
\hyperdef{category}{name}{text}
+

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

+

+
\hyperref{URL}{category}{name}{text}
+

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

+

+
\hyperref[label]{text}
+

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

+

+
\hyperlink{name}{text}
+

+

+
\hypertarget{name}{text}
+

A simple internal link is created with \hypertarget, with two parameters of an anchor name, and anchor +text. \hyperlink has two arguments, the name of a hypertext object defined somewhere by \hypertarget, +and the text which be used as the link on the page. +

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 \hypertarget{}{} with an automatically chosen +anchor name. Often it is used in conjunction with \addcontentsline for sectionlike things (index, +bibliography, preface). \addcontentsline refers to the latest previous location where an anchor is set. +Example: +

+ + +
+\cleardoublepage
+\phantomsection
+\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, +not to a location before this page. +

+

\autoref{label}
+

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 \label command by hyperref by using the +macros listed below (shown with their default values). The macros can be (re)defined in documents using +\(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, hyperref checks \*autorefname before \*name. For instance, it looks for +\figureautorefname before \figurename. +

+ + + + + + + + + + + + + + + + + + + + + + + +
Macro +

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

\AMSname +

Equation

\theoremname +

Theorem

\page +

page

+

Example for a redefinition if babel is used: +

+ + +
+\usepackage[ngerman]{babel}
+\addto\extrasngerman{%
+  \def\subsectionautorefname{Unterkapitel}%
+}
+
+

+

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 +\newtheorem if a lemma shares a counter with theorems. Then package aliascnt provides a method to +generate a simulated second counter that allows the differentiation between theorems and +lemmas: +

+ + +
+\documentclass{article}
+
+\usepackage{aliascnt}
+\usepackage{hyperref}
+
+\newtheorem{theorem}{Theorem}
+
+\newaliascnt{lemma}{theorem}
+\newtheorem{lemma}[lemma]{Lemma}
+\aliascntresetthe{lemma}
+
+\providecommand*{\lemmaautorefname}{Lemma}
+
+\begin{document}
+
+We will use \autoref{a} to prove \autoref{b}.
+
+\begin{lemma}\label{a}
+  Nobody knows.
+\end{lemma}
+
+\begin{theorem}\label{b}
+  Nobody is right.
+\end{theorem}.
+
+\end{document}
+
+

+

+

+
\autopageref{label}
+

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 +link, there are starred forms (these starred forms exist even if hyperref has been loaded with +implicit=false): +

+

\ref*{label}
+

+

+
\pageref*{label}
+

+ +

\autoref*{label}
+

+

+
\autopageref*{label}
+

A typical use would be to write + + +

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

+

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

+

+
\pdfstringdef{macroname}{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 +
  • +
  • Defining the “octal sequence commands” (\345): \edef\3{\string\3} +
  • +
  • Special glyphs of TeX: \{, \%, \&, \space, \dots, etc. +
  • +
  • National glyphs (german.sty, french.sty, etc.) +
  • +
  • Logos: \TeX, \eTeX, \MF, etc. +
  • +
  • Disabling commands that do not provide useful functionality in bookmarks: \label, \index, + \glossary, \discretionary, \def, \let, etc. +
  • +
  • LaTeX’s font commands like \textbf, etc. +
  • +
  • Support for \xspace provided by the xspace package
+

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. +

+

+
\begin{NoHyper}\end{NoHyper}
+

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. + + +

+

4.1 Bookmark macros

+

+

4.1.1 Setting bookmarks
+

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

+

+
\pdfbookmark[level]{text}{name}
+

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). +

+

+
\currentpdfbookmark{text}{name}
+

creates a bookmark at the current level. +

+

+
\subpdfbookmark{text}{name}
+

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

+

+
\belowpdfbookmark{text}{name}
+

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. +
  • +
  • More control over the bookmark appearance (color, font). +
  • +
  • Different bookmark actions are supported (external file links, URLs, …).
+

Therefore I recommend using this package. +

+

4.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. + + +

+

+
\texorpdfstring{TeXstring}{PDFstring}
+

For example, + + +

+\section{Pythagoras:
+  \texorpdfstring{$ a^2 + b^2 = c^2 $}{%
+    a\texttwosuperior\ + b\texttwosuperior\ =
+    c\texttwosuperior
+  }%
+}
+\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. + + +

+\expandafter\def\expandafter\pdfstringdefPreHook
+\expandafter{%
+  \pdfstringdefPreHook
+  \renewcommand{\mycommand}[1]{}%
+}
+
+

+

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 +names): + + +

+\pdfstringdefDisableCommands{%
+  \let~\textasciitilde
+  \def\url{\pdfstringdefWarn\url}%
+  \let\textcolor\@gobble
+}
+
+

+

+

4.2 Pagelabels

+

+

+
\thispdfpagelabel{page number format}
+

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 +taken into account. It should be used in places where for example \thispagestyle can be use +too. +

+

4.3 Utility macros

+

+

+
\hypercalcbp{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, pdfstartview and pdfremotestartview. +Example: +

+ + +
+\hypersetup{
+  pdfstartview={FitBH \hypercalcbp{\paperheight-\topmargin-1in
+    -\headheight-\headsep}
+}
+
+

+

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 \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. +

+

5 New Features4

+

5.1 Option ‘pdflinkmargin’

+

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. +
  • +
  • Settings have local effect. +
  • +
  • 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.
+
+xetex
+ + +
    +
  • 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.
+

+

5.2 Field option ‘calculatesortkey’

+

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. +

+

5.3 Option ‘localanchorname’

+

When an anchor is set (e.g. via \refstepcounter, then the anchor name is globally set to the current +anchor name. +

For example: + + +

+    \section{Foobar}
+    \begin{equation}\end{equation}
+    \label{sec:foobar}
+
+

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 +name is not available as expected. +

+

5.4 Option ‘customdriver’

+

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 +quite messy, the option is mainly intended to ease developing, testing, debugging the driver +part. +

+

5.5 Option ‘psdextra’

+

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, +therefore they are defined with prefix ‘text’ (\textgeq, \textnotin, ...). They can be mapped to short +names during the processing to PDF strings. The disadvantage is that they are many hundreds macros +that need to be redefined for each PDF string conversion. Therefore this can be enabled or disabled +as option ‘psdextra’. On default the option is turned off (set to ‘false’). Turning the option +on means that the short names are available. Then \geq can directly be used instead of +\textgeq. +

+

5.6 \XeTeXLinkBox

+

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: + + +

+    % xelatex
+    \documentclass{article}
+    \usepackage{hyperref}
+    \setlength{\XeTeXLinkMargin}{1pt}
+    \begin{document}
+    \section{Hello World}
+    \newpage
+    \label{sec:hello}
+    \hyperref[sec:hello]{%
+      \XeTeXLinkBox{\rule{10mm}{10mm}}%
+    }
+    \end{document}
+
+

+

+

5.7 \IfHyperBooleanExists and \IfHyperBoolean

+ + +
+ \IfHyperBooleanExists{OPTION}{YES}{NO}
+
+

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

+ \IfHyperBoolean{OPTION}{YES}{NO}
+
+

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 +\MaybeStopEarly or \MaybeStopNow end hyperref prematurely. +

+

5.8 \unichar

+

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 \pdfstringdef (that converts arbitrary TeX code to PDF strings or tries to do +this). +

Macro \unichar takes a TeX number as argument, examples for U+263A (WHITE SMILING +FACE): + + +

+    \unichar{"263A}% hexadecimal notation
+    \unichar{9786}% decimal notation
+
+

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

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

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

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

+

+

5.9 \ifpdfstringunicode

+

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 +by a representation for the PDF string. However \texorpdfstring does not distinguish the two encodings. +This gap closes \ifpdfstringunicode. It is only allowed in the second argument of \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 Han The Thanh. Correctly +written it needs some accented characters, one character even with a double accent. Class ‘tugboat.cls’ +defines a macro for the typesetted name: + + +

+    \def\Thanh{%
+      H\‘an~%
+      Th\^e\llap{\raise 0.5ex\hbox{\’{}}}%
+      ~Th\‘anh%
+    }
+
+

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 +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 \unichar. The character in question +is: + + +

+    % U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
+
+

Thus we can put this together: + + +

+    \def\Thanh{%
+      H\‘an~%
+      \texorpdfstring{Th\^e\llap{\raise 0.5ex\hbox{\’{}}}}%
+      {\ifpdfstringunicode{Th\unichar{"1EC3}}{Th\^e}}%
+      ~Th\‘anh%
+    }
+
+

For PDFDocEncoding (PD1) the variant above has dropped the second accent. Alternatively we could +provide a representation without accents instead of wrong accents: + + +

+    \def\Thanh{%
+      \texorpdfstring{%
+        H\‘an~%
+        Th\^e\llap{\raise 0.5ex\hbox{\’{}}}}%
+        ~Th\‘anh%
+      }{%
+        \ifpdfstringunicode{%
+          H\‘an Th\unichar{"1EC3} Th\‘anh%
+        }{%
+          Han The Thanh%
+        }%
+      }%
+    }
+
+

+

+

5.10 Customizing index style file with \nohyperpage

+

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 +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 +Makeindex.) Customized versions of delim_r, delim_n, suffix_2p, suffix_3p, suffix_mp needs +markup that \hyperpage can detect and knows that this stuff does not belong to a page number. Makro +\nohyperpage serves as this markup. Put the customized code for these keys inside \nohyperpage, +e.g.: + + +

+    suffix_2p "\\nohyperpage{f.}"
+    suffix_3p "\\nohyperpage{ff.}"
+
+

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

+

5.11 Experimental option ‘ocgcolorlinks’

+

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 +package. Check its documentation for details how to use it. +

    +
  • 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 + 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 \hypersetup{ocgcolorlinks=false} inside the document. +
  • +
  • Supported drivers: pdftex, dvipdfm +
  • +
  • The PDF version should be at least 1.5. It is automatically set for pdfTeX, LuaTeX and + dvipdfmx.
+

+

5.12 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, +fonts, colors, driver dependend low level stuff, ...). +

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

    +
  • Enabled annotation flags: Print, NoZoom, NoRotate [PDF/A 6.5.3]. +
  • +
  • Disabled annotation flags: Hidden, Invisible, NoView [PDF/A 6.5.3]. +
  • +
  • Disabled: Launch action ([PDF/A 6.6.1]. +
  • +
  • Restricted: Named actions (NextPage, PrevPage, FirstPage, LastPage) [PDF/A 6.6.1]. + +
  • +
  • Many things are disabled in PDF formulars: +
      +
    • JavaScript actions [PDF/A 6.6.1] +
    • +
    • Trigger events (additional actions) [PDF/A 6.6.2] +
    • +
    • 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]
    +
+

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}). +

+

5.13 Option ‘linktoc’ added

+

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=section’ (default behaviour, same as ‘linktocpage=false’) +
  • +
  • ‘linktoc=page’ (same as ‘linktocpage=true’) +
  • +
  • ‘linktoc=all’ (both the section and page part are links)
+

+

5.14 Option ‘pdfnewwindow’ changed

+

Before 6.77b: +

    +
  • pdfnewwindow=true /NewWindow true +
  • +
  • pdfnewwindow=false (absent) +
  • +
  • unused pdfnewwindow (absent)
+

Since 6.77b: +

    +
  • pdfnewwindow=true /NewWindow true + +
  • +
  • pdfnewwindow=false /NewWindow false +
  • +
  • pdfnewwindow= (absent) +
  • +
  • unused pdfnewwindow (absent)
+

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. +

+

5.15 Flag options for PDF forms

+

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: +

    +
  • Table 8.16 Annotation flags (page 608): +

    + 1 Invisible +
    2 Hidden (PDF 1.2) +
    3 Print (PDF 1.2) +
    4 NoZoom (PDF 1.3) +
    5 NoRotate (PDF 1.3) +
    6 NoView (PDF 1.3) +
    [7 ReadOnly (PDF 1.3)] ignored for widget annotations, see table 8.70 +
    8 Locked (PDF 1.4) +
    9 ToggleNoView (PDF 1.5) +
    10 LockedContents (PDF 1.7)
    +
  • +
  • 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): +

    + 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): +

    + 13 Multiline +
    14 Password +
    21 FileSelect (PDF 1.4) +
    23 DoNotSpellCheck (PDF 1.4) +
    24 DoNotScroll (PDF 1.4) +
    25 Comb (PDF 1.5) +
    26 RichText (PDF 1.5)
    +
  • +
  • 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 +
    22 MultiSelect (PDF 1.4) +
    23 DoNotSpellCheck (PDF 1.4) (only useful if Combo and Edit are set) +
    27 CommitOnSelChange (PDF 1.5)
    +
  • +
  • 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’ +
    4 GetMethod +
    5 SubmitCoordinates +
    [6 XFDF (PDF 1.4)] handled by option ‘export’ +
    7 IncludeAppendSaves (PDF 1.4) +
    8 IncludeAnnotations (PDF 1.4) +
    [9 SubmitPDF (PDF 1.4)] handled by option ‘export’ +
    10 CanonicalFormat (PDF 1.4) +
    11 ExclNonUserAnnots (PDF 1.4) +
    12 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 +lowercase): +

    +
  • FDF +
  • +
  • HTML +
  • +
  • XFDF +
  • +
  • PDF (not supported by Acrobat Reader)
+

+

5.16 Option ‘pdfversion’

+

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 +higher PDF versions. +

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. +

    +
  • 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 + 2’. +
  • +
  • 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 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. +

+

5.17 Field option ‘name’

+

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

    +
  • 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 +‘name’ is given, then its value is used as name in the different output structures. Thus the value should +consist of letters only. +

+

5.18 Option ‘pdfencoding’

+

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 normally no suited + for the unicode engines.
+

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

+

5.19 Color options/package hycolor

+

See documentation of package ‘hycolor’. +

+

5.20 Option pdfusetitle

+

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). +

+

5.21 Starred form of \autoref

+

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

+

5.22 Link border style

+

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: + + +

    +
  • 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 boxes, eg.: + pdfborderstyle=/S/D/D[3 2]/W 1 +
  • +
  • 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 + colorlinks is enabled. +
  • +
  • Be aware that not all PDF viewers support this feature, not even Acrobat Reader itself: +

    Some support: +

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

    Unsupported: +

      +
    • AR5/Linux +
    • +
    • ghostscript 8.50
    +
+

+

5.23 Option bookmarksdepth

+

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=<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 + the value of macro \toclevel@<name>. Examples: + + +
    +         \hypersetup{bookmarksdepth=paragraph}
    +         \hypersetup{bookmarksdepth=4} % same as before
    +         \hypersetup{bookmarksdepth} % counter "tocdepth" is used
    +
    +

+

+

5.24 Option pdfescapeform

+

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: +

    +
  • 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 + 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.
+

+

5.25 Default driver setting

+

(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 +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 +hyperref.cfg: + + +

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

for dvips, or + + +

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

for the default behaviour of hyperref. +

See also the new option ‘driverfallback’. +

+

5.26 Backref entries

+

Alternative interface for formatting of backref entries, example: + + +

+\documentclass[12pt,UKenglish]{article}
+
+\usepackage{babel}
+\usepackage[pagebackref]{hyperref}
+
+% Some language options are detected by package backref.
+% This affects the following macros:
+%   \backrefpagesname
+%   \backrefsectionsname
+%   \backrefsep
+%   \backreftwosep
+%   \backreflastsep
+
+\renewcommand*{\backref}[1]{
+  % default interface
+  % #1: backref list
+  %
+  % We want to use the alternative interface,
+  % therefore the definition is empty here.
+}
+\renewcommand*{\backrefalt}[4]{%
+  % alternative interface
+  % #1: number of distinct back references
+  % #2: backref list with distinct entries
+  % #3: number of back references including duplicates
+  % #4: backref list including duplicates
+  \par
+  #3 citation(s) on #1 page(s): #2,\par
+  \ifnum#1=1 %
+    \ifnum#3=1 %
+      1 citation on page %
+    \else
+      #3 citations on page %
+    \fi
+  \else
+    #3 citations on #1 pages %
+  \fi
+  #2,\par
+  \ifnum#3=1 %
+    1 citation located at page %
+  \else
+    #3 citations located at pages %
+  \fi
+  #4.\par
+}
+
+% The list of distinct entries can be further refined:
+\renewcommand*{\backrefentrycount}[2]{%
+                                                                                 
+                                                                                 
+  % #1: the original backref entry
+  % #2: the count of citations of this entry,
+  %     in case of duplicates greater than one
+  #1%
+  \ifnum#2>1 %
+    ~(#2)%
+  \fi
+}
+
+\begin{document}
+
+  \section{Hello}
+    \cite{ref1, ref2, ref3, ref4}
+  \section{World}
+    \cite{ref1, ref3}
+  \newpage
+
+  \section{Next section}
+    \cite{ref1}
+  \newpage
+
+  \section{Last section}
+    \cite{ref1, ref2}
+  \newpage
+
+  \pdfbookmark[1]{Bibliography}{bib}
+  \begin{thebibliography}{99}
+    \bibitem{ref1} Dummy entry one.
+
+    \bibitem{ref2} Dummy entry two.
+
+    \bibitem{ref3} Dummy entry three.
+
+    \bibitem{ref4} Dummy entry four.
+
+  \end{thebibliography}
+
+\end{document}
+
+

+

+

5.27 \phantomsection

+

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 +set. + + +

+  \cleardoublepage
+  \phantomsection
+  \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, not to a location before this page. +

+

6 Acrobat-specific behavior

+

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

+

+
\Acrobatmenu{menuoption}{text}
+

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. +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
File +

Open, + Close, + Scan, + Save, + SaveAs, + Optimizer:SaveAsOpt, + Print, + PageSetup, + Quit

FileImport +

ImportImage, + ImportNotes, + AcroForm:ImportFDF

FileExport +

ExportNotes, + AcroForm:ExportFDF

FileDocumentInfo +

GeneralInfo, + OpenInfo, + FontsInfo, + SecurityInfo, + Weblink:Base, + AutoIndex:DocInfo

FilePreferences +

GeneralPrefs, + NotePrefs, + FullScreenPrefs, + Weblink:Prefs, + AcroSearch:Preferences(Windows) + or, + AcroSearch:Prefs(Mac), + Cpt:Capture

Edit +

Undo, + Cut, + Copy, + Paste, + Clear, + SelectAll, + Ole:CopyFile, + TouchUp:TextAttributes, + TouchUp:FitTextToSelection, + TouchUp:ShowLineMarkers, + TouchUp:ShowCaptureSuspects, + TouchUp:FindSuspect,

+

Properties

EditFields +

AcroForm:Duplicate, + AcroForm:TabOrder

Document +

Cpt:CapturePages, + AcroForm:Actions, + CropPages, + RotatePages, + InsertPages, + ExtractPages, + ReplacePages, + DeletePages, + NewBookmark, + SetBookmarkDest, + CreateAllThumbs, + DeleteAllThumbs

View +

ActualSize, + FitVisible, + FitWidth, + FitPage, + ZoomTo, + FullScreen, + FirstPage, + PrevPage, + NextPage, + LastPage, + GoToPage, + GoBack, + GoForward, + SinglePage, + OneColumn, + TwoColumns, + ArticleThreads, + PageOnly, + ShowBookmarks, + ShowThumbs

Tools +

Hand, + ZoomIn, + ZoomOut, + SelectText, + SelectGraphics, + Note, + Link, + Thread, + AcroForm:Tool, + Acro_Movie:MoviePlayer, + TouchUp:TextTool, + Find, + FindAgain, + FindNextNote, + CreateNotesFile

ToolsSearch +

AcroSrch:Query, + AcroSrch:Indexes, + AcroSrch:Results, + AcroSrch:Assist, + AcroSrch:PrevDoc, + AcroSrch:PrevHit, + AcroSrch:NextHit, + AcroSrch:NextDoc

Window +

ShowHideToolBar, + ShowHideMenuBar, + ShowHideClipboard, + Cascade, + TileHorizontal, + TileVertical, + CloseAll

Help +

HelpUserGuide, + HelpTutorial, + HelpExchange, + HelpScan, + HelpCapture, + HelpPDFWriter, + HelpDistiller, + HelpSearch, + HelpCatalog, + HelpReader, + Weblink:Home

Help(Windows) +

About

+

+

7 PDF and HTML forms

+

You must put your fields inside a Form environment (only one per file). +

There are six macros to prepare fields: +

+

+
\TextField[parameters]{label}
+

+

+
\CheckBox[parameters]{label}
+

+

+
\ChoiceMenu[parameters]{label}{choices}
+

+

+
\PushButton[parameters]{label}
+

+ + +

+
\Submit[parameters]{label}
+

+

+
\Reset[parameters]{label}
+

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

+

+
\LayoutTextField{label}{field}
+

+

+
\LayoutChoiceField{label}{field}
+

+

+
\LayoutCheckField{label}{field}
+

These macros default to #1 #2 +

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

+

+
\MakeRadioField{width}{height}
+

+

+
\MakeCheckField{width}{height}
+

+

+
\MakeTextField{width}{height}
+

+

+
\MakeChoiceField{width}{height}
+

+

\MakeButtonField{text}
+

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

You may also want to redefine the following macros: + + +

+\def\DefaultHeightofSubmit{12pt}
+\def\DefaultWidthofSubmit{2cm}
+\def\DefaultHeightofReset{12pt}
+\def\DefaultWidthofReset{2cm}
+\def\DefaultHeightofCheckBox{0.8\baselineskip}
+\def\DefaultWidthofCheckBox{0.8\baselineskip}
+\def\DefaultHeightofChoiceMenu{0.8\baselineskip}
+\def\DefaultWidthofChoiceMenu{0.8\baselineskip}
+\def\DefaultHeightofText{\baselineskip}
+\def\DefaultHeightofTextMultiline{4\baselineskip}
+\def\DefaultWidthofText{3cm}
+
+

+

+

7.1 Forms environment parameters

+
+ + + + + + + + +
action URL +

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

encoding name +

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

method name +

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

+

+

7.2 Forms optional parameters

+

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

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
accesskey key (as per HTML)
align number 0 alignment within text field; 0 is left-aligned,
1 is centered, 2 is right-aligned.
altname name alternative name,
the name shown in the user interface
backgroundcolor color of box
bordercolor color of border
bordersep box border gap
borderwidth 1 width of box border, the value is a dimension
or a number with default unit bp
calculate JavaScript code to calculate the value of the field
charsize dimen font size of field text
checkboxsymbol char 4 () symbol used for check boxes (ZapfDingbats),
the value is a character or \ding{number},
see package pifont from bundle psnfss
checked boolean false whether option selected by default
color color of text in box
combo boolean false choice list is ‘combo’ style
default default value
disabled boolean false field disabled
format JavaScript code to format the field
height dimen height of field box
hidden boolean false field hidden
keystroke JavaScript code to control the keystrokes on entry
mappingname name the mapping name to be used when exporting
the field data
maxlen number 0 number of characters allowed in text field
menulength number 4 number of elements shown in list
multiline boolean false whether text box is multiline
name name name of field (defaults to label)
onblur JavaScript code
onchange JavaScript code
onclick JavaScript code
ondblclick JavaScript code
onfocus JavaScript code
onkeydown JavaScript code
onkeypress JavaScript code
onkeyup JavaScript code
onmousedown JavaScript code
onmousemove JavaScript code
onmouseout JavaScript code
onmouseover JavaScript code
onmouseup JavaScript code
onselect JavaScript code
password boolean false text field is ‘password’ style
popdown boolean false choice list is ‘popdown’ style
radio boolean false choice list is ‘radio’ style
radiosymbol char H () symbol used for radio fields (ZapfDingbats),
the value is a character or \ding{number},
see package pifont from bundle psnfss
readonly boolean false field is readonly
rotation number 0 rotation of the widget annotation
(degree, counterclockwise, multiple of 90)
tabkey (as per HTML)
validate JavaScript code to validate the entry
value initial value
width dimen width of field box
+

+

8 Defining a new driver

+

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

1. \hyper@anchor +

2. \hyper@link +

3. \hyper@linkfile +

4. \hyper@linkurl +

5. \hyper@anchorstart + + +

6. \hyper@anchorend +

7. \hyper@linkstart +

8. \hyper@linkend +

The draft option defines the macros as follows + + +

+\let\hyper@@anchor\@gobble
+\gdef\hyper@link##1##2##3{##3}%
+\def\hyper@linkurl##1##2{##1}%
+\def\hyper@linkfile##1##2##3{##1}%
+\let\hyper@anchorstart\@gobble
+\let\hyper@anchorend\@empty
+\let\hyper@linkstart\@gobbletwo
+\let\hyper@linkend\@empty
+
+

+

+

9 Special support for other packages

+

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 harvard package is + supported. However, the recommended package is Patrick Daly’s natbib package that has + specific hyperref hooks to allow reliable interaction. This package covers a very wide variety + of layouts and citation styles, all of which work with hyperref. +
  • +
  • Packages that typeset the contents of the \label and \ref macros, such as showkeys. Since the + hyperref package redefines these commands, you must set implicit=false for these packages + to work. +
  • +
  • Packages that do anything serious with the index.
+

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 LATEX’s normal +\label/\ref mechanisms and per-chapter tables of contents, respectively. +

+

9.1 Package Compatibility

+

Currently only package loading orders are available: +

Note: hyperref loads package nameref at \begin{document}. Sometimes this is too late, thus this +package must be loaded earlier. +

+

9.1.1 algorithm
+ + +
+ \usepackage{float}
+  \usepackage{hyperref}
+  \usepackage[chapter]{algorithm}% eg.
+
+

+

+

9.1.2 amsmath
+

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 +gather: + + +

+  \usepackage{amsmath}
+  \let\equation\gather
+  \let\endequation\endgather
+
+

+

+

9.1.3 amsrefs
+

Package loading order: + + +

+  \usepackage{hyperref}
+  \usepackage{amsrefs}
+
+

+

+

9.1.4 arydshln, longtable
+

Package longtable must be put before hyperref and arydshln, hyperref after arydshln generates an error, +thus the resulting package order is then: + + +

+  \usepackage{longtable}
+  \usepacakge{hyperref}
+  \usepackage{arydshln}
+
+

+

+

9.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 +Szab, see CTAN:language/hungarian/babel/. +

+

9.1.6 babel/spanish.ldf
+

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

+

9.1.7 bibentry
+

Workaround: + + +

+  \makeatletter
+  \let\saved@bibitem\@bibitem
+  \makeatother
+
+  \usepackage{bibentry}
+  \usepackage{hyperref}
+
+  \begin{document}
+
+  \begingroup
+    \makeatletter
+    \let\@bibitem\saved@bibitem
+    \nobibliography{database}
+  \endgroup
+
+

+

+

9.1.8 bigfoot
+

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

+

9.1.9 chappg
+

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

+  \usepackage{hyperref}
+  \usepackage{chappg}
+
+

+

+

9.1.10 cite
+

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

+ \makeatletter
+ \def\NAT@parse{\typeout{This is a fake Natbib command to fool Hyperref.}}
+ \makeatother
+
+ \usepackage[hypertex]{hyperref}
+
+

+

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). +

+

9.1.11 count1to
+

Package ‘count1to’ adds several \@addtoreset commands that confuse ‘hyperref’. Therefore \theH<...> +has to be fixed: + + +

+  \usepackage{count1to}
+  \AtBeginDocument{% *after* \usepackage{count1to}
+    \renewcommand*{\theHsection}{\theHchapter.\arabic{section}}%
+    \renewcommand*{\theHsubsection}{\theHsection.\arabic{subsection}}%
+    \renewcommand*{\theHsubsubsection}{\theHsubsection.\arabic{subsubsection}}%
+    \renewcommand*{\theHparagraph}{\theHsubsubsection.\arabic{paragraph}}%
+    \renewcommand*{\theHsubparagraph}{\theHparagraph.\arabic{subparagraph}}%
+  }
+
+

+

+

9.1.12 dblaccnt
+

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

+  \usepackage{hyperref}
+  \usepackage{dblaccnt}
+
+

or see entry for vietnam. +

+

9.1.13 easyeqn
+

Not compatible, breaks. +

+

9.1.14 ellipsis
+

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

+  \usepackage{hyperref}
+  \usepackage{ellipsis}
+
+

+

+

9.1.15 float
+ + +
+ \usepackage{float}
+  \usepackage{hyperref}
+
+

+

    +
  • 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.
+

+

9.1.16 endnotes
+

Unsupported. +

+

9.1.17 foiltex
+

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 +is now obsolete and causes an undefined error message about \@hyperfixhead. This is fixed in FoilTeX +2.1.4b. +

+

9.1.18 footnote
+

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

+

9.1.19 geometry
+

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: + + +

+    \documentclass[dvipdfm]{article}% or other classes
+    \usepackage{atbegshi}
+    \AtBeginDocument{%
+      \let\OrgAtBeginDvi\AtBeginDvi
+      \let\AtBeginDvi\AtBeginShipoutFirst
+    }
+    \usepackage[
+      paperwidth=170mm,
+      paperheight=240mm
+    ]{geometry}
+    \AtBeginDocument{%
+      \let\AtBeginDvi\OrgAtBeginDvi
+    }
+    \usepackage{hyperref}
+
+  or
+
+    \documentclass[dvipdfm]{article}% or other classes
+    \usepackage{atbegshi}
+    \let\AtBeginDvi\AtBeginShipoutFirst
+    \usepackage[
+      paperwidth=170mm,
+      paperheight=240mm
+    ]{geometry}
+    \usepackage{hyperref}
+
+

+

+

9.1.20 IEEEtran.cls
+

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

+

9.1.21 index
+

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

+

9.1.22 lastpage
+

Compatible. +

+

9.1.23 linguex
+ + +
+ \usepackage{hyperref}
+  \usepackage{linguex}
+
+

+

+

9.1.24 ltabptch
+ + +
+ \usepackage{longtable}
+  \usepackage{ltabptch}
+  \usepackage{hyperref}
+
+

+

+

9.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. +

+

9.1.26 minitoc-hyper
+

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

+

9.1.27 multind
+ + +
+ \usepackage{multind}
+  \usepackage{hyperref}
+
+

+

+

9.1.28 natbib
+ + +
+ \usepackage{natbib}
+  \usepackage{hyperref}
+
+

+

+

9.1.29 nomencl
+

Example for introducing links for the page numbers: + + +

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

+

+

9.1.30 ntheorem-hyper
+

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

For equations the following might work: + + +

+      \renewcommand*{\eqdeclaration}[1]{%
+        \hyperlink{equation.#1}{(Equation~#1)}%
+      }
+    But the mapping from the equation number to the anchor name
+    is not available in general.
+
+

+

+

9.1.31 parskip
+ + +
+ \usepackage{parskip}
+  \usepackage{hyperref}[2012/08/20]
+
+

+

Both packages want to redefine \@starttoc. +

+

9.1.32 prettyref
+ + +
+%%% example for prettyref %%%
+\documentclass{article}
+\usepackage{prettyref}
+\usepackage[pdftex]{hyperref}
+
+%\newrefformat{FIG}{Figure~\ref{#1}}% without hyperref
+\newrefformat{FIG}{\hyperref[{#1}]{Figure~\ref*{#1}}}
+
+\begin{document}
+  This is a reference to \prettyref{FIG:ONE}.
+  \newpage
+  \begin{figure}
+    \caption{This is my figure}
+    \label{FIG:ONE}
+  \end{figure}
+\end{document}
+%%% example for prettyref %%%
+      
+
+

+

+

9.1.33 setspace
+ + +
+ \usepackage{setspace}
+  \usepackage{hyperref}
+
+

+

+

9.1.34 sidecap
+ + +
+ Before 2002/05/24 v1.5h:
+    \usepackage{nameref}
+    \usepackage{hyperref}
+    \usepackage{sidecap}
+
+

+

+

9.1.35 subfigure
+ + +
+ 1995/03/06 v2.0:
+    \usepackage{subfigure}
+    \usepackage{hyperref}
+    % hypertexnames is set to false.
+  v2.1:
+    \usepackage{nameref}
+    \usepackage{subfigure}
+    \usepackage{hyperref}
+    or
+    \usepackage{hyperref}
+    \usepackage{subfigure}
+  v2.1.2:
+    please update
+  v2.1.3:
+    \usepackage{hyperref}
+    \usepackage{subfigure}
+    or vice versa?
+
+

+

+

9.1.36 titleref
+ + +
+ \usepackage{nameref}
+  \usepackage{titleref}% without usetoc
+  \usepackage{hyperref}
+
+

+

+

9.1.37 tabularx
+

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’. +

+

9.1.38 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). +

+

9.1.39 ucs/utf8x.def
+

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 +\PrerenderUnicode or \PreloadUnicodePage to solve this: + + +

+    \usepackage{ucs}
+    \usepackage[utf8x]{inputenc}
+    \usepackage{hyperref}% or with option unicode
+    \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 +characters directly. +

+

9.1.40 varioref
+

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 +order: + + +

+    \usepackage{nameref}
+    \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: +

    +
  • \Ref, \Vref do not uppercase the first letter. +
  • +
  • \vpageref[]{...} On the same page a previous space is not suppressed.
+

+

9.1.41 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): + + +

+  \documentclass{article}
+
+  % package order does not matter
+  \usepackage{verse}
+  \usepackage{hyperref}
+
+  \makeatletter
+  % make unique poemline anchors
+  \newcounter{verse@env}
+  \setcounter{verse@env}{0}
+  \let\org@verse\verse
+  \def\verse{%
+    \stepcounter{verse@env}%
+    \org@verse
+  }
+  \def\theHpoemline{\arabic{verse@env}.\thepoemline}
+
+  % add anchor for before \addcontentsline in \@vsptitle
+  \let\org@vsptitle\@vsptitle
+  \def\@vsptitle{%
+    \phantomsection
+    \org@vsptitle
+  }
+  \makeatother
+
+  \begin{document}
+
+  \poemtitle{Poem 1}
+  \begin{verse}
+  An one-liner.
+  \end{verse}
+
+  \newpage
+
+  \poemtitle{Poem 2}
+  \begin{verse}
+  Another one-liner.
+  \end{verse}
+
+  \end{document}
+
+

+

+

9.1.42 vietnam
+ + +
+ % pd1enc.def should be loaded before package dblaccnt:
+  \usepackage[PD1,OT1]{fontenc}
+  \usepackage{vietnam}
+  \usepackage{hyperref}
+
+

+

+

9.1.43 XeTeX
+

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 +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. +\csname HyPsd@XeTeXBigCharstrue\endcsname should no longer be used. +

+

10 Limitations5

+

10.1 Wrapped/broken link support

+

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

Workarounds: +

    +
  • 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 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 + points, especially within \url. (See thread “hyperref.sty, breaklinks and url.sty 3.2” in + comp.text.tex 2005-09).

+ + +

+

10.2 Links across pages

+

In general they have problems: +

    +
  • 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 + message can occur sometimes.
+

+

10.3 Footnotes

+

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 +\footnotemark to \footnotetext is not as strong as \ref to \label. Therefore it is not clear in general +which \footnotemark references which \footnotetext. But that is necessary to implement hyperlinking. +Thus the implementation of hyperref does not support the optional argument of \footnotemark and +\footnotetext. +

+

11 Hints6

+

11.1 Spaces in option values

+

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 + + +

+    pdfborder=001
+
+

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 \hypersetup + + +

+    \hypersetup{pdfborder=0 0 1}
+
+

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 +packages kvoptions-patch (from project kvoptions) or xkvltxp (from project xsetkeys). +

+

11.2 Index with makeindex

+
    +
  • 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 + in anchor names in arabic form. If the page numbers in other formats are used (book class + with \frontmatter, \romannumbering, ...), then the page anchors are not unique. Therefore + option 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 \hyperpage command. With + logical markup this situation can easily be solved: + + +
    +           \usepackage{makeidx}
    +           \makeindex
    +           \usepackage[hyperindex]{hyperref}
    +           \newcommand*{\main}[1]{\textbf{\hyperpage{#1}}}
    +           ...
    +           \index{Some example|main}
    +
    +

    +

  • +
  • Scientic Word/Scientific WorkPlace users can use package robustindex with hyperindex=false. +
  • +
  • Other encap characters can be set by option encap. Example for use of “?”: + + +
    +           \usepackage[encap=?]{hyperref}
    +
    +

    +

  • +
  • Another possibility is the insertion of \hyperpage by a style file for makeindex. For this case, + hyperref’s insertion will be disabled by hyperindex=false. \hyperpage will be defined regardless of + setting of hyperindex. + + +
    +     %%% cut %%% hyperindex.ist %%% cut %%%
    +     delim_0 ", \\hyperpage{"
    +     delim_1 ", \\hyperpage{"
    +     delim_2 ", \\hyperpage{"
    +     delim_n "}, \\hyperpage{"
    +     delim_t "}"
    +     encap_prefix "}\\"
    +     encap_infix "{\\hyperpage{"
    +     encap_suffix "}"
    +     %%% cut %%% hyperindex.ist %%% cut %%%
    +
    +

+

+

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

+

Getting rid of it: + + +

+\makeatletter
+\providecommand*{\toclevel@<foobar>}{0}
+\makeatother
+
+

+

+

11.4 Link anchors in figures

+

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. +

+

11.5 Additional unicode characters in bookmarks and pdf information entries:

+ + +
+\documentclass[pdftex]{article}
+\usepackage[unicode]{hyperref}
+
+

+

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 (\.{a}, \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 +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 9 (8 and 9 cannot occur in octal +numbers): + + +

+    \002\047 -> \9002\047
+    \036\241 -> \9036\241
+
+

+

Optional: 8 is used for abbreviations: + + +

+    \900 = \80, \901 = \81, \902 = \82, ...
+
+    \9002\047 -> \82\047
+
+

+

5. Declare the character with LaTeX: + + +

+\DeclareTextCompositeCommand{\.}{PU}{a}{\82\047}
+\DeclareTextCompositeCommand{\d}{PU}{a}{\9036\241}
+
+\begin{document}
+\section{\={a}, \d{a}, \’{a}, \.{a}}
+\end{document}
+      
+
+

+

+

11.6 Footnotes

+

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 +hyperfootnotes=false or fiddle with internal macros, nasty examples: + + +

+\documentclass{article}
+\usepackage{hyperref}
+\begin{document}
+Hello%
+\footnote{The first footnote}
+World%
+\addtocounter{footnote}{-1}%
+\addtocounter{Hfootnote}{-1}%
+\footnotemark.
+\end{document}
+
+  or
+
+\documentclass{article}
+
+\usepackage{hyperref}
+
+\begin{document}
+
+\makeatletter
+
+A%
+  \footnotemark
+  \let\saved@Href@A\Hy@footnote@currentHref
+  % remember link name
+B%
+  \footnotemark
+  \let\saved@Href@B\Hy@footnote@currentHref
+b%
+  \addtocounter{footnote}{-1}%
+  \addtocounter{Hfootnote}{-1}% generate the same anchor
+  \footnotemark
+C%
+  \footnotemark
+  \let\saved@Href@C\Hy@footnote@currentHref
+
+  \addtocounter{footnote}{-2}%
+  \let\Hy@footnote@currentHref\saved@Href@A
+\footnotetext{AAAA}%
+  \addtocounter{footnote}{1}%
+  \let\Hy@footnote@currentHref\saved@Href@B
+\footnotetext{BBBBB}%
+  \addtocounter{footnote}{1}%
+  \let\Hy@footnote@currentHref\saved@Href@C
+\footnotetext{CCCC}%
+
+\end{document}
+
+

+ +

+

11.7 Subordinate counters

+

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 \@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 +meaning of \@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 \newtheorem, problematic case: + + +

+    \newtheorem{corA}{CorollaryA}[section]
+    \usepackage{hyperref}
+
+

Solution a) + + +

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

Solution b) + + +

+    \newtheorem{corA}{CorollaryA}[section]
+    \usepackage{hyperref}
+    \newcommand*{\theHcorA}{\theHsection.\number\value{corA}}
+
+

+

+

12 History and acknowledgments

+

The original authors of hyperbasics.tex and hypertex.sty, from which this package descends, are +Tanmoy Bhattacharya and Thorsten Ohl. Package hyperref started as a simple port of their +work to LATEX2ε standards, but eventually I rewrote nearly everything, because I didn’t +understand a lot of the original, and was only interested in getting it to work with LATEX. I +would like to thank Arthur Smith, Tanmoy Bhattacharya, Mark Doyle, Paul Ginsparg, David +Carlisle, T. V. Raman and Leslie Lamport for comments, requests, thoughts and code to +get the package into its first useable state. Various other people are mentioned at the point +in the source where I had to change the code in later versions because of problems they +found. +

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 dvipsone and dviwindo drivers. +Sergey Lesenko provided the changes needed for dvipdf, and Hn Th Thnh supplied all +the information needed for pdftex. Patrick Daly kindly updated his natbib package to allow +easy integration with hyperref. Michael Mehlich’s 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 +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 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 +hyperref. + + +

13 GNU Free Documentation License

+

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 +“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 +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 +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. +

+

13.1 Applicability and definitions

+

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 +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 +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 +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 +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 +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 +for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an +otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or +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 +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 +proprietary formats that can be read and edited only by proprietary word processors, SGML +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 +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 +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 +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. +

+

13.2 Verbatim copying

+

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 +copies you make or distribute. However, you may accept compensation in exchange for copies. +If you distribute a large enough number of copies you must also follow the conditions in +section 13.3. +

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

+

13.3 Copying in quantity

+

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 +identify you as the publisher of these copies. The front cover must present the full title with all +words of the title equally prominent and visible. You may add other material on the covers in +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 +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 +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 +of added material. If you use the latter option, you must take reasonably prudent steps, when you +begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will +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 +redistributing any large number of copies, to give them a chance to provide you with an updated version +of the Document. +

+

13.4 Modifications

+

You may copy and distribute a Modified Version of the Document under the conditions of sections 13.2 +and 13.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, + 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. +
  3. 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. +
  4. +
  5. State on the Title page the name of the publisher of the Modified Version, as the publisher. + + +
  6. +
  7. Preserve all the copyright notices of the Document. +
  8. +
  9. Add an appropriate copyright notice for your modifications adjacent to the other copyright + notices. +
  10. +
  11. 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. +
  12. +
  13. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts + given in the Document’s license notice. +
  14. +
  15. Include an unaltered copy of this License. +
  16. +
  17. 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 + describing the Modified Version as stated in the previous sentence. +
  18. +
  19. 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 + Document itself, or if the original publisher of the version it refers to gives permission. +
  20. +
  21. 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. +
  22. +
  23. 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. +
  24. +
  25. Delete any section Entitled “Endorsements”. Such a section may not be included in the + Modified Version. +
  26. +
  27. Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with + any Invariant Section. +
  28. +
  29. Preserve any Warranty Disclaimers. +
+ + +

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 +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 +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 +names for publicity for or to assert or imply endorsement of any Modified Version. +

+

13.5 Combining documents

+

You may combine the Document with other documents released under this License, under the terms +defined in section 13.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 +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 +documents, forming one section Entitled “History”; likewise combine any sections Entitled +“Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled +“Endorsements”. +

+

13.6 Collections of documents

+

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 +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. +

+ + +

13.7 Aggregation with independent works

+

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 13.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. +

+

13.8 Translation

+

Translation is considered a kind of modification, so you may distribute translations of the Document +under the terms of section 13.4. Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include translations of some or all Invariant +Sections in addition to the original versions of these Invariant Sections. You may include a translation of +this License, and all the license notices in the Document, and any Warranty Disclaimers, +provided that you also include the original English version of this License and the original +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 +requirement (section 13.4) to Preserve its Title (section 13.1) will typically require changing the actual +title. +

+

13.9 Termination

+

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. +

+

13.10 Future revisions of this license

+

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 +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 +put the following copyright and license notices just after the title page: +

+

+

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.” +line with this: +

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 +those two alternatives to suit the situation. +

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 new file mode 100644 index 0000000000..d25eb36501 Binary files /dev/null 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 new file mode 100644 index 0000000000..f1e1895645 --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.tex @@ -0,0 +1,3816 @@ +% This is the manual for the LaTeX hyperref package. +% +% Copyright (C) 1998-2003 Sebastian Rahtz. +% Copyright (C) 2003 Steve Peter and Karl Berry +% Copyright (C) 2006-2012 Heiko Oberdiek. +% Copyright (C) 2017-2019 David Carlisle Ulrike Fischer +% Copyright (C) 2019-2020 The LaTeX3 Project +% +% Permission is granted to copy, distribute and/or modify this document +% under the terms of the GNU Free Documentation License, Version 1.1 or +% any later version published by the Free Software Foundation; with no +% Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +% Texts. A copy of the license is included in the section entitled +% ``GNU Free Documentation License.'' +% + +\def\mydate{January 2020} + +\RequirePackage{iftex} +\ifpdf % We are running pdfTeX in pdf mode +\ifx\directlua\undefinded +\documentclass[pdftex]{article} +\else +\documentclass[luatex]{article} +\fi +\else +\documentclass{article} +\fi + + +\usepackage{pifont} +\usepackage{calc} + +\usepackage{hologo} + +\def\OzTeX{O\kern-0.03em z\kern-0.15em \TeX} + +\newcommand*{\cs}[1]{% + \texttt{\textbackslash #1}% +} +\newcommand*{\xpackage}[1]{\textsf{#1}} +\newcommand*{\xoption}[1]{\textsf{#1}} + +% from doc.sty +\makeatletter +\ifx\l@nohyphenation\@undefined +\newlanguage\l@nohyphenation +\fi +\ifx\l@nohyphenation\@undefined + \newlanguage\l@nohyphenation +\fi +\DeclareRobustCommand\meta[1]{% + \ensuremath\langle + \ifmmode \expandafter \nfss@text \fi + {% + \meta@font@select + \edef\meta@hyphen@restore + {\hyphenchar\the\font\the\hyphenchar\font}% + \hyphenchar\font\m@ne + \language\l@nohyphenation + #1\/% + \meta@hyphen@restore + }% + \ensuremath\rangle +} +\def\meta@font@select{\ttfamily\itshape} +\makeatother + +% Page layout. +\advance\textwidth by 1.1in +\advance\oddsidemargin by -.55in +\advance\evensidemargin by -.55in +% +\advance\textheight by 1in +\advance\topmargin by -.5in +\advance\footskip by -.5in +% +\pagestyle{headings} +% +% Avoid some overfull boxes. +\emergencystretch=.1\hsize +\hbadness = 3000 + +% these are from lshort.sty, but lshort.sty pulls in so many other +% packages it seems cleaner to just include them here. +% +\newcommand{\bs}{\symbol{'134}}%Print backslash +\newcommand{\ci}[1]{\texttt{\bs#1}} + +\makeatletter +\@ifpackageloaded{tex4ht}{% + % separate definition for HTML case to avoid + % nasty borders with double horizontal lines with + % large gaps. + \newsavebox{\cmdsyntaxbox}% + \newenvironment{cmdsyntax}{% + \par + % \small + \addvspace{3.2ex plus 0.8ex minus 0.2ex}% + \vskip -\parskip + \noindent + \begin{lrbox}{\cmdsyntaxbox}% + \begin{tabular}{l}% + \rule{0pt}{1em}% + \ignorespaces + }{% + \end{tabular}% + \end{lrbox}% + \fbox{\usebox{\cmdsyntaxbox}}% + \par + \nopagebreak + \addvspace{3.2ex plus 0.8ex minus 0.2ex}% + \vskip -\parskip + }% +}{% + \newenvironment{cmdsyntax}{% + \par + \small + \addvspace{3.2ex plus 0.8ex minus 0.2ex}% + \vskip -\parskip + \noindent + \begin{tabular}{|l|}% + \hline + \rule{0pt}{1em}% + \ignorespaces + }{% + \\% + \hline + \end{tabular}% + \par + \nopagebreak + \addvspace{3.2ex plus 0.8ex minus 0.2ex}% + \vskip -\parskip + }% +} +\makeatother + +\usepackage{array,longtable} +\ifnum 0\ifluatex 1\else\ifxetex 1\fi\fi=0 % + \usepackage[T1]{fontenc}% + \usepackage{lmodern}% + \renewcommand*{\ttdefault}{lmvtt}% +\else + \usepackage{fontspec}% + \renewcommand*{\ttdefault}{lmvtt}% +\fi + +\newcommand*{\Quote}[1]{\textquotedblleft#1\textquotedblright} + +\def\Hanh{H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh} + +\ifpdf + \usepackage[% +% pdftex,% might be luatex, just allow automatic default + colorlinks,% + hyperindex,% + plainpages=false,% + bookmarksopen,% + bookmarksnumbered, + pdfusetitle,% + ]{hyperref} + %%?? \def\pdfBorderAttrs{/Border [0 0 0] } % No border arround Links +\else + \usepackage{hyperref} +\fi + +\makeatletter +\@ifpackageloaded{tex4ht}{% +\author{Sebastian Rahtz (deceased)\and + Heiko Oberdiek (inactive)\and + The \LaTeX3 Project (\url{https://github.com/latex3/hyperref/issues})} +}{% + \usepackage{bmhydoc}% +\author{Sebastian Rahtz\thanks{deceased}\and + Heiko Oberdiek\thanks{inactive}\and + The \LaTeX3 Project\thanks{\url{https://github.com/latex3/hyperref/issues}}} +} +\makeatother +\title{Hypertext marks in \hologo{LaTeX}: a manual for \xpackage{hyperref}} +\date{2021-02-07 v7.00h} + +\begin{document} + +% comes out too close to the toc, and we know it's page one anyway. +\thispagestyle{empty} +\maketitle +\tableofcontents +\setcounter{tocdepth}{2}% for bookmark levels + +\section{Introduction} + +The package derives from, and builds on, the work of the Hyper\hologo{TeX} +project, described at \texttt{http://xxx.lanl.gov/hypertex/}\footnote{Now: \url{https://ctan.org/tex-archive/support/hypertex/hypertex}}. It extends +the functionality of all the \hologo{LaTeX} cross-referencing commands +(including the table of contents, bibliographies etc) to produce +\cs{special} commands which a driver can turn into hypertext links; +it also provides new commands to allow the user to write \emph{ad hoc} +hypertext links, including those to external documents and URLs. + +The package is currently maintained at \url{https://github.com/latex3/hyperref/} and issues should +be reported there. + +This manual provides a brief overview of the \xpackage{hyperref} +package. For more details, you should read the additional documentation +distributed with the package, as well as the complete documentation by +processing \texttt{hyperref.dtx}. You should also read the chapter on +\xpackage{hyperref} in \textit{The \hologo{LaTeX} Web Companion}, where you will +find additional examples. + +The Hyper\hologo{TeX} specification\footnote{This is borrowed from an article +by Arthur Smith.} says that conformant viewers/translators must +recognize the following set of \cs{special} constructs: + +\begin{description} +\item[href:] \verb|html:| +\item[name:] \verb|html:| +\item[end:] \verb|html:| +\item[image:] \verb|html:| +\item[base\_name:] \verb|html:| +\end{description} + +The \emph{href}, \emph{name} and \emph{end} commands are used to do the +basic hypertext operations of establishing links between sections of +documents. The \emph{image} command is intended (as with current HTML +viewers) to place an image of arbitrary graphical format on the page in +the current location. The \emph{base\_name} command is be used to +communicate to the DVI viewer the full (URL) location of the current +document so that files specified by relative URLs may be retrieved +correctly. + +The \emph{href} and \emph{name} commands must be paired with an +\emph{end} command later in the \TeX\ file---the \TeX\ commands between +the two ends of a pair form an \emph{anchor} in the document. In the +case of an \emph{href} command, the \emph{anchor} is to be highlighted +in the \emph{DVI viewer}, and when clicked on will cause the scene to +shift to the destination specified by \emph{href\_string}. The +\emph{anchor} associated with a name command represents a possible +location to which other hypertext links may refer, either as local +references (of the form \verb|href="#name_string"| with the +\emph{name\_string} identical to the one in the name command) or as part +of a URL (of the form \emph{URL\#name\_string}). Here +\emph{href\_string} is a valid URL or local identifier, while +\emph{name\_string} could be any string at all: the only caveat is that +`$\verb|"|$' characters should be escaped with a backslash +($\backslash$), and if it looks like a URL name it may cause problems. + +However, the drivers intended to produce \emph{only} PDF use literal +PostScript or PDF \verb|\special| commands. The commands are defined in +configuration files for different drivers, selected by package options; +at present, the following drivers are supported: + +\begin{description} +\item[hypertex] DVI processors conforming to the Hyper\TeX\ guidelines (i.e.\ \textsf{xdvi}, \textsf{dvips} (with +the \textsf{-z} option), \textsf{\OzTeX}, and \textsf{Textures}) +\item[dvips] produces \verb|\special| commands tailored for \textsf{dvips} +\item[dvipsone] produces \verb|\special| commands tailored for \textsf{dvipsone} +\item[ps2pdf] a special case of output suitable for processing by earlier versions of Ghost\-script's +PDF writer; this is basically the same as that for \textsf{dvips}, but a few variations remained before version 5.21 +\item[tex4ht] produces \verb|\special| commands for use with \textsf{\TeX4ht} +\item[pdftex] pdf\TeX, \Hanh{}'s \TeX{} variant that writes PDF directly +\item[luatex] lua\TeX, Unicode \TeX{} variant that writes PDF directly +\item[dvipdfm] produces \verb|\special| commands for Mark Wicks' DVI to PDF driver \textsf{dvipdfm} +\item[dvipdfmx] produces \verb|\special| commands for driver + \textsf{dvipdfmx}, a successor of \textsf{dvipdfm} +\item[dviwindo] produces \verb|\special| commands that Y\&Y's Windows previewer interprets as hypertext jumps within the previewer +\item[vtex] produces \verb|\special| commands that MicroPress' HTML and + PDF-producing \TeX\ variants interpret as hypertext jumps within the + previewer +\item[textures] produces \verb|\special| commands that \textsf{Textures} interprets as hypertext jumps within the previewer +\item[xetex] produces \verb|\special| commands for Xe\TeX{} +\end{description} + +Output from \textsf{dvips} or \textsf{dvipsone} must be processed using +Acrobat Distiller to obtain a PDF file.\footnote{Make sure you turn off +the partial font downloading supported by \textsf{dvips} and +\textsf{dvipsone} in favor of Distiller's own system.} The result is +generally preferable to that produced by using the \textsf{hypertex} +driver, and then processing with \textsf{dvips -z}, but the DVI file is +not portable. The main advantage of using the Hyper\TeX\ \ci{special} +commands is that you can also use the document in hypertext DVI viewers, +such as \textsf{xdvi}. + +\begin{description} +\item[driverfallback] + If a driver is not given and cannot be autodetected, then use + the driver option, given as value to this option \textsf{driverfallback}. + Example: + \begin{quote} + \texttt{driverfallback=dvipdfm} + \end{quote} + Autodetected drivers (\textsf{pdftex}, \textsf{xetex}, \textsf{vtex}, + \textsf{vtexpdfmark}) are recognized from within \TeX\ and + therefore cannot be given as value to option \textsf{driverfallback}. + However a DVI driver program is run after the \TeX\ run is finished. + Thus it cannot be detected at \TeX\ macro level. Then package + \xpackage{hyperref} + uses the driver, given by \textsf{driverfallback}. If the driver + is already specified or can be autodetected, then option + \textsf{driverfallback} is ignored. +\end{description} + +\section{Implicit behavior} + +This package can be used with more or less any normal \LaTeX\ document +by specifying in the document preamble + +\begin{verbatim} +\usepackage{hyperref} +\end{verbatim} + +Make sure it comes \emph{last} of your loaded packages, to give it a +fighting chance of not being over-written, since its job is to redefine +many \LaTeX\ commands. Hopefully you will find that all cross-references +work correctly as hypertext. For example, \ci{section} commands will +produce a bookmark and a link, whereas \ci{section*} commands will only +show links when paired with a corresponding \ci{addcontentsline} +command. + +In addition, the \texttt{hyperindex} option (see below) attempts to make +items in the index by hyperlinked back to the text, and the option +\texttt{backref} inserts extra `back' links into the bibliography for +each entry. Other options control the appearance of links, and give +extra control over PDF output. For example, \texttt{colorlinks}, as its +name well implies, colors the links instead of using boxes; this is the +option used in this document. + + +\section{Package options} + +All user-configurable aspects of \xpackage{hyperref} are set using a +single `key=value' scheme (using the \xpackage{keyval} package) with the +key \texttt{Hyp}. The options can be set either in the optional argument +to the \cs{usepackage} command, or using the \cs{hypersetup} +macro. When the package is loaded, a file \texttt{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 \texttt{unicode}) can only be used as +package options, and not in \verb|\hypersetup| as the option settings are processed +as the package is read. + +As an example, the behavior of a particular file could be controlled by: +\begin{itemize} + +\item a site-wide \texttt{hyperref.cfg} setting up the look of links, +adding backreferencing, and setting a PDF display default: + +\begin{verbatim} +\hypersetup{backref, +pdfpagemode=FullScreen, +colorlinks=true} +\end{verbatim} + +\item A global option in the file, which is passed down to +\textsf{hyperref}: + +\begin{verbatim} +\documentclass[dvips]{article} +\end{verbatim} + +\item File-specific options in the \cs{usepackage} commands, which +override the ones set in \texttt{hyperref.cfg}: + +\begin{verbatim} +\usepackage[colorlinks=false]{hyperref} +\hypersetup{pdftitle={A Perfect Day}} +\end{verbatim} +\end{itemize} + +As seen in the previous example, information entries +(pdftitle, pdfauthor, \dots) 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 \verb|\hypersetup|. + +\begin{verbatim} +\usepackage[pdfborder={0 0 0}]{hyperref} +\hypersetup{pdfborder=0 0 0} +\end{verbatim} + +Package `kvoptions-patch' patches \LaTeX\ to make it aware +of key value options and to prevent premature value expansions. + +Some options can be given at any time, but many are restricted: before +\verb|\begin{document}|, only in \verb|\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 true if used. These are the ones classed as +`boolean'. The values true and false can always be specified, however. + +\subsection{General options} + +Firstly, the options to specify general behavior and page size. + +\medskip +\begin{longtable}{>{\ttfamily}ll>{\itshape}ll} +draft & boolean & false & all hypertext options are turned off \\ +final & boolean & true & all hypertext options are turned on \\ +debug & boolean & false & extra diagnostic messages are printed in \\ + & & & the log file \\ +verbose & boolean & false & same as debug \\ +implicit & boolean & true & redefines \LaTeX\ internals \\ +setpagesize & boolean & true & sets page size by special driver commands +\end{longtable} + +\subsection{Options for destination names} + +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 \cs{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: +\begin{quote} + \verb|chapter.4| +\end{quote} +This scheme is used by: +\begin{description} +\item[\cs{autoref}] displays the description label for the + reference depending on the counter name. +\item[\cs{hyperpage}] is used by the index to get +page links. Page anchor setting (\verb|pageanchor|) must not +be turned off. +\end{description} + +It is very important that the destination names are unique, +because two destinations must not share the same name. +The counter value \cs{the} 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 +number. Therefore \xpackage{hyperref} has introduced \cs{theH} +that allows a unique counter value without messing up with +the appearance of the counter number. For example, the number +of the second table in the third chapter might be printed +as \texttt{2}, the result of \cs{thetable}. But the +destination name \texttt{table.2.4} is unique because it +has used \cs{theHtable} that gives \verb|2.4| in this case. + +Often the user do not need to set \cs{theH}. Defaults +for standard cases (chapter, \dots) are provided. And after \xpackage{hyperref} +is loaded, new counters with parent counters also define +\cs{theH} automatically, if \cs{newcounter}, \cs{@addtoreset} +or \cs{numberwithin} of package \xpackage{amsmath} are used. + +Usually problems with duplicate destination names can be solved +by an appropriate definition of \cs{theH}. If option +\texttt{hypertexnames} is disabled, then a unique artificial +number is used instead of the counter value. In case of page +anchors the absolute page anchor is used. With option \texttt{plainpages} +the page anchors use the arabic form. In both latter cases \cs{hyperpage} +for index links is affected and might not work properly. + +If an unnumbered entity gets an anchor (starred forms of +chapters, sections, \dots) or \cs{phantomsection} is used, +then the dummy counter name \texttt{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, because both documents might +contain \texttt{chapter.1} or \texttt{page.1}. Also \xpackage{hyperref} +sets anchor with name \texttt{Doc-Start} at the begin of the document. +This can be resolved by redefining \cs{HyperDestNameFilter}. +Package \xpackage{hyperref} calls this macro each time, it uses a +destination name. +The macro must be expandable and expects the destination name +as only argument. As example, the macro is redefined to add +a prefix to all destination names: +\begin{quote} +\begin{verbatim} +\renewcommand*{\HyperDestNameFilter}[1]{\jobname-#1} +\end{verbatim} +\end{quote} +In document \texttt{docA} the destination name \texttt{chapter.2} +becomes \texttt{docA-chapter.2}. + +Destination names can also be used from the outside in URIs(, if the +driver has not removed or changed them), for example: +\begin{quote} +\begin{verbatim} +http://somewhere/path/file.pdf#nameddest=chapter.4 +\end{verbatim} +\end{quote} +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 +\cs{label} after the anchor setting seems a good approximation: +\begin{quote} +\begin{verbatim} + \section{Introduction} + \label{intro} +\end{verbatim} +\end{quote} +Option \texttt{destlabel} checks for each \cs{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 anchor setting, the new name is recorded in the \texttt{.aux} +file and used in the subsequent \hologo{LaTeX} run. The renaming is done by +a redefinition of \cs{HyperDestNameFilter}. That leaves the old +destination names intact (e.g., they are needed for \cs{autoref}). +This redefinition is also available as \cs{HyperDestLabelReplace}, +thus that an own redefinition can use it. +The following example also adds a prefix for \emph{all} destination names: +\begin{quote} +\begin{verbatim} +\renewcommand*{\HyperDestNameFilter}[1]{% + \jobname-\HyperDestLabelReplace{#1}% +} +\end{verbatim} +\end{quote} +The other case that only files prefixed that do not have a corresponding +\cs{label} is more complicate, because \cs{HyperDestLabelReplace} needs +the unmodified destination name as argument. This is solved by an +expandable string test (\cs{pdfstrcmp} of \hologo{pdfTeX} +or \cs{strcmp} of \hologo{XeTeX}, package \xpackage{pdftexcmds} also supports +\hologo{LuaTeX}): +\begin{quote} +\begin{verbatim} +\usepackage{pdftexcmds} +\makeatletter +\renewcommand*{\HyperDestNameFilter}[1]{% + \ifcase\pdf@strcmp{#1}{\HyperDestLabelReplace{#1}} % + \jobname-#1% + \else + \HyperDestLabelReplace{#1}% + \fi +} +\makeatother +\end{verbatim} +\end{quote} + +With option \texttt{destlabel} destinations can also named manually, +if the destination is not yet renamed: +\begin{quote} +\verb|\HyperDestRename{|\meta{destination}\verb|}{|\meta{newname}\verb|}| +\end{quote} + +Hint: Anchors can also be named and set by \cs{hypertarget}. + +\medskip +\begin{longtable}{>{\ttfamily}ll>{\itshape}ll} +destlabel & boolean & false & destinations are named by first \cs{label}\\ + & & & after anchor creation\\ +hypertexnames & boolean & true & use guessable names for links \\ +naturalnames & boolean & false & use \LaTeX-computed names for links \\ +plainpages & boolean & false & Forces page anchors to be named by the Arabic form \\ + & & & of the page number, rather than the formatted form. \\ +\end{longtable} + +\subsection{Configuration options} + +\begin{longtable}{>{\ttfamily}ll>{\itshape}lp{9cm}} +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 +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 + valid hyperlinks. \\ +nesting & boolean & false & Allows links to be nested; no drivers currently support this. +\end{longtable} + +Note for option \verb|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. + +\subsection{Backend drivers} + +If no driver is specified, the package tries to find a driver in +the following order: +\begin{enumerate} +\item Autodetection, some \TeX\ processors can be detected at \TeX\ macro + level (pdf\TeX, Xe\TeX, V\TeX). +\item Option \textsf{driverfallback}. If this option is set, its value + is taken as driver option. +\item Macro \cs{Hy@defaultdriver}. The macro takes a driver file + name (without file extension). +\item Package default is \textsf{hypertex}. +\end{enumerate} +Many distributions are using a driver file \texttt{hypertex.cfg} that +define \cs{Hy@defaultdriver} with \texttt{hdvips}. This is recommended +because driver \textsf{dvips} provides much more features than +\textsf{hypertex} for PDF generation. + +\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. \\ +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.\\ +ps2pdf & Redefines a few macros for compatibility with + Ghostscript's PDF writer, otherwise identical to + \textsf{dvips}. \\ +tex4ht & For use with \textsf{\TeX4ht} \\ +textures & For use with \textsf{Textures} \\ +vtex & For use with MicroPress' \textsf{VTeX}; the PDF + and HTML backends are detected automatically. \\ +vtexpdfmark & For use with \textsf{VTeX}'s PostScript backend. \\ +xetex & For use with Xe\TeX\ (using backend for dvipdfm). +\end{longtable} +\smallskip + +If you use \textsf{dviwindo}, you may need to redefine the macro +\ci{wwwbrowser} (the default is \verb|C:\netscape\netscape|) to tell +\textsf{dviwindo} what program to launch. Thus, users of Internet +Explorer might add something like this to hyperref.cfg: + +\begin{verbatim} +\renewcommand{\wwwbrowser}{C:\string\Program\space + Files\string\Plus!\string\Microsoft\space + Internet\string\iexplore.exe} +\end{verbatim} + +\subsection{Extension options} +\begin{longtable}{@{}>{\ttfamily}ll>{\itshape}lp{8cm}@{}} +extension & text & & Set the file extension (e.g.\ \textsf{dvi}) which will be appended to file links + created if you use the \xpackage{xr} package. \\ +hyperfigures & boolean & & \\ +backref & text & false & Adds `backlink' text to the end of each item in the bibliography, as a list of + section numbers. This can only work properly \emph{if} there is a blank line after + each \verb|\bibitem|. Supported values are \verb|section|, \verb|slide|, \verb|page|, + \verb|none|, or \verb|false|. If no value is given, \verb|section| is taken as default.\\ +pagebackref & boolean & false & Adds `backlink' text to the end of each item in the bibliography, as a list of page + numbers. \\ +hyperindex & boolean & true & Makes the page numbers of index entries into hyperlinks. Relays on unique + page anchors (\verb|pageanchor|, \ldots) + \verb|pageanchors| and \verb|plainpages=false|. \\ +hyperfootnotes & boolean & true & Makes the footnote marks into hyperlinks to the footnote text. + Easily broken \ldots\\ +encap & & & Sets encap character for hyperindex \\ +linktoc & text & section & make text (\verb|section|), page number (\verb|page|), both (\verb|all|) or nothing (\verb|none|) be link on TOC, LOF and LOT \\ +linktocpage & boolean & false & make page number, not text, be link on TOC, LOF and LOT \\ +breaklinks & boolean & false & allow links to break over lines by making links over multiple lines into PDF links to + the same target \\ +colorlinks & boolean & false & 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 links. + Unlike colored boxes, the colored + text remains when printing.\\ +linkcolor & color & red & Color for normal internal links. \\ +anchorcolor & color & black & Color for anchor text. Ignored by most drivers. \\ +citecolor & color & green & Color for bibliographical citations in text. \\ +filecolor & color & cyan & Color for URLs which open local files. \\ +menucolor & color & red & Color for Acrobat menu items. \\ +runcolor & color & filecolor & Color for run links (launch annotations). \\ +urlcolor & color & magenta & Color for linked URLs. \\ +allcolors & color & & Set all color options (without border and field options).\\ +frenchlinks & boolean & false & Use small caps instead of color for links.\\ +hidelinks & & & Hide links (removing color and border). \\ +\end{longtable} \smallskip + +Note that all color names must be defined before use, following the +normal system of the standard \LaTeX\ \xpackage{color} package. + +\subsection{PDF-specific display options} +\begin{longtable}{@{}>{\ttfamily}ll>{\itshape}lp{7.6cm}@{}} +bookmarks & boolean & true & 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 \texttt{.out}) may be needed to + translate \LaTeX\ codes, since bookmarks must be written in PDFEncoding. + To aid this process, the \texttt{.out} file is not rewritten by \LaTeX\ + if it is edited to contain a line \verb|\let\WriteBookmarks\relax| \\ +bookmarksopen & boolean & false & If Acrobat bookmarks are requested, show them with all the subtrees + expanded. \\ +bookmarksopenlevel & parameter & & level (\ci{maxdimen}) to which bookmarks are open \\ +bookmarksnumbered & boolean & false & If Acrobat bookmarks are requested, include section numbers. \\ +bookmarkstype & text & toc & to specify which `toc' file to mimic \\ +CJKbookmarks & boolean & false & + This option should be used to produce CJK bookmarks. + Package \verb|hyperref| + 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 + 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 translate non-Unicode bookmarks to + Unicode; for portable PDF documents only Unicode encoding should + be used.\\ +pdfhighlight & name & /I & 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). \\ +citebordercolor & RGB color & 0 1 0 & The color of the box around citations \\ +filebordercolor & RGB color & 0 .5 .5 & The color of the box around links to files \\ +linkbordercolor & RGB color & 1 0 0 & The color of the box around normal links \\ +menubordercolor & RGB color & 1 0 0 & The color of the box around Acrobat menu links \\ +urlbordercolor & RGB color & 0 1 1 & The color of the box around links to URLs \\ +runbordercolor & RGB color & 0 .7 .7 & Color of border around `run' links \\ +allbordercolors & & & Set all border color options \\ +pdfborder & & 0 0 1 & 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. +\end{longtable} + +Note that the color of link borders can be specified \emph{only} as 3 +numbers in the range 0..1, giving an RGB color. You cannot use colors +defined in \TeX. Since version 6.76a this is no longer true. +Especially with the help of package \xpackage{xcolor} the usual +color specifications of package \xpackage{(x)color} can be used. +For further information see description of package \xpackage{hycolor}. + +The bookmark commands are stored in a file called +\textit{jobname}\texttt{.out}. The files is not processed by \LaTeX\ so +any markup is passed through. You can postprocess this file as needed; +as an aid for this, the \texttt{.out} file is not overwritten on the +next \TeX\ run if it is edited to contain the line +\begin{verbatim} +\let\WriteBookmarks\relax +\end{verbatim} + +\subsection{PDF display and information options} +\begin{longtable}{@{}>{\ttfamily}l>{\raggedright}p{\widthof{key value}}>{\itshape}lp{7cm}@{}} +baseurl & URL & & Sets the base URL of the PDF document \\ +pdfpagemode & name & empty & Determines how the file is opening in Acrobat; the possibilities are + \verb|UseNone|, \verb|UseThumbs| (show thumbnails), \verb|UseOutlines| + (show bookmarks), \verb|FullScreen|, \verb|UseOC| (PDF 1.5), + and \verb|UseAttachments| (PDF 1.6). If no mode if explicitly chosen, but the + bookmarks option is set, \verb|UseOutlines| is used. \\ +pdftitle & text & & Sets the document information Title field \\ +pdfauthor & text & & Sets the document information Author field \\ +pdfsubject & text & & Sets the document information Subject field \\ +pdfcreator & text & & Sets the document information Creator field \\ +addtopdfcreator & text & & Adds additional text to the document information Creator field \\ +pdfkeywords & text & & Sets the document information Keywords field \\ +pdftrapped & name & empty & Sets the document information Trapped entry. Possible values are \verb|True|, \verb|False| and \verb|Unknown|. + An empty value means, the entry is not set.\\ +% +pdfinfo & key value list & empty & Alternative interface for setting the + document information.\\ +pdfview & name & XYZ & Sets the default PDF `view' for each link \\ +pdfstartpage & integer & 1 & Determines on which page the PDF file is opened. An empty value means, the entry is not set.\\ +pdfstartview & name & Fit & Set the startup page view \\ +pdfremotestartview & name & Fit & Set the startup page view of remote PDF files \\ +pdfpagescrop & n n n n & & Sets the default PDF crop box for pages. This should be a set of four numbers \\ +pdfcenterwindow & boolean & false & position the document window in the center of the screen \\ +pdfdirection & name & empty & direction setting. Possible values: \verb|L2R| (left to right) and + \verb|R2L| (right to left)\\ +pdfdisplaydoctitle & boolean & false & display document title instead of file name in title bar\\ +pdfduplex & name & empty & paper handling option for print dialog. Possible vatues are: + \verb|Simplex| (print single-sided), + \verb|DuplexFlipShortEdge| (duplex and flip on the short edge of the sheet), + \verb|DuplexFlipLongEdge| (duplex and flip on the long edge of the sheet)\\ + +pdffitwindow & boolean & false & resize document window to fit document size \\ +pdflang & name & relax & PDF language identifier (RFC 3066)\\ +pdfmenubar & boolean & true & make PDF viewer's menu bar visible \\ +pdfnewwindow & boolean & false & make links that open another PDF file start a new window \\ +pdfnonfullscreenpagemode + & name & empty & page mode setting on exiting full-screen mode. Possible values are + \verb|UseNone|, \verb|UseOutlines|, \verb|UseThumbs|, and \verb|UseOC|\\ +pdfnumcopies & integer & empty & number of printed copies \\ +pdfpagelayout & name & empty & set layout of PDF pages. Possible values: + \verb|SinglePage|, \verb|OneColumn|, + \verb|TwoColumnLeft|, \verb|TwoColumnRight|, + \verb|TwoPageLeft|, and \verb|TwoPageRight| \\ +pdfpagelabels & boolean & true & set PDF page labels \\ +pdfpagetransition & name & empty & set PDF page transition style. Possible values are + \verb|Split|, \verb|Blinds|, \verb|Box|, \verb|Wipe|, + \verb|Dissolve|, \verb|Glitter|, \verb|R|, + \verb|Fly|, \verb|Push|, + \verb|Cover|, \verb|Uncover|, + \verb|Fade|. + The default according to the PDF~Reference is \verb|R|, + which simply replaces the old page with the new one. \\ +pdfpicktraybypdfsize + & boolean & false & specify whether PDF page size is used to select input paper tray in print dialog \\ +pdfprintarea & name & empty & set /PrintArea of viewer preferences. Possible values are + \verb|MediaBox|, \verb|CropBox|, + \verb|BleedBox|, \verb|TrimBox|, and \verb|ArtBox|. + The dafault according to the PDF~Refence is \verb|CropBox| \\ +pdfprintclip & name & empty & set /PrintClip of viewer preferences. Possible values are + \verb|MediaBox|, \verb|CropBox|, + \verb|BleedBox|, \verb|TrimBox|, and \verb|ArtBox|. + The dafault according to the PDF~Refence is \verb|CropBox| \\ +pdfprintpagerange & n n (n n)* + & empty & set /PrintPageRange of viewer preferences\\ +pdfprintscaling & name & empty & page scaling option for print dialog + (option /PrintScaling of viewer + preferences, PDF 1.6); + valid values are \verb|None| and + \verb|AppDefault| \\ +pdftoolbar & boolean & true & make PDF toolbar visible \\ +pdfviewarea & name & empty & set /ViewArea of viewer preferences. Possible values are + \verb|MediaBox|, \verb|CropBox|, + \verb|BleedBox|, \verb|TrimBox|, and \verb|ArtBox|. + The dafault according to the PDF~Refence is \verb|CropBox| \\ +pdfviewclip & name & empty & set /ViewClip of viewer preferences Possible values are + \verb|MediaBox|, \verb|CropBox|, + \verb|BleedBox|, \verb|TrimBox|, and \verb|ArtBox|. + The dafault according to the PDF~Refence is \verb|CropBox| \\ +pdfwindowui & boolean & true & make PDF user interface elements visible \\ +unicode & boolean & true & Unicode encoded PDF strings +\end{longtable} + +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 +\verb|\hypercalcbp| that is explained on page \pageref{hypercalcbp}. +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 +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. + +\begin{longtable}{@{}>{\ttfamily}l>{\itshape}lp{7cm}@{}} +XYZ & left top zoom & Sets a coordinate and a zoom factor. If any one is null, the source link value is used. + \textit{null null null} will give the same values as the current page. \\ +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 coordinates to the window. \\ +FitB & & Fits the page bounding box to the window. \\ +FitBH & top & Fits the width of the page bounding box to the window. \\ +FitBV & left & Fits the height of the page bounding box to the window. \\ +\end{longtable} + +The \texttt{pdfpagelayout} can be one of the following values. + +\begin{longtable}{@{}>{\ttfamily}lp{10cm}@{}} +SinglePage & 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 the left. \\ +TwoColumnRight & Displays the document in two columns, odd-numbered pages to the right.\\ +TwoPageLeft & 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 1.5). +\end{longtable} + +Finally, the \texttt{pdfpagetransition} can be one of the following +values, where \textit{/Di} stands for direction of motion in degrees, +generally in 90$^{\circ}$\ steps, \textit{/Dm} is a horizontal +(\texttt{/H}) or vertical (\texttt{/V}) dimension (e.g.\ \texttt{Blinds +/Dm /V}), and \textit{/M} is for motion, either in (\texttt{/I}) or out +(\texttt{/O}). + +\begin{longtable}{@{}>{\ttfamily}llp{8.5cm}@{}} +Blinds & /Dm & 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. \\ +Dissolve & & The page image dissolves in a piecemeal fashion to reveal the new page. \\ +Glitter & /Di & 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 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 direction + specified by /Di, to or from a location that is + offscreen except when /Di is None. \\ +Push & /Di & The old page slides off the screen while the new page slides in, + pushing the old page out in the direction + specified by /Di. \\ +Cover & /Di & 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 specified by + /Di, uncovering the new page in the direction + specified by /Di. \\ +Fade & & The new page gradually becomes visible through the old one. + +\end{longtable} + +\subsection{Option \texttt{pdfinfo}} + +The information entries can be set using \texttt{pdftitle}, +\texttt{pdfsubject}, \dots. Option \texttt{pdfinfo} provides an alternative +interface. It takes a key value list. The key names are the names that +appear in the PDF information dictionary directly. Known keys such as +\texttt{Title}, \texttt{Subject}, \texttt{Trapped} and other are mapped to +options \texttt{pdftitle}, \texttt{subject}, \texttt{trapped}, \dots +Unknown keys are added to the information dictionary. Their values are text +strings (see PDF specification). +Example: +\begin{quote} +\begin{verbatim} +\hypersetup{ + pdfinfo={ + Title={My Title}, + Subject={My Subject}, + NewKey={Foobar}, + % ... + } +} +\end{verbatim} +\end{quote} + +\subsection{Big alphabetical list} + +The following is a complete listing of available options for +\textsf{hyperref}, arranged alphabetically. + +\begin{longtable}{@{}>{\ttfamily}llp{7cm}@{}} +allbordercolors & & Set all border color options\\ +allcolors & & Set all color options (without border and field options)\\ +anchorcolor & \textit{black} & set color of anchors, ignored by most drivers. \\ +backref & \textit{false} & do bibliographical back references \\ +baseurl & \textit{empty} & set base URL for document \\ +bookmarks & \textit{true} & make bookmarks \\ +bookmarksnumbered & \textit{false} & put section numbers in bookmarks \\ +bookmarksopen & \textit{false} & open up bookmark tree \\ +bookmarksopenlevel & \ttfamily\ci{maxdimen} & level to which bookmarks are open \\ +bookmarkstype & \textit{toc} & to specify which `toc' file to mimic \\ +breaklinks & \textit{false} & allow links to break over lines \\ +CJKbookmarks & \textit{false} & to produce CJK bookmarks\\ +citebordercolor & \textit{0 1 0} & color of border around cites \\ +citecolor & \textit{green} & color of citation links \\ +colorlinks & \textit{false} & color links \\ + & \textit{true} & (\textsf{tex4ht}, \textsf{dviwindo}) \\ +debug & \textit{false} & provide details of anchors defined; same as verbose \\ +destlabel & \textit{false} & destinations are named by the first \verb|\label| after the anchor creation \\ +draft & \textit{false} & do not do any hyperlinking \\ +driverfallback & & default if no driver specified or detected\\ +dvipdfm & & use \textsf{dvipdfm} backend \\ +dvipdfmx & & use \textsf{dvipdfmx} backend \\ +dvips & & use \textsf{dvips} backend \\ +dvipsone & & use \textsf{dvipsone} backend \\ +dviwindo & & use \textsf{dviwindo} backend \\ +encap & & to set encap character for hyperindex \\ +extension & \textit{dvi} & suffix of linked files \\ +filebordercolor & \textit{0 .5 .5} & color of border around file links \\ +filecolor & \textit{cyan} & color of file links \\ +final & \textit{true} & opposite of option draft \\ +frenchlinks & \textit{false} & use small caps instead of color for links \\ +hidelinks & & Hide links (removing color and border) \\ +hyperfigures & \textit{false} & make figures hyper links \\ +hyperfootnotes & \textit{true} & set up hyperlinked footnotes \\ +hyperindex & \textit{true} & set up hyperlinked indices \\ +hypertex & & use \textsf{Hyper\TeX} backend \\ +hypertexnames & \textit{true} & use guessable names for links \\ +implicit & \textit{true} & redefine \LaTeX\ internals \\ +latex2html & & use \textsf{\LaTeX2HTML} backend \\ +linkbordercolor & \textit{1 0 0} & color of border around links \\ +linkcolor & \textit{red} & color of links \\ +linktoc & \textit{section} & make text be link on TOC, LOF and LOT \\ +linktocpage & \textit{false} & make page number, not text, be link on TOC, LOF and LOT \\ +menubordercolor & \textit{1 0 0} & color of border around menu links \\ +menucolor & \textit{red} & color for menu links \\ +nativepdf & \textit{false} & an alias for \textsf{dvips} \\ +naturalnames & \textit{false} & use \LaTeX-computed names for links \\ +nesting & \textit{false} & allow nesting of links \\ +pageanchor & \textit{true} & put an anchor on every page \\ +pagebackref & \textit{false} & backreference by page number \\ +pdfauthor & \textit{empty} & text for PDF Author field \\ +pdfborder & \textit{0 0 1} & width of PDF link border \\ + & \textit{0 0 0} & (\texttt{colorlinks)} \\ +pdfborderstyle & & border style for links \\ +pdfcenterwindow & \textit{false} & position the document window in the center of the screen \\ +pdfcreator & \textit{LaTeX with} & text for PDF Creator field \\ + & \textit{hyperref} & \\ +pdfdirection & \textit{empty} & direction setting \\ +pdfdisplaydoctitle & \textit{false} & display document title instead + of file name in title bar\\ +pdfduplex & \textit{empty} & paper handling option for + print dialog\\ +pdffitwindow & \textit{false} & resize document window to fit document size \\ +pdfhighlight & \textit{/I} & set highlighting of PDF links \\ +pdfinfo & \textit{empty} & alternative interface for setting document information\\ +pdfkeywords & \textit{empty} & text for PDF Keywords field \\ +pdflang & \textit{relax} & PDF language identifier (RFC 3066) \\ +pdfmark & \textit{false} & an alias for \textsf{dvips} \\ +pdfmenubar & \textit{true} & make PDF viewer's menu bar visible \\ +pdfnewwindow & \textit{false} & make links that open another PDF \\ + & & file start a new window \\ +pdfnonfullscreenpagemode + & \textit{empty} & page mode setting on exiting + full-screen mode\\ +pdfnumcopies & \textit{empty} & number of printed copies\\ +pdfpagelabels & \textit{true} & set PDF page labels \\ +pdfpagelayout & \textit{empty} & set layout of PDF pages \\ +pdfpagemode & \textit{empty} & set default mode of PDF display \\ +pdfpagescrop & \textit{empty} & set crop size of PDF document \\ +pdfpagetransition & \textit{empty} & set PDF page transition style \\ +pdfpicktraybypdfsize + & \textit{empty} & set option for print dialog \\ +pdfprintarea & \textit{empty} & set /PrintArea of viewer preferences \\ +pdfprintclip & \textit{empty} & set /PrintClip of viewer preferences \\ +pdfprintpagerange & \textit{empty} & set /PrintPageRange of viewer preferences \\ +pdfprintscaling & \textit{empty} & page scaling option for print dialog \\ +pdfproducer & \textit{empty} & text for PDF Producer field \\ +pdfremotestartview & \textit{Fit} & starting view of remote PDF documents \\ +pdfstartpage & \textit{1} & page at which PDF document opens \\ +pdfstartview & \textit{Fit} & starting view of PDF document \\ +pdfsubject & \textit{empty} & text for PDF Subject field \\ +pdftex & & use \textsf{pdf\TeX} backend \\ +pdftitle & \textit{empty} & text for PDF Title field \\ +pdftoolbar & \textit{true} & make PDF toolbar visible \\ +pdftrapped & \textit{empty} & Sets the document information Trapped entry. + Possible values are \texttt{True}, \texttt{False} and \texttt{Unknown}. + An empty value means, the entry is not set.\\ +pdfview & \textit{XYZ} & PDF `view' when on link traversal \\ +pdfviewarea & \textit{empty} & set /ViewArea of viewer preferences \\ +pdfviewclip & \textit{empty} & set /ViewClip of viewer preferences \\ +pdfwindowui & \textit{true} & make PDF user interface elements visible \\ +plainpages & \textit{false} & do page number anchors as plain Arabic \\ +ps2pdf & & use \textsf{ps2pdf} backend \\ +psdextra & \textit{false} & define more short names for PDF string commands \\ +raiselinks & \textit{false} & raise up links (for \textsf{Hyper\TeX} backend) \\ +runbordercolor & \textit{0 .7 .7} & color of border around `run' links \\ +runcolor & \textit{filecolor} & color of `run' links\\ +setpagesize & \textit{true} & set page size by special driver commands \\ +tex4ht & & use \textsf{\TeX4ht} backend \\ +textures & & use \textsf{Textures} backend \\ +unicode & \textit{true} & Unicode encoded pdf strings, starting with version 2021-02-07 v7.00h set by default to true for all engines. \\ +urlbordercolor & \textit{0 1 1} & color of border around URL links \\ +urlcolor & \textit{magenta} & color of URL links \\ +verbose & \textit{false} & be chatty \\ +vtex & & use \textsf{VTeX} backend\\ +xetex & & use \textsf{Xe\TeX} backend\\ +\end{longtable} + +\section{Additional user macros} + +If you need to make references to URLs, or write explicit links, the +following low-level user macros are provided: + +\begin{cmdsyntax} +\ci{href}\verb|[|\emph{options}\verb|]|\verb|{|\emph{URL}\verb|}{|\emph{text}\verb|}| +\end{cmdsyntax} + +\noindent The \emph{text} is made a hyperlink to the \emph{URL}; this +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 +\texttt{pdfremotestartview}, \texttt{pdfnewwindow} and the following +key value options: +\begin{description} +\item[\texttt{page}:] Specifies the start page number of remote +PDF documents. First page is \verb|1|. +\item[\texttt{ismap}:] Boolean key, if set to \verb|true|, the +URL should appended by the coordinates as query parameters by +the PDF viewer. +\item[\texttt{nextactionraw}:] The value of key \verb|/Next| of +action dictionaries, see PDF specification. +\end{description} + +\begin{cmdsyntax} +\ci{url}\verb|{|\emph{URL}\verb|}| +\end{cmdsyntax} + +\noindent Similar to +\ci{href}\verb|{|\emph{URL}\verb|}{|\ci{nolinkurl}\verb|{|\emph{URL}\verb|}}|. +Depending on the driver \verb|\href| also tries to detect the link type. +Thus the result can be a url link, file link, \dots + +\begin{cmdsyntax} +\ci{nolinkurl}\verb|{|\emph{URL}\verb|}| +\end{cmdsyntax} + +\noindent Write \emph{URL} in the same way as \verb|\url|, + without creating a hyperlink. + +\begin{cmdsyntax} +\ci{hyperbaseurl}\verb|{|\emph{URL}\verb|}| +\end{cmdsyntax} + +\noindent A base \emph{URL} is established, which is prepended to other +specified URLs, to make it easier to write portable documents. + +\begin{cmdsyntax} +\ci{hyperimage}\verb|{|\emph{imageURL}\verb|}{|\emph{text}\verb|}| +\end{cmdsyntax} + +\noindent The link to the image referenced by the URL is inserted, using +\emph{text} as the anchor. + + For drivers that produce HTML, the image itself is inserted by the +browser, with the \emph{text} being ignored completely. + +\begin{cmdsyntax} +\ci{hyperdef}\verb|{|\emph{category}\verb|}{|\emph{name}\verb|}{|\emph{text}\verb|}| +\end{cmdsyntax} + +\noindent A target area of the document (the \emph{text}) is marked, and +given the name \emph{category.name} + +\begin{cmdsyntax} +\ci{hyperref}\verb|{|\emph{URL}\verb|}{|\emph{category}\verb|}{|\emph{name}\verb|}{|\emph{text}\verb|}| +\end{cmdsyntax} + +\noindent \emph{text} is made into a link to \emph{URL\#category.name} + +\begin{cmdsyntax} +\ci{hyperref}\verb|[|\emph{label}\verb|]{|\emph{text}\verb|}| +\end{cmdsyntax} + +\noindent +\emph{text} is made into a link to the same place as +\verb|\ref{|\emph{label}\verb|}| would be linked. + +\begin{cmdsyntax} +\ci{hyperlink}\verb|{|\emph{name}\verb|}{|\emph{text}\verb|}| +\end{cmdsyntax} +\begin{cmdsyntax} +\ci{hypertarget}\verb|{|\emph{name}\verb|}{|\emph{text}\verb|}| +\end{cmdsyntax} + +\noindent A simple internal link is created with \verb|\hypertarget|, +with two parameters of an anchor \emph{name}, and anchor +\emph{text}. \verb|\hyperlink| has two arguments, the name of a +hypertext object defined somewhere by \verb|\hypertarget|, and the +\emph{text} which be used as the link on the page. + +Note that in HTML parlance, the \verb|\hyperlink| command inserts a +notional \# in front of each link, making it relative to the current +testdocument; \verb|\href| expects a full URL. + +\begin{cmdsyntax} +\ci{phantomsection} +\end{cmdsyntax} + +\noindent +This sets an anchor at this location. It works similar to +\verb|\hypertarget{}{}| with an automatically chosen anchor name. +Often it is used in conjunction +with \verb|\addcontentsline| for sectionlike things (index, bibliography, +preface). \verb|\addcontentsline| refers to the latest previous location +where an anchor is set. Example: +\begin{quote} +\begin{verbatim} +\cleardoublepage +\phantomsection +\addcontentsline{toc}{chapter}{\indexname} +\printindex +\end{verbatim} +\end{quote} +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. + +\begin{cmdsyntax} +\ci{autoref}\verb|{|\emph{label}\verb|}| +\end{cmdsyntax} + +\noindent +This is a replacement for the usual \verb|\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 \verb|\label| +command by \textsf{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 +\ci{*name}. For instance, it looks for \ci{figureautorefname} before +\ci{figurename}. + +\begin{longtable}{@{}lp{10cm}@{}} +\textit{Macro} & \textit{Default} \\ +\ci{figurename} & Figure \\ +\ci{tablename} & Table \\ +\ci{partname} & Part \\ +\ci{appendixname} & Appendix \\ +\ci{equationname} & Equation \\ +\ci{Itemname} & item \\ +\ci{chaptername} & chapter \\ +\ci{sectionname} & section \\ +\ci{subsectionname} & subsection \\ +\ci{subsubsectionname} & subsubsection \\ +\ci{paragraphname} & paragraph \\ +\ci{Hfootnotename} & footnote \\ +\ci{AMSname} & Equation \\ +\ci{theoremname} & Theorem\\ +\ci{page} & page\\ +\end{longtable} + +Example for a redefinition if \textsf{babel} is used: +\begin{quote} +\begin{verbatim} +\usepackage[ngerman]{babel} +\addto\extrasngerman{% + \def\subsectionautorefname{Unterkapitel}% +} +\end{verbatim} +\end{quote} + +Hint: \cs{autoref} works via the counter name that the reference +is based on. Sometimes \cs{autoref} chooses the wrong name, if +the counter is used for different things. For example, it happens +with \cs{newtheorem} if a lemma shares a counter with theorems. +Then package \xpackage{aliascnt} provides a method to generate a +simulated second counter that allows the differentiation between +theorems and lemmas: +\begin{quote} +\begin{verbatim} +\documentclass{article} + +\usepackage{aliascnt} +\usepackage{hyperref} + +\newtheorem{theorem}{Theorem} + +\newaliascnt{lemma}{theorem} +\newtheorem{lemma}[lemma]{Lemma} +\aliascntresetthe{lemma} + +\providecommand*{\lemmaautorefname}{Lemma} + +\begin{document} + +We will use \autoref{a} to prove \autoref{b}. + +\begin{lemma}\label{a} + Nobody knows. +\end{lemma} + +\begin{theorem}\label{b} + Nobody is right. +\end{theorem}. + +\end{document} +\end{verbatim} +\end{quote} + +\begin{cmdsyntax} +\ci{autopageref}\verb|{|\emph{label}\verb|}| +\end{cmdsyntax} + +\noindent +It replaces \verb|\pageref| and adds the name for page in front of +the page reference. First \ci{pageautorefname} is checked before +\ci{pagename}. + +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 \verb|implicit=false|): + +\begin{cmdsyntax} +\ci{ref*}\verb|{|\emph{label}\verb|}| +\end{cmdsyntax} + +\begin{cmdsyntax} +\ci{pageref*}\verb|{|\emph{label}\verb|}| +\end{cmdsyntax} + +\begin{cmdsyntax} +\ci{autoref*}\verb|{|\emph{label}\verb|}| +\end{cmdsyntax} + +\begin{cmdsyntax} +\ci{autopageref*}\verb|{|\emph{label}\verb|}| +\end{cmdsyntax} + +A typical use would be to write +\begin{verbatim} +\hyperref[other]{that nice section (\ref*{other}) we read before} +\end{verbatim} + +We want \verb|\ref*{other}| to generate the correct number, but not to +form a link, since we do this ourselves with \ci{hyperref}. + +\begin{cmdsyntax} +\ci{pdfstringdef}\verb|{|\emph{macroname}\verb|}{|\emph{\TeX string}\verb|}| +\end{cmdsyntax} + +\ci{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: + +\begin{itemize} +\item Switching to PD1 or PU encoding +\item Defining the \Quote{octal sequence commands} (\verb|\345|): \verb|\edef\3{\string\3}| +\item Special glyphs of \TeX: \verb|\{|, \verb|\%|, \verb|\&|, \verb|\space|, \verb|\dots|, etc. +\item National glyphs (\textsf{german.sty}, \textsf{french.sty}, etc.) +\item Logos: \verb|\TeX|, \verb|\eTeX|, \verb|\MF|, etc. +\item Disabling commands that do not provide useful functionality in bookmarks: +\verb|\label|, \verb|\index|, \verb|\glossary|, \verb|\discretionary|, \verb|\def|, \verb|\let|, etc. +\item \LaTeX's font commands like \verb|\textbf|, etc. +\item Support for \verb|\xspace| provided by the \xpackage{xspace} package +\end{itemize} + +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}. + +\begin{cmdsyntax} +\ci{begin}\verb|{NoHyper}|\ldots\ci{end}\verb|{NoHyper}| +\end{cmdsyntax} + 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 + \verb|hyperref| playing havoc in the front matter. + +\subsection{Bookmark macros} + +\subsubsection{Setting bookmarks} + +Usually \textsf{hyperref} automatically adds bookmarks for +\verb|\section| and similar macros. But they can also set manually. + +\begin{cmdsyntax} +\ci{pdfbookmark}\verb|[|\emph{level}\verb|]{|text\verb|}{|\emph{name}\verb|}| +\end{cmdsyntax} +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 \verb|\label|). + +\begin{cmdsyntax} +\ci{currentpdfbookmark}\verb|{|\emph{text}\verb|}{|\emph{name}\verb|}| +\end{cmdsyntax} +creates a bookmark at the current level. + +\begin{cmdsyntax} +\ci{subpdfbookmark}\verb|{|\emph{text}\verb|}{|\emph{name}\verb|}| +\end{cmdsyntax} +creates a bookmark one step down in the bookmark hierarchy. +Internally the current level is increased by one. + +\begin{cmdsyntax} +\ci{belowpdfbookmark}\verb|{|\emph{text}\verb|}{|\emph{name}\verb|}| +\end{cmdsyntax} +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: +\begin{itemize} +\item Usually only one \LaTeX\ run is needed. +\item More control over the bookmark appearance (color, font). +\item Different bookmark actions are supported (external file links, + URLs, \dots). +\end{itemize} +Therefore I recommend using this package. + +\subsubsection{Replacement macros} + +\textsf{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. + +\begin{cmdsyntax} +\ci{texorpdfstring}\verb|{|\emph{\TeX string}\verb|}{|\emph{PDFstring}\verb|}| +\end{cmdsyntax} + +For example, +\begin{verbatim} +\section{Pythagoras: + \texorpdfstring{$ a^2 + b^2 = c^2 $}{% + a\texttwosuperior\ + b\texttwosuperior\ = + c\texttwosuperior + }% +} +\section{\texorpdfstring{\textcolor{red}}{}{Red} Mars} +\end{verbatim} + +\ci{pdfstringdef} executes the hook \pdfstringdefPreHook before it +expands the string. Therefore, you can use this hook to perform +additional tasks or to disable additional commands. + +\begin{verbatim} +\expandafter\def\expandafter\pdfstringdefPreHook +\expandafter{% + \pdfstringdefPreHook + \renewcommand{\mycommand}[1]{}% +} +\end{verbatim} + +However, for disabling commands, an easier way is via +\ci{pdfstringdefDisableCommands}, which adds its argument to the +definition of \ci{pdfstringdefPreHook} (`@' can here be used as letter in +command names): + +\begin{verbatim} +\pdfstringdefDisableCommands{% + \let~\textasciitilde + \def\url{\pdfstringdefWarn\url}% + \let\textcolor\@gobble +} +\end{verbatim} + +\subsection{Pagelabels} +\begin{cmdsyntax} +\ci{thispdfpagelabel}\verb|{|\emph{page number format}\verb|}| +\end{cmdsyntax} + +This allows to change format of the page number shown in the tool bar of +a PDF viewer for a specific page, for example + +\verb+\thispdfpagelabel{Empty Page-\roman{page}}+ + +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 \verb+\thispagestyle+ can be use too. + +\subsection{Utility macros} + +\label{hypercalcbp} +\begin{cmdsyntax} +\ci{hypercalcbp}\verb|{|\emph{dimen specification}\verb|}| +\end{cmdsyntax} +\noindent +\verb|\hypercalcbp| takes a \TeX\ dimen specification and +converts it to bp and returns the number without the unit. +This is useful for options \verb|pdfview|, \verb|pdfstartview| +and \verb|pdfremotestartview|. +Example: +\begin{quote} +\begin{verbatim} +\hypersetup{ + pdfstartview={FitBH \hypercalcbp{\paperheight-\topmargin-1in + -\headheight-\headsep} +} +\end{verbatim} +\end{quote} +The origin of the PDF coordinate system is the lower left corner. + +Note, for calculations you need either package \xpackage{calc} or +\hologo{eTeX}. Nowadays the latter should automatically be enabled +for \hologo{LaTeX} formats. Users without \hologo{eTeX}, please, look +in the source documentation \verb|hyperref.dtx| for further +limitations. + +Also \cs{hypercalcbp} cannot be used in option specifications +of \cs{documentclass} and \cs{usepackage}, because +\hologo{LaTeX} expands the option lists of these commands. However +package \xpackage{hyperref} is not yet loaded and an undefined control +sequence error would arise. + +\section[New Features]{New Features% +\footnote{This section moved from the README file, needs more integration into the manual}} + + +\subsection{Option `pdflinkmargin'} + + Option `pdflinkmargin' is an experimental option for specifying + a link margin, if the driver supports this. Default is 1 pt for + supporting drivers. + + +\begin{description} +\item[pdfTeX] +\begin{itemize} + \item The link area also depends on the surrounding box. + \item Settings have local effect. + \item When a page is shipped out, pdfTeX uses the current setting + of the link margin for all links on the page. +\end{itemize} + +\item[pdfmark] +\begin{itemize} + \item Settings have global effect. +\end{itemize} + +\item[xetex] +\begin{itemize} + \item Settings must be done in the preamble or the first page and then have global effect. + The key inserts the new (x)dvipdfmx special \verb|\special{dvipdfmx:config g #1}| (with the unit removed). +\end{itemize} + +\item[Other drivers] + Unsupported. +\end{description} + + +\subsection{Field option `calculatesortkey'} + + 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. + + +\subsection{Option `localanchorname'} + + When an anchor is set (e.g. via \verb|\refstepcounter|, then the + anchor name is globally set to the current anchor name. + + + For example: +\begin{verbatim} + \section{Foobar} + \begin{equation}\end{equation} + \label{sec:foobar} +\end{verbatim} + 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 name is not available + as expected. + + +\subsection{Option `customdriver'} + + The value of option `customdriver' is the name of an external + driver file without extension `.def'. The file must have + \verb|\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 quite messy, the option is mainly intended + to ease developing, testing, debugging the driver part. + + +\subsection{Option `psdextra'} + + LaTeX's NFSS is used to assist the conversion of arbitrary + TeX strings to PDF strings (bookmarks, PDF information entries). + Many math command names (\verb|\geq|, \verb|\notin|, ...) are not in control + of NFSS, therefore they are defined with prefix `text' + (\verb|\textgeq|, \verb|\textnotin|, ...). They can be mapped to short names + during the processing to PDF strings. The disadvantage is that + they are many hundreds macros that need to be redefined for + each PDF string conversion. Therefore this can be enabled or + disabled as option `psdextra'. On default the option is turned + off (set to `false'). Turning the option on means + that the short names are available. Then \verb|\geq| can directly + be used instead of \verb|\textgeq|. + + +\subsection{\textbackslash XeTeXLinkBox} + + 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 \verb|\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 \verb|\XeTeXLinkMargin|. The default + is 2pt. + + Example: + + +\begin{verbatim} + % xelatex + \documentclass{article} + \usepackage{hyperref} + \setlength{\XeTeXLinkMargin}{1pt} + \begin{document} + \section{Hello World} + \newpage + \label{sec:hello} + \hyperref[sec:hello]{% + \XeTeXLinkBox{\rule{10mm}{10mm}}% + } + \end{document} +\end{verbatim} + +\subsection{\textbackslash IfHyperBooleanExists and \textbackslash IfHyperBoolean} +\begin{verbatim} + \IfHyperBooleanExists{OPTION}{YES}{NO} +\end{verbatim} + If a hyperref OPTION is a boolean, that means it takes values + `true' or `false', then \verb|\IfHyperBooleanExists| calls YES, otherwise NO. + + +\begin{verbatim} + \IfHyperBoolean{OPTION}{YES}{NO} +\end{verbatim} + Macro \verb|\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 \verb|\MaybeStopEarly| or \verb|\MaybeStopNow| + end hyperref prematurely. + + +\subsection{\textbackslash unichar} + + 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 + TeX code to PDF strings or tries to do this). + + + + Macro \verb|\unichar| takes a TeX number as argument, + examples for U+263A (WHITE SMILING FACE): +\begin{verbatim} + \unichar{"263A}% hexadecimal notation + \unichar{9786}% decimal notation +\end{verbatim} + `"' must not be a babel shorthand character or otherwise + active. Otherwise prefix it with \verb|\string|: +\begin{verbatim} + \unichar{\string"263A}% converts `"' to `"' with catcode 12 (other) +\end{verbatim} + Users of (n)german packages or babel options may use \verb|\dq| instead: +\begin{verbatim} + \unichar{\dq 263A}% \dq is double quote with catcode 12 (other) +\end{verbatim} + + +\subsection{\textbackslash ifpdfstringunicode} + + 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 \verb|\texorpdfstring| to replace complicate TeX constructs + by a representation for the PDF string. However \verb|\texorpdfstring| + does not distinguish the two encodings. This gap closes + \verb|\ifpdfstringunicode|. It is only allowed in the second argument + of \verb|\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 Han The Thanh. Correctly written it needs some + accented characters, one character even with a double accent. + Class `tugboat.cls' defines a macro for the typesetted name: +\begin{verbatim} + \def\Thanh{% + H\`an~% + Th\^e\llap{\raise 0.5ex\hbox{\'{}}}% + ~Th\`anh% + } +\end{verbatim} + 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 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 \verb|\unichar|. The character + in question is: +\begin{verbatim} + % U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +\end{verbatim} + Thus we can put this together: +\begin{verbatim} + \def\Thanh{% + H\`an~% + \texorpdfstring{Th\^e\llap{\raise 0.5ex\hbox{\'{}}}}% + {\ifpdfstringunicode{Th\unichar{"1EC3}}{Th\^e}}% + ~Th\`anh% + } +\end{verbatim} + For PDFDocEncoding (PD1) the variant above has dropped the + second accent. Alternatively we could provide a representation + without accents instead of wrong accents: +\begin{verbatim} + \def\Thanh{% + \texorpdfstring{% + H\`an~% + Th\^e\llap{\raise 0.5ex\hbox{\'{}}}}% + ~Th\`anh% + }{% + \ifpdfstringunicode{% + H\`an Th\unichar{"1EC3} Th\`anh% + }{% + Han The Thanh% + }% + }% + } +\end{verbatim} + +\subsection{Customizing index style file with \textbackslash nohyperpage} + + Since version 2008/08/14~v6.78f. + + + + For hyperlink support in the index, 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: +\begin{verbatim} + delim_r "--" + delim_n ", " +\end{verbatim} + (See manual page/documentation of Makeindex that explains + the keys that can be used in style files for Makeindex.) + Customized versions of + \verb|delim_r, delim_n, suffix_2p, suffix_3p, suffix_mp| + needs markup that \verb|\hyperpage| can detect and knows that + this stuff does not belong to a page number. Makro + \verb|\nohyperpage| serves as this markup. Put the customized + code for these keys inside \verb|\nohyperpage|, e.g.: +\begin{verbatim} + suffix_2p "\\nohyperpage{f.}" + suffix_3p "\\nohyperpage{ff.}" +\end{verbatim} + (Depending on the typesetting tradition some space ``\verb|\\|,'' or ``\verb|~|'' + should be put before the first f inside \verb|\nohyperpage|.) + + +\subsection{Experimental option `ocgcolorlinks'} + + 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 package. Check its documentation for details how to use it. +\begin{itemize} + \item The option must be given for package loading: + \verb|\usepackage[ocgcolorlinks]{hyperref}| + \item 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. + \item The feature can be switched of by \verb|\hypersetup{ocgcolorlinks=false}| + inside the document. + \item Supported drivers: pdftex, dvipdfm + \item The PDF version should be at least 1.5. It is automatically + set for pdfTeX, LuaTeX and dvipdfmx. +\end{itemize} + +\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, + fonts, colors, driver dependend low level stuff, ...). + + + + Currently, option `pdfa' sets and disables the following items: +\begin{itemize} + \item Enabled annotation flags: Print, NoZoom, NoRotate [PDF/A 6.5.3]. + \item Disabled annotation flags: Hidden, Invisible, NoView [PDF/A 6.5.3]. + \item Disabled: Launch action (\href{run:...} [PDF/A 6.6.1]. + \item Restricted: Named actions (\Acrobatmenu: NextPage, PrevPage, + FirstPage, LastPage) [PDF/A 6.6.1]. + \item Many things are disabled in PDF formulars: + \begin{itemize} + \item JavaScript actions [PDF/A 6.6.1] + \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). + [PDF/A 6.9] + \end{itemize} +\end{itemize} + + + + 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 (\verb|\usepackage{hyperref}|). + + + +\subsection{Option `linktoc' added} + + The new option `linktoc' allows more control which part + of an entry in the table of contents is made into a link: +\begin{itemize} + \item `linktoc=none' (no links) + \item `linktoc=section' (default behaviour, same as `linktocpage=false') + \item `linktoc=page' (same as `linktocpage=true') + \item `linktoc=all' (both the section and page part are links) +\end{itemize} + +\subsection{Option `pdfnewwindow' changed} + + Before 6.77b: +\begin{itemize} + \item pdfnewwindow=true $\rightarrow$ /NewWindow true + \item pdfnewwindow=false $\rightarrow$ (absent) + \item unused pdfnewwindow $\rightarrow$ (absent) +\end{itemize} + Since 6.77b: +\begin{itemize} + \item pdfnewwindow=true $\rightarrow$ /NewWindow true + \item pdfnewwindow=false $\rightarrow$ /NewWindow false + \item pdfnewwindow={} $\rightarrow$ (absent) + \item unused pdfnewwindow $\rightarrow$ (absent) +\end{itemize} + + + + 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. + + +\subsection{Flag options for PDF forms} + + PDF form field macros (\verb|\TextField|, \verb|\CheckBox|, ...) support + boolean flag options. The option name is the lowercase + version of the names in the PDF specification (1.7): + + \url{http://www.adobe.com/devnet/pdf/pdf_reference.html} + + \url{http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference.pdf} + + Options (convert to lowercase) except flags in square brackets: + +\begin{itemize} + \item Table 8.16 Annotation flags (page 608): + +{\obeylines + 1 Invisible + 2 Hidden (PDF 1.2) + 3 Print (PDF 1.2) + 4 NoZoom (PDF 1.3) + 5 NoRotate (PDF 1.3) + 6 NoView (PDF 1.3) + [7 ReadOnly (PDF 1.3)] ignored for widget annotations, see table 8.70 + 8 Locked (PDF 1.4) + 9 ToggleNoView (PDF 1.5) + 10 LockedContents (PDF 1.7) +} + \item Table 8.70 Field flags common to all field types (page 676): + +{\obeylines + 1 ReadOnly + 2 Required + 3 NoExport +} + \item Table 8.75 Field flags specific to button fields (page 686): + +{\obeylines + 15 NoToggleToOff (Radio buttons only) + 16 Radio (set: radio buttons, clear: check box, pushbutton: clear) + 17 Pushbutton + 26 RadiosInUniso (PDF 1.5) +} + \item Table 8.77 Field flags specific to text fields (page 691): + +{\obeylines + 13 Multiline + 14 Password + 21 FileSelect (PDF 1.4) + 23 DoNotSpellCheck (PDF 1.4) + 24 DoNotScroll (PDF 1.4) + 25 Comb (PDF 1.5) + 26 RichText (PDF 1.5) +} + \item Table 8.79 Field flags specific to choice fields (page 693): + +{\obeylines + 18 Combo (set: combo box, clear: list box) + 19 Edit (only useful if Combo is set) + 20 (Sort) for authoring tools, not PDF viewers + 22 MultiSelect (PDF 1.4) + 23 DoNotSpellCheck (PDF 1.4) (only useful if Combo and Edit are set) + 27 CommitOnSelChange (PDF 1.5) +} + \item Table 8.86 Flags for submit-form actions (page 704): + +{\obeylines + [1 Include/Exclude] unsupported, use `noexport' (table 8.70) instead + 2 IncludeNoValueFields + [3 ExportFormat] handled by option `export' + 4 GetMethod + 5 SubmitCoordinates + [6 XFDF (PDF 1.4)] handled by option `export' + 7 IncludeAppendSaves (PDF 1.4) + 8 IncludeAnnotations (PDF 1.4) + [9 SubmitPDF (PDF 1.4)] handled by option `export' + 10 CanonicalFormat (PDF 1.4) + 11 ExclNonUserAnnots (PDF 1.4) + 12 ExclFKey (PDF 1.4) + 14 EmbedForm (PDF 1.5) +} +\end{itemize} + + New option `export' sets the export format of a submit action. + Valid values are (upper- or lowercase): +\begin{itemize} + \item FDF + \item HTML + \item XFDF + \item PDF (not supported by Acrobat Reader) +\end{itemize} + +\subsection{Option `pdfversion'} + + 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 higher PDF versions. + + + + The option must be used early, not after \verb|\usepackage{hyperref}|. + + + In theory this option should also set the PDF version, + but this is not generally supported. +\begin{itemize} + \item pdfTeX below 1.10a: unsupported. + pdfTeX $\ge$ 1.10a and < 1.30: \verb|\pdfoptionpdfminorversion| + pdfTeX $\ge$ 1.30: \verb|\pdfminorversion| + \item dvipdfm: configuration file, example: + TeX Live 2007, texmf/dvipdfm/config/config, entry `V 2'. + \item dvipdfmx: configuration file, example: + TeX Live 2007, texmf/dvipdfm/dvipdfmx.cfg, entry `V 4'. + \item Ghostscript: option -dCompatibilityLevel (this is set in + `ps2pdf12', `ps2pdf13', `ps2pdf14'). +\end{itemize} + + + The current PDF version is used as default if this version + can be detected (only pdfTeX $\ge$ 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. + + +\subsection{Field option `name'} + + Many form objects uses the label argument + for several purposes: +\begin{itemize} + \item Layouted label. + \item As name in HTML structures. +\end{itemize} + 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. + + +\subsection{Option `pdfencoding'} + + The PDF format allows two encodings for bookmarks and entries + in the information dictionary: PDFDocEncoding and Unicode + as UTF-16BE. Option \xoption{pdfencoding} selects between these encodings: +\begin{itemize} + \item \xoption{pdfdoc} uses PDFDocEncoding. It uses just one byte per character, + but the supported characters are limited (244 in PDF-1.7). + \item \xoption{unicode} sets Unicode. It is encoded as UTF-16BE. Two bytes + are used for most characters, surrogates need four bytes. + \item \xoption{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 normally no suited for the unicode engines. +\end{itemize} + + All drivers use \xoption{unicode} by default now. If another encoding should be forced, + it should be done in \verb|hypersetup|. + +\subsection{Color options/package hycolor} + + See documentation of package `hycolor'. + + +\subsection{Option pdfusetitle} + + If option pdfusetitle is set then 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). + + +\subsection{Starred form of \textbackslash autoref} + + \verb|\autoref*| generates a reference without link as \verb|\ref*| or \verb|\pageref*|. + + +\subsection{Link border style} + + Links can be underlined instead of the default rectangle or + options \xoption{colorlinks}, \xoption{frenchlinks}. This is done by option + \verb|pdfborderstyle={/S/U/W 1}| + + Some remarks: + +\begin{itemize} + \item AR7/Linux seems to have a bug, that don't use the default + value \verb"1" for the width, but zero, thus that the underline + is not visible without \verb"/W 1". The same applies for + dashed boxes, eg.: + pdfborderstyle={/S/D/D[3 2]/W 1} + + \item 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) + + \item The border style is removed by + pdfborderstyle={} + This is automatically done if option colorlinks is enabled. + + \item Be aware that not all PDF viewers support this feature, not + even Acrobat Reader itself: + + Some support: + \begin{itemize} + \item AR7/Linux: \xoption{underline} and \xoption{dashed}, but the border width + must be given. + \item xpdf 3.00: \xoption{underline} and \xoption{dashed} + \end{itemize} + + Unsupported: + \begin{itemize} + \item AR5/Linux + \item ghostscript 8.50 + \end{itemize} +\end{itemize} + +\subsection{Option \xoption{bookmarksdepth}} + + The depth of the bookmarks can be controlled by the new + option \xoption{bookmarksdepth}. The option acts globally and + distinguishes three cases: +\begin{itemize} + \item \xoption{bookmarksdepth} without value + Then 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 + of macro \verb|\toclevel@|. + Examples: +\begin{verbatim} + \hypersetup{bookmarksdepth=paragraph} + \hypersetup{bookmarksdepth=4} % same as before + \hypersetup{bookmarksdepth} % counter "tocdepth" is used +\end{verbatim} +\end{itemize} + +\subsection{Option \xoption{pdfescapeform}} + + 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: +\begin{itemize} + \item pdfescapeform=false + Escaping for the formulars are disabled, this is + the compatibility behaviour, therefore this is the default. + \item 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. +\end{itemize} + +\subsection{Default driver setting} + + (hyperref $\ge$ 6.72s) + If no driver is given, 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, ...). + 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 + file \verb"hyperref.cfg": +\begin{verbatim} + \providecommand*{\Hy@defaultdriver}{hdvips} +\end{verbatim} + for dvips, or +\begin{verbatim} + \providecommand*{\Hy@defaultdriver}{hypertex} +\end{verbatim} + for the default behaviour of hyperref. + + See also the new option `driverfallback'. + +\subsection{Backref entries} + + Alternative interface for formatting of backref entries, example: + +\begin{verbatim} +\documentclass[12pt,UKenglish]{article} + +\usepackage{babel} +\usepackage[pagebackref]{hyperref} + +% Some language options are detected by package backref. +% This affects the following macros: +% \backrefpagesname +% \backrefsectionsname +% \backrefsep +% \backreftwosep +% \backreflastsep + +\renewcommand*{\backref}[1]{ + % default interface + % #1: backref list + % + % We want to use the alternative interface, + % therefore the definition is empty here. +} +\renewcommand*{\backrefalt}[4]{% + % alternative interface + % #1: number of distinct back references + % #2: backref list with distinct entries + % #3: number of back references including duplicates + % #4: backref list including duplicates + \par + #3 citation(s) on #1 page(s): #2,\par + \ifnum#1=1 % + \ifnum#3=1 % + 1 citation on page % + \else + #3 citations on page % + \fi + \else + #3 citations on #1 pages % + \fi + #2,\par + \ifnum#3=1 % + 1 citation located at page % + \else + #3 citations located at pages % + \fi + #4.\par +} + +% The list of distinct entries can be further refined: +\renewcommand*{\backrefentrycount}[2]{% + % #1: the original backref entry + % #2: the count of citations of this entry, + % in case of duplicates greater than one + #1% + \ifnum#2>1 % + ~(#2)% + \fi +} + +\begin{document} + + \section{Hello} + \cite{ref1, ref2, ref3, ref4} + \section{World} + \cite{ref1, ref3} + \newpage + + \section{Next section} + \cite{ref1} + \newpage + + \section{Last section} + \cite{ref1, ref2} + \newpage + + \pdfbookmark[1]{Bibliography}{bib} + \begin{thebibliography}{99} + \bibitem{ref1} Dummy entry one. + + \bibitem{ref2} Dummy entry two. + + \bibitem{ref3} Dummy entry three. + + \bibitem{ref4} Dummy entry four. + + \end{thebibliography} + +\end{document} +\end{verbatim} + +\subsection{\textbackslash phantomsection} + +Set an anchor at this location. It is often used in conjunction +with \verb|\addcontentsline| for sectionlike things (index, bibliography, +preface). \verb|\addcontentsline| refers to the latest previous location +where an anchor is set. + +\begin{verbatim} + \cleardoublepage + \phantomsection + \addcontentsline{toc}{chapter}{\indexname} + \printindex +\end{verbatim} + +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. + + + +\section{Acrobat-specific behavior} +If you want to access the menu options of Acrobat Reader or Exchange, the following +macro is provided in the appropriate drivers: + +\begin{cmdsyntax} +\ci{Acrobatmenu}\verb|{|\emph{menuoption}\verb|}{|\emph{text}\verb|}| +\end{cmdsyntax} + +\noindent The \emph{text} is used to create a button which activates the appropriate \emph{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. + +\medskip +\begin{longtable}{@{}l>{\raggedright\arraybackslash}p{9cm}@{}} +File & Open, Close, Scan, Save, SaveAs, Optimizer:SaveAsOpt, Print, PageSetup, Quit \\ +File$\rightarrow$Import & ImportImage, ImportNotes, AcroForm:ImportFDF \\ +File$\rightarrow$Export & ExportNotes, AcroForm:ExportFDF \\ +File$\rightarrow$DocumentInfo & GeneralInfo, OpenInfo, FontsInfo, SecurityInfo, Weblink:Base, AutoIndex:DocInfo \\ +File$\rightarrow$Preferences & GeneralPrefs, NotePrefs, FullScreenPrefs, Weblink:Prefs, AcroSearch:Preferences(Windows) + or, AcroSearch:Prefs(Mac), Cpt:Capture \\ +Edit & Undo, Cut, Copy, Paste, Clear, SelectAll, Ole:CopyFile, TouchUp:TextAttributes, + TouchUp:FitTextToSelection, TouchUp:ShowLineMarkers, TouchUp:ShowCaptureSuspects, + TouchUp:FindSuspect, \\ + & Properties \\ +Edit$\rightarrow$Fields & AcroForm:Duplicate, AcroForm:TabOrder \\ +Document & Cpt:CapturePages, AcroForm:Actions, CropPages, RotatePages, InsertPages, ExtractPages, + ReplacePages, DeletePages, NewBookmark, SetBookmarkDest, CreateAllThumbs, + DeleteAllThumbs \\ +View & ActualSize, FitVisible, FitWidth, FitPage, ZoomTo, FullScreen, FirstPage, PrevPage, + NextPage, LastPage, GoToPage, GoBack, GoForward, SinglePage, OneColumn, TwoColumns, + ArticleThreads, PageOnly, ShowBookmarks, ShowThumbs \\ +Tools & Hand, ZoomIn, ZoomOut, SelectText, SelectGraphics, Note, Link, Thread, AcroForm:Tool, + Acro\_Movie:MoviePlayer, TouchUp:TextTool, Find, FindAgain, FindNextNote, + CreateNotesFile \\ +Tools$\rightarrow$Search & AcroSrch:Query, AcroSrch:Indexes, AcroSrch:Results, AcroSrch:Assist, AcroSrch:PrevDoc, + AcroSrch:PrevHit, AcroSrch:NextHit, AcroSrch:NextDoc \\ +Window & ShowHideToolBar, ShowHideMenuBar, ShowHideClipboard, Cascade, TileHorizontal, + TileVertical, CloseAll \\ +Help & HelpUserGuide, HelpTutorial, HelpExchange, HelpScan, HelpCapture, HelpPDFWriter, + HelpDistiller, HelpSearch, HelpCatalog, HelpReader, Weblink:Home \\ +Help(Windows) & About +\end{longtable} + +\section{PDF and HTML forms} +You must put your fields inside a \texttt{Form} environment (only one per file). + +There are six macros to prepare fields: + +\begin{cmdsyntax} +\ci{TextField}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}| +\end{cmdsyntax} + +\begin{cmdsyntax} +\ci{CheckBox}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}| +\end{cmdsyntax} + +\begin{cmdsyntax} +\ci{ChoiceMenu}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}{|\emph{choices}\verb|}| +\end{cmdsyntax} + +\begin{cmdsyntax} +\ci{PushButton}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}| +\end{cmdsyntax} + +\begin{cmdsyntax} +\ci{Submit}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}| +\end{cmdsyntax} + +\begin{cmdsyntax} +\ci{Reset}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}| +\end{cmdsyntax} + +The way forms and their labels are laid out is determined by: +\begin{cmdsyntax} +\ci{LayoutTextField}\verb|{|\emph{label}\verb|}{|\emph{field}\verb|}| +\end{cmdsyntax} + +\begin{cmdsyntax} +\ci{LayoutChoiceField}\verb|{|\emph{label}\verb|}{|\emph{field}\verb|}| +\end{cmdsyntax} + +\begin{cmdsyntax} +\ci{LayoutCheckField}\verb|{|\emph{label}\verb|}{|\emph{field}\verb|}| +\end{cmdsyntax} + +These macros default to \#1 \#2 + +What is actually shown in the field is determined by: +\begin{cmdsyntax} +\ci{MakeRadioField}\verb|{|\emph{width}\verb|}{|\emph{height}\verb|}| +\end{cmdsyntax} + +\begin{cmdsyntax} +\ci{MakeCheckField}\verb|{|\emph{width}\verb|}{|\emph{height}\verb|}| +\end{cmdsyntax} +\begin{cmdsyntax} +\ci{MakeTextField}\verb|{|\emph{width}\verb|}{|\emph{height}\verb|}| +\end{cmdsyntax} +\begin{cmdsyntax} +\ci{MakeChoiceField}\verb|{|\emph{width}\verb|}{|\emph{height}\verb|}| +\end{cmdsyntax} + +\begin{cmdsyntax} +\ci{MakeButtonField}\verb|{|\emph{text}\verb|}| +\end{cmdsyntax} + +These macros default to \verb|\vbox to #2{\hbox to #1{\hfill}\vfill}|, except the +last, which defaults to \#1; it is used for buttons, and the special \ci{Submit} and \ci{Reset} +macros. + +You may also want to redefine the following macros: +\begin{verbatim} +\def\DefaultHeightofSubmit{12pt} +\def\DefaultWidthofSubmit{2cm} +\def\DefaultHeightofReset{12pt} +\def\DefaultWidthofReset{2cm} +\def\DefaultHeightofCheckBox{0.8\baselineskip} +\def\DefaultWidthofCheckBox{0.8\baselineskip} +\def\DefaultHeightofChoiceMenu{0.8\baselineskip} +\def\DefaultWidthofChoiceMenu{0.8\baselineskip} +\def\DefaultHeightofText{\baselineskip} +\def\DefaultHeightofTextMultiline{4\baselineskip} +\def\DefaultWidthofText{3cm} +\end{verbatim} + +\subsection{Forms environment parameters} + +\smallskip +\begin{longtable}{@{}>{\ttfamily}l>{\itshape}lp{9cm}@{}} +action & URL & The URL that will receive the form data if a \textsf{Submit} button is included in the form \\ +encoding & name & The encoding for the string set to the URL; FDF-encoding is usual, and \texttt{html} is the only + valid value \\ +method & name & Used only when generating HTML; values can be \texttt{post} or \texttt{get} \\ +\end{longtable} + +\subsection{Forms optional parameters} +Note that all colors must be expressed as RGB triples, in the range 0..1 (i.e.\ \texttt{color=0 0 +0.5}) + +\smallskip +\begin{longtable}{@{}>{\ttfamily}ll>{\itshape}ll@{}} +accesskey & key & & (as per HTML) \\ +align & number & 0 & alignment within text field; 0 is left-aligned,\\* + & & & 1 is centered, 2 is right-aligned. \\ +altname & name & & alternative name,\\* + & & & the name shown in the user interface\\ +backgroundcolor & & & color of box \\ +bordercolor & & & color of border \\ +bordersep & & & box border gap \\ +borderwidth & & 1 & width of box border, the value is a dimension\\ + & & & or a number with default unit bp\\ +calculate & & & JavaScript code to calculate the value of the field \\ +charsize & dimen & & font size of field text \\ +checkboxsymbol & char & 4 (\ding{\number`4}) & symbol used for check boxes (ZapfDingbats), \\ +&&& the value is a character or \cs{ding}\verb|{|\texttt{\itshape number}\verb|}|, \\ +&&& see package \xpackage{pifont} from bundle \xpackage{psnfss} \\ +checked & boolean & false & whether option selected by default \\ +color & & & color of text in box \\ +combo & boolean & false & choice list is `combo' style \\ +default & & & default value \\ +disabled & boolean & false & field disabled \\ +format & & & JavaScript code to format the field \\ +height & dimen & & height of field box \\ +hidden & boolean & false & field hidden \\ +keystroke & & & JavaScript code to control the keystrokes on entry \\ +mappingname & name & & the mapping name to be used when exporting\\* + & & & the field data\\ +maxlen & number & 0 & number of characters allowed in text field \\ +menulength & number & 4 & number of elements shown in list \\ +multiline & boolean & false & whether text box is multiline \\ +name & name & & name of field (defaults to label) \\ +onblur & & & JavaScript code \\ +onchange & & & JavaScript code \\ +onclick & & & JavaScript code \\ +ondblclick & & & JavaScript code \\ +onfocus & & & JavaScript code \\ +onkeydown & & & JavaScript code \\ +onkeypress & & & JavaScript code \\ +onkeyup & & & JavaScript code \\ +onmousedown & & & JavaScript code \\ +onmousemove & & & JavaScript code \\ +onmouseout & & & JavaScript code \\ +onmouseover & & & JavaScript code \\ +onmouseup & & & JavaScript code \\ +onselect & & & JavaScript code \\ +password & boolean & false & text field is `password' style \\ +popdown & boolean & false & choice list is `popdown' style \\ +radio & boolean & false & choice list is `radio' style \\ +radiosymbol & char & H (\ding{\number`H}) & symbol used for radio fields (ZapfDingbats), \\ +&&& the value is a character or \cs{ding}\verb|{|\texttt{\itshape number}\verb|}|, \\ +&&& see package \xpackage{pifont} from bundle \xpackage{psnfss} \\ +readonly & boolean & false & field is readonly \\ +rotation & number & 0 & rotation of the widget annotation \\* + & & & (degree, counterclockwise, multiple of 90)\\ +tabkey & & & (as per HTML) \\ +validate & & & JavaScript code to validate the entry \\ +value & & & initial value \\ +width & dimen & & width of field box +\end{longtable} + +\section{Defining a new driver} +A hyperref driver has to provide definitions for eight macros: + +\smallskip +\noindent 1. \verb|\hyper@anchor| + +\noindent 2. \verb|\hyper@link| + +\noindent 3. \verb|\hyper@linkfile| + +\noindent 4. \verb|\hyper@linkurl| + +\noindent 5. \verb|\hyper@anchorstart| + +\noindent 6. \verb|\hyper@anchorend| + +\noindent 7. \verb|\hyper@linkstart| + +\noindent 8. \verb|\hyper@linkend| +\smallskip + +The draft option defines the macros as follows +\begin{verbatim} +\let\hyper@@anchor\@gobble +\gdef\hyper@link##1##2##3{##3}% +\def\hyper@linkurl##1##2{##1}% +\def\hyper@linkfile##1##2##3{##1}% +\let\hyper@anchorstart\@gobble +\let\hyper@anchorend\@empty +\let\hyper@linkstart\@gobbletwo +\let\hyper@linkend\@empty +\end{verbatim} + +\section{Special support for other packages} + +Package \xpackage{hyperref} aims to cooperate with other packages, but there are +several possible sources for conflict, such as + +\begin{itemize} + +\item Packages that manipulate the bibliographic mechanism. Peter +William's \xpackage{harvard} package is supported. However, the +recommended package is Patrick Daly's \xpackage{natbib} package that has +specific \xpackage{hyperref} hooks to allow reliable interaction. This +package covers a very wide variety of layouts and citation styles, all +of which work with \xpackage{hyperref}. + +\item Packages that typeset the contents of the \ci{label} and \ci{ref} +macros, such as \xpackage{showkeys}. Since the \xpackage{hyperref} package +redefines these commands, you must set \texttt{implicit=false} for these +packages to work. + +\item Packages that do anything serious with the index. +\end{itemize} + +The \xpackage{hyperref} package is distributed with variants on two useful +packages designed to work especially well with it. These are \xpackage{xr} +and \xpackage{minitoc}, which support crossdocument links using \hologo{LaTeX}'s +normal \cs{label}/\cs{ref} mechanisms and per-chapter tables of contents, +respectively. + + +\subsection{Package Compatibility} + +Currently only package loading orders are available: + + + +Note: hyperref loads package \xpackage{nameref} at \verb|\begin{document}|. +Sometimes this is too late, thus this package must be loaded +earlier. + + +\subsubsection{algorithm} +\begin{verbatim} + \usepackage{float} + \usepackage{hyperref} + \usepackage[chapter]{algorithm}% eg. +\end{verbatim} + +\subsubsection{amsmath} + + 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 gather: + +\begin{verbatim} + \usepackage{amsmath} + \let\equation\gather + \let\endequation\endgather +\end{verbatim} + +\subsubsection{amsrefs} + + Package loading order: + +\begin{verbatim} + \usepackage{hyperref} + \usepackage{amsrefs} +\end{verbatim} + +\subsubsection{arydshln, longtable} + + Package longtable must be put before hyperref and arydshln, + hyperref after arydshln generates an error, thus the + resulting package order is then: + +\begin{verbatim} + \usepackage{longtable} + \usepacakge{hyperref} + \usepackage{arydshln} +\end{verbatim} + +\subsubsection{babel/magyar.ldf} + + The old version 2005/03/30 v1.4j will not work. + You need at least version 1.5, maintained by P\'eter Szab\'o, + see CTAN:language/hungarian/babel/. + + +\subsubsection{babel/spanish.ldf} + + Babel's spanish.ldf redefines `\verb|\.|' to support `\verb|\...|'. + In bookmarks (\verb|\pdfstringdef|) only `\verb|\.|' is supported. + If `\verb|\...|' is needed, + \verb|\texorpdfstring{\...}{\dots}| + can be used instead. + + +\subsubsection{bibentry} + + Workaround: + +\begin{verbatim} + \makeatletter + \let\saved@bibitem\@bibitem + \makeatother + + \usepackage{bibentry} + \usepackage{hyperref} + + \begin{document} + + \begingroup + \makeatletter + \let\@bibitem\saved@bibitem + \nobibliography{database} + \endgroup +\end{verbatim} + +\subsubsection{bigfoot} + + Hyperref does not support package `bigfoot'. And package + `bigfoot' does not support hyperref's footnotes and disables + them (hyperfootnotes=false). + + +\subsubsection{chappg} + + Package `chappg' uses \verb|\@addtoreset| that is redefined by `hyperref'. + The package order is therefore: + +\begin{verbatim} + \usepackage{hyperref} + \usepackage{chappg} +\end{verbatim} + +\subsubsection{cite} + + This is from Mike Shell: + cite.sty cannot currently be used with hyperref. + However, I can do a workaround via: + +\begin{verbatim} + \makeatletter + \def\NAT@parse{\typeout{This is a fake Natbib command to fool Hyperref.}} + \makeatother + + \usepackage[hypertex]{hyperref} +\end{verbatim} + + 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). + + +\subsubsection{count1to} + + Package `count1to' adds several \verb|\@addtoreset| commands that confuse + `hyperref'. Therefore \verb|\theH<...>| has to be fixed: + +\begin{verbatim} + \usepackage{count1to} + \AtBeginDocument{% *after* \usepackage{count1to} + \renewcommand*{\theHsection}{\theHchapter.\arabic{section}}% + \renewcommand*{\theHsubsection}{\theHsection.\arabic{subsection}}% + \renewcommand*{\theHsubsubsection}{\theHsubsection.\arabic{subsubsection}}% + \renewcommand*{\theHparagraph}{\theHsubsubsection.\arabic{paragraph}}% + \renewcommand*{\theHsubparagraph}{\theHparagraph.\arabic{subparagraph}}% + } +\end{verbatim} + +\subsubsection{dblaccnt} + + pd1enc.def or puenc.def should be loaded before: +\begin{verbatim} + \usepackage{hyperref} + \usepackage{dblaccnt} +\end{verbatim} + or see entry for \xoption{vietnam}. + + +\subsubsection{easyeqn} + Not compatible, breaks. + + +\subsubsection{ellipsis} + + This packages redefines \verb|\textellipsis| + after package hyperref (pd1enc.def/puenc.def should be loaded before): +\begin{verbatim} + \usepackage{hyperref} + \usepackage{ellipsis} +\end{verbatim} + +\subsubsection{float} +\begin{verbatim} + \usepackage{float} + \usepackage{hyperref} +\end{verbatim} +\begin{itemize} + \item Several \verb|\caption| commands are not supported inside one float object. + \item Anchor are set at top of the float object, if its style is controlled + by float.sty. +\end{itemize} + +\subsubsection{endnotes} + Unsupported. + +\subsubsection{foiltex} + Update to version 2008/01/28 v2.1.4b: + Since version 6.77a 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 + 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 + support by using option \verb"hyperfootnotes=false". + + +\subsubsection{geometry} + + 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 \verb|\special| of geometry to an earlier + location: + +\begin{verbatim} + \documentclass[dvipdfm]{article}% or other classes + \usepackage{atbegshi} + \AtBeginDocument{% + \let\OrgAtBeginDvi\AtBeginDvi + \let\AtBeginDvi\AtBeginShipoutFirst + } + \usepackage[ + paperwidth=170mm, + paperheight=240mm + ]{geometry} + \AtBeginDocument{% + \let\AtBeginDvi\OrgAtBeginDvi + } + \usepackage{hyperref} + + or + + \documentclass[dvipdfm]{article}% or other classes + \usepackage{atbegshi} + \let\AtBeginDvi\AtBeginShipoutFirst + \usepackage[ + paperwidth=170mm, + paperheight=240mm + ]{geometry} + \usepackage{hyperref} +\end{verbatim} + +\subsubsection{IEEEtran.cls} + + version $\ge$ V1.6b (because of \verb|\@makecaption|, see ChangeLog) + + +\subsubsection{index} + + version $\ge$ 1995/09/28 v4.1 (because of \verb|\addcontentsline| redefinition) + + +\subsubsection{lastpage} + + Compatible. + + +\subsubsection{linguex} +\begin{verbatim} + \usepackage{hyperref} + \usepackage{linguex} +\end{verbatim} + +\subsubsection{ltabptch} +\begin{verbatim} + \usepackage{longtable} + \usepackage{ltabptch} + \usepackage{hyperref} +\end{verbatim} + +\subsubsection{mathenv} + + Unsupported. + + + + 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, + for example. + + +\subsubsection{minitoc-hyper} + + This package is obsolete, use the up-to-date original + package minitoc instead. + + + +\subsubsection{multind} +\begin{verbatim} + \usepackage{multind} + \usepackage{hyperref} +\end{verbatim} + +\subsubsection{natbib} +\begin{verbatim} + \usepackage{natbib} + \usepackage{hyperref} +\end{verbatim} + +\subsubsection{nomencl} +Example for introducing links for the page numbers: +\begin{verbatim} + \renewcommand*{\pagedeclaration}[1]{\unskip, \hyperpage{#1}} +\end{verbatim} + + +\subsubsection{ntheorem-hyper} + This package is obsolete, use the up-to-date original + package ntheorem instead. + + +For equations the following might work: +\begin{verbatim} + \renewcommand*{\eqdeclaration}[1]{% + \hyperlink{equation.#1}{(Equation~#1)}% + } + But the mapping from the equation number to the anchor name + is not available in general. +\end{verbatim} + +\subsubsection{parskip} +\begin{verbatim} + \usepackage{parskip} + \usepackage{hyperref}[2012/08/20] +\end{verbatim} + + + Both packages want to redefine \verb|\@starttoc|. + + +\subsubsection{prettyref} +\begin{verbatim} +%%% example for prettyref %%% +\documentclass{article} +\usepackage{prettyref} +\usepackage[pdftex]{hyperref} + +%\newrefformat{FIG}{Figure~\ref{#1}}% without hyperref +\newrefformat{FIG}{\hyperref[{#1}]{Figure~\ref*{#1}}} + +\begin{document} + This is a reference to \prettyref{FIG:ONE}. + \newpage + \begin{figure} + \caption{This is my figure} + \label{FIG:ONE} + \end{figure} +\end{document} +%%% example for prettyref %%% + \end{verbatim} + + +\subsubsection{setspace} +\begin{verbatim} + \usepackage{setspace} + \usepackage{hyperref} +\end{verbatim} + +\subsubsection{sidecap} +\begin{verbatim} + Before 2002/05/24 v1.5h: + \usepackage{nameref} + \usepackage{hyperref} + \usepackage{sidecap} +\end{verbatim} + +\subsubsection{subfigure} +\begin{verbatim} + 1995/03/06 v2.0: + \usepackage{subfigure} + \usepackage{hyperref} + % hypertexnames is set to false. + v2.1: + \usepackage{nameref} + \usepackage{subfigure} + \usepackage{hyperref} + or + \usepackage{hyperref} + \usepackage{subfigure} + v2.1.2: + please update + v2.1.3: + \usepackage{hyperref} + \usepackage{subfigure} + or vice versa? +\end{verbatim} + +\subsubsection{titleref} +\begin{verbatim} + \usepackage{nameref} + \usepackage{titleref}% without usetoc + \usepackage{hyperref} +\end{verbatim} + +\subsubsection{tabularx} + + Linked footnotes are not supported inside environment `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'. + + +\subsubsection{titlesec} + + \xpackage{nameref} supports titlesec, but hyperref does not + (unsolved is the anchor setting, missing with unnumbered + section, perhaps problems with page breaks with numbered ones). + + +\subsubsection{ucs/utf8x.def} + + 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 \xpackage{ucs} offers \verb|\PrerenderUnicode| or \verb|\PreloadUnicodePage| + to solve this: +\begin{verbatim} + \usepackage{ucs} + \usepackage[utf8x]{inputenc} + \usepackage{hyperref}% or with option unicode + \PrerenderUnicode{^^c3^^b6}% or \PrerenderUnicodePage{1} + \hypersetup{pdftitle={Umlaut example: ^^c3^^b6}} +\end{verbatim} + The notation with two carets avoids trouble with 8-bit bytes + for the README file, you can use the characters directly. + + +\subsubsection{varioref} + 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 order: +\begin{verbatim} + \usepackage{nameref} + \usepackage{varioref} + \usepackage{hyperref} +\end{verbatim} + + + 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: +\begin{itemize} +\item \verb|\Ref|, \verb|\Vref| do not uppercase the first letter. +\item \verb|\vpageref[]{...}| + On the same page a previous space is not suppressed. +\end{itemize} + +\subsubsection{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): + +\begin{verbatim} + \documentclass{article} + + % package order does not matter + \usepackage{verse} + \usepackage{hyperref} + + \makeatletter + % make unique poemline anchors + \newcounter{verse@env} + \setcounter{verse@env}{0} + \let\org@verse\verse + \def\verse{% + \stepcounter{verse@env}% + \org@verse + } + \def\theHpoemline{\arabic{verse@env}.\thepoemline} + + % add anchor for before \addcontentsline in \@vsptitle + \let\org@vsptitle\@vsptitle + \def\@vsptitle{% + \phantomsection + \org@vsptitle + } + \makeatother + + \begin{document} + + \poemtitle{Poem 1} + \begin{verse} + An one-liner. + \end{verse} + + \newpage + + \poemtitle{Poem 2} + \begin{verse} + Another one-liner. + \end{verse} + + \end{document} +\end{verbatim} + +\subsubsection{vietnam} +\begin{verbatim} + % pd1enc.def should be loaded before package dblaccnt: + \usepackage[PD1,OT1]{fontenc} + \usepackage{vietnam} + \usepackage{hyperref} +\end{verbatim} + +\subsubsection{XeTeX} + + Default for the encoding of bookmarks is \verb|pdfencoding=unicode|. + That means the strings are always treated as unicode strings. + If \verb|auto| or \verb|pdfdoc| is forced it applies only + 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 + UTF-16BE back to UTF-8 in a number of places for + xetex to avoid the xdvipdfmx warning + + \verb"Failed to convert input string to UTF16..." + + This is no longer needed with a current xdvipdfmx, so this code has + been removed. \verb|\csname HyPsd@XeTeXBigCharstrue\endcsname| should no + longer be used. + + +\section[Limitations]{Limitations% +\footnote{This section moved from the README file, needs more integration into the manual}} +\subsection{Wrapped/broken link support} + + Only few drivers support automatically wrapped/broken links, + e.g. pdftex, dvipdfm, hypertex. Other drivers lack this + feature, e.g. dvips, dvipsone. + + Workarounds: +\begin{itemize} +\item For long section or caption titles in the table of contents + or list of figures/tables option \xoption{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 \verb|\hbox| + warning. +\item ``\verb|\url|''s are caught by package \xpackage{breakurl}. +\item The option \xoption{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 points, especially within + \verb|\url|. (See thread ``hyperref.sty, breaklinks and url.sty 3.2'' + in comp.text.tex 2005-09). +\end{itemize} + +\subsection{Links across pages} + + In general they have problems: +\begin{itemize} + \item Some driver doesn't support them at all (see above). + \item The driver allows it, but the link result might include + the footer and/or header, or an error message can + occur sometimes. +\end{itemize} + +\subsection{Footnotes} + + LaTeX allows the separation of the footnote mark and the + footnote text (\verb|\footnotemark|, \verb|\footnotetext|). This interface + might be enough for visual typesetting. But the relation between + \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 + argument of \verb|\footnotemark| and \verb|\footnotetext|. + + +\section[Hints]{Hints% +\footnote{This section moved from the README file, needs more integration into the manual}} + +\subsection{Spaces in option values} + + Unhappily LaTeX strips spaces from options if they are given + in \verb|\documentclass| or \verb|\usepackage| (or \verb|\RequirePackage|), e.g.: +\begin{verbatim} + \usepackage[pdfborder=0 0 1]{hyperref} +\end{verbatim} + Package hyperref now gets +\begin{verbatim} + pdfborder=001 +\end{verbatim} + and the result is an invalid PDF file. + As workaround braces can be used: +\begin{verbatim} + \usepackage[pdfborder={0 0 1}]{hyperref} +\end{verbatim} + Some options can also be given in \verb|\hypersetup| +\begin{verbatim} + \hypersetup{pdfborder=0 0 1} +\end{verbatim} + In \verb|\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 packages \xpackage{kvoptions-patch} + (from project \xpackage{kvoptions}) or \xpackage{xkvltxp} (from project \xpackage{xsetkeys}). + + +\subsection{Index with makeindex} +\begin{itemize} + \item Package 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 + 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|, ...), + then the page anchors are not unique. Therefore option + \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 + \verb|\hyperpage| command. With logical markup this situation + can easily be solved: +\begin{verbatim} + \usepackage{makeidx} + \makeindex + \usepackage[hyperindex]{hyperref} + \newcommand*{\main}[1]{\textbf{\hyperpage{#1}}} + ... + \index{Some example|main} +\end{verbatim} + \item Scientic Word/Scientific WorkPlace users can use + package robustindex with hyperindex=false. + \item Other encap characters can be set by option \xoption{encap}. + Example for use of ``?'': +\begin{verbatim} + \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 + insertion will be disabled by \verb"hyperindex=false". + \verb|\hyperpage| will be defined regardless of setting of hyperindex. +\begin{verbatim} +%%% cut %%% hyperindex.ist %%% cut %%% +delim_0 ", \\hyperpage{" +delim_1 ", \\hyperpage{" +delim_2 ", \\hyperpage{" +delim_n "}, \\hyperpage{" +delim_t "}" +encap_prefix "}\\" +encap_infix "{\\hyperpage{" +encap_suffix "}" +%%% cut %%% hyperindex.ist %%% cut %%% +\end{verbatim} +\end{itemize} + +\subsection{Warning \texttt{"bookmark level for unknown defaults to 0"}} + + Getting rid of it: +\begin{verbatim} +\makeatletter +\providecommand*{\toclevel@}{0} +\makeatother +\end{verbatim} + +\subsection{Link anchors in figures} + + 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 \xpackage{hypcap} that implements + a method to circumvent the problem. + + +\subsection{Additional unicode characters in bookmarks and pdf information entries:} +\begin{verbatim} +\documentclass[pdftex]{article} +\usepackage[unicode]{hyperref} +\end{verbatim} + +Support for additional unicode characters: + + Example: \verb|\.{a}| and \verb|\d{a}| + + 1. Get a list with unicode data, eg: + + http://www.unicode.org/Public/UNIDATA/UnicodeData.txt + + 2. Identify the characters (\verb|\.{a}|, \verb|\d{a}|): +\begin{verbatim} + 0227;LATIN SMALL LETTER A WITH DOT ABOVE;... + 1EA1;LATIN SMALL LETTER A WITH DOT BELOW;... +\end{verbatim} + + 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.) + +\begin{verbatim} + 0227 -> \002\047 + 1EA1 -> \036\241 +\end{verbatim} + + 4. Transform into a form understood by hyperref: + + Hyperref must know where the first byte starts, + this is marked by \verb"9" (8 and 9 cannot occur in + octal numbers): + +\begin{verbatim} + \002\047 -> \9002\047 + \036\241 -> \9036\241 +\end{verbatim} + + Optional: \verb"8" is used for abbreviations: + +\begin{verbatim} + \900 = \80, \901 = \81, \902 = \82, ... + + \9002\047 -> \82\047 +\end{verbatim} + + 5. Declare the character with LaTeX: + +\begin{verbatim} +\DeclareTextCompositeCommand{\.}{PU}{a}{\82\047} +\DeclareTextCompositeCommand{\d}{PU}{a}{\9036\241} + +\begin{document} +\section{\={a}, \d{a}, \'{a}, \.{a}} +\end{document} + \end{verbatim} + +\subsection{Footnotes} + + 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 + support by \verb"hyperfootnotes=false" or fiddle with internal macros, + nasty examples: + +\begin{verbatim} +\documentclass{article} +\usepackage{hyperref} +\begin{document} +Hello% +\footnote{The first footnote} +World% +\addtocounter{footnote}{-1}% +\addtocounter{Hfootnote}{-1}% +\footnotemark. +\end{document} + + or + +\documentclass{article} + +\usepackage{hyperref} + +\begin{document} + +\makeatletter + +A% + \footnotemark + \let\saved@Href@A\Hy@footnote@currentHref + % remember link name +B% + \footnotemark + \let\saved@Href@B\Hy@footnote@currentHref +b% + \addtocounter{footnote}{-1}% + \addtocounter{Hfootnote}{-1}% generate the same anchor + \footnotemark +C% + \footnotemark + \let\saved@Href@C\Hy@footnote@currentHref + + \addtocounter{footnote}{-2}% + \let\Hy@footnote@currentHref\saved@Href@A +\footnotetext{AAAA}% + \addtocounter{footnote}{1}% + \let\Hy@footnote@currentHref\saved@Href@B +\footnotetext{BBBBB}% + \addtocounter{footnote}{1}% + \let\Hy@footnote@currentHref\saved@Href@C +\footnotetext{CCCC}% + +\end{document} +\end{verbatim} + +\subsection{Subordinate counters} + + 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 \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. + + + + 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 + macro \verb|\theH| can be redefined accordingly. Or move the + definition of subordinate counters after hyperref is loaded. + + Example for \verb|\newtheorem|, problematic case: +\begin{verbatim} + \newtheorem{corA}{CorollaryA}[section] + \usepackage{hyperref} +\end{verbatim} + Solution a) +\begin{verbatim} + \usepackage{hyperref} + \newtheorem{corA}{CorollaryA}[section} +\end{verbatim} + Solution b) +\begin{verbatim} + \newtheorem{corA}{CorollaryA}[section] + \usepackage{hyperref} + \newcommand*{\theHcorA}{\theHsection.\number\value{corA}} +\end{verbatim} + +\section{History and acknowledgments} + +The original authors of \textsf{hyperbasics.tex} and +\textsf{hypertex.sty}, from which this package descends, are Tanmoy +Bhattacharya and Thorsten Ohl. Package \xpackage{hyperref} +started as a simple port of their work to \hologo{LaTeXe} standards, but +eventually I rewrote nearly everything, because I didn't understand a +lot of the original, and was only interested in getting it to work with +\hologo{LaTeX}. I would like to thank Arthur Smith, Tanmoy Bhattacharya, Mark +Doyle, Paul Ginsparg, David Carlisle, T.\ V.\ Raman and Leslie Lamport +for comments, requests, thoughts and code to get the package into its +first useable state. Various other people are mentioned at the point in +the source where I had to change the code in later versions because of +problems they found. + +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 +Rev\TeX\ 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 +\textsf{dvipsone} and \textsf{dviwindo} drivers. Sergey Lesenko provided +the changes needed for \textsf{dvipdf}, and \Hanh{} supplied all the +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 +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 ideas; Thomas Merz, whose book \emph{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 \textsf{pdftex}. + +Steve Peter recreated the manual source in July 2003 after it had been +lost. + +Especial extra thanks to David Carlisle for the \xpackage{backref} module, +the ps2pdf and dviwindo support, frequent general rewrites of my bad +code, and for working on changes to the \xpackage{xr} package to suit +\xpackage{hyperref}. + +\begingroup + \makeatletter + \let\chapter=\section + % subsections goes into bookmarks but not toc + \hypersetup{bookmarksopenlevel=1} + \addtocontents{toc}{\protect\setcounter{tocdepth}{1}} + % The \section command acts as \subsection. + % Additionally the title is converted to lowercase except + % for the first letter. + \def\section{% + \let\section\lc@subsection + \lc@subsection + } + \def\lc@subsection{% + \@ifstar{\def\mystar{*}\lc@sec}% + {\let\mystar\@empty\lc@sec}% + } + \def\lc@sec#1{% + \lc@@sec#1\@nil + } + \def\lc@@sec#1#2\@nil{% + \begingroup + \def\a{#1}% + \lowercase{% + \edef\x{\endgroup + \noexpand\subsection\mystar{\a#2}% + }% + }% + \x + } +\clearpage + + +\chapter{GNU Free Documentation License} + +Version 1.2, November 2002 + + + Copyright \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. + + +\section*{PREAMBLE} + +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 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 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. + + +\section{APPLICABILITY AND DEFINITIONS} +\label{applicability} + +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 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 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 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 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 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 +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or 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 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 proprietary formats that can be read and edited only by +proprietary word processors, SGML 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 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 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 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. + + +\section{VERBATIM COPYING} +\label{verbatim} + +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 copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in +section~\ref{copying}. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +\section{COPYING IN QUANTITY} +\label{copying} + +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 identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in 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 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 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 of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will 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 redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +\section{MODIFICATIONS} +\label{modifications} + +You may copy and distribute a Modified Version of the Document under +the conditions of sections~\ref{verbatim} and \ref{copying} 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: + +\renewcommand{\labelenumi}{\Alph{enumi}.} +\begin{enumerate} +\item 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. +\item 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. +\item State on the Title page the name of the publisher of the + Modified Version, as the publisher. +\item Preserve all the copyright notices of the Document. +\item Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +\item 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. +\item Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +\item Include an unaltered copy of this License. +\item 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 describing the Modified + Version as stated in the previous sentence. +\item 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 Document itself, or if the original + publisher of the version it refers to gives permission. +\item 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. +\item 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. +\item Delete any section Entitled ``Endorsements''. Such a section + may not be included in the Modified Version. +\item Do not retitle any existing section to be Entitled ``Endorsements'' + or to conflict in title with any Invariant Section. +\item Preserve any Warranty Disclaimers. + +\end{enumerate} + +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 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 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 names for publicity for or to assert or +imply endorsement of any Modified Version. + + +\section{COMBINING DOCUMENTS} +\label{combining} + +You may combine the Document with other documents released under this +License, under the terms defined in section~\ref{modifications} +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 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 documents, forming one section Entitled +``History''; likewise combine any sections Entitled ``Acknowledgements'', +and any sections Entitled ``Dedications''. You must delete all sections +Entitled ``Endorsements''. + + +\section{COLLECTIONS OF DOCUMENTS} +\label{collections} + +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 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. + + +\section{AGGREGATION WITH INDEPENDENT WORKS} +\label{aggregation} + +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~\ref{copying} 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. + + +\section{TRANSLATION} +\label{translation} + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of +section~\ref{modifications}. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original 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 requirement +(section~\ref{modifications}) to Preserve +its Title (section~\ref{applicability}) will typically require +changing the actual title. + + +\section{TERMINATION} +\label{termination} + +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. + + +\section{FUTURE REVISIONS OF THIS LICENSE} +\label{future} + +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 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. + + +\section*{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 put the following copyright and +license notices just after the title page: + +\begin{quote} + 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''. +\end{quote} + +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 Back-Cover Texts being LIST. + +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 examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + +\endgroup + +\end{document} diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc2.html b/macros/latex/contrib/hyperref/doc/hyperref-doc2.html new file mode 100644 index 0000000000..9537a69998 --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc2.html @@ -0,0 +1,20 @@ + + + + + + + + + + +

+ + diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc3.html b/macros/latex/contrib/hyperref/doc/hyperref-doc3.html new file mode 100644 index 0000000000..15226b2dc2 --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc3.html @@ -0,0 +1,18 @@ + + + + + + + + + + +
+

2This is borrowed from an article by Arthur Smith.

+ + diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc4.html b/macros/latex/contrib/hyperref/doc/hyperref-doc4.html new file mode 100644 index 0000000000..ea4d955228 --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc4.html @@ -0,0 +1,24 @@ + + + + + + + + + + +
+

3Make sure you turn off the partial font downloading supported by dvips and dvipsone in favor of Distiller’s own + system.

+ + diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc5.html b/macros/latex/contrib/hyperref/doc/hyperref-doc5.html new file mode 100644 index 0000000000..da6b99aee2 --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc5.html @@ -0,0 +1,18 @@ + + + + + + + + + + +
+ 4This section moved from the README file, needs more integration into the manual
+ + diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc6.html b/macros/latex/contrib/hyperref/doc/hyperref-doc6.html new file mode 100644 index 0000000000..949ee1903a --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc6.html @@ -0,0 +1,18 @@ + + + + + + + + + + +
+ 5This section moved from the README file, needs more integration into the manual
+ + diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc7.html b/macros/latex/contrib/hyperref/doc/hyperref-doc7.html new file mode 100644 index 0000000000..c43b481adc --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc7.html @@ -0,0 +1,18 @@ + + + + + + + + + + +
+ 6This section moved from the README file, needs more integration into the manual
+ + diff --git a/macros/latex/contrib/hyperref/doc/hyperref.pdf b/macros/latex/contrib/hyperref/doc/hyperref.pdf index d93f8f2cb8..fd5f236b7c 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/manual.css b/macros/latex/contrib/hyperref/doc/manual.css deleted file mode 100644 index ea1c3e45c1..0000000000 --- a/macros/latex/contrib/hyperref/doc/manual.css +++ /dev/null @@ -1,296 +0,0 @@ - -/* start css.sty */ -.ec-lmr-17{font-size:170%;} -.ec-lmss-17{font-size:170%; font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmss-17{ font-family: sans-serif;} -.ec-lmr-12{font-size:120%;} -.ec-lmvtt-10x-x-120{font-size:120%; font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-120{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmvtt-10{ font-family: monospace,monospace;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmr-9{font-size:90%;} -.ec-lmr-8{font-size:80%;} -.ec-lmvtt-10x-x-80{font-size:80%; font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmvtt-10x-x-80{ font-family: monospace,monospace;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.lmsy7-{font-size:70%;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmss-8{font-size:80%; font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmss-8{ font-family: sans-serif;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtk-10{ font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -.ec-lmvtto-10{ font-style: oblique; font-family: monospace,monospace;} -p{margin-top:0;margin-bottom:0} -p.indent{text-indent:0;} -p + p{margin-top:1em;} -p + div, p + pre {margin-top:1em;} -div + p, pre + p {margin-top:1em;} -a { overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; hyphens: auto; } -@media print {div.crosslinks {visibility:hidden;}} -a img { border-top: 0; border-left: 0; border-right: 0; } -center { margin-top:1em; margin-bottom:1em; } -td center { margin-top:0em; margin-bottom:0em; } -.Canvas { position:relative; } -img.math{vertical-align:middle;} -div.par-math-display, div.math-display{text-align:center;} -li p.indent { text-indent: 0em } -li p:first-child{ margin-top:0em; } -li p:last-child, li div:last-child { margin-bottom:0.5em; } -li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; } -.enumerate1 {list-style-type:decimal;} -.enumerate2 {list-style-type:lower-alpha;} -.enumerate3 {list-style-type:lower-roman;} -.enumerate4 {list-style-type:upper-alpha;} -div.newtheorem { margin-bottom: 2em; margin-top: 2em;} -.obeylines-h,.obeylines-v {white-space: nowrap; } -div.obeylines-v p { margin-top:0; margin-bottom:0; } -.overline{ text-decoration:overline; } -.overline img{ border-top: 1px solid black; } -td.displaylines {text-align:center; white-space:nowrap;} -.centerline {text-align:center;} -.rightline {text-align:right;} -pre.verbatim {font-family: monospace,monospace; text-align:left; clear:both; } -.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } -div.fbox {display:table} -div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } -div.minipage{width:100%;} -div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} -div.center div {text-align: left;} -div.flushright, div.flushright div.flushright {text-align: right;} -div.flushright div {text-align: left;} -div.flushleft {text-align: left;} -.underline{ text-decoration:underline; } -.underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } -.framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } -.framebox-c {text-align:center;} -.framebox-l {text-align:left;} -.framebox-r {text-align:right;} -span.thank-mark{ vertical-align: super } -span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } -div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } -table.tabular td p{margin-top:0em;} -table.tabular {margin-left: auto; margin-right: auto;} -td p:first-child{ margin-top:0em; } -td p:last-child{ margin-bottom:0em; } -div.td00{ margin-left:0pt; margin-right:0pt; } -div.td01{ margin-left:0pt; margin-right:5pt; } -div.td10{ margin-left:5pt; margin-right:0pt; } -div.td11{ margin-left:5pt; margin-right:5pt; } -table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } -td.td00{ padding-left:0pt; padding-right:0pt; } -td.td01{ padding-left:0pt; padding-right:5pt; } -td.td10{ padding-left:5pt; padding-right:0pt; } -td.td11{ padding-left:5pt; padding-right:5pt; } -table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } -.hline hr, .cline hr{ height : 0px; margin:0px; } -.hline td, .cline td{ padding: 0; } -.hline hr, .cline hr{border:none;border-top:1px solid black;} -.tabbing-right {text-align:right;} -div.float, div.figure {margin-left: auto; margin-right: auto;} -div.float img {text-align:center;} -div.figure img {text-align:center;} -.marginpar,.reversemarginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} -.marginpar p,.reversemarginpar p{margin-top:0.4em; margin-bottom:0.4em;} -.reversemarginpar{float:left;} -table.equation {width:100%;} -.equation td{text-align:center; } -td.equation { margin-top:1em; margin-bottom:1em; } -td.equation-label { width:5%; text-align:center; } -td.eqnarray4 { width:5%; white-space: normal; } -td.eqnarray2 { width:5%; } -table.eqnarray-star, table.eqnarray {width:100%;} -div.eqnarray{text-align:center;} -div.array {text-align:center;} -div.pmatrix {text-align:center;} -table.pmatrix {width:100%;} -span.pmatrix img{vertical-align:middle;} -div.pmatrix {text-align:center;} -table.pmatrix {width:100%;} -span.bar-css {text-decoration:overline;} -img.cdots{vertical-align:middle;} -.partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} -.chapterToc a, .chapterToc, .likechapterToc a, .likechapterToc, .appendixToc a, .appendixToc {line-height: 200%; font-weight:bold;} -.index-item, .index-subitem, .index-subsubitem {display:block} -div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;} -div.caption span.id{font-weight: bold; white-space: nowrap; } -h1.partHead{text-align: center} -p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } -p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } -.paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} -.subparagraphHead, .likesubparagraphHead { font-weight: bold;} -.verse{white-space:nowrap; margin-left:2em} -div.maketitle {text-align:center;} -h2.titleHead{text-align:center;} -div.maketitle{ margin-bottom: 2em; } -div.author, div.date {text-align:center;} -div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } -div.author{white-space: nowrap;} -div.abstract p {margin-left:5%; margin-right:5%;} -div.abstract {width:100%;} -.abstracttitle{text-align:center;margin-bottom:1em;} -div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } -table.tabular td p{margin-top:0em;} -table.tabular {margin-left: auto; margin-right: auto;} -td p:first-child{ margin-top:0em; } -td p:last-child{ margin-bottom:0em; } -div.td00{ margin-left:0pt; margin-right:0pt; } -div.td01{ margin-left:0pt; margin-right:5pt; } -div.td10{ margin-left:5pt; margin-right:0pt; } -div.td11{ margin-left:5pt; margin-right:5pt; } -table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } -td.td00{ padding-left:0pt; padding-right:0pt; } -td.td01{ padding-left:0pt; padding-right:5pt; } -td.td10{ padding-left:5pt; padding-right:0pt; } -td.td11{ padding-left:5pt; padding-right:5pt; } -table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } -.hline hr, .cline hr{ height : 0px; margin:0px; } -.hline td, .cline td{ padding: 0; } -.hline hr, .cline hr{border:none;border-top:1px solid black;} -div.array {text-align:center;} -table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } -div.longtable{text-align:center;} -table.longtable{margin-left:auto; margin-right: auto;} -span.HoLogo-LaTeX span.HoLogo-a{position:relative;top:-.5ex;margin-left:-.36em;margin-right:-.15em;font-size:85%;} -span.HoLogo-TeX span.HoLogo-e{position:relative;top:.5ex;margin-left:-.1667em;margin-right:-.125em;} -a span.HoLogo-TeX span.HoLogo-e{text-decoration:none;} -span.HoLogo-XeTeX span.HoLogo-TeX{margin-left:-.15em;} -span.HoLogo-Xe span.HoLogo-e{position:relative;top:.5ex;left-margin:-.1em;} -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/manual.html b/macros/latex/contrib/hyperref/doc/manual.html deleted file mode 100644 index e743ee9640..0000000000 --- a/macros/latex/contrib/hyperref/doc/manual.html +++ /dev/null @@ -1,7468 +0,0 @@ - - -Hypertext marks in LATEX: a manual for hyperref - - - - - - - -
- - - - - -

Hypertext marks in LATEX: a manual for hyperref

-
Sebastian Rahtz (deceased)
Heiko Oberdiek (inactive)
The LaTeX3 Project (https://github.com/latex3/hyperref/issues)

-
2021-02-04 v7.00g
-
-

Contents

-
-  1 Introduction -
 2 Implicit behavior -
 3 Package options -
  3.1 General options -
  3.2 Options for destination names -
  3.3 Configuration options -
  3.4 Backend drivers -
  3.5 Extension options -
  3.6 PDF-specific display options -
  3.7 PDF display and information options -
  3.8 Option pdfinfo -
  3.9 Big alphabetical list -
 4 Additional user macros -
  4.1 Bookmark macros -
  4.2 Pagelabels -
  4.3 Utility macros -
 5 New Features -
  5.1 Option ‘pdflinkmargin’ -
  5.2 Field option ‘calculatesortkey’ -
  5.3 Option ‘localanchorname’ -
  5.4 Option ‘customdriver’ -
  5.5 Option ‘psdextra’ -
  5.6 \XeTeXLinkBox -
  5.7 \IfHyperBooleanExists and \IfHyperBoolean -
  5.8 \unichar -
  5.9 \ifpdfstringunicode -
  5.10 Customizing index style file with \nohyperpage -
  5.11 Experimental option ‘ocgcolorlinks’ -
  5.12 Option ‘pdfa’ -
  5.13 Option ‘linktoc’ added -
  5.14 Option ‘pdfnewwindow’ changed - -
  5.15 Flag options for PDF forms -
  5.16 Option ‘pdfversion’ -
  5.17 Field option ‘name’ -
  5.18 Option ‘pdfencoding’ -
  5.19 Color options/package hycolor -
  5.20 Option pdfusetitle -
  5.21 Starred form of \autoref -
  5.22 Link border style -
  5.23 Option bookmarksdepth -
  5.24 Option pdfescapeform -
  5.25 Default driver setting -
  5.26 Backref entries -
  5.27 \phantomsection -
 6 Acrobat-specific behavior -
 7 PDF and HTML forms -
  7.1 Forms environment parameters -
  7.2 Forms optional parameters -
 8 Defining a new driver -
 9 Special support for other packages -
  9.1 Package Compatibility -
 10 Limitations -
  10.1 Wrapped/broken link support -
  10.2 Links across pages -
  10.3 Footnotes -
 11 Hints -
  11.1 Spaces in option values -
  11.2 Index with makeindex -
  11.3 Warning "bookmark level for unknown <foobar> defaults to 0" -
  11.4 Link anchors in figures -
  11.5 Additional unicode characters in bookmarks and pdf information entries: -
  11.6 Footnotes -
  11.7 Subordinate counters -
 12 History and acknowledgments -
 13 GNU Free Documentation License -
  13.1 Applicability and definitions -
  13.2 Verbatim copying -
  13.3 Copying in quantity -
  13.4 Modifications -
  13.5 Combining documents -
  13.6 Collections of documents -
  13.7 Aggregation with independent works -
  13.8 Translation -
  13.9 Termination -
  13.10 Future revisions of this license -
- - -

-

1 Introduction

-

The package derives from, and builds on, the work of the HyperTEX project, described at -http://xxx.lanl.gov/hypertex/1 . -It extends the functionality of all the LATEX cross-referencing commands (including the table of -contents, bibliographies etc) to produce \special commands which a driver can turn into hypertext links; -it also provides new commands to allow the user to write ad hoc hypertext links, including those to -external documents and URLs. -

The package is currently maintained at https://github.com/latex3/hyperref/ and issues should be -reported there. -

This manual provides a brief overview of the hyperref package. For more details, you should read the -additional documentation distributed with the package, as well as the complete documentation by -processing hyperref.dtx. You should also read the chapter on hyperref in The LATEX Web Companion, -where you will find additional examples. -

The HyperTEX specification2 -says that conformant viewers/translators must recognize the following set of \special constructs: -

-href:
html:<a href = "href_string"> -
-name:
html:<a name = "name_string"> -
-end:
html:</a> -
-image:
html:<img src = "href_string"> -
-base_name:
html:<base href = "href_string">
-

The href, name and end commands are used to do the basic hypertext operations of establishing links -between sections of documents. The image command is intended (as with current HTML -viewers) to place an image of arbitrary graphical format on the page in the current location. -The base_name command is be used to communicate to the DVI viewer the full (URL) -location of the current document so that files specified by relative URLs may be retrieved -correctly. -

The href and name commands must be paired with an end command later in the TeX file—the -TeX commands between the two ends of a pair form an anchor in the document. In the case of an href -command, the anchor is to be highlighted in the DVI viewer, and when clicked on will cause the scene to -shift to the destination specified by href_string. The anchor associated with a name command represents -a possible location to which other hypertext links may refer, either as local references (of -the form href="#name_string" with the name_string identical to the one in the name -command) or as part of a URL (of the form URL#name_string). Here href_string is a valid URL -or local identifier, while name_string could be any string at all: the only caveat is that ‘"’ -characters should be escaped with a backslash (\), and if it looks like a URL name it may cause -problems. - - -

However, the drivers intended to produce only PDF use literal PostScript or PDF \special -commands. The commands are defined in configuration files for different drivers, selected by package -options; at present, the following drivers are supported: -

-hypertex
DVI processors conforming to the HyperTeX guidelines (i.e. xdvi, dvips (with the -z - option), OzTeX, and Textures) -
-dvips
produces \special commands tailored for dvips -
-dvipsone
produces \special commands tailored for dvipsone -
-ps2pdf
a special case of output suitable for processing by earlier versions of Ghostscript’s PDF - writer; this is basically the same as that for dvips, but a few variations remained before - version 5.21 -
-tex4ht
produces \special commands for use with TeX4ht -
-pdftex
pdfTeX, Hn Th Thnh’s TeX variant that writes PDF directly -
-luatex
luaTeX, Unicode TeX variant that writes PDF directly -
-dvipdfm
produces \special commands for Mark Wicks’ DVI to PDF driver dvipdfm -
-dvipdfmx
produces \special commands for driver dvipdfmx, a successor of dvipdfm -
-dviwindo
produces \special commands that Y&Y’s Windows previewer interprets as hypertext - jumps within the previewer -
-vtex
produces \special commands that MicroPress’ HTML and PDF-producing TeX variants - interpret as hypertext jumps within the previewer -
-textures
produces \special commands that Textures interprets as hypertext jumps within the - previewer -
-xetex
produces \special commands for XeTeX
-

Output from dvips or dvipsone must be processed using Acrobat Distiller to obtain a PDF -file.3 -The result is generally preferable to that produced by using the hypertex driver, and then -processing with dvips -z, but the DVI file is not portable. The main advantage of using the -HyperTeX \special commands is that you can also use the document in hypertext DVI viewers, such as -xdvi. - -

-driverfallback
If a driver is not given and cannot be autodetected, then use the driver option, given as - value to this option driverfallback. Example: -
-

driverfallback=dvipdfm

-

Autodetected drivers (pdftex, xetex, vtex, vtexpdfmark) are recognized from within TeX and - therefore cannot be given as value to option driverfallback. However a DVI driver program is run - after the TeX run is finished. Thus it cannot be detected at TeX macro level. Then package - hyperref uses the driver, given by driverfallback. If the driver is already specified or can be - autodetected, then option driverfallback is ignored.

-

2 Implicit behavior

-

This package can be used with more or less any normal LaTeX document by specifying in the document -preamble - - -

-\usepackage{hyperref}
-
-

-

Make sure it comes last of your loaded packages, to give it a fighting chance of not being over-written, -since its job is to redefine many LaTeX commands. Hopefully you will find that all cross-references work -correctly as hypertext. For example, \section commands will produce a bookmark and a link, whereas -\section* commands will only show links when paired with a corresponding \addcontentsline -command. -

In addition, the hyperindex option (see below) attempts to make items in the index by hyperlinked -back to the text, and the option backref inserts extra ‘back’ links into the bibliography for each entry. -Other options control the appearance of links, and give extra control over PDF output. For example, -colorlinks, as its name well implies, colors the links instead of using boxes; this is the option used in this -document. -

-

3 Package options

-

All user-configurable aspects of hyperref are set using a single ‘key=value’ scheme (using the keyval -package) with the key Hyp. The options can be set either in the optional argument to the -\usepackage command, or using the \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 unicode) can only be used as package options, and not -in \hypersetup as the option settings are processed as the package is read. -

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

    -
  • a site-wide hyperref.cfg setting up the look of links, adding backreferencing, and setting a - PDF display default: - - -
    -     \hypersetup{backref,
    -     pdfpagemode=FullScreen,
    -     colorlinks=true}
    -
    -

    -

  • -
  • A global option in the file, which is passed down to hyperref: - - -
    -     \documentclass[dvips]{article}
    -
    -

    -

  • -
  • File-specific options in the \usepackage commands, which override the ones set in - 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 -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}
-
-

-

Package ‘kvoptions-patch’ patches LaTeX to make it aware of key value options and to prevent -premature value expansions. -

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 -true if used. These are the ones classed as ‘boolean’. The values true and false can always be specified, -however. -

-

3.1 General options

-

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

- - - - - - - - - - - -
draft boolean false all hypertext options are turned off
final boolean true all hypertext options are turned on
debug boolean false extra diagnostic messages are printed in
the log file
verbose boolean false same as debug
implicit boolean true redefines LaTeX internals
setpagesize boolean true sets page size by special driver commands
-

-

3.2 Options for destination names

-

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 \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: -

-\autoref
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 (pageanchor) must not - be turned off.
-

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 -number. Therefore hyperref has introduced \theH<counter> that allows a unique counter value without -messing up with the appearance of the counter number. For example, the number of the -second table in the third chapter might be printed as 2, the result of \thetable. But the -destination name 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 \theH<counter>. Defaults for standard cases (chapter, …) are -provided. And after hyperref is loaded, new counters with parent counters also define \theH<counter> -automatically, if \newcounter, \@addtoreset or \numberwithin of package amsmath are -used. -

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 -the counter value. In case of page anchors the absolute page anchor is used. With option 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 \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, -because both documents might contain chapter.1 or page.1. Also hyperref sets anchor with name -Doc-Start at the begin of the document. This can be resolved by redefining \HyperDestNameFilter. -Package hyperref calls this macro each time, it uses a destination name. The macro must be expandable -and expects the destination name as only argument. As example, the macro is redefined to add a prefix -to all destination names: -

- - -
-\renewcommand*{\HyperDestNameFilter}[1]{\jobname-#1}
-
-

-

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 -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 -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 -approximation: -

- - -
-  \section{Introduction}
-  \label{intro}
-
-

-

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 -anchor setting, the new name is recorded in the .aux file and used in the subsequent LATEX -run. The renaming is done by a redefinition of \HyperDestNameFilter. That leaves the old -destination names intact (e.g., they are needed for \autoref). This redefinition is also available as -\HyperDestLabelReplace, thus that an own redefinition can use it. The following example also adds a -prefix for all destination names: -

- - -
-\renewcommand*{\HyperDestNameFilter}[1]{%
-  \jobname-\HyperDestLabelReplace{#1}%
-}
-
-

-

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 -expandable string test (\pdfstrcmp of pdfTEX or \strcmp of XƎTEX, package pdftexcmds also supports -LuaTEX): -

- - -
-\usepackage{pdftexcmds}
-\makeatletter
-\renewcommand*{\HyperDestNameFilter}[1]{%
-  \ifcase\pdf@strcmp{#1}{\HyperDestLabelReplace{#1}} %
-    \jobname-#1%
-  \else
-    \HyperDestLabelReplace{#1}%
-  \fi
-}
-\makeatother
-
-

-

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

-

\HyperDestRename{destination}{newname}

-

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

- - - - - - - - - - - -
destlabel boolean false destinations are named by first \label
after anchor creation
hypertexnames boolean true use guessable names for links
naturalnames boolean false use LaTeX-computed names for links
plainpages boolean false Forces page anchors to be named by the Arabic form
of the page number, rather than the formatted form.
-

-

3.3 Configuration options

-
- - - - - - - - - - -
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 \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 - 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, \printindex will - not contain valid hyperlinks.

nesting boolean false -

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

-

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. -

-

3.4 Backend drivers

-

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, - VTeX). -
  2. -
  3. Option driverfallback. If this option is set, its value is taken as driver option. -
  4. -
  5. Macro \Hy@defaultdriver. The macro takes a driver file name (without file extension). -
  6. -
  7. Package default is hypertex.
-

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

- - - - - - - - - - - - - - - - - - - - - - - - -
driverfallback -

Its value is used as driver option

-

if the driver is not given or autodetected.

dvipdfm -

Sets up hyperref for use with the dvipdfm driver.

dvipdfmx -

Sets up hyperref for use with the dvipdfmx driver.

dvips -

Sets up hyperref for use with the dvips driver.

dvipsone -

Sets up hyperref for use with the dvipsone driver.

dviwindo -

Sets up hyperref for use with the dviwindo Windows previewer.

hypertex -

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

latex2html -

Redefines a few macros for compatibility with latex2html.

nativepdf -

An alias for dvips

pdfmark -

An alias for dvips

pdftex -

Sets up hyperref for use with the pdftex program.

ps2pdf -

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

tex4ht -

For use with TeX4ht

textures -

For use with Textures

vtex -

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

vtexpdfmark -

For use with VTeX’s PostScript backend.

xetex -

For use with XeTeX (using backend for dvipdfm).

-

If you use dviwindo, you may need to redefine the macro \wwwbrowser (the default is -C:\netscape\netscape) to tell dviwindo what program to launch. Thus, users of Internet Explorer might -add something like this to hyperref.cfg: - - -

-\renewcommand{\wwwbrowser}{C:\string\Program\space
-  Files\string\Plus!\string\Microsoft\space
-  Internet\string\iexplore.exe}
-
-

-

-

3.5 Extension options

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
extension text -

Set the file extension (e.g. dvi) which will be - appended to file links created if you use the xr - package.

hyperfigures boolean -

backref text false -

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 - \bibitem. Supported values are section, slide, page, - none, or false. If no value is given, section is taken - as default.

pagebackref boolean false -

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

hyperindex boolean true -

Makes the page - numbers of index entries into hyperlinks. Relays on - unique page anchors (pageanchor, …) pageanchors - and plainpages=false.

hyperfootnotes boolean true -

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

encap -

Sets encap character for hyperindex

linktoc text section -

make text (section), page number (page), both (all) - or nothing (none) be link on TOC, LOF and LOT

linktocpage boolean false -

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

breaklinks boolean false -

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

colorlinks boolean false -

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 - links. Unlike colored boxes, the colored text remains - when printing.

linkcolor color red -

Color for normal internal links.

anchorcolor color black -

Color for anchor text. Ignored by most drivers.

citecolor color green -

Color for bibliographical citations in text.

filecolor color cyan -

Color for URLs which open local files.

menucolor color red -

Color for Acrobat menu items.

runcolor color filecolor -

Color for run links (launch annotations).

urlcolor color magenta -

Color for linked URLs.

allcolors color -

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

frenchlinks 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 -LaTeX color package. -

-

3.6 PDF-specific display options

-
- - - - - - - - - - - - - - - - - - - - - -
bookmarks boolean true -

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 .out) may - be needed to translate LaTeX codes, since - bookmarks must be written in PDFEncoding. To - aid this process, the .out file is not rewritten - by LaTeX if it is edited to contain a line - \let\WriteBookmarks\relax

bookmarksopen boolean false -

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

bookmarksopenlevel parameter -

level (\maxdimen) to which bookmarks are open

bookmarksnumbered boolean false -

If Acrobat bookmarks are requested, include - section numbers.

bookmarkstype text toc -

to specify which ‘toc’ file to mimic

CJKbookmarks boolean false -

This option should be used to produce CJK - bookmarks. Package hyperref supports both - normal and preprocessed mode of the 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 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 - translate non-Unicode bookmarks to Unicode; for - portable PDF documents only Unicode encoding - should be used.

pdfhighlight name /I -

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).

citebordercolor RGB color 0 1 0 -

The color of the box around citations

filebordercolor RGB color 0 .5 .5 -

The color of the box around links to files

linkbordercolor RGB color 1 0 0 -

The color of the box around normal links

menubordercolor RGB color 1 0 0 -

The color of the box around Acrobat menu links

urlbordercolor RGB color 0 1 1 -

The color of the box around links to URLs

runbordercolor RGB color 0 .7 .7 -

Color of border around ‘run’ links

allbordercolors -

Set all border color options

pdfborder 0 0 1 -

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.

-

Note that the color of link borders can be specified only as 3 numbers in the range 0..1, giving an RGB -color. You cannot use colors defined in TeX. Since version 6.76a this is no longer true. Especially with -the help of package xcolor the usual color specifications of package (x)color can be used. For further - - -information see description of package hycolor. -

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 -for this, the .out file is not overwritten on the next TeX run if it is edited to contain the -line - - -

-\let\WriteBookmarks\relax
-
-

-

-

3.7 PDF display and information options

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
baseurl -

URL

-

Sets the base URL of the PDF document

pdfpagemode -

name

empty -

Determines how the file is opening in - Acrobat; the possibilities are UseNone, - UseThumbs (show thumbnails), UseOutlines - (show bookmarks), FullScreen, UseOC (PDF - 1.5), and UseAttachments (PDF 1.6). If no - mode if explicitly chosen, but the bookmarks - option is set, UseOutlines is used.

pdftitle -

text

-

Sets the document information Title field

pdfauthor -

text

-

Sets the document information Author field

pdfsubject -

text

-

Sets the document information Subject field

pdfcreator -

text

-

Sets the document information Creator field

addtopdfcreator -

text

-

Adds additional text to the document - information Creator field

pdfkeywords -

text

-

Sets the document information Keywords field

pdftrapped -

name

empty -

Sets the document information Trapped entry. - Possible values are True, False and Unknown. - An empty value means, the entry is not set.

pdfinfo -

key - value - list

empty -

Alternative interface for setting the document - information.

pdfview -

name

XYZ -

Sets the default PDF ‘view’ for each link

pdfstartpage -

integer

1 -

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

pdfstartview -

name

Fit -

Set the startup page view

pdfremotestartview -

name

Fit -

Set the startup page view of remote PDF files

pdfpagescrop -

n - n - n - n

-

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

pdfcenterwindow -

boolean

false -

position the document window in the center - of the screen

pdfdirection -

name

empty -

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

pdfdisplaydoctitle -

boolean

false -

display document title instead of file name in - title bar

pdfduplex -

name

empty -

paper handling option for print - dialog. Possible vatues are: Simplex (print - single-sided), DuplexFlipShortEdge (duplex - and flip on the short edge of the sheet), - DuplexFlipLongEdge (duplex and flip on the - long edge of the sheet)

pdffitwindow -

boolean

false -

resize document window to fit document size

pdflang -

name

relax -

PDF language identifier (RFC 3066)

pdfmenubar -

boolean

true -

make PDF viewer’s menu bar visible

pdfnewwindow -

boolean

false -

make links that open another PDF file start a - new window

pdfnonfullscreenpagemode -

name

empty -

page mode setting on exiting full-screen mode. - Possible values are UseNone, UseOutlines, - UseThumbs, and UseOC

pdfnumcopies -

integer

empty -

number of printed copies

pdfpagelayout -

name

empty -

set layout of PDF pages. Possible values: - SinglePage, OneColumn, TwoColumnLeft, - TwoColumnRight, TwoPageLeft, and - TwoPageRight

pdfpagelabels -

boolean

true -

set PDF page labels

pdfpagetransition -

name

empty -

set PDF page transition style. Possible values - are Split, Blinds, Box, Wipe, Dissolve, - Glitter, R, Fly, Push, Cover, Uncover, Fade. - The default according to the PDF Reference - is R, which simply replaces the old page with - the new one.

pdfpicktraybypdfsize -

boolean

false -

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

pdfprintarea -

name

empty -

set /PrintArea of viewer preferences. Possible - values are MediaBox, CropBox, BleedBox, - TrimBox, and ArtBox. The dafault according - to the PDF Refence is CropBox

pdfprintclip -

name

empty -

set /PrintClip of viewer preferences. Possible - values are MediaBox, CropBox, BleedBox, - TrimBox, and ArtBox. The dafault according - to the PDF Refence is CropBox

pdfprintpagerange -

n - n - (n - n)*

empty -

set /PrintPageRange of viewer preferences

pdfprintscaling -

name

empty -

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

pdftoolbar -

boolean

true -

make PDF toolbar visible

pdfviewarea -

name

empty -

set /ViewArea of viewer preferences. Possible - values are MediaBox, CropBox, BleedBox, - TrimBox, and ArtBox. The dafault according - to the PDF Refence is CropBox

pdfviewclip -

name

empty -

set /ViewClip of viewer preferences Possible - values are MediaBox, CropBox, BleedBox, - TrimBox, and ArtBox. The dafault according - to the PDF Refence is CropBox

pdfwindowui -

boolean

true -

make PDF user interface elements visible

unicode -

boolean

true -

Unicode encoded PDF strings

-

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 46. pdfTeX works by supplying default values for XYZ (horizontal × -vertical × zoom) and FitBH. However, drivers using pdfmark do not supply defaults, so -hyperref passes in a value of -32768, which causes Acrobat to set (usually) sensible defaults. -The following are possible values for the pdfview, pdfstartview and pdfremotestartview -parameters. -

- - - - - - - - - - - - - - - -
XYZ left top zoom -

Sets a coordinate and a zoom factor. If any one - is null, the source link value is used. null null - null will give the same values as the current - page.

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 - coordinates to the window.

FitB -

Fits the page bounding box to the window.

FitBH top -

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

FitBV left -

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

-

The pdfpagelayout can be one of the following values. -

- - - - - - - - - - -
SinglePage -

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 - the left.

TwoColumnRight -

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

TwoPageLeft -

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 - 1.5).

-

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

- - - - - - - - - - - - - - - - - - -
Blinds /Dm -

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.

Dissolve -

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

Glitter /Di -

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 - 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 - direction specified by /Di, to or from a location that is - offscreen except when /Di is None.

Push /Di -

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

Cover /Di -

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 - specified by /Di, uncovering the new page in the - direction specified by /Di.

Fade -

The new page gradually becomes visible through the old - one.

-

-

3.8 Option pdfinfo

-

The information entries can be set using pdftitle, pdfsubject, …. Option pdfinfo provides an alternative -interface. It takes a key value list. The key names are the names that appear in the PDF information -dictionary directly. Known keys such as Title, Subject, Trapped and other are mapped to options -pdftitle, subject, trapped, …Unknown keys are added to the information dictionary. Their values are text -strings (see PDF specification). Example: -

- - -
-\hypersetup{
-  pdfinfo={
-    Title={My Title},
-    Subject={My Subject},
-    NewKey={Foobar},
-    % ...
-  }
-}
-
-

-

-

3.9 Big alphabetical list

-

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
allbordercolors -

Set all border color options

allcolors -

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)

debug false -

provide details of anchors defined; same as - verbose

destlabel false -

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

draft false -

do not do any hyperlinking

driverfallback -

default if no driver specified or detected

dvipdfm -

use dvipdfm backend

dvipdfmx -

use dvipdfmx backend

dvips -

use dvips backend

dvipsone -

use dvipsone backend

dviwindo -

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 HyperTeX backend

hypertexnames true -

use guessable names for links

implicit true -

redefine LaTeX internals

latex2html -

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, - LOF and LOT

menubordercolor 1 0 0 -

color of border around menu links

menucolor red -

color for menu links

nativepdf false -

an alias for dvips

naturalnames false -

use LaTeX-computed names for links

nesting false -

allow nesting of links

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 - 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 - 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 - information

pdfkeywords empty -

text for PDF Keywords field

pdflang relax -

PDF language identifier (RFC 3066)

pdfmark false -

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

pdfpagetransition 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 pdfTeX backend

pdftitle empty -

text for PDF Title field

pdftoolbar true -

make PDF toolbar visible

pdftrapped empty -

Sets the document information Trapped entry. - Possible values are True, False and Unknown. - An empty value means, the entry is not set.

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 ps2pdf backend

psdextra false -

define more short names for PDF string - commands

raiselinks false -

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 TeX4ht backend

textures -

use Textures backend

unicode true -

Unicode encoded pdf strings, starting with - version 2021-02-04 v7.00g set by default to - true for all engines.

urlbordercolor 0 1 1 -

color of border around URL links

urlcolor magenta -

color of URL links

verbose false -

be chatty

vtex -

use VTeX backend

xetex -

use XeTeX backend

-

-

4 Additional user macros

-

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

-

-
\href[options]{URL}{text}
-

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 pdfremotestartview, pdfnewwindow -and the following key value options: -

-page:
Specifies the start page number of remote PDF documents. First page is 1. -
-ismap:
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 /Next of action dictionaries, see PDF specification.
-

-

\url{URL}
-

Similar to \href{URL}{\nolinkurl{URL}}. 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 URL in the same way as \url, without creating a hyperlink. - -

-

-
\hyperbaseurl{URL}
-

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

-

-
\hyperimage{imageURL}{text}
-

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 text being -ignored completely. -

-

-
\hyperdef{category}{name}{text}
-

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

-

-
\hyperref{URL}{category}{name}{text}
-

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

-

-
\hyperref[label]{text}
-

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

-

-
\hyperlink{name}{text}
-

-

-
\hypertarget{name}{text}
-

A simple internal link is created with \hypertarget, with two parameters of an anchor name, and anchor -text. \hyperlink has two arguments, the name of a hypertext object defined somewhere by \hypertarget, -and the text which be used as the link on the page. -

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 \hypertarget{}{} with an automatically chosen -anchor name. Often it is used in conjunction with \addcontentsline for sectionlike things (index, -bibliography, preface). \addcontentsline refers to the latest previous location where an anchor is set. -Example: -

- - -
-\cleardoublepage
-\phantomsection
-\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, -not to a location before this page. -

-

\autoref{label}
-

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 \label command by hyperref by using the -macros listed below (shown with their default values). The macros can be (re)defined in documents using -\(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, hyperref checks \*autorefname before \*name. For instance, it looks for -\figureautorefname before \figurename. -

- - - - - - - - - - - - - - - - - - - - - - - -
Macro -

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

\AMSname -

Equation

\theoremname -

Theorem

\page -

page

-

Example for a redefinition if babel is used: -

- - -
-\usepackage[ngerman]{babel}
-\addto\extrasngerman{%
-  \def\subsectionautorefname{Unterkapitel}%
-}
-
-

-

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 -\newtheorem if a lemma shares a counter with theorems. Then package aliascnt provides a method to -generate a simulated second counter that allows the differentiation between theorems and -lemmas: -

- - -
-\documentclass{article}
-
-\usepackage{aliascnt}
-\usepackage{hyperref}
-
-\newtheorem{theorem}{Theorem}
-
-\newaliascnt{lemma}{theorem}
-\newtheorem{lemma}[lemma]{Lemma}
-\aliascntresetthe{lemma}
-
-\providecommand*{\lemmaautorefname}{Lemma}
-
-\begin{document}
-
-We will use \autoref{a} to prove \autoref{b}.
-
-\begin{lemma}\label{a}
-  Nobody knows.
-\end{lemma}
-
-\begin{theorem}\label{b}
-  Nobody is right.
-\end{theorem}.
-
-\end{document}
-
-

-

-

-
\autopageref{label}
-

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 -link, there are starred forms (these starred forms exist even if hyperref has been loaded with -implicit=false): -

-

\ref*{label}
-

-

-
\pageref*{label}
-

- -

\autoref*{label}
-

-

-
\autopageref*{label}
-

A typical use would be to write - - -

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

-

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

-

-
\pdfstringdef{macroname}{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 -
  • -
  • Defining the “octal sequence commands” (\345): \edef\3{\string\3} -
  • -
  • Special glyphs of TeX: \{, \%, \&, \space, \dots, etc. -
  • -
  • National glyphs (german.sty, french.sty, etc.) -
  • -
  • Logos: \TeX, \eTeX, \MF, etc. -
  • -
  • Disabling commands that do not provide useful functionality in bookmarks: \label, \index, - \glossary, \discretionary, \def, \let, etc. -
  • -
  • LaTeX’s font commands like \textbf, etc. -
  • -
  • Support for \xspace provided by the xspace package
-

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. -

-

-
\begin{NoHyper}\end{NoHyper}
-

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. - - -

-

4.1 Bookmark macros

-

-

4.1.1 Setting bookmarks
-

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

-

-
\pdfbookmark[level]{text}{name}
-

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). -

-

-
\currentpdfbookmark{text}{name}
-

creates a bookmark at the current level. -

-

-
\subpdfbookmark{text}{name}
-

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

-

-
\belowpdfbookmark{text}{name}
-

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. -
  • -
  • More control over the bookmark appearance (color, font). -
  • -
  • Different bookmark actions are supported (external file links, URLs, …).
-

Therefore I recommend using this package. -

-

4.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. - - -

-

-
\texorpdfstring{TeXstring}{PDFstring}
-

For example, - - -

-\section{Pythagoras:
-  \texorpdfstring{$ a^2 + b^2 = c^2 $}{%
-    a\texttwosuperior\ + b\texttwosuperior\ =
-    c\texttwosuperior
-  }%
-}
-\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. - - -

-\expandafter\def\expandafter\pdfstringdefPreHook
-\expandafter{%
-  \pdfstringdefPreHook
-  \renewcommand{\mycommand}[1]{}%
-}
-
-

-

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 -names): - - -

-\pdfstringdefDisableCommands{%
-  \let~\textasciitilde
-  \def\url{\pdfstringdefWarn\url}%
-  \let\textcolor\@gobble
-}
-
-

-

-

4.2 Pagelabels

-

-

-
\thispdfpagelabel{page number format}
-

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 -taken into account. It should be used in places where for example \thispagestyle can be use -too. -

-

4.3 Utility macros

-

-

-
\hypercalcbp{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, pdfstartview and pdfremotestartview. -Example: -

- - -
-\hypersetup{
-  pdfstartview={FitBH \hypercalcbp{\paperheight-\topmargin-1in
-    -\headheight-\headsep}
-}
-
-

-

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 \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. -

-

5 New Features4

-

5.1 Option ‘pdflinkmargin’

-

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. -
  • -
  • Settings have local effect. -
  • -
  • 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.
-
-xetex
- - -
    -
  • 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.
-

-

5.2 Field option ‘calculatesortkey’

-

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. -

-

5.3 Option ‘localanchorname’

-

When an anchor is set (e.g. via \refstepcounter, then the anchor name is globally set to the current -anchor name. -

For example: - - -

-    \section{Foobar}
-    \begin{equation}\end{equation}
-    \label{sec:foobar}
-
-

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 -name is not available as expected. -

-

5.4 Option ‘customdriver’

-

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 -quite messy, the option is mainly intended to ease developing, testing, debugging the driver -part. -

-

5.5 Option ‘psdextra’

-

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, -therefore they are defined with prefix ‘text’ (\textgeq, \textnotin, ...). They can be mapped to short -names during the processing to PDF strings. The disadvantage is that they are many hundreds macros -that need to be redefined for each PDF string conversion. Therefore this can be enabled or disabled -as option ‘psdextra’. On default the option is turned off (set to ‘false’). Turning the option -on means that the short names are available. Then \geq can directly be used instead of -\textgeq. -

-

5.6 \XeTeXLinkBox

-

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: - - -

-    % xelatex
-    \documentclass{article}
-    \usepackage{hyperref}
-    \setlength{\XeTeXLinkMargin}{1pt}
-    \begin{document}
-    \section{Hello World}
-    \newpage
-    \label{sec:hello}
-    \hyperref[sec:hello]{%
-      \XeTeXLinkBox{\rule{10mm}{10mm}}%
-    }
-    \end{document}
-
-

-

-

5.7 \IfHyperBooleanExists and \IfHyperBoolean

- - -
- \IfHyperBooleanExists{OPTION}{YES}{NO}
-
-

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

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

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 -\MaybeStopEarly or \MaybeStopNow end hyperref prematurely. -

-

5.8 \unichar

-

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 \pdfstringdef (that converts arbitrary TeX code to PDF strings or tries to do -this). -

Macro \unichar takes a TeX number as argument, examples for U+263A (WHITE SMILING -FACE): - - -

-    \unichar{"263A}% hexadecimal notation
-    \unichar{9786}% decimal notation
-
-

‘"’ must not be a babel shorthand character or otherwise active. Otherwise prefix it with -\string: - - -

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

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

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

-

-

5.9 \ifpdfstringunicode

-

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 -by a representation for the PDF string. However \texorpdfstring does not distinguish the two encodings. -This gap closes \ifpdfstringunicode. It is only allowed in the second argument of \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 Han The Thanh. Correctly -written it needs some accented characters, one character even with a double accent. Class ‘tugboat.cls’ -defines a macro for the typesetted name: - - -

-    \def\Thanh{%
-      H\‘an~%
-      Th\^e\llap{\raise 0.5ex\hbox{\’{}}}%
-      ~Th\‘anh%
-    }
-
-

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 -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 \unichar. The character in question -is: - - -

-    % U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
-
-

Thus we can put this together: - - -

-    \def\Thanh{%
-      H\‘an~%
-      \texorpdfstring{Th\^e\llap{\raise 0.5ex\hbox{\’{}}}}%
-      {\ifpdfstringunicode{Th\unichar{"1EC3}}{Th\^e}}%
-      ~Th\‘anh%
-    }
-
-

For PDFDocEncoding (PD1) the variant above has dropped the second accent. Alternatively we could -provide a representation without accents instead of wrong accents: - - -

-    \def\Thanh{%
-      \texorpdfstring{%
-        H\‘an~%
-        Th\^e\llap{\raise 0.5ex\hbox{\’{}}}}%
-        ~Th\‘anh%
-      }{%
-        \ifpdfstringunicode{%
-          H\‘an Th\unichar{"1EC3} Th\‘anh%
-        }{%
-          Han The Thanh%
-        }%
-      }%
-    }
-
-

-

-

5.10 Customizing index style file with \nohyperpage

-

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 -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 -Makeindex.) Customized versions of delim_r, delim_n, suffix_2p, suffix_3p, suffix_mp needs -markup that \hyperpage can detect and knows that this stuff does not belong to a page number. Makro -\nohyperpage serves as this markup. Put the customized code for these keys inside \nohyperpage, -e.g.: - - -

-    suffix_2p "\\nohyperpage{f.}"
-    suffix_3p "\\nohyperpage{ff.}"
-
-

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

-

5.11 Experimental option ‘ocgcolorlinks’

-

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 -package. Check its documentation for details how to use it. -

    -
  • 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 - 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 \hypersetup{ocgcolorlinks=false} inside the document. -
  • -
  • Supported drivers: pdftex, dvipdfm -
  • -
  • The PDF version should be at least 1.5. It is automatically set for pdfTeX, LuaTeX and - dvipdfmx.
-

-

5.12 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, -fonts, colors, driver dependend low level stuff, ...). -

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

    -
  • Enabled annotation flags: Print, NoZoom, NoRotate [PDF/A 6.5.3]. -
  • -
  • Disabled annotation flags: Hidden, Invisible, NoView [PDF/A 6.5.3]. -
  • -
  • Disabled: Launch action ([PDF/A 6.6.1]. -
  • -
  • Restricted: Named actions (NextPage, PrevPage, FirstPage, LastPage) [PDF/A 6.6.1]. - -
  • -
  • Many things are disabled in PDF formulars: -
      -
    • JavaScript actions [PDF/A 6.6.1] -
    • -
    • Trigger events (additional actions) [PDF/A 6.6.2] -
    • -
    • 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]
    -
-

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}). -

-

5.13 Option ‘linktoc’ added

-

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=section’ (default behaviour, same as ‘linktocpage=false’) -
  • -
  • ‘linktoc=page’ (same as ‘linktocpage=true’) -
  • -
  • ‘linktoc=all’ (both the section and page part are links)
-

-

5.14 Option ‘pdfnewwindow’ changed

-

Before 6.77b: -

    -
  • pdfnewwindow=true /NewWindow true -
  • -
  • pdfnewwindow=false (absent) -
  • -
  • unused pdfnewwindow (absent)
-

Since 6.77b: -

    -
  • pdfnewwindow=true /NewWindow true - -
  • -
  • pdfnewwindow=false /NewWindow false -
  • -
  • pdfnewwindow= (absent) -
  • -
  • unused pdfnewwindow (absent)
-

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. -

-

5.15 Flag options for PDF forms

-

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: -

    -
  • Table 8.16 Annotation flags (page 608): -

    - 1 Invisible -
    2 Hidden (PDF 1.2) -
    3 Print (PDF 1.2) -
    4 NoZoom (PDF 1.3) -
    5 NoRotate (PDF 1.3) -
    6 NoView (PDF 1.3) -
    [7 ReadOnly (PDF 1.3)] ignored for widget annotations, see table 8.70 -
    8 Locked (PDF 1.4) -
    9 ToggleNoView (PDF 1.5) -
    10 LockedContents (PDF 1.7)
    -
  • -
  • 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): -

    - 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): -

    - 13 Multiline -
    14 Password -
    21 FileSelect (PDF 1.4) -
    23 DoNotSpellCheck (PDF 1.4) -
    24 DoNotScroll (PDF 1.4) -
    25 Comb (PDF 1.5) -
    26 RichText (PDF 1.5)
    -
  • -
  • 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 -
    22 MultiSelect (PDF 1.4) -
    23 DoNotSpellCheck (PDF 1.4) (only useful if Combo and Edit are set) -
    27 CommitOnSelChange (PDF 1.5)
    -
  • -
  • 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’ -
    4 GetMethod -
    5 SubmitCoordinates -
    [6 XFDF (PDF 1.4)] handled by option ‘export’ -
    7 IncludeAppendSaves (PDF 1.4) -
    8 IncludeAnnotations (PDF 1.4) -
    [9 SubmitPDF (PDF 1.4)] handled by option ‘export’ -
    10 CanonicalFormat (PDF 1.4) -
    11 ExclNonUserAnnots (PDF 1.4) -
    12 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 -lowercase): -

    -
  • FDF -
  • -
  • HTML -
  • -
  • XFDF -
  • -
  • PDF (not supported by Acrobat Reader)
-

-

5.16 Option ‘pdfversion’

-

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 -higher PDF versions. -

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. -

    -
  • 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 - 2’. -
  • -
  • 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 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. -

-

5.17 Field option ‘name’

-

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

    -
  • 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 -‘name’ is given, then its value is used as name in the different output structures. Thus the value should -consist of letters only. -

-

5.18 Option ‘pdfencoding’

-

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 normally no suited - for the unicode engines.
-

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

-

5.19 Color options/package hycolor

-

See documentation of package ‘hycolor’. -

-

5.20 Option pdfusetitle

-

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). -

-

5.21 Starred form of \autoref

-

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

-

5.22 Link border style

-

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: - - -

    -
  • 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 boxes, eg.: - pdfborderstyle=/S/D/D[3 2]/W 1 -
  • -
  • 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 - colorlinks is enabled. -
  • -
  • Be aware that not all PDF viewers support this feature, not even Acrobat Reader itself: -

    Some support: -

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

    Unsupported: -

      -
    • AR5/Linux -
    • -
    • ghostscript 8.50
    -
-

-

5.23 Option bookmarksdepth

-

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=<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 - the value of macro \toclevel@<name>. Examples: - - -
    -         \hypersetup{bookmarksdepth=paragraph}
    -         \hypersetup{bookmarksdepth=4} % same as before
    -         \hypersetup{bookmarksdepth} % counter "tocdepth" is used
    -
    -

-

-

5.24 Option pdfescapeform

-

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: -

    -
  • 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 - 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.
-

-

5.25 Default driver setting

-

(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 -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 -hyperref.cfg: - - -

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

for dvips, or - - -

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

for the default behaviour of hyperref. -

See also the new option ‘driverfallback’. -

-

5.26 Backref entries

-

Alternative interface for formatting of backref entries, example: - - -

-\documentclass[12pt,UKenglish]{article}
-
-\usepackage{babel}
-\usepackage[pagebackref]{hyperref}
-
-% Some language options are detected by package backref.
-% This affects the following macros:
-%   \backrefpagesname
-%   \backrefsectionsname
-%   \backrefsep
-%   \backreftwosep
-%   \backreflastsep
-
-\renewcommand*{\backref}[1]{
-  % default interface
-  % #1: backref list
-  %
-  % We want to use the alternative interface,
-  % therefore the definition is empty here.
-}
-\renewcommand*{\backrefalt}[4]{%
-  % alternative interface
-  % #1: number of distinct back references
-  % #2: backref list with distinct entries
-  % #3: number of back references including duplicates
-  % #4: backref list including duplicates
-  \par
-  #3 citation(s) on #1 page(s): #2,\par
-  \ifnum#1=1 %
-    \ifnum#3=1 %
-      1 citation on page %
-    \else
-      #3 citations on page %
-    \fi
-  \else
-    #3 citations on #1 pages %
-  \fi
-  #2,\par
-  \ifnum#3=1 %
-    1 citation located at page %
-  \else
-    #3 citations located at pages %
-  \fi
-  #4.\par
-}
-
-% The list of distinct entries can be further refined:
-\renewcommand*{\backrefentrycount}[2]{%
-                                                                                 
-                                                                                 
-  % #1: the original backref entry
-  % #2: the count of citations of this entry,
-  %     in case of duplicates greater than one
-  #1%
-  \ifnum#2>1 %
-    ~(#2)%
-  \fi
-}
-
-\begin{document}
-
-  \section{Hello}
-    \cite{ref1, ref2, ref3, ref4}
-  \section{World}
-    \cite{ref1, ref3}
-  \newpage
-
-  \section{Next section}
-    \cite{ref1}
-  \newpage
-
-  \section{Last section}
-    \cite{ref1, ref2}
-  \newpage
-
-  \pdfbookmark[1]{Bibliography}{bib}
-  \begin{thebibliography}{99}
-    \bibitem{ref1} Dummy entry one.
-
-    \bibitem{ref2} Dummy entry two.
-
-    \bibitem{ref3} Dummy entry three.
-
-    \bibitem{ref4} Dummy entry four.
-
-  \end{thebibliography}
-
-\end{document}
-
-

-

-

5.27 \phantomsection

-

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 -set. - - -

-  \cleardoublepage
-  \phantomsection
-  \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, not to a location before this page. -

-

6 Acrobat-specific behavior

-

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

-

-
\Acrobatmenu{menuoption}{text}
-

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. -

- - - - - - - - - - - - - - - - - - - - - - - - - -
File -

Open, - Close, - Scan, - Save, - SaveAs, - Optimizer:SaveAsOpt, - Print, - PageSetup, - Quit

FileImport -

ImportImage, - ImportNotes, - AcroForm:ImportFDF

FileExport -

ExportNotes, - AcroForm:ExportFDF

FileDocumentInfo -

GeneralInfo, - OpenInfo, - FontsInfo, - SecurityInfo, - Weblink:Base, - AutoIndex:DocInfo

FilePreferences -

GeneralPrefs, - NotePrefs, - FullScreenPrefs, - Weblink:Prefs, - AcroSearch:Preferences(Windows) - or, - AcroSearch:Prefs(Mac), - Cpt:Capture

Edit -

Undo, - Cut, - Copy, - Paste, - Clear, - SelectAll, - Ole:CopyFile, - TouchUp:TextAttributes, - TouchUp:FitTextToSelection, - TouchUp:ShowLineMarkers, - TouchUp:ShowCaptureSuspects, - TouchUp:FindSuspect,

-

Properties

EditFields -

AcroForm:Duplicate, - AcroForm:TabOrder

Document -

Cpt:CapturePages, - AcroForm:Actions, - CropPages, - RotatePages, - InsertPages, - ExtractPages, - ReplacePages, - DeletePages, - NewBookmark, - SetBookmarkDest, - CreateAllThumbs, - DeleteAllThumbs

View -

ActualSize, - FitVisible, - FitWidth, - FitPage, - ZoomTo, - FullScreen, - FirstPage, - PrevPage, - NextPage, - LastPage, - GoToPage, - GoBack, - GoForward, - SinglePage, - OneColumn, - TwoColumns, - ArticleThreads, - PageOnly, - ShowBookmarks, - ShowThumbs

Tools -

Hand, - ZoomIn, - ZoomOut, - SelectText, - SelectGraphics, - Note, - Link, - Thread, - AcroForm:Tool, - Acro_Movie:MoviePlayer, - TouchUp:TextTool, - Find, - FindAgain, - FindNextNote, - CreateNotesFile

ToolsSearch -

AcroSrch:Query, - AcroSrch:Indexes, - AcroSrch:Results, - AcroSrch:Assist, - AcroSrch:PrevDoc, - AcroSrch:PrevHit, - AcroSrch:NextHit, - AcroSrch:NextDoc

Window -

ShowHideToolBar, - ShowHideMenuBar, - ShowHideClipboard, - Cascade, - TileHorizontal, - TileVertical, - CloseAll

Help -

HelpUserGuide, - HelpTutorial, - HelpExchange, - HelpScan, - HelpCapture, - HelpPDFWriter, - HelpDistiller, - HelpSearch, - HelpCatalog, - HelpReader, - Weblink:Home

Help(Windows) -

About

-

-

7 PDF and HTML forms

-

You must put your fields inside a Form environment (only one per file). -

There are six macros to prepare fields: -

-

-
\TextField[parameters]{label}
-

-

-
\CheckBox[parameters]{label}
-

-

-
\ChoiceMenu[parameters]{label}{choices}
-

-

-
\PushButton[parameters]{label}
-

- - -

-
\Submit[parameters]{label}
-

-

-
\Reset[parameters]{label}
-

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

-

-
\LayoutTextField{label}{field}
-

-

-
\LayoutChoiceField{label}{field}
-

-

-
\LayoutCheckField{label}{field}
-

These macros default to #1 #2 -

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

-

-
\MakeRadioField{width}{height}
-

-

-
\MakeCheckField{width}{height}
-

-

-
\MakeTextField{width}{height}
-

-

-
\MakeChoiceField{width}{height}
-

-

\MakeButtonField{text}
-

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

You may also want to redefine the following macros: - - -

-\def\DefaultHeightofSubmit{12pt}
-\def\DefaultWidthofSubmit{2cm}
-\def\DefaultHeightofReset{12pt}
-\def\DefaultWidthofReset{2cm}
-\def\DefaultHeightofCheckBox{0.8\baselineskip}
-\def\DefaultWidthofCheckBox{0.8\baselineskip}
-\def\DefaultHeightofChoiceMenu{0.8\baselineskip}
-\def\DefaultWidthofChoiceMenu{0.8\baselineskip}
-\def\DefaultHeightofText{\baselineskip}
-\def\DefaultHeightofTextMultiline{4\baselineskip}
-\def\DefaultWidthofText{3cm}
-
-

-

-

7.1 Forms environment parameters

-
- - - - - - - - -
action URL -

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

encoding name -

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

method name -

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

-

-

7.2 Forms optional parameters

-

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
accesskey key (as per HTML)
align number 0 alignment within text field; 0 is left-aligned,
1 is centered, 2 is right-aligned.
altname name alternative name,
the name shown in the user interface
backgroundcolor color of box
bordercolor color of border
bordersep box border gap
borderwidth 1 width of box border, the value is a dimension
or a number with default unit bp
calculate JavaScript code to calculate the value of the field
charsize dimen font size of field text
checkboxsymbol char 4 () symbol used for check boxes (ZapfDingbats),
the value is a character or \ding{number},
see package pifont from bundle psnfss
checked boolean false whether option selected by default
color color of text in box
combo boolean false choice list is ‘combo’ style
default default value
disabled boolean false field disabled
format JavaScript code to format the field
height dimen height of field box
hidden boolean false field hidden
keystroke JavaScript code to control the keystrokes on entry
mappingname name the mapping name to be used when exporting
the field data
maxlen number 0 number of characters allowed in text field
menulength number 4 number of elements shown in list
multiline boolean false whether text box is multiline
name name name of field (defaults to label)
onblur JavaScript code
onchange JavaScript code
onclick JavaScript code
ondblclick JavaScript code
onfocus JavaScript code
onkeydown JavaScript code
onkeypress JavaScript code
onkeyup JavaScript code
onmousedown JavaScript code
onmousemove JavaScript code
onmouseout JavaScript code
onmouseover JavaScript code
onmouseup JavaScript code
onselect JavaScript code
password boolean false text field is ‘password’ style
popdown boolean false choice list is ‘popdown’ style
radio boolean false choice list is ‘radio’ style
radiosymbol char H () symbol used for radio fields (ZapfDingbats),
the value is a character or \ding{number},
see package pifont from bundle psnfss
readonly boolean false field is readonly
rotation number 0 rotation of the widget annotation
(degree, counterclockwise, multiple of 90)
tabkey (as per HTML)
validate JavaScript code to validate the entry
value initial value
width dimen width of field box
-

-

8 Defining a new driver

-

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

1. \hyper@anchor -

2. \hyper@link -

3. \hyper@linkfile -

4. \hyper@linkurl -

5. \hyper@anchorstart - - -

6. \hyper@anchorend -

7. \hyper@linkstart -

8. \hyper@linkend -

The draft option defines the macros as follows - - -

-\let\hyper@@anchor\@gobble
-\gdef\hyper@link##1##2##3{##3}%
-\def\hyper@linkurl##1##2{##1}%
-\def\hyper@linkfile##1##2##3{##1}%
-\let\hyper@anchorstart\@gobble
-\let\hyper@anchorend\@empty
-\let\hyper@linkstart\@gobbletwo
-\let\hyper@linkend\@empty
-
-

-

-

9 Special support for other packages

-

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 harvard package is - supported. However, the recommended package is Patrick Daly’s natbib package that has - specific hyperref hooks to allow reliable interaction. This package covers a very wide variety - of layouts and citation styles, all of which work with hyperref. -
  • -
  • Packages that typeset the contents of the \label and \ref macros, such as showkeys. Since the - hyperref package redefines these commands, you must set implicit=false for these packages - to work. -
  • -
  • Packages that do anything serious with the index.
-

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 LATEX’s normal -\label/\ref mechanisms and per-chapter tables of contents, respectively. -

-

9.1 Package Compatibility

-

Currently only package loading orders are available: -

Note: hyperref loads package nameref at \begin{document}. Sometimes this is too late, thus this -package must be loaded earlier. -

-

9.1.1 algorithm
- - -
- \usepackage{float}
-  \usepackage{hyperref}
-  \usepackage[chapter]{algorithm}% eg.
-
-

-

-

9.1.2 amsmath
-

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 -gather: - - -

-  \usepackage{amsmath}
-  \let\equation\gather
-  \let\endequation\endgather
-
-

-

-

9.1.3 amsrefs
-

Package loading order: - - -

-  \usepackage{hyperref}
-  \usepackage{amsrefs}
-
-

-

-

9.1.4 arydshln, longtable
-

Package longtable must be put before hyperref and arydshln, hyperref after arydshln generates an error, -thus the resulting package order is then: - - -

-  \usepackage{longtable}
-  \usepacakge{hyperref}
-  \usepackage{arydshln}
-
-

-

-

9.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 -Szab, see CTAN:language/hungarian/babel/. -

-

9.1.6 babel/spanish.ldf
-

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

-

9.1.7 bibentry
-

Workaround: - - -

-  \makeatletter
-  \let\saved@bibitem\@bibitem
-  \makeatother
-
-  \usepackage{bibentry}
-  \usepackage{hyperref}
-
-  \begin{document}
-
-  \begingroup
-    \makeatletter
-    \let\@bibitem\saved@bibitem
-    \nobibliography{database}
-  \endgroup
-
-

-

-

9.1.8 bigfoot
-

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

-

9.1.9 chappg
-

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

-  \usepackage{hyperref}
-  \usepackage{chappg}
-
-

-

-

9.1.10 cite
-

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

- \makeatletter
- \def\NAT@parse{\typeout{This is a fake Natbib command to fool Hyperref.}}
- \makeatother
-
- \usepackage[hypertex]{hyperref}
-
-

-

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). -

-

9.1.11 count1to
-

Package ‘count1to’ adds several \@addtoreset commands that confuse ‘hyperref’. Therefore \theH<...> -has to be fixed: - - -

-  \usepackage{count1to}
-  \AtBeginDocument{% *after* \usepackage{count1to}
-    \renewcommand*{\theHsection}{\theHchapter.\arabic{section}}%
-    \renewcommand*{\theHsubsection}{\theHsection.\arabic{subsection}}%
-    \renewcommand*{\theHsubsubsection}{\theHsubsection.\arabic{subsubsection}}%
-    \renewcommand*{\theHparagraph}{\theHsubsubsection.\arabic{paragraph}}%
-    \renewcommand*{\theHsubparagraph}{\theHparagraph.\arabic{subparagraph}}%
-  }
-
-

-

-

9.1.12 dblaccnt
-

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

-  \usepackage{hyperref}
-  \usepackage{dblaccnt}
-
-

or see entry for vietnam. -

-

9.1.13 easyeqn
-

Not compatible, breaks. -

-

9.1.14 ellipsis
-

This packages redefines \textellipsis after package hyperref (pd1enc.def/puenc.def should be loaded -before): - - -

-  \usepackage{hyperref}
-  \usepackage{ellipsis}
-
-

-

-

9.1.15 float
- - -
- \usepackage{float}
-  \usepackage{hyperref}
-
-

-

    -
  • 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.
-

-

9.1.16 endnotes
-

Unsupported. -

-

9.1.17 foiltex
-

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 -is now obsolete and causes an undefined error message about \@hyperfixhead. This is fixed in FoilTeX -2.1.4b. -

-

9.1.18 footnote
-

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

-

9.1.19 geometry
-

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: - - -

-    \documentclass[dvipdfm]{article}% or other classes
-    \usepackage{atbegshi}
-    \AtBeginDocument{%
-      \let\OrgAtBeginDvi\AtBeginDvi
-      \let\AtBeginDvi\AtBeginShipoutFirst
-    }
-    \usepackage[
-      paperwidth=170mm,
-      paperheight=240mm
-    ]{geometry}
-    \AtBeginDocument{%
-      \let\AtBeginDvi\OrgAtBeginDvi
-    }
-    \usepackage{hyperref}
-
-  or
-
-    \documentclass[dvipdfm]{article}% or other classes
-    \usepackage{atbegshi}
-    \let\AtBeginDvi\AtBeginShipoutFirst
-    \usepackage[
-      paperwidth=170mm,
-      paperheight=240mm
-    ]{geometry}
-    \usepackage{hyperref}
-
-

-

-

9.1.20 IEEEtran.cls
-

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

-

9.1.21 index
-

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

-

9.1.22 lastpage
-

Compatible. -

-

9.1.23 linguex
- - -
- \usepackage{hyperref}
-  \usepackage{linguex}
-
-

-

-

9.1.24 ltabptch
- - -
- \usepackage{longtable}
-  \usepackage{ltabptch}
-  \usepackage{hyperref}
-
-

-

-

9.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. -

-

9.1.26 minitoc-hyper
-

This package is obsolete, use the uptodate original package minitoc instead. -

-

9.1.27 multind
- - -
- \usepackage{multind}
-  \usepackage{hyperref}
-
-

-

-

9.1.28 natbib
- - -
- \usepackage{natbib}
-  \usepackage{hyperref}
-
-

-

-

9.1.29 nomencl
-

Example for introducing links for the page numbers: - - -

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

-

For equations the following might work: - - -

-      \renewcommand*{\eqdeclaration}[1]{%
-        \hyperlink{equation.#1}{(Equation~#1)}%
-      }
-    But the mapping from the equation number to the anchor name
-    is not available in general.
-
-

-

-

9.1.30 parskip
- - -
- \usepackage{parskip}
-  \usepackage{hyperref}[2012/08/20]
-
-

-

Both packages want to redefine \@starttoc. -

-

9.1.31 prettyref
- - -
-%%% example for prettyref %%%
-\documentclass{article}
-\usepackage{prettyref}
-\usepackage[pdftex]{hyperref}
-
-%\newrefformat{FIG}{Figure~\ref{#1}}% without hyperref
-\newrefformat{FIG}{\hyperref[{#1}]{Figure~\ref*{#1}}}
-
-\begin{document}
-  This is a reference to \prettyref{FIG:ONE}.
-  \newpage
-  \begin{figure}
-    \caption{This is my figure}
-    \label{FIG:ONE}
-  \end{figure}
-\end{document}
-%%% example for prettyref %%%
-      
-
-

-

-

9.1.32 ntheorem
- - -
- ntheorem-hyper.sty is an old patched version of ntheorem.sty.
-  Newer versions of ntheorem know the option hyperref:
-    \usepackage{hyperref}
-    \usepackage[hyperref]{ntheorem}
-  But there are still unsolved problems (options thref, ...).
-
-

-

-

9.1.33 setspace
- - -
- \usepackage{setspace}
-  \usepackage{hyperref}
-
-

-

-

9.1.34 sidecap
- - -
- Before 2002/05/24 v1.5h:
-    \usepackage{nameref}
-    \usepackage{hyperref}
-    \usepackage{sidecap}
-
-

-

-

9.1.35 subfigure
- - -
- 1995/03/06 v2.0:
-    \usepackage{subfigure}
-    \usepackage{hyperref}
-    % hypertexnames is set to false.
-  v2.1:
-    \usepackage{nameref}
-    \usepackage{subfigure}
-    \usepackage{hyperref}
-    or
-    \usepackage{hyperref}
-    \usepackage{subfigure}
-  v2.1.2:
-    please update
-  v2.1.3:
-    \usepackage{hyperref}
-    \usepackage{subfigure}
-    or vice versa?
-
-

-

-

9.1.36 titleref
- - -
- \usepackage{nameref}
-  \usepackage{titleref}% without usetoc
-  \usepackage{hyperref}
-
-

-

-

9.1.37 tabularx
-

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’. -

-

9.1.38 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). -

-

9.1.39 ucs/utf8x.def
-

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 -\PrerenderUnicode or \PreloadUnicodePage to solve this: - - -

-    \usepackage{ucs}
-    \usepackage[utf8x]{inputenc}
-    \usepackage{hyperref}% or with option unicode
-    \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 -characters directly. -

-

9.1.40 varioref
-

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 -order: - - -

-    \usepackage{nameref}
-    \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: -

    -
  • \Ref, \Vref do not uppercase the first letter. -
  • -
  • \vpageref[]{...} On the same page a previous space is not suppressed.
-

-

9.1.41 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): - - -

-  \documentclass{article}
-
-  % package order does not matter
-  \usepackage{verse}
-  \usepackage{hyperref}
-
-  \makeatletter
-  % make unique poemline anchors
-  \newcounter{verse@env}
-  \setcounter{verse@env}{0}
-  \let\org@verse\verse
-  \def\verse{%
-    \stepcounter{verse@env}%
-    \org@verse
-  }
-  \def\theHpoemline{\arabic{verse@env}.\thepoemline}
-
-  % add anchor for before \addcontentsline in \@vsptitle
-  \let\org@vsptitle\@vsptitle
-  \def\@vsptitle{%
-    \phantomsection
-    \org@vsptitle
-  }
-  \makeatother
-
-  \begin{document}
-
-  \poemtitle{Poem 1}
-  \begin{verse}
-  An one-liner.
-  \end{verse}
-
-  \newpage
-
-  \poemtitle{Poem 2}
-  \begin{verse}
-  Another one-liner.
-  \end{verse}
-
-  \end{document}
-
-

-

-

9.1.42 vietnam
- - -
- % pd1enc.def should be loaded before package dblaccnt:
-  \usepackage[PD1,OT1]{fontenc}
-  \usepackage{vietnam}
-  \usepackage{hyperref}
-
-

-

-

9.1.43 XeTeX
-

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 -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. -\csname HyPsd@XeTeXBigCharstrue\endcsname should no longer be used. -

-

10 Limitations5

-

10.1 Wrapped/broken link support

-

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

Workarounds: -

    -
  • 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 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 - points, especially within \url. (See thread “hyperref.sty, breaklinks and url.sty 3.2” in - comp.text.tex 2005-09).

- - -

-

10.2 Links across pages

-

In general they have problems: -

    -
  • 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 - message can occur sometimes.
-

-

10.3 Footnotes

-

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 -\footnotemark to \footnotetext is not as strong as \ref to \label. Therefore it is not clear in general -which \footnotemark references which \footnotetext. But that is necessary to implement hyperlinking. -Thus the implementation of hyperref does not support the optional argument of \footnotemark and -\footnotetext. -

-

11 Hints6

-

11.1 Spaces in option values

-

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 - - -

-    pdfborder=001
-
-

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 \hypersetup - - -

-    \hypersetup{pdfborder=0 0 1}
-
-

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 -packages kvoptions-patch (from project kvoptions) or xkvltxp (from project xsetkeys). -

-

11.2 Index with makeindex

-
    -
  • 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 - in anchor names in arabic form. If the page numbers in other formats are used (book class - with \frontmatter, \romannumbering, ...), then the page anchors are not unique. Therefore - option 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 \hyperpage command. With - logical markup this situation can easily be solved: - - -
    -           \usepackage{makeidx}
    -           \makeindex
    -           \usepackage[hyperindex]{hyperref}
    -           \newcommand*{\main}[1]{\textbf{\hyperpage{#1}}}
    -           ...
    -           \index{Some example|main}
    -
    -

    -

  • -
  • Scientic Word/Scientific WorkPlace users can use package robustindex with hyperindex=false. -
  • -
  • Other encap characters can be set by option encap. Example for use of “?”: - - -
    -           \usepackage[encap=?]{hyperref}
    -
    -

    -

  • -
  • Another possibility is the insertion of \hyperpage by a style file for makeindex. For this case, - hyperref’s insertion will be disabled by hyperindex=false. \hyperpage will be defined regardless of - setting of hyperindex. - - -
    -     %%% cut %%% hyperindex.ist %%% cut %%%
    -     delim_0 ", \\hyperpage{"
    -     delim_1 ", \\hyperpage{"
    -     delim_2 ", \\hyperpage{"
    -     delim_n "}, \\hyperpage{"
    -     delim_t "}"
    -     encap_prefix "}\\"
    -     encap_infix "{\\hyperpage{"
    -     encap_suffix "}"
    -     %%% cut %%% hyperindex.ist %%% cut %%%
    -
    -

-

-

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

-

Getting rid of it: - - -

-\makeatletter
-\providecommand*{\toclevel@<foobar>}{0}
-\makeatother
-
-

-

-

11.4 Link anchors in figures

-

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. -

-

11.5 Additional unicode characters in bookmarks and pdf information entries:

- - -
-\documentclass[pdftex]{article}
-\usepackage[unicode]{hyperref}
-
-

-

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 (\.{a}, \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 -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 9 (8 and 9 cannot occur in octal -numbers): - - -

-    \002\047 -> \9002\047
-    \036\241 -> \9036\241
-
-

-

Optional: 8 is used for abbreviations: - - -

-    \900 = \80, \901 = \81, \902 = \82, ...
-
-    \9002\047 -> \82\047
-
-

-

5. Declare the character with LaTeX: - - -

-\DeclareTextCompositeCommand{\.}{PU}{a}{\82\047}
-\DeclareTextCompositeCommand{\d}{PU}{a}{\9036\241}
-
-\begin{document}
-\section{\={a}, \d{a}, \’{a}, \.{a}}
-\end{document}
-      
-
-

-

-

11.6 Footnotes

-

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 -hyperfootnotes=false or fiddle with internal macros, nasty examples: - - -

-\documentclass{article}
-\usepackage{hyperref}
-\begin{document}
-Hello%
-\footnote{The first footnote}
-World%
-\addtocounter{footnote}{-1}%
-\addtocounter{Hfootnote}{-1}%
-\footnotemark.
-\end{document}
-
-  or
-
-\documentclass{article}
-
-\usepackage{hyperref}
-
-\begin{document}
-
-\makeatletter
-
-A%
-  \footnotemark
-  \let\saved@Href@A\Hy@footnote@currentHref
-  % remember link name
-B%
-  \footnotemark
-  \let\saved@Href@B\Hy@footnote@currentHref
-b%
-  \addtocounter{footnote}{-1}%
-  \addtocounter{Hfootnote}{-1}% generate the same anchor
-  \footnotemark
-C%
-  \footnotemark
-  \let\saved@Href@C\Hy@footnote@currentHref
-
-  \addtocounter{footnote}{-2}%
-  \let\Hy@footnote@currentHref\saved@Href@A
-\footnotetext{AAAA}%
-  \addtocounter{footnote}{1}%
-  \let\Hy@footnote@currentHref\saved@Href@B
-\footnotetext{BBBBB}%
-  \addtocounter{footnote}{1}%
-  \let\Hy@footnote@currentHref\saved@Href@C
-\footnotetext{CCCC}%
-
-\end{document}
-
-

- -

-

11.7 Subordinate counters

-

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 \@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 -meaning of \@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 \newtheorem, problematic case: - - -

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

Solution a) - - -

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

Solution b) - - -

-    \newtheorem{corA}{CorollaryA}[section]
-    \usepackage{hyperref}
-    \newcommand*{\theHcorA}{\theHsection.\number\value{corA}}
-
-

-

-

12 History and acknowledgments

-

The original authors of hyperbasics.tex and hypertex.sty, from which this package descends, are -Tanmoy Bhattacharya and Thorsten Ohl. Package hyperref started as a simple port of their -work to LATEX2ε standards, but eventually I rewrote nearly everything, because I didn’t -understand a lot of the original, and was only interested in getting it to work with LATEX. I -would like to thank Arthur Smith, Tanmoy Bhattacharya, Mark Doyle, Paul Ginsparg, David -Carlisle, T. V. Raman and Leslie Lamport for comments, requests, thoughts and code to -get the package into its first useable state. Various other people are mentioned at the point -in the source where I had to change the code in later versions because of problems they -found. -

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 dvipsone and dviwindo drivers. -Sergey Lesenko provided the changes needed for dvipdf, and Hn Th Thnh supplied all -the information needed for pdftex. Patrick Daly kindly updated his natbib package to allow -easy integration with hyperref. Michael Mehlich’s 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 -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 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 -hyperref. - - -

13 GNU Free Documentation License

-

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 -“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 -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 -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. -

-

13.1 Applicability and definitions

-

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 -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 -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 -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 -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 -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 -for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an -otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or -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 -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 -proprietary formats that can be read and edited only by proprietary word processors, SGML -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 -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 -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 -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. -

-

13.2 Verbatim copying

-

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 -copies you make or distribute. However, you may accept compensation in exchange for copies. -If you distribute a large enough number of copies you must also follow the conditions in -section 13.3. -

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

-

13.3 Copying in quantity

-

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 -identify you as the publisher of these copies. The front cover must present the full title with all -words of the title equally prominent and visible. You may add other material on the covers in -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 -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 -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 -of added material. If you use the latter option, you must take reasonably prudent steps, when you -begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will -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 -redistributing any large number of copies, to give them a chance to provide you with an updated version -of the Document. -

-

13.4 Modifications

-

You may copy and distribute a Modified Version of the Document under the conditions of sections 13.2 -and 13.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, - 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. -
  3. 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. -
  4. -
  5. State on the Title page the name of the publisher of the Modified Version, as the publisher. - - -
  6. -
  7. Preserve all the copyright notices of the Document. -
  8. -
  9. Add an appropriate copyright notice for your modifications adjacent to the other copyright - notices. -
  10. -
  11. 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. -
  12. -
  13. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts - given in the Document’s license notice. -
  14. -
  15. Include an unaltered copy of this License. -
  16. -
  17. 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 - describing the Modified Version as stated in the previous sentence. -
  18. -
  19. 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 - Document itself, or if the original publisher of the version it refers to gives permission. -
  20. -
  21. 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. -
  22. -
  23. 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. -
  24. -
  25. Delete any section Entitled “Endorsements”. Such a section may not be included in the - Modified Version. -
  26. -
  27. Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with - any Invariant Section. -
  28. -
  29. Preserve any Warranty Disclaimers. -
- - -

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 -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 -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 -names for publicity for or to assert or imply endorsement of any Modified Version. -

-

13.5 Combining documents

-

You may combine the Document with other documents released under this License, under the terms -defined in section 13.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 -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 -documents, forming one section Entitled “History”; likewise combine any sections Entitled -“Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled -“Endorsements”. -

-

13.6 Collections of documents

-

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 -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. -

- - -

13.7 Aggregation with independent works

-

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 13.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. -

-

13.8 Translation

-

Translation is considered a kind of modification, so you may distribute translations of the Document -under the terms of section 13.4. Replacing Invariant Sections with translations requires special -permission from their copyright holders, but you may include translations of some or all Invariant -Sections in addition to the original versions of these Invariant Sections. You may include a translation of -this License, and all the license notices in the Document, and any Warranty Disclaimers, -provided that you also include the original English version of this License and the original -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 -requirement (section 13.4) to Preserve its Title (section 13.1) will typically require changing the actual -title. -

-

13.9 Termination

-

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. -

-

13.10 Future revisions of this license

-

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 -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 -put the following copyright and license notices just after the title page: -

-

-

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.” -line with this: -

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 -those two alternatives to suit the situation. -

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/manual.pdf b/macros/latex/contrib/hyperref/doc/manual.pdf deleted file mode 100644 index 64dffdeb28..0000000000 Binary files a/macros/latex/contrib/hyperref/doc/manual.pdf and /dev/null differ diff --git a/macros/latex/contrib/hyperref/doc/manual.tex b/macros/latex/contrib/hyperref/doc/manual.tex deleted file mode 100644 index ddd48e6ea1..0000000000 --- a/macros/latex/contrib/hyperref/doc/manual.tex +++ /dev/null @@ -1,3396 +0,0 @@ -% This is the manual for the LaTeX hyperref package. -% -% Copyright (C) 1998-2003 Sebastian Rahtz. -% Copyright (C) 2003 Steve Peter and Karl Berry -% Copyright (C) 2006-2012 Heiko Oberdiek. -% Copyright (C) 2017-2019 David Carlisle Ulrike Fischer -% Copyright (C) 2019-2020 The LaTeX3 Project -% -% Permission is granted to copy, distribute and/or modify this document -% under the terms of the GNU Free Documentation License, Version 1.1 or -% any later version published by the Free Software Foundation; with no -% Invariant Sections, with no Front-Cover Texts, and with no Back-Cover -% Texts. A copy of the license is included in the section entitled -% ``GNU Free Documentation License.'' -% - -\def\mydate{January 2020} - -\RequirePackage{iftex} -\ifpdf % We are running pdfTeX in pdf mode -\ifx\directlua\undefinded -\documentclass[pdftex]{article} -\else -\documentclass[luatex]{article} -\fi -\else -\documentclass{article} -\fi - - -\usepackage{pifont} -\usepackage{calc} - -\usepackage{hologo} - -\def\OzTeX{O\kern-0.03em z\kern-0.15em \TeX} - -\newcommand*{\cs}[1]{% - \texttt{\textbackslash #1}% -} -\newcommand*{\xpackage}[1]{\textsf{#1}} -\newcommand*{\xoption}[1]{\textsf{#1}} - -% from doc.sty -\makeatletter -\ifx\l@nohyphenation\@undefined -\newlanguage\l@nohyphenation -\fi -\ifx\l@nohyphenation\@undefined - \newlanguage\l@nohyphenation -\fi -\DeclareRobustCommand\meta[1]{% - \ensuremath\langle - \ifmmode \expandafter \nfss@text \fi - {% - \meta@font@select - \edef\meta@hyphen@restore - {\hyphenchar\the\font\the\hyphenchar\font}% - \hyphenchar\font\m@ne - \language\l@nohyphenation - #1\/% - \meta@hyphen@restore - }% - \ensuremath\rangle -} -\def\meta@font@select{\ttfamily\itshape} -\makeatother - -% Page layout. -\advance\textwidth by 1.1in -\advance\oddsidemargin by -.55in -\advance\evensidemargin by -.55in -% -\advance\textheight by 1in -\advance\topmargin by -.5in -\advance\footskip by -.5in -% -\pagestyle{headings} -% -% Avoid some overfull boxes. -\emergencystretch=.1\hsize -\hbadness = 3000 - -% these are from lshort.sty, but lshort.sty pulls in so many other -% packages it seems cleaner to just include them here. -% -\newcommand{\bs}{\symbol{'134}}%Print backslash -\newcommand{\ci}[1]{\texttt{\bs#1}} - -\makeatletter -\@ifpackageloaded{tex4ht}{% - % separate definition for HTML case to avoid - % nasty borders with double horizontal lines with - % large gaps. - \newsavebox{\cmdsyntaxbox}% - \newenvironment{cmdsyntax}{% - \par - % \small - \addvspace{3.2ex plus 0.8ex minus 0.2ex}% - \vskip -\parskip - \noindent - \begin{lrbox}{\cmdsyntaxbox}% - \begin{tabular}{l}% - \rule{0pt}{1em}% - \ignorespaces - }{% - \end{tabular}% - \end{lrbox}% - \fbox{\usebox{\cmdsyntaxbox}}% - \par - \nopagebreak - \addvspace{3.2ex plus 0.8ex minus 0.2ex}% - \vskip -\parskip - }% -}{% - \newenvironment{cmdsyntax}{% - \par - \small - \addvspace{3.2ex plus 0.8ex minus 0.2ex}% - \vskip -\parskip - \noindent - \begin{tabular}{|l|}% - \hline - \rule{0pt}{1em}% - \ignorespaces - }{% - \\% - \hline - \end{tabular}% - \par - \nopagebreak - \addvspace{3.2ex plus 0.8ex minus 0.2ex}% - \vskip -\parskip - }% -} -\makeatother - -\usepackage{array,longtable} -\ifnum 0\ifluatex 1\else\ifxetex 1\fi\fi=0 % - \usepackage[T1]{fontenc}% - \usepackage{lmodern}% - \renewcommand*{\ttdefault}{lmvtt}% -\else - \usepackage{fontspec}% - \renewcommand*{\ttdefault}{lmvtt}% -\fi - -\newcommand*{\Quote}[1]{\textquotedblleft#1\textquotedblright} - -\def\Hanh{H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh} - -\ifpdf - \usepackage[% -% pdftex,% might be luatex, just allow automatic default - colorlinks,% - hyperindex,% - plainpages=false,% - bookmarksopen,% - bookmarksnumbered, - pdfusetitle,% - ]{hyperref} - %%?? \def\pdfBorderAttrs{/Border [0 0 0] } % No border arround Links -\else - \usepackage{hyperref} -\fi - -\makeatletter -\@ifpackageloaded{tex4ht}{% -\author{Sebastian Rahtz (deceased)\and - Heiko Oberdiek (inactive)\and - The \LaTeX3 Project (\url{https://github.com/latex3/hyperref/issues})} -}{% - \usepackage{bmhydoc}% -\author{Sebastian Rahtz\thanks{deceased}\and - Heiko Oberdiek\thanks{inactive}\and - The \LaTeX3 Project\thanks{\url{https://github.com/latex3/hyperref/issues}}} -} -\makeatother -\title{Hypertext marks in \hologo{LaTeX}: a manual for \xpackage{hyperref}} -\date{2021-02-04 v7.00g} - -\begin{document} - -% comes out too close to the toc, and we know it's page one anyway. -\thispagestyle{empty} -\maketitle -\tableofcontents -\setcounter{tocdepth}{2}% for bookmark levels - -\section{Introduction} - -The package derives from, and builds on, the work of the Hyper\hologo{TeX} -project, described at \texttt{http://xxx.lanl.gov/hypertex/}\footnote{Now: \url{https://ctan.org/tex-archive/support/hypertex/hypertex}}. It extends -the functionality of all the \hologo{LaTeX} cross-referencing commands -(including the table of contents, bibliographies etc) to produce -\cs{special} commands which a driver can turn into hypertext links; -it also provides new commands to allow the user to write \emph{ad hoc} -hypertext links, including those to external documents and URLs. - -The package is currently maintained at \url{https://github.com/latex3/hyperref/} and issues should -be reported there. - -This manual provides a brief overview of the \xpackage{hyperref} -package. For more details, you should read the additional documentation -distributed with the package, as well as the complete documentation by -processing \texttt{hyperref.dtx}. You should also read the chapter on -\xpackage{hyperref} in \textit{The \hologo{LaTeX} Web Companion}, where you will -find additional examples. - -The Hyper\hologo{TeX} specification\footnote{This is borrowed from an article -by Arthur Smith.} says that conformant viewers/translators must -recognize the following set of \cs{special} constructs: - -\begin{description} -\item[href:] \verb|html:| -\item[name:] \verb|html:| -\item[end:] \verb|html:| -\item[image:] \verb|html:| -\item[base\_name:] \verb|html:| -\end{description} - -The \emph{href}, \emph{name} and \emph{end} commands are used to do the -basic hypertext operations of establishing links between sections of -documents. The \emph{image} command is intended (as with current HTML -viewers) to place an image of arbitrary graphical format on the page in -the current location. The \emph{base\_name} command is be used to -communicate to the DVI viewer the full (URL) location of the current -document so that files specified by relative URLs may be retrieved -correctly. - -The \emph{href} and \emph{name} commands must be paired with an -\emph{end} command later in the \TeX\ file---the \TeX\ commands between -the two ends of a pair form an \emph{anchor} in the document. In the -case of an \emph{href} command, the \emph{anchor} is to be highlighted -in the \emph{DVI viewer}, and when clicked on will cause the scene to -shift to the destination specified by \emph{href\_string}. The -\emph{anchor} associated with a name command represents a possible -location to which other hypertext links may refer, either as local -references (of the form \verb|href="#name_string"| with the -\emph{name\_string} identical to the one in the name command) or as part -of a URL (of the form \emph{URL\#name\_string}). Here -\emph{href\_string} is a valid URL or local identifier, while -\emph{name\_string} could be any string at all: the only caveat is that -`$\verb|"|$' characters should be escaped with a backslash -($\backslash$), and if it looks like a URL name it may cause problems. - -However, the drivers intended to produce \emph{only} PDF use literal -PostScript or PDF \verb|\special| commands. The commands are defined in -configuration files for different drivers, selected by package options; -at present, the following drivers are supported: - -\begin{description} -\item[hypertex] DVI processors conforming to the Hyper\TeX\ guidelines (i.e.\ \textsf{xdvi}, \textsf{dvips} (with -the \textsf{-z} option), \textsf{\OzTeX}, and \textsf{Textures}) -\item[dvips] produces \verb|\special| commands tailored for \textsf{dvips} -\item[dvipsone] produces \verb|\special| commands tailored for \textsf{dvipsone} -\item[ps2pdf] a special case of output suitable for processing by earlier versions of Ghost\-script's -PDF writer; this is basically the same as that for \textsf{dvips}, but a few variations remained before version 5.21 -\item[tex4ht] produces \verb|\special| commands for use with \textsf{\TeX4ht} -\item[pdftex] pdf\TeX, \Hanh{}'s \TeX{} variant that writes PDF directly -\item[luatex] lua\TeX, Unicode \TeX{} variant that writes PDF directly -\item[dvipdfm] produces \verb|\special| commands for Mark Wicks' DVI to PDF driver \textsf{dvipdfm} -\item[dvipdfmx] produces \verb|\special| commands for driver - \textsf{dvipdfmx}, a successor of \textsf{dvipdfm} -\item[dviwindo] produces \verb|\special| commands that Y\&Y's Windows previewer interprets as hypertext jumps within the previewer -\item[vtex] produces \verb|\special| commands that MicroPress' HTML and - PDF-producing \TeX\ variants interpret as hypertext jumps within the - previewer -\item[textures] produces \verb|\special| commands that \textsf{Textures} interprets as hypertext jumps within the previewer -\item[xetex] produces \verb|\special| commands for Xe\TeX{} -\end{description} - -Output from \textsf{dvips} or \textsf{dvipsone} must be processed using -Acrobat Distiller to obtain a PDF file.\footnote{Make sure you turn off -the partial font downloading supported by \textsf{dvips} and -\textsf{dvipsone} in favor of Distiller's own system.} The result is -generally preferable to that produced by using the \textsf{hypertex} -driver, and then processing with \textsf{dvips -z}, but the DVI file is -not portable. The main advantage of using the Hyper\TeX\ \ci{special} -commands is that you can also use the document in hypertext DVI viewers, -such as \textsf{xdvi}. - -\begin{description} -\item[driverfallback] - If a driver is not given and cannot be autodetected, then use - the driver option, given as value to this option \textsf{driverfallback}. - Example: - \begin{quote} - \texttt{driverfallback=dvipdfm} - \end{quote} - Autodetected drivers (\textsf{pdftex}, \textsf{xetex}, \textsf{vtex}, - \textsf{vtexpdfmark}) are recognized from within \TeX\ and - therefore cannot be given as value to option \textsf{driverfallback}. - However a DVI driver program is run after the \TeX\ run is finished. - Thus it cannot be detected at \TeX\ macro level. Then package - \xpackage{hyperref} - uses the driver, given by \textsf{driverfallback}. If the driver - is already specified or can be autodetected, then option - \textsf{driverfallback} is ignored. -\end{description} - -\section{Implicit behavior} - -This package can be used with more or less any normal \LaTeX\ document -by specifying in the document preamble - -\begin{verbatim} -\usepackage{hyperref} -\end{verbatim} - -Make sure it comes \emph{last} of your loaded packages, to give it a -fighting chance of not being over-written, since its job is to redefine -many \LaTeX\ commands. Hopefully you will find that all cross-references -work correctly as hypertext. For example, \ci{section} commands will -produce a bookmark and a link, whereas \ci{section*} commands will only -show links when paired with a corresponding \ci{addcontentsline} -command. - -In addition, the \texttt{hyperindex} option (see below) attempts to make -items in the index by hyperlinked back to the text, and the option -\texttt{backref} inserts extra `back' links into the bibliography for -each entry. Other options control the appearance of links, and give -extra control over PDF output. For example, \texttt{colorlinks}, as its -name well implies, colors the links instead of using boxes; this is the -option used in this document. - - -\section{Package options} - -All user-configurable aspects of \xpackage{hyperref} are set using a -single `key=value' scheme (using the \xpackage{keyval} package) with the -key \texttt{Hyp}. The options can be set either in the optional argument -to the \cs{usepackage} command, or using the \cs{hypersetup} -macro. When the package is loaded, a file \texttt{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 \texttt{unicode}) can only be used as -package options, and not in \verb|\hypersetup| as the option settings are processed -as the package is read. - -As an example, the behavior of a particular file could be controlled by: -\begin{itemize} - -\item a site-wide \texttt{hyperref.cfg} setting up the look of links, -adding backreferencing, and setting a PDF display default: - -\begin{verbatim} -\hypersetup{backref, -pdfpagemode=FullScreen, -colorlinks=true} -\end{verbatim} - -\item A global option in the file, which is passed down to -\textsf{hyperref}: - -\begin{verbatim} -\documentclass[dvips]{article} -\end{verbatim} - -\item File-specific options in the \cs{usepackage} commands, which -override the ones set in \texttt{hyperref.cfg}: - -\begin{verbatim} -\usepackage[colorlinks=false]{hyperref} -\hypersetup{pdftitle={A Perfect Day}} -\end{verbatim} -\end{itemize} - -As seen in the previous example, information entries -(pdftitle, pdfauthor, \dots) 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 \verb|\hypersetup|. - -\begin{verbatim} -\usepackage[pdfborder={0 0 0}]{hyperref} -\hypersetup{pdfborder=0 0 0} -\end{verbatim} - -Package `kvoptions-patch' patches \LaTeX\ to make it aware -of key value options and to prevent premature value expansions. - -Some options can be given at any time, but many are restricted: before -\verb|\begin{document}|, only in \verb|\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 true if used. These are the ones classed as -`boolean'. The values true and false can always be specified, however. - -\subsection{General options} - -Firstly, the options to specify general behavior and page size. - -\medskip -\begin{longtable}{>{\ttfamily}ll>{\itshape}ll} -draft & boolean & false & all hypertext options are turned off \\ -final & boolean & true & all hypertext options are turned on \\ -debug & boolean & false & extra diagnostic messages are printed in \\ - & & & the log file \\ -verbose & boolean & false & same as debug \\ -implicit & boolean & true & redefines \LaTeX\ internals \\ -setpagesize & boolean & true & sets page size by special driver commands -\end{longtable} - -\subsection{Options for destination names} - -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 \cs{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: -\begin{quote} - \verb|chapter.4| -\end{quote} -This scheme is used by: -\begin{description} -\item[\cs{autoref}] displays the description label for the - reference depending on the counter name. -\item[\cs{hyperpage}] is used by the index to get -page links. Page anchor setting (\verb|pageanchor|) must not -be turned off. -\end{description} - -It is very important that the destination names are unique, -because two destinations must not share the same name. -The counter value \cs{the} 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 -number. Therefore \xpackage{hyperref} has introduced \cs{theH} -that allows a unique counter value without messing up with -the appearance of the counter number. For example, the number -of the second table in the third chapter might be printed -as \texttt{2}, the result of \cs{thetable}. But the -destination name \texttt{table.2.4} is unique because it -has used \cs{theHtable} that gives \verb|2.4| in this case. - -Often the user do not need to set \cs{theH}. Defaults -for standard cases (chapter, \dots) are provided. And after \xpackage{hyperref} -is loaded, new counters with parent counters also define -\cs{theH} automatically, if \cs{newcounter}, \cs{@addtoreset} -or \cs{numberwithin} of package \xpackage{amsmath} are used. - -Usually problems with duplicate destination names can be solved -by an appropriate definition of \cs{theH}. If option -\texttt{hypertexnames} is disabled, then a unique artificial -number is used instead of the counter value. In case of page -anchors the absolute page anchor is used. With option \texttt{plainpages} -the page anchors use the arabic form. In both latter cases \cs{hyperpage} -for index links is affected and might not work properly. - -If an unnumbered entity gets an anchor (starred forms of -chapters, sections, \dots) or \cs{phantomsection} is used, -then the dummy counter name \texttt{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, because both documents might -contain \texttt{chapter.1} or \texttt{page.1}. Also \xpackage{hyperref} -sets anchor with name \texttt{Doc-Start} at the begin of the document. -This can be resolved by redefining \cs{HyperDestNameFilter}. -Package \xpackage{hyperref} calls this macro each time, it uses a -destination name. -The macro must be expandable and expects the destination name -as only argument. As example, the macro is redefined to add -a prefix to all destination names: -\begin{quote} -\begin{verbatim} -\renewcommand*{\HyperDestNameFilter}[1]{\jobname-#1} -\end{verbatim} -\end{quote} -In document \texttt{docA} the destination name \texttt{chapter.2} -becomes \texttt{docA-chapter.2}. - -Destination names can also be used from the outside in URIs(, if the -driver has not removed or changed them), for example: -\begin{quote} -\begin{verbatim} -http://somewhere/path/file.pdf#nameddest=chapter.4 -\end{verbatim} -\end{quote} -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 -\cs{label} after the anchor setting seems a good approximation: -\begin{quote} -\begin{verbatim} - \section{Introduction} - \label{intro} -\end{verbatim} -\end{quote} -Option \texttt{destlabel} checks for each \cs{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 anchor setting, the new name is recorded in the \texttt{.aux} -file and used in the subsequent \hologo{LaTeX} run. The renaming is done by -a redefinition of \cs{HyperDestNameFilter}. That leaves the old -destination names intact (e.g., they are needed for \cs{autoref}). -This redefinition is also available as \cs{HyperDestLabelReplace}, -thus that an own redefinition can use it. -The following example also adds a prefix for \emph{all} destination names: -\begin{quote} -\begin{verbatim} -\renewcommand*{\HyperDestNameFilter}[1]{% - \jobname-\HyperDestLabelReplace{#1}% -} -\end{verbatim} -\end{quote} -The other case that only files prefixed that do not have a corresponding -\cs{label} is more complicate, because \cs{HyperDestLabelReplace} needs -the unmodified destination name as argument. This is solved by an -expandable string test (\cs{pdfstrcmp} of \hologo{pdfTeX} -or \cs{strcmp} of \hologo{XeTeX}, package \xpackage{pdftexcmds} also supports -\hologo{LuaTeX}): -\begin{quote} -\begin{verbatim} -\usepackage{pdftexcmds} -\makeatletter -\renewcommand*{\HyperDestNameFilter}[1]{% - \ifcase\pdf@strcmp{#1}{\HyperDestLabelReplace{#1}} % - \jobname-#1% - \else - \HyperDestLabelReplace{#1}% - \fi -} -\makeatother -\end{verbatim} -\end{quote} - -With option \texttt{destlabel} destinations can also named manually, -if the destination is not yet renamed: -\begin{quote} -\verb|\HyperDestRename{|\meta{destination}\verb|}{|\meta{newname}\verb|}| -\end{quote} - -Hint: Anchors can also be named and set by \cs{hypertarget}. - -\medskip -\begin{longtable}{>{\ttfamily}ll>{\itshape}ll} -destlabel & boolean & false & destinations are named by first \cs{label}\\ - & & & after anchor creation\\ -hypertexnames & boolean & true & use guessable names for links \\ -naturalnames & boolean & false & use \LaTeX-computed names for links \\ -plainpages & boolean & false & Forces page anchors to be named by the Arabic form \\ - & & & of the page number, rather than the formatted form. \\ -\end{longtable} - -\subsection{Configuration options} - -\begin{longtable}{>{\ttfamily}ll>{\itshape}lp{9cm}} -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 -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 - valid hyperlinks. \\ -nesting & boolean & false & Allows links to be nested; no drivers currently support this. -\end{longtable} - -Note for option \verb|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. - -\subsection{Backend drivers} - -If no driver is specified, the package tries to find a driver in -the following order: -\begin{enumerate} -\item Autodetection, some \TeX\ processors can be detected at \TeX\ macro - level (pdf\TeX, Xe\TeX, V\TeX). -\item Option \textsf{driverfallback}. If this option is set, its value - is taken as driver option. -\item Macro \cs{Hy@defaultdriver}. The macro takes a driver file - name (without file extension). -\item Package default is \textsf{hypertex}. -\end{enumerate} -Many distributions are using a driver file \texttt{hypertex.cfg} that -define \cs{Hy@defaultdriver} with \texttt{hdvips}. This is recommended -because driver \textsf{dvips} provides much more features than -\textsf{hypertex} for PDF generation. - -\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. \\ -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.\\ -ps2pdf & Redefines a few macros for compatibility with - Ghostscript's PDF writer, otherwise identical to - \textsf{dvips}. \\ -tex4ht & For use with \textsf{\TeX4ht} \\ -textures & For use with \textsf{Textures} \\ -vtex & For use with MicroPress' \textsf{VTeX}; the PDF - and HTML backends are detected automatically. \\ -vtexpdfmark & For use with \textsf{VTeX}'s PostScript backend. \\ -xetex & For use with Xe\TeX\ (using backend for dvipdfm). -\end{longtable} -\smallskip - -If you use \textsf{dviwindo}, you may need to redefine the macro -\ci{wwwbrowser} (the default is \verb|C:\netscape\netscape|) to tell -\textsf{dviwindo} what program to launch. Thus, users of Internet -Explorer might add something like this to hyperref.cfg: - -\begin{verbatim} -\renewcommand{\wwwbrowser}{C:\string\Program\space - Files\string\Plus!\string\Microsoft\space - Internet\string\iexplore.exe} -\end{verbatim} - -\subsection{Extension options} -\begin{longtable}{@{}>{\ttfamily}ll>{\itshape}lp{8cm}@{}} -extension & text & & Set the file extension (e.g.\ \textsf{dvi}) which will be appended to file links - created if you use the \xpackage{xr} package. \\ -hyperfigures & boolean & & \\ -backref & text & false & Adds `backlink' text to the end of each item in the bibliography, as a list of - section numbers. This can only work properly \emph{if} there is a blank line after - each \verb|\bibitem|. Supported values are \verb|section|, \verb|slide|, \verb|page|, - \verb|none|, or \verb|false|. If no value is given, \verb|section| is taken as default.\\ -pagebackref & boolean & false & Adds `backlink' text to the end of each item in the bibliography, as a list of page - numbers. \\ -hyperindex & boolean & true & Makes the page numbers of index entries into hyperlinks. Relays on unique - page anchors (\verb|pageanchor|, \ldots) - \verb|pageanchors| and \verb|plainpages=false|. \\ -hyperfootnotes & boolean & true & Makes the footnote marks into hyperlinks to the footnote text. - Easily broken \ldots\\ -encap & & & Sets encap character for hyperindex \\ -linktoc & text & section & make text (\verb|section|), page number (\verb|page|), both (\verb|all|) or nothing (\verb|none|) be link on TOC, LOF and LOT \\ -linktocpage & boolean & false & make page number, not text, be link on TOC, LOF and LOT \\ -breaklinks & boolean & false & allow links to break over lines by making links over multiple lines into PDF links to - the same target \\ -colorlinks & boolean & false & 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 links. - Unlike colored boxes, the colored - text remains when printing.\\ -linkcolor & color & red & Color for normal internal links. \\ -anchorcolor & color & black & Color for anchor text. Ignored by most drivers. \\ -citecolor & color & green & Color for bibliographical citations in text. \\ -filecolor & color & cyan & Color for URLs which open local files. \\ -menucolor & color & red & Color for Acrobat menu items. \\ -runcolor & color & filecolor & Color for run links (launch annotations). \\ -urlcolor & color & magenta & Color for linked URLs. \\ -allcolors & color & & Set all color options (without border and field options).\\ -frenchlinks & boolean & false & Use small caps instead of color for links.\\ -hidelinks & & & Hide links (removing color and border). \\ -\end{longtable} \smallskip - -Note that all color names must be defined before use, following the -normal system of the standard \LaTeX\ \xpackage{color} package. - -\subsection{PDF-specific display options} -\begin{longtable}{@{}>{\ttfamily}ll>{\itshape}lp{7.6cm}@{}} -bookmarks & boolean & true & 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 \texttt{.out}) may be needed to - translate \LaTeX\ codes, since bookmarks must be written in PDFEncoding. - To aid this process, the \texttt{.out} file is not rewritten by \LaTeX\ - if it is edited to contain a line \verb|\let\WriteBookmarks\relax| \\ -bookmarksopen & boolean & false & If Acrobat bookmarks are requested, show them with all the subtrees - expanded. \\ -bookmarksopenlevel & parameter & & level (\ci{maxdimen}) to which bookmarks are open \\ -bookmarksnumbered & boolean & false & If Acrobat bookmarks are requested, include section numbers. \\ -bookmarkstype & text & toc & to specify which `toc' file to mimic \\ -CJKbookmarks & boolean & false & - This option should be used to produce CJK bookmarks. - Package \verb|hyperref| - 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 - 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 translate non-Unicode bookmarks to - Unicode; for portable PDF documents only Unicode encoding should - be used.\\ -pdfhighlight & name & /I & 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). \\ -citebordercolor & RGB color & 0 1 0 & The color of the box around citations \\ -filebordercolor & RGB color & 0 .5 .5 & The color of the box around links to files \\ -linkbordercolor & RGB color & 1 0 0 & The color of the box around normal links \\ -menubordercolor & RGB color & 1 0 0 & The color of the box around Acrobat menu links \\ -urlbordercolor & RGB color & 0 1 1 & The color of the box around links to URLs \\ -runbordercolor & RGB color & 0 .7 .7 & Color of border around `run' links \\ -allbordercolors & & & Set all border color options \\ -pdfborder & & 0 0 1 & 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. -\end{longtable} - -Note that the color of link borders can be specified \emph{only} as 3 -numbers in the range 0..1, giving an RGB color. You cannot use colors -defined in \TeX. Since version 6.76a this is no longer true. -Especially with the help of package \xpackage{xcolor} the usual -color specifications of package \xpackage{(x)color} can be used. -For further information see description of package \xpackage{hycolor}. - -The bookmark commands are stored in a file called -\textit{jobname}\texttt{.out}. The files is not processed by \LaTeX\ so -any markup is passed through. You can postprocess this file as needed; -as an aid for this, the \texttt{.out} file is not overwritten on the -next \TeX\ run if it is edited to contain the line -\begin{verbatim} -\let\WriteBookmarks\relax -\end{verbatim} - -\subsection{PDF display and information options} -\begin{longtable}{@{}>{\ttfamily}l>{\raggedright}p{\widthof{key value}}>{\itshape}lp{7cm}@{}} -baseurl & URL & & Sets the base URL of the PDF document \\ -pdfpagemode & name & empty & Determines how the file is opening in Acrobat; the possibilities are - \verb|UseNone|, \verb|UseThumbs| (show thumbnails), \verb|UseOutlines| - (show bookmarks), \verb|FullScreen|, \verb|UseOC| (PDF 1.5), - and \verb|UseAttachments| (PDF 1.6). If no mode if explicitly chosen, but the - bookmarks option is set, \verb|UseOutlines| is used. \\ -pdftitle & text & & Sets the document information Title field \\ -pdfauthor & text & & Sets the document information Author field \\ -pdfsubject & text & & Sets the document information Subject field \\ -pdfcreator & text & & Sets the document information Creator field \\ -addtopdfcreator & text & & Adds additional text to the document information Creator field \\ -pdfkeywords & text & & Sets the document information Keywords field \\ -pdftrapped & name & empty & Sets the document information Trapped entry. Possible values are \verb|True|, \verb|False| and \verb|Unknown|. - An empty value means, the entry is not set.\\ -% -pdfinfo & key value list & empty & Alternative interface for setting the - document information.\\ -pdfview & name & XYZ & Sets the default PDF `view' for each link \\ -pdfstartpage & integer & 1 & Determines on which page the PDF file is opened. An empty value means, the entry is not set.\\ -pdfstartview & name & Fit & Set the startup page view \\ -pdfremotestartview & name & Fit & Set the startup page view of remote PDF files \\ -pdfpagescrop & n n n n & & Sets the default PDF crop box for pages. This should be a set of four numbers \\ -pdfcenterwindow & boolean & false & position the document window in the center of the screen \\ -pdfdirection & name & empty & direction setting. Possible values: \verb|L2R| (left to right) and - \verb|R2L| (right to left)\\ -pdfdisplaydoctitle & boolean & false & display document title instead of file name in title bar\\ -pdfduplex & name & empty & paper handling option for print dialog. Possible vatues are: - \verb|Simplex| (print single-sided), - \verb|DuplexFlipShortEdge| (duplex and flip on the short edge of the sheet), - \verb|DuplexFlipLongEdge| (duplex and flip on the long edge of the sheet)\\ - -pdffitwindow & boolean & false & resize document window to fit document size \\ -pdflang & name & relax & PDF language identifier (RFC 3066)\\ -pdfmenubar & boolean & true & make PDF viewer's menu bar visible \\ -pdfnewwindow & boolean & false & make links that open another PDF file start a new window \\ -pdfnonfullscreenpagemode - & name & empty & page mode setting on exiting full-screen mode. Possible values are - \verb|UseNone|, \verb|UseOutlines|, \verb|UseThumbs|, and \verb|UseOC|\\ -pdfnumcopies & integer & empty & number of printed copies \\ -pdfpagelayout & name & empty & set layout of PDF pages. Possible values: - \verb|SinglePage|, \verb|OneColumn|, - \verb|TwoColumnLeft|, \verb|TwoColumnRight|, - \verb|TwoPageLeft|, and \verb|TwoPageRight| \\ -pdfpagelabels & boolean & true & set PDF page labels \\ -pdfpagetransition & name & empty & set PDF page transition style. Possible values are - \verb|Split|, \verb|Blinds|, \verb|Box|, \verb|Wipe|, - \verb|Dissolve|, \verb|Glitter|, \verb|R|, - \verb|Fly|, \verb|Push|, - \verb|Cover|, \verb|Uncover|, - \verb|Fade|. - The default according to the PDF~Reference is \verb|R|, - which simply replaces the old page with the new one. \\ -pdfpicktraybypdfsize - & boolean & false & specify whether PDF page size is used to select input paper tray in print dialog \\ -pdfprintarea & name & empty & set /PrintArea of viewer preferences. Possible values are - \verb|MediaBox|, \verb|CropBox|, - \verb|BleedBox|, \verb|TrimBox|, and \verb|ArtBox|. - The dafault according to the PDF~Refence is \verb|CropBox| \\ -pdfprintclip & name & empty & set /PrintClip of viewer preferences. Possible values are - \verb|MediaBox|, \verb|CropBox|, - \verb|BleedBox|, \verb|TrimBox|, and \verb|ArtBox|. - The dafault according to the PDF~Refence is \verb|CropBox| \\ -pdfprintpagerange & n n (n n)* - & empty & set /PrintPageRange of viewer preferences\\ -pdfprintscaling & name & empty & page scaling option for print dialog - (option /PrintScaling of viewer - preferences, PDF 1.6); - valid values are \verb|None| and - \verb|AppDefault| \\ -pdftoolbar & boolean & true & make PDF toolbar visible \\ -pdfviewarea & name & empty & set /ViewArea of viewer preferences. Possible values are - \verb|MediaBox|, \verb|CropBox|, - \verb|BleedBox|, \verb|TrimBox|, and \verb|ArtBox|. - The dafault according to the PDF~Refence is \verb|CropBox| \\ -pdfviewclip & name & empty & set /ViewClip of viewer preferences Possible values are - \verb|MediaBox|, \verb|CropBox|, - \verb|BleedBox|, \verb|TrimBox|, and \verb|ArtBox|. - The dafault according to the PDF~Refence is \verb|CropBox| \\ -pdfwindowui & boolean & true & make PDF user interface elements visible \\ -unicode & boolean & true & Unicode encoded PDF strings -\end{longtable} - -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 -\verb|\hypercalcbp| that is explained on page \pageref{hypercalcbp}. -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 -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. - -\begin{longtable}{@{}>{\ttfamily}l>{\itshape}lp{7cm}@{}} -XYZ & left top zoom & Sets a coordinate and a zoom factor. If any one is null, the source link value is used. - \textit{null null null} will give the same values as the current page. \\ -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 coordinates to the window. \\ -FitB & & Fits the page bounding box to the window. \\ -FitBH & top & Fits the width of the page bounding box to the window. \\ -FitBV & left & Fits the height of the page bounding box to the window. \\ -\end{longtable} - -The \texttt{pdfpagelayout} can be one of the following values. - -\begin{longtable}{@{}>{\ttfamily}lp{10cm}@{}} -SinglePage & 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 the left. \\ -TwoColumnRight & Displays the document in two columns, odd-numbered pages to the right.\\ -TwoPageLeft & 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 1.5). -\end{longtable} - -Finally, the \texttt{pdfpagetransition} can be one of the following -values, where \textit{/Di} stands for direction of motion in degrees, -generally in 90$^{\circ}$\ steps, \textit{/Dm} is a horizontal -(\texttt{/H}) or vertical (\texttt{/V}) dimension (e.g.\ \texttt{Blinds -/Dm /V}), and \textit{/M} is for motion, either in (\texttt{/I}) or out -(\texttt{/O}). - -\begin{longtable}{@{}>{\ttfamily}llp{8.5cm}@{}} -Blinds & /Dm & 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. \\ -Dissolve & & The page image dissolves in a piecemeal fashion to reveal the new page. \\ -Glitter & /Di & 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 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 direction - specified by /Di, to or from a location that is - offscreen except when /Di is None. \\ -Push & /Di & The old page slides off the screen while the new page slides in, - pushing the old page out in the direction - specified by /Di. \\ -Cover & /Di & 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 specified by - /Di, uncovering the new page in the direction - specified by /Di. \\ -Fade & & The new page gradually becomes visible through the old one. - -\end{longtable} - -\subsection{Option \texttt{pdfinfo}} - -The information entries can be set using \texttt{pdftitle}, -\texttt{pdfsubject}, \dots. Option \texttt{pdfinfo} provides an alternative -interface. It takes a key value list. The key names are the names that -appear in the PDF information dictionary directly. Known keys such as -\texttt{Title}, \texttt{Subject}, \texttt{Trapped} and other are mapped to -options \texttt{pdftitle}, \texttt{subject}, \texttt{trapped}, \dots -Unknown keys are added to the information dictionary. Their values are text -strings (see PDF specification). -Example: -\begin{quote} -\begin{verbatim} -\hypersetup{ - pdfinfo={ - Title={My Title}, - Subject={My Subject}, - NewKey={Foobar}, - % ... - } -} -\end{verbatim} -\end{quote} - -\subsection{Big alphabetical list} - -The following is a complete listing of available options for -\textsf{hyperref}, arranged alphabetically. - -\begin{longtable}{@{}>{\ttfamily}llp{7cm}@{}} -allbordercolors & & Set all border color options\\ -allcolors & & Set all color options (without border and field options)\\ -anchorcolor & \textit{black} & set color of anchors, ignored by most drivers. \\ -backref & \textit{false} & do bibliographical back references \\ -baseurl & \textit{empty} & set base URL for document \\ -bookmarks & \textit{true} & make bookmarks \\ -bookmarksnumbered & \textit{false} & put section numbers in bookmarks \\ -bookmarksopen & \textit{false} & open up bookmark tree \\ -bookmarksopenlevel & \ttfamily\ci{maxdimen} & level to which bookmarks are open \\ -bookmarkstype & \textit{toc} & to specify which `toc' file to mimic \\ -breaklinks & \textit{false} & allow links to break over lines \\ -CJKbookmarks & \textit{false} & to produce CJK bookmarks\\ -citebordercolor & \textit{0 1 0} & color of border around cites \\ -citecolor & \textit{green} & color of citation links \\ -colorlinks & \textit{false} & color links \\ - & \textit{true} & (\textsf{tex4ht}, \textsf{dviwindo}) \\ -debug & \textit{false} & provide details of anchors defined; same as verbose \\ -destlabel & \textit{false} & destinations are named by the first \verb|\label| after the anchor creation \\ -draft & \textit{false} & do not do any hyperlinking \\ -driverfallback & & default if no driver specified or detected\\ -dvipdfm & & use \textsf{dvipdfm} backend \\ -dvipdfmx & & use \textsf{dvipdfmx} backend \\ -dvips & & use \textsf{dvips} backend \\ -dvipsone & & use \textsf{dvipsone} backend \\ -dviwindo & & use \textsf{dviwindo} backend \\ -encap & & to set encap character for hyperindex \\ -extension & \textit{dvi} & suffix of linked files \\ -filebordercolor & \textit{0 .5 .5} & color of border around file links \\ -filecolor & \textit{cyan} & color of file links \\ -final & \textit{true} & opposite of option draft \\ -frenchlinks & \textit{false} & use small caps instead of color for links \\ -hidelinks & & Hide links (removing color and border) \\ -hyperfigures & \textit{false} & make figures hyper links \\ -hyperfootnotes & \textit{true} & set up hyperlinked footnotes \\ -hyperindex & \textit{true} & set up hyperlinked indices \\ -hypertex & & use \textsf{Hyper\TeX} backend \\ -hypertexnames & \textit{true} & use guessable names for links \\ -implicit & \textit{true} & redefine \LaTeX\ internals \\ -latex2html & & use \textsf{\LaTeX2HTML} backend \\ -linkbordercolor & \textit{1 0 0} & color of border around links \\ -linkcolor & \textit{red} & color of links \\ -linktoc & \textit{section} & make text be link on TOC, LOF and LOT \\ -linktocpage & \textit{false} & make page number, not text, be link on TOC, LOF and LOT \\ -menubordercolor & \textit{1 0 0} & color of border around menu links \\ -menucolor & \textit{red} & color for menu links \\ -nativepdf & \textit{false} & an alias for \textsf{dvips} \\ -naturalnames & \textit{false} & use \LaTeX-computed names for links \\ -nesting & \textit{false} & allow nesting of links \\ -pageanchor & \textit{true} & put an anchor on every page \\ -pagebackref & \textit{false} & backreference by page number \\ -pdfauthor & \textit{empty} & text for PDF Author field \\ -pdfborder & \textit{0 0 1} & width of PDF link border \\ - & \textit{0 0 0} & (\texttt{colorlinks)} \\ -pdfborderstyle & & border style for links \\ -pdfcenterwindow & \textit{false} & position the document window in the center of the screen \\ -pdfcreator & \textit{LaTeX with} & text for PDF Creator field \\ - & \textit{hyperref} & \\ -pdfdirection & \textit{empty} & direction setting \\ -pdfdisplaydoctitle & \textit{false} & display document title instead - of file name in title bar\\ -pdfduplex & \textit{empty} & paper handling option for - print dialog\\ -pdffitwindow & \textit{false} & resize document window to fit document size \\ -pdfhighlight & \textit{/I} & set highlighting of PDF links \\ -pdfinfo & \textit{empty} & alternative interface for setting document information\\ -pdfkeywords & \textit{empty} & text for PDF Keywords field \\ -pdflang & \textit{relax} & PDF language identifier (RFC 3066) \\ -pdfmark & \textit{false} & an alias for \textsf{dvips} \\ -pdfmenubar & \textit{true} & make PDF viewer's menu bar visible \\ -pdfnewwindow & \textit{false} & make links that open another PDF \\ - & & file start a new window \\ -pdfnonfullscreenpagemode - & \textit{empty} & page mode setting on exiting - full-screen mode\\ -pdfnumcopies & \textit{empty} & number of printed copies\\ -pdfpagelabels & \textit{true} & set PDF page labels \\ -pdfpagelayout & \textit{empty} & set layout of PDF pages \\ -pdfpagemode & \textit{empty} & set default mode of PDF display \\ -pdfpagescrop & \textit{empty} & set crop size of PDF document \\ -pdfpagetransition & \textit{empty} & set PDF page transition style \\ -pdfpicktraybypdfsize - & \textit{empty} & set option for print dialog \\ -pdfprintarea & \textit{empty} & set /PrintArea of viewer preferences \\ -pdfprintclip & \textit{empty} & set /PrintClip of viewer preferences \\ -pdfprintpagerange & \textit{empty} & set /PrintPageRange of viewer preferences \\ -pdfprintscaling & \textit{empty} & page scaling option for print dialog \\ -pdfproducer & \textit{empty} & text for PDF Producer field \\ -pdfremotestartview & \textit{Fit} & starting view of remote PDF documents \\ -pdfstartpage & \textit{1} & page at which PDF document opens \\ -pdfstartview & \textit{Fit} & starting view of PDF document \\ -pdfsubject & \textit{empty} & text for PDF Subject field \\ -pdftex & & use \textsf{pdf\TeX} backend \\ -pdftitle & \textit{empty} & text for PDF Title field \\ -pdftoolbar & \textit{true} & make PDF toolbar visible \\ -pdftrapped & \textit{empty} & Sets the document information Trapped entry. - Possible values are \texttt{True}, \texttt{False} and \texttt{Unknown}. - An empty value means, the entry is not set.\\ -pdfview & \textit{XYZ} & PDF `view' when on link traversal \\ -pdfviewarea & \textit{empty} & set /ViewArea of viewer preferences \\ -pdfviewclip & \textit{empty} & set /ViewClip of viewer preferences \\ -pdfwindowui & \textit{true} & make PDF user interface elements visible \\ -plainpages & \textit{false} & do page number anchors as plain Arabic \\ -ps2pdf & & use \textsf{ps2pdf} backend \\ -psdextra & \textit{false} & define more short names for PDF string commands \\ -raiselinks & \textit{false} & raise up links (for \textsf{Hyper\TeX} backend) \\ -runbordercolor & \textit{0 .7 .7} & color of border around `run' links \\ -runcolor & \textit{filecolor} & color of `run' links\\ -setpagesize & \textit{true} & set page size by special driver commands \\ -tex4ht & & use \textsf{\TeX4ht} backend \\ -textures & & use \textsf{Textures} backend \\ -unicode & \textit{true} & Unicode encoded pdf strings, starting with version 2021-02-04 v7.00g set by default to true for all engines. \\ -urlbordercolor & \textit{0 1 1} & color of border around URL links \\ -urlcolor & \textit{magenta} & color of URL links \\ -verbose & \textit{false} & be chatty \\ -vtex & & use \textsf{VTeX} backend\\ -xetex & & use \textsf{Xe\TeX} backend\\ -\end{longtable} - -\section{Additional user macros} - -If you need to make references to URLs, or write explicit links, the -following low-level user macros are provided: - -\begin{cmdsyntax} -\ci{href}\verb|[|\emph{options}\verb|]|\verb|{|\emph{URL}\verb|}{|\emph{text}\verb|}| -\end{cmdsyntax} - -\noindent The \emph{text} is made a hyperlink to the \emph{URL}; this -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 -\texttt{pdfremotestartview}, \texttt{pdfnewwindow} and the following -key value options: -\begin{description} -\item[\texttt{page}:] Specifies the start page number of remote -PDF documents. First page is \verb|1|. -\item[\texttt{ismap}:] Boolean key, if set to \verb|true|, the -URL should appended by the coordinates as query parameters by -the PDF viewer. -\item[\texttt{nextactionraw}:] The value of key \verb|/Next| of -action dictionaries, see PDF specification. -\end{description} - -\begin{cmdsyntax} -\ci{url}\verb|{|\emph{URL}\verb|}| -\end{cmdsyntax} - -\noindent Similar to -\ci{href}\verb|{|\emph{URL}\verb|}{|\ci{nolinkurl}\verb|{|\emph{URL}\verb|}}|. -Depending on the driver \verb|\href| also tries to detect the link type. -Thus the result can be a url link, file link, \dots - -\begin{cmdsyntax} -\ci{nolinkurl}\verb|{|\emph{URL}\verb|}| -\end{cmdsyntax} - -\noindent Write \emph{URL} in the same way as \verb|\url|, - without creating a hyperlink. - -\begin{cmdsyntax} -\ci{hyperbaseurl}\verb|{|\emph{URL}\verb|}| -\end{cmdsyntax} - -\noindent A base \emph{URL} is established, which is prepended to other -specified URLs, to make it easier to write portable documents. - -\begin{cmdsyntax} -\ci{hyperimage}\verb|{|\emph{imageURL}\verb|}{|\emph{text}\verb|}| -\end{cmdsyntax} - -\noindent The link to the image referenced by the URL is inserted, using -\emph{text} as the anchor. - - For drivers that produce HTML, the image itself is inserted by the -browser, with the \emph{text} being ignored completely. - -\begin{cmdsyntax} -\ci{hyperdef}\verb|{|\emph{category}\verb|}{|\emph{name}\verb|}{|\emph{text}\verb|}| -\end{cmdsyntax} - -\noindent A target area of the document (the \emph{text}) is marked, and -given the name \emph{category.name} - -\begin{cmdsyntax} -\ci{hyperref}\verb|{|\emph{URL}\verb|}{|\emph{category}\verb|}{|\emph{name}\verb|}{|\emph{text}\verb|}| -\end{cmdsyntax} - -\noindent \emph{text} is made into a link to \emph{URL\#category.name} - -\begin{cmdsyntax} -\ci{hyperref}\verb|[|\emph{label}\verb|]{|\emph{text}\verb|}| -\end{cmdsyntax} - -\noindent -\emph{text} is made into a link to the same place as -\verb|\ref{|\emph{label}\verb|}| would be linked. - -\begin{cmdsyntax} -\ci{hyperlink}\verb|{|\emph{name}\verb|}{|\emph{text}\verb|}| -\end{cmdsyntax} -\begin{cmdsyntax} -\ci{hypertarget}\verb|{|\emph{name}\verb|}{|\emph{text}\verb|}| -\end{cmdsyntax} - -\noindent A simple internal link is created with \verb|\hypertarget|, -with two parameters of an anchor \emph{name}, and anchor -\emph{text}. \verb|\hyperlink| has two arguments, the name of a -hypertext object defined somewhere by \verb|\hypertarget|, and the -\emph{text} which be used as the link on the page. - -Note that in HTML parlance, the \verb|\hyperlink| command inserts a -notional \# in front of each link, making it relative to the current -testdocument; \verb|\href| expects a full URL. - -\begin{cmdsyntax} -\ci{phantomsection} -\end{cmdsyntax} - -\noindent -This sets an anchor at this location. It works similar to -\verb|\hypertarget{}{}| with an automatically chosen anchor name. -Often it is used in conjunction -with \verb|\addcontentsline| for sectionlike things (index, bibliography, -preface). \verb|\addcontentsline| refers to the latest previous location -where an anchor is set. Example: -\begin{quote} -\begin{verbatim} -\cleardoublepage -\phantomsection -\addcontentsline{toc}{chapter}{\indexname} -\printindex -\end{verbatim} -\end{quote} -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. - -\begin{cmdsyntax} -\ci{autoref}\verb|{|\emph{label}\verb|}| -\end{cmdsyntax} - -\noindent -This is a replacement for the usual \verb|\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 \verb|\label| -command by \textsf{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 -\ci{*name}. For instance, it looks for \ci{figureautorefname} before -\ci{figurename}. - -\begin{longtable}{@{}lp{10cm}@{}} -\textit{Macro} & \textit{Default} \\ -\ci{figurename} & Figure \\ -\ci{tablename} & Table \\ -\ci{partname} & Part \\ -\ci{appendixname} & Appendix \\ -\ci{equationname} & Equation \\ -\ci{Itemname} & item \\ -\ci{chaptername} & chapter \\ -\ci{sectionname} & section \\ -\ci{subsectionname} & subsection \\ -\ci{subsubsectionname} & subsubsection \\ -\ci{paragraphname} & paragraph \\ -\ci{Hfootnotename} & footnote \\ -\ci{AMSname} & Equation \\ -\ci{theoremname} & Theorem\\ -\ci{page} & page\\ -\end{longtable} - -Example for a redefinition if \textsf{babel} is used: -\begin{quote} -\begin{verbatim} -\usepackage[ngerman]{babel} -\addto\extrasngerman{% - \def\subsectionautorefname{Unterkapitel}% -} -\end{verbatim} -\end{quote} - -Hint: \cs{autoref} works via the counter name that the reference -is based on. Sometimes \cs{autoref} chooses the wrong name, if -the counter is used for different things. For example, it happens -with \cs{newtheorem} if a lemma shares a counter with theorems. -Then package \xpackage{aliascnt} provides a method to generate a -simulated second counter that allows the differentiation between -theorems and lemmas: -\begin{quote} -\begin{verbatim} -\documentclass{article} - -\usepackage{aliascnt} -\usepackage{hyperref} - -\newtheorem{theorem}{Theorem} - -\newaliascnt{lemma}{theorem} -\newtheorem{lemma}[lemma]{Lemma} -\aliascntresetthe{lemma} - -\providecommand*{\lemmaautorefname}{Lemma} - -\begin{document} - -We will use \autoref{a} to prove \autoref{b}. - -\begin{lemma}\label{a} - Nobody knows. -\end{lemma} - -\begin{theorem}\label{b} - Nobody is right. -\end{theorem}. - -\end{document} -\end{verbatim} -\end{quote} - -\begin{cmdsyntax} -\ci{autopageref}\verb|{|\emph{label}\verb|}| -\end{cmdsyntax} - -\noindent -It replaces \verb|\pageref| and adds the name for page in front of -the page reference. First \ci{pageautorefname} is checked before -\ci{pagename}. - -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 \verb|implicit=false|): - -\begin{cmdsyntax} -\ci{ref*}\verb|{|\emph{label}\verb|}| -\end{cmdsyntax} - -\begin{cmdsyntax} -\ci{pageref*}\verb|{|\emph{label}\verb|}| -\end{cmdsyntax} - -\begin{cmdsyntax} -\ci{autoref*}\verb|{|\emph{label}\verb|}| -\end{cmdsyntax} - -\begin{cmdsyntax} -\ci{autopageref*}\verb|{|\emph{label}\verb|}| -\end{cmdsyntax} - -A typical use would be to write -\begin{verbatim} -\hyperref[other]{that nice section (\ref*{other}) we read before} -\end{verbatim} - -We want \verb|\ref*{other}| to generate the correct number, but not to -form a link, since we do this ourselves with \ci{hyperref}. - -\begin{cmdsyntax} -\ci{pdfstringdef}\verb|{|\emph{macroname}\verb|}{|\emph{\TeX string}\verb|}| -\end{cmdsyntax} - -\ci{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: - -\begin{itemize} -\item Switching to PD1 or PU encoding -\item Defining the \Quote{octal sequence commands} (\verb|\345|): \verb|\edef\3{\string\3}| -\item Special glyphs of \TeX: \verb|\{|, \verb|\%|, \verb|\&|, \verb|\space|, \verb|\dots|, etc. -\item National glyphs (\textsf{german.sty}, \textsf{french.sty}, etc.) -\item Logos: \verb|\TeX|, \verb|\eTeX|, \verb|\MF|, etc. -\item Disabling commands that do not provide useful functionality in bookmarks: -\verb|\label|, \verb|\index|, \verb|\glossary|, \verb|\discretionary|, \verb|\def|, \verb|\let|, etc. -\item \LaTeX's font commands like \verb|\textbf|, etc. -\item Support for \verb|\xspace| provided by the \xpackage{xspace} package -\end{itemize} - -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}. - -\begin{cmdsyntax} -\ci{begin}\verb|{NoHyper}|\ldots\ci{end}\verb|{NoHyper}| -\end{cmdsyntax} - 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 - \verb|hyperref| playing havoc in the front matter. - -\subsection{Bookmark macros} - -\subsubsection{Setting bookmarks} - -Usually \textsf{hyperref} automatically adds bookmarks for -\verb|\section| and similar macros. But they can also set manually. - -\begin{cmdsyntax} -\ci{pdfbookmark}\verb|[|\emph{level}\verb|]{|text\verb|}{|\emph{name}\verb|}| -\end{cmdsyntax} -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 \verb|\label|). - -\begin{cmdsyntax} -\ci{currentpdfbookmark}\verb|{|\emph{text}\verb|}{|\emph{name}\verb|}| -\end{cmdsyntax} -creates a bookmark at the current level. - -\begin{cmdsyntax} -\ci{subpdfbookmark}\verb|{|\emph{text}\verb|}{|\emph{name}\verb|}| -\end{cmdsyntax} -creates a bookmark one step down in the bookmark hierarchy. -Internally the current level is increased by one. - -\begin{cmdsyntax} -\ci{belowpdfbookmark}\verb|{|\emph{text}\verb|}{|\emph{name}\verb|}| -\end{cmdsyntax} -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: -\begin{itemize} -\item Usually only one \LaTeX\ run is needed. -\item More control over the bookmark appearance (color, font). -\item Different bookmark actions are supported (external file links, - URLs, \dots). -\end{itemize} -Therefore I recommend using this package. - -\subsubsection{Replacement macros} - -\textsf{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. - -\begin{cmdsyntax} -\ci{texorpdfstring}\verb|{|\emph{\TeX string}\verb|}{|\emph{PDFstring}\verb|}| -\end{cmdsyntax} - -For example, -\begin{verbatim} -\section{Pythagoras: - \texorpdfstring{$ a^2 + b^2 = c^2 $}{% - a\texttwosuperior\ + b\texttwosuperior\ = - c\texttwosuperior - }% -} -\section{\texorpdfstring{\textcolor{red}}{}{Red} Mars} -\end{verbatim} - -\ci{pdfstringdef} executes the hook \pdfstringdefPreHook before it -expands the string. Therefore, you can use this hook to perform -additional tasks or to disable additional commands. - -\begin{verbatim} -\expandafter\def\expandafter\pdfstringdefPreHook -\expandafter{% - \pdfstringdefPreHook - \renewcommand{\mycommand}[1]{}% -} -\end{verbatim} - -However, for disabling commands, an easier way is via -\ci{pdfstringdefDisableCommands}, which adds its argument to the -definition of \ci{pdfstringdefPreHook} (`@' can here be used as letter in -command names): - -\begin{verbatim} -\pdfstringdefDisableCommands{% - \let~\textasciitilde - \def\url{\pdfstringdefWarn\url}% - \let\textcolor\@gobble -} -\end{verbatim} - -\subsection{Pagelabels} -\begin{cmdsyntax} -\ci{thispdfpagelabel}\verb|{|\emph{page number format}\verb|}| -\end{cmdsyntax} - -This allows to change format of the page number shown in the tool bar of -a PDF viewer for a specific page, for example - -\verb+\thispdfpagelabel{Empty Page-\roman{page}}+ - -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 \verb+\thispagestyle+ can be use too. - -\subsection{Utility macros} - -\label{hypercalcbp} -\begin{cmdsyntax} -\ci{hypercalcbp}\verb|{|\emph{dimen specification}\verb|}| -\end{cmdsyntax} -\noindent -\verb|\hypercalcbp| takes a \TeX\ dimen specification and -converts it to bp and returns the number without the unit. -This is useful for options \verb|pdfview|, \verb|pdfstartview| -and \verb|pdfremotestartview|. -Example: -\begin{quote} -\begin{verbatim} -\hypersetup{ - pdfstartview={FitBH \hypercalcbp{\paperheight-\topmargin-1in - -\headheight-\headsep} -} -\end{verbatim} -\end{quote} -The origin of the PDF coordinate system is the lower left corner. - -Note, for calculations you need either package \xpackage{calc} or -\hologo{eTeX}. Nowadays the latter should automatically be enabled -for \hologo{LaTeX} formats. Users without \hologo{eTeX}, please, look -in the source documentation \verb|hyperref.dtx| for further -limitations. - -Also \cs{hypercalcbp} cannot be used in option specifications -of \cs{documentclass} and \cs{usepackage}, because -\hologo{LaTeX} expands the option lists of these commands. However -package \xpackage{hyperref} is not yet loaded and an undefined control -sequence error would arise. - -\section[New Features]{New Features% -\footnote{This section moved from the README file, needs more integration into the manual}} - - -\subsection{Option `pdflinkmargin'} - - Option `pdflinkmargin' is an experimental option for specifying - a link margin, if the driver supports this. Default is 1 pt for - supporting drivers. - - -\begin{description} -\item[pdfTeX] -\begin{itemize} - \item The link area also depends on the surrounding box. - \item Settings have local effect. - \item When a page is shipped out, pdfTeX uses the current setting - of the link margin for all links on the page. -\end{itemize} - -\item[pdfmark] -\begin{itemize} - \item Settings have global effect. -\end{itemize} - -\item[xetex] -\begin{itemize} - \item Settings must be done in the preamble or the first page and then have global effect. - The key inserts the new (x)dvipdfmx special \verb|\special{dvipdfmx:config g #1}| (with the unit removed). -\end{itemize} - -\item[Other drivers] - Unsupported. -\end{description} - - -\subsection{Field option `calculatesortkey'} - - 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. - - -\subsection{Option `localanchorname'} - - When an anchor is set (e.g. via \verb|\refstepcounter|, then the - anchor name is globally set to the current anchor name. - - - For example: -\begin{verbatim} - \section{Foobar} - \begin{equation}\end{equation} - \label{sec:foobar} -\end{verbatim} - 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 name is not available - as expected. - - -\subsection{Option `customdriver'} - - The value of option `customdriver' is the name of an external - driver file without extension `.def'. The file must have - \verb|\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 quite messy, the option is mainly intended - to ease developing, testing, debugging the driver part. - - -\subsection{Option `psdextra'} - - LaTeX's NFSS is used to assist the conversion of arbitrary - TeX strings to PDF strings (bookmarks, PDF information entries). - Many math command names (\verb|\geq|, \verb|\notin|, ...) are not in control - of NFSS, therefore they are defined with prefix `text' - (\verb|\textgeq|, \verb|\textnotin|, ...). They can be mapped to short names - during the processing to PDF strings. The disadvantage is that - they are many hundreds macros that need to be redefined for - each PDF string conversion. Therefore this can be enabled or - disabled as option `psdextra'. On default the option is turned - off (set to `false'). Turning the option on means - that the short names are available. Then \verb|\geq| can directly - be used instead of \verb|\textgeq|. - - -\subsection{\textbackslash XeTeXLinkBox} - - 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 \verb|\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 \verb|\XeTeXLinkMargin|. The default - is 2pt. - - Example: - - -\begin{verbatim} - % xelatex - \documentclass{article} - \usepackage{hyperref} - \setlength{\XeTeXLinkMargin}{1pt} - \begin{document} - \section{Hello World} - \newpage - \label{sec:hello} - \hyperref[sec:hello]{% - \XeTeXLinkBox{\rule{10mm}{10mm}}% - } - \end{document} -\end{verbatim} - -\subsection{\textbackslash IfHyperBooleanExists and \textbackslash IfHyperBoolean} -\begin{verbatim} - \IfHyperBooleanExists{OPTION}{YES}{NO} -\end{verbatim} - If a hyperref OPTION is a boolean, that means it takes values - `true' or `false', then \verb|\IfHyperBooleanExists| calls YES, otherwise NO. - - -\begin{verbatim} - \IfHyperBoolean{OPTION}{YES}{NO} -\end{verbatim} - Macro \verb|\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 \verb|\MaybeStopEarly| or \verb|\MaybeStopNow| - end hyperref prematurely. - - -\subsection{\textbackslash unichar} - - 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 - TeX code to PDF strings or tries to do this). - - - - Macro \verb|\unichar| takes a TeX number as argument, - examples for U+263A (WHITE SMILING FACE): -\begin{verbatim} - \unichar{"263A}% hexadecimal notation - \unichar{9786}% decimal notation -\end{verbatim} - `"' must not be a babel shorthand character or otherwise - active. Otherwise prefix it with \verb|\string|: -\begin{verbatim} - \unichar{\string"263A}% converts `"' to `"' with catcode 12 (other) -\end{verbatim} - Users of (n)german packages or babel options may use \verb|\dq| instead: -\begin{verbatim} - \unichar{\dq 263A}% \dq is double quote with catcode 12 (other) -\end{verbatim} - - -\subsection{\textbackslash ifpdfstringunicode} - - 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 \verb|\texorpdfstring| to replace complicate TeX constructs - by a representation for the PDF string. However \verb|\texorpdfstring| - does not distinguish the two encodings. This gap closes - \verb|\ifpdfstringunicode|. It is only allowed in the second argument - of \verb|\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 Han The Thanh. Correctly written it needs some - accented characters, one character even with a double accent. - Class `tugboat.cls' defines a macro for the typesetted name: -\begin{verbatim} - \def\Thanh{% - H\`an~% - Th\^e\llap{\raise 0.5ex\hbox{\'{}}}% - ~Th\`anh% - } -\end{verbatim} - 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 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 \verb|\unichar|. The character - in question is: -\begin{verbatim} - % U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE -\end{verbatim} - Thus we can put this together: -\begin{verbatim} - \def\Thanh{% - H\`an~% - \texorpdfstring{Th\^e\llap{\raise 0.5ex\hbox{\'{}}}}% - {\ifpdfstringunicode{Th\unichar{"1EC3}}{Th\^e}}% - ~Th\`anh% - } -\end{verbatim} - For PDFDocEncoding (PD1) the variant above has dropped the - second accent. Alternatively we could provide a representation - without accents instead of wrong accents: -\begin{verbatim} - \def\Thanh{% - \texorpdfstring{% - H\`an~% - Th\^e\llap{\raise 0.5ex\hbox{\'{}}}}% - ~Th\`anh% - }{% - \ifpdfstringunicode{% - H\`an Th\unichar{"1EC3} Th\`anh% - }{% - Han The Thanh% - }% - }% - } -\end{verbatim} - -\subsection{Customizing index style file with \textbackslash nohyperpage} - - Since version 2008/08/14~v6.78f. - - - - For hyperlink support in the index, 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: -\begin{verbatim} - delim_r "--" - delim_n ", " -\end{verbatim} - (See manual page/documentation of Makeindex that explains - the keys that can be used in style files for Makeindex.) - Customized versions of - \verb|delim_r, delim_n, suffix_2p, suffix_3p, suffix_mp| - needs markup that \verb|\hyperpage| can detect and knows that - this stuff does not belong to a page number. Makro - \verb|\nohyperpage| serves as this markup. Put the customized - code for these keys inside \verb|\nohyperpage|, e.g.: -\begin{verbatim} - suffix_2p "\\nohyperpage{f.}" - suffix_3p "\\nohyperpage{ff.}" -\end{verbatim} - (Depending on the typesetting tradition some space ``\verb|\\|,'' or ``\verb|~|'' - should be put before the first f inside \verb|\nohyperpage|.) - - -\subsection{Experimental option `ocgcolorlinks'} - - 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 package. Check its documentation for details how to use it. -\begin{itemize} - \item The option must be given for package loading: - \verb|\usepackage[ocgcolorlinks]{hyperref}| - \item 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. - \item The feature can be switched of by \verb|\hypersetup{ocgcolorlinks=false}| - inside the document. - \item Supported drivers: pdftex, dvipdfm - \item The PDF version should be at least 1.5. It is automatically - set for pdfTeX, LuaTeX and dvipdfmx. -\end{itemize} - -\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, - fonts, colors, driver dependend low level stuff, ...). - - - - Currently, option `pdfa' sets and disables the following items: -\begin{itemize} - \item Enabled annotation flags: Print, NoZoom, NoRotate [PDF/A 6.5.3]. - \item Disabled annotation flags: Hidden, Invisible, NoView [PDF/A 6.5.3]. - \item Disabled: Launch action (\href{run:...} [PDF/A 6.6.1]. - \item Restricted: Named actions (\Acrobatmenu: NextPage, PrevPage, - FirstPage, LastPage) [PDF/A 6.6.1]. - \item Many things are disabled in PDF formulars: - \begin{itemize} - \item JavaScript actions [PDF/A 6.6.1] - \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). - [PDF/A 6.9] - \end{itemize} -\end{itemize} - - - - 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 (\verb|\usepackage{hyperref}|). - - - -\subsection{Option `linktoc' added} - - The new option `linktoc' allows more control which part - of an entry in the table of contents is made into a link: -\begin{itemize} - \item `linktoc=none' (no links) - \item `linktoc=section' (default behaviour, same as `linktocpage=false') - \item `linktoc=page' (same as `linktocpage=true') - \item `linktoc=all' (both the section and page part are links) -\end{itemize} - -\subsection{Option `pdfnewwindow' changed} - - Before 6.77b: -\begin{itemize} - \item pdfnewwindow=true $\rightarrow$ /NewWindow true - \item pdfnewwindow=false $\rightarrow$ (absent) - \item unused pdfnewwindow $\rightarrow$ (absent) -\end{itemize} - Since 6.77b: -\begin{itemize} - \item pdfnewwindow=true $\rightarrow$ /NewWindow true - \item pdfnewwindow=false $\rightarrow$ /NewWindow false - \item pdfnewwindow={} $\rightarrow$ (absent) - \item unused pdfnewwindow $\rightarrow$ (absent) -\end{itemize} - - - - 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. - - -\subsection{Flag options for PDF forms} - - PDF form field macros (\verb|\TextField|, \verb|\CheckBox|, ...) support - boolean flag options. The option name is the lowercase - version of the names in the PDF specification (1.7): - - \url{http://www.adobe.com/devnet/pdf/pdf_reference.html} - - \url{http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference.pdf} - - Options (convert to lowercase) except flags in square brackets: - -\begin{itemize} - \item Table 8.16 Annotation flags (page 608): - -{\obeylines - 1 Invisible - 2 Hidden (PDF 1.2) - 3 Print (PDF 1.2) - 4 NoZoom (PDF 1.3) - 5 NoRotate (PDF 1.3) - 6 NoView (PDF 1.3) - [7 ReadOnly (PDF 1.3)] ignored for widget annotations, see table 8.70 - 8 Locked (PDF 1.4) - 9 ToggleNoView (PDF 1.5) - 10 LockedContents (PDF 1.7) -} - \item Table 8.70 Field flags common to all field types (page 676): - -{\obeylines - 1 ReadOnly - 2 Required - 3 NoExport -} - \item Table 8.75 Field flags specific to button fields (page 686): - -{\obeylines - 15 NoToggleToOff (Radio buttons only) - 16 Radio (set: radio buttons, clear: check box, pushbutton: clear) - 17 Pushbutton - 26 RadiosInUniso (PDF 1.5) -} - \item Table 8.77 Field flags specific to text fields (page 691): - -{\obeylines - 13 Multiline - 14 Password - 21 FileSelect (PDF 1.4) - 23 DoNotSpellCheck (PDF 1.4) - 24 DoNotScroll (PDF 1.4) - 25 Comb (PDF 1.5) - 26 RichText (PDF 1.5) -} - \item Table 8.79 Field flags specific to choice fields (page 693): - -{\obeylines - 18 Combo (set: combo box, clear: list box) - 19 Edit (only useful if Combo is set) - 20 (Sort) for authoring tools, not PDF viewers - 22 MultiSelect (PDF 1.4) - 23 DoNotSpellCheck (PDF 1.4) (only useful if Combo and Edit are set) - 27 CommitOnSelChange (PDF 1.5) -} - \item Table 8.86 Flags for submit-form actions (page 704): - -{\obeylines - [1 Include/Exclude] unsupported, use `noexport' (table 8.70) instead - 2 IncludeNoValueFields - [3 ExportFormat] handled by option `export' - 4 GetMethod - 5 SubmitCoordinates - [6 XFDF (PDF 1.4)] handled by option `export' - 7 IncludeAppendSaves (PDF 1.4) - 8 IncludeAnnotations (PDF 1.4) - [9 SubmitPDF (PDF 1.4)] handled by option `export' - 10 CanonicalFormat (PDF 1.4) - 11 ExclNonUserAnnots (PDF 1.4) - 12 ExclFKey (PDF 1.4) - 14 EmbedForm (PDF 1.5) -} -\end{itemize} - - New option `export' sets the export format of a submit action. - Valid values are (upper- or lowercase): -\begin{itemize} - \item FDF - \item HTML - \item XFDF - \item PDF (not supported by Acrobat Reader) -\end{itemize} - -\subsection{Option `pdfversion'} - - 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 higher PDF versions. - - - - The option must be used early, not after \verb|\usepackage{hyperref}|. - - - In theory this option should also set the PDF version, - but this is not generally supported. -\begin{itemize} - \item pdfTeX below 1.10a: unsupported. - pdfTeX $\ge$ 1.10a and < 1.30: \verb|\pdfoptionpdfminorversion| - pdfTeX $\ge$ 1.30: \verb|\pdfminorversion| - \item dvipdfm: configuration file, example: - TeX Live 2007, texmf/dvipdfm/config/config, entry `V 2'. - \item dvipdfmx: configuration file, example: - TeX Live 2007, texmf/dvipdfm/dvipdfmx.cfg, entry `V 4'. - \item Ghostscript: option -dCompatibilityLevel (this is set in - `ps2pdf12', `ps2pdf13', `ps2pdf14'). -\end{itemize} - - - The current PDF version is used as default if this version - can be detected (only pdfTeX $\ge$ 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. - - -\subsection{Field option `name'} - - Many form objects uses the label argument - for several purposes: -\begin{itemize} - \item Layouted label. - \item As name in HTML structures. -\end{itemize} - 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. - - -\subsection{Option `pdfencoding'} - - The PDF format allows two encodings for bookmarks and entries - in the information dictionary: PDFDocEncoding and Unicode - as UTF-16BE. Option \xoption{pdfencoding} selects between these encodings: -\begin{itemize} - \item \xoption{pdfdoc} uses PDFDocEncoding. It uses just one byte per character, - but the supported characters are limited (244 in PDF-1.7). - \item \xoption{unicode} sets Unicode. It is encoded as UTF-16BE. Two bytes - are used for most characters, surrogates need four bytes. - \item \xoption{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 normally no suited for the unicode engines. -\end{itemize} - - All drivers use \xoption{unicode} by default now. If another encoding should be forced, - it should be done in \verb|hypersetup|. - -\subsection{Color options/package hycolor} - - See documentation of package `hycolor'. - - -\subsection{Option pdfusetitle} - - If option pdfusetitle is set then 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). - - -\subsection{Starred form of \textbackslash autoref} - - \verb|\autoref*| generates a reference without link as \verb|\ref*| or \verb|\pageref*|. - - -\subsection{Link border style} - - Links can be underlined instead of the default rectangle or - options \xoption{colorlinks}, \xoption{frenchlinks}. This is done by option - \verb|pdfborderstyle={/S/U/W 1}| - - Some remarks: - -\begin{itemize} - \item AR7/Linux seems to have a bug, that don't use the default - value \verb"1" for the width, but zero, thus that the underline - is not visible without \verb"/W 1". The same applies for - dashed boxes, eg.: - pdfborderstyle={/S/D/D[3 2]/W 1} - - \item 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) - - \item The border style is removed by - pdfborderstyle={} - This is automatically done if option colorlinks is enabled. - - \item Be aware that not all PDF viewers support this feature, not - even Acrobat Reader itself: - - Some support: - \begin{itemize} - \item AR7/Linux: \xoption{underline} and \xoption{dashed}, but the border width - must be given. - \item xpdf 3.00: \xoption{underline} and \xoption{dashed} - \end{itemize} - - Unsupported: - \begin{itemize} - \item AR5/Linux - \item ghostscript 8.50 - \end{itemize} -\end{itemize} - -\subsection{Option \xoption{bookmarksdepth}} - - The depth of the bookmarks can be controlled by the new - option \xoption{bookmarksdepth}. The option acts globally and - distinguishes three cases: -\begin{itemize} - \item \xoption{bookmarksdepth} without value - Then 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 - of macro \verb|\toclevel@|. - Examples: -\begin{verbatim} - \hypersetup{bookmarksdepth=paragraph} - \hypersetup{bookmarksdepth=4} % same as before - \hypersetup{bookmarksdepth} % counter "tocdepth" is used -\end{verbatim} -\end{itemize} - -\subsection{Option \xoption{pdfescapeform}} - - 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: -\begin{itemize} - \item pdfescapeform=false - Escaping for the formulars are disabled, this is - the compatibility behaviour, therefore this is the default. - \item 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. -\end{itemize} - -\subsection{Default driver setting} - - (hyperref $\ge$ 6.72s) - If no driver is given, 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, ...). - 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 - file \verb"hyperref.cfg": -\begin{verbatim} - \providecommand*{\Hy@defaultdriver}{hdvips} -\end{verbatim} - for dvips, or -\begin{verbatim} - \providecommand*{\Hy@defaultdriver}{hypertex} -\end{verbatim} - for the default behaviour of hyperref. - - See also the new option `driverfallback'. - -\subsection{Backref entries} - - Alternative interface for formatting of backref entries, example: - -\begin{verbatim} -\documentclass[12pt,UKenglish]{article} - -\usepackage{babel} -\usepackage[pagebackref]{hyperref} - -% Some language options are detected by package backref. -% This affects the following macros: -% \backrefpagesname -% \backrefsectionsname -% \backrefsep -% \backreftwosep -% \backreflastsep - -\renewcommand*{\backref}[1]{ - % default interface - % #1: backref list - % - % We want to use the alternative interface, - % therefore the definition is empty here. -} -\renewcommand*{\backrefalt}[4]{% - % alternative interface - % #1: number of distinct back references - % #2: backref list with distinct entries - % #3: number of back references including duplicates - % #4: backref list including duplicates - \par - #3 citation(s) on #1 page(s): #2,\par - \ifnum#1=1 % - \ifnum#3=1 % - 1 citation on page % - \else - #3 citations on page % - \fi - \else - #3 citations on #1 pages % - \fi - #2,\par - \ifnum#3=1 % - 1 citation located at page % - \else - #3 citations located at pages % - \fi - #4.\par -} - -% The list of distinct entries can be further refined: -\renewcommand*{\backrefentrycount}[2]{% - % #1: the original backref entry - % #2: the count of citations of this entry, - % in case of duplicates greater than one - #1% - \ifnum#2>1 % - ~(#2)% - \fi -} - -\begin{document} - - \section{Hello} - \cite{ref1, ref2, ref3, ref4} - \section{World} - \cite{ref1, ref3} - \newpage - - \section{Next section} - \cite{ref1} - \newpage - - \section{Last section} - \cite{ref1, ref2} - \newpage - - \pdfbookmark[1]{Bibliography}{bib} - \begin{thebibliography}{99} - \bibitem{ref1} Dummy entry one. - - \bibitem{ref2} Dummy entry two. - - \bibitem{ref3} Dummy entry three. - - \bibitem{ref4} Dummy entry four. - - \end{thebibliography} - -\end{document} -\end{verbatim} - -\subsection{\textbackslash phantomsection} - -Set an anchor at this location. It is often used in conjunction -with \verb|\addcontentsline| for sectionlike things (index, bibliography, -preface). \verb|\addcontentsline| refers to the latest previous location -where an anchor is set. - -\begin{verbatim} - \cleardoublepage - \phantomsection - \addcontentsline{toc}{chapter}{\indexname} - \printindex -\end{verbatim} - -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. - - - -\section{Acrobat-specific behavior} -If you want to access the menu options of Acrobat Reader or Exchange, the following -macro is provided in the appropriate drivers: - -\begin{cmdsyntax} -\ci{Acrobatmenu}\verb|{|\emph{menuoption}\verb|}{|\emph{text}\verb|}| -\end{cmdsyntax} - -\noindent The \emph{text} is used to create a button which activates the appropriate \emph{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. - -\medskip -\begin{longtable}{@{}l>{\raggedright\arraybackslash}p{9cm}@{}} -File & Open, Close, Scan, Save, SaveAs, Optimizer:SaveAsOpt, Print, PageSetup, Quit \\ -File$\rightarrow$Import & ImportImage, ImportNotes, AcroForm:ImportFDF \\ -File$\rightarrow$Export & ExportNotes, AcroForm:ExportFDF \\ -File$\rightarrow$DocumentInfo & GeneralInfo, OpenInfo, FontsInfo, SecurityInfo, Weblink:Base, AutoIndex:DocInfo \\ -File$\rightarrow$Preferences & GeneralPrefs, NotePrefs, FullScreenPrefs, Weblink:Prefs, AcroSearch:Preferences(Windows) - or, AcroSearch:Prefs(Mac), Cpt:Capture \\ -Edit & Undo, Cut, Copy, Paste, Clear, SelectAll, Ole:CopyFile, TouchUp:TextAttributes, - TouchUp:FitTextToSelection, TouchUp:ShowLineMarkers, TouchUp:ShowCaptureSuspects, - TouchUp:FindSuspect, \\ - & Properties \\ -Edit$\rightarrow$Fields & AcroForm:Duplicate, AcroForm:TabOrder \\ -Document & Cpt:CapturePages, AcroForm:Actions, CropPages, RotatePages, InsertPages, ExtractPages, - ReplacePages, DeletePages, NewBookmark, SetBookmarkDest, CreateAllThumbs, - DeleteAllThumbs \\ -View & ActualSize, FitVisible, FitWidth, FitPage, ZoomTo, FullScreen, FirstPage, PrevPage, - NextPage, LastPage, GoToPage, GoBack, GoForward, SinglePage, OneColumn, TwoColumns, - ArticleThreads, PageOnly, ShowBookmarks, ShowThumbs \\ -Tools & Hand, ZoomIn, ZoomOut, SelectText, SelectGraphics, Note, Link, Thread, AcroForm:Tool, - Acro\_Movie:MoviePlayer, TouchUp:TextTool, Find, FindAgain, FindNextNote, - CreateNotesFile \\ -Tools$\rightarrow$Search & AcroSrch:Query, AcroSrch:Indexes, AcroSrch:Results, AcroSrch:Assist, AcroSrch:PrevDoc, - AcroSrch:PrevHit, AcroSrch:NextHit, AcroSrch:NextDoc \\ -Window & ShowHideToolBar, ShowHideMenuBar, ShowHideClipboard, Cascade, TileHorizontal, - TileVertical, CloseAll \\ -Help & HelpUserGuide, HelpTutorial, HelpExchange, HelpScan, HelpCapture, HelpPDFWriter, - HelpDistiller, HelpSearch, HelpCatalog, HelpReader, Weblink:Home \\ -Help(Windows) & About -\end{longtable} - -\section{PDF and HTML forms} -You must put your fields inside a \texttt{Form} environment (only one per file). - -There are six macros to prepare fields: - -\begin{cmdsyntax} -\ci{TextField}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}| -\end{cmdsyntax} - -\begin{cmdsyntax} -\ci{CheckBox}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}| -\end{cmdsyntax} - -\begin{cmdsyntax} -\ci{ChoiceMenu}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}{|\emph{choices}\verb|}| -\end{cmdsyntax} - -\begin{cmdsyntax} -\ci{PushButton}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}| -\end{cmdsyntax} - -\begin{cmdsyntax} -\ci{Submit}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}| -\end{cmdsyntax} - -\begin{cmdsyntax} -\ci{Reset}\verb|[|\emph{parameters}\verb|]{|\emph{label}\verb|}| -\end{cmdsyntax} - -The way forms and their labels are laid out is determined by: -\begin{cmdsyntax} -\ci{LayoutTextField}\verb|{|\emph{label}\verb|}{|\emph{field}\verb|}| -\end{cmdsyntax} - -\begin{cmdsyntax} -\ci{LayoutChoiceField}\verb|{|\emph{label}\verb|}{|\emph{field}\verb|}| -\end{cmdsyntax} - -\begin{cmdsyntax} -\ci{LayoutCheckField}\verb|{|\emph{label}\verb|}{|\emph{field}\verb|}| -\end{cmdsyntax} - -These macros default to \#1 \#2 - -What is actually shown in the field is determined by: -\begin{cmdsyntax} -\ci{MakeRadioField}\verb|{|\emph{width}\verb|}{|\emph{height}\verb|}| -\end{cmdsyntax} - -\begin{cmdsyntax} -\ci{MakeCheckField}\verb|{|\emph{width}\verb|}{|\emph{height}\verb|}| -\end{cmdsyntax} -\begin{cmdsyntax} -\ci{MakeTextField}\verb|{|\emph{width}\verb|}{|\emph{height}\verb|}| -\end{cmdsyntax} -\begin{cmdsyntax} -\ci{MakeChoiceField}\verb|{|\emph{width}\verb|}{|\emph{height}\verb|}| -\end{cmdsyntax} - -\begin{cmdsyntax} -\ci{MakeButtonField}\verb|{|\emph{text}\verb|}| -\end{cmdsyntax} - -These macros default to \verb|\vbox to #2{\hbox to #1{\hfill}\vfill}|, except the -last, which defaults to \#1; it is used for buttons, and the special \ci{Submit} and \ci{Reset} -macros. - -You may also want to redefine the following macros: -\begin{verbatim} -\def\DefaultHeightofSubmit{12pt} -\def\DefaultWidthofSubmit{2cm} -\def\DefaultHeightofReset{12pt} -\def\DefaultWidthofReset{2cm} -\def\DefaultHeightofCheckBox{0.8\baselineskip} -\def\DefaultWidthofCheckBox{0.8\baselineskip} -\def\DefaultHeightofChoiceMenu{0.8\baselineskip} -\def\DefaultWidthofChoiceMenu{0.8\baselineskip} -\def\DefaultHeightofText{\baselineskip} -\def\DefaultHeightofTextMultiline{4\baselineskip} -\def\DefaultWidthofText{3cm} -\end{verbatim} - -\subsection{Forms environment parameters} - -\smallskip -\begin{longtable}{@{}>{\ttfamily}l>{\itshape}lp{9cm}@{}} -action & URL & The URL that will receive the form data if a \textsf{Submit} button is included in the form \\ -encoding & name & The encoding for the string set to the URL; FDF-encoding is usual, and \texttt{html} is the only - valid value \\ -method & name & Used only when generating HTML; values can be \texttt{post} or \texttt{get} \\ -\end{longtable} - -\subsection{Forms optional parameters} -Note that all colors must be expressed as RGB triples, in the range 0..1 (i.e.\ \texttt{color=0 0 -0.5}) - -\smallskip -\begin{longtable}{@{}>{\ttfamily}ll>{\itshape}ll@{}} -accesskey & key & & (as per HTML) \\ -align & number & 0 & alignment within text field; 0 is left-aligned,\\* - & & & 1 is centered, 2 is right-aligned. \\ -altname & name & & alternative name,\\* - & & & the name shown in the user interface\\ -backgroundcolor & & & color of box \\ -bordercolor & & & color of border \\ -bordersep & & & box border gap \\ -borderwidth & & 1 & width of box border, the value is a dimension\\ - & & & or a number with default unit bp\\ -calculate & & & JavaScript code to calculate the value of the field \\ -charsize & dimen & & font size of field text \\ -checkboxsymbol & char & 4 (\ding{\number`4}) & symbol used for check boxes (ZapfDingbats), \\ -&&& the value is a character or \cs{ding}\verb|{|\texttt{\itshape number}\verb|}|, \\ -&&& see package \xpackage{pifont} from bundle \xpackage{psnfss} \\ -checked & boolean & false & whether option selected by default \\ -color & & & color of text in box \\ -combo & boolean & false & choice list is `combo' style \\ -default & & & default value \\ -disabled & boolean & false & field disabled \\ -format & & & JavaScript code to format the field \\ -height & dimen & & height of field box \\ -hidden & boolean & false & field hidden \\ -keystroke & & & JavaScript code to control the keystrokes on entry \\ -mappingname & name & & the mapping name to be used when exporting\\* - & & & the field data\\ -maxlen & number & 0 & number of characters allowed in text field \\ -menulength & number & 4 & number of elements shown in list \\ -multiline & boolean & false & whether text box is multiline \\ -name & name & & name of field (defaults to label) \\ -onblur & & & JavaScript code \\ -onchange & & & JavaScript code \\ -onclick & & & JavaScript code \\ -ondblclick & & & JavaScript code \\ -onfocus & & & JavaScript code \\ -onkeydown & & & JavaScript code \\ -onkeypress & & & JavaScript code \\ -onkeyup & & & JavaScript code \\ -onmousedown & & & JavaScript code \\ -onmousemove & & & JavaScript code \\ -onmouseout & & & JavaScript code \\ -onmouseover & & & JavaScript code \\ -onmouseup & & & JavaScript code \\ -onselect & & & JavaScript code \\ -password & boolean & false & text field is `password' style \\ -popdown & boolean & false & choice list is `popdown' style \\ -radio & boolean & false & choice list is `radio' style \\ -radiosymbol & char & H (\ding{\number`H}) & symbol used for radio fields (ZapfDingbats), \\ -&&& the value is a character or \cs{ding}\verb|{|\texttt{\itshape number}\verb|}|, \\ -&&& see package \xpackage{pifont} from bundle \xpackage{psnfss} \\ -readonly & boolean & false & field is readonly \\ -rotation & number & 0 & rotation of the widget annotation \\* - & & & (degree, counterclockwise, multiple of 90)\\ -tabkey & & & (as per HTML) \\ -validate & & & JavaScript code to validate the entry \\ -value & & & initial value \\ -width & dimen & & width of field box -\end{longtable} - -\section{Defining a new driver} -A hyperref driver has to provide definitions for eight macros: - -\smallskip -\noindent 1. \verb|\hyper@anchor| - -\noindent 2. \verb|\hyper@link| - -\noindent 3. \verb|\hyper@linkfile| - -\noindent 4. \verb|\hyper@linkurl| - -\noindent 5. \verb|\hyper@anchorstart| - -\noindent 6. \verb|\hyper@anchorend| - -\noindent 7. \verb|\hyper@linkstart| - -\noindent 8. \verb|\hyper@linkend| -\smallskip - -The draft option defines the macros as follows -\begin{verbatim} -\let\hyper@@anchor\@gobble -\gdef\hyper@link##1##2##3{##3}% -\def\hyper@linkurl##1##2{##1}% -\def\hyper@linkfile##1##2##3{##1}% -\let\hyper@anchorstart\@gobble -\let\hyper@anchorend\@empty -\let\hyper@linkstart\@gobbletwo -\let\hyper@linkend\@empty -\end{verbatim} - -\section{Special support for other packages} - -Package \xpackage{hyperref} aims to cooperate with other packages, but there are -several possible sources for conflict, such as - -\begin{itemize} - -\item Packages that manipulate the bibliographic mechanism. Peter -William's \xpackage{harvard} package is supported. However, the -recommended package is Patrick Daly's \xpackage{natbib} package that has -specific \xpackage{hyperref} hooks to allow reliable interaction. This -package covers a very wide variety of layouts and citation styles, all -of which work with \xpackage{hyperref}. - -\item Packages that typeset the contents of the \ci{label} and \ci{ref} -macros, such as \xpackage{showkeys}. Since the \xpackage{hyperref} package -redefines these commands, you must set \texttt{implicit=false} for these -packages to work. - -\item Packages that do anything serious with the index. -\end{itemize} - -The \xpackage{hyperref} package is distributed with variants on two useful -packages designed to work especially well with it. These are \xpackage{xr} -and \xpackage{minitoc}, which support crossdocument links using \hologo{LaTeX}'s -normal \cs{label}/\cs{ref} mechanisms and per-chapter tables of contents, -respectively. - - -\subsection{Package Compatibility} - -Currently only package loading orders are available: - - - -Note: hyperref loads package \xpackage{nameref} at \verb|\begin{document}|. -Sometimes this is too late, thus this package must be loaded -earlier. - - -\subsubsection{algorithm} -\begin{verbatim} - \usepackage{float} - \usepackage{hyperref} - \usepackage[chapter]{algorithm}% eg. -\end{verbatim} - -\subsubsection{amsmath} - - 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 gather: - -\begin{verbatim} - \usepackage{amsmath} - \let\equation\gather - \let\endequation\endgather -\end{verbatim} - -\subsubsection{amsrefs} - - Package loading order: - -\begin{verbatim} - \usepackage{hyperref} - \usepackage{amsrefs} -\end{verbatim} - -\subsubsection{arydshln, longtable} - - Package longtable must be put before hyperref and arydshln, - hyperref after arydshln generates an error, thus the - resulting package order is then: - -\begin{verbatim} - \usepackage{longtable} - \usepacakge{hyperref} - \usepackage{arydshln} -\end{verbatim} - -\subsubsection{babel/magyar.ldf} - - The old version 2005/03/30 v1.4j will not work. - You need at least version 1.5, maintained by P\'eter Szab\'o, - see CTAN:language/hungarian/babel/. - - -\subsubsection{babel/spanish.ldf} - - Babel's spanish.ldf redefines `\verb|\.|' to support `\verb|\...|'. - In bookmarks (\verb|\pdfstringdef|) only `\verb|\.|' is supported. - If `\verb|\...|' is needed, - \verb|\texorpdfstring{\...}{\dots}| - can be used instead. - - -\subsubsection{bibentry} - - Workaround: - -\begin{verbatim} - \makeatletter - \let\saved@bibitem\@bibitem - \makeatother - - \usepackage{bibentry} - \usepackage{hyperref} - - \begin{document} - - \begingroup - \makeatletter - \let\@bibitem\saved@bibitem - \nobibliography{database} - \endgroup -\end{verbatim} - -\subsubsection{bigfoot} - - Hyperref does not support package `bigfoot'. And package - `bigfoot' does not support hyperref's footnotes and disables - them (hyperfootnotes=false). - - -\subsubsection{chappg} - - Package `chappg' uses \verb|\@addtoreset| that is redefined by `hyperref'. - The package order is therefore: - -\begin{verbatim} - \usepackage{hyperref} - \usepackage{chappg} -\end{verbatim} - -\subsubsection{cite} - - This is from Mike Shell: - cite.sty cannot currently be used with hyperref. - However, I can do a workaround via: - -\begin{verbatim} - \makeatletter - \def\NAT@parse{\typeout{This is a fake Natbib command to fool Hyperref.}} - \makeatother - - \usepackage[hypertex]{hyperref} -\end{verbatim} - - 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). - - -\subsubsection{count1to} - - Package `count1to' adds several \verb|\@addtoreset| commands that confuse - `hyperref'. Therefore \verb|\theH<...>| has to be fixed: - -\begin{verbatim} - \usepackage{count1to} - \AtBeginDocument{% *after* \usepackage{count1to} - \renewcommand*{\theHsection}{\theHchapter.\arabic{section}}% - \renewcommand*{\theHsubsection}{\theHsection.\arabic{subsection}}% - \renewcommand*{\theHsubsubsection}{\theHsubsection.\arabic{subsubsection}}% - \renewcommand*{\theHparagraph}{\theHsubsubsection.\arabic{paragraph}}% - \renewcommand*{\theHsubparagraph}{\theHparagraph.\arabic{subparagraph}}% - } -\end{verbatim} - -\subsubsection{dblaccnt} - - pd1enc.def or puenc.def should be loaded before: -\begin{verbatim} - \usepackage{hyperref} - \usepackage{dblaccnt} -\end{verbatim} - or see entry for \xoption{vietnam}. - - -\subsubsection{easyeqn} - Not compatible, breaks. - - -\subsubsection{ellipsis} - - This packages redefines \verb|\textellipsis| - after package hyperref (pd1enc.def/puenc.def should be loaded before): -\begin{verbatim} - \usepackage{hyperref} - \usepackage{ellipsis} -\end{verbatim} - -\subsubsection{float} -\begin{verbatim} - \usepackage{float} - \usepackage{hyperref} -\end{verbatim} -\begin{itemize} - \item Several \verb|\caption| commands are not supported inside one float object. - \item Anchor are set at top of the float object, if its style is controlled - by float.sty. -\end{itemize} - -\subsubsection{endnotes} - Unsupported. - -\subsubsection{foiltex} - Update to version 2008/01/28 v2.1.4b: - Since version 6.77a 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 - 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 - support by using option \verb"hyperfootnotes=false". - - -\subsubsection{geometry} - - 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 \verb|\special| of geometry to an earlier - location: - -\begin{verbatim} - \documentclass[dvipdfm]{article}% or other classes - \usepackage{atbegshi} - \AtBeginDocument{% - \let\OrgAtBeginDvi\AtBeginDvi - \let\AtBeginDvi\AtBeginShipoutFirst - } - \usepackage[ - paperwidth=170mm, - paperheight=240mm - ]{geometry} - \AtBeginDocument{% - \let\AtBeginDvi\OrgAtBeginDvi - } - \usepackage{hyperref} - - or - - \documentclass[dvipdfm]{article}% or other classes - \usepackage{atbegshi} - \let\AtBeginDvi\AtBeginShipoutFirst - \usepackage[ - paperwidth=170mm, - paperheight=240mm - ]{geometry} - \usepackage{hyperref} -\end{verbatim} - -\subsubsection{IEEEtran.cls} - - version $\ge$ V1.6b (because of \verb|\@makecaption|, see ChangeLog) - - -\subsubsection{index} - - version $\ge$ 1995/09/28 v4.1 (because of \verb|\addcontentsline| redefinition) - - -\subsubsection{lastpage} - - Compatible. - - -\subsubsection{linguex} -\begin{verbatim} - \usepackage{hyperref} - \usepackage{linguex} -\end{verbatim} - -\subsubsection{ltabptch} -\begin{verbatim} - \usepackage{longtable} - \usepackage{ltabptch} - \usepackage{hyperref} -\end{verbatim} - -\subsubsection{mathenv} - - Unsupported. - - - - 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, - for example. - - -\subsubsection{minitoc-hyper} - - This package is obsolete, use the uptodate original - package minitoc instead. - - -\subsubsection{multind} -\begin{verbatim} - \usepackage{multind} - \usepackage{hyperref} -\end{verbatim} - -\subsubsection{natbib} -\begin{verbatim} - \usepackage{natbib} - \usepackage{hyperref} -\end{verbatim} - -\subsubsection{nomencl} -Example for introducing links for the page numbers: -\begin{verbatim} - \renewcommand*{\pagedeclaration}[1]{\unskip, \hyperpage{#1}} -\end{verbatim} - - -For equations the following might work: -\begin{verbatim} - \renewcommand*{\eqdeclaration}[1]{% - \hyperlink{equation.#1}{(Equation~#1)}% - } - But the mapping from the equation number to the anchor name - is not available in general. -\end{verbatim} - -\subsubsection{parskip} -\begin{verbatim} - \usepackage{parskip} - \usepackage{hyperref}[2012/08/20] -\end{verbatim} - - - Both packages want to redefine \verb|\@starttoc|. - - -\subsubsection{prettyref} -\begin{verbatim} -%%% example for prettyref %%% -\documentclass{article} -\usepackage{prettyref} -\usepackage[pdftex]{hyperref} - -%\newrefformat{FIG}{Figure~\ref{#1}}% without hyperref -\newrefformat{FIG}{\hyperref[{#1}]{Figure~\ref*{#1}}} - -\begin{document} - This is a reference to \prettyref{FIG:ONE}. - \newpage - \begin{figure} - \caption{This is my figure} - \label{FIG:ONE} - \end{figure} -\end{document} -%%% example for prettyref %%% - \end{verbatim} - -\subsubsection{ntheorem} -\begin{verbatim} - ntheorem-hyper.sty is an old patched version of ntheorem.sty. - Newer versions of ntheorem know the option hyperref: - \usepackage{hyperref} - \usepackage[hyperref]{ntheorem} - But there are still unsolved problems (options thref, ...). -\end{verbatim} - -\subsubsection{setspace} -\begin{verbatim} - \usepackage{setspace} - \usepackage{hyperref} -\end{verbatim} - -\subsubsection{sidecap} -\begin{verbatim} - Before 2002/05/24 v1.5h: - \usepackage{nameref} - \usepackage{hyperref} - \usepackage{sidecap} -\end{verbatim} - -\subsubsection{subfigure} -\begin{verbatim} - 1995/03/06 v2.0: - \usepackage{subfigure} - \usepackage{hyperref} - % hypertexnames is set to false. - v2.1: - \usepackage{nameref} - \usepackage{subfigure} - \usepackage{hyperref} - or - \usepackage{hyperref} - \usepackage{subfigure} - v2.1.2: - please update - v2.1.3: - \usepackage{hyperref} - \usepackage{subfigure} - or vice versa? -\end{verbatim} - -\subsubsection{titleref} -\begin{verbatim} - \usepackage{nameref} - \usepackage{titleref}% without usetoc - \usepackage{hyperref} -\end{verbatim} - -\subsubsection{tabularx} - - Linked footnotes are not supported inside environment `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'. - - -\subsubsection{titlesec} - - \xpackage{nameref} supports titlesec, but hyperref does not - (unsolved is the anchor setting, missing with unnumbered - section, perhaps problems with page breaks with numbered ones). - - -\subsubsection{ucs/utf8x.def} - - 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 \xpackage{ucs} offers \verb|\PrerenderUnicode| or \verb|\PreloadUnicodePage| - to solve this: -\begin{verbatim} - \usepackage{ucs} - \usepackage[utf8x]{inputenc} - \usepackage{hyperref}% or with option unicode - \PrerenderUnicode{^^c3^^b6}% or \PrerenderUnicodePage{1} - \hypersetup{pdftitle={Umlaut example: ^^c3^^b6}} -\end{verbatim} - The notation with two carets avoids trouble with 8-bit bytes - for the README file, you can use the characters directly. - - -\subsubsection{varioref} - 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 order: -\begin{verbatim} - \usepackage{nameref} - \usepackage{varioref} - \usepackage{hyperref} -\end{verbatim} - - - 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: -\begin{itemize} -\item \verb|\Ref|, \verb|\Vref| do not uppercase the first letter. -\item \verb|\vpageref[]{...}| - On the same page a previous space is not suppressed. -\end{itemize} - -\subsubsection{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): - -\begin{verbatim} - \documentclass{article} - - % package order does not matter - \usepackage{verse} - \usepackage{hyperref} - - \makeatletter - % make unique poemline anchors - \newcounter{verse@env} - \setcounter{verse@env}{0} - \let\org@verse\verse - \def\verse{% - \stepcounter{verse@env}% - \org@verse - } - \def\theHpoemline{\arabic{verse@env}.\thepoemline} - - % add anchor for before \addcontentsline in \@vsptitle - \let\org@vsptitle\@vsptitle - \def\@vsptitle{% - \phantomsection - \org@vsptitle - } - \makeatother - - \begin{document} - - \poemtitle{Poem 1} - \begin{verse} - An one-liner. - \end{verse} - - \newpage - - \poemtitle{Poem 2} - \begin{verse} - Another one-liner. - \end{verse} - - \end{document} -\end{verbatim} - -\subsubsection{vietnam} -\begin{verbatim} - % pd1enc.def should be loaded before package dblaccnt: - \usepackage[PD1,OT1]{fontenc} - \usepackage{vietnam} - \usepackage{hyperref} -\end{verbatim} - -\subsubsection{XeTeX} - - Default for the encoding of bookmarks is \verb|pdfencoding=unicode|. - That means the strings are always treated as unicode strings. - If \verb|auto| or \verb|pdfdoc| is forced it applies only - 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 - UTF-16BE back to UTF-8 in a number of places for - xetex to avoid the xdvipdfmx warning - - \verb"Failed to convert input string to UTF16..." - - This is no longer needed with a current xdvipdfmx, so this code has - been removed. \verb|\csname HyPsd@XeTeXBigCharstrue\endcsname| should no - longer be used. - - -\section[Limitations]{Limitations% -\footnote{This section moved from the README file, needs more integration into the manual}} -\subsection{Wrapped/broken link support} - - Only few drivers support automatically wrapped/broken links, - e.g. pdftex, dvipdfm, hypertex. Other drivers lack this - feature, e.g. dvips, dvipsone. - - Workarounds: -\begin{itemize} -\item For long section or caption titles in the table of contents - or list of figures/tables option \xoption{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 \verb|\hbox| - warning. -\item ``\verb|\url|''s are caught by package \xpackage{breakurl}. -\item The option \xoption{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 points, especially within - \verb|\url|. (See thread ``hyperref.sty, breaklinks and url.sty 3.2'' - in comp.text.tex 2005-09). -\end{itemize} - -\subsection{Links across pages} - - In general they have problems: -\begin{itemize} - \item Some driver doesn't support them at all (see above). - \item The driver allows it, but the link result might include - the footer and/or header, or an error message can - occur sometimes. -\end{itemize} - -\subsection{Footnotes} - - LaTeX allows the separation of the footnote mark and the - footnote text (\verb|\footnotemark|, \verb|\footnotetext|). This interface - might be enough for visual typesetting. But the relation between - \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 - argument of \verb|\footnotemark| and \verb|\footnotetext|. - - -\section[Hints]{Hints% -\footnote{This section moved from the README file, needs more integration into the manual}} - -\subsection{Spaces in option values} - - Unhappily LaTeX strips spaces from options if they are given - in \verb|\documentclass| or \verb|\usepackage| (or \verb|\RequirePackage|), e.g.: -\begin{verbatim} - \usepackage[pdfborder=0 0 1]{hyperref} -\end{verbatim} - Package hyperref now gets -\begin{verbatim} - pdfborder=001 -\end{verbatim} - and the result is an invalid PDF file. - As workaround braces can be used: -\begin{verbatim} - \usepackage[pdfborder={0 0 1}]{hyperref} -\end{verbatim} - Some options can also be given in \verb|\hypersetup| -\begin{verbatim} - \hypersetup{pdfborder=0 0 1} -\end{verbatim} - In \verb|\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 packages \xpackage{kvoptions-patch} - (from project \xpackage{kvoptions}) or \xpackage{xkvltxp} (from project \xpackage{xsetkeys}). - - -\subsection{Index with makeindex} -\begin{itemize} - \item Package 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 - 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|, ...), - then the page anchors are not unique. Therefore option - \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 - \verb|\hyperpage| command. With logical markup this situation - can easily be solved: -\begin{verbatim} - \usepackage{makeidx} - \makeindex - \usepackage[hyperindex]{hyperref} - \newcommand*{\main}[1]{\textbf{\hyperpage{#1}}} - ... - \index{Some example|main} -\end{verbatim} - \item Scientic Word/Scientific WorkPlace users can use - package robustindex with hyperindex=false. - \item Other encap characters can be set by option \xoption{encap}. - Example for use of ``?'': -\begin{verbatim} - \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 - insertion will be disabled by \verb"hyperindex=false". - \verb|\hyperpage| will be defined regardless of setting of hyperindex. -\begin{verbatim} -%%% cut %%% hyperindex.ist %%% cut %%% -delim_0 ", \\hyperpage{" -delim_1 ", \\hyperpage{" -delim_2 ", \\hyperpage{" -delim_n "}, \\hyperpage{" -delim_t "}" -encap_prefix "}\\" -encap_infix "{\\hyperpage{" -encap_suffix "}" -%%% cut %%% hyperindex.ist %%% cut %%% -\end{verbatim} -\end{itemize} - -\subsection{Warning \texttt{"bookmark level for unknown defaults to 0"}} - - Getting rid of it: -\begin{verbatim} -\makeatletter -\providecommand*{\toclevel@}{0} -\makeatother -\end{verbatim} - -\subsection{Link anchors in figures} - - 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 \xpackage{hypcap} that implements - a method to circumvent the problem. - - -\subsection{Additional unicode characters in bookmarks and pdf information entries:} -\begin{verbatim} -\documentclass[pdftex]{article} -\usepackage[unicode]{hyperref} -\end{verbatim} - -Support for additional unicode characters: - - Example: \verb|\.{a}| and \verb|\d{a}| - - 1. Get a list with unicode data, eg: - - http://www.unicode.org/Public/UNIDATA/UnicodeData.txt - - 2. Identify the characters (\verb|\.{a}|, \verb|\d{a}|): -\begin{verbatim} - 0227;LATIN SMALL LETTER A WITH DOT ABOVE;... - 1EA1;LATIN SMALL LETTER A WITH DOT BELOW;... -\end{verbatim} - - 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.) - -\begin{verbatim} - 0227 -> \002\047 - 1EA1 -> \036\241 -\end{verbatim} - - 4. Transform into a form understood by hyperref: - - Hyperref must know where the first byte starts, - this is marked by \verb"9" (8 and 9 cannot occur in - octal numbers): - -\begin{verbatim} - \002\047 -> \9002\047 - \036\241 -> \9036\241 -\end{verbatim} - - Optional: \verb"8" is used for abbreviations: - -\begin{verbatim} - \900 = \80, \901 = \81, \902 = \82, ... - - \9002\047 -> \82\047 -\end{verbatim} - - 5. Declare the character with LaTeX: - -\begin{verbatim} -\DeclareTextCompositeCommand{\.}{PU}{a}{\82\047} -\DeclareTextCompositeCommand{\d}{PU}{a}{\9036\241} - -\begin{document} -\section{\={a}, \d{a}, \'{a}, \.{a}} -\end{document} - \end{verbatim} - -\subsection{Footnotes} - - 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 - support by \verb"hyperfootnotes=false" or fiddle with internal macros, - nasty examples: - -\begin{verbatim} -\documentclass{article} -\usepackage{hyperref} -\begin{document} -Hello% -\footnote{The first footnote} -World% -\addtocounter{footnote}{-1}% -\addtocounter{Hfootnote}{-1}% -\footnotemark. -\end{document} - - or - -\documentclass{article} - -\usepackage{hyperref} - -\begin{document} - -\makeatletter - -A% - \footnotemark - \let\saved@Href@A\Hy@footnote@currentHref - % remember link name -B% - \footnotemark - \let\saved@Href@B\Hy@footnote@currentHref -b% - \addtocounter{footnote}{-1}% - \addtocounter{Hfootnote}{-1}% generate the same anchor - \footnotemark -C% - \footnotemark - \let\saved@Href@C\Hy@footnote@currentHref - - \addtocounter{footnote}{-2}% - \let\Hy@footnote@currentHref\saved@Href@A -\footnotetext{AAAA}% - \addtocounter{footnote}{1}% - \let\Hy@footnote@currentHref\saved@Href@B -\footnotetext{BBBBB}% - \addtocounter{footnote}{1}% - \let\Hy@footnote@currentHref\saved@Href@C -\footnotetext{CCCC}% - -\end{document} -\end{verbatim} - -\subsection{Subordinate counters} - - 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 \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. - - - - 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 - macro \verb|\theH| can be redefined accordingly. Or move the - definition of subordinate counters after hyperref is loaded. - - Example for \verb|\newtheorem|, problematic case: -\begin{verbatim} - \newtheorem{corA}{CorollaryA}[section] - \usepackage{hyperref} -\end{verbatim} - Solution a) -\begin{verbatim} - \usepackage{hyperref} - \newtheorem{corA}{CorollaryA}[section} -\end{verbatim} - Solution b) -\begin{verbatim} - \newtheorem{corA}{CorollaryA}[section] - \usepackage{hyperref} - \newcommand*{\theHcorA}{\theHsection.\number\value{corA}} -\end{verbatim} - -\section{History and acknowledgments} - -The original authors of \textsf{hyperbasics.tex} and -\textsf{hypertex.sty}, from which this package descends, are Tanmoy -Bhattacharya and Thorsten Ohl. Package \xpackage{hyperref} -started as a simple port of their work to \hologo{LaTeXe} standards, but -eventually I rewrote nearly everything, because I didn't understand a -lot of the original, and was only interested in getting it to work with -\hologo{LaTeX}. I would like to thank Arthur Smith, Tanmoy Bhattacharya, Mark -Doyle, Paul Ginsparg, David Carlisle, T.\ V.\ Raman and Leslie Lamport -for comments, requests, thoughts and code to get the package into its -first useable state. Various other people are mentioned at the point in -the source where I had to change the code in later versions because of -problems they found. - -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 -Rev\TeX\ 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 -\textsf{dvipsone} and \textsf{dviwindo} drivers. Sergey Lesenko provided -the changes needed for \textsf{dvipdf}, and \Hanh{} supplied all the -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 -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 ideas; Thomas Merz, whose book \emph{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 \textsf{pdftex}. - -Steve Peter recreated the manual source in July 2003 after it had been -lost. - -Especial extra thanks to David Carlisle for the \xpackage{backref} module, -the ps2pdf and dviwindo support, frequent general rewrites of my bad -code, and for working on changes to the \xpackage{xr} package to suit -\xpackage{hyperref}. - -\begingroup - \makeatletter - \let\chapter=\section - % subsections goes into bookmarks but not toc - \hypersetup{bookmarksopenlevel=1} - \addtocontents{toc}{\protect\setcounter{tocdepth}{1}} - % The \section command acts as \subsection. - % Additionally the title is converted to lowercase except - % for the first letter. - \def\section{% - \let\section\lc@subsection - \lc@subsection - } - \def\lc@subsection{% - \@ifstar{\def\mystar{*}\lc@sec}% - {\let\mystar\@empty\lc@sec}% - } - \def\lc@sec#1{% - \lc@@sec#1\@nil - } - \def\lc@@sec#1#2\@nil{% - \begingroup - \def\a{#1}% - \lowercase{% - \edef\x{\endgroup - \noexpand\subsection\mystar{\a#2}% - }% - }% - \x - } - \include{fdl} -\endgroup - -\end{document} diff --git a/macros/latex/contrib/hyperref/doc/manual2.html b/macros/latex/contrib/hyperref/doc/manual2.html deleted file mode 100644 index 71af561e04..0000000000 --- a/macros/latex/contrib/hyperref/doc/manual2.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - -

- - diff --git a/macros/latex/contrib/hyperref/doc/manual3.html b/macros/latex/contrib/hyperref/doc/manual3.html deleted file mode 100644 index 00062b22f0..0000000000 --- a/macros/latex/contrib/hyperref/doc/manual3.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - -
-

2This is borrowed from an article by Arthur Smith.

- - diff --git a/macros/latex/contrib/hyperref/doc/manual4.html b/macros/latex/contrib/hyperref/doc/manual4.html deleted file mode 100644 index 70dae2e346..0000000000 --- a/macros/latex/contrib/hyperref/doc/manual4.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - -
-

3Make sure you turn off the partial font downloading supported by dvips and dvipsone in favor of Distiller’s own - system.

- - diff --git a/macros/latex/contrib/hyperref/doc/manual5.html b/macros/latex/contrib/hyperref/doc/manual5.html deleted file mode 100644 index 01434811f6..0000000000 --- a/macros/latex/contrib/hyperref/doc/manual5.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - -
- 4This section moved from the README file, needs more integration into the manual
- - diff --git a/macros/latex/contrib/hyperref/doc/manual6.html b/macros/latex/contrib/hyperref/doc/manual6.html deleted file mode 100644 index eba4717509..0000000000 --- a/macros/latex/contrib/hyperref/doc/manual6.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - -
- 5This section moved from the README file, needs more integration into the manual
- - diff --git a/macros/latex/contrib/hyperref/doc/manual7.html b/macros/latex/contrib/hyperref/doc/manual7.html deleted file mode 100644 index 17b42e0aef..0000000000 --- a/macros/latex/contrib/hyperref/doc/manual7.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - -
- 6This section moved from the README file, needs more integration into the manual
- - diff --git a/macros/latex/contrib/hyperref/doc/nameref.pdf b/macros/latex/contrib/hyperref/doc/nameref.pdf index 86eea30ba5..73a288882e 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/fdl.tex b/macros/latex/contrib/hyperref/fdl.tex deleted file mode 100644 index 57f9b31621..0000000000 --- a/macros/latex/contrib/hyperref/fdl.tex +++ /dev/null @@ -1,422 +0,0 @@ -% This file is a chapter. It must be included in a larger document to work -% properly. - -\chapter{GNU Free Documentation License} - -Version 1.2, November 2002 - - - Copyright \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. - - -\section*{PREAMBLE} - -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 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 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. - - -\section{APPLICABILITY AND DEFINITIONS} -\label{applicability} - -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 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 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 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 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 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 -for automatic translation to a variety of formats suitable for input -to text formatters. A copy made in an otherwise Transparent file -format whose markup, or absence of markup, has been arranged to thwart -or 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 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 proprietary formats that can be read and edited only by -proprietary word processors, SGML 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 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 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 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. - - -\section{VERBATIM COPYING} -\label{verbatim} - -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 copies you make or distribute. However, you may accept -compensation in exchange for copies. If you distribute a large enough -number of copies you must also follow the conditions in -section~\ref{copying}. - -You may also lend copies, under the same conditions stated above, and -you may publicly display copies. - - -\section{COPYING IN QUANTITY} -\label{copying} - -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 identify -you as the publisher of these copies. The front cover must present -the full title with all words of the title equally prominent and -visible. You may add other material on the covers in 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 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 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 of added material. -If you use the latter option, you must take reasonably prudent steps, -when you begin distribution of Opaque copies in quantity, to ensure -that this Transparent copy will 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 redistributing any large number of copies, to give -them a chance to provide you with an updated version of the Document. - - -\section{MODIFICATIONS} -\label{modifications} - -You may copy and distribute a Modified Version of the Document under -the conditions of sections~\ref{verbatim} and \ref{copying} 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: - -\renewcommand{\labelenumi}{\Alph{enumi}.} -\begin{enumerate} -\item 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. -\item 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. -\item State on the Title page the name of the publisher of the - Modified Version, as the publisher. -\item Preserve all the copyright notices of the Document. -\item Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. -\item 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. -\item Preserve in that license notice the full lists of Invariant Sections - and required Cover Texts given in the Document's license notice. -\item Include an unaltered copy of this License. -\item 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 describing the Modified - Version as stated in the previous sentence. -\item 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 Document itself, or if the original - publisher of the version it refers to gives permission. -\item 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. -\item 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. -\item Delete any section Entitled ``Endorsements''. Such a section - may not be included in the Modified Version. -\item Do not retitle any existing section to be Entitled ``Endorsements'' - or to conflict in title with any Invariant Section. -\item Preserve any Warranty Disclaimers. - -\end{enumerate} - -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 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 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 names for publicity for or to assert or -imply endorsement of any Modified Version. - - -\section{COMBINING DOCUMENTS} -\label{combining} - -You may combine the Document with other documents released under this -License, under the terms defined in section~\ref{modifications} -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 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 documents, forming one section Entitled -``History''; likewise combine any sections Entitled ``Acknowledgements'', -and any sections Entitled ``Dedications''. You must delete all sections -Entitled ``Endorsements''. - - -\section{COLLECTIONS OF DOCUMENTS} -\label{collections} - -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 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. - - -\section{AGGREGATION WITH INDEPENDENT WORKS} -\label{aggregation} - -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~\ref{copying} 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. - - -\section{TRANSLATION} -\label{translation} - -Translation is considered a kind of modification, so you may -distribute translations of the Document under the terms of -section~\ref{modifications}. -Replacing Invariant Sections with translations requires special -permission from their copyright holders, but you may include -translations of some or all Invariant Sections in addition to the -original versions of these Invariant Sections. You may include a -translation of this License, and all the license notices in the -Document, and any Warranty Disclaimers, provided that you also include -the original English version of this License and the original 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 requirement -(section~\ref{modifications}) to Preserve -its Title (section~\ref{applicability}) will typically require -changing the actual title. - - -\section{TERMINATION} -\label{termination} - -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. - - -\section{FUTURE REVISIONS OF THIS LICENSE} -\label{future} - -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 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. - - -\section*{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 put the following copyright and -license notices just after the title page: - -\begin{quote} - 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''. -\end{quote} - -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 Back-Cover Texts being LIST. - -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 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/hluatex.dtx b/macros/latex/contrib/hyperref/hluatex.dtx index b70a38a86a..91f9abc006 100644 --- a/macros/latex/contrib/hyperref/hluatex.dtx +++ b/macros/latex/contrib/hyperref/hluatex.dtx @@ -1,10 +1,10 @@ % \iffalse % Source File: hluatex.dtx -% 2021-02-04 v7.00g +% 2021-02-07 v7.00h % % Copyright % 2016-2019 Oberdiek Package Support Group -% 2019-2020 The LaTeX3 Project +% 2019-2020 The LaTeX Project % https://github.com/latex3/hyperref/issues%% % % Derived from hpdftex.def @@ -19,7 +19,7 @@ \GetFileInfo{hluatex.def}% \title{hluatex.def} \date{}% - \author{Maintained by The \LaTeX3 Project\\% + \author{Maintained by The \LaTeX\ Project\\% \texttt{https://github.com/latex3/hyperref/issues}% } \maketitle @@ -31,7 +31,7 @@ % % \begin{macrocode} %<*luatex> -%% 2021-02-04 v7.00g +%% 2021-02-07 v7.00h %% force unicode encoding, see issue #101 %% code mostly copied from hxetex.def \HyPsd@LoadUnicode diff --git a/macros/latex/contrib/hyperref/hyperref.dtx b/macros/latex/contrib/hyperref/hyperref.dtx index 3e84e320ab..5ab411463a 100644 --- a/macros/latex/contrib/hyperref/hyperref.dtx +++ b/macros/latex/contrib/hyperref/hyperref.dtx @@ -4,7 +4,7 @@ %% 1995-2001 Sebastian Rahtz, with portions written by David Carlisle and Heiko Oberdiek, %% 2001-2015 Heiko Oberdiek. %% 2016-2019 Oberdiek Package Support Group -%% 2019-2021 LaTeX3 Project +%% 2019-2021 LaTeX Project %% https://github.com/latex3/hyperref/issues %% %% This file is part of the `Hyperref Bundle'. @@ -20,7 +20,7 @@ %% %% This work has the LPPL maintenance status `maintained'. %% -%% The Current Maintainer of this work is the LaTeX3 Project. +%% The Current Maintainer of this work is the LaTeX Project. %% %% The list of all files belonging to the `Hyperref Bundle' is %% given in the file `manifest.txt'. @@ -51,7 +51,7 @@ %\ProvidesFile{puarenc.def} %\ProvidesFile{psdextra.def} %\ProvidesFile{hyperref-langpatches.def} -% [2021-02-04 v7.00g % +% [2021-02-07 v7.00h % % Hypertext links for LaTeX] % Dummy hyperref (SR)] % Hyperref documentation driver file] @@ -124,7 +124,7 @@ \title{Hypertext marks in \LaTeX}% \author{Sebastian Rahtz (deceased)\\% Heiko Oberdiek (inactive)\\% - The \LaTeX3 Project\\% + The \LaTeX\ Project\\% \texttt{https://github.com/latex3/hyperref/issues}}% % \date{processed \today}% \date{\filedate\space\fileversion}% @@ -20966,7 +20966,9 @@ \DeclareTextCommand{\v}{PU}[1]{#1\83\014}% U+030C % U+030F COMBINING DOUBLE GRAVE ACCENT; dblgravecmb \DeclareTextCommand{\G}{PU}[1]{#1\83\017}% U+030F +\ifx\CYRDZE\@undefined \else \DeclareTextCommand{\C}{PU}[1]{#1\83\017}% U+030F +\fi % U+0311 COMBINING INVERTED BREVE; breveinvertedcmb \DeclareTextCommand{\textinvbreve}{PU}[1]{#1\83\021}% U+0311 \DeclareTextCommand{\newtie}{PU}[1]{#1\83\021}% U+0311 @@ -22305,8 +22307,9 @@ % \end{macrocode} % % \subsubsection{Greek and Coptic: U+0370 to U+03FF} -% +% Greek is only loaded if \cs{textBeta} is defined. % \begin{macrocode} +\ifx\textBeta\@undefined \else % U+0374 GREEK NUMERAL SIGN; numeralsigngreek \DeclareTextCommand{\textnumeralsigngreek}{PU}{\83\164}% U+0374 \DeclareTextCommand{\textdexiakeraia}{PU}{\83\164}% U+0374 @@ -22488,13 +22491,16 @@ % U+03F6 GREEK REVERSED LUNATE EPSILON SYMBOL; % \backepsilon (AmS) \DeclareTextCommand{\textbackepsilon}{PU}{\83\366}% U+03F6 +\fi % \end{macrocode} % % \subsubsection{Cyrillic: U+0400 to U+04FF} % % Thanks to Vladimir Volovich (\Email{vvv@vvv.vsu.ru}) for % the help with the Cyrillic glyph names. +% Cyrillic only loaded if \cs{CYRDZE} is defined. % \begin{macrocode} +\ifx\CYRDZE\@undefined \else % U+0400 CYRILLIC CAPITAL LETTER IE WITH GRAVE \DeclareTextCompositeCommand{\`}{PU}{\CYRE}{\84\000}% U+0400 % U+0401 CYRILLIC CAPITAL LETTER IO; Iocyrillic, *afii10023 @@ -23030,6 +23036,7 @@ \DeclareTextCommand{\CYRHHK}{PU}{\84\374}% U+04FC % U+04FD CYRILLIC SMALL LETTER HA WITH HOOK \DeclareTextCommand{\cyrhhk}{PU}{\84\375}% U+04FD +\fi % \end{macrocode} % |\84\376|: U+04FE CYRILLIC CAPITAL LETTER HA WITH STROKE\\ % |\84\377|: U+04FF CYRILLIC SMALL LETTER HA WITH STROKE @@ -23037,7 +23044,9 @@ % \subsubsection{Hebrew: U+0590 to U+05FF} % % Macro names are taken from \texttt{he8enc.def}. +% hebrew is only loaded if \cs{hebdalet} is defined % \begin{macrocode} +\ifx\hebdalet\@undefined\else % U+05C3 HEBREW PUNCTUATION SOF PASUQ \DeclareTextCommand{\sofpasuq}{PU}{\85\303}% U+05C3 % U+05D0 HEBREW LETTER ALEF @@ -23101,6 +23110,7 @@ \DeclareTextCommand{\vavyod}{PU}{\85\361}% U+05F1 % U+05F2 HEBREW LIGATURE YIDDISH DOUBLE YOD \DeclareTextCommand{\doubleyod}{PU}{\85\362}% U+05F2 +\fi % \end{macrocode} % % \subsubsection{Thai: U+0E00 to U+0E7F} diff --git a/macros/latex/contrib/hyperref/hyperref.ins b/macros/latex/contrib/hyperref/hyperref.ins index d8cc5275b1..43b531fba5 100644 --- a/macros/latex/contrib/hyperref/hyperref.ins +++ b/macros/latex/contrib/hyperref/hyperref.ins @@ -7,7 +7,7 @@ %% 1995-2001 Sebastian Rahtz, with portions written by David Carlisle and Heiko Oberdiek %% 2001-2015 Heiko Oberdiek %% 2016-2019 Oberdiek Package Support Group -%% 2019-2021 LaTeX3 Project +%% 2019-2021 LaTeX Project %% https://github.com/latex3/hyperref/issues %% %% This file is part of the `Hyperref Bundle'. diff --git a/macros/latex/contrib/hyperref/manifest.txt b/macros/latex/contrib/hyperref/manifest.txt index 818a27d6a9..3998d8c1d3 100644 --- a/macros/latex/contrib/hyperref/manifest.txt +++ b/macros/latex/contrib/hyperref/manifest.txt @@ -3,6 +3,8 @@ hyperref.dtx Main package with various drivers. +hluatex.dtx + luatex back end for hyperref. backref.dtx Bibliographical back referencing. nameref.dtx @@ -15,9 +17,9 @@ hyperref.ins Docstrip batch file. minitoc-hyper.sty - Patched version of `minitoc.sty' to work with `hyperref.sty'. + Obsolete, now just calls minitoc. ntheorem-hyper.sty - Patched version of `ntheorem.sty' to work with `hyperref.sty'. + Obsolete, now just calls ntheorem. xr-hyper.sty Patched version of `xr.sty' to work with `hyperref.sty'. @@ -54,6 +56,7 @@ htexture.def hdvipson.def hdvips.def hpdftex.def +hluatex.def hdviwind.def htex4ht.def hvtex.def @@ -71,10 +74,9 @@ psdextra.def % Directory doc/ % ============= -manual.pdf - Manual, but a little out of date. -manual.html, manual[2-6].html, manual.css, -cmsy10-21.gif, cmmi10-22.gif +hyperref-doc.pdf + Hyperref manual +hyperref-doc.html, hyperref-doc[2-7].html, hyperref-doc.css, HTML version of the manual. paper.pdf Online version of paper for Heiko Oberdiek's talk diff --git a/macros/latex/contrib/hyperref/minitoc-hyper.sty b/macros/latex/contrib/hyperref/minitoc-hyper.sty index 4e2e66fa05..9efb3a3ebd 100644 --- a/macros/latex/contrib/hyperref/minitoc-hyper.sty +++ b/macros/latex/contrib/hyperref/minitoc-hyper.sty @@ -1,4 +1,4 @@ -% Copyright 2020 LaTeX3 Project +% Copyright 2020 The LaTeX Project % Licence LPPL: https://www.latex-project.org/lppl/lppl-1-3c.txt \ProvidesPackage{minitoc-hyper}[2020/01/14] \PackageWarningNoLine{minitoc-hyper}{% diff --git a/macros/latex/contrib/hyperref/nameref.dtx b/macros/latex/contrib/hyperref/nameref.dtx index ec02e2eceb..adc41b8fdc 100644 --- a/macros/latex/contrib/hyperref/nameref.dtx +++ b/macros/latex/contrib/hyperref/nameref.dtx @@ -4,7 +4,7 @@ %% 2000 Sebastian Rahtz, Heiko Oberdiek %% 2001-2012 Heiko Oberdiek %% 2016-2019 Oberdiek Package Suport Group -%% 2019-2021 The LaTeX3 Project +%% 2019-2021 The LaTeX Project %% https://github.com/latex3/hyperref/issues %% %% This file is part of the `Hyperref Bundle'. @@ -20,7 +20,7 @@ %% %% This work has the LPPL maintenance status `maintained'. %% -%% The Current Maintainer of this work is The LaTeX3 Project. +%% The Current Maintainer of this work is The LaTeX Project. %% %% The list of all files belonging to the `Hyperref Bundle' is %% given in the file `manifest.txt'. @@ -57,7 +57,7 @@ }% \author{Sebastian Rahtz (deceased)\\% Heiko Oberdiek (inactive)\\% - The \LaTeX3 Project\\% + The \LaTeX\ Project\\% \texttt{https://github.com/latex3/hyperref/issues}}% \date{\filedate}% \maketitle diff --git a/macros/latex/contrib/hyperref/ntheorem-hyper.sty b/macros/latex/contrib/hyperref/ntheorem-hyper.sty index 1db77c3170..dcdd59167e 100644 --- a/macros/latex/contrib/hyperref/ntheorem-hyper.sty +++ b/macros/latex/contrib/hyperref/ntheorem-hyper.sty @@ -1,920 +1,7 @@ -%% -%% This is file `ntheorem.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% ntheorem.dtx (with options: `package') -%% -%% -%% ### WARNING: ============================================================= -%% -%% This file is a patched version that works (it seems) with hyperref. -%% Hyperref's \contentsline version breaks with ntheorem because it puts 3 -%% arguments in the text field (e.g.: \contentsline{def}{{def}{1}{foo}}{21}) -%% -%% To work around the problem, the following steps are implemented: -%% 1/ Don't use hyperref's contentsline: restore the normal definition at the -%% beginning of \thm@processlist. -%% 2/ Let the different versions of \thm@@thmline take a 5th argument, the one -%% provided by hyperref. -%% 3/ Let \thm@lgobble take a 3rd argument, the one provided by hyperref. -%% 4/ Do the hyperlinks manually in the different versions of \thm@@thmline -%% -%% You'll find comments starting with `%%DV' around my changes in the code. -%% -%% -%% Didier Verna -%% -%% ========================================================================== -%% -%% IMPORTANT NOTICE: -%% -%% For the copyright see the source file. -%% -%% Any modified versions of this file must be renamed -%% with new filenames distinct from ntheorem.sty. -%% -%% For distribution of the original source see the terms -%% for copying and modification in the file ntheorem.dtx. -%% -%% This generated file may be distributed as long as the -%% original source files, as listed above, are part of the -%% same distribution. (The sources need not necessarily be -%% in the same archive or directory.) -\def\filedate{1998/12/03} -\def\docdate{1998/12/03} -\def\fileversion{1.14} -\def\basename{ntheorem-hyper} -%% \CharacterTable -%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -%% Digits \0\1\2\3\4\5\6\7\8\9 -%% Exclamation \! Double quote \" Hash (number) \# -%% Dollar \$ Percent \% Ampersand \& -%% Acute accent \' Left paren \( Right paren \) -%% Asterisk \* Plus \+ Comma \, -%% Minus \- Point \. Solidus \/ -%% Colon \: Semicolon \; Less than \< -%% Equals \= Greater than \> Question mark \? -%% Commercial at \@ Left bracket \[ Backslash \\ -%% Right bracket \] Circumflex \^ Underscore \_ -%% Grave accent \` Left brace \{ Vertical bar \| -%% Right brace \} Tilde \~} -\typeout{Style `\basename', Version \fileversion\space <\filedate>} -\ProvidesPackage{ntheorem-hyper}[\filedate \space\fileversion] -\newif\if@thmmarks\@thmmarksfalse -\newif\ifthm@tempif -\DeclareOption{thmmarks}{%********************************* -\PackageInfo{\basename}{Option `thmmarks' loaded}% -\@thmmarkstrue -\newcounter{endNonectr} -\newcounter{currNonectr} -\newif\ifsetendmark\setendmarktrue -\gdef\endtrivlist{% - \@endtrivlist{\PotEndMark{\hbox{}\nobreak\hfill\nobreak}}} -\gdef\@endtrivlist#1{% % from \endtrivlist - \if@inlabel \indent\fi - \if@newlist \@noitemerr\fi - \ifhmode - \ifdim\lastskip >\z@ #1\unskip \par %<<<<<<<<<<<<<<<<<<<<<< - \else \unskip \par \fi - \fi - \if@noparlist \else - \ifdim\lastskip >\z@ - \@tempskipa\lastskip \vskip -\lastskip - \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip - \vskip\@tempskipa - \fi - \@endparenv - \fi} -\gdef\SetMark@endeqn{\quad}% as default, cf. option leqno -\gdef\endequation{\eqno \hbox{\@eqnnum \PotEndMark{\SetMark@endeqn}}% - $$\global\@ignoretrue} -\gdef\[{% - \relax\ifmmode - \@badmath - \else - \ifvmode - \nointerlineskip - \makebox[.6\linewidth]% - \fi - $$\stepcounter{end\InTheoType ctr}% - \@ifundefined{mark\roman{curr\InTheoType ctr}% - \InTheoType\roman{end\InTheoType ctr}}{\relax}% - {\ifx\csname\InTheoType Symbol\endcsname\@empty\else - \boxmaxdepth=.5ex\begin{array}[b]{l}% - \boxmaxdepth=\maxdimen\displaystyle\fi}% - \addtocounter{end\InTheoType ctr}{-1}% - %%$$ BRACE MATCH HACK - \fi} -\gdef\]{% - \stepcounter{end\InTheoType ctr}% - \@ifundefined{mark\roman{curr\InTheoType ctr}% - \InTheoType\roman{end\InTheoType ctr}}{\relax}% - {\ifx\csname\InTheoType Symbol\endcsname\@empty\else - \end{array}\fi}% - \addtocounter{end\InTheoType ctr}{-1}% - \relax\ifmmode - \ifinner - \@badmath - \else - \PotEndMark{\eqno}\global\@ignoretrue$$%%$$ BRACE MATCH HACK - \fi - \else - \@badmath - \fi - \ignorespaces} -\gdef\SetMark@endeqnarray#1{\llap{\raisebox{-1.3em}{#1}}} -\gdef\endeqnarray{% - \global\let\Oldeqnnum=\@eqnnum - \gdef\@eqnnum{\Oldeqnnum\PotEndMark{\SetMark@endeqnarray}}% - \@@eqncr - \egroup - \global\advance\c@equation\m@ne - $$\global\@ignoretrue - \global\let\@eqnnum\Oldeqnnum} -\@namedef{endeqnarray*}{% - % from \@@eqncr: - \let\reserved@a\relax - \ifcase\@eqcnt \def\reserved@a{& & &}\or \def\reserved@a{& &}% - \or \def\reserved@a{&}\else - \let\reserved@a\@empty - \@latex@error{Too many columns in eqnarray environment}\@ehc\fi - \reserved@a {\normalfont \normalcolor \PotEndMark{}}% - \global\@eqnswtrue\global\@eqcnt\z@\cr - % - \egroup - \global\advance\c@equation\m@ne - $$\global\@ignoretrue} -\gdef\endtabbing{% - \PotEndMark{\`}\@stopline\ifnum\@tabpush >\z@ \@badpoptabs - \fi\endtrivlist} -\gdef\endcenter{% - \@endtrivlist - {\PotEndMark{\rightskip0pt% - \settowidth{\leftskip}% - { \csname mark\roman{curr\InTheoType ctr}\InTheoType - \roman{end\InTheoType ctr}\endcsname}% - \advance\leftskip\@flushglue\hskip\@flushglue}}} -\gdef\@empty{} -\gdef\@endtheorem{% - \expandafter - \ifx\csname\InTheoType Symbol\endcsname\@empty\setendmarkfalse\fi - \@endtrivlist - {\ifsetendmark - \hbox{}\nobreak\hfill\nobreak\csname\InTheoType Symbol\endcsname - \setendmarkfalse \fi}% - \ifsetendmark\OrganizeTheoremSymbol\else\global\setendmarktrue\fi} -\gdef\NoEndMark{\global\setendmarkfalse} -\gdef\qed{\expandafter\def\csname \InTheoType Symbol\endcsname - {\the\qedsymbol}}% -\gdef\PotEndMark#1{\SetEndMark{\InTheoType}{#1}}% -\gdef\SetEndMark#1#2{% - \stepcounter{end#1ctr}% - \@ifundefined{mark\roman{curr#1ctr}#1\roman{end#1ctr}}% - {\relax}% - {#2{\csname mark\roman{curr#1ctr}#1\roman{end#1ctr}\endcsname}}}% -\newskip\mysavskip -\gdef\@bbsphack{% - \mysavskip\lastskip - \unskip} -\gdef\@eesphack{% - \ifdim\mysavskip>\z@ - \vskip\mysavskip \else\fi} -%% \begin{macrocode} -\gdef\OrganizeTheoremSymbol{% - \@bbsphack - \edef\thm@tmp{\expandafter\expandafter\expandafter\thm@meaning - \expandafter\meaning\csname\InTheoType Symbol\endcsname\relax}% - \protected@write\@auxout{}% - {\string\global\string\def\string\mark% - \roman{curr\InTheoType ctr}\InTheoType \roman{end\InTheoType ctr}% - {\thm@tmp}}% - \@eesphack} -} % end of option [thmmarks] -\DeclareOption{leqno}{% - \if@thmmarks - \PackageInfo{\basename}{Option `leqno' loaded}% - \gdef\SetMark@endeqn#1{\hss\llap{#1}} - \gdef\SetMark@endeqnarray#1{\hss\llap{#1}} - \fi}% -\DeclareOption{fleqn}{% -\if@thmmarks - \PackageInfo{\basename}{Option `fleqn' loaded}% - \renewcommand\[{\relax - \ifmmode\@badmath - \else - \begin{trivlist}% - \@beginparpenalty\predisplaypenalty - \@endparpenalty\postdisplaypenalty - \item[]\leavevmode - \hb@xt@\linewidth\bgroup $\m@th\displaystyle %$ - \hskip\mathindent\bgroup - \stepcounter{end\InTheoType ctr}% - \@ifundefined{mark\roman{curr\InTheoType ctr}% - \InTheoType\roman{end\InTheoType ctr}}{\relax}% - {\ifx\csname\InTheoType Symbol\endcsname\@empty\else - \boxmaxdepth=.5ex\begin{array}[b]{l}% - \boxmaxdepth=\maxdimen\displaystyle\fi}% - \addtocounter{end\InTheoType ctr}{-1}% - \fi} - \renewcommand\]{% - \stepcounter{end\InTheoType ctr}% - \@ifundefined{mark\roman{curr\InTheoType ctr}% - \InTheoType\roman{end\InTheoType ctr}}{\relax}% - {\ifx\csname\InTheoType Symbol\endcsname\@empty\else - \end{array}\fi}% - \addtocounter{end\InTheoType ctr}{-1}% - \relax\ifmmode - \egroup $\hfil\PotEndMark{}% $ - \egroup - \end{trivlist}% - \else \@badmath - \fi} -\gdef\endequation{% - $\hfil % $ - \displaywidth\linewidth\hbox{\@eqnnum \PotEndMark{\SetMark@endeqn}}% - \egroup - \endtrivlist} -\gdef\endeqnarray{% - \global\let\Oldeqnnum=\@eqnnum - \gdef\@eqnnum{\Oldeqnnum\PotEndMark{\SetMark@endeqnarray}}% - \@@eqncr - \egroup - \global\advance\c@equation\m@ne$$% $$ - \global\@ignoretrue - \global\let\@eqnnum\Oldeqnnum} -\fi}% end of option fleqn -\DeclareOption{amsmath}{% -\if@thmmarks - \PackageInfo{\basename}{Option `amsmath' loaded}% -\newdimen\thm@amstmpdepth -\gdef\TagsPlusEndmarks{% - \global\let\Old@maketag@@@=\maketag@@@ - \global\let\Old@df@tag=\df@tag - \if@eqnsw\SetTagPlusEndMark\else - \iftag@\SetTagPlusEndMark - \else\SetOnlyEndMark - \fi\fi} -\gdef\SetOnlyEndMark{% - \global\tag@true - \iftagsleft@ - \gdef\df@tag{\hbox - to \displaywidth{\hss\PotEndMark{\maketag@@@}}}% - \else - \gdef\df@tag{\PotEndMark{\maketag@@@}}% - \fi} -\gdef\SetTagPlusEndMark{% - \iftagsleft@ - \gdef\maketag@@@##1{% - \hbox to \displaywidth{\m@th\normalfont##1% - \PotEndMark{\hss}}}% - \else - \gdef\maketag@@@##1{\hbox{\m@th\normalfont##1% - \llap{\hss\PotEndMark{\raisebox{-1.3em}}}}}% - \fi} -\gdef\RestoreTags{% - \global\let\maketag@@@=\Old@maketag@@@ - \global\let\df@tag=\Old@df@tag} -\gdef\endgather{% - \TagsPlusEndmarks % <<<<<<<<< - \math@cr - \black@\totwidth@ - \egroup - $$% - \RestoreTags % <<<<<<<<< - \global\@ignoretrue} -\expandafter\let\csname endgather*\endcsname\endgather -\def\endalign{% - \ifingather@\else % <<<<<<<<< - \TagsPlusEndmarks\fi % <<<<<<<<< - \math@cr - \black@\totwidth@ - \egroup - \ifingather@ - \restorealignstate@ - \egroup - \nonumber - \ifnum0=`{\fi}% - \else - $$% - \RestoreTags % <<<<<<<<< - \fi - \global\@ignoretrue} -\expandafter\let\csname endalign*\endcsname\endalign -\let\endxalignat\endalign -\expandafter\let\csname endxalignat*\endcsname\endalign -\let\endxxalignat\endalign -\let\endalignat\endalign -\expandafter\let\csname endalignat*\endcsname\endalign -\let\endflalign\endalign -\expandafter\let\csname endflalign*\endcsname\endalign -\def\lendmultline@{% - \@eqnswfalse\tag@true\tagsleft@false - \rendmultline@} -\def\rendmultline@{% - \TagsPlusEndmarks % <<<<<<<<< - \iftag@ - \begingroup - \ifshifttag@ - \hskip\multlinegap - \llap{\vtop{% - \raise@tag - \normalbaselines - \setbox\@ne\null - \dp\@ne\lineht@ - \box\@ne - \hbox{\strut@\make@display@tag}% - }}% - \else - \hskip\multlinetaggap - \make@display@tag - \fi - \endgroup - \else - \hskip\multlinegap - \fi - \hfilneg - \math@cr - \egroup$$% - \RestoreTags} % <<<<<<<<< -\def\[{% - \relax\ifmmode% \RIfM@ <<<<<<<<<<<<<<<<<<<<<<<<<<<< - \@badmath - \else - \DN@{% - $$% - \ingather@true - \inany@true - \def\\{\@amsmath@err{\Invalid@@\\}\@eha}% - \tabskip\@mathmargin - \halign to \displaywidth\bgroup - \if@fleqn\else\hfil\fi - \setboxz@h{$\m@th\displaystyle{####}$}% - \global\totwidth@\wdz@ - \global\thm@amstmpdepth\dp0% <<<<<<<<<<<< - \boxz@ - \tabskip 0pt plus 1000pt%<<<<<<<<<<<<<< - & ####% <<<<<<<<<<<<<<<<<<<<<<<< - \tabskip 0pt% - \cr - }% - \@xp\next@ - \fi} -\def\]{% - \relax\ifmmode% \RIfM@ <<<<<<<<<< - \DN@{% - \PotEndMark{&\raisebox{-\thm@amstmpdepth}}% <<<<<<<<< - \crcr - \black@\totwidth@ - \egroup - $$% - }% - \@xp\next@ - \else - \@badmath - \fi} -\def\equation{\gather\def\\{\@amsmath@err{\Invalid@@\\}\@eha}} -\def\endequation{\endgather} -\renewenvironment{equation*}{\equation}{\nonumber\endequation} -\else\PackageError{\basename}{Option amsmath cannot be used without - option thmmarks.}\@eha -\fi -}% end of option amsmath -\let\thm@usestd\@undefined -\DeclareOption{standard}{\let\thm@usestd\relax} -\let\thm@noconfig\@undefined -\DeclareOption{noconfig}{\let\thm@noconfig\relax} -\gdef\InTheoType{None} -\def\output@None{None} -\def\None{None} -\gdef\newtheoremstyle#1#2#3{% - \expandafter\@ifundefined{th@#1}% - {\expandafter\gdef\csname th@#1\endcsname{% - \def\@begintheorem####1####2{#2}% - \def\@opargbegintheorem####1####2####3{#3}}}% - {\PackageError{\basename}{Theorem style #1 already defined}\@eha}} -\gdef\renewtheoremstyle#1#2#3{% - \expandafter\@ifundefined{th@#1}% - {\PackageError{\basename}{Theorem style #1 undefined}\@ehc}% - {}% - \expandafter\let\csname th@#1\endcsname\relax - \newtheoremstyle{#1}{#2}{#3}} -\newtheoremstyle{plain}% - {\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\theorem@separator]}% - {\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\ (##3)\theorem@separator]} -\newtheoremstyle{break}% - {\item\hbox to \textwidth{\theorem@headerfont ##1\ - ##2\theorem@separator\hfill}}% - {\item\hbox to \textwidth{\theorem@headerfont ##1\ ##2\ - (##3)\theorem@separator\hfill}} -\newtheoremstyle{change}% - {\item[\hskip\labelsep \theorem@headerfont ##2\ ##1\theorem@separator]}% - {\item[\hskip\labelsep \theorem@headerfont ##2\ ##1\ (##3)\theorem@separator]} -\newtheoremstyle{changebreak}% - {\item\hbox to \textwidth{\theorem@headerfont ##2\ - ##1\theorem@separator\hfill}}% - {\item\hbox to \textwidth{\theorem@headerfont ##2\ ##1\ - (##3)\theorem@separator\hfill}} -\newtheoremstyle{margin}% - {\item[\theorem@headerfont \llap{##2}\hskip\labelsep ##1\theorem@separator]}% - {\item[\theorem@headerfont \llap{##2}\hskip\labelsep ##1\ (##3)\theorem@separator]} -\newtheoremstyle{marginbreak}% - {\item\hbox to \textwidth{\theorem@headerfont \llap{##2}\hskip\labelsep - ##1\theorem@separator\hfill}}% - {\item\hbox to \textwidth{\theorem@headerfont - \llap{##2}\hskip\labelsep - ##1\ (##3)\theorem@separator\hfill}} -\newtheoremstyle{nonumberplain}% - {\item[\theorem@headerfont\hskip\labelsep ##1\theorem@separator]}% - {\item[\theorem@headerfont\hskip \labelsep ##1\ (##3)\theorem@separator]} -\newtheoremstyle{nonumberbreak}% - {\item\hbox to \textwidth{\theorem@headerfont\hskip\labelsep - ##1\theorem@separator\hfill}}% - {\item\hbox to \textwidth{\theorem@headerfont\hskip\labelsep - ##1\ (##3)\theorem@separator\hfill}} -\newtheoremstyle{empty}% - {\item~\hfill}% - {\item\hbox to \textwidth{\theorem@headerfont##3\hfill}} -\@namedef{th@nonumbermargin}{\th@nonumberplain} -\@namedef{th@nonumberchange}{\th@nonumberplain} -\@namedef{th@nonumbermarginbreak}{\th@nonumberbreak} -\@namedef{th@nonumberchangebreak}{\th@nonumberbreak} -\@namedef{th@plainNo}{\th@nonumberplain} -\@namedef{th@breakNo}{\th@nonumberplain} -\@namedef{th@marginNo}{\th@nonumberplain} -\@namedef{th@changeNo}{\th@nonumberplain} -\@namedef{th@marginbreakNo}{\th@nonumberbreak} -\@namedef{th@changebreakNo}{\th@nonumberbreak} -\gdef\theoremstyle#1{% - \@ifundefined{th@#1}{\@warning - {Unknown theoremstyle `#1'. Using `plain'}% - \theorem@style{plain}}% - {\theorem@style{#1}}} -\newtoks\theorem@style -\newtoks\theorem@@style -\global\theoremstyle{plain} -\newtoks\theorembodyfont -\global\theorembodyfont{\itshape} -\newtoks\theoremnumbering -\global\theoremnumbering{arabic} -\newskip\theorempreskipamount -\newskip\theorempostskipamount -\global\theorempreskipamount\topsep -\global\theorempostskipamount\topsep -\newdimen\theoremindent -\global\theoremindent0cm -\newdimen\theorem@indent -\newtoks\theoremheaderfont -\global\theoremheaderfont{\normalfont\bfseries} -\def\theorem@headerfont{\normalfont\bfseries} -\newtoks\theoremseparator -\global\theoremseparator{} -\def\theorem@separator{} -\newtoks\theoremsymbol -\global\theoremsymbol{} -\newtoks\qedsymbol -\global\qedsymbol{} -\DeclareOption{amsthm}{% - \PackageInfo{\basename}{Option `amsthm' loaded}% -\def\swapnumbers{\PackageError{\basename}{swapnumbers not implemented. - Use theoremstyle change instead.}\@eha} - -\gdef\th@plain{% - \def\theorem@headerfont{\normalfont\bfseries}\itshape% - \def\@begintheorem##1##2{% - \item[\hskip\labelsep \theorem@headerfont ##1\ ##2.]}% - \def\@opargbegintheorem##1##2##3{% - \item[\hskip\labelsep \theorem@headerfont ##1\ ##2\ (##3).]}} -\gdef\th@nonumberplain{% - \def\theorem@headerfont{\normalfont\bfseries}\itshape% - \def\@begintheorem##1##2{% - \item[\hskip\labelsep \theorem@headerfont ##1.]}% - \def\@opargbegintheorem##1##2##3{% - \item[\hskip\labelsep \theorem@headerfont ##1\ (##3).]}} -\gdef\th@definition{% - \th@plain\def\theorem@headerfont{\normalfont\bfseries}\itshape} -\gdef\th@nonumberdefinition{% - \th@nonumberplain\def\theorem@headerfont{\normalfont\bfseries}\itshape} -\gdef\th@remark{% - \th@plain\def\theorem@headerfont{\itshape}\normalfont} -\gdef\th@nonumberremark{% - \th@nonumberplain\def\theorem@headerfont{\itshape}\normalfont} -\newcounter{proof}% -\if@thmmarks - \newcounter{currproofctr}% - \newcounter{endproofctr}% -\fi -\newcommand{\openbox}{\leavevmode - \hbox to.77778em{% - \hfil\vrule - \vbox to.675em{\hrule width.6em\vfil\hrule}% - \vrule\hfil}} -\gdef\proofSymbol{\openbox} -\newcommand{\proofname}{Proof} -\newenvironment{proof}[1][\proofname]{ - \th@nonumberplain - \def\theorem@headerfont{\itshape}% - \normalfont - \theoremsymbol{\ensuremath{_\blacksquare}} - \@thm{proof}{proof}{#1}}% - {\@endtheorem} -}% end of option amsthm -\newskip\thm@topsepadd -\gdef\newtheorem{% - \@ifstar - {\edef\@tempa{{nonumber\the\theorem@style}}% - \expandafter\theorem@@style\@tempa}% - {\edef\@tempa{{\the\theorem@style}}% - \expandafter\theorem@@style\@tempa}% - \@newtheorem} - -\gdef\renewtheorem{% - \@ifstar - {\edef\@tempa{{nonumber\the\theorem@style}}% - \expandafter\theorem@@style\@tempa}% - {\edef\@tempa{{\the\theorem@style}}% - \expandafter\theorem@@style\@tempa}% - \@renewtheorem} -\gdef\@newtheorem#1{% - \thm@tempiffalse - \expandafter\@ifdefinable\csname #1\endcsname - {\expandafter\@ifdefinable\csname #1*\endcsname - {\thm@tempiftrue - \thm@definelthm{#1}% for lists - \if@thmmarks - \expandafter\@ifundefined{c@curr#1ctr}% - {\newcounter{curr#1ctr}}{}% - \expandafter\@ifundefined{c@end#1ctr}% - {\newcounter{end#1ctr}}{}% - \fi - \expandafter\xdef\csname #1Symbol\endcsname{\the\theoremsymbol}% - \expandafter\gdef\csname#1\endcsname{% - \let\thm@starredenv\@undefined - \csname mkheader@#1\endcsname}% - \expandafter\gdef\csname#1*\endcsname{% - \let\thm@starredenv\relax - \csname mkheader@#1\endcsname}% - \def\@tempa{\expandafter\noexpand\csname end#1\endcsname}% - \expandafter\xdef\csname end#1*\endcsname{\@tempa}% - \expandafter\xdef\csname setparms@#1\endcsname - {\noexpand \def \noexpand \theorem@headerfont - {\the\theoremheaderfont\noexpand\theorem@checkbold}% - \noexpand \def \noexpand \theorem@separator - {\the\theoremseparator}% - \noexpand \def \noexpand \theorem@indent - {\the\theoremindent}% - \the \theorembodyfont - \noexpand\csname th@\the \theorem@@style \endcsname}}}% - \@ifnextchar[{\@othm{#1}}{\@nthm{#1}}}% MUST NOT BE IN ANY IF !!! -\gdef\@renewtheorem#1{% - \expandafter\@ifundefined{#1}% - {\PackageError{\basename}{Theorem style #1 undefined}\@ehc}% - {}% - \expandafter\let\csname #1\endcsname\relax - \expandafter\let\csname #1*\endcsname\relax - \newtheorem{#1}} -\gdef\@nthm#1#2{% - \expandafter\xdef\csname num@addtheoremline#1\endcsname{% - \noexpand\@num@addtheoremline{#1}{#2}}% - \expandafter\xdef\csname nonum@addtheoremline#1\endcsname{% - \noexpand\@nonum@addtheoremline{#1}{#2}}% - \expandafter\xdef\csname output@#1\endcsname{#2}% - \@ifnextchar[{\@xnthm{#1}{#2}}{\@ynthm{#1}{#2}}} -\gdef\@othm#1[#2]#3{% - \@ifundefined{c@#2}{\@nocounterr{#2}}% - {\ifthm@tempif - \global\@namedef{the#1}{\@nameuse{the#2}}% - \expandafter\xdef\csname num@addtheoremline#1\endcsname{% - \noexpand\@num@addtheoremline{#1}{#3}}% - \expandafter\xdef\csname nonum@addtheoremline#1\endcsname{% - \noexpand\@nonum@addtheoremline{#1}{#3}}% - \expandafter\xdef\csname output@#1\endcsname{#3}% - \expandafter\gdef\csname mkheader@#1\endcsname - {\csname setparms@#1\endcsname - \@thm{#1}{#2}{#3}}% - \global\@namedef{end#1}{\@endtheorem}\fi}} -\gdef\@xnthm#1#2[#3]{% - \ifthm@tempif - \expandafter\@ifundefined{c@#1}% - {\@definecounter{#1}}{}% - \@newctr{#1}[#3]% - \expandafter\xdef\csname the#1\endcsname{% - \expandafter\noexpand\csname the#3\endcsname \@thmcountersep - {\noexpand\csname\the\theoremnumbering\endcsname{#1}}}% - \expandafter\gdef\csname mkheader@#1\endcsname - {\csname setparms@#1\endcsname - \@thm{#1}{#1}{#2}}% - \global\@namedef{end#1}{\@endtheorem}\fi} -\gdef\@ynthm#1#2{% - \ifthm@tempif - \expandafter\@ifundefined{c@#1}% - {\@definecounter{#1}}{}% - \expandafter\xdef\csname the#1\endcsname - {\noexpand\csname\the\theoremnumbering\endcsname{#1}}% - \expandafter\gdef\csname mkheader@#1\endcsname - {\csname setparms@#1\endcsname - \@thm{#1}{#1}{#2}}% - \global\@namedef{end#1}{\@endtheorem}\fi} -\gdef\@thm#1#2#3{% - \if@thmmarks - \stepcounter{end\InTheoType ctr}% - \fi - \renewcommand{\InTheoType}{#1}% - \if@thmmarks - \stepcounter{curr#1ctr}% - \setcounter{end#1ctr}{0}% - \fi - \refstepcounter{#2}% - \thm@topsepadd \theorempostskipamount % cf. latex.ltx: \@trivlist - \ifvmode \advance\thm@topsepadd\partopsep\fi - \trivlist - \@topsep \theorempreskipamount - \@topsepadd \thm@topsepadd % used by \@endparenv - \advance\linewidth -\theorem@indent - \advance\@totalleftmargin \theorem@indent - \parshape \@ne \@totalleftmargin \linewidth - \@ifnextchar[{\@ythm{#1}{#2}{#3}}{\@xthm{#1}{#2}{#3}}} -\def\@xthm#1#2#3{% - \@begintheorem{#3}{\csname the#2\endcsname}% - \ifx\thm@starredenv\@undefined - \thm@thmcaption{#1}{{#3}{\csname the#2\endcsname}{}}\fi - \ignorespaces} -\def\@ythm#1#2#3[#4]{% - \expandafter\global\expandafter\def\csname#1name\endcsname{#4}% - \@opargbegintheorem{#3}{\csname the#2\endcsname}{#4}% - \ifx\thm@starredenv\@undefined - \thm@thmcaption{#1}{{#3}{\csname the#2\endcsname}{#4}}\fi% - \ignorespaces} -\DeclareOption{thref}{%********************************* - \PackageInfo{\basename}{Option `thref' loaded}% -\def\label#1{ - \@ifnextchar[%] - {\label@optarg{#1}}% - {\label@optarg{#1}% - [\csname output@\InTheoType\endcsname]}} -\def\label@optarg#1[#2]{\@bsphack - \protected@write\@auxout{}% - {\string\newlabel{#1}{{\@currentlabel}{\thepage}}[#2]}% - \@esphack} -\def\@newl@bel#1#2#3{% - \@ifundefined{#1@#2}% - \relax - {\gdef \@multiplelabels {% - \@latex@warning@no@line{There were multiply-defined labels}}% - \@latex@warning@no@line{Label `#2' multiply defined}}% - \global\@namedef{#1@#2}{#3}% - \@ifnextchar[{\set@labeltype#1#2}{\relax}%] - } -\def\set@labeltype#1#2[#3]{\global\@namedef{#1@#2@type}{#3}} -\@ifpackageloaded{babel}% - {\message{ntheorem-babel adapation loaded}% - \def\newlabel#1#2{% - \@ifnextchar[{\nth@bbl@newlabel{#1}{#2}}%] - {\nth@bbl@newlabel{#1}{#2}[None]}}% - \def\nth@bbl@newlabel#1#2[#3]{% - \@safe@activestrue\bbl@newlabel{#1}{#2}[#3]\@safe@activesfalse}}% - \relax -\def\thref#1{% - \expandafter\ifx\csname r@#1@type\endcsname\None - \PackageWarning{\basename}{thref: Reference Type of `#1' on page - \thepage \space undefined}\G@refundefinedtrue - \else\csname r@#1@type\endcsname~\fi% - \expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}} -}% end of option thref -\def\thm@thmcaption#1#2{\thm@@thmcaption{#1}#2} -\def\thm@@thmcaption#1#2#3#4{% - \thm@parseforwriting{#4}% - \edef\thm@t{{#2}{#3}{\thm@tmp}}% - \addcontentsline{thm}{#1}{\thm@t}} -\def\theoremlistall{% - \let\thm@@thmlstart=\relax - \let\thm@@thmlend=\relax -%%DV Use a fith argument (supplied by hyperref) and do the links manually - \def\thm@@thmline##1##2##3##4##5{% - \ifx\\##5\\% - \@dottedtocline{-2}{0em}{2.3em}% - {\protect\numberline{##2}##3}% - {##4} - \else - \ifhy@linktocpage - \@dottedtocline{-2}{0em}{2.3em}% - {\protect\numberline{##2}##3}% - {\hyper@linkstart{link}{##5}{##4}\hyper@linkend} - \else - \@dottedtocline{-2}{0em}{2.3em}% - {\hyper@linkstart{link}{##5}{\protect\numberline{##2}##3}% - \hyper@linkend}% - {##4} - \fi - \fi}} -%%DV \def\thm@@thmline##1##2##3##4{% -%%DV \@dottedtocline{-2}{0em}{2.3em}% -%%DV {\protect\numberline{##2}##3}% -%%DV {##4}}} -\def\theoremlistallname{% - \let\thm@@thmlstart=\relax - \let\thm@@thmlend=\relax -%%DV Use a fith argument (supplied by hyperref) and do the links manually - \def\thm@@thmline##1##2##3##4##5{% - \ifx\\##5\\% - \@dottedtocline{-2}{0em}{2.3em}% - {##1 \protect\numberline{##2}##3}% - {##4} - \else - \ifhy@linktocpage - \@dottedtocline{-2}{0em}{2.3em}% - {##1 \protect\numberline{##2}##3}% - {\hyper@linkstart{link}{##5}{##4}\hyper@linkend} - \else - \@dottedtocline{-2}{0em}{2.3em}% - {\hyper@linkstart{link}{##5}% - {##1 \protect\numberline{##2}##3}\hyper@linkend}% - {##4} - \fi - \fi}} -%%DV \def\thm@@thmline##1##2##3##4{% -%%DV \@dottedtocline{-2}{0em}{2.3em}% -%%DV {##1 \protect\numberline{##2}##3}% -%%DV {##4}}} -\def\theoremlistoptional{% - \let\thm@@thmlstart=\relax - \let\thm@@thmlend=\relax -%%DV Use a fith argument (supplied by hyperref) and do the links manually - \def\thm@@thmline##1##2##3##4##5{% - \ifx\empty ##3% - \else% - \ifx\\##5\\% - \@dottedtocline{-2}{0em}{2.3em}% - {\protect\numberline{##2}##3}% - {##4} - \else - \ifhy@linktocpage - \@dottedtocline{-2}{0em}{2.3em}% - {\protect\numberline{##2}##3}% - {\hyper@linkstart{link}{##5}{##4}\hyper@linkend} - \else - \@dottedtocline{-2}{0em}{2.3em}% - {\hyper@linkstart{link}{##5}{\protect\numberline{##2}##3}% - \hyper@linkend}% - {##4} - \fi - \fi - \fi}} -%%DV \def\thm@@thmline##1##2##3##4{% -%%DV \ifx\empty ##3% -%%DV \else% -%%DV \@dottedtocline{-2}{0em}{2.3em}% -%%DV {\protect\numberline{##2}##3}% -%%DV {##4}% -%%DV \fi}} -\def\theoremlistoptname{% - \let\thm@@thmlstart=\relax - \let\thm@@thmlend=\relax -%%DV Use a fith argument (supplied by hyperref) and do the links manually - \def\thm@@thmline##1##2##3##4##5{% - \ifx\empty ##3% - \else - \ifx\\##5\\% - \@dottedtocline{-2}{0em}{2.3em}% - {##1 \protect\numberline{##2}##3}% - {##4} - \else - \ifhy@linktocpage - \@dottedtocline{-2}{0em}{2.3em}% - {##1 \protect\numberline{##2}##3}% - {\hyper@linkstart{link}{##5}{##4}\hyper@linkend} - \else - \@dottedtocline{-2}{0em}{2.3em}% - {\hyper@linkstart{link}{##5}% - {##1 \protect\numberline{##2}##3}\hyper@linkend}% - {##4} - \fi - \fi - \fi}} -%%DV \def\thm@@thmline##1##2##3##4{% -%%DV \ifx\empty ##3% -%%DV \else% -%%DV \@dottedtocline{-2}{0em}{2.3em}% -%%DV {##1 \protect\numberline{##2}##3}% -%%DV {##4}% -%%DV \fi}} -\theoremlistall -\def\theoremlisttype#1{% - \@ifundefined{thm@thml@#1}% - {\PackageError{\basename}{Listtype #1 not defined}\@eha} - {\csname thm@thml@#1\endcsname}} -\def\thm@thml@all{\theoremlistall} -\def\thm@thml@opt{\theoremlistoptional} -\def\thm@thml@optname{\theoremlistoptname} -\def\thm@thml@allname{\theoremlistallname} -\def\newtheoremlisttype#1#2#3#4{% - \@ifundefined{thm@thml@#1}% - {\expandafter\gdef\csname thm@thml@#1\endcsname{% - \def\thm@@thmlstart{#2}% - \def\thm@@thmline####1####2####3####4{#3}% - \def\thm@@thmlend{#4}}% - }{\PackageError{\basename}{list type #1 already defined}\@eha}} -\def\renewtheoremlisttype#1#2#3#4{% - \@ifundefined{thm@thml@#1}% - {\PackageError{\basename}{List type #1 not defined}\@ehc}{}% - \expandafter\let\csname thm@thml@#1\endcsname\relax - \newtheoremlisttype{#1}{#2}{#3}{#4}} -%%DV Use a third argument (supplied by hyperref) -\def\thm@thmline#1#2#3{\thm@@thmline#1{#2}{#3}} -%%DV\def\thm@thmline#1#2{\thm@@thmline#1{#2}} -%%DV Use a third argument (supplied by hyperref) -\long\def\thm@lgobble#1#2#3{\ignorespaces} -%%DV\long\def\thm@lgobble#1#2{\ignorespaces} -\def\thm@definelthm#1{% - \expandafter\gdef\csname l@#1\endcsname{\thm@lgobble}% - \expandafter\gdef\csname thm@listdo#1\endcsname{\thm@lgobble}} -\long\def\thm@inlistdo#1#2{#2}% -\def\listtheorems#1{\begingroup% - \c@tocdepth=-2% - \def\thm@list{#1}\thm@processlist% - \endgroup} -\def\thm@processlist{% - \begingroup% - \typeout{** Generating table of \thm@list}% -%%DV: don't use hyperref's \contentsline !! Use the normal definition. - \def\contentsline##1{\csname l@##1\endcsname} - \thm@@thmlstart - \@for\thm@currentlist:=\thm@list\do{% - \ifx\thm@currentlist\@empty\else% - \expandafter\gdef\csname l@\thm@currentlist\endcsname{\thm@thmline}% - \expandafter\gdef\csname thm@listdo\thm@currentlist\endcsname{\thm@inlistdo}% - \fi% - }% - \@input{\jobname .thm}% - \thm@@thmlend% - \@for\thm@currentlist:=\thm@list\do{% - \ifx\thm@currentlist\@empty\else% - \expandafter\gdef\csname l@\thm@currentlist\endcsname{\thm@lgobble}% - \expandafter\gdef\csname thm@listdo\thm@currentlist\endcsname{\thm@lgobble}% - \fi% - }% - \endgroup} -\def\thm@enablelistoftheorems{% - \begingroup% - \makeatletter% - \if@filesw% - \expandafter\newwrite\csname tf@thm\endcsname% - \immediate\openout \csname tf@thm\endcsname \jobname.thm\relax% - \fi% - \@nobreakfalse% - \endgroup} -\def\addtheoremline{\@ifstar{\nonum@addtheoremline}{\num@addtheoremline}} -\def\nonum@addtheoremline#1{\csname nonum@addtheoremline#1\endcsname}% -\def\num@addtheoremline#1{\csname num@addtheoremline#1\endcsname}% -\def\@nonum@addtheoremline#1#2#3{% - \thm@parseforwriting{#3}% - \edef\thm@t{{#2}{}{\thm@tmp}}% - \addcontentsline{thm}{#1}{\thm@t}} -\def\@num@addtheoremline#1#2#3{% - \thm@parseforwriting{#3}% - \edef\thm@t{{#2}{\csname the#1\endcsname}{\thm@tmp}}% - \addcontentsline{thm}{#1}{\thm@t}} -\long\def\addtotheoremfile{% - \@ifnextchar[{\@@addtotheoremfile}{\@addtotheoremfile}} -\long\def\@addtotheoremfile#1{% - \thm@parseforwriting{#1}% - \protected@write\@auxout% - {}{\string\@writefile{thm}{\thm@tmp}}} -\long\def\@@addtotheoremfile[#1]#2{% - \thm@parseforwriting{#2}% - \protected@write\@auxout% - {}{\string\@writefile{thm}{\string\theoremlistdo{#1}{\thm@tmp}}}} -\long\def\theoremlistdo#1#2{\csname thm@listdo#1\endcsname{#1}{#2}} -\AtEndDocument{\thm@enablelistoftheorems} -\def\thm@meaning#1->#2\relax{#2}% remove "macro:->" -\long\def\thm@parseforwriting#1{% - \def\thm@tmp{#1}% - \edef\thm@tmp{\expandafter\thm@meaning\meaning\thm@tmp\relax}} -\def\theorem@checkbold{\if b\expandafter\@car\f@series\@nil\boldmath\fi} -\def\@greek#1{\theorem@checkbold% - \ifcase#1\or$\alpha$\or$\beta$\or$\gamma$\or$\delta$\or$\varepsilon$% - \or$\zeta$\or$\eta$\or$\vartheta$\or$\iota$\or$\kappa$\or$\lambda$\or$% - \mu$\or$\nu$\or$\xi$\or$ o$\or$\varpi$\or$\varrho$\or$\varsigma$\or$\tau$% - \or$\upsilon$\or$\varphi$\or$\chi$\or$\psi$\or$\omega$\else\@ctrerr\fi} -\def\@Greek#1{\theorem@checkbold% - \ifcase#1\or A\or B\or$\Gamma$\or$\Delta$\or E% - \or Z\or H\or$\Theta$\or I\or K\or$\Lambda$\or M% - \or N\or$\Xi$\or O\or$\Pi$\or P\or$\Sigma$\or T% - \or$\Upsilon$\or$\Phi$\or X\or$\Psi$\or$\Omega$\else\@ctrerr\fi} -\def\greek#1{\@greek{\csname c@#1\endcsname}} -\def\Greek#1{\@Greek{\csname c@#1\endcsname}} -\ProcessOptions\relax -\ifx\thm@noconfig\@undefined -\InputIfFileExists{ntheorem.cfg}% - {\PackageInfo{\basename}{Local config file ntheorem.cfg used}}% - {\ifx\thm@usestd\@undefined% - \else% - \InputIfFileExists{ntheorem.std}% - {\PackageInfo{\basename}{Standard config file ntheorem.std used}}{} - \fi} -\fi -\endinput -%% -%% End of file `ntheorem.sty'. +% Copyright 2021 The LaTeX Project +% Licence LPPL: https://www.latex-project.org/lppl/lppl-1-3c.txt +\ProvidesPackage{ntheorem-hyper}[2021/02/07] +\PackageWarningNoLine{ntheorem-hyper}{% +This package is obsolete,\MessageBreak +please use ntheorem instead} +\RequirePackage{ntheorem} diff --git a/macros/latex/contrib/hyperref/xr-hyper.sty b/macros/latex/contrib/hyperref/xr-hyper.sty index 369f0bea06..a18ca9dc41 100644 --- a/macros/latex/contrib/hyperref/xr-hyper.sty +++ b/macros/latex/contrib/hyperref/xr-hyper.sty @@ -29,7 +29,7 @@ %% Unless a package redefines \XR@addfile, the optional URL argument %% will be ignored. %% -%% This version (beta2) also has another improvement unrelated +%% Version beta2 also added another improvement unrelated %% to the hyperref support. Olivier Michel pointed out that %% if the aux file was not on texinputs you could not always go %% \externaldocument{/some/path/to/file} @@ -59,26 +59,9 @@ %% \ref to avoid generating a hyperlink. %% %% -%% History -%% -%% 1997/10/06 v6.00beta2 -%% -%% 1999/09/01 v6.00beta3 -%% Definitions of \XR@addURL corrected (Heiko Oberdiek). -%% -%% 2000/03/22 v6.00beta4 -%% \xdef changed to \protected@xdef. -%% -%% 2019/10/03 v6.1 -%% Incorporate updates to xr (including citation support) -%% -%% 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) -%% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{xr-hyper} - [2021-02-04 v7.00g eXternal References (DPC)] + [2021-02-07 v7.00h eXternal References (DPC)] \def\externaldocument{\@testopt\XR@cite{}} \let\externalcitedocument\externaldocument @@ -168,3 +151,22 @@ \endinput %% %% End of file `xr-hyper.sty'. + + +%% History +%% +%% 1997/10/06 v6.00 beta2 +%% +%% 1999/09/01 v6.00 beta3 +%% Definitions of \XR@addURL corrected (Heiko Oberdiek). +%% +%% 2000/03/22 v6.00 beta4 +%% \xdef changed to \protected@xdef. +%% +%% 2019/10/03 v6.1 +%% Incorporate updates to xr (including citation support) +%% +%% 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) +%% diff --git a/macros/latex/contrib/l3backend/CHANGELOG.md b/macros/latex/contrib/l3backend/CHANGELOG.md index 4d4f19b44b..b04d1fd195 100644 --- a/macros/latex/contrib/l3backend/CHANGELOG.md +++ b/macros/latex/contrib/l3backend/CHANGELOG.md @@ -6,7 +6,12 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] -## [2020-01-29] +## [2021-02-06] + +### Changed +- Use new (internal) interface for kerns + +## [2021-01-29] ### Added - Basic opacity support @@ -146,8 +151,9 @@ this project uses date-based 'snapshot' version identifiers. - Include `l3backend` in file names - Moved backend code to internal for each 'parent' module -[Unreleased]: https://github.com/latex3/latex3/compare/2020-01-29...HEAD -[2020-01-29]: https://github.com/latex3/latex3/compare/2021-01-09...2020-01-29 +[Unreleased]: https://github.com/latex3/latex3/compare/2021-02-06...HEAD +[2021-02-06]: https://github.com/latex3/latex3/compare/2021-01-29...2021-02-06 +[2021-01-29]: https://github.com/latex3/latex3/compare/2021-01-09...2021-01-29 [2021-01-09]: https://github.com/latex3/latex3/compare/2020-09-24...2021-01-09 [2020-09-24]: https://github.com/latex3/latex3/compare/2020-09-11...2020-09-24 [2020-09-11]: https://github.com/latex3/latex3/compare/2020-09-01...2020-09-11 diff --git a/macros/latex/contrib/l3backend/README.md b/macros/latex/contrib/l3backend/README.md index bc607bd543..07d6aadd6a 100644 --- a/macros/latex/contrib/l3backend/README.md +++ b/macros/latex/contrib/l3backend/README.md @@ -1,7 +1,7 @@ LaTeX3 Backend Drivers ====================== -Release 2020-01-29 +Release 2021-02-06 This package forms parts of `expl3`, and contains the code used to interface with backends (drivers) across the `expl3` codebase. The functions here are diff --git a/macros/latex/contrib/l3backend/l3backend-basics.dtx b/macros/latex/contrib/l3backend/l3backend-basics.dtx index 0033514bdc..80504ebf03 100644 --- a/macros/latex/contrib/l3backend/l3backend-basics.dtx +++ b/macros/latex/contrib/l3backend/l3backend-basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % @@ -70,27 +70,27 @@ % \begin{macrocode} \ProvidesExplFile %<*dvipdfmx> - {l3backend-dvipdfmx.def}{2020-01-29}{} + {l3backend-dvipdfmx.def}{2021-02-06}{} {L3 backend support: dvipdfmx} % %<*dvips> - {l3backend-dvips.def}{2020-01-29}{} + {l3backend-dvips.def}{2021-02-06}{} {L3 backend support: dvips} % %<*dvisvgm> - {l3backend-dvisvgm.def}{2020-01-29}{} + {l3backend-dvisvgm.def}{2021-02-06}{} {L3 backend support: dvisvgm} % %<*luatex> - {l3backend-luatex.def}{2020-01-29}{} + {l3backend-luatex.def}{2021-02-06}{} {L3 backend support: PDF output (LuaTeX)} % %<*pdftex> - {l3backend-pdftex.def}{2020-01-29}{} + {l3backend-pdftex.def}{2021-02-06}{} {L3 backend support: PDF output (pdfTeX)} % %<*xetex> - {l3backend-xetex.def}{2020-01-29}{} + {l3backend-xetex.def}{2021-02-06}{} {L3 backend support: XeTeX} % % \end{macrocode} diff --git a/macros/latex/contrib/l3backend/l3backend-box.dtx b/macros/latex/contrib/l3backend/l3backend-box.dtx index d47bd2ed7a..f6268a776c 100644 --- a/macros/latex/contrib/l3backend/l3backend-box.dtx +++ b/macros/latex/contrib/l3backend/l3backend-box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-code.pdf b/macros/latex/contrib/l3backend/l3backend-code.pdf index 2e72444e29..c6f39549e5 100644 Binary files a/macros/latex/contrib/l3backend/l3backend-code.pdf and b/macros/latex/contrib/l3backend/l3backend-code.pdf differ diff --git a/macros/latex/contrib/l3backend/l3backend-color.dtx b/macros/latex/contrib/l3backend/l3backend-color.dtx index 9e19d8ac0a..9373df677d 100644 --- a/macros/latex/contrib/l3backend/l3backend-color.dtx +++ b/macros/latex/contrib/l3backend/l3backend-color.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-draw.dtx b/macros/latex/contrib/l3backend/l3backend-draw.dtx index 8992c92d68..8602a4da4c 100644 --- a/macros/latex/contrib/l3backend/l3backend-draw.dtx +++ b/macros/latex/contrib/l3backend/l3backend-draw.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-graphics.dtx b/macros/latex/contrib/l3backend/l3backend-graphics.dtx index b0881891f2..484e5b20b9 100644 --- a/macros/latex/contrib/l3backend/l3backend-graphics.dtx +++ b/macros/latex/contrib/l3backend/l3backend-graphics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-header.dtx b/macros/latex/contrib/l3backend/l3backend-header.dtx index 269214356a..77d1d93a26 100644 --- a/macros/latex/contrib/l3backend/l3backend-header.dtx +++ b/macros/latex/contrib/l3backend/l3backend-header.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-opacity.dtx b/macros/latex/contrib/l3backend/l3backend-opacity.dtx index 62317fa8b4..06d17b6745 100644 --- a/macros/latex/contrib/l3backend/l3backend-opacity.dtx +++ b/macros/latex/contrib/l3backend/l3backend-opacity.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-pdf.dtx b/macros/latex/contrib/l3backend/l3backend-pdf.dtx index 226f864933..dd279399d9 100644 --- a/macros/latex/contrib/l3backend/l3backend-pdf.dtx +++ b/macros/latex/contrib/l3backend/l3backend-pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % @@ -297,9 +297,9 @@ { \hbox:n { - \tex_kern:D #1 \scan_stop: + \__kernel_kern:n {#1} \__kernel_backend_postscript:n { pdf.save.ur } - \tex_kern:D -#1 \scan_stop: + \__kernel_kern:n { -#1 } } } \int_gincr:N \g_@@_backend_object_int @@ -658,18 +658,18 @@ { \vbox_to_zero:n { - \tex_kern:D \dim_eval:n {#4} \scan_stop: + \__kernel_kern:n {#4} \hbox:n { \__kernel_backend_postscript:n { pdf.save.ll } } \tex_vss:D } - \tex_kern:D #1 \scan_stop: + \__kernel_kern:n {#1} \vbox_to_zero:n { - \tex_kern:D \dim_eval:n { -#3 } \scan_stop: + \__kernel_kern:n { -#3 } \hbox:n { \__kernel_backend_postscript:n { pdf.save.ur } } \tex_vss:D } - \tex_kern:D -#1 \scan_stop: + \__kernel_kern:n { -#1 } \@@_backend_pdfmark:n { /View @@ -1523,7 +1523,7 @@ { \vbox_to_zero:n { - \tex_kern:D \dim_eval:n {#4} \scan_stop: + \__kernel_kern:n {#4} \hbox:n { \@@_backend:n { obj ~ @pdf_ #2 _llx ~ @xpos } @@ -1531,10 +1531,10 @@ } \tex_vss:D } - \tex_kern:D #1 \scan_stop: + \__kernel_kern:n {#1} \vbox_to_zero:n { - \tex_kern:D \dim_eval:n { -#3 } \scan_stop: + \__kernel_kern:n { -#3 } \hbox:n { \@@_backend:n @@ -1550,7 +1550,7 @@ } \tex_vss:D } - \tex_kern:D -#1 \scan_stop: + \__kernel_kern:n { -#1 } } % \end{macrocode} % \end{macro} diff --git a/macros/latex/contrib/l3experimental/CHANGELOG.md b/macros/latex/contrib/l3experimental/CHANGELOG.md index 01cb972bbb..5c3d6b7d4a 100644 --- a/macros/latex/contrib/l3experimental/CHANGELOG.md +++ b/macros/latex/contrib/l3experimental/CHANGELOG.md @@ -7,7 +7,12 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] -## [2020-01-29] +## [2021-02-06] + +### Changed +- Use new (internal) interface for kerns + +## [2021-01-29] ### Added - New `l3bitset` module @@ -190,8 +195,9 @@ this project uses date-based 'snapshot' version identifiers. - New `l3color` module using `xcolor`-like expression syntax - New `l3draw` module, based on `pgf` layer of the TikZ system -[Unreleased]: https://github.com/latex3/latex3/compare/2020-01-29...HEAD -[2020-01-29]: https://github.com/latex3/latex3/compare/2020-10-27...2020-01-29 +[Unreleased]: https://github.com/latex3/latex3/compare/2021-02-06...HEAD +[2021-02-06]: https://github.com/latex3/latex3/compare/2021-01-29...2021-02-06 +[2021-01-29]: https://github.com/latex3/latex3/compare/2021-10-27...2021-01-29 [2020-10-27]: https://github.com/latex3/latex3/compare/2020-09-24...2020-10-27 [2020-09-24]: https://github.com/latex3/latex3/compare/2020-09-11...2020-09-24 [2020-09-11]: https://github.com/latex3/latex3/compare/2020-09-01...2020-09-11 diff --git a/macros/latex/contrib/l3experimental/README.md b/macros/latex/contrib/l3experimental/README.md index 31af1893e5..417d53493e 100644 --- a/macros/latex/contrib/l3experimental/README.md +++ b/macros/latex/contrib/l3experimental/README.md @@ -1,7 +1,7 @@ Experimental LaTeX3 Concepts ============================ -Release 2020-01-29 +Release 2021-02-06 Overview -------- diff --git a/macros/latex/contrib/l3experimental/l3benchmark.dtx b/macros/latex/contrib/l3experimental/l3benchmark.dtx index b7d0c8963f..76f3677781 100644 --- a/macros/latex/contrib/l3experimental/l3benchmark.dtx +++ b/macros/latex/contrib/l3experimental/l3benchmark.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % @@ -129,7 +129,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3benchmark}{2020-01-29}{} +\ProvidesExplPackage{l3benchmark}{2021-02-06}{} {L3 Experimental benchmarking} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3benchmark.pdf b/macros/latex/contrib/l3experimental/l3benchmark.pdf index 7cd6fe9bd6..a788198674 100644 Binary files a/macros/latex/contrib/l3experimental/l3benchmark.pdf and b/macros/latex/contrib/l3experimental/l3benchmark.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3bitset.dtx b/macros/latex/contrib/l3experimental/l3bitset.dtx index c7c3e43c06..7c61b81f83 100644 --- a/macros/latex/contrib/l3experimental/l3bitset.dtx +++ b/macros/latex/contrib/l3experimental/l3bitset.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % \begin{documentation} @@ -264,7 +264,7 @@ %<@@=bitset> % \end{macrocode} % \begin{macrocode} -\ProvidesExplPackage{l3bitset}{2020-01-29}{} +\ProvidesExplPackage{l3bitset}{2021-02-06}{} {L3 Experimental bitset support} % \end{macrocode} % A bitset is a string variable. diff --git a/macros/latex/contrib/l3experimental/l3bitset.pdf b/macros/latex/contrib/l3experimental/l3bitset.pdf index 85df863511..68490cb185 100644 Binary files a/macros/latex/contrib/l3experimental/l3bitset.pdf and b/macros/latex/contrib/l3experimental/l3bitset.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3color.dtx b/macros/latex/contrib/l3experimental/l3color.dtx index 703815a96f..0f1b130da8 100644 --- a/macros/latex/contrib/l3experimental/l3color.dtx +++ b/macros/latex/contrib/l3experimental/l3color.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % @@ -423,7 +423,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3color}{2020-01-29}{} +\ProvidesExplPackage{l3color}{2021-02-06}{} {L3 Experimental color support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3color.pdf b/macros/latex/contrib/l3experimental/l3color.pdf index 4cf6a862c4..aacda29a30 100644 Binary files a/macros/latex/contrib/l3experimental/l3color.pdf and b/macros/latex/contrib/l3experimental/l3color.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx index 3b251b3305..29103416ee 100644 --- a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % @@ -113,7 +113,7 @@ } \hbox_set:Nn \l_@@_tmp_box { - \tex_kern:D \l_@@_xshift_dim + \__kernel_kern:n { \l_@@_xshift_dim } \box_move_up:nn { \l_@@_yshift_dim } { \box_use_drop:N \l_@@_tmp_box } } diff --git a/macros/latex/contrib/l3experimental/l3draw-code.pdf b/macros/latex/contrib/l3experimental/l3draw-code.pdf index 452126336b..c52386b2b1 100644 Binary files a/macros/latex/contrib/l3experimental/l3draw-code.pdf and b/macros/latex/contrib/l3experimental/l3draw-code.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3draw-layers.dtx b/macros/latex/contrib/l3experimental/l3draw-layers.dtx index c17e0eea67..0ed23162fd 100644 --- a/macros/latex/contrib/l3experimental/l3draw-layers.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-layers.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-paths.dtx b/macros/latex/contrib/l3experimental/l3draw-paths.dtx index 82f5588a93..bfad9e14a3 100644 --- a/macros/latex/contrib/l3experimental/l3draw-paths.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-paths.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-points.dtx b/macros/latex/contrib/l3experimental/l3draw-points.dtx index 791b2f2034..8c170eeb27 100644 --- a/macros/latex/contrib/l3experimental/l3draw-points.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-points.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx index 3425856267..4b28b10397 100644 --- a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx index bd22800902..2bda7e3c2d 100644 --- a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-state.dtx b/macros/latex/contrib/l3experimental/l3draw-state.dtx index e93266913b..42709122b7 100644 --- a/macros/latex/contrib/l3experimental/l3draw-state.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-state.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx index 7a242150a4..880fff8b1a 100644 --- a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw.dtx b/macros/latex/contrib/l3experimental/l3draw.dtx index a42e75b75a..68f83903ec 100644 --- a/macros/latex/contrib/l3experimental/l3draw.dtx +++ b/macros/latex/contrib/l3experimental/l3draw.dtx @@ -110,7 +110,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % @@ -1136,7 +1136,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3draw}{2020-01-29}{} +\ProvidesExplPackage{l3draw}{2021-02-06}{} {L3 Experimental core drawing support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3draw.pdf b/macros/latex/contrib/l3experimental/l3draw.pdf index 4021d6a156..c93d56a3e6 100644 Binary files a/macros/latex/contrib/l3experimental/l3draw.pdf and b/macros/latex/contrib/l3experimental/l3draw.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3galley.dtx b/macros/latex/contrib/l3experimental/l3galley.dtx index 10a359f003..2209ce8d9e 100644 --- a/macros/latex/contrib/l3experimental/l3galley.dtx +++ b/macros/latex/contrib/l3experimental/l3galley.dtx @@ -61,7 +61,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % @@ -686,7 +686,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3galley}{2020-01-29}{} +\ProvidesExplPackage{l3galley}{2021-02-06}{} {L3 Experimental galley code} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3galley.pdf b/macros/latex/contrib/l3experimental/l3galley.pdf index 392daf3909..4e836f86ad 100644 Binary files a/macros/latex/contrib/l3experimental/l3galley.pdf and b/macros/latex/contrib/l3experimental/l3galley.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3graphics.dtx b/macros/latex/contrib/l3experimental/l3graphics.dtx index 280c368386..c244ad7258 100644 --- a/macros/latex/contrib/l3experimental/l3graphics.dtx +++ b/macros/latex/contrib/l3experimental/l3graphics.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % @@ -240,7 +240,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3graphics}{2020-01-29}{} +\ProvidesExplPackage{l3graphics}{2021-02-06}{} {L3 Experimental graphics inclusion support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3graphics.pdf b/macros/latex/contrib/l3experimental/l3graphics.pdf index c430eec006..835fc34762 100644 Binary files a/macros/latex/contrib/l3experimental/l3graphics.pdf and b/macros/latex/contrib/l3experimental/l3graphics.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3pdf-code.pdf b/macros/latex/contrib/l3experimental/l3pdf-code.pdf index ce06690f50..cc3e9f9c5e 100644 Binary files a/macros/latex/contrib/l3experimental/l3pdf-code.pdf and b/macros/latex/contrib/l3experimental/l3pdf-code.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3pdf.dtx b/macros/latex/contrib/l3experimental/l3pdf.dtx index 218f4bd5d5..f5a5c72cfe 100644 --- a/macros/latex/contrib/l3experimental/l3pdf.dtx +++ b/macros/latex/contrib/l3experimental/l3pdf.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % @@ -258,7 +258,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3pdf}{2020-01-29}{} +\ProvidesExplPackage{l3pdf}{2021-02-06}{} {L3 Experimental core PDF support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3pdf.pdf b/macros/latex/contrib/l3experimental/l3pdf.pdf index 1bdd3b530b..38b9038f82 100644 Binary files a/macros/latex/contrib/l3experimental/l3pdf.pdf and b/macros/latex/contrib/l3experimental/l3pdf.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3str-format.dtx b/macros/latex/contrib/l3experimental/l3str-format.dtx index 0751244b40..e39f2e7e03 100644 --- a/macros/latex/contrib/l3experimental/l3str-format.dtx +++ b/macros/latex/contrib/l3experimental/l3str-format.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % @@ -166,7 +166,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3str-format}{2020-01-29}{} +\ProvidesExplPackage{l3str-format}{2021-02-06}{} {L3 Experimental string formatting} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3str-format.pdf b/macros/latex/contrib/l3experimental/l3str-format.pdf index fd848569ca..df1b4600dc 100644 Binary files a/macros/latex/contrib/l3experimental/l3str-format.pdf and b/macros/latex/contrib/l3experimental/l3str-format.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.dtx b/macros/latex/contrib/l3experimental/l3sys-shell.dtx index 1126f56257..2e1d15d8db 100644 --- a/macros/latex/contrib/l3experimental/l3sys-shell.dtx +++ b/macros/latex/contrib/l3experimental/l3sys-shell.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % @@ -135,7 +135,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3sys-shell}{2020-01-29}{} +\ProvidesExplPackage{l3sys-shell}{2021-02-06}{} {L3 Experimental system shell functions} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.pdf b/macros/latex/contrib/l3experimental/l3sys-shell.pdf index 50f28c4226..a2de0baee3 100644 Binary files a/macros/latex/contrib/l3experimental/l3sys-shell.pdf and b/macros/latex/contrib/l3experimental/l3sys-shell.pdf differ diff --git a/macros/latex/contrib/l3experimental/xcoffins.dtx b/macros/latex/contrib/l3experimental/xcoffins.dtx index 8106487df7..37ef1c2cfe 100644 --- a/macros/latex/contrib/l3experimental/xcoffins.dtx +++ b/macros/latex/contrib/l3experimental/xcoffins.dtx @@ -22,9 +22,6 @@ % % for those people who are interested. % -%<*driver|package> -\RequirePackage{xparse} -% %<*driver> \documentclass[full]{l3doc} \usepackage{xcoffins} % Not yet part of expl3, so not in l3doc @@ -56,7 +53,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % @@ -675,7 +672,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xcoffins}{2020-01-29}{} +\ProvidesExplPackage{xcoffins}{2021-02-06}{} {L3 Experimental design level coffins} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/xcoffins.pdf b/macros/latex/contrib/l3experimental/xcoffins.pdf index ad6c06eb79..6c76fdd7b2 100644 Binary files a/macros/latex/contrib/l3experimental/xcoffins.pdf and b/macros/latex/contrib/l3experimental/xcoffins.pdf differ diff --git a/macros/latex/contrib/l3experimental/xgalley.dtx b/macros/latex/contrib/l3experimental/xgalley.dtx index a12bc47e20..9292de0889 100644 --- a/macros/latex/contrib/l3experimental/xgalley.dtx +++ b/macros/latex/contrib/l3experimental/xgalley.dtx @@ -23,9 +23,6 @@ % % for those people who are interested. % -%<*driver|package> -\RequirePackage{xparse} -% %<*driver> \documentclass[full]{l3doc} \begin{document} @@ -47,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-01-29} +% \date{Released 2021-02-06} % % \maketitle % @@ -734,9 +731,9 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xgalley}{2020-01-29}{} +\ProvidesExplPackage{xgalley}{2021-02-06}{} {L3 Experimental galley} -\RequirePackage{xparse,xtemplate,l3galley} +\RequirePackage{xtemplate,l3galley} % \end{macrocode} % % \subsection{Variables} diff --git a/macros/latex/contrib/l3experimental/xgalley.pdf b/macros/latex/contrib/l3experimental/xgalley.pdf index 6475274853..3d8a23cec1 100644 Binary files a/macros/latex/contrib/l3experimental/xgalley.pdf and b/macros/latex/contrib/l3experimental/xgalley.pdf differ diff --git a/macros/latex/contrib/l3kernel/CHANGELOG.md b/macros/latex/contrib/l3kernel/CHANGELOG.md index ce8e2d5ab6..2f39d7d20d 100644 --- a/macros/latex/contrib/l3kernel/CHANGELOG.md +++ b/macros/latex/contrib/l3kernel/CHANGELOG.md @@ -7,6 +7,11 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2021-02-06] + +### Changed +- Use new (internal) interface for kerns + ## [2021-02-02] ### Added @@ -831,7 +836,8 @@ this project uses date-based 'snapshot' version identifiers. - Step func­tions have been added for dim vari­ables, e.g. `\dim_step_in­line:nnnn` -[Unreleased]: https://github.com/latex3/latex3/compare/2021-02-02...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2021-02-06...HEAD +[2021-02-06]: https://github.com/latex3/latex3/compare/2021-02-02...2021-02-06 [2021-02-02]: https://github.com/latex3/latex3/compare/2021-01-09...2021-02-02 [2021-01-09]: https://github.com/latex3/latex3/compare/2020-12-07...2021-01-09 [2020-12-07]: https://github.com/latex3/latex3/compare/2020-12-05...2020-12-07 diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md index f3bec88c61..5e74712262 100644 --- a/macros/latex/contrib/l3kernel/README.md +++ b/macros/latex/contrib/l3kernel/README.md @@ -1,7 +1,7 @@ LaTeX3 Programming Conventions ============================== -Release 2021-02-02 +Release 2021-02-06 Overview -------- diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx index f2951e0c72..bf589f7c8c 100644 --- a/macros/latex/contrib/l3kernel/expl3.dtx +++ b/macros/latex/contrib/l3kernel/expl3.dtx @@ -24,7 +24,7 @@ % %<*driver|generic|package|2ekernel> % -\def\ExplFileDate{2021-02-02}% +\def\ExplFileDate{2021-02-06}% %<*driver> \documentclass[full]{l3doc} \usepackage{graphicx} @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf index 95ce931534..cf1c397ce1 100644 Binary files a/macros/latex/contrib/l3kernel/expl3.pdf and b/macros/latex/contrib/l3kernel/expl3.pdf differ diff --git a/macros/latex/contrib/l3kernel/interface3.pdf b/macros/latex/contrib/l3kernel/interface3.pdf index 556ae911ec..62ac1b4490 100644 Binary files a/macros/latex/contrib/l3kernel/interface3.pdf and b/macros/latex/contrib/l3kernel/interface3.pdf differ diff --git a/macros/latex/contrib/l3kernel/interface3.tex b/macros/latex/contrib/l3kernel/interface3.tex index ee49ebfcc3..3243a6e00e 100644 --- a/macros/latex/contrib/l3kernel/interface3.tex +++ b/macros/latex/contrib/l3kernel/interface3.tex @@ -54,7 +54,7 @@ for those people who are interested. {latex-team@latex-project.org}% }% } -\date{Released 2021-02-02} +\date{Released 2021-02-06} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx index 2992cb6ce3..535226f9b4 100644 --- a/macros/latex/contrib/l3kernel/l3basics.dtx +++ b/macros/latex/contrib/l3kernel/l3basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx index a612c61c75..2849deda77 100644 --- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx +++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx index 647f5b68dd..0247deaf42 100644 --- a/macros/latex/contrib/l3kernel/l3box.dtx +++ b/macros/latex/contrib/l3kernel/l3box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % @@ -917,6 +917,16 @@ % \end{macro} % \end{macro} % +% \begin{macro}{'\__kernel_kern:n} +% We need kerns in a few places. At present, we don't have a module for +% this concept, so it goes in at first use: here. The idea is to avoid +% repeated use of the bare primitive. +% \begin{macrocode} +\cs_new_protected:Npn \__kernel_kern:n #1 + { \tex_kern:D \@@_dim_eval:n {#1} } +% \end{macrocode} +% \end{macro} +% % \subsection{Creating and initialising boxes} % % \TestFiles{m3box001.lvt} @@ -1768,7 +1778,7 @@ \hbox_set:Nn \l_@@_internal_box { \box_use:N #1 } \hbox_set:Nn \l_@@_internal_box { - \tex_kern:D -\l_@@_left_new_dim + \__kernel_kern:n { -\l_@@_left_new_dim } \hbox:n { \@@_backend_rotate:Nn @@ -2227,7 +2237,7 @@ { \hbox_to_wd:nn { \l_@@_right_new_dim } { - \tex_kern:D \l_@@_right_new_dim + \__kernel_kern:n { \l_@@_right_new_dim } \box_use_drop:N \l_@@_internal_box \tex_hss:D } @@ -2236,7 +2246,7 @@ \box_set_wd:Nn \l_@@_internal_box { \l_@@_right_new_dim } \hbox:n { - \tex_kern:D \c_zero_dim + \__kernel_kern:n { 0pt } \box_use_drop:N \l_@@_internal_box \tex_hss:D } diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx index 9c7e925212..a19ed84dd3 100644 --- a/macros/latex/contrib/l3kernel/l3candidates.dtx +++ b/macros/latex/contrib/l3kernel/l3candidates.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % @@ -732,9 +732,9 @@ { \hbox_set:Nn \l_@@_internal_box { - \tex_kern:D - \@@_dim_eval:n {#2} + \__kernel_kern:n { -#2 } \box_use:N #1 - \tex_kern:D - \@@_dim_eval:n {#4} + \__kernel_kern:n { -#4 } } % \end{macrocode} % For the height and depth, there is a need to watch the baseline is @@ -809,9 +809,9 @@ { \hbox_set:Nn \l_@@_internal_box { - \tex_kern:D - \@@_dim_eval:n {#2} + \__kernel_kern:n { -#2 } \box_use:N #1 - \tex_kern:D \@@_dim_eval:n { #4 - \box_wd:N #1 } + \__kernel_kern:n { #4 - \box_wd:N #1 } } \dim_compare:nNnTF {#3} < \c_zero_dim { diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx index 003d1b4467..6e9d1c240c 100644 --- a/macros/latex/contrib/l3kernel/l3cctab.dtx +++ b/macros/latex/contrib/l3kernel/l3cctab.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx index 442674eb40..05b2ca2255 100644 --- a/macros/latex/contrib/l3kernel/l3clist.dtx +++ b/macros/latex/contrib/l3kernel/l3clist.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx index 1df2770f86..6dc7ab596e 100644 --- a/macros/latex/contrib/l3kernel/l3coffins.dtx +++ b/macros/latex/contrib/l3kernel/l3coffins.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % @@ -1412,10 +1412,8 @@ % \begin{macrocode} \hbox_set:Nn \l_@@_internal_box { - \tex_kern:D - \dim_eval:n + \__kernel_kern:n { \l_@@_bounding_shift_dim - \l_@@_left_corner_dim } - \exp_stop_f: \box_move_down:nn { \l_@@_bottom_corner_dim } { \box_use:N #1 } } @@ -1870,12 +1868,12 @@ \hbox_set:Nn \l_@@_aligned_coffin { \dim_compare:nNnT { \l_@@_offset_x_dim } < \c_zero_dim - { \tex_kern:D -\l_@@_offset_x_dim } + { \__kernel_kern:n { -\l_@@_offset_x_dim } } \hbox_unpack:N \l_@@_aligned_coffin \dim_set:Nn \l_@@_internal_dim { \l_@@_offset_x_dim - \box_wd:N #1 + \box_wd:N #4 } \dim_compare:nNnT \l_@@_internal_dim < \c_zero_dim - { \tex_kern:D -\l_@@_internal_dim } + { \__kernel_kern:n { -\l_@@_internal_dim } } } % \end{macrocode} % The coffin structure is reset, and the corners are cleared: only @@ -2001,8 +1999,8 @@ \hbox_set:Nn \l_@@_aligned_internal_coffin { \box_use:N #1 - \tex_kern:D -\box_wd:N #1 - \tex_kern:D \l_@@_offset_x_dim + \__kernel_kern:n { -\box_wd:N #1 } + \__kernel_kern:n { \l_@@_offset_x_dim } \box_move_up:nn { \l_@@_offset_y_dim } { \box_use:N #4 } } \coffin_set_eq:NN #9 \l_@@_aligned_internal_coffin @@ -2455,8 +2453,8 @@ \hbox_set:Nn \l_@@_aligned_coffin { \box_use:N \l_@@_display_coffin - \tex_kern:D -\box_wd:N \l_@@_display_coffin - \tex_kern:D \l_@@_offset_x_dim + \__kernel_kern:n { -\box_wd:N \l_@@_display_coffin } + \__kernel_kern:n { \l_@@_offset_x_dim } \box_move_up:nn { \l_@@_offset_y_dim } { \box_use:N #1 } } \box_set_ht:Nn \l_@@_aligned_coffin diff --git a/macros/latex/contrib/l3kernel/l3color-base.dtx b/macros/latex/contrib/l3kernel/l3color-base.dtx index 3e5eff250c..497f7fbe78 100644 --- a/macros/latex/contrib/l3kernel/l3color-base.dtx +++ b/macros/latex/contrib/l3kernel/l3color-base.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx index 198f701b5a..80a2cc426a 100644 --- a/macros/latex/contrib/l3kernel/l3debug.dtx +++ b/macros/latex/contrib/l3kernel/l3debug.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx index aa9c8178aa..96d386ecfe 100644 --- a/macros/latex/contrib/l3kernel/l3deprecation.dtx +++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx index 397e6f38b2..e3fd13dab6 100644 --- a/macros/latex/contrib/l3kernel/l3doc.dtx +++ b/macros/latex/contrib/l3kernel/l3doc.dtx @@ -57,7 +57,7 @@ and all files in that bundle must be distributed together. % % %<*driver|class> -\RequirePackage{expl3,xparse,calc} +\RequirePackage{expl3,calc} % % %<*driver> @@ -79,7 +79,7 @@ and all files in that bundle must be distributed together. % % \title{The \cls{l3doc} class} % \author{\Team} -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % \maketitle % \tableofcontents % @@ -168,7 +168,7 @@ and all files in that bundle must be distributed together. % Furthermore, we need another \enquote{layer} of documentation commands % to account for \enquote{user-macro} as opposed to % \enquote{code-functions}; the \pkg{expl3} functions should be -% documented differently, probably, to the \pkg{xparse} user macros (at +% documented differently, probably, to the \pkg{ltcmd} user macros (at % least in terms of indexing). % % In no particular order, a list of things to do: @@ -1590,7 +1590,7 @@ and all files in that bundle must be distributed together. % \begin{macro}{\@@_pdfstring_newline:w} % We avoid some hyperref warnings by making |\\| (almost) trivial in % bookmarks: more precisely it might be used with a star and an -% optional argument, which we thus remove using an \pkg{xparse} +% optional argument, which we thus remove using an \pkg{ltcmd} % expandable command. Since there cannot be trailing optional % arguments, pick up an extra mandatory one and put it back. % \begin{macrocode} @@ -2932,7 +2932,7 @@ and all files in that bundle must be distributed together. % % \begin{macro}{\@@_macro:nnw} % The arguments are a key--value list of \meta{options} and a -% comma-list of \meta{names}, read verbatim by \pkg{xparse}. First +% comma-list of \meta{names}, read verbatim by \pkg{ltcmd}. First % initialize some variables before applying the \meta{options}, then % parse the \meta{names} to get a sequence of macro names, then apply % \cs{@@_macro_single:nNN} to each (this step is more subtle than diff --git a/macros/latex/contrib/l3kernel/l3docstrip.dtx b/macros/latex/contrib/l3kernel/l3docstrip.dtx index aed912d754..a1f86a9c19 100644 --- a/macros/latex/contrib/l3kernel/l3docstrip.dtx +++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf index 00d32bcd1b..9ad75d5745 100644 Binary files a/macros/latex/contrib/l3kernel/l3docstrip.pdf and b/macros/latex/contrib/l3kernel/l3docstrip.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3expan.dtx b/macros/latex/contrib/l3kernel/l3expan.dtx index efff4bc496..0025d711d8 100644 --- a/macros/latex/contrib/l3kernel/l3expan.dtx +++ b/macros/latex/contrib/l3kernel/l3expan.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx index a34d734039..01693e26dc 100644 --- a/macros/latex/contrib/l3kernel/l3file.dtx +++ b/macros/latex/contrib/l3kernel/l3file.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx index 193dacb347..0e6892fc6d 100644 --- a/macros/latex/contrib/l3kernel/l3flag.dtx +++ b/macros/latex/contrib/l3kernel/l3flag.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx index 2a9dc638a9..4e5c3d6b45 100644 --- a/macros/latex/contrib/l3kernel/l3fp-assign.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-assign.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx index 565d9cc0fb..be4dec34c9 100644 --- a/macros/latex/contrib/l3kernel/l3fp-aux.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-aux.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx index b58e991be8..445ea0006d 100644 --- a/macros/latex/contrib/l3kernel/l3fp-basics.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-basics.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx index c3b6d9ada2..dbdee9f5b8 100644 --- a/macros/latex/contrib/l3kernel/l3fp-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-convert.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx index 28617289ff..38e41cd8fa 100644 --- a/macros/latex/contrib/l3kernel/l3fp-expo.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-expo.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx index 076cfbd6e4..549e9451ab 100644 --- a/macros/latex/contrib/l3kernel/l3fp-extended.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-extended.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx index 80a7a9947a..b2060ef461 100644 --- a/macros/latex/contrib/l3kernel/l3fp-logic.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-logic.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx index 37207e1b26..c8c0ed52dd 100644 --- a/macros/latex/contrib/l3kernel/l3fp-parse.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-parse.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx index 4e5d7bf9de..5cf52ba78e 100644 --- a/macros/latex/contrib/l3kernel/l3fp-random.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-random.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx index ef94103115..e2f868e939 100644 --- a/macros/latex/contrib/l3kernel/l3fp-round.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-round.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx index e0915c63f5..1e0524c092 100644 --- a/macros/latex/contrib/l3kernel/l3fp-traps.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-traps.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx index 113c8858a9..287efa3d54 100644 --- a/macros/latex/contrib/l3kernel/l3fp-trig.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-trig.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx index 6d04ac5b6d..aabdf04924 100644 --- a/macros/latex/contrib/l3kernel/l3fp.dtx +++ b/macros/latex/contrib/l3kernel/l3fp.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx index 457490afcd..8ed455c2df 100644 --- a/macros/latex/contrib/l3kernel/l3fparray.dtx +++ b/macros/latex/contrib/l3kernel/l3fparray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx index b22e7a9ac7..9a96fb09eb 100644 --- a/macros/latex/contrib/l3kernel/l3int.dtx +++ b/macros/latex/contrib/l3kernel/l3int.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx index 369788f9e3..97185bab73 100644 --- a/macros/latex/contrib/l3kernel/l3intarray.dtx +++ b/macros/latex/contrib/l3kernel/l3intarray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx index bc10c5e5c9..31484c0473 100644 --- a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx +++ b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % @@ -259,6 +259,13 @@ % that \tn{errorcontextlines} is $-1$ when displaying a message. % \end{function} % +% \begin{variable}{\__kernel_kern:n} +% \begin{syntax} +% \cs{__kernel_kern:n} \Arg{length} +% \end{syntax} +% Inserts a kern of the specified \meta{length}, a dimension expression. +% \end{variable} +% % \begin{function} % {\__kernel_msg_new:nnnn, \__kernel_msg_new:nnn} % \begin{syntax} diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx index 6476398791..03e7b5210c 100644 --- a/macros/latex/contrib/l3kernel/l3keys.dtx +++ b/macros/latex/contrib/l3kernel/l3keys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx index e8191b19c9..02b7e3037e 100644 --- a/macros/latex/contrib/l3kernel/l3legacy.dtx +++ b/macros/latex/contrib/l3kernel/l3legacy.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx index 26892b81c1..d58eeb5010 100644 --- a/macros/latex/contrib/l3kernel/l3luatex.dtx +++ b/macros/latex/contrib/l3kernel/l3luatex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx index b9d0c5f4b5..747d087bc9 100644 --- a/macros/latex/contrib/l3kernel/l3msg.dtx +++ b/macros/latex/contrib/l3kernel/l3msg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx index cd70775514..a456c295d3 100644 --- a/macros/latex/contrib/l3kernel/l3names.dtx +++ b/macros/latex/contrib/l3kernel/l3names.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf index 9be306f351..dd8b0b931e 100644 Binary files a/macros/latex/contrib/l3kernel/l3news.pdf and b/macros/latex/contrib/l3kernel/l3news.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news01.pdf b/macros/latex/contrib/l3kernel/l3news01.pdf index a58a6b2a9f..f14be43327 100644 Binary files a/macros/latex/contrib/l3kernel/l3news01.pdf and b/macros/latex/contrib/l3kernel/l3news01.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news02.pdf b/macros/latex/contrib/l3kernel/l3news02.pdf index a15fbd0f69..e60449a772 100644 Binary files a/macros/latex/contrib/l3kernel/l3news02.pdf and b/macros/latex/contrib/l3kernel/l3news02.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news03.pdf b/macros/latex/contrib/l3kernel/l3news03.pdf index 2621b17d60..f4b9bbed9b 100644 Binary files a/macros/latex/contrib/l3kernel/l3news03.pdf and b/macros/latex/contrib/l3kernel/l3news03.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news04.pdf b/macros/latex/contrib/l3kernel/l3news04.pdf index f234a371e7..3370183ddb 100644 Binary files a/macros/latex/contrib/l3kernel/l3news04.pdf and b/macros/latex/contrib/l3kernel/l3news04.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news05.pdf b/macros/latex/contrib/l3kernel/l3news05.pdf index cb71d32c6a..7ce5287d25 100644 Binary files a/macros/latex/contrib/l3kernel/l3news05.pdf and b/macros/latex/contrib/l3kernel/l3news05.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news06.pdf b/macros/latex/contrib/l3kernel/l3news06.pdf index 7e1d1b4842..f894701058 100644 Binary files a/macros/latex/contrib/l3kernel/l3news06.pdf and b/macros/latex/contrib/l3kernel/l3news06.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news07.pdf b/macros/latex/contrib/l3kernel/l3news07.pdf index 7cf72e1b1a..4d31b834ce 100644 Binary files a/macros/latex/contrib/l3kernel/l3news07.pdf and b/macros/latex/contrib/l3kernel/l3news07.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news08.pdf b/macros/latex/contrib/l3kernel/l3news08.pdf index 85a3340bda..1bd8516026 100644 Binary files a/macros/latex/contrib/l3kernel/l3news08.pdf and b/macros/latex/contrib/l3kernel/l3news08.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news09.pdf b/macros/latex/contrib/l3kernel/l3news09.pdf index 7da363ec51..0e9df261fc 100644 Binary files a/macros/latex/contrib/l3kernel/l3news09.pdf and b/macros/latex/contrib/l3kernel/l3news09.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news10.pdf b/macros/latex/contrib/l3kernel/l3news10.pdf index 5558d8c2f8..dd97f75d0b 100644 Binary files a/macros/latex/contrib/l3kernel/l3news10.pdf and b/macros/latex/contrib/l3kernel/l3news10.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news11.pdf b/macros/latex/contrib/l3kernel/l3news11.pdf index 36cdb2411b..a0e9a272c6 100644 Binary files a/macros/latex/contrib/l3kernel/l3news11.pdf and b/macros/latex/contrib/l3kernel/l3news11.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news12.pdf b/macros/latex/contrib/l3kernel/l3news12.pdf index d9d55511a3..13621d6f7c 100644 Binary files a/macros/latex/contrib/l3kernel/l3news12.pdf and b/macros/latex/contrib/l3kernel/l3news12.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3prefixes.pdf b/macros/latex/contrib/l3kernel/l3prefixes.pdf index 613ca272b9..ebb1745f91 100644 Binary files a/macros/latex/contrib/l3kernel/l3prefixes.pdf and b/macros/latex/contrib/l3kernel/l3prefixes.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3prg.dtx b/macros/latex/contrib/l3kernel/l3prg.dtx index 0f707ad0e8..a8089df0b4 100644 --- a/macros/latex/contrib/l3kernel/l3prg.dtx +++ b/macros/latex/contrib/l3kernel/l3prg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx index b278969850..fe8ffaf588 100644 --- a/macros/latex/contrib/l3kernel/l3prop.dtx +++ b/macros/latex/contrib/l3kernel/l3prop.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx index ab96c815d5..3b7d7ea1c2 100644 --- a/macros/latex/contrib/l3kernel/l3quark.dtx +++ b/macros/latex/contrib/l3kernel/l3quark.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx index b9dbe7d270..c26c8c0dd0 100644 --- a/macros/latex/contrib/l3kernel/l3regex.dtx +++ b/macros/latex/contrib/l3kernel/l3regex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx index afd444f50d..134f3c57dc 100644 --- a/macros/latex/contrib/l3kernel/l3seq.dtx +++ b/macros/latex/contrib/l3kernel/l3seq.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx index 94aca857b0..fe5be582f5 100644 --- a/macros/latex/contrib/l3kernel/l3skip.dtx +++ b/macros/latex/contrib/l3kernel/l3skip.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx index 07e574abbf..b55b2223da 100644 --- a/macros/latex/contrib/l3kernel/l3sort.dtx +++ b/macros/latex/contrib/l3kernel/l3sort.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx index 52066270d8..9ea4c90166 100644 --- a/macros/latex/contrib/l3kernel/l3str-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3str-convert.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx index b8a3186538..00c26f5f45 100644 --- a/macros/latex/contrib/l3kernel/l3str.dtx +++ b/macros/latex/contrib/l3kernel/l3str.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf index 2adb562237..484275928c 100644 Binary files a/macros/latex/contrib/l3kernel/l3styleguide.pdf and b/macros/latex/contrib/l3kernel/l3styleguide.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3styleguide.tex b/macros/latex/contrib/l3kernel/l3styleguide.tex index 336d83c0f9..645fe07fd9 100644 --- a/macros/latex/contrib/l3kernel/l3styleguide.tex +++ b/macros/latex/contrib/l3kernel/l3styleguide.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2021-02-02} +\date{Released 2021-02-06} \begin{document} diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf index d4bdd5bd8d..0a29f62dc5 100644 Binary files a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf and b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.tex b/macros/latex/contrib/l3kernel/l3syntax-changes.tex index 4a9cd46123..670bbd3e13 100644 --- a/macros/latex/contrib/l3kernel/l3syntax-changes.tex +++ b/macros/latex/contrib/l3kernel/l3syntax-changes.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2021-02-02} +\date{Released 2021-02-06} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx index 538b7b860b..8761c5f4e7 100644 --- a/macros/latex/contrib/l3kernel/l3sys.dtx +++ b/macros/latex/contrib/l3kernel/l3sys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf index 275d749a38..26c76842fd 100644 Binary files a/macros/latex/contrib/l3kernel/l3term-glossary.pdf and b/macros/latex/contrib/l3kernel/l3term-glossary.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.tex b/macros/latex/contrib/l3kernel/l3term-glossary.tex index 1825fed3a9..97580c6b7c 100644 --- a/macros/latex/contrib/l3kernel/l3term-glossary.tex +++ b/macros/latex/contrib/l3kernel/l3term-glossary.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2021-02-02} +\date{Released 2021-02-06} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx index 2b84ae3b5c..8ebc6e3ccb 100644 --- a/macros/latex/contrib/l3kernel/l3text-case.dtx +++ b/macros/latex/contrib/l3kernel/l3text-case.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx index 1ded5b386f..2495a89db0 100644 --- a/macros/latex/contrib/l3kernel/l3text-purify.dtx +++ b/macros/latex/contrib/l3kernel/l3text-purify.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx index c374836616..2634fd0a4c 100644 --- a/macros/latex/contrib/l3kernel/l3text.dtx +++ b/macros/latex/contrib/l3kernel/l3text.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx index 4a39de840d..8bc8bb8652 100644 --- a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx +++ b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx index cc8183c7a1..5e11227e3c 100644 --- a/macros/latex/contrib/l3kernel/l3tl.dtx +++ b/macros/latex/contrib/l3kernel/l3tl.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx index 5313d9d8f6..a0027a698b 100644 --- a/macros/latex/contrib/l3kernel/l3token.dtx +++ b/macros/latex/contrib/l3kernel/l3token.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx index 11fd169518..8d4c2092ae 100644 --- a/macros/latex/contrib/l3kernel/l3unicode.dtx +++ b/macros/latex/contrib/l3kernel/l3unicode.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-02-02} +% \date{Released 2021-02-06} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf index 87e2f72f2e..2c5c8920da 100644 Binary files a/macros/latex/contrib/l3kernel/source3.pdf and b/macros/latex/contrib/l3kernel/source3.pdf differ diff --git a/macros/latex/contrib/l3kernel/source3.tex b/macros/latex/contrib/l3kernel/source3.tex index 7a1d21fb4d..60ca616620 100644 --- a/macros/latex/contrib/l3kernel/source3.tex +++ b/macros/latex/contrib/l3kernel/source3.tex @@ -53,7 +53,7 @@ for those people who are interested. {latex-team@latex-project.org}% }% } -\date{Released 2021-02-02} +\date{Released 2021-02-06} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/moodle/README.md b/macros/latex/contrib/moodle/README.md index 83eb22b4bf..30e1b4a976 100644 --- a/macros/latex/contrib/moodle/README.md +++ b/macros/latex/contrib/moodle/README.md @@ -10,7 +10,7 @@ part of all distributions of LaTeX version 2005/12/01 or later. Original contents (2016): [Anders O.F. Hendrickson](/author/hendrickson) ([contact](mailto:anders.o.f.hendricksonATgmail.com)) -2019-2021: [Matthieu Guerquin-Kern](author/guerquin-kern) ([contact](mailto:guerquin-kernATcrans.org)) +2019-2021: [Matthieu Guerquin-Kern](/author/guerquin-kern) ([contact](mailto:guerquin-kernATcrans.org)) # Contents @@ -19,6 +19,9 @@ This work, under version number 0.8, consists of the files [`moodle.ins`](/tex-archive/macros/latex/contrib/moodle/moodle.ins), and the derived documentation file [`moodle.pdf`](/tex-archive/macros/latex/contrib/moodle/moodle.pdf). +The derived file `moodle.sty` can be downloaded from [here](https://www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/moodle/moodle.sty?view=co). +Details on how to generate derived files from the sources are given in Section "Building" at the end of this document. + A TDS archive [moodle.tds.zip](http://mirrors.ctan.org/install/macros/latex/contrib/moodle.tds.zip) is also available to be conveniently expanded in your local texmf directory. It contains the derived file `moodle.sty` and a set of test files. @@ -65,3 +68,4 @@ The documentation file `moodle.pdf` can be generated by running twice the comman ```bash lualatex -shell-escape moodle.dtx ``` +(n.b. the requirements in the previous section) diff --git a/macros/latex/contrib/moodle/moodle.dtx b/macros/latex/contrib/moodle/moodle.dtx index 17a7b125b4..9e932fb576 100644 --- a/macros/latex/contrib/moodle/moodle.dtx +++ b/macros/latex/contrib/moodle/moodle.dtx @@ -17,7 +17,7 @@ % The Current Maintainer of this work is Matthieu Guerquin-Kern. % % This work consists of the files moodle.dtx and moodle.ins -% and the derived files moodle.sty and getitems.sty. +% and the derived file moodle.sty. % % \fi % @@ -28,7 +28,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{moodle} %<*package> - [2021/01/04 v0.8 Moodle quiz XML generation] + [2021/02/07 v0.9 Moodle quiz XML generation] % % %<*driver> @@ -44,7 +44,8 @@ \setmainfont[Mapping=tex-text]{Linux Libertine O} \fi %\usepackage{moodle}[2020/07/09] -\usepackage{amssymb,metalogo,multirow,threeparttable,booktabs,hyperref,tikz,minted,changelog} +\usepackage{amssymb,metalogo,multirow,threeparttable,booktabs} +\usepackage{hyperref,tikz,minted,changelog} \usetikzlibrary{arrows,positioning,decorations.text} %\usemintedstyle{Wombat} \EnableCrossrefs @@ -58,7 +59,7 @@ % % \fi % -% \CheckSum{7442} ^^A Comment \OnlyDescription above to adjust +% \CheckSum{7729} ^^A Comment \OnlyDescription above to adjust % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -89,9 +90,9 @@ % \author{Anders Hendrickson\footnote{original author of the package (\texttt{v0.5}), inactive.}\\ % \texttt{anders.o.f.hendrickson AT gmail.com} \and % Matthieu Guerquin-Kern\footnote{current maintainer, author of the updates (\texttt{v0.6} -% to \texttt{v0.8}), partially funded by \href{https://www.ensea.fr/en/}{ENSEA Graduate School}, France.}\\ +% to \texttt{v0.9}), partially funded in 2019 by \href{https://www.ensea.fr/en/}{ENSEA Graduate School}, France.}\\ % \href{mailto:guerquin-kern AT crans.org}{guerquin-kern AT crans.org}} -% \date{January 4, 2021} +% \date{February 7, 2021} % % \maketitle % @@ -238,11 +239,15 @@ % \end{figure} % % \section{Usage}\label{sect:usage} -% \subsection{Example Document} -% % The following pages presume the reader already has some familiarity with creating % and editing Moodle quizzes through the web interface. +% Users that are not familiar with Moodle quizzes can learn more in the Moodle +% documentation. For instance, \url{https://docs.moodle.org/310/en/Question_types}. +% % The |xkeyval| package is used to provide a key-value interface. +% +% \subsection{Example Document} +% % Here is a simple example document: % \begin{VerbatimOut}[gobble=1]{minted.doc.out} % \documentclass[12pt]{article} @@ -318,7 +323,7 @@ % file. This stamp contains information gathered about the TeX engine, % the operating system used and the package version. For instance: % \begin{quote}\small -% ||\\ +% ||\\ % || % \end{quote} % The package option @@ -454,28 +459,34 @@ % may also be given by setting the |feedback| key \emph{at the individual answer}. % % \DescribeMacro{tags} -% The |tags| key sets a keyword for the question that will be taken into account by Moodle for -% filtering purposes or classification of questions inside the question bank. It is possible -% for instance to build a quiz with questions cherry-picked among the set of questions holding -% a particular tag. +% The |tags| key sets a list of keywords for the question that will be taken into account +% by Moodle for filtering purposes or classification of questions inside the question bank. +% It is possible for instance to build a quiz with questions cherry-picked among the set of +% questions holding a particular tag. % For example, one might set % \begin{center} % |tags={easy}| % \end{center} -% The desired tag should be included in braces. +% The desired tag should be specified in between braces. Multiple tags can be set as a +% comma-separated list: +% \begin{center} +% |tags={tag1,tag2,{ leading whitespace},{including, comma}}| +% \end{center} % -% Tags can be assigned at two levels. If the |tags| key is set at the quiz level, -% then that tags will be assigned by default to each question of the quiz. +% Tags can be assigned at two levels. If the |tags| key is set at the quiz level, +% then that tag list will serve as a default for each question of the quiz. % Question-specific tags can be assigned by setting the |tags| key \emph{at the question level}. -% Since only single tag is supported, the tag a the question-level overrides eventual tags -% specified at the quiz-level. +% The question-level |tags| key overrides eventual quiz-level tags. +% +% Users willing to specify a same tag for all questions of the quiz could +% also rely on Moodle's category mechanism. % -% \subsection{Question Types} +% \subsection{\href{https://docs.moodle.org/en/Question_types}{Question Types}} % % We next discuss the various question types supported by \textsf{moodle} % and the options that may be set. % -%\subsubsection{True/False} +%\subsubsection{\href{https://docs.moodle.org/en/True/False_question_type}{True/False}} % % \DescribeMacro{truefalse} % The syntax for a True/False question is as follows: @@ -502,7 +513,7 @@ % % With the True/False question type, the |penalty| key has no effect. % -% \subsubsection{Multiple Choice} +% \subsubsection{\href{https://docs.moodle.org/310/Multiple_Choice_question_type}{Multiple Choice}} % % \DescribeMacro{multi} % The syntax for a classic multiple choice question, @@ -593,7 +604,22 @@ % Note that, in this example, negative fractions are set for wrong choices. This % prevents students selecting all options to obtain a good grade with no merit. % -% \subsubsection{Numerical} +% \DescribeMacro{allornothing} +% There also exists a \href{https://moodle.org/plugins/qtype_multichoiceset} +% {``All-or-Nothing Multiple Choice''} plugin for Moodle that introduces a +% question type similar to a multiple choice with multiple correct answers, +% with the specificity that the points are given if and only if the student +% selects all correct answers. This kind of question is set up using the +% |allornothing| key. +% The recommended way for designating correct answers is with |\item*|. If instead +% the |fraction| is used, \textsf{moodle} moodle will consider that non-negative +% fractions ($>0$) designate correct answers and negative fractions ($\leq 0$) +% designate incorrect choices. +% The option |allornothing| supersedes the options |multiple| and |single|. +% To the best of our knowledge, Moodle does not offer the all-or-nothing behavior +% for multiple choice questions embedded inside a cloze question. +% +% \subsubsection{\href{https://docs.moodle.org/en/Numerical_question_type}{Numerical}} % % A numerical question in Moodle requires the student % to input a real number in decimal form. @@ -647,7 +673,7 @@ % % Units, unit-handling and multipliers are currently unsupported. % -% \subsubsection{Short Answer} +% \subsubsection{\href{https://docs.moodle.org/en/Short-Answer_question_type}{Short Answer}} % A short answer question resembles a numerical question: the student is to fill % in a text box with a missing word or phrase. % \begin{quote} @@ -694,7 +720,7 @@ % \item any non empty answer will match the pattern |*| (wildcard alone). % \end{itemize} % -% \subsubsection{Essay}\label{subsubsect:essay} +% \subsubsection{\href{https://docs.moodle.org/en/Essay_question_type}{Essay}}\label{subsubsect:essay} % Instructors may ask essay questions on a Moodle quiz, % although Moodle's software is not up to the task of grading them! % Instead each essay question answer must be graded manually by the @@ -737,6 +763,12 @@ % % \DescribeMacro{response field lines} % The key |response field lines| controls the height of the input box. +% For Moodle, the admissible values are: 5, 10, 15, 20, 25, 30, 35, and 40. +% If the value set is not admissible, \textsf{moodle} will approximate the value: +% \begin{itemize} +% \item with either 5 or 40 if the value set was out of range, or +% \item with the next multiple of 5 otherwise. +% \end{itemize} % The default is |response field lines=15|. % % \DescribeMacro{attachments allowed} @@ -752,7 +784,7 @@ % will edit and/or type over, with the key |template=|\marg{template}. % The \meta{template} should be enclosed in braces. % -% \subsubsection{Matching} +% \subsubsection{\href{https://docs.moodle.org/en/Matching_question_type}{Matching}} % % A matching question offers a series of subquestions % and a set of possible answers from which to choose. @@ -784,7 +816,8 @@ % \DescribeMacro{drag and drop}\DescribeMacro{dd} % The standard matching question offered by Moodle corresponds to % a dropdown box for choosing the answer to each question. -% There also exists a ``drag and drop matching'' plugin for Moodle that +% There also exists a \href{https://docs.moodle.org/310/en/Drag_and_drop_matching_question_type} +% {``drag and drop matching''} plugin for Moodle that % shows all questions in one column, % all answers in a second column, and allows students to drag the correct % answer to the question using a mouse. @@ -793,7 +826,8 @@ % If you choose the standard format, then due to the limitations of % dropdown boxes, no \LaTeX\ or HTML code can be used in the answers. % -% \subsubsection{Cloze Questions and Subquestions} +% \subsubsection{\href{https://docs.moodle.org/en/Embedded_Answers_(Cloze)_question_type} +% {Cloze Questions and Subquestions}} % % A ``cloze question'' has one or more subquestions embedded within a passage of text. % For example, you might ask students to fill in several missing words within @@ -852,7 +886,7 @@ % Within a cloze question, the short answer question can be made case sensitive. % This option, disabled by default, is selected with |case sensitive| or |usecase|. % -%\subsubsection{Description} +%\subsubsection{\href{https://docs.moodle.org/en/Description_question_type}{Description}} % % The Moodle description type is not really a question. It is more like a label. % One can set a |feedback| that the student gets when reviewing the submission. @@ -878,51 +912,51 @@ % \caption{Options offered at the question and answer levels for each question type.} % \label{tab:key-options} % \small -% \begin{tabular}{*{14}{l}} +% \begin{tabular}{*{15}{l}} % \toprule -% & \multicolumn{10}{l}{Question} & \multicolumn{3}{l}{Answer}\\ -% \cmidrule(lr){2-11}\cmidrule(lr){12-14} +% & \multicolumn{11}{l}{Question} & \multicolumn{3}{l}{Answer}\\ +% \cmidrule(lr){2-12}\cmidrule(lr){13-15} % Question type & \rotatebox{90}{points} & % \rotatebox{90}{penalty} & \rotatebox{90}{feedback} & \rotatebox{90}{tags} & % \rotatebox{90}{shuffle} & \rotatebox{90}{numbering} & \rotatebox{90}{multiple} & -% \rotatebox{90}{usecase} & \rotatebox{90}{tolerance} &\rotatebox{90}{dd} & -% \rotatebox{90}{fraction} & \rotatebox{90}{feedback} & +% \rotatebox{90}{allornothing} &\rotatebox{90}{usecase} & \rotatebox{90}{tolerance} & +% \rotatebox{90}{dd} & \rotatebox{90}{fraction} & \rotatebox{90}{feedback} & % \rotatebox{90}{tolerance}\\\cmidrule(lr){1-1}\cmidrule(lr){2-2}\cmidrule(lr){3-3} % \cmidrule(lr){4-4}\cmidrule(lr){5-5}\cmidrule(lr){6-6}\cmidrule(lr){7-7} % \cmidrule(lr){8-8}\cmidrule(lr){9-9}\cmidrule(lr){10-10}\cmidrule(lr){11-11} -% \cmidrule(lr){12-12}\cmidrule(lr){13-13}\cmidrule(lr){14-14} +% \cmidrule(lr){12-12}\cmidrule(lr){13-13}\cmidrule(lr){14-14}\cmidrule(lr){15-15} % \href{https://docs.moodle.org/35/en/Multiple_Choice_question_type} % {Multichoice} & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & -% $\bullet$ & $\bullet$ & $\bullet$ & & & & $\bullet$ & $\bullet$ \\ +% $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & & & $\bullet$ & $\bullet$ \\ % \href{https://docs.moodle.org/35/en/Numerical_question_type}{Numerical} -% & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & & +% & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & & & % & & $\bullet$ & & $\bullet$ & $\bullet$ & $\bullet$ \\ % \href{https://docs.moodle.org/35/en/Short-Answer_question_type}{Short -% Answer} & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & & +% Answer} & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & & & % & $\bullet$ & & & $\bullet$ & $\bullet$ \\ % \href{https://docs.moodle.org/35/en/Matching_question_type}{Matching} -% & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & +% & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & & % & & & $\bullet$ & $\bullet$ & \\ % \href{https://docs.moodle.org/35/en/True/False_question_type} -% {True/False} & $\bullet$ & & $\bullet$ & $\bullet$ & & & +% {True/False} & $\bullet$ & & $\bullet$ & $\bullet$ & & & & % & & & & & $\bullet$ \\ % \href{https://docs.moodle.org/35/en/Description_question_type} -% {Description} & & & $\bullet$ & $\bullet$ & & & +% {Description} & & & $\bullet$ & $\bullet$ & & & & % & & & & & \\ % ^^A\href{https://docs.moodle.org/35/en/Essay_question_type}{Essay} & \\\hline% % \href{https://docs.moodle.org/35/en/Embedded_Answers_(Cloze)_question_type}{Cloze} -% & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & & & +% & & $\bullet$ & $\bullet$ & $\bullet$ & & & & % & & & & & \\\cmidrule(lr){1-1} -% \hspace{1em}Numerical & $\bullet$ & & & & & & +% \hspace{1em}Numerical & $\bullet$ & & & & & & & % & &$\bullet$ & & $\bullet$ & $\bullet$ & $\bullet$ \\ -% \hspace{1em}Short Answer & $\bullet$ & & & & & & +% \hspace{1em}Short Answer & $\bullet$ & & & & & & & % & $\bullet$ & & & $\bullet$ & $\bullet$ \\ -% \hspace{1em}Multi (regular) & $\bullet$ & & & & $\bullet$ & & $\bullet$ +% \hspace{1em}Multi (inline) & $\bullet$ & & & & $\bullet$ & & & % & & & & $\bullet$ & $\bullet$ \\ % \hspace{1em}Multi (horizontal)& $\bullet$ & & & & $\bullet$ & & $\bullet$ -% & & & & $\bullet$ & $\bullet$ \\ -% \hspace{1em}Multi (vertical)& $\bullet$ & & & & $\bullet$ & & -% & & & & $\bullet$ & $\bullet$ \\ +% & & & & & $\bullet$ & $\bullet$ \\ +% \hspace{1em}Multi (vertical)& $\bullet$ & & & & $\bullet$ & & $\bullet$ +% & & & & & $\bullet$ & $\bullet$ \\ % \bottomrule % \end{tabular} % \end{table} @@ -945,7 +979,7 @@ % \toprule % \multicolumn{2}{l}{Macros} & Commands & Environnments \\ % \cmidrule(lr){1-2}\cmidrule(lr){3-3}\cmidrule(lr){4-4} -% |~| & |\#| &|\emph{}| & |\begin{center}|\\ +% |\%| & |\#| &|\emph{}| & |\begin{center}|\\ % |\$| & |\&| &|\textbf{}| & |\begin{enumerate}|\\ % |\\| & |\par| &|\textit{}| & |\begin{itemize}|\\ % |\&| & |\S| & |\texttt{}| & |\begin{tikzpicture}|\\ @@ -956,7 +990,7 @@ % |\euro| & |\texteuro| & |\fup{}| & \\ % |\TeX| & |\LaTeX|& |\textsubscript{}| & \\ % |\_| & |\textbackslash| & |\url{}| & \\ -% & & |\href{}{}| & \\ +% |~| & & |\href{}{}| & \\ % & & |\tikz[]{}| & \\ % & & |\includegraphics[]{}| & \\ % & & |\verbatiminput{}| & \\ @@ -967,22 +1001,40 @@ % \bottomrule % \end{tabular} % \end{table} -% Single and double quotation marks, french quotation marks, inverted exclamation and -% question marks, and the diacritical -% commands |\^|, |\'|, |\`|, |\"|, |\~|, |\c|, |\H|, |\u| and |\v| are also handled, -% as are the characters |\aa|, |\ae|, |\l|, |\oe|, |\o|, |\ss|, and their -% capitalizations. See Tables~\ref{tab:diacritical}, \ref{tab:ligatures}, and -% \ref{tab:other} for more details. +% Single and double quotation marks (with german variants), french quotation marks, +% inverted exclamation and question marks, and the diacritical +% commands |\^|, |\'|, |\`|, |\"|, |\~|, |\c|, |\H|, |\k|, |\u| and |\v| are +% also handled, as are the characters |\aa|, |\ae|, |\l|, |\oe|, +% |\o|, |\ss|, and their capitalizations. See Tables~\ref{tab:diacritical}, +% \ref{tab:ligatures}, and \ref{tab:other} for more details. % % In addition, |<| and |>| will be converted to |<| and |>| \emph{within math mode only}. % If they should be typed outside of math mode, they will be passed as typed to % the HTML, and probably interpreted by students' browsers as HTML tags % or other unpredicated results. +% A doubled dash will be converted to en-dash |–| \emph{outside math mode}. % % Be aware that \emph{\textsf{moodle} does not know how to convert any % other \TeX\ or \LaTeX\ commands to HTML.} % If other sequences are used, they may be passed verbatim to the XML file % or may cause unpredicted results. +% +% \DescribeMacro{\htmlonly}The |\htmlonly|\oarg{Content for traditional output} +% \marg{HTML content} command is to be used inside question environments (text, +% answers, or feedback). It lets you pass directly code to the XML file while being +% ignored for the traditional output (PDF). The HTML content passed as an argument +% is subject to no particular processing and users should not expect to be able to +% pass dangerous characters like |\|, |%|, or |#|. An optional argument allows to +% pass contents to be processed for the traditional output. This argument is +% ignored for the XML output. +% For instance, one can write code like this in a question environment +% \begin{quote} +% |\htmlonly[\fbox{PDF contents}]{|\\ +% |
|\\ +% \rule{10em}{0pt}|HTML contents
|\\ +% |}| +% \end{quote} +% % \DescribeMacro{\htmlregister}The |\htmlregister| command lets you specify % the macros that must be expanded in the XML file. It works only when no % optional argument is used. @@ -996,9 +1048,8 @@ % Again, this works only if the macros are defined \emph{without} optional % argument. % -% If you think of another \LaTeX\ command that should be changed to an HTML equivalent, -% please contact the maintainer at \url{guerquin-kern AT crans.org} -% so that it may be added to a future revision of the package. +% If you think of another \LaTeX\ command that should be changed to an HTML +% equivalent, please have a look at Section~\ref{sec:dev}. % % \section{Graphics} % The \textsf{moodle} package can handle two kinds of graphics seamlessly. @@ -1042,6 +1093,10 @@ %^^A \marg{native extension}\marg{command line for conversion}. % % \subsection{\TikZ\ Pictures} +% \TikZ\ is a user-friendly syntax layer for PGF, the macro \LaTeX\ package for creating +% graphics. Users that are not familiar with TikZ\ can learn more here: +% \url{https://ctan.org/pkg/pgf}. +% % When \TikZ\ is loaded and used to define pictures, \textsf{moodle} invokes % the |external| \TikZ\ library, so that each |tikzpicture| environment is compiled % to a freestanding PDF file. @@ -1112,9 +1167,10 @@ % environment or trust the files handled at the system-level, you may want to disable this % over-zelous security policy. For example, % \href{https://stackoverflow.com/a/52661288/14608059}{see this}. -% \item Users of the |circuitikz| package must enclose their circuits' \TikZ\ code in the -% |tikzpicture| environment instead of |circuitikz|. That is required, -% as of \TikZ\ 2.1, by the |external| library. +% \item Users of the |circuitikz| package (\url{https://www.ctan.org/pkg/circuitikz}) must +% enclose their circuits' \TikZ\ code in the |tikzpicture| environment instead of +% the historical |circuitikz| environment. That is required, as of \TikZ\ 2.1, +% by the |external| library. % \end{itemize} % % \subsection{Package Option \texttt{svg}}\label{subsec:svg} @@ -1169,6 +1225,10 @@ % specified language. % \end{enumerate} % The \textsf{moodle} package handles these three commands to pass the code in the output XML. +% With |\inputminted|, an external Python tool, \textsc{pygmentize}, performs syntax analysis and +% its HTML formatter is used to populate the XML. With the other commands, the contents of the +% file is passed as-is to the XML. A drawback of this approach, is that characters |<|, |>|, +% |&|, |'|, and |"| are likely to mislead the web browser rendering the question on Moodle. % % With |\VerbatimInput| and |\inputminted|, the options that are taken care of for XML % generation are listed in Table~\ref{tab:verbatim-options}. Using |\fvset|\marg{key=value,...}, @@ -1209,6 +1269,53 @@ % \textsf{filecontents} package or \LaTeX\ kernel itself since 2019) or |VerbatimOut| % (from the \textsf{fancyvrb} and \textsf{fvextra} packages). % +% Here is an example: +% \begin{VerbatimOut}[gobble=2]{minted.doc.out} +% \documentclass[12pt,a4paper]{article} +% \usepackage[section]{moodle} +% \usepackage{minted} +% \begin{document} +% \begin{quiz}[tags={minted}]{LaTeX Quiz} +% \begin{filecontents*}{excerpt.tex} +% % !TeX encoding = UTF-8 +% % !TeX spellcheck = en_US +% % !TEX TS-program = lualatex +% \documentclass{article} +% \usepackage[nostamp]{moodle} +% \ifPDFTeX % FOR LATEX and PDFLATEX +% \usepackage[utf8]{inputenc} % necessary +% \usepackage[T1]{fontenc} % necessary +% \else % assuming XELATEX or LUALATEX +% \usepackage{fontspec} +% \fi +% \end{filecontents*} +% \begin{numerical}[tolerance=0]{Loading a Class} +% Consider the following \LaTeX\ code excerpt.\\ +% \inputminted[numbers=left]{latex}{excerpt.tex} +% On which line is the class loaded? +% \item[feedback={ +% yes! \inputminted[highlightlines={4}]{latex}{excerpt.tex} +% } ] 4 +% \item[feedback={No. On line 3, there is only a comment.}, +% fraction=0] 3 +% \item[feedback={No. On line 5, the package \texttt{moodle} is loaded.}, +% fraction=0] 5 +% \end{numerical} +% \begin{multi}[single]{IDE} +% Consider the following \LaTeX\ code excerpt.\\ +% \inputminted[numbers=left]{latex}{excerpt.tex} +% Which \TeX\ engine will be used by the IDE for compilation. +% \item[feedback={Have a closer look at line 3}] \texttt{tex} +% \item[feedback={Have a closer look at line 3}] \texttt{latex} +% \item[feedback={Have a closer look at line 3}] \texttt{pdflatex} +% \item[feedback={Have a closer look at line 3}] \texttt{xelatex} +% \item* \texttt{lualatex} +% \end{multi} +% \end{quiz} +% \end{document} +% \end{VerbatimOut} +% \inputminted[gobble=2,frame=lines]{latex}{minted.doc.out} +% % When code decorated with left-side line numbers is placed in question items, the output PDF could % show a collision between numbers of the item and the first line. To avoid this, |\LVerbatimInput| or % |\BVerbatimInput| can be used. Instead, when \textsf{minted} is used, the ``left-right'' mode can be @@ -1217,8 +1324,8 @@ % |\RecustomVerbatimEnvironment{Verbatim}{LVerbatim}{}| % \end{quote} % -% When using utilies from \textsf{fancyvrb}, \textsf{fvextra}, or \textsf{minted}, \textsf{moodle} sets -% framing options for the display of code in the output PDF: +% When using utilities from \textsf{fancyvrb}, \textsf{fvextra}, or \textsf{minted}, \textsf{moodle} +% sets framing options for the display of code in the output PDF: % \begin{quote} % |\fvset{frame=lines,label={[Beginning of code]End of code},|\\ % | framesep=3mm,numbersep=9pt}| @@ -1233,11 +1340,11 @@ % the same prototype. % % We suggest to apply a specific tag to these questions. After import in Moodle, when creating -% a quizz, this tag can be selected to narrow down a random selection of question. +% a quizz, this tag can be selected to narrow down a random selection of questions. % This would mimic the behavior of calculated questions while bringing the flexibility of your % favorite scripting language. % -% Here are two examples inspired from the work of A. Wohns. The first one relies on the +% Here are two examples inspired from the work of A. Vohns. The first one relies on the % native Lua capabilities of \LuaLaTeX. % \begin{VerbatimOut}[gobble=1]{minted.doc.out} % \begin{quiz}[tags={calculated}]{Example Quiz} @@ -1313,9 +1420,8 @@ % These two codes yield the same XML content. % % \section{Known Limitations and Call for Bug Reports} -% Table~\ref{tab:support-limitations} lists some different features supported, limitations, and +% Table~\ref{tab:support-limitations} lists some features supported, limitations, and % bugs. -% %\begin{table}[tbp] %\centering %\begin{threeparttable}[b] @@ -1347,7 +1453,7 @@ %yes & $\varnothing$& $\varnothing$ \\\cmidrule(lr){1-1} %\hspace{1em}Numerical & yes & no\tnote{1} & yes \\ %\hspace{1em}Short Answer & yes & no\tnote{1} & yes\tnote{7} \\ -%\hspace{1em}Multi (regular) & yes & no\tnote{2} & yes\tnote{7} \\ +%\hspace{1em}Multi (inline) & yes & no\tnote{2} & yes\tnote{7} \\ %\hspace{1em}Multi (horizontal) & yes & yes & yes \\ %\hspace{1em}Multi (vertical) & yes & yes & yes \\\bottomrule %\end{tabular} @@ -1373,10 +1479,8 @@ %\end{tablenotes} %\end{threeparttable} %\end{table} -% % Tables~\ref{tab:diacritical}, \ref{tab:ligatures}, and \ref{tab:other} describe the current -% support for some special characters, accents and other diacritical marks. -% +% state of support special characters, accents and other diacritical marks. %\begin{table}[tbp] % \centering % \caption{Support for diacritical marks @@ -1414,6 +1518,11 @@ % \H{o} & \H{O} & \verb|\H{o}| & \verb|\H{O}| & Unicode and \LaTeX & \LaTeX\ only\\ % \H{u} & \H{U} & \verb|\H{u}| & \verb|\H{U}| & Unicode and \LaTeX & \LaTeX\ only\\ % \"y & \"Y & \verb|\"y| & \verb|\"Y| & Unicode and \LaTeX & \LaTeX only\\ +% \k{a} & \k{A} & \verb|\k{a}| & \verb|\k{A}| & Unicode and \LaTeX & \LaTeX\ only\\ +% \k{e} & \k{E} & \verb|\k{e}| & \verb|\k{E}| & Unicode and \LaTeX & \LaTeX\ only\\ +% \k{i} & \k{I} & \verb|\k{i}| & \verb|\k{I}| & Unicode and \LaTeX & \LaTeX\ only\\ +% \k{o} & \k{O} & \verb|\k{o}| & \verb|\k{O}| & Unicode and \LaTeX & \LaTeX\ only\\ +% \k{u} & \k{U} & \verb|\k{u}| & \verb|\k{U}| & Unicode and \LaTeX & \LaTeX\ only\\ % \u{a} & \u{A} & \verb|\u{a}| & \verb|\u{A}| & Unicode and \LaTeX & \LaTeX\ only\\ % \u{e} & \u{E} & \verb|\u{e}| & \verb|\u{E}| & Unicode and \LaTeX & \LaTeX\ only\\ % \u{g} & \u{G} & \verb|\u{g}| & \verb|\u{G}| & Unicode and \LaTeX & \LaTeX\ only\\ @@ -1431,10 +1540,11 @@ % \bottomrule % \end{tabular} % \begin{tablenotes} -% \item[1] \XeLaTeX\ renders correctly |\u{i}|, that is, without a superscript dot. -% Instead, with (pdf)\LaTeX\ the rendering of |\u{i}| is flawed by the -% superposition of the superscript dot and the breve diacritical mark. -% Both engines render |\u{\i}| as expected. +% \item[1] The rendering of |\u{i}| is flawed in (pdf)\LaTeX's traditional output. +% ^^A \XeLaTeX\ renders correctly |\u{i}|, that is, without a superscript dot. +% ^^A Instead, with (pdf)\LaTeX\ the rendering of |\u{i}| is flawed by the +% ^^A superposition of the superscript dot and the breve diacritical mark. +% ^^A Both engines render |\u{\i}| as expected. % \end{tablenotes} % \end{threeparttable} % \end{table} @@ -1487,11 +1597,13 @@ % \bottomrule % \end{tabular} % \begin{tablenotes} -% \item[1] the package |babel| loaded with option |french| defines |\og| and |\fg| for -% the same symbols. These are also supported by \textsf{moodle}. +% \item[1] for the same symbols the package |babel| defines |\flqq| and |\frqq|, and +% if loaded with option |french| defines |\og| and |\fg|. These commands +% are also supported by \textsf{moodle}. % \end{tablenotes} % \end{threeparttable} % \end{table} +% % Some features of Moodle quizzes have not yet been implemented in \textsf{moodle}. % Here is a non-exhaustive list. % \begin{itemize} @@ -1500,12 +1612,11 @@ %^^A \item Calculated questions; that is, automatically generated numerical questions %^^A using randomly chosen numbers. % \item Hints -% \item Multiple keywords (tags) for questions +% \item Units handling in numerical questions % \end{itemize} % The authors have used this package together with a limited number of colleagues % for a few semesters of teaching. If other users adopt this package, we fully expect them -% to find bugs. \emph{Please} send all bugs you find to \url{guerquin-kern@crans.org}, -% so that we can fix them for subsequent versions. +% to find bugs. If you run into a problem, please have a look at Section~\ref{sec:dev}. % % \section{Compatibility} % This package has been originally written for and tested with the implementation of @@ -1516,8 +1627,8 @@ % % As the ultimate purpose of this package is the generation of XML files, % future versions of \textsf{moodle} will attempt to maintain backwards -% compatability with earlier versions regarding the XML output, apart from -% bug fixes. +% compatibility with earlier versions regarding the XML output, apart from +% bug fixes. % Backwards compatibility of the PDF output is not yet guaranteed, however, % in case the author or users discover better ways for the PDF to display % the underlying XML data to be proofread. @@ -1539,12 +1650,71 @@ % but turn ``MathJax'' \emph{on}. This forces \TeX\ code to be rendered by MathJax % instead of Moodle, producing much higher-quality results. % +% \clearpage +% \section{Package Development}\label{sec:dev} +% This package is developed as a collaborative project, currently hosted +% on the Gitlab server instance \url{https://framagit.org/mattgk/moodle}. +% The project's activity can be monitored there: reported issues, last +% modifications, \dots +% +% Contributions, either bug reports or fixes, are welcome. Users willing to +% help can either sign-in with an existing \textsf{GitHub}, \textsf{Gitlab.com}, or +% \textsf{Bitbucket} account or register a new account. +% +% Of course, getting in touch with the package maintainer by +% \href{mailto:guerquin-kernATcrans.org}{email} works as well. +% +% When experiencing a problem and before reporting it, please check whether +% or not something similar has already been filed as an issue +% \href{https://framagit.org/mattgk/moodle/-/issues?scope=all&state=all}{here}. +% If the problem appears to be new, please report it by following these steps: +% \begin{enumerate} +% \item Prepare a \emph{minimal} working example, i.e. a |.tex| file shunk down +% to the strict minimum (loaded packages, code, \dots) while still showing the +% faulty behavior upon compilation. +% \item Gather and send the |*.tex|, |*.log| and |*-moodle.xml| files together +% with an explanation about +% \begin{itemize} +% \item your working environment (\TeX\ engine and distribution, operating +% system, \dots), +% \item the faulty behavior, and +% \item what you expected instead. +% \end{itemize} +% \end{enumerate} +% % ^^A\clearpage % \changes{v0.5}{2016/01/05}{Initial version} % \changes{v0.6}{2019/02/18}{Bux-fixing release} % \changes{v0.7}{2020/07/09}{Feature extensions} % \changes{v0.8}{2021/01/04}{Bug fixes and feature extensions} +% \changes{v0.9}{2021/02/07}{Bug fixes and feature extensions} % \begin{changelog}[title={Version History},author={Matthieu Guerquin-Kern}] +% \begin{version}[version=0.9,date=2021-02-07] +% \added +% \item Support for \href{https://docs.moodle.org/310/en/All_or_nothing_multiple_choice_question_type} +% {all-or-nothing multiple choice} questions. +% \item Support for the ogonek diacritical mark via |\k|\marg{\dots}. +% \item Warn user of the \texttt{babel} package set for a German-related language +% that using the character |"| will not play well with \textsf{moodle}. +% \item Support for \textsf{babel} commands related to German quotes. +% \item Support for en-dash (--) outside of math mode. +% \item Support for |\%| in conversion to HTML. +% \item Command |\htmlonly[]{}| to pass HTML contents directly to the XML file. +% \changed +% \item An error is issued when a graphics conversion step fails. +% \item Irrelevant points are no longer written at the cloze question level in PDF and XML. +% \item The total number of marks is shown in the PDF at the end of each quiz. +% \item The |tags| key can now be used to specify a comma-separated list of tags. +% \fixed +% \item Answer text of shortanswer questions is converted to HTML. +% \item Paragraph breaks in multi and essay items no longer break compilation. +% \item Question text in Essays was not shown in PDF file. +% \item Commands |\textsc|, |\underline|, |\url|, and |\href| yielded HTML code with +% inadequate double quotation marks. +% \item Broken base64-encoding pipeline for images under Windows (thanks to Andreas Vohns). +% \item Repeated single right quotation marks no longer merged in math mode +% (thanks to Alberto Albano). +% \end{version} % \begin{version}[version=0.8,date=2021-01-04] % \added % \item Support for inclusion of GIF pictures. @@ -1598,15 +1768,15 @@ % \item Irrelevant \texttt{penalty} tag in cloze subquestions. % \fixed % \item Non-integer fractions can now be specified in cloze subquestions. -% \item Signifiantly squeeze PNG images size by skipping ancillary data. +% \item Significantly squeeze PNG images size by skipping ancillary data. % \item Enumerate or itemize environment can now be nested in question items. % \item Several pictures can be included in a question without being mixed % in the XML file. -% \item management and rendering of fraction in questions. -% \item Correctly handling a \LaTeX\ starting the last item of a question. +% \item Management and rendering of fraction in questions. +% \item Correctly handling a \LaTeX\ command starting the last item of a question. % \item Closing braces escaped in cloze subquestions. This allows \LaTeX\ % equations or images to be included. -% \item Image inclusion with MacOS. +% \item Image inclusion with macOS. % \end{version} % \begin{version}[version=0.6b,date=2019-11-27] % \added @@ -1626,7 +1796,7 @@ % \item General feedbacks can now contain backslashes. % \item Several quizzes can now be defined in a single source file, each % specifying a category for Moodle's question bank. -% \item Correct encoding information in now written in XML depending on +% \item Correct encoding information is now written in XML depending on % the \LaTeX\ compiler used. % \end{version} % \begin{version}[version=0.6a,date=2019-06-21] @@ -1634,7 +1804,7 @@ % \item \XeLaTeX\ is now recommended when using UTF8-encoded sources (support % of accents). % \item Feedbacks are now displayed in the PDF file produced. -% \item The \texttt{optipng} utility is used (and required) to reduce the size +% \item The \texttt{optipng} utility is used to reduce the size % of images embedded in the XML file. % \item Question options and settings are now displayed in the PDF file % \item Supporting more \LaTeX\ macros for symbols and accents (mostly @@ -1642,7 +1812,7 @@ % \item Introduce shuffle options in cloze-multi subquestions. % \item Package option \texttt{final}. % \changed -% \item In draft mode, \TikZ\ externalization in no longer triggered. +% \item In draft mode, \TikZ\ externalization is no longer triggered. % \fixed % \item In the different question types, the feedback fields are now converted % for HTML allowing \LaTeX\ equation and images. @@ -1694,16 +1864,23 @@ \RequirePackage{xkeyval} %For key-handling \RequirePackage{amssymb} %For \checkmark symbol %\RequirePackage{trimspaces} %To remove extra spaces from strings (loaded by environ) -\RequirePackage{etex} %Expansion control, detokenization, etc. -\RequirePackage{etoolbox}%List management -\RequirePackage{xpatch} %To patch commands easily in HTML mode -\RequirePackage{array} %For formatting tables in the LaTeX mode of Clozes -\RequirePackage{ifplatform} % To choose Ghostscript commands \@ifpackageloaded{iftex}{}{\RequirePackage{iftex}} % iftex already required by recent versions of ifplatform. Needed to know: % 1) whether we can convert output from PDF to PNG (ifpdf), % 2) when output pdf is latin1-encoded (ifpdf) % 3) when output xml is utf8-encoded (if?tex) +\@ifundefined{ifeTeX}{% version of 'iftex' prior to November 2019. + \RequirePackage{etex}{} +}{ + \ifeTeX\else + \RequirePackage{etex}{} % Recent (2015+) TeX engines should be e-TeX. + %This is needed for expansion control, detokenization, etc. + \fi +} +\RequirePackage{etoolbox}%List management +\RequirePackage{xpatch} %To patch commands easily in HTML mode +\RequirePackage{array} %For formatting tables in the LaTeX mode of Clozes +\RequirePackage{ifplatform} % To choose Ghostscript commands \@ifundefined{ifpdf}{\RequirePackage{ifpdf}}{}% old iftex would not define the conditional \RequirePackage{shellesc} %Luatex-compatible way of getting system access \RequirePackage{fancybox} %For fancy LaTeX tags @@ -1802,7 +1979,7 @@ \fi \writetomoodle{}% \def\moodle@stamp{running on \platformname}% - \g@addto@macro{\moodle@stamp}{ with the package moodle v0.8 }% + \g@addto@macro{\moodle@stamp}{ with the package moodle v0.9 }% \writetomoodle{}% \fi \immediate\write\moodle@outfile{}% @@ -1867,13 +2044,14 @@ }{}% }}% \newcommand*\@enumeratename{enumerate}% +\newdimen\moodle@totalmarks \moodle@totalmarks=0pt% \newenvironment{quiz}[2][]{% \setkeys{moodle}{#1}% \gdef\setcategory##1{% % At first call (end of \begin{quiz}) enumerate is not started yet \ifx\@currenvir\@enumeratename % In case no question is defined between two calls of \setcategory - \def\@noitemerr{\@latex@warning{Empty question list}}% + \def\@noitemerr{}%\@latex@warning{Empty question list} \end{enumerate}% \fi \gdef\moodle@currentcategory{##1}% @@ -1894,7 +2072,7 @@ \begin{enumerate}% }% \gdef\setsubcategory##1{% - \def\@noitemerr{\@latex@warning{Empty question list}}% + \def\@noitemerr{}%\@latex@warning{Empty question list} \end{enumerate}% \moodle@write@category@xml{\moodle@currentcategory/##1}% \ifmoodle@section @@ -1915,6 +2093,7 @@ \setcategory{#2}% }{% \end{enumerate}% + \emph{Total of marks: \strip@pt\moodle@totalmarks}% \let\setcategory\relax \let\setsubcategory\relax }% @@ -2053,21 +2232,29 @@ }% }% -\def\generate@moodle@write@tags#1{% - % #1 = NAME for \moodle@writeNAME - % #3 = what, exactly, to write - \xa\gdef\csname moodle@writetags\endcsname{% - %\xa\xa\xdef\xa\xa\ds\xa\xa{Encountered '\string #1'}\show\ds - \xa\xdef\xa\test@iii\xa{\moodle@tags}% - \ifx\test@iii\@moodle@empty\relax\else - \xa\converttohtmlmacro\xa\moodle@htmltowrite\xa{\moodle@tags}% - \writetomoodle[2]{ }% +\def\moodle@writetags{% + \xa\xdef\xa\test@iii\xa{\moodle@tags}% + \ifx\test@iii\@moodle@empty\relax\else + \writetomoodle[2]{ }% + \renewcommand*{\do}[1]{% + \def\moodle@tagtext{##1}% + \xa\converttohtmlmacro\xa\moodle@htmltowrite\xa{\moodle@tagtext}% \writetomoodle[4]{ }% - \writetomoodle[2]{ }% - \fi - }% + } + \xa\docsvlist\xa{\moodle@tags}% + \writetomoodle[2]{ }% + \fi +}% +\newif\ifmoodle@firsttag +\moodle@firsttagtrue +\def\moodle@latex@writetags{% + \xa\xdef\xa\test@iii\xa{\moodle@tags}% + \ifx\test@iii\@moodle@empty\relax\else + \hfill tags: % + \renewcommand*{\do}[1]{\ifmoodle@firsttag\moodle@firsttagfalse\else, \fi\texttt{##1}}% + \xa\docsvlist\xa{\test@iii}% + \fi }% - % \end{macrocode} % \subsubsection{Keys for all question types} % \begin{macrocode} @@ -2142,9 +2329,7 @@ %which defines a "tag" (i.e., keyword) for the question. %Key calls like [tags={random}] set \moodle@tags. \define@cmdkey{moodle}[moodle@]{tags}[]{}% - \generate@moodle@write@tags{\csname moodle@tags\endcsname}% - \moodleset{tags}% -% TODO: handle multiple 'tags' for one question + \moodleset{tags={}}% % \end{macrocode} % \subsubsection{Keys for all answers} @@ -2175,6 +2360,11 @@ \generate@moodle@write@code*{shuffle}{\ifmoodle@shuffle 1\else 0\fi}% \moodleset{shuffle=true}% +%% ALLORNOTHING -- for multichoice with multiple answers where all the points are given +% if and only if all the correct answers are selected. + \define@boolkey{moodle}[moodle@]{allornothing}[true]{}% + \moodleset{allornothing=false}% + %% TODO: CORRECTFEEDBACK %% TODO: PARTIALLYCORRECTFEEDBACK %% TODO: INCORRECTFEEDBACK @@ -2491,6 +2681,7 @@ \NewEnviron{#1}[2][]{% \bgroup \setkeys{moodle}{##1,questionname={##2}}% + \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt \expandafter\gatheritems\xa{\BODY}% \let\moodle@questionheader=\gatheredheader %First, the LaTeX processing @@ -2498,10 +2689,7 @@ \ifmoodle@handout \moodle@makelatextag@qtype{#1} \else - \xa\xdef\xa\test@iii\xa{\moodle@tags}% - \ifx\test@iii\@moodle@empty\relax\else - \hfill tags: \texttt{\moodle@tags} - \fi + \moodle@latex@writetags \par \noindent \moodle@makelatextag@qtype{#1} @@ -2540,41 +2728,41 @@ % Description blocks can be empty. In this case, nothing is done. % % \begin{macrocode} -\let\description\relax% remove the meaning of existing \description and \enddescription -\let\enddescription\relax -\NewEnviron{description}[2][]{% - \bgroup - \setkeys{moodle}{#1,questionname={#2}}% - \let\moodle@questiontext=\BODY - \trim@spaces@in\moodle@questiontext - \ifx\moodle@questiontext\@empty\relax\else% - %First, the LaTeX processing. - \item \textbf{\moodle@questionname} - \ifmoodle@handout\else - \xa\xdef\xa\test@iii\xa{\moodle@tags}% - \ifx\test@iii\@moodle@empty\relax\else - \hfill tags: \texttt{\moodle@tags}% +\AfterEndPreamble{% in case something like \usepackage[french]{babel} is loaded + \let\description\relax% remove the meaning of existing \description and \enddescription + \let\enddescription\relax + + \NewEnviron{description}[2][]{% + \bgroup + \setkeys{moodle}{#1,questionname={#2}}% + \let\moodle@questiontext=\BODY + \trim@spaces@in\moodle@questiontext + \ifx\moodle@questiontext\@empty\relax\else% + %First, the LaTeX processing. + \item \textbf{\moodle@questionname} + \ifmoodle@handout\else + \moodle@latex@writetags + \par + \noindent \fi - \par + \moodle@makelatextag@qtype{description}\par \noindent - \fi - \moodle@makelatextag@qtype{description}\par - \noindent - \moodle@questiontext\par - \ifmoodle@handout\else - \ifx\moodle@feedback\@empty\relax\else - \fbox{\parbox{\linewidth}{\emph{\moodle@feedback}}}% + \moodle@questiontext\par + \ifmoodle@handout\else + \ifx\moodle@feedback\@empty\relax\else + \fbox{\parbox{\linewidth}{\emph{\moodle@feedback}}}% + \fi \fi + %Now, writing information to memory. + \@moodle@ifgeneratexml{% + \writetomoodle{}% + \moodle@writecommondata + \moodle@writetags% + \writetomoodle{}% + }{}% \fi - %Now, writing information to memory. - \@moodle@ifgeneratexml{% - \writetomoodle{}% - \moodle@writecommondata - \moodle@writetags% - \writetomoodle{}% - }{}% - \fi - \egroup + \egroup + }% }% % \end{macrocode} % @@ -2587,7 +2775,6 @@ % Moodle cannot automatically grade an essay, % but if the user puts \item's in, we can list them in an itemize as notes. \par\noindent \emph{Notes for grader:} - \moodle@questionheader \ifnum\c@numgathereditems>0\relax \begin{itemize} \setlength\itemsep{0pt}\setlength\parskip{0pt}% \loopthroughitemswithcommand{\moodle@print@essay@answer}% @@ -2601,6 +2788,8 @@ \NewEnviron{essay}[2][]{% \bgroup \setkeys{moodle}{#1,questionname={#2}}% + \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt + \moodle@checkresponsefieldlines \expandafter\gatheritems\expandafter{\BODY}% \let\moodle@questionheader=\gatheredheader %First, the LaTeX processing. @@ -2608,10 +2797,7 @@ \ifmoodle@handout \moodle@makelatextag@qtype{essay} \else - \xa\xdef\xa\test@iii\xa{\moodle@tags}% - \ifx\test@iii\@moodle@empty\relax\else - \hfill tags: \texttt{\moodle@tags} - \fi + \moodle@latex@writetags \par \noindent \moodle@makelatextag@qtype{essay} @@ -2621,7 +2807,9 @@ \fi \par \noindent - \ifx\moodle@responsetemplate\@empty\relax\else% + \moodle@questionheader + \long\def\@lempty{}% + \ifx\moodle@responsetemplate\@lempty\else \par\noindent \emph{Template:} \par\fbox{\parbox{\linewidth}{\moodle@responsetemplate}}\par \fi @@ -2660,6 +2848,31 @@ \egroup }% +\def\moodle@checkresponsefieldlines{% + \newcount\a\a=\number\csname moodle@response field lines\endcsname + \newcount\b\b=5% + \ifnum\the\a>40% if the value was more than 40 + \a=40% + \fi + \ifnum\the\a<5% if the value was less than 5 + \a=5% + \fi + \divide\a by\b% integer division by 5 + \multiply\a by\b% multiply by 5 + \ifnum\a=\csname moodle@response field lines\endcsname% equality holds if we had 5, 10, 15, 20, 25, 30, or 40 + \else + \ifnum\csname moodle@response field lines\endcsname>5% + \ifnum\csname moodle@response field lines\endcsname<40% + \advance\a by\b% approximate with the next multiple of 5 + \fi + \fi + \PackageWarning{moodle}{"response field lines" admits only multiples of 5 between 5 and 40 + (You tried to set \csname moodle@response field lines\endcsname). The value + \the\a\space will be used.}% + \setkeys{moodle}{response field lines=\the\a}% + \fi +}% + %%%% TODO %%%% To make essay work will be tough. %%%% Every line from \ifnum\c@numgathereditems=0\relax through its \else and \fi, @@ -2704,12 +2917,12 @@ \moodle@writeattachmentsrequired% }% -\def\moodle@print@essay@answer#1{% +\long\def\moodle@print@essay@answer#1{% \item #1% }% -\def\moodle@savegraderinfo#1{% +\long\def\moodle@savegraderinfo#1{% %\def\ds{#1}\show\ds \bgroup \moodle@savegraderinfo@int#1\moodle@answer@rdelim @@ -2720,7 +2933,7 @@ \setkeys{moodle}{fraction=0,#1}% \moodle@savegraderinfo@int@int% }% -\def\moodle@savegraderinfo@int@int#1\moodle@answer@rdelim{% +\long\def\moodle@savegraderinfo@int@int#1\moodle@answer@rdelim{% \def\moodle@answertext{#1} \xa\converttohtmlmacro\xa\moodle@answertext@html\xa{\moodle@answertext}% %\trim@spaces@in\moodle@answertext @@ -2830,7 +3043,8 @@ \trim@spaces@in\moodle@answertext \moodle@checkfraction \addto@xml[2]{\moodle@answers@xml}{}% - \addto@xml[4]{\moodle@answers@xml}{ \moodle@answertext}% + \xa\converttohtmlmacro\xa\moodle@answertext@html\xa{\moodle@answertext}% + \addto@xml[4]{\moodle@answers@xml}{ \moodle@answertext@html}% \ifx\moodle@feedback\@empty\relax\else \trim@spaces@in\moodle@feedback \xa\converttohtmlmacro\xa\moodle@feedback@html\xa{\moodle@feedback}% @@ -2956,10 +3170,19 @@ % LATEX PROCESSING \def\moodle@makelatextag@multi{% - \ifmoodle@multiple - \moodle@makelatextagbox{Multiple}\relax% + \ifmoodle@allornothing + \ifx\endmulti\endclozemulti + \PackageError{moodle}{Unsupported option "allornothing" for a multichoice subquestion} + {Please set "allornothing=false"}% + \else + \moodle@makelatextagbox{All-or-nothing}% + \fi \else - \moodle@makelatextagbox{Single}\relax% + \ifmoodle@multiple + \moodle@makelatextagbox{Multiple}% + \else + \moodle@makelatextagbox{Single}% + \fi \fi \ifmoodle@handout\else \ifmoodle@shuffle @@ -2969,6 +3192,9 @@ } \def\moodle@multi@latexprocessing{% + \ifmoodle@allornothing + \moodle@singletrue + \fi \moodle@countcorrectanswers% \ifmoodle@handout\NewList{answerlist}\fi \begin{enumerate}\moodle@obeynumberingstyle% @@ -2990,7 +3216,7 @@ \fi \fi } - \def\moodle@print@multichoice@answer#1{% + \long\def\moodle@print@multichoice@answer#1{% \let\moodle@feedback=\@empty% \moodle@print@multichoice@answer@int#1 \@rdelim% }% @@ -2999,7 +3225,7 @@ \setkeys{moodle}{#1}% \moodle@print@multichoice@answer@int@int% }% - \def\moodle@print@multichoice@answer@int@int#1#2\@rdelim{% + \long\def\moodle@print@multichoice@answer@int@int#1#2\@rdelim{% \def\test@i{#1}% \def\test@ii{#2}% \def\moodle@answertext{\item }% @@ -3020,11 +3246,11 @@ \ifx\moodle@fraction\@empty\relax% \setkeys{moodle}{fraction=0}% \fi + \moodle@checkfraction \ifx\moodle@fraction\@hundred% \trim@spaces@in\moodle@answertext% \g@addto@macro\moodle@answertext{$~\checkmark$}% \else - \moodle@checkfraction \ifdim0pt=\moodle@fraction pt\relax\else% \g@addto@macro\moodle@answertext{$~(\moodle@fraction\%)$}% \fi @@ -3101,7 +3327,7 @@ \fi \gdef\moodle@autosanctions{\strip@pt\moodle@pointsperincorrect}% } - \def\moodle@countcorrectanswers@a#1{% + \long\def\moodle@countcorrectanswers@a#1{% %The grouping is to keep key answer-specific key changes local. \bgroup \moodle@countcorrectanswers@b#1\moodle@answer@rdelim @@ -3114,7 +3340,7 @@ \moodle@countcorrectanswers@c% %\fi }% - \def\moodle@countcorrectanswers@c#1#2\moodle@answer@rdelim{% + \long\def\moodle@countcorrectanswers@c#1#2\moodle@answer@rdelim{% \def\test@i{#1}% \ifx\test@i\@star \stepcounter{moodle@numcorrectanswers}% @@ -3150,7 +3376,15 @@ \fi \fi } - \def\moodle@checkfraction{% + \def\moodle@checkfraction{% + \ifmoodle@allornothing + \ifnum\moodle@fraction>0% + \setkeys{moodle}{fraction=100}% + \fi + \ifnum\moodle@fraction<0% + \setkeys{moodle}{fraction=0}% + \fi + \else %\def\test@i{#1}% \setlength{\test@fraction}{\moodle@fraction pt}% % take the absolute value @@ -3168,11 +3402,12 @@ \else \setkeys{moodle}{fraction=\test@fractionmatched}% \fi - } + \fi + } % TODO: Put these macros in same order as other sections'. % SAVING ANSWERS TO MEMORY -\def\savemultianswer#1{% +\long\def\savemultianswer#1{% \bgroup \savemultianswer@int#1 \moodle@answer@rdelim \passvalueaftergroup{\moodle@answers@xml}% @@ -3181,9 +3416,12 @@ \newcommand\savemultianswer@int[1][]{% \let\moodle@fraction\@empty% \setkeys{moodle}{#1}% + \ifmoodle@allornothing + \moodle@singletrue + \fi \savemultianswer@int@int% }% - \def\savemultianswer@int@int#1#2\moodle@answer@rdelim{% + \long\def\savemultianswer@int@int#1#2\moodle@answer@rdelim{% \def\test@i{#1}% \ifx\test@i\@star \ifmoodle@single @@ -3218,9 +3456,12 @@ % WRITING QUESTION TO XML FILE \gdef\writemultiquestion{% - \writetomoodle{}% + + \writetomoodle{}% \moodle@writecommondata% - \moodle@writesingle% + \ifmoodle@allornothing\else + \moodle@writesingle% + \fi \moodle@writeshuffle% \moodle@writeanswernumbering% }% @@ -3241,6 +3482,7 @@ \NewEnviron{truefalse}[2][]{% \bgroup \setkeys{moodle}{#1,questionname={#2}}% + \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt \expandafter\gatheritems\xa{\BODY}% \let\moodle@questionheader=\gatheredheader %First, the LaTeX processing @@ -3248,10 +3490,7 @@ \ifmoodle@handout \moodle@makelatextag@qtype{truefalse} \else - \xa\xdef\xa\test@iii\xa{\moodle@tags}% - \ifx\test@iii\@moodle@empty\relax\else - \hfill tags: \texttt{\moodle@tags} - \fi + \moodle@latex@writetags \par \noindent \moodle@makelatextag@qtype{truefalse} @@ -3494,10 +3733,10 @@ \setcounter{moodle@numcorrectanswers}{0}% Here this counter is for "questions" (items on the left column) \loopthroughitemswithcommand{\moodle@print@matching@answer}% \ifnum\c@numgathereditems<3% - \PackageWarning{moodle}{Moodle expects at least three "answers" with matching type} + \PackageWarning{moodle}{Moodle expects at least three "answers" with matching type}% \fi \ifnum\c@moodle@numcorrectanswers<2% - \PackageWarning{moodle}{Moodle expects at least two "questions" with the matching type} + \PackageWarning{moodle}{Moodle expects at least two "questions" with the matching type}% \fi \ifmoodle@handout \ifmoodle@shuffle @@ -3645,14 +3884,10 @@ \ifmoodle@handout \moodle@makelatextag@qtype{cloze} \else - \xa\xdef\xa\test@iii\xa{\moodle@tags}% - \ifx\test@iii\@moodle@empty\relax\else - \hfill tags: \texttt{\moodle@tags} - \fi + \moodle@latex@writetags \par \noindent \moodle@makelatextag@qtype{cloze} - \moodle@makelatextag@value{default grade}{\moodle@marks{\csname moodle@default grade\endcsname}} \moodle@makelatextag@value{penalty}{penalty} \fi \par @@ -3685,7 +3920,11 @@ % WRITING QUESTION TO XML FILE \gdef\writeclozequestion{% \writetomoodle{}% - \moodle@writecommondata% + \moodle@writequestionname% + \moodle@writequestiontext% + \moodle@writegeneralfeedback% + \moodle@writepenalty% + \moodle@writehidden% \moodle@writetags% \writetomoodle{}% }% @@ -3746,6 +3985,7 @@ \def\endclozemulti@code{\htmlize@patchendenvironment}% \else %LaTeX version + \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt \moodle@questionheader% %Any introductory text just continues to be typeset. \par \noindent @@ -3800,7 +4040,7 @@ }[\endclozemulti@code]% -\def\moodle@print@clozemultichoice@answer#1{% +\long\def\moodle@print@clozemultichoice@answer#1{% \let\moodle@feedback=\@empty \moodle@print@clozemultichoice@answer@int#1 \@rdelim% }% @@ -3808,7 +4048,7 @@ \setkeys{moodle}{fraction=0,#1}% \moodle@print@clozemultichoice@answer@int@int% }% -\def\moodle@print@clozemultichoice@answer@int@int#1#2\@rdelim{% +\long\def\moodle@print@clozemultichoice@answer@int@int#1#2\@rdelim{% \def\moodle@answertext{}% % Case 0: "(answer) \\ \hline" % Case 1: "\item (answer)" @@ -3867,7 +4107,7 @@ \fi }% -\def\saveclozemultichoiceanswer#1{% +\long\def\saveclozemultichoiceanswer#1{% \bgroup \saveclozemultichoiceanswer@int#1 \moodle@answer@rdelim \egroup @@ -3876,7 +4116,7 @@ \setkeys{moodle}{fraction=0,#1}% \saveclozemultichoiceanswer@int@int% }% -\def\saveclozemultichoiceanswer@int@int#1#2\moodle@answer@rdelim{% +\long\def\saveclozemultichoiceanswer@int@int#1#2\moodle@answer@rdelim{% \def\test@i{#1}% \ifgatherbeginningofloop\else \xa\gdef\xa\clozemulti@coding\xa{\clozemulti@coding\clozetilde}% separator between answers @@ -3929,6 +4169,7 @@ \def\endclozenumerical@code{\htmlize@patchendenvironment}% \else %LaTeX version + \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt \moodle@questionheader% %Any introductory text just continues to be typeset. \par \noindent @@ -4058,6 +4299,7 @@ \def\endclozeshortanswer@code{\htmlize@patchendenvironment}% \else %LaTeX version + \global\advance\moodle@totalmarks by \csname moodle@default grade\endcsname pt \moodle@questionheader% %Any introductory text just continues to be typeset. \par \noindent @@ -4358,6 +4600,7 @@ \def\@lt{<}% \def\@gt{>}% +\def\@dash{-}% \long\def\htmlize@recursive@i#1#2#3\htmlize@rdelim@i{% % #1#2#3 is a sequence of tokens. All should be categories 11 (letter) or 12 (other). @@ -4568,11 +4811,12 @@ \fi% \ifx\test@ii\@lsinglequote% \else \ifx\test@i\@rsinglequote% - \ifx\test@ii\@rsinglequote% - %Double right quote - \g@addto@macro\htmlize@output{\otherampersand rdquo;}% + \ifx\test@ii\@rsinglequote% Double right quote + %AAedit 2021.01.06: in math mode, you should write 2 single right quotes, for second derivatives + \moodle@ifmathmode{\g@addto@macro\htmlize@output{\otherampersand rsquo;\otherampersand rsquo;}}% + {\g@addto@macro\htmlize@output{\otherampersand rdquo;}}% \def\htmlize@next@i{\htmlize@recursive@i#3\htmlize@rdelim@i}% - \else + \else% Single right quote \g@addto@macro\htmlize@output{\otherampersand rsquo;}% \def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}% \fi% \ifx\test@ii\@rsinglequote% @@ -4591,9 +4835,20 @@ {\g@addto@macro\htmlize@output{>}}% \def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}% \else - % Default case: write first token to output, call self on remaining tokens. - \g@addto@macro\htmlize@output{#1}% - \def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}% + \ifx\test@i\@dash + \ifx\test@ii\@dash% en-dash (--) + \moodle@ifmathmode{\g@addto@macro\htmlize@output{--}}% + {\g@addto@macro\htmlize@output{\otherampersand ndash;}}% + \def\htmlize@next@i{\htmlize@recursive@i#3\htmlize@rdelim@i}% + \else + \g@addto@macro\htmlize@output{-}% + \def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}% + \fi + \else + % Default case: write first token to output, call self on remaining tokens. + \g@addto@macro\htmlize@output{#1}% + \def\htmlize@next@i{\htmlize@recursive@i#2#3\htmlize@rdelim@i}% + \fi% \ifx\test@i\@dash \fi% \ifx\test@i\@gt \fi% \ifx\test@i\@lt \fi% \ifx\test@i\@doublequote @@ -4927,6 +5182,7 @@ \htmlize@record@action{\endclozemode}% \htmlize@record@action{\relax}% +\html@action@def\%{\g@addto@macro\htmlize@output{\otherpercent}}% \html@action@def\#{\g@addto@macro\htmlize@output{\otherhash}}% \html@action@def\&{\g@addto@macro\htmlize@output{\otherampersand}}% \html@action@def\\{\moodle@ifmathmode{\g@addto@macro\htmlize@output{\otherbackslash\otherbackslash}}% @@ -4971,6 +5227,9 @@ \html@action@def\${% \g@addto@macro\htmlize@output{\otherdollar}% }% +\html@action@def\@dquote{% + \g@addto@macro\htmlize@output{"}% + }% \html@action@def\clozetilde{% \xa\g@addto@macro\xa\htmlize@output\xa{\othertilde}% }% @@ -5138,25 +5397,48 @@ {\g@addto@macro\htmlize@output{\otherampersand#1caron\othersemicol}}% {\xa\g@addto@macro\htmlize@output\xa{\string\v#1}}% }% + +% Ogonek diacritics +{\catcode`|=3\relax + \gdef\htmlize@ogonek{A|E|I|U|a|e|i|u|}} +\html@action@def\k#1{% + \ifinlist{#1}{\htmlize@ogonek}% + {\g@addto@macro\htmlize@output{\otherampersand#1ogon\othersemicol}}% + { + \bgroup + \def\test@i{#1}% + \ifx\test@i\@O + \def\toadd{\otherampersand\otherhash490\othersemicol}% + \else + \ifx\test@i\@o + \def\toadd{\otherampersand\otherhash491\othersemicol}% + \else + \def\toadd{\otherbackslash\otherlbrace#1\otherrbrace}% + \fi + \fi + \xa\g@addto@macro\xa\htmlize@output\xa{\toadd}% + \egroup + }% +}% % \end{macrocode} % % \subsubsection{Command sequences for Expansion} % % \begin{macrocode} -\html@def\underline#1{#1} +\html@def\underline#1{#1}% \html@def\emph#1{#1}% \html@def\textit#1{#1}% \html@def\textbf#1{#1}% \html@def\texttt#1{#1}% -\html@def\textsc#1{#1} -\html@def\url#1{#1}% -\html@def\href#1#2{#2}% +\html@def\textsc#1{#1}% +\html@def\url#1{#1}% +\html@def\href#1#2{#2}% \html@def\textsuperscript#1{#1}% \html@def\up#1{#1}% \html@def\fup#1{#1}% \html@def\textsubscript#1{#1}% \html@def\blank{____________}% -\html@def\par{

}% +\html@def\par{
}% \html@def\aa{\å}% \html@def\AA{\Å}% \html@def\ae{\æ}% @@ -5176,6 +5458,15 @@ \html@def\guillemotleft{\«\&\#8239;}% \html@def\fg{\&\#8239;\»}% \html@def\guillemotright{\&\#8239;\»}% +\html@def\glqq{\„}% +\html@def\grqq{\“}% +\html@def\glq{\‚}% +\html@def\grq{\‘}% +\html@def\flqq{\«\&\#8239;}% +\html@def\frqq{\&\#8239;\»}% +\html@def\flq{\‹}% +\html@def\frq{\›}% +\html@def\dq{\"}% \html@def\,{\&\#8239;}% \html@def\thinspace{\&\#8239;}% \html@def\textbackslash{\&\#92;}% @@ -5191,7 +5482,21 @@ \htmlize@record@action\displaymathrightdelim % \end{macrocode} -% +% +% \subsubsection{Passing Code to XML Only} +% Users may want to include pieces of HTML code to the XML file only. +% When producing the traditional output, the optional argument, empty +% by default, is used. +% \begin{macrocode} +\newcommand\htmlonly[2][]{#1}% +% \end{macrocode} +% When producing the XML file, the mandatory argument is passed as-is. +% \begin{macrocode} +\html@action@newcommand{htmlonly}[2][]{% + \g@addto@macro\htmlize@output{#2}% +}% +% \end{macrocode} +% % \subsection{Graphics via {\ttfamily\string\includegraphics}} % % \subsubsection{Finding Media Files} @@ -5206,6 +5511,14 @@ % are set with the basename, including path, and extension, respectively. % % \begin{macrocode} +\AtEndPreamble{% + \@ifpackageloaded{graphics}{% + \@ifpackagelater{graphics}{2019/10/08}{}{% + \PackageError{moodle}{`moodle' is made to interact with the `graphics' + package not older than 2019/10/08.}% + }% + }{}% +}% \def\moodle@media@find#1{% \ifx\detokenize\@undefined\else \edef\Gin@extensions{\detokenize\expandafter{\Gin@extensions}}% @@ -5382,7 +5695,10 @@ % While the picture will be animated after Moodle import, it will not be in the PDF % output, whatever the viewer is. \DeclareGraphicsAlien{.gif}{.png}{\htmlize@imagemagick@convert\otherspace '\SourceFile[0]' \OutputFile}% - }{}% + }{ + \newcommand\includegraphics[2][]{\PackageError{moodle}{"\string\includegraphics" is not defined}% + {Add "\string\usepackage{graphicx}" to you preamble.}}{}%}% + }% }% % \end{macrocode} % \subsubsection{Graphics key-handling} @@ -5434,25 +5750,30 @@ \SVGtoPDF\otherspace '\SourceFile' -o '\OutputFile' 2>/dev/null}% }% \fi - -\ifmoodle@tikz -\AfterEndPreamble{% - %\htmlize@record@expand{\embedaspict}% - \let\oldincludegraphics=\includegraphics - % patching includegraphics to trigger externalization - \renewcommand{\includegraphics}[2][]{% - %\message{moodle.sty: Processing \string\includegraphics[#1]{#2} for HTML^^J}% - \tikz{\node[inner sep=0pt]{\oldincludegraphics[#1]{#2}};}% - }% - % externalized images must be included with the regular command - \pgfkeys{/pgf/images/include external/.code={\oldincludegraphics{#1}}}% - \html@action@newcommand{includegraphics}[2][]{% - \message{moodle.sty: Processing \string\includegraphics[#1]{#2} ^^J} - \global\advance\numpicturesread by 1\relax - \edef\htmlize@imagetag{}% - \xa\g@addto@macro\xa\htmlize@output\xa{\htmlize@imagetag}% +\def\moodle@checkconversionsuccess#1#2{% + \IfFileExists{#1}{}{% + \PackageError{moodle}{#2 failed}% + {If the XML file is not of importance to you: use package option "draft"}% }% }% +\ifmoodle@tikz + \AfterEndPreamble{% + %\htmlize@record@expand{\embedaspict}% + \let\oldincludegraphics=\includegraphics + % patching includegraphics to trigger externalization + \renewcommand{\includegraphics}[2][]{% + %\message{moodle.sty: Processing \string\includegraphics[#1]{#2} for HTML^^J}% + \tikz{\node[inner sep=0pt]{\oldincludegraphics[#1]{#2}};}% + }% + % externalized images must be included with the regular command + \pgfkeys{/pgf/images/include external/.code={\oldincludegraphics{#1}}}% + \html@action@newcommand{includegraphics}[2][]{% + \message{moodle.sty: Processing \string\includegraphics[#1]{#2} ^^J} + \global\advance\numpicturesread by 1\relax + \edef\htmlize@imagetag{}% + \xa\g@addto@macro\xa\htmlize@output\xa{\htmlize@imagetag}% + }% + }% \else \html@action@newcommand{includegraphics}[2][]{% \bgroup% The grouping is to localize the changes caused by \setkeys. @@ -5502,6 +5823,7 @@ \edef\cmdline{\PDFtoSVG\otherspace "\moodle@media@base\moodle@media@ext" -o "\moodle@media@base\moodle@media@ext@current" 2>/dev/null}% \message{moodle.sty: Converting '#2' to SVG...^^J}% \xa\ShellEscape\xa{\cmdline}% + \moodle@checkconversionsuccess{\moodle@media@base\moodle@media@ext@current}{PDFtoSVG conversion}% %Next, optimize inline \ifwindows\else \edef\cmdline{\optiSVG < "\moodle@media@base\moodle@media@ext@current" > @@ -5509,6 +5831,7 @@ "\moodle@media@base\moodle@media@ext@current"}% \message{moodle.sty: Optimizing '\moodle@media@base\moodle@media@ext@current'...^^J}% \xa\ShellEscape\xa{\cmdline}% + \moodle@checkconversionsuccess{\moodle@media@base\moodle@media@ext@current}{SVG optimization}% \fi \else% call ImageMagick \def\moodle@media@ext@current{.png}% @@ -5516,10 +5839,12 @@ \edef\cmdline{\htmlize@imagemagick@convert\otherspace "\moodle@media@base\moodle@media@ext" -resize \moodle@graphics@geometry\otherspace "\moodle@media@base\moodle@media@ext@current"}% \message{moodle.sty: Converting '#2' to PNG...^^J}% \xa\ShellEscape\xa{\cmdline}% + \moodle@checkconversionsuccess{\moodle@media@base\moodle@media@ext@current}{ImageMagick conversion}% %Next, optimize inline \edef\cmdline{\optipng\otherspace "\moodle@media@base\moodle@media@ext@current"}% \message{moodle.sty: Optimizing '\moodle@media@base\moodle@media@ext@current'...^^J}% \xa\ShellEscape\xa{\cmdline}% + \moodle@checkconversionsuccess{\moodle@media@base\moodle@media@ext@current}{PNG optimization}% \fi \fi %Next, convert the file to base64 encoding @@ -5546,27 +5871,25 @@ % \end{macrocode} % This macro is in charge of throwing a system call to convert local files to base64. % \begin{macrocode} +\def\ConvertToBaseLXIV#1#2{% + \message{moodle.sty: Converting '#1#2' to base64...^^J}% + \ConvertToBaseLXIV@int{#1}{#2} + \xa\ShellEscape\xa{\cmdline}% + \moodle@checkconversionsuccess{#1.enc}{Base64 conversion}% +}% \ifwindows - \def\ConvertToBaseLXIV#1#2{% - \def\cmdline{\baselxiv\otherspace -encode "#1#2"\otherspace tmp.b64 && findstr /vbc:"---" tmp.b64 > "#1" && del tmp.b64"}% - \message{moodle.sty: Converting '#1#2' to base64...^^J}% - \xa\ShellEscape\xa{\cmdline}% - % Starting from Windows 7, CertUtil is included by default. There should be no windows XP still running - }% + \def\ConvertToBaseLXIV@int#1#2{% + \def\cmdline{\baselxiv\otherspace -encode "#1#2"\otherspace tmp.b64 && findstr /vbc:"---" tmp.b64 > "#1.enc" && del tmp.b64}% + }% Starting from Windows 7, CertUtil is included by default. There should be no windows XP still running \else \ifmacosx - \def\ConvertToBaseLXIV#1#2{% + \def\ConvertToBaseLXIV@int#1#2{% \def\cmdline{\baselxiv\otherspace -b 64 -i "#1#2"\otherspace -o "#1.enc"}% - \message{moodle.sty: Converting '#1#2' to base64...^^J}% - \xa\ShellEscape\xa{\cmdline}% }% \else % Linux, Cygwin - \def\ConvertToBaseLXIV#1#2{% + \def\ConvertToBaseLXIV@int#1#2{% \def\cmdline{\baselxiv\otherspace "#1#2"\otherspace > "#1.enc"}% - \message{moodle.sty: Converting '#1#2' to base64...^^J}% - \xa\ShellEscape\xa{\cmdline}% - }% - % base64 is part of coreutils, add "-w 64" to get exactly the previous behavior % + }% base64 is part of coreutils, add "-w 64" to get exactly the previous behavior % \fi \fi % \end{macrocode} @@ -5621,32 +5944,44 @@ \ifpdfoutput% tex engines defaulting to PDF output (pdflatex, xelatex, lualatex) \def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle@basename.pdf' to SVG...^^J}% \edef\cmdline{\PDFtoSVG\otherspace "\moodle@basename.pdf" -o "\moodle@basename\TikzExportExtension" 2>/dev/null}% - \xa\ShellEscape\xa{\cmdline}}% + \xa\ShellEscape\xa{\cmdline}% + \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{PDFtoSVG conversion}% + }% \else % latex \def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle@basename.ps' to SVG...^^J}% \edef\cmdline{\PDFtoSVG\otherspace "\moodle@basename.ps" -o "\moodle@basename\TikzExportExtension" 2>/dev/null}% - \xa\ShellEscape\xa{\cmdline}}% + \xa\ShellEscape\xa{\cmdline}% + \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{PStoSVG conversion}% + }% \fi \def\OptimizeExport{ \message{moodle.sty: Optimizing '\moodle@basename.svg'...^^J}% \edef\cmdline{\optiSVG\otherspace < "\moodle@basename\TikzExportExtension" > "\moodle@basename.tmp.svg" && mv "\moodle@basename.tmp.svg" "\moodle@basename\TikzExportExtension" }% - \xa\ShellEscape\xa{\cmdline}}% + \xa\ShellEscape\xa{\cmdline}% + \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{SVG optimization}% + }% \else \def\TikzExportExtension{.png}% \def\TikzExportMIME{image/png}% \ifpdfoutput% tex engines defaulting to PDF output (pdflatex, xelatex, lualatex) \def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle@basename.pdf' to PNG...^^J}% \edef\gscmdline{\gs\otherspace -sOutputFile=\moodle@basename\TikzExportExtension\otherspace -r150 \moodle@basename.pdf}% - \xa\ShellEscape\xa{\gscmdline}}% + \xa\ShellEscape\xa{\gscmdline}% + \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{Ghostscript conversion}% + }% \else % latex \def\ExportTikz{ \message{moodle.sty: Converting picture '\moodle@basename.ps' to PNG...^^J}% \edef\gscmdline{\gs\otherspace -sOutputFile=\moodle@basename\TikzExportExtension\otherspace -r150 \\moodle@basename.ps}% - \xa\ShellEscape\xa{\gscmdline}}% + \xa\ShellEscape\xa{\gscmdline}% + \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{Ghostscript conversion}% + }% \fi \def\OptimizeExport{ \message{moodle.sty: Optimizing '\moodle@basename.png'...^^J}% \edef\cmdline{\optipng\otherspace \moodle@basename\TikzExportExtension}% - \xa\ShellEscape\xa{\cmdline}}% + \xa\ShellEscape\xa{\cmdline}% + \moodle@checkconversionsuccess{\moodle@basename\TikzExportExtension}{PNG optimization}% + }% \fi \let\moodle@oldtikzpicture=\tikzpicture %The following code lets us run things *before* the normal \begin{tikzpicture}. @@ -5678,6 +6013,7 @@ \ExportTikz \OptimizeExport \ConvertToBaseLXIV{\moodle@basename}{\TikzExportExtension}% + \IfFileExists{\moodle@basename.enc}{}{\PackageError{moodle}{Conversion failed}{Check your base64 conversion utiliy}}% \message{moodle.sty: Reading base64 file '\tikzexternalrealjob-tikztemp-\the\numconvertedpictures.enc'...^^J}% \savebaselxivdata \message{moodle.sty: base64 data saved.^^J}% @@ -6182,6 +6518,19 @@ % related to autospacing when using |pdfLaTeX|. We shall warn them. % \begin{macrocode} \AtBeginDocument{% + \def\moodle@babel@german@warn{\PackageWarning{moodle}{Be careful when using moodle + and German-related babel package options. The symbol " is made active and your umlauts + will confuse moodle. You can either 1) compile with xelatex/lualatex with UTF-8 coded + characters or 2) avoid the babel option.} + } + \@ifpackagewith{babel}{german}{\moodle@babel@german@warn}{\relax}% + \@ifpackagewith{babel}{austrian}{\moodle@babel@german@warn}{\relax}% + \@ifpackagewith{babel}{swissgerman}{\moodle@babel@german@warn}{\relax}% + \@ifpackagewith{babel}{swissgerman.toss}{\moodle@babel@german@warn}{\relax}% + \@ifpackagewith{babel}{ngerman}{\moodle@babel@german@warn}{\relax}% + \@ifpackagewith{babel}{naustrian}{\moodle@babel@german@warn}{\relax}% + \@ifpackagewith{babel}{nswissgerman}{\moodle@babel@german@warn}{\relax}% + \@ifpackagewith{babel}{nswissgerman.toss}{\moodle@babel@german@warn}{\relax}% \ifPDFTeX % pdflatex or latex \@ifpackagewith{babel}{french}{% \PackageWarning{moodle}{Be careful when using LaTeX, moodle, and the babel package with option 'french'. Autospacing produces in undesired symbols in the XML. You can either 1) compile with xelatex/lualatex or 2) add '\NoAutoSpacing' after '\begin{quiz}'.}% diff --git a/macros/latex/contrib/moodle/moodle.pdf b/macros/latex/contrib/moodle/moodle.pdf index 1c047103cd..47a4c2ecca 100644 Binary files a/macros/latex/contrib/moodle/moodle.pdf and b/macros/latex/contrib/moodle/moodle.pdf differ diff --git a/macros/luatex/latex/innerscript/README.txt b/macros/luatex/latex/innerscript/README.txt index 70798045db..dc4079f006 100644 --- a/macros/luatex/latex/innerscript/README.txt +++ b/macros/luatex/latex/innerscript/README.txt @@ -1,5 +1,5 @@ This README file contains information about the LuaLaTeX package -"innerscript" version 1.0 installation. Besides this README, the +"innerscript" version 1.1 installation. Besides this README, the installation contains the following files: (1) innerscript.dtx: the primary file; diff --git a/macros/luatex/latex/innerscript/innerscript.dtx b/macros/luatex/latex/innerscript/innerscript.dtx index c8b16238aa..ab371312c8 100644 --- a/macros/luatex/latex/innerscript/innerscript.dtx +++ b/macros/luatex/latex/innerscript/innerscript.dtx @@ -1,6 +1,6 @@ % \iffalse ---!!! META-COMMENT !!!--- % -% This file is file from version 1.0 of the LuaLaTeX package +% This file is file from version 1.1 of the LuaLaTeX package % "innerscript," to be used in conjunction with the LuaTeX engine. % % Copyright 2021 by Conrad Kosowsky @@ -56,7 +56,7 @@ \askforoverwritefalse \preamble -This file is file from version 1.0 of the LuaLaTeX package +This file is file from version 1.1 of the LuaLaTeX package "innerscript," to be used in conjunction with the LuaTeX engine. Copyright 2021 by Conrad Kosowsky @@ -122,6 +122,7 @@ Happy TeXing! \usepackage{booktabs} \usepackage{tabularx} \usepackage{amsmath} +\usepackage{multicol} \pretolerance=20 \hyphenpenalty=10 \exhyphenpenalty=5 @@ -141,7 +142,7 @@ Happy TeXing! % \fi % % -% \CheckSum{965} +% \CheckSum{1207} % \init@checksum % % \makeatother\CharacterTable @@ -185,7 +186,7 @@ Happy TeXing! % \leftskip=0pt plus 1 fil % \rightskip=0pt plus 1fil % \parfillskip=0pt -% {\strut\Large Package \textsf{innerscript} v.\ 1.0 Documentation}\par +% {\strut\Large Package \textsf{innerscript} v.\ 1.1 Documentation}\par % \strut Conrad Kosowsky\par % \strut February 2021\par % \strut\texttt{kosowsky.latex@gmail.com}\par} @@ -237,7 +238,7 @@ Happy TeXing! % \begin{code} % |\usepackage[|\argtext{options}|]{innerscript}| % \end{code} -% syntax.\vadjust{\break} As mentioned previously, the package must be loaded with Lua\TeX, and if it detects a different engine, \textsf{innerscript} will issue an error.\footnote{Specifically, \textsf{innerscript} checks whether \vrb\Umathordordspacing\ is defined.} It is possible to continue compiling past the error with no other issues, but if you do, \textsf{innerscript} will not be able to change any math spacing in your document. Table~1 shows the six package options, and by default \textsf{innerscript} selects the first three. The |script| and |scriptscript| options will affect spacing of symbols in superscripts and subscripts, and the |inner| option will eliminate extra spacing for |\mathinner| subformulas, such as fractions and |\left|-|\right| delimiter pairs. The |no-|~variants disable the spacing adjustments for the corresponding default option. +% syntax.\vadjust{\break} The package must be loaded with Lua\LaTeX, and if it detects a different engine, \textsf{innerscript} will issue an error.\footnote{Specifically, \textsf{innerscript} checks whether \vrb\Umathordordspacing\ is defined.} It is possible to continue compiling past the error with no other issues, but if you do, \textsf{innerscript} will not be able to change any math spacing in your document. Table~1 shows the six package options, and by default \textsf{innerscript} selects the first three. The |script| and |scriptscript| options will affect spacing of symbols in superscripts and subscripts, and the |inner| option will eliminate extra spacing for |\mathinner| subformulas, such as fractions and |\left|-|\right| delimiter pairs. The |no-|~variants disable the spacing adjustments for the corresponding default option. % % % \begin{figure}[t] @@ -309,10 +310,13 @@ Happy TeXing! % % The |script| and |scriptscript| options reverse this decision by forcing interatom spacing to more closely resemble that of |\textstyle|. Table~2 lists the amount of space that \textsf{innerscript} inserts between various pairs of math classes for each option, and adjustments of this type will resemble the changes to the summation from equation~(2). The |inner| package option forces all spacing around |\mathinner| subformulas to take the value it would if the formula had type |\mathord|. Traditionally \TeX\ places more space around |\mathinner| subformulas than it does around |\mathord| atoms, so loading \textsf{innerscript} with |inner| will remove a certain amount of space from math formulas. Changes of this type will typically resemble the adjustment to the function $g$ from equation~(2). Users who want to further change the spacing in their math formulas should manually add glue, muglue, or |\kern| to their math lists or provide new values for the |\Umath| spacing parameters in their document preamble. % +% \vfil\eject +% \section*{Implementation} +% % Finally, we come to the implementation, and we begin by declaring the package. The conditionals |\ifIS@script|, |\ifIS@scriptscript|, and |\ifIS@inner| encode option information, and we set them according to the user's option declaration. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{innerscript}[2021/02/03 v. 1.0 Package innerscript] +\ProvidesPackage{innerscript}[2021/02/07 v. 1.1 Package innerscript] \newif\ifIS@script\IS@scripttrue \newif\ifIS@scriptscript\IS@scriptscripttrue \newif\ifIS@inner\IS@innertrue @@ -351,11 +355,15 @@ Happy TeXing! \expandafter\endinput% we \endinput with a balanced conditional \fi % \end{macrocode} +% We will use |\IS@skip| to store muglue information later. +% \begin{macrocode} +\newmuskip\IS@skip +% \end{macrocode} % First we set the spacing for |\scriptstyle| and |\crampedscriptstyle| atoms. Each command has the form % \begin{code} % |\Umath|\argtext{math classes}|spacing\|\argtext{math style}|=|\argtext{factor}|\thinmuskip|, % \end{code} -% where the \textit{math classes} are a pair of choices from |ord|, |op|, |bin|, |rel|, |open|, |close|, |punct|, and |inner|. The \textit{math style} is either |scriptstyle| or |crampedscriptstyle|, and the \textit{factor} corresponds to the spacing listed in Table~2. We set the |\scriptstyle| and |\scriptscriptstyle| spacing before handling |\mathinner| subformulas because we want to use updated spacing values for the |\mathinner| space adjustments. Otherwise, the |\scriptstyle| and |\scriptscriptstyle| adjustments will override changes to |\mathinner| spacing. +% where the \textit{math classes} are a pair of choices from |ord|, |op|, |bin|, |rel|, |open|, |close|, |punct|, and |inner|. The \textit{math style} is either |scriptstyle| or |crampedscriptstyle|, and the \textit{factor} corresponds to the spacing listed in Table~2. We set the |\scriptstyle| and |\scriptscriptstyle| spacing before handling |\mathinner| subformulas because we want to use updated spacing values for the |\mathinner| space adjustments. Otherwise, the |\scriptstyle| and |\scriptscriptstyle| adjustments will overwrite changes to |\mathinner| spacing. % \begin{macrocode} \ifIS@script \wlog{Package innerscript Info: @@ -509,263 +517,282 @@ Happy TeXing! \Umathinnerinnerspacing\crampedscriptscriptstyle=0.4\thinmuskip \fi % \end{macrocode} -% Now set the spacing for |\mathinner| subformulas. Each command has the form +% Now set the spacing for |\mathinner| subformulas. We store each |\mathord| spacing dimension in |\IS@skip| and use it to reset the |\mathinner| spacing. Each command has the form % \begin{code} -% |\Umath|\argtext{math class}|innerspacing\|\argtext{math style}|=|\\ -% | \Umath|\argtext{math class}|ordspacing\|\argtext{math style} +% |\IS@skip\Umath|\argtext{math class}|ordspacing\|\argtext{math style}\\ +% |\Umath|\argtext{math class}|innerspacing\|\argtext{math style}|\IS@skip| % \end{code} % or % \begin{code} -% |\Umathinner|\argtext{math class}|spacing\|\argtext{math style}|=|\\ -% | \Umathord|\argtext{math class}|spacing\|\argtext{math style}, +% |\IS@skip\Umathord|\argtext{math class}|spacing\|\argtext{math style}\\ +% |\Umathinner|\argtext{math class}|spacing\|\argtext{math style}|\IS@skip|, % \end{code} % where \textit{math class} is one of |ord|, |op|, |bin|, |rel|, |open|, |close|, |punct|, or |inner|. The \textit{math style} is either |displaystyle|, |textstyle|, |scriptstyle|, |scriptscriptstyle|, or the cramped version of any of those four. % \begin{macrocode} \ifIS@inner \wlog{Package innerscript Info: Adjusting spacing for \string\mathinner.} - \Umathordinnerspacing\displaystyle= - \Umathordordspacing\displaystyle - \Umathordinnerspacing\textstyle= - \Umathordordspacing\textstyle - \Umathordinnerspacing\scriptstyle= - \Umathordordspacing\scriptstyle - \Umathordinnerspacing\scriptscriptstyle= - \Umathordordspacing\scriptscriptstyle - \Umathordinnerspacing\crampeddisplaystyle= - \Umathordordspacing\crampeddisplaystyle - \Umathordinnerspacing\crampedtextstyle= - \Umathordordspacing\crampedtextstyle - \Umathordinnerspacing\crampedscriptstyle= - \Umathordordspacing\crampedscriptstyle - \Umathordinnerspacing\crampedscriptscriptstyle= - \Umathordordspacing\crampedscriptscriptstyle - \Umathopinnerspacing\displaystyle= - \Umathopordspacing\displaystyle - \Umathopinnerspacing\textstyle= - \Umathopordspacing\textstyle - \Umathopinnerspacing\scriptstyle= - \Umathopordspacing\scriptstyle - \Umathopinnerspacing\scriptscriptstyle= - \Umathopordspacing\scriptscriptstyle - \Umathopinnerspacing\crampeddisplaystyle= - \Umathopordspacing\crampeddisplaystyle - \Umathopinnerspacing\crampedtextstyle= - \Umathopordspacing\crampedtextstyle - \Umathopinnerspacing\crampedscriptstyle= - \Umathopordspacing\crampedscriptstyle - \Umathopinnerspacing\crampedscriptscriptstyle= - \Umathopordspacing\crampedscriptscriptstyle - \Umathbininnerspacing\displaystyle= - \Umathbinordspacing\displaystyle - \Umathbininnerspacing\textstyle= - \Umathbinordspacing\textstyle - \Umathbininnerspacing\scriptstyle= - \Umathbinordspacing\scriptstyle - \Umathbininnerspacing\scriptscriptstyle= - \Umathbinordspacing\scriptscriptstyle - \Umathbininnerspacing\crampeddisplaystyle= - \Umathbinordspacing\crampeddisplaystyle - \Umathbininnerspacing\crampedtextstyle= - \Umathbinordspacing\crampedtextstyle - \Umathbininnerspacing\crampedscriptstyle= - \Umathbinordspacing\crampedscriptstyle - \Umathbininnerspacing\crampedscriptscriptstyle= - \Umathbinordspacing\crampedscriptscriptstyle - \Umathrelinnerspacing\displaystyle= - \Umathrelordspacing\displaystyle - \Umathrelinnerspacing\textstyle= - \Umathrelordspacing\textstyle - \Umathrelinnerspacing\scriptstyle= - \Umathrelordspacing\scriptstyle - \Umathrelinnerspacing\scriptscriptstyle= - \Umathrelordspacing\scriptscriptstyle - \Umathrelinnerspacing\crampeddisplaystyle= - \Umathrelordspacing\crampeddisplaystyle - \Umathrelinnerspacing\crampedtextstyle= - \Umathrelordspacing\crampedtextstyle - \Umathrelinnerspacing\crampedscriptstyle= - \Umathrelordspacing\crampedscriptstyle - \Umathrelinnerspacing\crampedscriptscriptstyle= - \Umathrelordspacing\crampedscriptscriptstyle - \Umathopeninnerspacing\displaystyle= - \Umathopenordspacing\displaystyle - \Umathopeninnerspacing\textstyle= - \Umathopenordspacing\textstyle - \Umathopeninnerspacing\scriptstyle= - \Umathopenordspacing\scriptstyle - \Umathopeninnerspacing\scriptscriptstyle= - \Umathopenordspacing\scriptscriptstyle - \Umathopeninnerspacing\crampeddisplaystyle= - \Umathopenordspacing\crampeddisplaystyle - \Umathopeninnerspacing\crampedtextstyle= - \Umathopenordspacing\crampedtextstyle - \Umathopeninnerspacing\crampedscriptstyle= - \Umathopenordspacing\crampedscriptstyle - \Umathopeninnerspacing\crampedscriptscriptstyle= - \Umathopenordspacing\crampedscriptscriptstyle - \Umathcloseinnerspacing\displaystyle= - \Umathcloseordspacing\displaystyle - \Umathcloseinnerspacing\textstyle= - \Umathcloseordspacing\textstyle - \Umathcloseinnerspacing\scriptstyle= - \Umathcloseordspacing\scriptstyle - \Umathcloseinnerspacing\scriptscriptstyle= - \Umathcloseordspacing\scriptscriptstyle - \Umathcloseinnerspacing\crampeddisplaystyle= - \Umathcloseordspacing\crampeddisplaystyle - \Umathcloseinnerspacing\crampedtextstyle= - \Umathcloseordspacing\crampedtextstyle - \Umathcloseinnerspacing\crampedscriptstyle= - \Umathcloseordspacing\crampedscriptstyle - \Umathcloseinnerspacing\crampedscriptscriptstyle= - \Umathcloseordspacing\crampedscriptscriptstyle - \Umathpunctinnerspacing\displaystyle= - \Umathpunctordspacing\displaystyle - \Umathpunctinnerspacing\textstyle= - \Umathpunctordspacing\textstyle - \Umathpunctinnerspacing\scriptstyle= - \Umathpunctordspacing\scriptstyle - \Umathpunctinnerspacing\scriptscriptstyle= - \Umathpunctordspacing\scriptscriptstyle - \Umathpunctinnerspacing\crampeddisplaystyle= - \Umathpunctordspacing\crampeddisplaystyle - \Umathpunctinnerspacing\crampedtextstyle= - \Umathpunctordspacing\crampedtextstyle - \Umathpunctinnerspacing\crampedscriptstyle= - \Umathpunctordspacing\crampedscriptstyle - \Umathpunctinnerspacing\crampedscriptscriptstyle= - \Umathpunctordspacing\crampedscriptscriptstyle - \Umathinnerordspacing\displaystyle= - \Umathordordspacing\displaystyle - \Umathinnerordspacing\textstyle= - \Umathordordspacing\textstyle - \Umathinnerordspacing\scriptstyle= - \Umathordordspacing\scriptstyle - \Umathinnerordspacing\scriptscriptstyle= - \Umathordordspacing\scriptscriptstyle - \Umathinnerordspacing\crampeddisplaystyle= - \Umathordordspacing\crampeddisplaystyle - \Umathinnerordspacing\crampedtextstyle= - \Umathordordspacing\crampedtextstyle - \Umathinnerordspacing\crampedscriptstyle= - \Umathordordspacing\crampedscriptstyle - \Umathinnerordspacing\crampedscriptscriptstyle= - \Umathordordspacing\crampedscriptscriptstyle - \Umathinneropspacing\displaystyle= - \Umathordopspacing\displaystyle - \Umathinneropspacing\textstyle= - \Umathordopspacing\textstyle - \Umathinneropspacing\scriptstyle= - \Umathordopspacing\scriptstyle - \Umathinneropspacing\scriptscriptstyle= - \Umathordopspacing\scriptscriptstyle - \Umathinneropspacing\crampeddisplaystyle= - \Umathordopspacing\crampeddisplaystyle - \Umathinneropspacing\crampedtextstyle= - \Umathordopspacing\crampedtextstyle - \Umathinneropspacing\crampedscriptstyle= - \Umathordopspacing\crampedscriptstyle - \Umathinneropspacing\crampedscriptscriptstyle= - \Umathordopspacing\crampedscriptscriptstyle - \Umathinnerbinspacing\displaystyle= - \Umathordbinspacing\displaystyle - \Umathinnerbinspacing\textstyle= - \Umathordbinspacing\textstyle - \Umathinnerbinspacing\scriptstyle= - \Umathordbinspacing\scriptstyle - \Umathinnerbinspacing\scriptscriptstyle= - \Umathordbinspacing\scriptscriptstyle - \Umathinnerbinspacing\crampeddisplaystyle= - \Umathordbinspacing\crampeddisplaystyle - \Umathinnerbinspacing\crampedtextstyle= - \Umathordbinspacing\crampedtextstyle - \Umathinnerbinspacing\crampedscriptstyle= - \Umathordbinspacing\crampedscriptstyle - \Umathinnerbinspacing\crampedscriptscriptstyle= - \Umathordbinspacing\crampedscriptscriptstyle - \Umathinnerrelspacing\displaystyle= - \Umathordrelspacing\displaystyle - \Umathinnerrelspacing\textstyle= - \Umathordrelspacing\textstyle - \Umathinnerrelspacing\scriptstyle= - \Umathordrelspacing\scriptstyle - \Umathinnerrelspacing\scriptscriptstyle= - \Umathordrelspacing\scriptscriptstyle - \Umathinnerrelspacing\crampeddisplaystyle= - \Umathordrelspacing\crampeddisplaystyle - \Umathinnerrelspacing\crampedtextstyle= - \Umathordrelspacing\crampedtextstyle - \Umathinnerrelspacing\crampedscriptstyle= - \Umathordrelspacing\crampedscriptstyle - \Umathinnerrelspacing\crampedscriptscriptstyle= - \Umathordrelspacing\crampedscriptscriptstyle - \Umathinneropenspacing\displaystyle= - \Umathordopenspacing\displaystyle - \Umathinneropenspacing\textstyle= - \Umathordopenspacing\textstyle - \Umathinneropenspacing\scriptstyle= - \Umathordopenspacing\scriptstyle - \Umathinneropenspacing\scriptscriptstyle= - \Umathordopenspacing\scriptscriptstyle - \Umathinneropenspacing\crampeddisplaystyle= - \Umathordopenspacing\crampeddisplaystyle - \Umathinneropenspacing\crampedtextstyle= - \Umathordopenspacing\crampedtextstyle - \Umathinneropenspacing\crampedscriptstyle= - \Umathordopenspacing\crampedscriptstyle - \Umathinneropenspacing\crampedscriptscriptstyle= - \Umathordopenspacing\crampedscriptscriptstyle - \Umathinnerclosespacing\displaystyle= - \Umathordclosespacing\displaystyle - \Umathinnerclosespacing\textstyle= - \Umathordclosespacing\textstyle - \Umathinnerclosespacing\scriptstyle= - \Umathordclosespacing\scriptstyle - \Umathinnerclosespacing\scriptscriptstyle= - \Umathordclosespacing\scriptscriptstyle - \Umathinnerclosespacing\crampeddisplaystyle= - \Umathordclosespacing\crampeddisplaystyle - \Umathinnerclosespacing\crampedtextstyle= - \Umathordclosespacing\crampedtextstyle - \Umathinnerclosespacing\crampedscriptstyle= - \Umathordclosespacing\crampedscriptstyle - \Umathinnerclosespacing\crampedscriptscriptstyle= - \Umathordclosespacing\crampedscriptscriptstyle - \Umathinnerpunctspacing\displaystyle= - \Umathordpunctspacing\displaystyle - \Umathinnerpunctspacing\textstyle= - \Umathordpunctspacing\textstyle - \Umathinnerpunctspacing\scriptstyle= - \Umathordpunctspacing\scriptstyle - \Umathinnerpunctspacing\scriptscriptstyle= - \Umathordpunctspacing\scriptscriptstyle - \Umathinnerpunctspacing\crampeddisplaystyle= - \Umathordpunctspacing\crampeddisplaystyle - \Umathinnerpunctspacing\crampedtextstyle= - \Umathordpunctspacing\crampedtextstyle - \Umathinnerpunctspacing\crampedscriptstyle= - \Umathordpunctspacing\crampedscriptstyle - \Umathinnerpunctspacing\crampedscriptscriptstyle= - \Umathordpunctspacing\crampedscriptscriptstyle - \Umathinnerinnerspacing\displaystyle= - \Umathordordspacing\displaystyle - \Umathinnerinnerspacing\textstyle= - \Umathordordspacing\textstyle - \Umathinnerinnerspacing\scriptstyle= - \Umathordordspacing\scriptstyle - \Umathinnerinnerspacing\scriptscriptstyle= - \Umathordordspacing\scriptscriptstyle - \Umathinnerinnerspacing\crampeddisplaystyle= - \Umathordordspacing\crampeddisplaystyle - \Umathinnerinnerspacing\crampedtextstyle= - \Umathordordspacing\crampedtextstyle - \Umathinnerinnerspacing\crampedscriptstyle= - \Umathordordspacing\crampedscriptstyle - \Umathinnerinnerspacing\crampedscriptscriptstyle= - \Umathordordspacing\crampedscriptscriptstyle + \IS@skip\Umathordordspacing\displaystyle + \Umathordinnerspacing\displaystyle\IS@skip + \IS@skip\Umathordordspacing\textstyle + \Umathordinnerspacing\textstyle\IS@skip + \IS@skip\Umathordordspacing\scriptstyle + \Umathordinnerspacing\scriptstyle\IS@skip + \IS@skip\Umathordordspacing\scriptscriptstyle + \Umathordinnerspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathordordspacing\crampeddisplaystyle + \Umathordinnerspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathordordspacing\crampedtextstyle + \Umathordinnerspacing\crampedtextstyle\IS@skip + \IS@skip\Umathordordspacing\crampedscriptstyle + \Umathordinnerspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathordordspacing\crampedscriptscriptstyle + \Umathordinnerspacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathopordspacing\displaystyle + \Umathopinnerspacing\displaystyle\IS@skip + \IS@skip\Umathopordspacing\textstyle + \Umathopinnerspacing\textstyle\IS@skip + \IS@skip\Umathopordspacing\scriptstyle + \Umathopinnerspacing\scriptstyle\IS@skip + \IS@skip\Umathopordspacing\scriptscriptstyle + \Umathopinnerspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathopordspacing\crampeddisplaystyle + \Umathopinnerspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathopordspacing\crampedtextstyle + \Umathopinnerspacing\crampedtextstyle\IS@skip + \IS@skip\Umathopordspacing\crampedscriptstyle + \Umathopinnerspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathopordspacing\crampedscriptscriptstyle + \Umathopinnerspacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathbinordspacing\displaystyle + \Umathbininnerspacing\displaystyle\IS@skip + \IS@skip\Umathbinordspacing\textstyle + \Umathbininnerspacing\textstyle\IS@skip + \IS@skip\Umathbinordspacing\scriptstyle + \Umathbininnerspacing\scriptstyle\IS@skip + \IS@skip\Umathbinordspacing\scriptscriptstyle + \Umathbininnerspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathbinordspacing\crampeddisplaystyle + \Umathbininnerspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathbinordspacing\crampedtextstyle + \Umathbininnerspacing\crampedtextstyle\IS@skip + \IS@skip\Umathbinordspacing\crampedscriptstyle + \Umathbininnerspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathbinordspacing\crampedscriptscriptstyle + \Umathbininnerspacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathrelordspacing\displaystyle + \Umathrelinnerspacing\displaystyle\IS@skip + \IS@skip\Umathrelordspacing\textstyle + \Umathrelinnerspacing\textstyle\IS@skip + \IS@skip\Umathrelordspacing\scriptstyle + \Umathrelinnerspacing\scriptstyle\IS@skip + \IS@skip\Umathrelordspacing\scriptscriptstyle + \Umathrelinnerspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathrelordspacing\crampeddisplaystyle + \Umathrelinnerspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathrelordspacing\crampedtextstyle + \Umathrelinnerspacing\crampedtextstyle\IS@skip + \IS@skip\Umathrelordspacing\crampedscriptstyle + \Umathrelinnerspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathrelordspacing\crampedscriptscriptstyle + \Umathrelinnerspacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathopenordspacing\displaystyle + \Umathopeninnerspacing\displaystyle\IS@skip + \IS@skip\Umathopenordspacing\textstyle + \Umathopeninnerspacing\textstyle\IS@skip + \IS@skip\Umathopenordspacing\scriptstyle + \Umathopeninnerspacing\scriptstyle\IS@skip + \IS@skip\Umathopenordspacing\scriptscriptstyle + \Umathopeninnerspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathopenordspacing\crampeddisplaystyle + \Umathopeninnerspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathopenordspacing\crampedtextstyle + \Umathopeninnerspacing\crampedtextstyle\IS@skip + \IS@skip\Umathopenordspacing\crampedscriptstyle + \Umathopeninnerspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathopenordspacing\crampedscriptscriptstyle + \Umathopeninnerspacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathcloseordspacing\displaystyle + \Umathcloseinnerspacing\displaystyle\IS@skip + \IS@skip\Umathcloseordspacing\textstyle + \Umathcloseinnerspacing\textstyle\IS@skip + \IS@skip\Umathcloseordspacing\scriptstyle + \Umathcloseinnerspacing\scriptstyle\IS@skip + \IS@skip\Umathcloseordspacing\scriptscriptstyle + \Umathcloseinnerspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathcloseordspacing\crampeddisplaystyle + \Umathcloseinnerspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathcloseordspacing\crampedtextstyle + \Umathcloseinnerspacing\crampedtextstyle\IS@skip + \IS@skip\Umathcloseordspacing\crampedscriptstyle + \Umathcloseinnerspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathcloseordspacing\crampedscriptscriptstyle + \Umathcloseinnerspacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathpunctordspacing\displaystyle + \Umathpunctinnerspacing\displaystyle\IS@skip + \IS@skip\Umathpunctordspacing\textstyle + \Umathpunctinnerspacing\textstyle\IS@skip + \IS@skip\Umathpunctordspacing\scriptstyle + \Umathpunctinnerspacing\scriptstyle\IS@skip + \IS@skip\Umathpunctordspacing\scriptscriptstyle + \Umathpunctinnerspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathpunctordspacing\crampeddisplaystyle + \Umathpunctinnerspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathpunctordspacing\crampedtextstyle + \Umathpunctinnerspacing\crampedtextstyle\IS@skip + \IS@skip\Umathpunctordspacing\crampedscriptstyle + \Umathpunctinnerspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathpunctordspacing\crampedscriptscriptstyle + \Umathpunctinnerspacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathordordspacing\displaystyle + \Umathinnerordspacing\displaystyle\IS@skip + \IS@skip\Umathordordspacing\textstyle + \Umathinnerordspacing\textstyle\IS@skip + \IS@skip\Umathordordspacing\scriptstyle + \Umathinnerordspacing\scriptstyle\IS@skip + \IS@skip\Umathordordspacing\scriptscriptstyle + \Umathinnerordspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathordordspacing\crampeddisplaystyle + \Umathinnerordspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathordordspacing\crampedtextstyle + \Umathinnerordspacing\crampedtextstyle\IS@skip + \IS@skip\Umathordordspacing\crampedscriptstyle + \Umathinnerordspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathordordspacing\crampedscriptscriptstyle + \Umathinnerordspacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathordopspacing\displaystyle + \Umathinneropspacing\displaystyle\IS@skip + \IS@skip\Umathordopspacing\textstyle + \Umathinneropspacing\textstyle\IS@skip + \IS@skip\Umathordopspacing\scriptstyle + \Umathinneropspacing\scriptstyle\IS@skip + \IS@skip\Umathordopspacing\scriptscriptstyle + \Umathinneropspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathordopspacing\crampeddisplaystyle + \Umathinneropspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathordopspacing\crampedtextstyle + \Umathinneropspacing\crampedtextstyle\IS@skip + \IS@skip\Umathordopspacing\crampedscriptstyle + \Umathinneropspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathordopspacing\crampedscriptscriptstyle + \Umathinneropspacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathordbinspacing\displaystyle + \Umathinnerbinspacing\displaystyle\IS@skip + \IS@skip\Umathordbinspacing\textstyle + \Umathinnerbinspacing\textstyle\IS@skip + \IS@skip\Umathordbinspacing\scriptstyle + \Umathinnerbinspacing\scriptstyle\IS@skip + \IS@skip\Umathordbinspacing\scriptscriptstyle + \Umathinnerbinspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathordbinspacing\crampeddisplaystyle + \Umathinnerbinspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathordbinspacing\crampedtextstyle + \Umathinnerbinspacing\crampedtextstyle\IS@skip + \IS@skip\Umathordbinspacing\crampedscriptstyle + \Umathinnerbinspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathordbinspacing\crampedscriptscriptstyle + \Umathinnerbinspacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathordrelspacing\displaystyle + \Umathinnerrelspacing\displaystyle\IS@skip + \IS@skip\Umathordrelspacing\textstyle + \Umathinnerrelspacing\textstyle\IS@skip + \IS@skip\Umathordrelspacing\scriptstyle + \Umathinnerrelspacing\scriptstyle\IS@skip + \IS@skip\Umathordrelspacing\scriptscriptstyle + \Umathinnerrelspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathordrelspacing\crampeddisplaystyle + \Umathinnerrelspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathordrelspacing\crampedtextstyle + \Umathinnerrelspacing\crampedtextstyle\IS@skip + \IS@skip\Umathordrelspacing\crampedscriptstyle + \Umathinnerrelspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathordrelspacing\crampedscriptscriptstyle + \Umathinnerrelspacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathordopenspacing\displaystyle + \Umathinneropenspacing\displaystyle\IS@skip + \IS@skip\Umathordopenspacing\textstyle + \Umathinneropenspacing\textstyle\IS@skip + \IS@skip\Umathordopenspacing\scriptstyle + \Umathinneropenspacing\scriptstyle\IS@skip + \IS@skip\Umathordopenspacing\scriptscriptstyle + \Umathinneropenspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathordopenspacing\crampeddisplaystyle + \Umathinneropenspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathordopenspacing\crampedtextstyle + \Umathinneropenspacing\crampedtextstyle\IS@skip + \IS@skip\Umathordopenspacing\crampedscriptstyle + \Umathinneropenspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathordopenspacing\crampedscriptscriptstyle + \Umathinneropenspacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathordclosespacing\displaystyle + \Umathinnerclosespacing\displaystyle\IS@skip + \IS@skip\Umathordclosespacing\textstyle + \Umathinnerclosespacing\textstyle\IS@skip + \IS@skip\Umathordclosespacing\scriptstyle + \Umathinnerclosespacing\scriptstyle\IS@skip + \IS@skip\Umathordclosespacing\scriptscriptstyle + \Umathinnerclosespacing\scriptscriptstyle\IS@skip + \IS@skip\Umathordclosespacing\crampeddisplaystyle + \Umathinnerclosespacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathordclosespacing\crampedtextstyle + \Umathinnerclosespacing\crampedtextstyle\IS@skip + \IS@skip\Umathordclosespacing\crampedscriptstyle + \Umathinnerclosespacing\crampedscriptstyle\IS@skip + \IS@skip\Umathordclosespacing\crampedscriptscriptstyle + \Umathinnerclosespacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathordpunctspacing\displaystyle + \Umathinnerpunctspacing\displaystyle\IS@skip + \IS@skip\Umathordpunctspacing\textstyle + \Umathinnerpunctspacing\textstyle\IS@skip + \IS@skip\Umathordpunctspacing\scriptstyle + \Umathinnerpunctspacing\scriptstyle\IS@skip + \IS@skip\Umathordpunctspacing\scriptscriptstyle + \Umathinnerpunctspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathordpunctspacing\crampeddisplaystyle + \Umathinnerpunctspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathordpunctspacing\crampedtextstyle + \Umathinnerpunctspacing\crampedtextstyle\IS@skip + \IS@skip\Umathordpunctspacing\crampedscriptstyle + \Umathinnerpunctspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathordpunctspacing\crampedscriptscriptstyle + \Umathinnerpunctspacing\crampedscriptscriptstyle\IS@skip + \IS@skip\Umathordordspacing\displaystyle + \Umathinnerinnerspacing\displaystyle\IS@skip + \IS@skip\Umathordordspacing\textstyle + \Umathinnerinnerspacing\textstyle\IS@skip + \IS@skip\Umathordordspacing\scriptstyle + \Umathinnerinnerspacing\scriptstyle\IS@skip + \IS@skip\Umathordordspacing\scriptscriptstyle + \Umathinnerinnerspacing\scriptscriptstyle\IS@skip + \IS@skip\Umathordordspacing\crampeddisplaystyle + \Umathinnerinnerspacing\crampeddisplaystyle\IS@skip + \IS@skip\Umathordordspacing\crampedtextstyle + \Umathinnerinnerspacing\crampedtextstyle\IS@skip + \IS@skip\Umathordordspacing\crampedscriptstyle + \Umathinnerinnerspacing\crampedscriptstyle\IS@skip + \IS@skip\Umathordordspacing\crampedscriptscriptstyle + \Umathinnerinnerspacing\crampedscriptscriptstyle\IS@skip \fi % \end{macrocode} +% \vfil\eject +% \section*{Version History} +% \begin{multicols*}{2} +% \bgroup\raggedright\parskip\z@\parindent\z@\leftskip1em\obeylines +% \setbox0\hbox{\hskip 1pt.\hskip 1pt} +% \def\version#1#2{\bigskip\hbox to \hsize{\textbf{#1} \cleaders\copy0\hfill\ #2}\par} +% \def\item{---\kern0.2ex\relax} +% +% \version{1.0}{February 2021} +% \item initial release +% +% \version{1.1}{Fegruary 2021} +% \item bug fix for |\mathinner| spacing +% \item added |\IS@skip| muglue register +% +% \egroup +% \end{multicols*} +% +% % % \iffalse % diff --git a/macros/luatex/latex/innerscript/innerscript.pdf b/macros/luatex/latex/innerscript/innerscript.pdf index 3a23d5eea7..aa214fb36b 100644 Binary files a/macros/luatex/latex/innerscript/innerscript.pdf and b/macros/luatex/latex/innerscript/innerscript.pdf differ -- cgit v1.2.3