From 7428e668f046bec10d1200214789e40390fa51e7 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 10 Feb 2021 03:01:13 +0000 Subject: CTAN sync 202102100301 --- macros/latex/contrib/aeb_pro/aeb_pro/README.md | 9 +- macros/latex/contrib/aeb_pro/aeb_pro/aeb_pro.dtx | 290 +- macros/latex/contrib/aeb_pro/aeb_pro/aeb_pro.ins | 3 +- .../aeb_pro/aeb_pro/doc/acrobat-in-workflow.pdf | Bin 0 -> 370603 bytes .../aeb_pro/aeb_pro/doc/acrobat-in-workflow.tex | 232 + .../contrib/aeb_pro/aeb_pro/doc/aebpro_man.pdf | Bin 464340 -> 719107 bytes .../contrib/aeb_pro/aeb_pro/doc/aebpro_man.tex | 217 +- .../aeb_pro/aeb_pro/doc/install_jsfiles.tex | 312 + .../aeb_pro/aeb_pro/examples/aebpro_ex1.pdf | Bin 70199 -> 0 bytes .../aeb_pro/aeb_pro/examples/aebpro_ex1.tex | 18 +- .../aeb_pro/aeb_pro/examples/aebpro_ex3.pdf | Bin 763806 -> 794029 bytes .../aeb_pro/aeb_pro/examples/aebpro_ex3.tex | 63 +- .../aeb_pro/aeb_pro/examples/aebpro_ex4.tex | 26 +- .../aeb_pro/aeb_pro/examples/aebpro_ex6.pdf | Bin 256560 -> 261015 bytes .../aeb_pro/aeb_pro/examples/aebpro_ex6.tex | 24 +- .../aeb_pro/aeb_pro/examples/aebpro_ex8.pdf | Bin 713378 -> 719343 bytes .../aeb_pro/aeb_pro/examples/aebpro_ex8.tex | 2 +- .../aeb_pro/aeb_pro/examples/aebpro_index_ex.pdf | Bin 0 -> 26192 bytes .../aeb_pro/aeb_pro/examples/test_install.pdf | Bin 19205 -> 26896 bytes .../aeb_pro/aeb_pro/examples/test_install.tex | 11 + .../latex/contrib/easybook/doc/easybook-demo.pdf | Bin 297365 -> 297366 bytes .../latex/contrib/easybook/doc/easybook-demo.tex | 7 +- macros/latex/contrib/easybook/doc/easybook.pdf | Bin 225630 -> 225794 bytes macros/latex/contrib/easybook/doc/easybook.tex | 18 +- macros/latex/contrib/easybook/easybook.cls | 74 +- macros/latex/contrib/hyperref/ChangeLog.txt | 8 + macros/latex/contrib/hyperref/README.md | 2 +- macros/latex/contrib/hyperref/doc/backref.pdf | Bin 198815 -> 198298 bytes .../latex/contrib/hyperref/doc/hyperref-doc.html | 920 +-- macros/latex/contrib/hyperref/doc/hyperref-doc.pdf | Bin 296810 -> 298373 bytes macros/latex/contrib/hyperref/doc/hyperref-doc.tex | 24 +- macros/latex/contrib/hyperref/doc/hyperref.pdf | Bin 2421160 -> 2396661 bytes macros/latex/contrib/hyperref/doc/manual.css | 296 + macros/latex/contrib/hyperref/doc/manual.html | 7468 ++++++++++++++++++++ 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 188802 -> 188032 bytes macros/latex/contrib/hyperref/hluatex.dtx | 4 +- macros/latex/contrib/hyperref/hyperref.dtx | 47 +- macros/latex/contrib/hyperref/hyperref.ins | 1 + macros/latex/contrib/hyperref/manifest.txt | 2 +- macros/latex/contrib/hyperref/xr-hyper.sty | 2 +- macros/luatex/optex/README | 9 +- macros/luatex/optex/base/basic-macros.opm | 37 +- macros/luatex/optex/base/cite-bib.opm | 2 +- macros/luatex/optex/base/doc.opm | 2 +- macros/luatex/optex/base/fonts-select.opm | 6 +- macros/luatex/optex/base/hyperlinks.opm | 5 +- macros/luatex/optex/base/if-macros.opm | 14 +- macros/luatex/optex/base/languages.opm | 24 +- macros/luatex/optex/base/makeindex.opm | 11 +- macros/luatex/optex/base/maketoc.opm | 49 +- macros/luatex/optex/base/math-macros.opm | 32 +- macros/luatex/optex/base/math-preload.opm | 24 +- macros/luatex/optex/base/math-unicode.opm | 6 +- macros/luatex/optex/base/more-macros.opm | 2 +- macros/luatex/optex/base/optex.ini | 2 +- macros/luatex/optex/base/others.opm | 2 +- macros/luatex/optex/base/outlines.opm | 42 +- macros/luatex/optex/base/parameters.opm | 42 +- macros/luatex/optex/base/pdfuni-string.opm | 71 +- macros/luatex/optex/base/ref-file.opm | 14 +- macros/luatex/optex/base/references.opm | 5 +- macros/luatex/optex/base/sections.opm | 52 +- macros/luatex/optex/base/slides.opm | 6 +- macros/luatex/optex/base/table.opm | 19 +- macros/luatex/optex/base/unimath-codes.opm | 40 +- macros/luatex/optex/base/unimath-table.opm | 3 +- macros/luatex/optex/base/verbatim.opm | 16 +- macros/luatex/optex/demo/op-demo.tex | 4 +- macros/luatex/optex/demo/op-slides.tex | 2 +- macros/luatex/optex/doc/omls.tex | 832 +++ macros/luatex/optex/doc/optex-doc.pdf | Bin 1362584 -> 1366580 bytes macros/luatex/optex/doc/optex-doc.tex | 4 +- macros/luatex/optex/doc/optex-math.tex | 6 +- macros/luatex/optex/doc/optex-techdoc.tex | 2 + macros/luatex/optex/doc/optex-userdoc.tex | 45 +- macros/unicodetex/latex/texnegar/INSTALL.txt | 2 +- .../latex/texnegar/doc-ligature-texnegar.pdf | Bin 13141 -> 13142 bytes .../unicodetex/latex/texnegar/doc-ligature-xep.pdf | Bin 10116 -> 10117 bytes .../latex/texnegar/doc-samples-glyph.pdf | Bin 63436 -> 63437 bytes .../latex/texnegar/doc-samples-hrule.pdf | Bin 62969 -> 62969 bytes .../unicodetex/latex/texnegar/doc-samples-xep.pdf | Bin 65544 -> 65546 bytes macros/unicodetex/latex/texnegar/texnegar-doc.ltx | 8 +- macros/unicodetex/latex/texnegar/texnegar-doc.pdf | Bin 2873970 -> 2874338 bytes .../latex/texnegar/texnegar-luatex-glyph.pdf | Bin 878555 -> 878555 bytes .../texnegar/texnegar-luatex-leaders-glyph.pdf | Bin 278471 -> 278471 bytes .../texnegar/texnegar-luatex-leaders-hrule.pdf | Bin 169438 -> 169438 bytes .../latex/texnegar/texnegar-xetex-bidi-glyph.pdf | Bin 157990 -> 157989 bytes .../texnegar/texnegar-xetex-bidi-leaders-glyph.pdf | Bin 212553 -> 212547 bytes .../texnegar/texnegar-xetex-bidi-leaders-hrule.pdf | Bin 156635 -> 156643 bytes .../texnegar/texnegar-xetex-xepersian-glyph.pdf | Bin 156636 -> 156634 bytes .../texnegar-xetex-xepersian-leaders-glyph.pdf | Bin 194661 -> 194660 bytes .../texnegar-xetex-xepersian-leaders-hrule.pdf | Bin 155945 -> 155937 bytes macros/unicodetex/latex/texnegar/texnegar.dtx | 106 +- macros/unicodetex/latex/texnegar/texnegar.pdf | Bin 563702 -> 568634 bytes macros/unicodetex/latex/texnegar/xepersian-XB.pdf | Bin 106691 -> 106690 bytes 101 files changed, 10706 insertions(+), 1038 deletions(-) create mode 100644 macros/latex/contrib/aeb_pro/aeb_pro/doc/acrobat-in-workflow.pdf create mode 100644 macros/latex/contrib/aeb_pro/aeb_pro/doc/acrobat-in-workflow.tex create mode 100644 macros/latex/contrib/aeb_pro/aeb_pro/doc/install_jsfiles.tex delete mode 100644 macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex1.pdf create mode 100644 macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_index_ex.pdf create mode 100644 macros/latex/contrib/hyperref/doc/manual.css create mode 100644 macros/latex/contrib/hyperref/doc/manual.html create mode 100644 macros/latex/contrib/hyperref/doc/manual2.html create mode 100644 macros/latex/contrib/hyperref/doc/manual3.html create mode 100644 macros/latex/contrib/hyperref/doc/manual4.html create mode 100644 macros/latex/contrib/hyperref/doc/manual5.html create mode 100644 macros/latex/contrib/hyperref/doc/manual6.html create mode 100644 macros/latex/contrib/hyperref/doc/manual7.html create mode 100644 macros/luatex/optex/doc/omls.tex (limited to 'macros') diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/README.md b/macros/latex/contrib/aeb_pro/aeb_pro/README.md index e82882f8b5..322055fa7c 100644 --- a/macros/latex/contrib/aeb_pro/aeb_pro/README.md +++ b/macros/latex/contrib/aeb_pro/aeb_pro/README.md @@ -1,6 +1,6 @@ The AeB Pro Package Author: D. P. Story -Dated: 2019-03-21 +Dated: 2021-02-07 The AeB Pro Package complements and extends AcroTeX eDucation Bundle. @@ -38,6 +38,13 @@ The AcroTeX Blog (http://blog.acrotex.net/) lists the distribution files at http://www.acrotex.net/blog/?page_id=835, all demo files that use AeB Pro are listed at http://www.acrotex.net/blog/?tag=aeb-pro. +What's New (2021-02-07) Fix a long time bug of page events. + +What's New (2021-02-04) Updated documentation to reflect new security restriction +by Adobe Acrobat DC (purchased or updated after December 2020). Authored the document +acrobat-in-workflow.pdf to explain the procedure to configure Acrobat DC. Creating +an altnernative name of aeb-pro, to conform to CTAN naming. + What's New (2019/03/21) This new version requires aeb-comment (version 3.2 of the comment package). Changed the order of loading of the insdljs package. diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/aeb_pro.dtx b/macros/latex/contrib/aeb_pro/aeb_pro/aeb_pro.dtx index 5ce34f64cc..a225c7209b 100644 --- a/macros/latex/contrib/aeb_pro/aeb_pro/aeb_pro.dtx +++ b/macros/latex/contrib/aeb_pro/aeb_pro/aeb_pro.dtx @@ -2,7 +2,7 @@ %<*copyright> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% aeb_pro.sty package, %% -%% Copyright (C) 2006--2019 D. P. Story %% +%% Copyright (C) 2006--2021 D. P. Story %% %% dpstory@acrotex.net %% %% %% %% This program can redistributed and/or modified under %% @@ -14,7 +14,7 @@ % %\NeedsTeXFormat{LaTeX2e}[1997/12/01] %\ProvidesPackage{aeb_pro} -% [2019/03/21 v2.9.5 aeb_pro: A support package (dps)] +% [2021/02/07 v2.10 aeb_pro: A support package (dps)] %<*driver> \documentclass{ltxdoc} \usepackage[colorlinks,hyperindex=false]{hyperref} @@ -35,6 +35,9 @@ \def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}} \def\meta#1{\textsl{\texttt{#1}}} \def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}} +\makeatletter +\let\@latex@warning@no@line\@gobble +\makeatother \InputIfFileExists{aebdocfmt.def}{\PackageInfo{aeb_pro}{Inputting aebdocfmt.def}} {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax \PackageInfo{aeb_pro}{aebdocfmt.def cannot be found}} @@ -60,10 +63,27 @@ % \InputIfFileExists{aebdonotindex.def}{\PackageInfo{aeb_pro}{Inputting aebdonotindex.def}} % {\PackageInfo{aeb_pro}{cannot find aebdonotindex.def}} % +% +% \section{Alternate package name: \texorpdfstring{\protect\pkg{aeb-pro}}{aeb-pro}} +% CTAN lists this package (\pkg{aeb\_pro}) as \pkg{aeb-pro}, so we'll create +% a dummy package by that name. +% \changes{v1.2}{2018/04/26}{Added dummy package \string\pkg{annot-pro}} +% \begin{macrocode} +%<*altpkgname> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{aeb-pro} + [2021/02/04 v1.0 aeb-pro Alt-name (dps)] +\RequirePackage{xkeyval} +\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}{aeb_pro}} +\ProcessOptionsX\relax +\RequirePackage{aeb_pro} +% \end{macrocode} % \begin{macrocode} -% Begin package segment +% %<*package> % \end{macrocode} +% \changes{v2.9.7}{2021/02/04}{Updated documentation to reflect new Acrobat security restriction, +% Acrobat may have to be configured.} % \changes{v2.9}{2017/08/25}{Extracted some of the code from unicode.def to create a new package, forms16be. % This package now includes forms16be.} % \changes{v1.9}{2016/03/03}{Allow users of pdftex and xetex to access JavaScript related @@ -225,7 +245,7 @@ {\PackageInfo{aeb_pro}{Inputting code for the pro option}}% {\PackageInfo{aeb_pro}{Cannot find aebpro.def. Reinstall or refresh your file name database, as needed.}}} -\AtEndOfPackage{\aeb@InputAeBPro} +%\AtEndOfPackage{\aeb@InputAeBPro} % \end{macrocode} % % \subsection{\texttt{uselayers} option} @@ -292,10 +312,10 @@ % (2015/08/06) Added code so that the childof is read after linktoattachments % \changes{v2.4}{2016/08/03}{Removed the \string\texttt{latin1} option as unworkable across some workflows} % \begin{macrocode} -\DeclareOptionX{linktoattachments}{% dps23 +\DeclareOptionX{linktoattachments}{% \let\aeb@InputUnicodes\@aeb@InputUnicodes } -\def\ap@RequireUnicode{\RequirePackage{forms16be}} % dps23 +\def\ap@RequireUnicode{\RequirePackage{forms16be}} \let\aeb@childofInput\@empty \let\aeb@childof\@empty \DeclareOptionX{childof}{\def\aeb@childof{#1}\def\aeb@childofInput{% @@ -541,7 +561,7 @@ \@ifpackageloaded{eforms}{\let\execjs\aebp@YES} {% \@ifundefined{aeb@eforms@opts}{} - {\ap@RP[execJS]{eforms}[2017/01/03]}% + {\ap@RP[execJS]{eforms}[2020/12/14]}% } % \end{macrocode} % load \pkg{eforms} before \pkg{insdljs} so \pkg{eforms} can properly pass options @@ -550,7 +570,7 @@ % \begin{macrocode} \@ifpackageloaded{insdljs}{\let\execjs\aebp@YES} {% - \ap@RP[execJS]{insdljs}[2016/07/31]% incls conv-xkv + \ap@RP[execJS]{insdljs}[2021/02/07]% } \@ifpackageloaded{aebxmp}{\aebp@PkgWarningi{aebxmp}} {% @@ -586,7 +606,7 @@ % \changes{v2.9}{2017/08/25}{require \string\pkg{forms16be} as needed} % \begin{macrocode} \ifx\aeb@InputUnicodes\@empty\else\expandafter -\ap@RequireUnicode\fi% dps23 +\ap@RequireUnicode\fi \ifpdfmarkup\else\if\aebp@uselayers1 \excludecomment{printRollover}% \excludecomment{rollover}% @@ -2077,6 +2097,8 @@ try { % \cs{maketitle}) is a special case: When setting the open and close % page actions for the first page, these environments \emph{must go} % in the preamble. +% \changes{v2.10}{2021/02/07}{Fix a long standing problem with page open +% and close events} % \begin{macrocode} \def\canceleveryPageOpen{\global\@everyPageOpenfalse \global\let\every@PageOpen\@empty} @@ -2085,14 +2107,14 @@ try { \newenvironment{everyPageOpen}[1][] {\global\@everyPageOpentrue\@defineJS[#1]{\every@PageOpen}} {\end@defineJS - \ifnum\value{page}=1\relax + \ifnum\value{page}=\@ne \gdef\ap@AddtoOpenJS{\thisPageAction{\JS{\every@PageOpen}}{}}% \expandafter\aftergroup\expandafter\ap@AddtoOpenJS\fi } \newenvironment{everyPageClose}[1][] {\global\@everyPageClosetrue\@defineJS[#1]{\every@PageClose}} {\end@defineJS - \ifnum\value{page}=1\relax + \ifnum\value{page}=\@ne \gdef\ap@AddtoCloseJS{\thisPageAction{}{\JS{\every@PageClose}}}% \expandafter\aftergroup\expandafter\ap@AddtoCloseJS\fi } @@ -2100,7 +2122,7 @@ try { \let\every@PageClose\@empty \newenvironment{addJSToPageOpen}[1][] {\@defineJS[#1]{\addJST@PageOpen}}{\end@defineJS - \ifnum\value{page}=1\relax + \ifnum\value{page}=\@ne \gdef\ap@AddtoOpenJS{\thisPageAction{\JS{\addJST@PageOpen}}{}}% \expandafter\aftergroup\expandafter\ap@AddtoOpenJS\fi } @@ -2111,19 +2133,19 @@ try { % The \texttt{addJSToPageOpenAt} and \texttt{addJSToPageCloseAt} can now be used % in the preamble on the first page. % \begin{macrocode} - \ifnum\value{page}=1\relax\if\frstPageSpec\aebp@YES + \ifnum\value{page}=\@ne\if\frstPageSpec\aebp@YES \thisPageAction{\JS{\@nameuse{addJST@PageOpenAt1}}}{}\fi\fi } \newenvironment{addJSToPageClose}[1][] -{\@defineJS[#1]{\addJST@PageClose}}{\end@defineJS - \ifnum\value{page}=1\relax +{\pdfSpacesOff\@defineJS[#1]{\addJST@PageClose}}{\end@defineJS + \ifnum\value{page}=\@ne \gdef\ap@AddtoCloseJS{% \thisPageAction{}{\JS{\addJST@PageClose}}}% \expandafter\aftergroup\expandafter\ap@AddtoCloseJS\fi } \newenvironment{addJSToPageCloseAt}[2][] -{\@@defineJS[#1]{addJST@PageCloseAt}{#2}}{\end@@defineJS - \ifnum\value{page}=1\relax\if\frstPageSpec\aebp@YES +{\pdfSpacesOff\@@defineJS[#1]{addJST@PageCloseAt}{#2}}{\end@@defineJS + \ifnum\value{page}=\@ne\if\frstPageSpec\aebp@YES \thisPageAction{}{\JS{\@nameuse{addJST@PageCloseAt1}}}\fi\fi } \let\addJST@PageOpen\@empty @@ -2138,18 +2160,20 @@ try { % define how our page actions are to be inserted. % \begin{macrocode} \def\aebp@PageOpenCloseHandler{% - \@ifundefined{addJST@PageOpenAt\arabic{page}}% - {\global\let\thisOpenPageActionAt\@empty}% - {\gdef\thisOpenPageActionAt{% - \@nameuse{addJST@PageOpenAt\arabic{page}}}}% - \@ifundefined{addJST@PageCloseAt\arabic{page}}% - {\global\let\thisClosePageActionAt\@empty}% - {\gdef\thisClosePageActionAt{% - \@nameuse{addJST@PageCloseAt\arabic{page}}}}% - \aebPageAction{\thisOpenPageActionAt\addJST@PageOpen}% - {\thisClosePageActionAt\addJST@PageClose}% - \global\let\addJST@PageOpen\@empty - \global\let\addJST@PageClose\@empty + \@ifundefined{addJST@PageOpenAt\arabic{page}}% + {\global\let\thisOpenPageActionAt\@empty}% + {\gdef\thisOpenPageActionAt{% + \@nameuse{addJST@PageOpenAt\arabic{page}}}}% + \@ifundefined{addJST@PageCloseAt\arabic{page}}% + {\global\let\thisClosePageActionAt\@empty}% + {\gdef\thisClosePageActionAt{% + \@nameuse{addJST@PageCloseAt\arabic{page}}}}% + \ifx\addJST@PageOpen\@empty\def\x{}\else\def\x{^^J}\fi + \ifx\addJST@PageClose\@empty\def\y{}\else\def\y{^^J}\fi + \aebPageAction{\thisOpenPageActionAt\x\addJST@PageOpen}% + {\thisClosePageActionAt\y\addJST@PageClose}% + \global\let\addJST@PageOpen\@empty + \global\let\addJST@PageClose\@empty } % \end{macrocode} % (2016/05/15) Added \cs{aebp@PageTransHandler} to handle the page @@ -2158,48 +2182,42 @@ try { % transitions} % \begin{macrocode} \def\aebp@PageTransHandler{\@ifundefined{aebpP@geTr@nsP@ge\arabic{page}} - {}{\@nameuse{aebpP@geTr@nsP@ge\arabic{page}}}} + {}{\@nameuse{aebpP@geTr@nsP@ge\arabic{page}}}} % \end{macrocode} % The two handlers are executed on each page % \changes{v2.1}{2016/05/15}{Added the command \string\cs{aebp@PageTransHandler} % to the shipout cmd \string\cs{AddToShipoutPicture}.} % \begin{macrocode} -\AddToShipoutPicture{\aebp@PageOpenCloseHandler - \aebp@PageTransHandler} +\AddToShipoutPicture{\aebp@PageOpenCloseHandler\aebp@PageTransHandler} % \end{macrocode} % \end{macro} -% \DescribeMacro{\@@defineJS} is a variation of \cs{@defineJS}, as defined in the \textsf{insdljs} package. +% \DescribeEnv{@@defineJS} is a variation of \cs{@defineJS}, as defined in the \textsf{insdljs} package. % This version, at the end of the environment, calls the \cs{aebp@rse} command to parse the % complex command argument, then makes a series of definitions to be used in the open/close % page events. +% \changes{v2.10}{2021/02/07}{The \string\env{@@defineJS} uses macros +% defined in \string\pkg{insdljs}, dated 2021/02/07 or later.} % \begin{macrocode} \newenvironment{@@defineJS}[3][] {% - \gdef\argType{#2}\gdef\defineJSArg{#3}\JStoks={}% - \def\verbatim@processline - {% - \xdef\JS@temp{\the\JStoks\the\verbatim@line\defineJSjsR}% - \global\JStoks=\expandafter{\JS@temp}% - }% - \let\do\@makeother\dospecials\catcode`\^^M\active - #1% - \verbatim@start + \@initdfnJS + \gdef\argType{#2}\gdef\defineJSArg{#3}\JStoks={}\dlfortypesetfalse + \@vrbsetupdfnJS\b@vrbdfnJS{#1}% }{% - \expandafter\aebp@rse\expandafter{\defineJSArg}% - \edef\shakeandbake{% - \noexpand\@for\noexpand\@mytoks:=\the\aeb@parsetoks}% - \aeb@parsecnt=0 \shakeandbake \do {% - \ifnum\aeb@parsecnt=0 - \edef\firsttok{\@mytoks}% - \csarg\xdef{\argType\@mytoks}{\the\JStoks}% - \else - \edef\letsmakelet{\global\let\expandafter\noexpand - \csname\argType\@mytoks\endcsname=\expandafter\noexpand - \csname\argType\firsttok\endcsname}% - \letsmakelet - \fi - \advance\aeb@parsecnt1\relax - }% + \expandafter\aebp@rse\expandafter{\defineJSArg}% + \edef\sh@keandbake{\noexpand + \@for\noexpand\@mytoks:=\the\aeb@parsetoks}% + \aeb@parsecnt=\z@\sh@keandbake\do{% + \ifnum\aeb@parsecnt=\z@ + \edef\firsttok{\@mytoks}% + \csarg\xdef{\argType\@mytoks}{\the\JStoks}% + \else + \edef\letsmakelet{\global\let\expandafter\noexpand + \csname\argType\@mytoks\endcsname=\expandafter\noexpand + \csname\argType\firsttok\endcsname}\letsmakelet + \fi + \advance\aeb@parsecnt\@ne + }% } % \end{macrocode} % \begin{macrocode} @@ -2218,51 +2236,59 @@ try { % environments. See \cs{aeb@addToPageOpenCloseActions} for usage by this package. % \changes{v2.1}{2016/05/15}{Final changes to \string\cs{aebPageAction} to include non-Distiller % workflows.} +% \changes{v2.10}{2021/02/07}{Hack: redefine \string\cs{@acrivechar@in} from \string\cs{LaTeX} +% core; this was disrupting the page events.} % \begin{macrocode} \newcommand\aebPageAction[3][ThisPage]{% - \let\ispageactions=0\aeb@PageOpenfalse\aeb@PageClosefalse - \def\@aebOpen{#2}% - \if1\@aebOpen1% - \if@everyPageOpen - \aeb@PageOpentrue\let\ispageactions=1% - \def\@aebOpen{/O << \JS{\every@PageOpen#2} >>}% - \fi - \else - \let\ispageactions=1% - \aeb@PageOpentrue - \def\@aebOpen{/O << \JS{\every@PageOpen#2} >>}% - \fi - \def\@aebClose{#3}% - \if1\@aebClose1% - \if@everyPageClose - \aeb@PageClosetrue\let\ispageactions=1% - \def\@aebClose{/C << \JS{\every@PageClose#3} >>}% - \fi - \else - \let\ispageactions=1% - \aeb@PageClosetrue - \def\@aebClose{/C << \JS{\every@PageClose#3} >>}% - \fi - \if@everyPageOpen\aeb@PageOpentrue\let\ispageactions=1\fi - \if@everyPageClose\@everyPageClosetrue\let\ispageactions=1\fi - \if\ispageactions1% - \xdef\aebp@PageActionCode{/AA << - \ifaeb@PageOpen\@aebOpen\space\fi - \ifaeb@PageClose\@aebClose\space\fi >>} +% \end{macrocode} +% (2021/02/07) The core {\LaTeX} \cs{@activechar@info} macro was breaking the page open and +% close events by inserting an unwanted message into the code. We +% redefine this macro to remove the message and insert \cs{pdfSP}, which either +% a normal space or \cs{pdfSPDef} depending on whether \cs{pdfSpacesOff} or +% \cs{pdfSpacesOn}, respectively, is operational. This change is local (I hope). +% \begin{macrocode} + \def\@activechar@info{\pdfSP\@gobbletwo}\let\ispageactions\aebp@Zero + \aeb@PageOpenfalse\aeb@PageClosefalse + \def\@aebOpen{#2}% + \if1\@aebOpen1% + \if@everyPageOpen + \aeb@PageOpentrue\let\ispageactions\aebp@One + \def\@aebOpen{/O << \JS{\every@PageOpen#2} >>}\fi + \else + \let\ispageactions\aebp@One + \aeb@PageOpentrue + \def\@aebOpen{/O << \JS{\every@PageOpen^^J#2} >>}% + \fi + \def\@aebClose{#3}% + \if1\@aebClose1% + \if@everyPageClose + \aeb@PageClosetrue\let\ispageactions\aebp@One + \def\@aebClose{/C << \JS{\every@PageClose#3} >>}\fi + \else + \let\ispageactions\aebp@One + \aeb@PageClosetrue + \def\@aebClose{/C << \JS{\every@PageClose^^J#3} >>}% + \fi + \if@everyPageOpen\aeb@PageOpentrue\let\ispageactions\aebp@One\fi + \if@everyPageClose\@everyPageClosetrue\let\ispageactions\aebp@One\fi + \if\ispageactions\aebp@One + \xdef\aebp@PageActionCode{/AA << + \ifaeb@PageOpen\@aebOpen\space\fi + \ifaeb@PageClose\@aebClose\space\fi >>}% % \end{macrocode} % For page 1, the open page is handled by \textsf{insdljs} % \changes{v2.0a}{2016/05/11}{Let \string\textsf{insdljs} handle page open % for page 1.} % \begin{macrocode} - \ifnum\value{page}=1\relax\else - \ifpdfmarkup\literalps@out{\AEB@psMrk{#1} << - \aebp@PageActionCode\space >> /PUT pdfmark}\else - \ifpdf\global\pdfpageattr=\expandafter - {\aebp@PageActionCode}\else - \ifxetex\@pdfm@mark{put @thispage << - \aebp@PageActionCode\space>>}\fi\fi\fi - \fi + \ifnum\value{page}=\@ne\else + \ifpdfmarkup\literalps@out{\AEB@psMrk{#1} << + \aebp@PageActionCode\space >> /PUT pdfmark}\else + \ifpdf\global\pdfpageattr=\expandafter + {\aebp@PageActionCode}\else + \ifxetex\@pdfm@mark{put @thispage << + \aebp@PageActionCode\space>>}\fi\fi\fi \fi + \fi } % \end{macrocode} % \end{macro} @@ -2290,8 +2316,8 @@ try { \def\ap@gobtonil#1\@nil{} \def\ap@gettonil#1\@nil{\def\to@nilarg{#1}} \def\ap@ifspc{\ifx\@let@token\@sptoken - \let\ap@next\ap@xifspc\else - \let\ap@next\ap@gettonil\fi\ap@next} + \let\ap@next\ap@xifspc\else + \let\ap@next\ap@gettonil\fi\ap@next} \begingroup \def\:{\ap@xifspc} \expandafter\gdef\: {\futurelet\@let@token\ap@ifspc} @@ -3216,13 +3242,13 @@ nLaunch: \ahref@launch@type})}}]{\ahypercolor{#3}}% % \changes{v2.9}{2017/08/25}{Test for \string\env{attachmentNames} environment} % \begin{macrocode} \let\aeb@isFromAutoLabelNum\aebp@Zero -\def\attachmentNamesEnv{attachmentNames} % dps23 +\def\attachmentNamesEnv{attachmentNames} % \end{macrocode} % If \cs{labelName} is outside the \env{attachmentNames} environment, use % \cs{defUniStr}, defined in \pkg{forms16be}. % \changes{v2.9}{2017/08/25}{Pass control to \string\pkg{forms16be}} % \begin{macrocode} -\def\labelName{\ifx\attachNamesEnv\attachmentNamesEnv % dps23 +\def\labelName{\ifx\attachNamesEnv\attachmentNamesEnv \def\ap@next{\labelName@Env}\else\def\ap@next{\defUniStr}\fi\ap@next} \def\labelName@Env#1{\bgroup\let\aeb@isFromAutoLabelNum\aebp@Zero %dps23 \@for\x:=ABCDEFabcdef\do{\@makeother\x}% @@ -3483,6 +3509,16 @@ nLaunch: \ahref@launch@type})}}]{\ahypercolor{#3}}% \DeclareJSHelper{\docSaveAs}{aebDocSaveAs} % \end{macrocode} % \end{macro} +% \begin{macro}{\browseForDoc} +% Access to using the method \texttt{app.browseForDoc()}, for example, +%\begin{verbatim} +%var oRetn=\browseForDoc({bSave:true,cFilenameInit: "myNewDoc.pdf"}); +%\end{verbatim} +% See the Acrobat JavaScript API reference for details on what is returned. +% \begin{macrocode} +\DeclareJSHelper{\browseForDoc}{aebBrowseForDoc} +% \end{macrocode} +% \end{macro} % \begin{macro}{\insertPages} % This is the method \texttt{Doc.insertPages}. % \begin{macrocode} @@ -3581,31 +3617,32 @@ nLaunch: \ahref@launch@type})}}]{\ahypercolor{#3}}% % gets the security handler object, logs into the handler, calls % \texttt{signatureSetSeedValue} if the \texttt{sv} property is in the % \texttt{oSigInfo} object, and signs the field. +% \changes{v2.9.6}{2029/12/24}{Use \string\cs{dfnJSCR} of \string\pkg{insdljs}} % \begin{macrocode} -\begin{defineJS}[\def\defineJSjsR{^^J}]{\signatureSign} +\begin{defineJS}[\makecmt\%\dfnJSCR{^^J}]{\signatureSign} if ( typeof oSigInfo.oHandler=="undefined" ) - oSigInfo.oHandler=security.PPKLiteHandler; -var engine=aebTrustedFunctions( security, - aebSecurityGetHandler, oSigInfo.oHandler ); -var path2Cert = (typeof oSigInfo.path2Cert == "undefined") ? - aebTrustedFunctions( this, aebAppGetPath, - {cCategory:"user"} )+"/Security"+"/"+oSigInfo.cert : - oSigInfo.path2Cert; -aebTrustedFunctions( engine, aebSecurityHandlerLogin, - { cPassword: oSigInfo.password, cDIPath: path2Cert}); + oSigInfo.oHandler=security.PPKLiteHandler; +var engine=aebTrustedFunctions( security,% +aebSecurityGetHandler, oSigInfo.oHandler ); +var path2Cert = (typeof oSigInfo.path2Cert == "undefined") ? % +aebTrustedFunctions( this, aebAppGetPath,% +{cCategory:"user"} )+"/Security"+"/"+oSigInfo.cert : % +oSigInfo.path2Cert; +aebTrustedFunctions( engine, aebSecurityHandlerLogin,% +{ cPassword: oSigInfo.password, cDIPath: path2Cert}); var oSigField = this.getField(oSigInfo.cSigFieldName); oSigInfo.oInfo.password=oSigInfo.password; if ( typeof oSigInfo.sv!="undefined" ) { - for (var o in oSigInfo.sv ) - oSigInfo.oInfo[o]=oSigInfo.sv[o]; + for (var o in oSigInfo.sv ) + oSigInfo.oInfo[o]=oSigInfo.sv[o]; } var oSigArgs={ oSig: engine, oInfo: oSigInfo.oInfo }; if ( typeof oSigInfo.cLegalAttest!="undefined" ) - oSigArgs.cLegalAttest=oSigInfo.cLegalAttest; + oSigArgs.cLegalAttest=oSigInfo.cLegalAttest; if ( typeof oSigInfo.cDIPath!="undefined") - oSigArgs.cDIPath=oSigInfo.cDIPath; + oSigArgs.cDIPath=oSigInfo.cDIPath; if ( typeof oSigInfo.bUI!="undefined") - oSigArgs.bUI=oSigInfo.bUI; + oSigArgs.bUI=oSigInfo.bUI; aebTrustedFunctions( oSigField, aebSignatureSign, oSigArgs ); \end{defineJS} % \end{macrocode} @@ -3628,23 +3665,23 @@ aebTrustedFunctions( oSigField, aebSignatureSign, oSigArgs ); %\end{docassembly} %\end{verbatim} % \begin{macrocode} -\begin{defineJS}[\def\defineJSjsR{^^J}]{\certifyInvisibleSign} +\begin{defineJS}[\makecmt\%\dfnJSCR{^^J}]{\certifyInvisibleSign} if ( typeof oSigInfo.oHandler=="undefined" ) - oSigInfo.oHandler=security.PPKLiteHandler; -var engine=aebTrustedFunctions( security, - aebSecurityGetHandler, oSigInfo.oHandler ); -var path2Cert=aebTrustedFunctions( this, aebAppGetPath, - {cCategory:"user"} )+"/Security"+"/"+oSigInfo.cert; -aebTrustedFunctions( engine, aebSecurityHandlerLogin, - { cPassword: oSigInfo.password, cDIPath: path2Cert}); + oSigInfo.oHandler=security.PPKLiteHandler; +var engine=aebTrustedFunctions( security, % +aebSecurityGetHandler, oSigInfo.oHandler ); +var path2Cert=aebTrustedFunctions( this, aebAppGetPath, % +{cCategory:"user"} )+"/Security"+"/"+oSigInfo.cert; +aebTrustedFunctions( engine, aebSecurityHandlerLogin, % +{ cPassword: oSigInfo.password, cDIPath: path2Cert}); oSigInfo.oInfo.password=oSigInfo.password; var oSigArgs={ oSig: engine, oInfo: oSigInfo.oInfo }; if ( typeof oSigInfo.cLegalAttest!="undefined" ) - oSigArgs.cLegalAttest=oSigInfo.cLegalAttest; + oSigArgs.cLegalAttest=oSigInfo.cLegalAttest; if ( typeof oSigInfo.cDIPath!="undefined") - oSigArgs.cDIPath=oSigInfo.cDIPath; + oSigArgs.cDIPath=oSigInfo.cDIPath; if ( typeof oSigInfo.bUI!="undefined") - oSigArgs.bUI=oSigInfo.bUI; + oSigArgs.bUI=oSigInfo.bUI; aebTrustedFunctions( this, aebCertifyInvisibleSign, oSigArgs ); \end{defineJS} % \end{macrocode} @@ -4057,7 +4094,7 @@ aebTrustedFunctions( this, aebCertifyInvisibleSign, oSigArgs ); % \end{macrocode} % Calculate the value of \cs{@btnanimerowsep}, the distance between rows % \begin{macrocode} - \edef\@btnanimerowsep{\btnanimerowsep}% dps10 + \edef\@btnanimerowsep{\btnanimerowsep}% % \setlength{\@tempdima}{\btnanimerowsep+2bp}% % \edef\@btnanimerowsep{\the\@tempdima}% % \end{macrocode} @@ -4153,7 +4190,7 @@ aebTrustedFunctions( this, aebCertifyInvisibleSign, oSigArgs ); % \end{macrocode} % A command to set the space between control buttons, uses \cs{btnanimebtnsep} % \begin{macrocode} -\newcommand{\@ctrlsbtnsep}{\cgBdry[\btnanimebtnsep]} % dps10 +\newcommand{\@ctrlsbtnsep}{\cgBdry[\btnanimebtnsep]} % \end{macrocode} % \begin{macro}{\btnanimebtnsep} % The space between buttons @@ -4752,6 +4789,7 @@ function btnAnimeNewFrame(fieldName, type) % Begin package segment %<*package> \ap@restoreCats +\aeb@InputAeBPro % % \end{macrocode} % \Finale diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/aeb_pro.ins b/macros/latex/contrib/aeb_pro/aeb_pro/aeb_pro.ins index ae721ae42b..946b62be1a 100644 --- a/macros/latex/contrib/aeb_pro/aeb_pro/aeb_pro.ins +++ b/macros/latex/contrib/aeb_pro/aeb_pro/aeb_pro.ins @@ -3,7 +3,7 @@ %% driver files from the doc files in this package when run through %% LaTeX or TeX. %% -%% Copyright 1999-2018 D. P. Story +%% Copyright 1999-2021 D. P. Story %% %% This file is part of the AcroTeX eDucation Bundle (AeB). %% ------------------------------------------- @@ -45,6 +45,7 @@ \generate{% \file{aeb_pro.sty}{\from{aeb_pro.dtx}{copyright,package}} + \file{aeb-pro.sty}{\from{aeb_pro.dtx}{copyright,altpkgname}} \file{aeblayers.def}{\from{aeb_pro.dtx}{copyright,aeblayers}} \file{aebpro.def}{\from{aeb_pro.dtx}{copyright,aebpro}} \file{anime_support.def}{\from{aeb_pro.dtx}{copyright,animecommon}} diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/doc/acrobat-in-workflow.pdf b/macros/latex/contrib/aeb_pro/aeb_pro/doc/acrobat-in-workflow.pdf new file mode 100644 index 0000000000..9821c49870 Binary files /dev/null and b/macros/latex/contrib/aeb_pro/aeb_pro/doc/acrobat-in-workflow.pdf differ diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/doc/acrobat-in-workflow.tex b/macros/latex/contrib/aeb_pro/aeb_pro/doc/acrobat-in-workflow.tex new file mode 100644 index 0000000000..bd12bdd607 --- /dev/null +++ b/macros/latex/contrib/aeb_pro/aeb_pro/doc/acrobat-in-workflow.tex @@ -0,0 +1,232 @@ +\RequirePackage[!use=preview,!use=efpmca,!use=usebw,!use=finalbuild]{spdef} +\documentclass{article} +\usepackage[fleqn]{amsmath} +\usepackage[web,useacrobat]{aeb_pro} +\usepackage{eforms} +\usepackage{graphicx} +\usepackage{fancyvrb} + +\ifpdf\else +\def\x{% + \usepackage[altbullet]{lucidbry} + \usepackage[active]{srcltx} +}\expandafter\x +\fi + +\usepackage{pifont} + +%\usepackage{fancyvrb} + +\reversemarginpar + +\let\uif\textsf +\let\env\texttt +\def\cs#1{\texttt{\eqbs#1}} +\let\tops\texorpdfstring + +\makeatletter +\renewcommand{\paragraph} + {\@startsection{paragraph}{4}{0pt}{6pt}{-3pt} + {\normalfont\normalsize\bfseries}} +\renewcommand{\subparagraph} + {\@startsection{subparagraph}{5}{\parindent}{6pt}{-3pt}% + {\normalfont\normalsize\bfseries}} +\def\parboxValign{t} +\newcommand{\FmtMP}[2][0pt]{\mbox{}\marginpar{% + \raisebox{.5\baselineskip+#1}{% + \expandafter\parbox\expandafter[\parboxValign]% + {\marginparwidth}{\aebbkFmtMp#2}}}} +\def\aebbkFmtMp{\kern0pt\itshape\small + \ifusebw\color{gray}\else\color{blue}\fi + \raggedleft\hspace{0pt}} +\newcommand{\BlogArticle}{% + \makebox[0pt][l]{\hspace{-1pt}\color{blue}\Pisymbol{webd}{254}% + }\raisebox{.5pt}{\ifusebw\color{black}\else + \color{red}\fi\ding{045}}} +\def\dps{$\mbox{$\mathfrak D$\kern-.3em\mbox{$\mathfrak P$}% + \kern-.6em \hbox{$\mathcal S$}}$} + +\makeatother + +\setlength{\mathindent}{\the\parindent} + +\def\AEBP{\app{AeB Pro}} +\def\AEB{\app{AeB}} +\let\app\textsf +\let\pkg\textsf +\def\amtIndent{\parindent} +\def\meta#1{$\langle\textit{\texttt{#1}}\rangle$} +\def\SC#1{{\small#1}} +\def\PDF{\SC{PDF}} +\let\opt\texttt + +%\reversemarginpar +\def\jsSupInstr{\tops{{\AEB} and {\AEBP}\\[1ex]}{AeB and AeB Pro: }Including + \tops{\app}{}{Acrobat} in the \tops{\LaTeX}{LaTeX} workflow} +\title{\jsSupInstr} +\author{D. P. Story} +\version{1.0} + +\chngDocObjectTo{\newDO}{doc} +\begin{docassembly} +var titleOfManual="Acrobat workflow"; +var manualfilename="Manual_BG_Print_acrobat.pdf"; +var manualtemplate="Manual_BG_Brown.pdf"; // Blue, Green, Brown +var _pathToBlank="C:/Users/Public/Documents/ManualBGs/"+manualtemplate; +var doc; +var buildIt=false; +if ( buildIt ) { + console.println("Creating new " + manualfilename + " file."); + doc = \appopenDoc({cPath: _pathToBlank, bHidden: true}); + var _path=this.path; + var pos=_path.lastIndexOf("/"); + _path=_path.substring(0,pos)+"/"+manualfilename; + \docSaveAs\newDO ({ cPath: _path }); + doc.closeDoc(); + doc = \appopenDoc({cPath: manualfilename, oDoc:this, bHidden: true}); + f=doc.getField("ManualTitle"); + f.value=titleOfManual; + doc.flattenPages(); + \docSaveAs\newDO({ cPath: manualfilename }); + doc.closeDoc(); +} else { + console.println("Using the current "+manualfilename+" file."); +} +var _path=this.path; +var pos=_path.lastIndexOf("/"); +_path=_path.substring(0,pos)+"/"+manualfilename; +\addWatermarkFromFile({ + bOnTop:false, + bOnPrint:false, + cDIPath:_path +}); +\executeSave(); +\end{docassembly} + +\begin{document} + +\maketitle + +\section{Introduction} + +\app{Adobe Acrobat} (\app{AA}) is a desktop application that has many +powerful features beyond the functionality of a PDF viewer. In this article +the focus is a {\LaTeX} workflow that includes \app{AA} in its workflow. + +{\AEB} and {\AEBP}, as well as other packages written under the {\AEB} +banner, use FDF files in various situations (as described in +Section~4).\footnote{An FDF file is a file type that was created by +\app{Adobe}. The \app{Acrobat} and \app{Adobe Reader} applications can use +FDF files in various ways.} These packages use \app{Acrobat} to import the +FDF files to perform designated JavaScript actions as required by the package +or document author. The importing of FDF files is only needed during the PDF +creation stage of document development; once the PDF file is created, the +document can be viewed by \app{Adobe Reader} or any other PDF viewer. + +For FDF files to be imported, the \app{Acrobat} application may need to be +configured. + +\section{Configuration of \tops{\app}{}{Acrobat}}\label{s:config} + +The current version of \app{AA} is \app{Adobe Acrobat DC}. In this and +previous versions of \app{AA} no special configuration is needed; however if +you purchased \app{AA} after December 2020, or you updated your \app{AA} +after December 2020, you need to make one change in the \uif{Preferences}. + +\begin{figure}[htb]\fboxsep0pt\relax\centering + \fbox{\includegraphics[width=.5\linewidth]{figures/SecurityPrefs}} + \caption{\tops{\protect\uif}{}{Security (Enhanced) Preferences}}\label{fig:SP} +\end{figure} + +Start \app{Acrobat} and open the menu \uif{Edit \ifpdf\texttt{>} \else> \fi +Preferences} (\uif{Ctrl+K}). In the \uif{Preferences} dialog box, select +\uif{Security (Enhanced)} category from the left panel; the top most line of +the right panel is a checkbox labeled \uif{Enable Protected Mode at startup}. +\emph{Clear this checkbox.}{\def\parboxValign{c}\FmtMP{\app{Acrobat DC} +users, action required!}}\footnote{When the box is checked, importing FDF +files, as described in the next two sections, is \emph{prohibited}. We want +FDF files imported, so we clear the checkbox.} Refer to +\hyperref[fig:SP]{Figure~\ref*{fig:SP}} for a visual. If this checkbox is not +present in your \app{Acrobat}, there is nothing to do until this checkbox +appears in a future updated version of your \uif{AA} application. + +\section{When FDF files are imported} + +It is important to be aware of when and how FDF files are imported, and to +understand the actions required of the document author in response to this +``import FDF event.'' + +For a document that uses FDF files to perform tasks, the files are imported +\emph{after} PDF creation when the newly created PDF document is \emph{first +opened} in \app{Acrobat}, and \emph{before the PDF file is moved to another +location and before any auxiliary files (the FDF files) are deleted}. Once +the FDF files are imported, it is important \emph{to save}\FmtMP{Save the +PDF} the PDF file, this incorporates the results of the actions taken by the +imported FDF files into the document, actions, such as the embedding of +document JavaScript. + +Another important point to realize is that the use of FDF files is not +restricted to the +\app{dvips\ifpdf\texttt{->}\,\else->\,\fi\app{Distiller}\,\ifpdf\texttt{->}\,\ignorespaces +\else->\,\fi\app{Acrobat}} method of creating a PDF; indeed, any PDF creator +used by the {\LaTeX} community may be used, for example, +\app{pdftex\ifpdf\texttt{->}\allowbreak\,\else->\,\fi\app{Acrobat}}. The +only prerequisite is to use {\LaTeX} markup that initiates the ``import FDF +event.'' This markup is available through packages that support it; this +includes, but not restricted to, {\AEB} and {\AEBP}. + +\section{Applications of FDF files to a \tops{\LaTeX}{LaTeX} workflow} + +With regard to producing a PDF file through a {\LaTeX} workflow, there are +two important applications to importing FDF files: importing document +JavaScript and post-PDF creation actions. These two applications to FDF files +are covered in the next two subsections. + +\subsection{Document JavaScript} + +In this case, FDF files are required only for the \app{dvips\,\ignorespaces +\ifpdf\texttt{->}\,\else->\,\fi\app{Distiller}\,\ifpdf\texttt{->}\,\else->\,\ignorespaces +\fi\app{Acrobat}} workflow; the other PDF creators (\app{pdflatex}, +\app{lualatex}, and \app{xelatex}) have primitives that facilitate the +creation of document JavaScript without FDF files or \app{Acrobat}. + +For the \pkg{exerquiz} package, part of the {Acro\!\TeX} eDucation Bundle +(\AEB), creation of Document JavaScript is automatic and invisible for all +PDF creators; it is only in the +\texttt{tex\,->\,dvi\,->\,\app{dvips}\,->\,\ignorespaces +\app{Distiller}\,->\,\app{Acrobat}} workflow that FDF files are used. + +Document JavaScript, by the way, is code that is embedded in the PDF and is +available to be called throughout the document. Usually, Document JavaScript +is general code that is repeatedly used. + + +\subsection{Post PDF Creation actions} + +The {\AEBP} Bundle has many ``post PDF creation'' actions, such as auto +saving the document, importing sounds, attaching documents, inserting pages, +extracting pages, and many more. With proper {\LaTeX} markup, when the +document is compiled, FDF files are written to the hard drive, when the +document is then first opened in \app{Acrobat}, the FDF files are imported +and the actions are executed. Again, for the FDF files to be imported, they +must not have already been deleted, and \app{Acrobat} must be correctly +configured (\hyperref[s:config]{Section~\ref*{s:config}}). One very simple +example, is automatic saving of the document when \app{Acrobat} is first +opened. For example, an \pkg{aeb\_pro} document has a \env{docassembly} +environment that is placed in the preamble. Within this environment, place +any post PDF creation JavaScript actions: +\begin{Verbatim}[xleftmargin=\parindent] +\begin{docassembly} +console.show(); +console.println("Saving document"); +\executeSave(); +\end{docassembly} +\end{Verbatim} +The \verb~\executeSave~ command is defined by \pkg{aeb\_pro} and its action +is to save the document. It is the \env{docassembly} environment that writes +the FDF file that contains its contents. \app{Acrobat} inputs this command on +opening and the PDF is saved.\footnote{\cs{executeSave} must be the last post PDF +creation action; otherwise, as later actions may not be executed.} + + +\end{document} diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/doc/aebpro_man.pdf b/macros/latex/contrib/aeb_pro/aeb_pro/doc/aebpro_man.pdf index a3d56bd3e4..1072bd80d3 100644 Binary files a/macros/latex/contrib/aeb_pro/aeb_pro/doc/aebpro_man.pdf and b/macros/latex/contrib/aeb_pro/aeb_pro/doc/aebpro_man.pdf differ diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/doc/aebpro_man.tex b/macros/latex/contrib/aeb_pro/aeb_pro/doc/aebpro_man.tex index 6c1dbd7766..937318cefe 100644 --- a/macros/latex/contrib/aeb_pro/aeb_pro/doc/aebpro_man.tex +++ b/macros/latex/contrib/aeb_pro/aeb_pro/doc/aebpro_man.tex @@ -36,7 +36,7 @@ email={dpstory@acrotex.net}, subject={Documentation for {\AEBP} from AcroTeX}, talksite={\url{www.acrotex.net}}, - version={2.9.5, 2019/03/21}, + version={2.10, 2021/02/07}, Keywords={XMP, E4X, Adobe Acrobat, JavaScript}, copyrightStatus=True, copyrightNotice={Copyright (C) \the\year, D. P. Story}, @@ -85,6 +85,7 @@ \newcommand\refctan[1]{\href{http://ctan.org/pkg/#1}{ctan.org/pkg/#1}} \newlength{\aebdimen} \def\anglemeta#1{$\langle\textit{\texttt{#1}}\rangle$} +\let\ameta\anglemeta \def\meta#1{\textit{\texttt{#1}}} \let\pkg\textsf \let\env\texttt @@ -101,7 +102,9 @@ \def\AcroTeX{Acro\!\TeX} \def\HTML{HTML}\def\FDF{FDF} \def\PDF{PDF}\def\URL{URL} -\edef\amtIndent{\the\parindent} %\leftmargini +%\let\amtIndent\leftmargini +\edef\amtIndent{\the\parindent} +\def\PDFM{\textsf{\textbf{pdfmark}}} \def\bNH{\begin{NoHyper}}\def\eNH{\end{NoHyper}} \def\nhnameref#1{\bNH\nameref{#1}\eNH} \def\nhNameref#1{\bNH\Nameref{#1}\eNH} @@ -111,8 +114,7 @@ \def\parboxValign{t} \renewcommand*{\backrefalt}[4]{% \ifcase #1\or - See page~#2.\else See pages~#2.\fi -} + See page~#2.\else See pages~#2.\fi} \newenvironment{aebQuote} {\list{}{\leftmargin\amtIndent}% \item\relax}{\endlist} @@ -121,19 +123,20 @@ \expandafter\parbox\expandafter[\parboxValign]% {\marginparwidth}{\aebbkFmtMp#2}}}} \def\aebbkFmtMp{\hfill\kern0pt\itshape\small - \color{blue}\raggedright\hspace{0pt}} + \color{blue}\raggedleft\hspace{0pt}} \newcommand{\BlogArticle}{\makebox[0pt][l]{\hspace{-1pt}\color{blue}\Pisymbol{webd}{254}% }\raisebox{.5pt}{\color{red}\ding{045}}} \def\dps{$\mbox{$\mathfrak D$\kern-.3em\mbox{$\mathfrak P$}% \kern-.6em \hbox{$\mathcal S$}}$} \def\FitItIn{\eq@fititin} -\def\endredpoint{\FitItIn{{\large\ifusebw\color{black}\else\color{red}\fi$\blacktriangleleft$}}} +\def\endredpoint{\FitItIn{{\large + \ifusebw\color{black}\else + \color{red}\fi$\blacktriangleleft$}}} \reversemarginpar \def\addWatermarkFromFile#1#2{% -aebTrustedFunctions#1\theDocObject, aebAddWatermarkFromFile, #2} - +aebTrustedFunctions#1\theDocObject,aebAddWatermarkFromFile,#2} %\definePath\bgPath{"C:/Users/Public/Documents/% % ManualBGs/Manual_BG_Print_AeB.pdf"} @@ -204,7 +207,7 @@ on this documentation. \verb!:-{)! \begin{flushright} Dr. D. P. Story\\[3pt] -\today +January 20, 2016 \end{flushright} @@ -212,23 +215,23 @@ Dr. D. P. Story\\[3pt] \AEBP, package file base name \texttt{aeb\_pro} (\href{http://ctan.org/pkg/aeb-pro}{ctan.org/pkg/aeb-pro}), is an assortment -of features (see Section~\ref*{features} below) implemented through a -combination of \textbf{pdfmark} operators~\cite{tech:pdfmark}, which are -native to a PostScript file, and JavaScript techniques, some of which require -\textsf{Acrobat Professional}. These features were meant to be used with -{\AEB} (\AcroEB); in particular, the \texttt{insdljs} and \texttt{eforms} -packages are essential to {\AEBP}. To have access to all the features of -{\AEBP}, the document author must have \textsf{Acrobat Pro}~7.0 or later and -use \textsf{dvips/\penalty0 Distiller} workflow to create the {\PDF}. For the -most part, once the document is assembled, it can be viewed by \app{Adobe -Reader}~7.0 or later. +of features (see \hyperref[features]{Section~\ref*{features}} below) +implemented through a combination of {\PDFM} operators~\cite{tech:pdfmark}, +which are native to a Postscript file, and JavaScript techniques, some of +which require \textsf{Acrobat Professional}. These features were meant to be +used with {\AEB} (\AcroEB); in particular, the \texttt{insdljs} and +\texttt{eforms} packages are essential to {\AEBP}. To have access to all the +features of {\AEBP}, the document author must have \textsf{Acrobat Pro}~7.0 +or later and use \textsf{dvips/\penalty0Distiller} workflow to create the +{\PDF}. For the most part, once the document is assembled, it can be viewed +by \app{Adobe Reader}~7.0 or later. Despite the declaration in the \textbf{Forward} to the -contrary\marginpar{\small\raggedleft v2.1 notes}, this manual will be updated +contrary, this manual will be updated for Version~2.1 of {\AEBP} to reflect the creation of a significant new feature, the \opt{useacrobat} option. For a document author who prefers \app{pdflatex} (including \app{lualatex}) or -\app{xelatex}\marginpar{\small\raggedleft non-\app{Distiller} workflow}, this +\app{xelatex}\FmtMP{non-\app{Distiller} workflow}, this option opens the features of {\AEBP} provided the document author has the full \app{Acrobat} application and has set it up as the primary {\PDF} viewer on his/\penalty0 her computer system. Continue reading about the @@ -480,7 +483,7 @@ The next three packages are less important, some are ``novelty'' packages. number of rows and columns. \end{description} These, as well as the {\AEBP} distribution itself, are available through CTAN -or the {\AEBP} family website: +or the {\AEBP} family web site: \begin{equation*} \text{\url{www.math.uakron.edu/~dpstory/aeb_pro.html}} \end{equation*} @@ -488,6 +491,12 @@ or the {\AEBP} family website: \subsection{Package Options} +The general syntax for \pkg{aeb\_pro} is, +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] +\usepackage[!ameta(options)]{aeb_pro} +!strut!textsf(or) +\usepackage[!ameta(options)]{aeb-pro} +\end{Verbatim} Below is a list of all options of the {\cAEBP} package: \begin{description} \item [\texttt{driver=\anglemeta{driver}}\enspace] The permissible values @@ -501,7 +510,7 @@ Below is a list of all options of the {\cAEBP} package: own the \app{Acrobat} application, use the \opt{useacrobat} option to open all features of this package except for any features associated with the \app{uselayers} option. The creation of layers is still only - supported through the \textbf{pdfmark} operator. + supported through the {\PDFM} operator. As you go through the examples provided by this package, all sample files work except for the ones using the \opt{uselayers} or @@ -699,6 +708,14 @@ installation of the JavaScript files by navigating to the \texttt{examples} subfolder and opening the file \texttt{test\_install.pdf} in \app{Acrobat}; follow the directions contained on that one page document. +\paragraph*{\app{Adobe Acrobat DC} authors.} If you have \app{Acrobat DC} that was purchased or updated after December 2020, +\app{Acrobat} needs to be configured\FmtMP{Configure \app{Acrobat DC}} to +function correctly. For detailed discussion, refer to the document +\texttt{\href{acrobat-in-workflow.pdf}{acrobat-in-workflow.pdf}} found in the +\texttt{doc} folder of this distribution. + + + \begin{comment} The JavaScript methods used by the \texttt{docassemble} environment, see @@ -815,33 +832,33 @@ for links to this resource. option}\label{useacrobatOpt} For document authors who have the full \app{Acrobat} application but prefer a -non-\app{Distiller} workflow, use the \opt{useacrobat} option to declare to {\AEBP} -that you have \app{Acrobat}. Traditionally, if neither \app{pdflatex} +non-\app{Distiller} workflow, use the \opt{useacrobat} option to declare to +{\AEBP} that you have \app{Acrobat}. Traditionally, if neither \app{pdflatex} (including \app{lualatex}) nor \app{xelatex} are used, a \app{dvips/\penalty0 Distiller} workflow is assumed. Declaring the \opt{useacrobat} option opens up all features except for those that depend on the use of layers (also called {\EXT{OCG}s); in particular, the options \opt{uselayers} and \opt{ocganime} are disallowed}. All features, therefore, described in this -manual are available to \app{pdflatex} and \app{xelatex} document authors who -have \app{Acrobat}, \emph{except for those features} described in -Section~\ref{layers} and Section~\ref{ss:ocganime}. +manual are available to \app{pdflatex}, \app{lualatex}, and \app{xelatex} +document authors who have \app{Acrobat}, \emph{except for those features} +described in \hyperref[layers]{Section~\ref*{layers}} and \hyperref[ss:ocganime]{Section~\ref*{ss:ocganime}}. \paragraph*{Syntax.} The syntax for this option is simple: \begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] \usepackage[!textbf(useacrobat), - !meta(options) +!quad!ameta(options) ]{aeb_pro} \end{Verbatim} -where \meta{options} \emph{does not include} the +where \ameta{options} \emph{does not include} the \opt{uselayers} and \opt{ocganime} options. \newtopic -Regarding \app{{\AEB} Control Central} (Section~\ref*{AeBCC}), when you +Regarding \app{{\AEB} Control Central} (\hyperref[AeBCC]{Section~\ref*{AeBCC}}), when you specify \opt{useacrobat},\footnote{This implies you are not using \opt{Distiller} as the {\PDF} creator.} the packages \pkg{graphicxsp} and \pkg{rmannot} of -display~\eqref{display:ACCopts} are not allowed to be specified in the option -list of \pkg{aeb\_pro}. These two packages use the \textbf{pdfmark} operator -to implement their features; a \app{dvips/\penalty0 Distiller} workflow is +\hyperref[display:ACCopts]{display~\bNH\eqref{display:ACCopts}\eNH} are not allowed to be specified in the option +list of \pkg{aeb\_pro}. These two packages use the {\PDFM} operator +to implement their features; a \app{dvips/\penalty0Distiller} workflow is required in this case. \section{The \texorpdfstring{\protect\opt{nopro}}{nopro} option}\label{s:noproOpt} @@ -855,7 +872,7 @@ option. in the option list: \begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] \usepackage[!textbf(nopro), - !meta(options) +!quad!ameta(options) ]{aeb_pro} \end{Verbatim} Specifying this option excludes the use of layers (the options @@ -1085,7 +1102,7 @@ includes examples of the use of the \texttt{willClose}, \settowidth{\aebdimen}{\ttfamily\string\begin\darg{willClose}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{willClose} - !anglemeta(script) +!quad!anglemeta(script) \end{willClose} \end{dCmd} \EnvDescription The JS code in the body of the \texttt{willClose} @@ -1096,7 +1113,7 @@ environment will execute just before the document closes. \settowidth{\aebdimen}{\ttfamily\string\begin\darg{willSave}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{willSave} - !anglemeta(script) +!quad!anglemeta(script) \end{willSave} \end{dCmd} \EnvDescription The JS code in the body of the \texttt{willSave} @@ -1107,7 +1124,7 @@ environment will execute just before the document is saved. \settowidth{\aebdimen}{\ttfamily\string\begin\darg{didSave}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{didSave} - !anglemeta(script) +!quad!anglemeta(script) \end{didSave} \end{dCmd} \EnvDescription The JS code in the body of the \texttt{didSave} @@ -1118,7 +1135,7 @@ environment will execute just after the document is saved. \settowidth{\aebdimen}{\ttfamily\string\begin\darg{willPrint}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{willPrint} - !anglemeta(script) +!quad!anglemeta(script) \end{willPrint} \end{dCmd} \EnvDescription The JS code in the body of the \texttt{willPrint} @@ -1129,7 +1146,7 @@ environment will execute just before the document is Printed. \settowidth{\aebdimen}{\ttfamily\string\begin\darg{didPrint}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{didPrint} - !anglemeta(script) +!quad!anglemeta(script) \end{didPrint} \end{dCmd} \EnvDescription The JS code in the body of the \texttt{didPrint} @@ -1152,9 +1169,10 @@ behave as desired, while the document author can use the above environments to a additional scripts. The correct way of using these commands is + \begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] \begin{defineJS}{\my@WillClose} -!quad!anglemeta(some willClose script) + !anglemeta(some willClose script) \end{defineJS} \let\my@save@developer@will@Close\developer@will@Close \def\developer@will@Close{% @@ -1181,10 +1199,10 @@ independently of the page the document is opened at. The following example gets the time the user first opens the document, \bgroup\obeyspaces% -\settowidth{\aebdimen}{\ttfamily\small var timestamp = util.printd("mm-dd-yy, H:MM:ss.", new Date());\}\}}% +\settowidth{\aebdimen}{\ttfamily\small\quad{var timestamp = util.printd("mm-dd-yy, H:MM:ss.", new Date());\}\}}}% \begin{dCmd*}[fontsize=\small,commandchars=!@~]{\aebdimen+2\fboxsep+2\fboxrule} \additionalOpenAction{\JS{% - var timestamp = util.printd("mm-dd-yy, H:MM:ss.", new Date());}} +!quad@var timestamp = util.printd("mm-dd-yy, H:MM:ss.", new Date());}}~ \end{dCmd*} \egroup \noindent\textcolor{red}{\textbf{Important:}} This open action takes place rather @@ -1258,11 +1276,11 @@ to combine several actions, including an action for checking for the version num \cs{afterRe\-quire\-ment\-PassedJS}. For example, \bgroup\obeyspaces% -\settowidth{\aebdimen}{\ttfamily\small var timestamp = util.printd("mm-dd-yy, H:MM:ss.", new Date());\}\}}% +\settowidth{\aebdimen}{\ttfamily\small\quad{var timestamp = util.printd("mm-dd-yy, H:MM:ss.", new Date());}}% \begin{dCmd*}[fontsize=\small,commandchars=!@~]{\aebdimen+2\fboxsep+2\fboxrule} \afterRequirementPassedJS {% - var timestamp = util.printd("mm-dd-yy, H:MM:ss.", new Date()); +!quad@var timestamp = util.printd("mm-dd-yy, H:MM:ss.", new Date());~ } \end{dCmd*} \egroup\noindent The above code will be executed if the version requirement is passed. @@ -1310,38 +1328,39 @@ action, see the documentation of \texttt{insdljs} for some details. \settowidth{\aebdimen}{\ttfamily\small console.println("Show the output of the page actions");}% \begin{dCmd*}[fontsize=\small,commandchars=!@~]{\aebdimen+2\fboxsep+2\fboxrule} \OpenAction{\JS{% - console.show();\r - console.clear();\r - console.println("Show the output of the page actions"); +!quad@console.show();\r~ +!quad@console.clear();\r~ +!quad@console.println("Show the output of the page actions");~ }} \end{dCmd*} \egroup - +\noindent In addition to \cs{OpenAction}, \texttt{addJSToPageOpen} and \texttt{addJSToPageClose} are also defined by {\cAEBP}. The -\meta{script} is executed each time the page is opened or +\ameta{script} is executed each time the page is opened or closed. \settowidth{\aebdimen}{\ttfamily\string\begin\darg{addJSToPageOpen}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{addJSToPageOpen} - !anglemeta(script) +!quad!anglemeta(script) \end{addJSToPageOpen} \end{dCmd} - +\noindent For page close events, we have the \texttt{addJSToPageClose} environment. \settowidth{\aebdimen}{\ttfamily\string\begin\darg{addJSToPageClose}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{addJSToPageClose} - !anglemeta(script) +!quad!anglemeta(script) \end{addJSToPageClose} \end{dCmd} \EnvDescription When placed in the preamble, these provide JavaScript support for page open/close events of the first page. +\newtopic Below are examples of usage. These appear in the document \texttt{aebpro\_ex1}. \bgroup\obeyspaces% @@ -1377,14 +1396,14 @@ on. \settowidth{\aebdimen}{\ttfamily\string\begin\darg{addJSToPageOpen}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{addJSToPageOpen} - !anglemeta(script) +!quad!anglemeta(script) \end{addJSToPageOpen} \end{dCmd} \settowidth{\aebdimen}{\ttfamily\string\begin\darg{addJSToPageClose}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{addJSToPageClose} - !anglemeta(script) +!quad!anglemeta(script) \end{addJSToPageClose} \end{dCmd} @@ -1401,7 +1420,7 @@ open/close effects you want. \settowidth{\aebdimen}{\ttfamily\string\begin\darg{addJSToPageOpenAt}\darg{\meta{page-ranges}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{addJSToPageOpenAt}{!meta(page-ranges)} - !anglemeta(script) +!quad!anglemeta(script) \end{addJSToPageOpenAt} \end{dCmd} @@ -1411,7 +1430,7 @@ environment. \settowidth{\aebdimen}{\ttfamily\string\begin\darg{addJSToPageCloseAt}\darg{\meta{page-ranges}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{addJSToPageCloseAt}{!meta(page-ranges)} - !anglemeta(script) +!quad!anglemeta(script) \end{addJSToPageCloseAt} \end{dCmd} @@ -1489,7 +1508,7 @@ To cancel out the every page action you can use \settowidth{\aebdimen}{\ttfamily\string\begin\darg{everyPageOpen}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{everyPageOpen} - !anglemeta(script) +!quad!anglemeta(script) \end{everyPageOpen} \end{dCmd} @@ -1498,7 +1517,7 @@ For page close events, we have the \texttt{everyPageClose} environment. \settowidth{\aebdimen}{\ttfamily\string\begin\darg{everyPageClose}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{everyPageClose} - !anglemeta(script) +!quad!anglemeta(script) \end{everyPageClose} \end{dCmd} @@ -1565,7 +1584,7 @@ object. \end{dCmd} The command for setting how you want to viewer to behave in fullscreen. This command is implemented through JavaScript, as opposed to the -\textbf{pdfmark} operator. See \emph{JavaScript for Acrobat API Reference} +{\PDFM} operator. See \emph{JavaScript for Acrobat API Reference} \cite{tech:AcroJSRef}, the section on the \texttt{FullScreen} object. \CmdLoc This command must be executed in the preamble. @@ -1686,7 +1705,7 @@ effects of individual pages, use the \cs{setPageTransition} command. \end{dCmd} Sets the transition effect for the \emph{next page only}, viewer must be in full screen mode. The command \cs{setPageTransition} is implemented -using the \textbf{pdfmark} operator. +using the {\PDFM} operator. \CmdLoc This command should be used in the preamble for the first page, and between slides for subsequent pages. @@ -1887,9 +1906,9 @@ you to develop a list of attachments that are attached if the \texttt{!optattachments} option is taken. {\AEBP} defines \cs{ifoptattachments}, a Boolean switch, which is set to true by \texttt{optattachments} and to false by \texttt{!optattachments}. -\settowidth{\aebdimen}{\ttfamily\string\addtoOptAttachments\darg{\meta{list\_of\_files}}}% +\settowidth{\aebdimen}{\ttfamily\string\addtoOptAttachments\darg{\meta{list-of-files}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -\addtoOptAttachments{!meta(list_of_files)} +\addtoOptAttachments{!meta(list-of-files)} \end{dCmd} This command can be used anywhere in the document and adds the listed files to the ones to be attached. The list is comma delimited. @@ -1917,12 +1936,12 @@ of optional attachments, then passes the argument to the two user commands Above you see the default definitions of these user commands. They may be redefined as desired to achieve some special effect. -\bgroup\obeyspaces% +\bgroup\def\1{\quad}\obeyspaces% \settowidth{\aebdimen}{\ttfamily \string\marginpar\darg{\string\fbox\darg{\string\footnotesize\string\ttfamily\#1}}}% \begin{dCmd*}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \renewcommand{\prjInputUser}[1]{% - \marginpar{\fbox{\footnotesize\ttfamily#1}} - \input{#1}} +!1\marginpar{\fbox{\footnotesize\ttfamily#1}} +!1\input{#1}} \end{dCmd*} \egroup It is possible to define \cs{prjInputUser} to be a link or button that @@ -1934,15 +1953,15 @@ two commands \cs{prjinput} and \cs{prjinclude} are \cs{prjInputUser} and to the list of optional attachments. The switch \cs{ifoptattachments} can be used, as needed, in a custom definition of \cs{prjInputUser} or \cs{prjIncludeUser}; for example, -\bgroup\obeyspaces% +\bgroup\def\1{\quad}\def\2{\qquad}\obeyspaces% \settowidth{\aebdimen}{ \ttfamily\string\marginpar% \darg{\string\fbox\darg{\string\footnotesize\string\ttfamily\string\ifoptattachments}}}% -\begin{dCmd*}{\aebdimen+2\fboxsep+2\fboxrule} +\begin{dCmd*}[commandchars={!~@}]{\aebdimen+2\fboxsep+2\fboxrule} \renewcommand{\prjInputUser}[1]{% - \marginpar{\fbox{\footnotesize\ttfamily\ifoptattachments - \setLink[\A{\JS{this.exportDataObject({% - cName: "\getcNameFromFileName{#1}",nLaunch: 0});}} - ]{\textcolor{\ahrefcolor}{#1}}\else#1\fi}}\input{#1}} +!1\marginpar{\fbox{\footnotesize\ttfamily\ifoptattachments +!1\setLink[\A{\JS{this.exportDataObject({% +!1!1cName: "\getcNameFromFileName{#1}",nLaunch: 0});}} +!1]{\textcolor{\ahrefcolor}{#1}}\else#1\fi}}\input{#1}} \end{dCmd*} \egroup This code creates a link that saves the attachment, if \texttt{optattachments} is taken, and simply puts the file name the margin, @@ -1966,7 +1985,7 @@ environment). \settowidth{\aebdimen}{\ttfamily\string\begin\darg{docassembly}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \begin{docassembly} - !anglemeta(script) +!quad!anglemeta(script) \end{docassembly} \end{dCmd} \noindent @@ -2170,12 +2189,12 @@ on these methods and their parameters. background graphic on every page the document. This is the kind of code that is executed for this document. \bgroup\small\obeyspaces% -\settowidth{\aebdimen}{\small\ttfamily cDIPath: "/C/AcroPackages/ManualBGs/Manual\_BG\_DesignV\_AeB.pdf"}% -\begin{dCmd*}[fontsize=\small]{\aebdimen+2\fboxsep+2\fboxrule} +\settowidth{\aebdimen}{\small\ttfamily\quad{cDIPath: "/C/AcroPackages/ManualBGs/Manual\_BG\_DesignV\_AeB.pdf"}}% +\begin{dCmd*}[fontsize=\small,commandchars={!~@}]{\aebdimen+2\fboxsep+2\fboxrule} \begin{docassembly} \addWatermarkFromFile({ - bOnTop:false, - cDIPath: "/C/AcroPackages/ManualBGs/Manual_BG_DesignV_AeB.pdf" +!quad~bOnTop:false,@ +!quad~cDIPath: "/C/AcroPackages/ManualBGs/Manual_BG_DesignV_AeB.pdf"@ }); \end{docassembly} \end{dCmd*} @@ -2332,11 +2351,11 @@ Multiple images can be imported and set by simply executing arguments, or, by executing \cs{declare\-Multi\-Images}. \bgroup\obeyspaces% -\settowidth{\aebdimen}{\ttfamily \darg{\meta{KV-pairs\_1}}\darg{\meta{KV-pairs\_2}}\darg{\meta{KV-pairs\_3}}...\darg{\meta{KV-pairs\_n}}}% +\settowidth{\aebdimen}{\ttfamily\quad\darg{\meta{KV-pairs\_1}}\darg{\meta{KV-pairs\_2}}\darg{\meta{KV-pairs\_3}}...\darg{\meta{KV-pairs\_n}}}% \begin{dCmd}[commandchars={!()}]{\aebdimen+2\fboxsep+2\fboxrule} \declareMultiImages { - {!meta(KV-pairs_1)}{!meta(KV-pairs_2)}{!meta(KV-pairs_3)}...{!meta(KV-pairs_n)} +!quad{!meta(KV-pairs_1)}{!meta(KV-pairs_2)}{!meta(KV-pairs_3)}...{!meta(KV-pairs_n)} } \end{dCmd} \egroup\CmdDescription This command calls the \cs{declareImageAndPlacement} @@ -2348,13 +2367,13 @@ command \cs{declareMultiImages} loops through the list, calling example follows. \bgroup\obeyspaces% -\settowidth{\aebdimen}{\ttfamily \darg{path=graphics/girl.png,placement=\darg{Avatar3,Avatar4}}}% -\begin{dCmd*}{\aebdimen+2\fboxsep+2\fboxrule} +\settowidth{\aebdimen}{\ttfamily\quad\darg{path=graphics/girl.png,placement=\darg{Avatar3,Avatar4}}}% +\begin{dCmd*}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \declareMultiImages {% - {path=graphics/girl.png,placement={Avatar3,Avatar4}} - {path=graphics/AcroFord.jpg,placement=AcroFord} - {path=graphics/scot.gif,placement=Scot} +!quad{path=graphics/girl.png,placement={Avatar3,Avatar4}} +!quad{path=graphics/AcroFord.jpg,placement=AcroFord} +!quad{path=graphics/scot.gif,placement=Scot} } \end{dCmd*} \egroup @@ -2427,13 +2446,13 @@ optional parameter allows you to specify what appearance state the icon is to be The optional parameter is shown in the example below. \bgroup\obeyspaces% -\settowidth{\aebdimen}{\ttfamily \darg{path=graphics/girl.png,placement=\darg{[2]Avatar1,[0]Avatar2}}}% -\begin{dCmd*}{\aebdimen+2\fboxsep+2\fboxrule} +\settowidth{\aebdimen}{\ttfamily\quad\darg{path=graphics/girl.png,placement=\darg{[2]Avatar1,[0]Avatar2}}}% +\begin{dCmd*}[commandchars={!()}]{\aebdimen+2\fboxsep+2\fboxrule} \declareMultiImages {% - {path=graphics/man1.pdf,placement={Avatar1,[2]Avatar2}} - {path=graphics/scot.gif,placement={[1]Avatar1,[1]Avatar2}} - {path=graphics/girl.png,placement={[2]Avatar1,[0]Avatar2}} +!quad{path=graphics/man1.pdf,placement={Avatar1,[2]Avatar2}} +!quad{path=graphics/scot.gif,placement={[1]Avatar1,[1]Avatar2}} +!quad{path=graphics/girl.png,placement={[2]Avatar1,[0]Avatar2}} } \end{dCmd*} \egroup The optional argument precedes the field name and determines the @@ -2528,6 +2547,7 @@ button appearances of the buttons used to control the button animation. names of the anima created by \cs{btnAnima} that will be using these appearance icons. \end{description} + \textbf{Example:} \settowidth{\aebdimen}{\ttfamily\string\placeAnimeCtrlBtnFaces\darg{btn\_anime\_icons1.pdf}\darg{myclock,mysine}}% \begin{dCmd*}{\aebdimen+2\fboxsep+2\fboxrule} @@ -2686,7 +2706,7 @@ in the \texttt{attachment\-Names} environment in the preamble. \settowidth{\aebdimen}{\ttfamily \anglemeta{\string\autolabelNum{} and \string\labelName{} commands}}% \begin{dCmd}[commandchars={!()}]{\aebdimen+2\fboxsep+2\fboxrule} \begin{attachmentNames} - !anglemeta(\autolabelNum and \labelName commands) +!quad!anglemeta(\autolabelNum and \labelName commands) \end{attachmentNames} \end{dCmd} \egroup @@ -2777,7 +2797,7 @@ left and right braces, and double quotes, or using unicode above 00FF (Basic Latin + Latin-1). To illustrate, suppose we wish the description of \texttt{cooltarget} to be \begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small] -"$|e^{\ln(17)}|$" + "$|e^{\ln(17)}|$" \end{Verbatim} All the bad characters! \begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small] @@ -2934,9 +2954,9 @@ with \texorpdfstring{\protect\cs{ahyperref}}{\textbackslash ahyperref}} the \cs{label} command we use the \textsf{xr-hyper} package that comes with \texttt{hyperref}; the code might be -\begin{Verbatim}[xleftmargin=\amtIndent] +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] \ahyperref[dest=target1-s:intro]{attach1} - {Section~\ref*{target1-s:intro}} +!quad{Section~\ref*{target1-s:intro}} \end{Verbatim} we set \verb!dest=target1-s:intro!. @@ -3230,7 +3250,7 @@ layer. This could be a button or a link that executes JavaScript. \darg{\meta{layer\_name}}}% \begin{dCmd}[commandchars={!()}]{\aebdimen+2\fboxsep+2\fboxrule} \xBld[true|false|print=!anglemeta(!upshape(true|false))]{!meta(layer_name)} - !anglemeta(content of layer) +!quad!anglemeta(content of layer) \eBld \end{dCmd} @@ -3301,8 +3321,9 @@ provides help to the document consumer. \exPDFSrc{aebpro_ex4} These topics are illustrated in the support file \texttt{aebpro\_ex4}. -\exAeBBlogPDF{tag=rollovers} Additional examples of \emph{rollover animation} using \cs{texHelp} can be found -at the \mlhref{\urlAcroTeXBlog}{{\AcroTeX} Blog} web site. +\exAeBBlogPDF{tag=rollovers} Additional examples of \emph{rollover animation} +using \cs{texHelp} can be found at the \mlhref{\urlAcroTeXBlog}{{\AcroTeX} +Blog} web site. %See also \url{http://www.acrotex.net/blog/?p=1359} @@ -3584,10 +3605,10 @@ is titled \textsl{\texttt{ocgAnime}: Animation using OCG (Layers) with \AEBP} ca environment. \bgroup\obeyspaces% -\settowidth{\aebdimen}{\ttfamily \anglemeta{a set of ocg frames built using \string\animeBld/\string\eBld pairs}}% +\settowidth{\aebdimen}{\ttfamily\quad\anglemeta{a set of ocg frames built using \string\animeBld/\string\eBld pairs}}% \begin{dCmd}[commandchars={!()}]{\aebdimen+2\fboxsep+2\fboxrule} \begin{ocgAnime}{!meta(KV-pairs)} - !anglemeta(a set of ocg frames built using \animeBld/\eBld pairs) +!quad!anglemeta(a set of ocg frames built using \animeBld/\eBld pairs) \end{ocgAnime} \end{dCmd} \egroup\KVP The key-value pairs are the same ones described in diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/doc/install_jsfiles.tex b/macros/latex/contrib/aeb_pro/aeb_pro/doc/install_jsfiles.tex new file mode 100644 index 0000000000..5639318335 --- /dev/null +++ b/macros/latex/contrib/aeb_pro/aeb_pro/doc/install_jsfiles.tex @@ -0,0 +1,312 @@ +\documentclass{article} +\usepackage[fleqn]{amsmath} +% +% the driver line is not necessary if you +% have aebpro.cfg configured to your driver. +% +\usepackage[web]{aeb_pro} +\usepackage{eforms} +\usepackage[altbullet]{lucidbry} +\usepackage{pifont} + +\usepackage{fancyvrb} + +\makeatletter +\renewcommand{\paragraph} + {\@startsection{paragraph}{4}{0pt}{6pt}{-3pt} + {\normalfont\normalsize\bfseries}} +\renewcommand{\subparagraph} + {\@startsection{subparagraph}{5}{\parindent}{6pt}{-3pt}% + {\normalfont\normalsize\bfseries}} +\makeatother + +\mathindent\parindent + +\def\AEBP{\app{AeB Pro}} +\def\AEB{\app{AeB}} +\def\app#1{\textsf{#1}} +\def\amtIndent{\parindent} +\def\meta#1{$\langle\textit{\texttt{#1}}\rangle$} +\def\SC#1{{\small#1}} +\def\PDF{\SC{PDF}} +\let\opt\texttt + +\def\copyGetPath{\qquad\pushButton[\TU{Copy app.getPath to console} +\CA{getPath}\A{\JS{console.show();\r +console.println('\\napp.getPath("user");'); +}}]{cpyGtPth}{}{11bp}} + +\def\copyGetPathJS{\qquad\pushButton[\TU{Copy app.getPath to console} +\CA{getPath}\A{\JS{console.show();\r +console.println('\\napp.getPath("user", "javascript");'); +}}]{cpyGtPthJS}{}{11bp}} + +%\reversemarginpar +\def\jsSupInstr{How to install JavaScript support files} +\title{\jsSupInstr} +\author{D. P. Story} +\version{1.0} + +\chngDocObjectTo{\newDO}{doc} +\begin{docassembly} +var titleOfManual="How to install JavaScript files"; +var manualfilename="Manual_BG_Print_jsfiles.pdf"; +var manualtemplate="Manual_BG_Brown.pdf"; // Blue, Green, Brown +var _pathToBlank="C:/Users/Public/Documents/ManualBGs/"+manualtemplate; +var doc; +var buildIt=true; +if ( buildIt ) { + console.println("Creating new " + manualfilename + " file."); + doc = \appopenDoc({cPath: _pathToBlank, bHidden: true}); + var _path=this.path; + var pos=_path.lastIndexOf("/"); + _path=_path.substring(0,pos)+"/"+manualfilename; + \docSaveAs\newDO ({ cPath: _path }); + doc.closeDoc(); + doc = \appopenDoc({cPath: manualfilename, oDoc:this, bHidden: true}); + f=doc.getField("ManualTitle"); + f.value=titleOfManual; + doc.flattenPages(); + \docSaveAs\newDO({ cPath: manualfilename }); + doc.closeDoc(); +} else { + console.println("Using the current "+manualfilename+" file."); +} +var _path=this.path; +var pos=_path.lastIndexOf("/"); +_path=_path.substring(0,pos)+"/"+manualfilename; +\addWatermarkFromFile({ + bOnTop:false, + bOnPrint:false, + cDIPath:_path +}); +\executeSave(); +\end{docassembly} + +\begin{document} + +\maketitle + +\section{Introduction} + +Because some of the \app{Acrobat} JavaScript methods have security +restrictions, they can be only executed in the console window, or as part +of a batch sequence, or from the JavaScript folder reserved by +\app{Acrobat} for that use. The developer (of {\LaTeX} packages or {\PDF} +form documents) may want to use these restricted JavaScript methods as +part of document assembly. To use the restricted methods, they must be +called from the user JavaScript folder. The scripts are contained in a +\SC{JS} file that \app{Acrobat} reads when it first starts up. + +In this article, we provide detailed steps for locating the user +JavaScript folder. For {\AEB} and {\AEBP}, the files \texttt{aeb.js} and +\texttt{aeb\_pro.js} are placed in the folder. Other JavaScript files may +be placed in the folder as well, for example, the \texttt{config.js} file +is one that is commonly used for general purposes. + +Before we get started, if you are using a version of \app{Acrobat} prior +to version~8.1, you need not read any further. The security restrictions +described below were not in effect for those versions. + +\section{Installing the JavaScript support files} + +The functionality of {\AEB} and {\AEBP} depends, to some extent, on the +proper installation of their JavaScript support files. +\begin{itemize} + \item \AEB: For authors using the $\app{dvips}+\app{Acrobat Distiller}$ + workflow, \texttt{aeb.js} is required; this file is not used by + \app{pdflatex} or \app{xelatex} users. + + \item \AEBP: For authors using the $\app{dvips}+\app{Acrobat + Distiller}$ workflow, \texttt{aeb\_pro.js} is required; for authors + that prefer \app{pdflatex}, \app{lualatex}, or \app{xelatex} as the + {\PDF} creator \emph{and who own} the \app{Acrobat} application, + the \texttt{aeb\_pro.js} is required with the \opt{useacrobat} + option of \AEBP. When using the \opt{nopro} option of \AEBP, the + JavaScript file \texttt{aeb\_pro.js} is not used. + +\end{itemize} +The placement of the JavaScript files has changed over the years and is a +function of the version number \meta{ver}. Start \app{Acrobat} and open the +console debugger window by pressing \texttt{Ctrl+J} (for \app{Windows OS}) +or \texttt{Cmd+J} (for \app{Mac OS}). Now execute the code +\texttt{app.getPath("user")} in the console window. To do this, press the +\textsf{getPath} button provided below, which copies the necessary code to +the console window. +\begin{equation} +\begin{minipage}{.8\linewidth} +\begin{Verbatim}[commandchars={!~@}] +app.getPath("user");!copyGetPath +\end{Verbatim} +\end{minipage}\label{display:getPath} +\end{equation} +Now, with the cursor on the line containing the script, press the +\texttt{Ctrl+Enter} (for \app{Windows OS}) or \texttt{Cmd+Enter} (for +\app{Mac~OS}) key. This will execute the JavaScript and return the `root' +path to the user's application data for \app{Acrobat}. + +The rest of the instructions depend on your operating system, +\app{Windows} or \app{Mac}. + +\subsection{For users of \app{Windows OS}} + +There are several cases, jump to the numbered paragraph that describes your +version (\meta{ver}) of \app{Acrobat}. + +%/C/Users/D. P. Story/AppData/Roaming/Adobe/Acrobat/11.0 +%/C/Users/D. P. Story/AppData/Roaming/Adobe/Acrobat/Privileged/11.0/JavaScripts + +\def\Stepi{\ding{182}\enspace} +\def\Stepii{\ding{183}\enspace} +\def\Stepiii{\ding{184}\enspace} + +\paragraph*{{\Stepi}For $\boldmath\text{\meta{ver}}$, $\boldmath 8.1 \le +\text{\meta{ver}} < 10.1.1$.} For the \app{Windows OS}, executing the script +in display~\eqref{display:getPath} returns a string of the +form:\footnote{This string is for \app{Windows OS} beyond \app{WinXP}.} +\begin{equation} +\begin{minipage}{.8\linewidth} +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] +/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/!meta(ver) +\end{Verbatim} +\end{minipage}\label{display:path} +\end{equation} +Navigate to this folder location. The correct location for the \SC{JS} +files is in the \texttt{JavaScripts} subfolder. If the folder does not +exist, create it. The final path for the JavaScript support files is then +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] +/C/Users/!meta(username)/AppData/Roaming/Adobe/ + Acrobat/!meta(ver)/JavaScripts +\end{Verbatim} +Finally, copy \texttt{aeb.js} (and \texttt{aeb\_pro.js}, if applicable) +into this folder. Close \app{Acrobat}, the next time \app{Acrobat} +is started, it will read in the \SC{JS} files. + +\paragraph*{{\Stepii}For $\boldmath\text{\meta{ver}}$, $\boldmath10.1.1 \le +\text{\meta{ver}} < 12$.} For these versions of \app{Acrobat} security has +have tightened up even more; the \texttt{JavaScripts} folder is now a +subfolder of a special \texttt{Privileged} folder. Execute +\texttt{app.getPath("user")} in the console window, as in +display~\eqref{display:getPath}. The method brings back a string similar to +the one in display~\eqref{display:path}. The correct path is obtained by +simply inserting \texttt{Privileged} into the path in +display~\eqref{display:path}, between \texttt{Acrobat} and \meta{ver}, as +displayed below. +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] +/C/Users/!meta(username)/AppData/Roaming/Adobe/ + Acrobat/!textbf(Privileged)/!meta(ver)/JavaScripts +\end{Verbatim} +But this is a mere description of the correct location, the path must +exist! The path must be created, if it does not already exist. + +Navigate to the folder, one folder above the path shown in +display~\eqref{display:path}, that is, navigate to, +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] +/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/ +\end{Verbatim} +If a \texttt{Privileged} folder exists, enter into it; otherwise, create +it, then enter it. +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] +/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/Privileged +\end{Verbatim} +Now create a folder named \meta{ver}, unless it already exists, and enter +it. The version is always the major release \texttt{8.0}, \texttt{9.0}, +\texttt{10.0}, or \texttt{11.0}. +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] +/C/Users/!meta(username)/AppData/Roaming/Adobe/ + Acrobat/Privileged/!meta(ver) +\end{Verbatim} +Finally, create the \texttt{JavaScript} folder, unless it already exists, +to obtain the final path to the user folder JavaScripts: +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] +/C/Users/!meta(username)/AppData/Roaming/Adobe/ + Acrobat/Privileged/!meta(ver)/JavaScripts +\end{Verbatim} +Copy \texttt{aeb.js} (and \texttt{aeb\_pro.js}, if applicable) into this +folder. Close \textsf{Acrobat}, the next time \textsf{Acrobat} is started, +it will read in the \SC{JS} files. + +\paragraph*{{\Stepiii}For $\boldmath\text{\meta{ver}}$, $\boldmath +\text{\meta{ver}} > 12 $.} Beginning with the next major version following +version~11, Adobe changed its versioning scheme. There are now two tracks, +\emph{subscription} and \emph{classic} (also called \emph{perpetual}). For +subscription, the version, as I understand it, will always be \texttt{DC} +(Document Cloud), and for the classic, for which you've purchased a +\emph{perpetual license}, the \meta{ver} is a calendar year. The first +classic version is \texttt{2015}, the next one is most likely \texttt{2017}, +since major releases occur about every two years. + +Execute the code of display~\eqref{display:getPath} by pressing the button +provided to obtain a path of the form, +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] +/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/DC +\end{Verbatim} +for the subscription license or, +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] +/C/Users/!meta(username)/AppData/Roaming/Adobe/Acrobat/2015 +\end{Verbatim} +for the classic (or perpetual) license. Of course, this last path is for +the first classic version. + +Now, to obtain the path to the \texttt{JavaScripts} folder, follow the +instructions for numbered paragraph \ding{183}, but with \meta{ver} equal +to either \texttt{DC} or \texttt{2015} (a calendar year). + +%/C/Users/D. P. Story/AppData/Roaming/Adobe/Acrobat/Privileged/11.0/JavaScripts + +\subsection{For users of \app{Mac OS}} + +\app{Mac OS} does not have the security restrictions that \app{Windows OS} +does, as described in paragraphs \ding{183} and \ding{184}. + +Follow the instructions of paragraph \ding{182}, by first pressing the button +provided in display~\eqref{display:getPath}, then, in the console window, +execute this script as described in the paragraph following +display~\eqref{display:getPath}. After working through \ding{182}, one +obtains any of the following paths depending on the version (\meta{ver}) you +are using:\medskip + +\noindent +For $\text{\meta{ver}} = \texttt{8.0}, \texttt{9.0}, \texttt{10.0}, +\texttt{11.0}$: +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] +/Users/!meta(user)/Library/Application\ Support/Adobe/ + Acrobat/!meta(ver)/JavaScripts +\end{Verbatim} +\medskip + +\noindent +For $\text{\meta{ver}} > 12$, the path is, +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] +/Users/!meta(user)/Library/Application\ Support/Adobe/ + Acrobat/DC/JavaScripts +\end{Verbatim} +for a subscription license, and, +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] +/Users/!meta(user)/Library/Application\ Support/Adobe/ + Acrobat/2015/JavaScripts +\end{Verbatim} +or more generally, +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] +/Users/!meta(user)/Library/Application\ Support/Adobe/ + Acrobat/!meta(year)/JavaScripts +\end{Verbatim} +for the perpetual license. + +In all cases, if the \texttt{JavaScripts} folder does not exist, it must +be created. Copy any \SC{JS} support files into the \texttt{JavaScripts} +folder. The script files are read the next time \app{Acrobat} is started. + +\section{Testing the placement of the JavaScript support files} + +Assuming you have successfully followed the instructions and created the +\texttt{JavaScripts} folder, test the validity of what you have done by +closing \app{Acrobat} then opening it again. Open the console window +(\texttt{Ctrl+J} or \texttt{Cmd+J}, for \app{Mac OS}) and execute this +command in the console window: +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars={!~@}] +app.getPath("user","javascript");!quad!copyGetPathJS +\end{Verbatim} +If you have followed the instructions, the return string should read the +complete path to the \texttt{JavaScripts} folder. +\end{document} diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex1.pdf b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex1.pdf deleted file mode 100644 index 4af04e42b9..0000000000 Binary files a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex1.pdf and /dev/null differ diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex1.tex b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex1.tex index 524048403e..4123342c09 100644 --- a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex1.tex +++ b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex1.tex @@ -2,13 +2,13 @@ % use nopro if you don't have acrobat \documentclass{article} \usepackage[% - web={ - pro, - designv, - tight, - centertitlepage, - }, - aebxmp, + web={ + pro, + designv, + tight, + centertitlepage, + }, + aebxmp ]{aeb_pro} @@ -222,12 +222,12 @@ Will the effects defined by these environments appear on this page or the next? % of the same environment. % \begin{addJSToPageOpen} -var str = "Local open action" +var str = "Local open action"; console.println(str + ": page " + (this.pageNum+1)); \end{addJSToPageOpen} \begin{addJSToPageClose} -var str = "Local Close action!" +var str = "Local Close action!"; console.println(str + ": page " + (this.pageNum+1)); \end{addJSToPageClose} diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex3.pdf b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex3.pdf index e9b48043f7..0a5daae5cd 100644 Binary files a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex3.pdf and b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex3.pdf differ diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex3.tex b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex3.tex index c20a15e0f4..26722e775c 100644 --- a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex3.tex +++ b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex3.tex @@ -2,6 +2,8 @@ % use useacrobat option with pdftex and xetex if you have acrobat \documentclass{article} \usepackage{graphicx,fancyvrb} +% Edit this command as needed +\def\pthToExtras{../extras} \usepackage[% web={ pro, @@ -13,7 +15,7 @@ }, eforms, % -% Attach source file, and the tex log (I've renamed \jobname.log +% Attach source file, and the tex log (renamed \jobname.log % to \jobname.tex.log to avoid the distiller from overwriting it. % The distiller only creates the log if there some sort of error message; consequently, % the log for distiller is not attached (no error), but the tex log is destroyed by distiller @@ -21,7 +23,7 @@ % % Just for laughs, let's include Robot Man. % - attachments={extras.zip.txt, ../extras/robot_man.pdf}, + attachments={extras.zip.txt, \pthToExtras/robot_man.pdf}, aebxmp, ]{aeb_pro} @@ -42,15 +44,13 @@ } \DeclareInitView{layoutmag={navitab=UseAttachments},windowoptions=fit} +\newbox\aebpbox \newcommand{\cs}[1]{\texttt{\char`\\#1}} \newcommand\newtopic{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi \vskip\medskipamount\noindent} -\newenvironment{sverbatim} -{\par\footnotesize\verbatim}{\endverbatim} % % As you do not have the necessary background files, the \addWatermarkFromFile % will silently fail. -% \begin{forpaper} \begin{docassembly} var pos=this.path.indexOf(this.documentFileName,"/"); @@ -58,15 +58,15 @@ var myPath=this.path.substring(0,pos); try { \addWatermarkFromFile({ bOnTop:false, - cDIPath:myPath+"../extras/Manual_BG_Print_AeB.pdf" + cDIPath:myPath+"\pthToExtras/Manual_BG_Print_AeB.pdf" }); } catch(e) { console.println(e.toString()) }; try { - \importSound({cName: "StarTrek", cDIPath: "../extras/trek.wav" }); + \importSound({cName: "StarTrek", cDIPath: "\pthToExtras/trek.wav" }); } catch(e) { console.println(e.toString()) }; try { - \importIcon({cName: "logo", cDIPath: "../extras/AeB_Logo.pdf"}); - \importIcon({cName: "logopush", cDIPath: "../extras/AeB_Logo_bw15.pdf"}); - \importIcon({cName: "logorollover", cDIPath: "../extras/AeB_Logo_bw50.pdf"}); + \importIcon({cName: "logo", cDIPath: "\pthToExtras/AeB_Logo.pdf"}); + \importIcon({cName: "logopush", cDIPath: "\pthToExtras/AeB_Logo_bw15.pdf"}); + \importIcon({cName: "logorollover", cDIPath: "\pthToExtras/AeB_Logo_bw50.pdf"}); var f = this.getField("cheesySound"); f.buttonPosition = position.iconOnly; var oIcon = this.getIcon("logo"); @@ -76,7 +76,10 @@ try { oIcon = this.getIcon("logorollover"); f.buttonSetIcon(oIcon,2); } catch(e) { console.println(e.toString()) }; -try {\importDataObject({cName: "AeB Pro Example #2",cDIPath: "aebpro_ex2.pdf"});} catch(e){} +try { + \importDataObject({cName: "AeBProEx2",cDIPath: "aebpro_ex2.pdf"}); + this.getDataObject("AeBProEx2").description="AeB Pro Example #2"; +} catch(e){} \end{docassembly} \end{forpaper} \begin{forscreen} @@ -86,16 +89,16 @@ var myPath=this.path.substring(0,pos); try { \addWatermarkFromFile({ bOnTop:false, - cDIPath:myPath+"../extras/Manual_BG_DesignV_AeB.pdf" + cDIPath:myPath+"\pthToExtras/Manual_BG_DesignV_AeB.pdf" }); } catch(e) { console.println(e.toString()) }; try { - \importSound({cName: "StarTrek", cDIPath: "../extras/trek.wav" }); + \importSound({cName: "StarTrek", cDIPath: "\pthToExtras/trek.wav" }); } catch(e) { console.println(e.toString()) }; try { - \importIcon({cName: "logo", cDIPath: "../extras/AeB_Logo.pdf"}); - \importIcon({cName: "logopush", cDIPath: "../extras/AeB_Logo_bw15.pdf"}); - \importIcon({cName: "logorollover", cDIPath: "../extras/AeB_Logo_bw50.pdf"}); + \importIcon({cName: "logo", cDIPath: "\pthToExtras/AeB_Logo.pdf"}); + \importIcon({cName: "logopush", cDIPath: "\pthToExtras/AeB_Logo_bw15.pdf"}); + \importIcon({cName: "logorollover", cDIPath: "\pthToExtras/AeB_Logo_bw50.pdf"}); var f = this.getField("cheesySound"); f.buttonPosition = position.iconOnly; var oIcon = this.getIcon("logo"); @@ -105,7 +108,10 @@ try { oIcon = this.getIcon("logorollover"); f.buttonSetIcon(oIcon,2); } catch(e) { console.println(e.toString()) }; -try {\importDataObject({cName: "AeB Pro Example #2",cDIPath: "aebpro_ex2.pdf"});} catch(e){} +try { + \importDataObject({cName: "AeBProEx2",cDIPath: "aebpro_ex2.pdf"}); + this.getDataObject("AeBProEx2").description="AeB Pro Example #2"; +} catch(e){} \end{docassembly} \end{forscreen} @@ -175,7 +181,7 @@ relative paths to the file required to attach. For example, \usepackage[% driver=dvips, web={pro,usesf,...}, - attachments={extras.zip.txt,../extras/robot_man.pdf, + attachments={extras.zip.txt,\pthToExtras/robot_man.pdf, /C/Documents and Settings/dps/My Documents/My Pictures/birthday17.jpg}, ... ]{aeb_pro} @@ -244,7 +250,7 @@ var myPath=this.path.substring(0,pos); \begin{docassembly} \addWatermarkFromFile({ bOnTop:false, - cDIPath:myPath+"../extras/Manual_BG_Print_AeB.pdf" + cDIPath:myPath+"\pthToExtras/Manual_BG_Print_AeB.pdf" }); \end{docassembly} \end{Verbatim} @@ -265,12 +271,12 @@ re-inserts \verb!({! in a different location. (See the For another cheesy demonstration, let's import a sound, associate it with a button. I leave it to you to press the button at your discretion. -\begin{center} -\setbox0=\hbox{\includegraphics[height=16bp]{extras/AeB_Logo.eps}} +\begin{center}%\previewOn +\setbox\aebpbox=\hbox{\includegraphics[height=16bp]{\pthToExtras/AeB_Logo.eps}} \newtopic\pushButton[\S{S}\W{0}\A{\JS{% var s = this.getSound("StarTrek");\r s.play(); -}}]{cheesySound}{\the\wd0 }{\the\ht0 } +}}]{cheesySound}{\wd\aebpbox}{\ht\aebpbox} \end{center} \begin{Verbatim} @@ -278,11 +284,11 @@ discretion. try { \addWatermarkFromFile({ bOnTop:false, - cDIPath:myPath+"../extras/Manual_BG_DesignV_AeB.pdf" + cDIPath:myPath+"\pthToExtras/Manual_BG_DesignV_AeB.pdf" }); } catch(e) { console.println(e.toString()) }; try { - \importSound({cName: "StarTrek", cDIPath: "../extras/trek.wav" }); + \importSound({cName: "StarTrek", cDIPath: "\pthToExtras/trek.wav" }); } catch(e) { console.println(e.toString()) }; \end{docassembly} \end{Verbatim} @@ -303,9 +309,9 @@ code, with some comments added. ... ... // Import the sounds into the document -\importIcon({cName: "logo", cDIPath: "../extras/AeB_Logo.pdf"}); -\importIcon({cName: "logopush", cDIPath: "../extras/AeB_Logo_bw15.pdf"}); -\importIcon({cName: "logorollover", cDIPath: "../extras/AeB_Logo_bw50.pdf"}); +\importIcon({cName: "logo", cDIPath: "\pthToExtras/AeB_Logo.pdf"}); +\importIcon({cName: "logopush", cDIPath: "\pthToExtras/AeB_Logo_bw15.pdf"}); +\importIcon({cName: "logorollover", cDIPath: "\pthToExtras/AeB_Logo_bw50.pdf"}); var f = this.getField("cheesySound"); // get the field object of the button f.buttonPosition = position.iconOnly; // set it to receive icon appearances var oIcon = this.getIcon("logo"); // get the "logo" icon @@ -326,7 +332,8 @@ your own files using the \texttt{docassembly} environment. ... ... try { - \importDataObject({cName: "AeB Pro Example #2",cDIPath: "aebpro_ex2.pdf"}); + \importDataObject({cName: "AeBProEx2",cDIPath: "aebpro_ex2.pdf"}); + this.getDataObject("AeBProEx2").description="AeB Pro Example #2"; } catch(e){} \end{docassembly} \end{Verbatim} diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex4.tex b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex4.tex index 81c837096c..b0df8c3e4f 100644 --- a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex4.tex +++ b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex4.tex @@ -2,18 +2,18 @@ \documentclass{article} \usepackage{amsmath} \usepackage[% - web={ - pro, - designv, - tight, -% forcolorpaper, - centertitlepage, - dvipsnames, - usesf - }, - uselayers, - eforms, - aebxmp, + web={ + pro, + designv, + tight, +% forcolorpaper, + centertitlepage, + dvipsnames, + usesf + }, + uselayers, + eforms, + aebxmp ]{aeb_pro} \usepackage{graphicx} \usepackage[nomessages]{fp} @@ -24,6 +24,8 @@ \usepackage{pstricks-add} \usepackage[absolute,overlay]{textpos} +\let\tops\texorpdfstring + \DeclareDocInfo { title=The AeB Pro Package\texorpdfstring{\\[1ex]}{: }Layers and Rollovers, diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex6.pdf b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex6.pdf index 65ccfa048b..2b1b3a0adf 100644 Binary files a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex6.pdf and b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex6.pdf differ diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex6.tex b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex6.tex index 66cbd35023..bdcc080a52 100644 --- a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex6.tex +++ b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex6.tex @@ -14,6 +14,9 @@ linktoattachments, eforms ]{aeb_pro} +\usepackage{fancyvrb} +\usepackage[active]{srcltx} + \DeclareDocInfo { @@ -126,19 +129,18 @@ accessed through the menu item \texttt{View > Portfolio > Cover Sheet}. \newtopic\textbf{\textcolor{red}{TIP:}} Use the \cs{autolabelNum*} command to assign a more informative description of the attachments, like so. -\begin{sverbatim} - \autolabelNum*{1}{European Currency \u20AC} - \autolabelNum*{2}{\u0022$|e^\u007B\u005Cln(17)\u007D|$\u0022} - \autolabelNum*[AeST]{3}{The AeBST Components} - \autolabelNum*[atease]{4}{The @EASE Control Panel} -\end{sverbatim} - +\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small] +\autolabelNum*{1}{European Currency \u20AC} +\autolabelNum*{2}{\u0022$|e^\u007B\u005Cln(17)\u007D|$\u0022} +\autolabelNum*[AeST]{3}{The AeBST Components} +\autolabelNum*[atease]{4}{The @EASE Control Panel} +\end{Verbatim} Note that there is an alternative that is commented out to the assignment of the second attachment, it is -\begin{sverbatim} - \autolabelNum* - {2}{\u\DQUOTE$|e^\u\LBRACE\u005Cln(17)\u\RBRACE|$\u\DQUOTE} -\end{sverbatim} +\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small] +\autolabelNum*{2} + {\u\DQUOTE$|e^\u\LBRACE\u005Cln(17)\u\RBRACE|$\u\DQUOTE} +\end{Verbatim} One can use the ``helper'' commands, as described in \texttt{aeb\_pro.tex}; however, there is a slight problem. Within the \texttt{} argument, we obey spaces, so if we were to say \verb!\u\LBRACE\u\BSLASH ln(17)\u\RBRACE! there would be a space diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex8.pdf b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex8.pdf index 83ff4f2396..54766e4d20 100644 Binary files a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex8.pdf and b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex8.pdf differ diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex8.tex b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex8.tex index 196eef6dbe..0f8941b51a 100644 --- a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex8.tex +++ b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_ex8.tex @@ -33,7 +33,7 @@ \defUniStr{myCoolIV}{\u0022\u20AC|e^\u007B\u005Cln(17)\u007D|$\u0022} \defUniStr{Reset myCoolIV}{Reset the \u0022\u20AC|e^\u007B\u005Cln(17)\u007D|$\u0022 field} -\pdfSpacesOff +%\pdfSpacesOff \begin{document} diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_index_ex.pdf b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_index_ex.pdf new file mode 100644 index 0000000000..e666732001 Binary files /dev/null and b/macros/latex/contrib/aeb_pro/aeb_pro/examples/aebpro_index_ex.pdf differ diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/examples/test_install.pdf b/macros/latex/contrib/aeb_pro/aeb_pro/examples/test_install.pdf index 48b4888c95..0734eb4342 100644 Binary files a/macros/latex/contrib/aeb_pro/aeb_pro/examples/test_install.pdf and b/macros/latex/contrib/aeb_pro/aeb_pro/examples/test_install.pdf differ diff --git a/macros/latex/contrib/aeb_pro/aeb_pro/examples/test_install.tex b/macros/latex/contrib/aeb_pro/aeb_pro/examples/test_install.tex index 20a2216fb3..6f2bbf793f 100644 --- a/macros/latex/contrib/aeb_pro/aeb_pro/examples/test_install.tex +++ b/macros/latex/contrib/aeb_pro/aeb_pro/examples/test_install.tex @@ -24,4 +24,15 @@ haven't closed and opened \textsf{Acrobat} after you installed \texttt{aeb\_pro. or the cover page document \texttt{myCoverPage.pdf} does not exist or has been moved from this folder +On failure, did you close \textsf{Acrobat} before opening this file? (The JS +files are only read once when the \textsf{Acrobat} application is opened.) +When all else fails, try rereading the installation instructions again +(\texttt{install\_jsfiles.pdf}), found in the \texttt{doc} folder, but more +carefully this time. + +Still failing? Do you have \textsf{Acrobat DC}? Perhaps your \textsf{Acrobat} +needs to be configured. Try reading \texttt{acrobat-in-workflow.pdf}, found +in the \texttt{doc} folder. + + \end{document} diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf index 5fb27f8d90..d6e1b6ee61 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 57801d4faf..8c50c5690b 100644 --- a/macros/latex/contrib/easybook/doc/easybook-demo.tex +++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex @@ -27,10 +27,9 @@ { linespread = 1.355, tabspread = 1.05, - mathspread = 1, + mathspread = 1.05, capspread = 1, - fnspread = 1.05, - fnsep = 0.5ex + fnspread = 1 }, elfont = { @@ -95,7 +94,7 @@ \github~\url{https://github.com/texl3/easybook} \\ \edge~\url{https://latexstudio.net} } - \date{2021/02/08\hskip\ccwd\relax v1.23a} + \date{2021/02/09\hskip\ccwd\relax v1.23b} } \begin{document} diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf index cea72f04f6..10801ed596 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 4cd23121b7..3c9f686289 100644 --- a/macros/latex/contrib/easybook/doc/easybook.tex +++ b/macros/latex/contrib/easybook/doc/easybook.tex @@ -3,7 +3,7 @@ \title{\sffamily easybook书籍文档类} \author{瞿毅} -\date{2021/02/08\hskip\ccwd\relax v1.23a\thanks{\url{https://gitee.com/texl3/easybook}}} +\date{2021/02/09\hskip\ccwd\relax v1.23b\thanks{\url{https://gitee.com/texl3/easybook}}} \begin{document} \maketitle @@ -158,24 +158,25 @@ \begin{function}{ctex@link,ctex@url,ctex@cite} \begin{syntax} \tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表} - \end{syntax}超链接颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改。 + \end{syntax} \changes{v1.10}{2021/01/08}{可以自定义超链接颜色。} + 超链接颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改。 \end{function} \item[linktopage] 将目录中的超链接置于页码上,默认是置于标题上。 \end{optdesc} \subsection{行距} -\begin{function}[EXP,added = 2021-01-05,updated = 2021-01-12]{spread/linespread,spread/tabspread,spread/mathspread,spread/capspread,spread/fnspread,spread/fnsep} +\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-09]{spread/linespread,spread/tabspread,spread/mathspread,spread/capspread,spread/fnspread} \begin{syntax} linespread = <(1.3)> - tabspread = <(1)> - mathspread = <(1)> + tabspread = <(1.05)> + mathspread = <(1.05)> capspread = <(1)> fnspread = <(1)> - fnsep = <(0ex)> \end{syntax} \changes{v1.21b}{2021/01/12}{增加脚注线间的距离选项。} -除了 \opt{fnsep} 选项,其它是行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项\opt{linespread}失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为 +\changes{v1.23b}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。} +行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项\opt{linespread}失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为 \end{function} \begin{optdesc} @@ -184,7 +185,6 @@ \item[mathspread] 数学环境行距。 \item[capspread] 图表代码标题行距。 \item[fnspread] 脚注行距。 - \item[fnsep] 脚注与脚注线间的距离,需带有长度单位。 \end{optdesc} \subsection{其它字体} @@ -411,7 +411,7 @@ \subsection{习题} \begin{function}[added = 2021-01-05,updated = 2021-02-08]{exercise} - \begin{syntax} +\begin{syntax} \tn{begin}\marg{exercise}\oarg{颜色名}\oarg{编号}\oarg{标题} \tn{item} <习题内容> \tn{end}\marg{exercise} diff --git a/macros/latex/contrib/easybook/easybook.cls b/macros/latex/contrib/easybook/easybook.cls index d0d8ae2c1e..7f1d5d1255 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/08}{1.23a}{} +\ProvidesExplClass{easybook}{2021/02/09}{1.23b}{} \cs_generate_variant:Nn \keys_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} @@ -142,9 +142,9 @@ \RequirePackage { xcolor, - pdfpages,footmisc, - setspace,zhlineskip, - amsthm,thmtools,cases, + pdfpages, + footmisc,setspace, + amsmath,amsthm,thmtools,cases, chemformula,chemfig,siunitx,ulem, microtype, geometry,marginnote, @@ -688,22 +688,19 @@ \tl_new:N \l__math_spread_tl \tl_new:N \l__cap_spread_tl \tl_new:N \l__foot_spread_tl -\tl_new:N \l__foot_fnsep_tl \__ctex_define:nn {spread} { linespread .fp_set:N = \l__line_spread_fp, linespread .initial:n = 1.3, tabspread .fp_set:N = \l__tab_spread_fp, - tabspread .initial:n = 1, + tabspread .initial:n = 1.05, mathspread .tl_set:N = \l__math_spread_tl, - mathspread .initial:n = 1, + mathspread .initial:n = 1.05, capspread .tl_set:N = \l__cap_spread_tl, capspread .initial:n = 1, fnspread .tl_set:N = \l__foot_spread_tl, - fnspread .initial:n = 1, - fnsep .tl_set:N = \l__foot_fnsep_tl, - fnsep .initial:n = 0ex + fnspread .initial:n = 1 } \skip_set:Nn \parskip{0pt plus 2pt minus 1pt} @@ -877,8 +874,51 @@ } \allowdisplaybreaks[4] \cs_gset:Npn \ULthickness{.75pt} -\SetMathEnvironmentSinglespace{\l__math_spread_tl} \skip_set:Nn \jot{4pt plus 1pt minus 1pt} +\cs_new:Npn \l__math_restore:n #1 + { + \AtBeginEnvironment{#1} + {\linespread{\l__math_spread_tl}\selectfont\ignorespaces} + } +\l__math_restore:n {array} +\l__math_restore:n {matrix} +\l__math_restore:n {pmatrix} +\l__math_restore:n {bmatrix} +\l__math_restore:n {Bmatrix} +\l__math_restore:n {vmatrix} +\l__math_restore:n {Vmatrix} +\l__math_restore:n {cases} +\l__math_restore:n {aligned} +\l__math_restore:n {alignedat} +\l__math_restore:n {gathered} +\__patch_cmd:Nnn \start@gather + {\collect@body} + {\linespread{\l__math_spread_tl}\selectfont\collect@body} +\__patch_cmd:Nnn \start@align + {\collect@body} + {\linespread{\l__math_spread_tl}\selectfont\collect@body} +\__patch_cmd:Nnn \start@multline + {\collect@body} + {\linespread{\l__math_spread_tl}\selectfont\collect@body} +\__patch_cmd:Nnn \gather@split + {\spread@equation} + {\linespread{\l__math_spread_tl}\selectfont\spread@equation} +\l__math_restore:n {matrix*} +\l__math_restore:n {pmatrix*} +\l__math_restore:n {bmatrix*} +\l__math_restore:n {Bmatrix*} +\l__math_restore:n {vmatrix*} +\l__math_restore:n {Vmatrix*} +\l__math_restore:n {cases*} +\l__math_restore:n {dcases} +\l__math_restore:n {dcases*} +\l__math_restore:n {rcases} +\l__math_restore:n {rcases*} +\l__math_restore:n {drcases} +\l__math_restore:n {drcases*} +\l__math_restore:n {multlined} +\l__math_restore:n {lgathered} +\l__math_restore:n {rgathered} \ctex_after_end_preamble:n { \skip_set:Nn \abovedisplayskip{5pt plus 1pt minus 1pt} @@ -1097,7 +1137,11 @@ \ctex_at_end_preamble:n { \skip_set:Nn \footnotemargin{0.5\ccwd} - \skip_set:Nn \footnotesep{\l__foot_fnsep_tl} + \group_begin: + \footnotesize + \exp_args:Nx \linespread{\tl_use:N \l__foot_spread_tl}\selectfont + \skip_gset:Nn \footnotesep{\ht\strutbox} + \group_end: \cs_gset:Npn \hangfootparskip{0ex} \cs_gset:Npn \footnoterule { @@ -1120,10 +1164,10 @@ } } \__patch_cmd:Nnn \@footnotetext - {\def\baselinestretch{\ZhLS@footlinespread}\reset@font} + {\reset@font} {\def\baselinestretch{\l__foot_spread_tl}\l__foot_font_tl} \__patch_cmd:Nnn \@mpfootnotetext - {\def\baselinestretch{\ZhLS@footlinespread}\reset@font} + {\reset@font} {\def\baselinestretch{\l__foot_spread_tl}\l__foot_font_tl} \__patch_cmd:Nnn \@makefnmark {\normalfont}{\l__foot_font_tl} @@ -1249,7 +1293,7 @@ \clist_map_function:nN { {none, 000000,000000,000000}, - {seaside, 13abae,004986,a40000}, + {seaside, 1381b2,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 b784bc129e..130150509b 100644 --- a/macros/latex/contrib/hyperref/ChangeLog.txt +++ b/macros/latex/contrib/hyperref/ChangeLog.txt @@ -1,3 +1,11 @@ +2021-02-08 Ulrike Fischer/David Carlisle + * moved definitions for \G accent to an extra file + puenc-extra.def, which can be loaded manually + * moved the loading of puenc.def so that it can be suppressed + with pdflatex + * correct the hspace command in pdfstringdef, so that it + accepts some calc syntax. + 2021-02-07 Ulrike Fischer/David Carlisle * renamed the manual to hyperref-doc * moved the license of the documentation into the file diff --git a/macros/latex/contrib/hyperref/README.md b/macros/latex/contrib/hyperref/README.md index fb1c2ac9fd..6a76499935 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-07 v7.00h +Version 2021-02-08 v7.00i ## INTRODUCTION diff --git a/macros/latex/contrib/hyperref/doc/backref.pdf b/macros/latex/contrib/hyperref/doc/backref.pdf index f610fbc67d..185b68c3a7 100644 Binary files a/macros/latex/contrib/hyperref/doc/backref.pdf and b/macros/latex/contrib/hyperref/doc/backref.pdf differ diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.html b/macros/latex/contrib/hyperref/doc/hyperref-doc.html index 7b4ce3d361..7b919801b2 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-doc.html +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.html @@ -25,7 +25,7 @@ href="https://github.com/latex3/hyperref/issues" class="url" >https://github.com/latex3/hyperref/issues)
2021-02-07 v7.00h
+class="ec-lmr-12">2021-02-08 v7.00i

Contents

@@ -122,69 +122,71 @@ href="#x1-450005.25" id="QQ2-1-45">Default driver setting href="#x1-460005.26" id="QQ2-1-46">Backref entries
  5.27 \phantomsection +
  5.28 puenc encoding and puenc-extra.def
 6 Acrobat-specific behavior +href="#x1-490006" id="QQ2-1-49">Acrobat-specific behavior
 7 PDF and HTML forms +href="#x1-500007" id="QQ2-1-50">PDF and HTML forms
  7.1 Forms environment parameters +href="#x1-510007.1" id="QQ2-1-51">Forms environment parameters
  7.2 Forms optional parameters +href="#x1-520007.2" id="QQ2-1-52">Forms optional parameters
 8 Defining a new driver +href="#x1-530008" id="QQ2-1-53">Defining a new driver
 9 Special support for other packages +href="#x1-540009" id="QQ2-1-54">Special support for other packages
  9.1 Package Compatibility +href="#x1-550009.1" id="QQ2-1-55">Package Compatibility
 10 Limitations +href="#x1-9900010" id="QQ2-1-99">Limitations
  10.1 Wrapped/broken link support +href="#x1-10000010.1" id="QQ2-1-100">Wrapped/broken link support
  10.2 Links across pages +href="#x1-10100010.2" id="QQ2-1-101">Links across pages
  10.3 Footnotes +href="#x1-10200010.3" id="QQ2-1-102">Footnotes
 11 Hints +href="#x1-10300011" id="QQ2-1-103">Hints
  11.1 Spaces in option values +href="#x1-10400011.1" id="QQ2-1-104">Spaces in option values
  11.2 Index with makeindex +href="#x1-10500011.2" id="QQ2-1-105">Index with makeindex
  11.3 Warning Warning "bookmark level for unknown <foobar> defaults to 0"
  11.4 Link anchors in figures +href="#x1-10700011.4" id="QQ2-1-107">Link anchors in figures
  11.5 Additional unicode characters in bookmarks and pdf information entries: +href="#x1-10800011.5" id="QQ2-1-108">Additional unicode characters in bookmarks and pdf information entries:
  11.6 Footnotes +href="#x1-10900011.6" id="QQ2-1-109">Footnotes
  11.7 Subordinate counters +href="#x1-11000011.7" id="QQ2-1-110">Subordinate counters
 12 History and acknowledgments +href="#x1-11100012" id="QQ2-1-111">History and acknowledgments
 13 GNU Free Documentation License +href="#x1-11200013" id="QQ2-1-112">GNU Free Documentation License
  13.1 Applicability and definitions +href="#x1-11400013.1" id="QQ2-1-114">Applicability and definitions
  13.2 Verbatim copying +href="#x1-11500013.2" id="QQ2-1-115">Verbatim copying
  13.3 Copying in quantity +href="#x1-11600013.3" id="QQ2-1-116">Copying in quantity
  13.4 Modifications +href="#x1-11700013.4" id="QQ2-1-117">Modifications
  13.5 Combining documents +href="#x1-11800013.5" id="QQ2-1-118">Combining documents
  13.6 Collections of documents +href="#x1-11900013.6" id="QQ2-1-119">Collections of documents
  13.7 Aggregation with independent works +href="#x1-12000013.7" id="QQ2-1-120">Aggregation with independent works
  13.8 Translation +href="#x1-12100013.8" id="QQ2-1-121">Translation
  13.9 Termination +href="#x1-12200013.9" id="QQ2-1-122">Termination
  13.10 Future revisions of this license +href="#x1-12300013.10" id="QQ2-1-123">Future revisions of this license @@ -2138,7 +2140,7 @@ class="td01"> 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 47. pdfTeX works by supplying default values for XYZ (horizontal × vertical true

Unicode encoded pdf strings, starting with - version 2021-02-07 v7.00h set by default to - true for all engines. + version v7.00g set by default to true for all + engines. It will load a number of definitions in + puenc.def. It can be set to false for pdflatex, + but this is not recommended. URL}}. Depending on the driver \href also tries to detect the link type. Thus the result can be a url link, file link, … + +

URL}

Write URL in the same way as \url, without creating a hyperlink. - +class="ec-lmvtt-10">\url, without creating a hyperlink.

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

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

+

+

5.28 puenc encoding and puenc-extra.def

+

The unicode option loads for the bookmarks puenc.def which contains quite a lot definitions of +commands for the bookmarks. As unicode is now true for all engines, this file is now also loaded with +pdflatex. Some of the definitions in puenc.def clash with other uses. To reduce the impact hyperref uses +two strategies. +

    +
  • A number of command are only defined conditionally: The commands for the cyrillic block + if \CYRDZE is defined, greek if \textBeta is defined, and hebrew if \hebdalet is defined. +
  • +
  • Other commands are moved to an extra file puenc-extra.def which is not loaded + automatically, but can be loaded in the preamble if needed. Currently this file contains all + definitions for the accent \G.
+

6 Acrobat-specific behavior

-

If you want to access the menu options of Acrobat Reader or Exchange, the following macro is provided + id="x1-490006">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: -

+

}{text}
-

The

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

+ + class="td01">FileExport - - +

Properties

+ + - - + + - - +

About

@@ -5282,13 +5312,13 @@ class="td01"> class="td01">
File -

Open, +

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

-

ImportImage, +

ImportImage, ImportNotes, AcroForm:ImportFDF

-

ExportNotes, +

ExportNotes, AcroForm:ExportFDF

FileDocumentInfo -

GeneralInfo, +

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

FilePreferences -

GeneralPrefs, +

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

Edit -

Undo, +

Undo, Cut, Copy, Paste, @@ -5153,19 +5183,21 @@ class="td10"> style="vertical-align:baseline;" id="TBL-41-7-">

-

Properties

EditFields -

AcroForm:Duplicate, +

AcroForm:Duplicate, AcroForm:TabOrder

Document -

Cpt:CapturePages, +

Cpt:CapturePages, AcroForm:Actions, CropPages, RotatePages, @@ -5177,13 +5209,11 @@ class="td10"> SetBookmarkDest, CreateAllThumbs, DeleteAllThumbs

View -

ActualSize, +

ActualSize, FitVisible, FitWidth, FitPage, @@ -5207,7 +5237,7 @@ class="td10"> style="vertical-align:baseline;" id="TBL-41-11-">

Tools -

Hand, +

Hand, ZoomIn, ZoomOut, SelectText, @@ -5222,12 +5252,14 @@ class="td10"> FindAgain, FindNextNote, CreateNotesFile

ToolsSearch -

AcroSrch:Query, +

AcroSrch:Query, AcroSrch:Indexes, AcroSrch:Results, AcroSrch:Assist, @@ -5235,13 +5267,11 @@ class="td10"> AcroSrch:PrevHit, AcroSrch:NextHit, AcroSrch:NextDoc

Window -

ShowHideToolBar, +

ShowHideToolBar, ShowHideMenuBar, ShowHideClipboard, Cascade, @@ -5252,7 +5282,7 @@ class="td10"> style="vertical-align:baseline;" id="TBL-41-14-">

Help -

HelpUserGuide, +

HelpUserGuide, HelpTutorial, HelpExchange, HelpScan, @@ -5267,7 +5297,7 @@ class="td10"> style="vertical-align:baseline;" id="TBL-41-15-">

Help(Windows) -

About

-

+

7 PDF and HTML forms

-

You must put your fields inside a PDF and HTML forms +

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

There are six macros to prepare fields: -

+

There are six macros to prepare fields: +

]{label}
-

+

]{label}
-

+

+ +

}{choices}
-

+

]{label}
-

- - +

]{label}
-

+

]{label}
-

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

+

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

}{field}
-

+

}{field}
-

+

}{field}
-

These macros default to #1 #2 -

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

+

These macros default to #1 #2 +

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

}{height}
-

+

}{height}
-

+

}{height}
-

+

}{height}
-

+

+ +

\MakeButtonField{text}
-

These macros default to

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

You may also want to redefine the following macros: +

You may also want to redefine the following macros:

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

-

+

+

7.1 Forms environment parameters

+ id="x1-510007.1">Forms environment parameters
action encoding method @@ -5573,15 +5605,15 @@ class="td01">
URL -

The URL that will receive the form data if a

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

name -

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

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

name -

Used only when generating HTML; values can be

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

-

+

7.2 Forms optional parameters

-

Note that all colors must be expressed as RGB triples, in the range 0..1 (i.e. 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)

style="vertical-align:baseline;" id="TBL-57-63-">
-

+

8 Defining a new driver

-

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

1. Defining a new driver +

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

1. \hyper@anchor -

2.

2. \hyper@link -

3.

3. \hyper@linkfile -

4.

4. \hyper@linkurl -

5.

5. \hyper@anchorstart -

6.

6. \hyper@anchorend -

7.

7. \hyper@linkstart -

8.

8. \hyper@linkend -

The draft option defines the macros as follows +

The draft option defines the macros as follows

@@ -6068,11 +6100,11 @@ class="ec-lmvtt-10">\hyper@linkend
 \let\hyper@linkstart\@gobbletwo
 \let\hyper@linkend\@empty
 
-

-

+

+

9 Special support for other packages

-

Package Special support for other packages +

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

    @@ -6095,7 +6127,7 @@ class="ec-lmvtt-10">implicit=false for these packages to work.
  • Packages that do anything serious with the index.
-

The

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

+

9.1 Package Compatibility

-

Currently only package loading orders are available: -

Note: hyperref loads package 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
+ id="x1-560009.1.1">algorithm
@@ -6121,11 +6153,11 @@ package must be loaded earlier.
   \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 + id="x1-570009.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 @@ -6137,22 +6169,22 @@ gather:   \let\equation\gather   \let\endequation\endgather -

-

+

+

9.1.3 amsrefs
-

Package loading order: + id="x1-580009.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, + id="x1-590009.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: @@ -6161,16 +6193,16 @@ thus the resulting package order is then:   \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 + id="x1-600009.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 ‘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: + id="x1-620009.1.7">bibentry +

Workaround:

@@ -6200,16 +6232,16 @@ class="ec-lmvtt-10">\texorpdfstring{\...}{\dots} can be use
     \nobibliography{database}
   \endgroup
 
-

-

+

+

9.1.8 bigfoot
-

Hyperref does not support package ‘bigfoot’. And package ‘bigfoot’ does not support hyperref’s footnotes + id="x1-630009.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 chappg +

Package ‘chappg’ uses \@addtoreset that is redefined by ‘hyperref’. The package order is therefore: @@ -6218,11 +6250,11 @@ 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 + id="x1-650009.1.10">cite +

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

-

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

+

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

+

9.1.11 count1to
-

Package ‘count1to’ adds several count1to +

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

-

+

+

9.1.12 dblaccnt
-

pd1enc.def or puenc.def should be loaded before: + id="x1-670009.1.12">dblaccnt +

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

   \usepackage{hyperref}
   \usepackage{dblaccnt}
 
-

or see entry for

or see entry for vietnam. -

+

9.1.13 easyeqn
-

Not compatible, breaks. -

+ id="x1-680009.1.13">easyeqn +

Not compatible, breaks. +

9.1.14 ellipsis
-

This packages redefines ellipsis +

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

-

+

+

9.1.15 float
+ id="x1-700009.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. -

+ id="x1-710009.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 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 + id="x1-730009.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 + id="x1-740009.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: @@ -6357,36 +6389,36 @@ geometry to an earlier location:     ]{geometry}     \usepackage{hyperref} -

-

+

+

9.1.20 IEEEtran.cls
-

version IEEEtran.cls +

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

+

9.1.21 index
-

version index +

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

+

9.1.22 lastpage
-

Compatible. -

+ id="x1-770009.1.22">lastpage +

Compatible. +

9.1.23 linguex
+ id="x1-780009.1.23">linguex
  \usepackage{hyperref}
   \usepackage{linguex}
 
-

-

+

+

9.1.24 ltabptch
+ id="x1-790009.1.24">ltabptch
@@ -6394,54 +6426,54 @@ class="ec-lmvtt-10">\addcontentsline redefinition)
   \usepackage{ltabptch}
   \usepackage{hyperref}
 
-

-

+

+

9.1.25 mathenv
-

Unsupported. -

Both ‘mathenv’ and ‘hyperref’ messes around with environment ‘eqnarray’. You can load ‘mathenv’ + id="x1-800009.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. -

+ id="x1-810009.1.26">minitoc-hyper +

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

9.1.27 multind
+ id="x1-820009.1.27">multind
  \usepackage{multind}
   \usepackage{hyperref}
 
-

-

+

+

9.1.28 natbib
+ id="x1-830009.1.28">natbib
  \usepackage{natbib}
   \usepackage{hyperref}
 
-

-

+

+

9.1.29 nomencl
-

Example for introducing links for the page numbers: + id="x1-840009.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: + id="x1-850009.1.30">ntheorem-hyper +

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

For equations the following might work:

@@ -6451,22 +6483,22 @@ properly, for example.
     But the mapping from the equation number to the anchor name
     is not available in general.
 
-

-

+

+

9.1.31 parskip
+ id="x1-860009.1.31">parskip
  \usepackage{parskip}
   \usepackage{hyperref}[2012/08/20]
 
-

-

Both packages want to redefine

+

Both packages want to redefine \@starttoc. -

+

9.1.32 prettyref
+ id="x1-870009.1.32">prettyref
@@ -6489,20 +6521,20 @@ class="ec-lmvtt-10">\@starttoc.
 %%% example for prettyref %%%
       
 
-

-

+

+

9.1.33 setspace
+ id="x1-880009.1.33">setspace
  \usepackage{setspace}
   \usepackage{hyperref}
 
-

-

+

+

9.1.34 sidecap
+ id="x1-890009.1.34">sidecap
@@ -6511,10 +6543,10 @@ class="ec-lmvtt-10">\@starttoc.
     \usepackage{hyperref}
     \usepackage{sidecap}
 
-

-

+

+

9.1.35 subfigure
+ id="x1-900009.1.35">subfigure
@@ -6536,10 +6568,10 @@ class="ec-lmvtt-10">\@starttoc.
     \usepackage{subfigure}
     or vice versa?
 
-

-

+

+

9.1.36 titleref
+ id="x1-910009.1.36">titleref
@@ -6547,24 +6579,24 @@ class="ec-lmvtt-10">\@starttoc.
   \usepackage{titleref}% without usetoc
   \usepackage{hyperref}
 
-

-

+

+

9.1.37 tabularx
-

Linked footnotes are not supported inside environment ‘tabularx’, because they uses the optional + id="x1-920009.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
-

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 + id="x1-940009.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 @@ -6580,14 +6612,14 @@ class="ec-lmvtt-10">\PreloadUnicodePage to solve this:     \PrerenderUnicode{^^c3^^b6}% or \PrerenderUnicodePage{1}     \hypersetup{pdftitle={Umlaut example: ^^c3^^b6}} -

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

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

+

9.1.40 varioref
-

There are too many problems with varioref. Nobody has time to sort them out. Therefore this package is + id="x1-950009.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 +

Perhaps you are lucky and some of the features of varioref works with the following loading order: @@ -6596,10 +6628,10 @@ order:     \usepackage{varioref}     \usepackage{hyperref} -

-

Also some babel versions can be problematic. For example, 2005/05/21 v3.8g contains a patch for +

+

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

Also unsupported: +

Also 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): + id="x1-960009.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):

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

-

+

+

9.1.42 vietnam
+ id="x1-970009.1.42">vietnam
@@ -6668,20 +6700,20 @@ class="ec-lmvtt-10">\vpageref[]{...} On the same page a pre
   \usepackage{vietnam}
   \usepackage{hyperref}
 
-

-

+

+

9.1.43 XeTeX
-

Default for the encoding of bookmarks is 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 +

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

Failed to convert input string to UTF16... -

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

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

+

10 LimitationsLimitations5

+ id="x1-99001f5">

10.1 Wrapped/broken link support

-

Only few drivers support automatically wrapped/broken links, e.g. pdftex, dvipdfm, hypertex. Other + id="x1-10000010.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: +

Workarounds:

  • For long section or caption titles in the table of contents or list of figures/tables option breakurl. class="ec-lmss-10">breaklinks is intended for internal use. But it can be used to force link wrapping, e.g. when printing a document. However, when such a document is converted to PDF and viewed with a PDF viewer, the active link area will be misplaced. -

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

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

-

+

10.2 Links across pages

-

In general they have problems: + id="x1-10100010.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 (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 @@ -6752,14 +6784,14 @@ Thus the implementation of hyperref does not support the optional argument of \footnotemark and \footnotetext. -

+

11 HintsHints6

+ id="x1-103001f6">

11.1 Spaces in option values

-

Unhappily LaTeX strips spaces from options if they are given in 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 +

Package hyperref now gets

     pdfborder=001
 
-

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

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

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

Some options can also be given in

Some options can also be given in \hypersetup

     \hypersetup{pdfborder=0 0 1}
 
-

In

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

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

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

+

11.2 Index with makeindex

+ id="x1-10500011.2">Index with makeindex
  • Package hyperref adds \hyperpage commands by the encap mechanism (see documentation @@ -6827,7 +6859,7 @@ class="ec-lmvtt-10">\hyperpage command. With       ...       \index{Some example|main} -

    +

  • Scientic Word/Scientific WorkPlace users can use package robustindex with hyperindex=false.
  • @@ -6838,7 +6870,7 @@ class="ec-lmss-10">encap. Example for use of “?”:
                \usepackage[encap=?]{hyperref}
     
    -

    +

  • Another possibility is the insertion of \hyperpage by a style file for makeindex. For this case, @@ -6860,12 +6892,12 @@ class="ec-lmvtt-10">\hyperpage will be defined regardless o encap_suffix "}" %%% cut %%% hyperindex.ist %%% cut %%% -

-

+

+

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

-

Getting rid of it: +

Getting rid of it:

@@ -6873,32 +6905,32 @@ class="ec-lmvtt-10">"bookmark level for unknown <foobar> defaults
 \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 + id="x1-10700011.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:

+ id="x1-10800011.5">Additional unicode characters in bookmarks and pdf information entries:
 \documentclass[pdftex]{article}
 \usepackage[unicode]{hyperref}
 
-

-

Support for additional unicode characters: -

Example:

+

Support for additional unicode characters: +

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

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

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

2. Identify the characters (

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

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

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

-

3. Calculate the octal code: -

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

+

3. Calculate the octal code: +

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

-

4. Transform into a form understood by hyperref: -

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

+

4. Transform into a form understood by hyperref: +

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

-

Optional:

+

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

-

5. Declare the character with LaTeX: +

+

5. Declare the character with LaTeX:

@@ -6951,11 +6983,11 @@ class="ec-lmvtt-10">8 is used for abbreviations:
 \end{document}
       
 
-

-

+

+

11.6 Footnotes

-

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

The footnote support is rather limited. It is beyond the scope to use \footnotemark and \footnotetext out of order or reusing -

+

-

+

11.7 Subordinate counters

-

Some counters do not have unique values and require the value of other counters to be unique. For + id="x1-11000011.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 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 +

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

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

Solution a) +

Solution a)

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

Solution b) +

Solution b)

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

-

+

+

12 History and acknowledgments

-

The original authors of History and acknowledgments +

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

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

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

Berthold Horn provided help, encouragement and sponsorship for the

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

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

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

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

Especial extra thanks to David Carlisle for the

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

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

13 GNU Free Documentation License

-

Version 1.2, November 2002 -

Copyright 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 + id="x1-11300013">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 +

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

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

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

+

13.1 Applicability and definitions

-

This License applies to any manual or other work, in any medium, that contains a notice placed by + id="x1-11400013.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 +

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+

13.2 Verbatim copying

-

You may copy and distribute the Document in any medium, either commercially or noncommercially, + id="x1-11500013.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 +href="#x1-11600013.3">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, + id="x1-11600013.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 @@ -7223,10 +7255,10 @@ words of the title equally prominent and visible. You may add other material on addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -

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

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

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

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

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

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

+

13.4 Modifications

-

You may copy and distribute a Modified Version of the Document under the conditions of sections 13.2 + id="x1-11700013.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 +href="#x1-11600013.3">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, + class="enumerate" id="x1-117002x1">Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
  2. List on the Title Page, as authors, one or more persons or entities responsible for authorship + class="enumerate" id="x1-117004x2">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.
  3. State on the Title page the name of the publisher of the Modified Version, as the publisher. + class="enumerate" id="x1-117006x3">State on the Title page the name of the publisher of the Modified Version, as the publisher.
  4. Preserve all the copyright notices of the Document. + class="enumerate" id="x1-117008x4">Preserve all the copyright notices of the Document.
  5. Add an appropriate copyright notice for your modifications adjacent to the other copyright + class="enumerate" id="x1-117010x5">Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
  6. Include, immediately after the copyright notices, a license notice giving the public permission + class="enumerate" id="x1-117012x6">Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
  7. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts + class="enumerate" id="x1-117014x7">Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document’s license notice.
  8. Include an unaltered copy of this License. + class="enumerate" id="x1-117016x8">Include an unaltered copy of this License.
  9. Preserve the section Entitled “History”, Preserve its Title, and add to it an item stating at + class="enumerate" id="x1-117018x9">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.
  10. Preserve the network location, if any, given in the Document for public access to a + class="enumerate" id="x1-117020x10">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.
  11. For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the + class="enumerate" id="x1-117022x11">For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
  12. Preserve all the Invariant Sections of the Document, unaltered in their text and in their + class="enumerate" id="x1-117024x12">Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
  13. Delete any section Entitled “Endorsements”. Such a section may not be included in the + class="enumerate" id="x1-117026x13">Delete any section Entitled “Endorsements”. Such a section may not be included in the Modified Version.
  14. Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with + class="enumerate" id="x1-117028x14">Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with any Invariant Section.
  15. Preserve any Warranty Disclaimers. + class="enumerate" id="x1-117030x15">Preserve any Warranty Disclaimers.
-

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

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

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

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

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

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

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

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

+

13.5 Combining documents

-

You may combine the Document with other documents released under this License, under the terms + id="x1-11800013.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 +href="#x1-11700013.4">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 +

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

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

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

+

13.6 Collections of documents

-

You may make a collection consisting of the Document and other documents released under this License, + id="x1-11900013.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 +

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 + id="x1-12000013.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 +

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 + id="x1-12100013.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 +href="#x1-11700013.4">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, @@ -7398,26 +7430,26 @@ provided that you also include the original English version of this License and versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. -

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

If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the requirement (section 13.4) to Preserve its Title (section 13.1) will typically require changing the actual +href="#x1-11700013.4">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 + id="x1-12200013.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 + id="x1-12300013.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 +

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 @@ -7425,26 +7457,26 @@ number of this License, you may choose any version ever published (not as a draf 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 + id="x1-12400013.10">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

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

-

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

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

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

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

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

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

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

If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf b/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf index d25eb36501..846efed006 100644 Binary files a/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf and b/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf differ diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.tex b/macros/latex/contrib/hyperref/doc/hyperref-doc.tex index f1e1895645..1fe069afbf 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-doc.tex +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.tex @@ -177,7 +177,7 @@ } \makeatother \title{Hypertext marks in \hologo{LaTeX}: a manual for \xpackage{hyperref}} -\date{2021-02-07 v7.00h} +\date{2021-02-08 v7.00i} \begin{document} @@ -559,7 +559,7 @@ plainpages & boolean & false & Forces page anchors to be named by the Arabic raiselinks & boolean & true & In the hypertex driver, the height of links is normally calculated by the driver as simply the base line of contained text; this options forces \verb|\special| commands to reflect the real height of the link (which could contain a graphic) \\ -breaklinks & boolean & both & This option is in hyperref only used in the dviwindo driver, in all other cases it doesn't do anything sensible---it neither allows nor prevents links to be broken. The ocgx2 package +breaklinks & boolean & both & This option is in 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 @@ -1016,7 +1016,7 @@ 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. \\ +unicode & \textit{true} & Unicode encoded pdf strings, starting with version v7.00g set by default to true for all engines. It will load a number of definitions in puenc.def. It can be set to false for pdflatex, but this is not recommended.\\ urlbordercolor & \textit{0 1 1} & color of border around URL links \\ urlcolor & \textit{magenta} & color of URL links \\ verbose & \textit{false} & be chatty \\ @@ -2219,6 +2219,24 @@ 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. +\subsection{puenc encoding and puenc-extra.def} + +The \texttt{unicode} option loads for the bookmarks \texttt{puenc.def} which contains +quite a lot definitions of commands for the bookmarks. +As \texttt{unicode} is now true for all engines, this file is now also loaded +with pdflatex. Some of the definitions in \texttt{puenc.def} clash with other uses. +To reduce the impact \xpackage{hyperref} uses two strategies. + +\begin{itemize} +\item A number of command are only defined conditionally: +The commands for the cyrillic block if \cs{CYRDZE} is defined, +greek if \cs{textBeta} is defined, and hebrew if \cs{hebdalet} is defined. + +\item Other commands are moved to an extra file \texttt{puenc-extra.def} +which is not loaded automatically, but can be loaded in the preamble if needed. +Currently this file contains all definitions for the accent \cs{G}. +\end{itemize} + \section{Acrobat-specific behavior} diff --git a/macros/latex/contrib/hyperref/doc/hyperref.pdf b/macros/latex/contrib/hyperref/doc/hyperref.pdf index fd5f236b7c..5d20fbfe3d 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 new file mode 100644 index 0000000000..ea1c3e45c1 --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/manual.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/manual.html b/macros/latex/contrib/hyperref/doc/manual.html new file mode 100644 index 0000000000..e743ee9640 --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/manual.html @@ -0,0 +1,7468 @@ + + +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/manual2.html b/macros/latex/contrib/hyperref/doc/manual2.html new file mode 100644 index 0000000000..71af561e04 --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/manual2.html @@ -0,0 +1,20 @@ + + + + + + + + + + +

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

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 new file mode 100644 index 0000000000..70dae2e346 --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/manual4.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/manual5.html b/macros/latex/contrib/hyperref/doc/manual5.html new file mode 100644 index 0000000000..01434811f6 --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/manual5.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/manual6.html b/macros/latex/contrib/hyperref/doc/manual6.html new file mode 100644 index 0000000000..eba4717509 --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/manual6.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/manual7.html b/macros/latex/contrib/hyperref/doc/manual7.html new file mode 100644 index 0000000000..17b42e0aef --- /dev/null +++ b/macros/latex/contrib/hyperref/doc/manual7.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/nameref.pdf b/macros/latex/contrib/hyperref/doc/nameref.pdf index 73a288882e..51ab4821f0 100644 Binary files a/macros/latex/contrib/hyperref/doc/nameref.pdf and b/macros/latex/contrib/hyperref/doc/nameref.pdf differ diff --git a/macros/latex/contrib/hyperref/hluatex.dtx b/macros/latex/contrib/hyperref/hluatex.dtx index 91f9abc006..021fb802d9 100644 --- a/macros/latex/contrib/hyperref/hluatex.dtx +++ b/macros/latex/contrib/hyperref/hluatex.dtx @@ -1,6 +1,6 @@ % \iffalse % Source File: hluatex.dtx -% 2021-02-07 v7.00h +% 2021-02-08 v7.00i % % Copyright % 2016-2019 Oberdiek Package Support Group @@ -31,7 +31,7 @@ % % \begin{macrocode} %<*luatex> -%% 2021-02-07 v7.00h +%% 2021-02-08 v7.00i %% 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 5ab411463a..f0deae0fbd 100644 --- a/macros/latex/contrib/hyperref/hyperref.dtx +++ b/macros/latex/contrib/hyperref/hyperref.dtx @@ -47,11 +47,12 @@ %\ProvidesFile{htex4ht.cfg} %\ProvidesFile{pd1enc.def} %\ProvidesFile{puenc.def} +%\ProvidesFile{puencextra.def} %\ProvidesFile{puvnenc.def} %\ProvidesFile{puarenc.def} %\ProvidesFile{psdextra.def} %\ProvidesFile{hyperref-langpatches.def} -% [2021-02-07 v7.00h % +% [2021-02-08 v7.00i % % Hypertext links for LaTeX] % Dummy hyperref (SR)] % Hyperref documentation driver file] @@ -87,6 +88,7 @@ % Hyperref configuration file for TeX4ht] % Hyperref: PDFDocEncoding definition (HO)] % Hyperref: PDF Unicode definition (HO)] +% Hyperref: PDF Unicode extra definition (HO)] % Hyperref: Additions to puenc.def for VnTeX] % Hyperref: Additions to puenc.def for Arabi] % Hyperref: Additions to PDF string support] @@ -1229,15 +1231,17 @@ % Because the box shifting % used in the \TeX{} logo does not work while writing to a file, % the standard \TeX{} logos are redefined. +% We use the direct PU code to avoid problems if +% \cs{textepsilon} is not defined. % \begin{macrocode} \def\TeX{TeX}% \def\LaTeX{La\TeX}% \def\LaTeXe{% \LaTeX2% - \ifHy@unicode\textepsilon\else e\fi + \ifHy@unicode\83\265\else e\fi }% \def\eTeX{% - \ifHy@unicode\textepsilon\else e\fi + \ifHy@unicode\83\265\else e\fi -\TeX% }% \def\SliTeX{Sli\TeX}% @@ -2811,7 +2815,7 @@ % \cs{HyPsd@hyspacetest} replaces the \cs{hspace} by a space, if % the length is greater than zero. % \begin{macrocode} -\def\HyPsd@hspacetest#1{\ifdim#1>\z@\space\fi} +\def\HyPsd@hspacetest#1{\ifdim\dimexpr#1\relax>\z@\space\fi} % \end{macrocode} % \end{macro} % @@ -4886,7 +4890,6 @@ % change 2020-08-14, use unicode by default: % \begin{macrocode} \let\HyPsd@pdfencoding\HyPsd@pdfencoding@unicode -\HyPsd@LoadUnicode \def\HyPsd@LoadStringEnc{% \RequirePackage{stringenc}[2009/12/15]% \let\HyPsd@LoadStringEnc\relax @@ -6818,6 +6821,12 @@ % \end{macrocode} % % After processing options. +% \subsection{Load unicode support} +% \begin{macrocode} +\ifHy@unicode + \HyPsd@LoadUnicode +\fi +% \end{macrocode} % % \subsection{Package xspace support} % @@ -20964,8 +20973,10 @@ \DeclareTextCommand{\H}{PU}[1]{#1\83\013}% U+030B % U+030C COMBINING CARON; caroncmb \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 +%\DeclareTextCommand{\G}{PU}[1]{#1\83\017}% U+030F +%<*puenc> \ifx\CYRDZE\@undefined \else \DeclareTextCommand{\C}{PU}[1]{#1\83\017}% U+030F \fi @@ -21016,7 +21027,9 @@ \DeclareTextCompositeCommand{\.}{PU}{\@empty}{\textdotaccent}% \DeclareTextCompositeCommand{\c}{PU}{\@empty}{\textcedilla}% \DeclareTextCompositeCommand{\u}{PU}{\@empty}{\textasciibreve}% -\DeclareTextCompositeCommand{\G}{PU}{\@empty}{\textdoublegrave}% +% +%\DeclareTextCompositeCommand{\G}{PU}{\@empty}{\textdoublegrave}% +%<*puenc> \DeclareTextCompositeCommand{\=}{PU}{\@empty}{\textasciimacron}% \DeclareTextCompositeCommand{\H}{PU}{\@empty}{\texthungarumlaut}% \DeclareTextCompositeCommand{\k}{PU}{\@empty}{\textogonek}% @@ -21045,7 +21058,9 @@ \DeclareTextCompositeCommand{\.}{PU}{\ }{\textdotaccent}% \DeclareTextCompositeCommand{\c}{PU}{\ }{\textcedilla}% \DeclareTextCompositeCommand{\u}{PU}{\ }{\textasciibreve}% -\DeclareTextCompositeCommand{\G}{PU}{\ }{\textdoublegrave}% +% +%\DeclareTextCompositeCommand{\G}{PU}{\ }{\textdoublegrave}% +%<*puenc> \DeclareTextCompositeCommand{\=}{PU}{\ }{\textasciimacron}% \DeclareTextCompositeCommand{\H}{PU}{\ }{\texthungarumlaut}% \DeclareTextCompositeCommand{\k}{PU}{\ }{\textogonek}% @@ -21841,6 +21856,8 @@ % U+01FF LATIN SMALL LETTER O WITH STROKE AND ACUTE; % *oslashacute, ostrokeacute \DeclareTextCompositeCommand{\'}{PU}{\o}{\81\377}% U+01FF +% +%<*puextra> % U+0200 LATIN CAPITAL LETTER A WITH DOUBLE GRAVE; Adblgrave \DeclareTextCompositeCommand{\G}{PU}{A}{\82\000}% U+0200 % U+0201 LATIN SMALL LETTER A WITH DOUBLE GRAVE; adblgrave @@ -21849,28 +21866,40 @@ \DeclareTextCompositeCommand{\G}{PU}{E}{\82\004}% U+0204 % U+0205 LATIN SMALL LETTER E WITH DOUBLE GRAVE; edblgrave \DeclareTextCompositeCommand{\G}{PU}{e}{\82\005}% U+0205 +% +%<*puenc> % U+0206 LATIN CAPITAL LETTER E WITH INVERTED BREVE; Einvertedbreve \DeclareTextCompositeCommand{\textinvbreve}{PU}{E}{\82\006}% U+0206 % U+0207 LATIN SMALL LETTER E WITH INVERTED BREVE; einvertedbreve \DeclareTextCompositeCommand{\textinvbreve}{PU}{e}{\82\007}% U+0207 +% +%<*puextra> % U+0208 LATIN CAPITAL LETTER I WITH DOUBLE GRAVE; Idblgrave \DeclareTextCompositeCommand{\G}{PU}{I}{\82\010}% U+0208 % U+0209 LATIN SMALL LETTER I WITH DOUBLE GRAVE; idblgrave \DeclareTextCompositeCommand{\G}{PU}{\i}{\82\011}% U+0209 \DeclareTextCompositeCommand{\G}{PU}{i}{\82\011}% U+0209 +% +%<*puenc> % U+020A LATIN CAPITAL LETTER I WITH INVERTED BREVE; Iinvertedbreve \DeclareTextCompositeCommand{\textinvbreve}{PU}{I}{\82\012}% U+020A % U+020B LATIN SMALL LETTER I WITH INVERTED BREVE; iinvertedbreve \DeclareTextCompositeCommand{\textinvbreve}{PU}{i}{\82\013}% U+020B \DeclareTextCompositeCommand{\textinvbreve}{PU}{\i}{\82\013}% U+020B +% +%<*puextra> % U+020C LATIN CAPITAL LETTER O WITH DOUBLE GRAVE; Odblgrave \DeclareTextCompositeCommand{\G}{PU}{O}{\82\014}% U+020C % U+020D LATIN SMALL LETTER O WITH DOUBLE GRAVE; odblgrave \DeclareTextCompositeCommand{\G}{PU}{o}{\82\015}% U+020D +% +%<*puenc> % U+020E LATIN CAPITAL LETTER O WITH INVERTED BREVE; Oinvertedbreve \DeclareTextCompositeCommand{\textinvbreve}{PU}{O}{\82\016}% U+020E % U+020F LATIN SMALL LETTER O WITH INVERTED BREVE; oinvertedbreve \DeclareTextCompositeCommand{\textinvbreve}{PU}{o}{\82\017}% U+020F +% +%<*puextra> % U+0210 LATIN CAPITAL LETTER R WITH DOUBLE GRAVE; Rdblgrave \DeclareTextCompositeCommand{\G}{PU}{R}{\82\020}% U+0210 % U+0211 LATIN SMALL LETTER R WITH DOUBLE GRAVE; rdblgrave @@ -21879,6 +21908,8 @@ \DeclareTextCompositeCommand{\G}{PU}{U}{\82\024}% U+0214 % U+0215 LATIN SMALL LETTER U WITH DOUBLE GRAVE; udblgrave \DeclareTextCompositeCommand{\G}{PU}{u}{\82\025}% U+0215 +% +%<*puenc> % U+0216 LATIN CAPITAL LETTER U WITH INVERTED BREVE; Uinvertedbreve \DeclareTextCompositeCommand{\textinvbreve}{PU}{U}{\82\026}% U+0216 % U+0217 LATIN SMALL LETTER U WITH INVERTED BREVE; uinvertedbreve diff --git a/macros/latex/contrib/hyperref/hyperref.ins b/macros/latex/contrib/hyperref/hyperref.ins index 43b531fba5..46aff3f9c3 100644 --- a/macros/latex/contrib/hyperref/hyperref.ins +++ b/macros/latex/contrib/hyperref/hyperref.ins @@ -83,6 +83,7 @@ \file{hxetex.def}{\from{hyperref.dtx}{xetex,pdfform,outlines}} \file{pd1enc.def}{\from{hyperref.dtx}{pd1enc}} \file{puenc.def}{\from{hyperref.dtx}{puenc}} + \file{puenc-extra.def}{\from{hyperref.dtx}{puextra}} \file{puvnenc.def}{\from{hyperref.dtx}{puvnenc}} \file{puarenc.def}{\from{hyperref.dtx}{puarenc}} \file{psdextra.def}{\from{hyperref.dtx}{psdextra}} diff --git a/macros/latex/contrib/hyperref/manifest.txt b/macros/latex/contrib/hyperref/manifest.txt index 3998d8c1d3..14c5d68c97 100644 --- a/macros/latex/contrib/hyperref/manifest.txt +++ b/macros/latex/contrib/hyperref/manifest.txt @@ -66,6 +66,7 @@ hxetex.def Hyperref drivers. pd1enc.def puenc.def +puenc-extra.def puvnenc.def puarenc.def psdextra.def @@ -83,4 +84,3 @@ paper.pdf at EuroTeX'99. slides.pdf Slides for Heiko Oberdiek's talk at EuroTeX'99. - diff --git a/macros/latex/contrib/hyperref/xr-hyper.sty b/macros/latex/contrib/hyperref/xr-hyper.sty index a18ca9dc41..b0578b0b5b 100644 --- a/macros/latex/contrib/hyperref/xr-hyper.sty +++ b/macros/latex/contrib/hyperref/xr-hyper.sty @@ -61,7 +61,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{xr-hyper} - [2021-02-07 v7.00h eXternal References (DPC)] + [2021-02-08 v7.00i eXternal References (DPC)] \def\externaldocument{\@testopt\XR@cite{}} \let\externalcitedocument\externaldocument diff --git a/macros/luatex/optex/README b/macros/luatex/optex/README index 50d4f1d165..6c5ae30b5a 100644 --- a/macros/luatex/optex/README +++ b/macros/luatex/optex/README @@ -19,7 +19,14 @@ doc/ ... PDF version of the OpTeX documentation and sources. History: -<0.19> Jan. 2020 +<1.00> Feb. 2021 + The OMLS (OpTeX Markup Language Standard) was developed. It helps to create + convertors from/to OpTeX documents and similar applications. + \pdfunidef re-imeplemted. + \thisoutline introduced. + \verbchar introduced instead \activettchar. + Bugs fixing. +<0.19> Jan. 2021 emoji support as pkg/emoji.opm. non-braakable places generated by luavlna, suported as pkg/vlna.opm. \begblock...\endblock introduced. diff --git a/macros/luatex/optex/base/basic-macros.opm b/macros/luatex/optex/base/basic-macros.opm index 3f0f7a5c24..4d465c3010 100644 --- a/macros/luatex/optex/base/basic-macros.opm +++ b/macros/luatex/optex/base/basic-macros.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \sdef {Basic macros for OpTeX <2021-01-08>} % loaded in format +\_codedecl \sdef {Basic macros for OpTeX <2021-02-03>} % loaded in format \_doc ------------------------------ \`\bgroup`, \`\egroup`, \`\empty`, \`\space`, \`\null` and \`\wlog` @@ -12,31 +12,31 @@ \_def \_space { } \_def \_null {\_hbox{}} \_def \_wlog {\_immediate\_write-1 } % write on log file (only) - \_public \bgroup \egroup \empty \space \null \wlog ; \_doc ------------------------------ - \`\ignoreit` ignores next token or `{}`, \`\ignoresecond` - uses first, ignores second parameter and \`\usesecond` - ignores first, uses second parameter. + \`\ignoreit` ignores next token or `{}`, + \`\useit``{}` expands to `` (removes outer braces), + \`\ignoresecond` uses first, ignores second parameter and + \`\usesecond` ignores first, uses second parameter. \_cod ------------------------------ \_long\_def \_ignoreit #1{} +\_long\_def \_useit #1{#1} \_long\_def \_ignoresecond #1#2{#1} \_long\_def \_usesecond #1#2{#2} - -\_public \ignoreit \ignoresecond \usesecond ; +\_public \ignoreit \useit \ignoresecond \usesecond ; \_doc ------------------------------ \`\bslash` is \"normal backslash" with category code 12. - \`\nbb` and \`\pcent` are double backslash and normal~`%`, - they should be used in Lua codes, for example. + \`\nbb` is double backslash + and \`\pcent` is normal~`%`. + They can be used in Lua codes, for example. \_cod ------------------------------ \_edef \_bslash {\_csstring\\} \_edef \_nbb {\_bslash\_bslash} \_edef \_pcent{\_csstring\%} - \_public \bslash \nbb \pcent ; \_doc ------------------------------ @@ -52,13 +52,12 @@ \_def \_sdef #1{\_ea\_def \_csname#1\_endcsname} \_def \_sxdef #1{\_ea\_xdef \_csname#1\_endcsname} \_def \_slet #1#2{\_ea\_let \_csname#1\_ea\_endcsname \_csname#2\_endcsname} - \_public \sdef \sxdef \slet ; \_doc ------------------------------ \`\adef` `{}{}` puts the as active character and defines it as `{}`. You can declare a macro with parameters too. For example - `\adef @#1{...$1...}`. + `\adef @#1{...#1...}`. \_cod ------------------------------ \_def \_adef #1{\_catcode`#1=13 \_begingroup \_lccode`\~=`#1\_lowercase{\_endgroup\_def~}} @@ -73,7 +72,7 @@ \_cod ------------------------------ \_def \_cs #1{\_csname#1\_endcsname} -\_def \_trycs#1#2{\_ifcsname #1\_endcsname \_csname #1\_endcsname \_else #2\_fi} +\_def \_trycs#1#2{\_ifcsname #1\_endcsname \_csname #1\_ea\_endcsname \_else #2\_fi} \_public \cs \trycs ; \_doc ------------------------------ @@ -83,6 +82,15 @@ \_long\_def \_addto #1#2{\_ea\_def\_ea#1\_ea{#1#2}} \_public \addto ; + \_doc ----------------------------- + \`\incr``` increases `` by one globally. + \`\decr``` decreases `` by one globally. + \_cod ----------------------------- + +\_def\_incr #1{\_global\_advance#1by1 } +\_def\_decr #1{\_global\_advance#1by-1 } +\_public \incr \decr ; + \_doc ------------------------------ \`\opwarning` `{}` prints warning on the terminal and to the log file. \_cod ------------------------------ @@ -101,7 +109,6 @@ \_tracingparagraphs=1 \_tracingrestores=1 \_tracingscantokens=1 \_tracingifs=1 \_tracinggroups=1 \_tracingassigns=1 } \_def\_tracingall{\_tracingonline=1 \_loggingall} - \_public \loggingall \tracingall ; \_doc ------------------------------ @@ -116,6 +123,8 @@ \_endcode % ------------------------------------- +2021-02-03: \useit defined. +2021-01-22: \trycs: \ea added in order to be able to use cs with parameters 2021-01-08: \opwarning format changed (secondly, hope that conclusively) 2020-10-12: \opwarning: line numbers added 2020-02-14: introduced diff --git a/macros/luatex/optex/base/cite-bib.opm b/macros/luatex/optex/base/cite-bib.opm index 6327877fbe..26a5b17bd4 100644 --- a/macros/luatex/optex/base/cite-bib.opm +++ b/macros/luatex/optex/base/cite-bib.opm @@ -173,7 +173,7 @@ \_def\_nonumcitations{\_lastcitenum=0\_def\_sortcitesA{}\_def\_etalchar##1{$^{##1}$}% \_def\_citelinkA##1{\_isdefined{_bim:##1}\_iftrue \_csname _bim:##1\_endcsname - \_else ##1\_opwarning{\_noexpand\nonumcitations + empty bibmark. Maybe bad bib-style}\_fi} + \_else ##1\_opwarning{\_noexpand\nonumcitations + empty bibmark. Maybe bad bib-style}\_fi}% } \_def\_citelinkA{} diff --git a/macros/luatex/optex/base/doc.opm b/macros/luatex/optex/base/doc.opm index 9c979e9849..ce571a9e81 100644 --- a/macros/luatex/optex/base/doc.opm +++ b/macros/luatex/optex/base/doc.opm @@ -193,7 +193,7 @@ then use \code{\\_forwardlink\\`\\foo`}. \_cod ----------------------------- -\_activettchar` +\_verbchar` \_def\`#1`{\_leavevmode\_edef\_tmp{\_csstring#1}\_iindex{\_tmp}% \_ifcsname cs:\_tmp\_endcsname\_else \_dest[cs:\_tmp]\_fi diff --git a/macros/luatex/optex/base/fonts-select.opm b/macros/luatex/optex/base/fonts-select.opm index 69cf8909bc..9066d4fed5 100644 --- a/macros/luatex/optex/base/fonts-select.opm +++ b/macros/luatex/optex/base/fonts-select.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \fontfam {Fonts selection system <2020-12-12>} % preloaded in format +\_codedecl \fontfam {Fonts selection system <2020-01-27>} % preloaded in format \_doc ----------------------------- \`\initunifonts` macro extends \LuaTeX's font capabalities, @@ -19,10 +19,7 @@ \_def\_initunifonts {% \directlua{% require('luaotfload-main') - print_bak = print - print = function () end luaotfload.main() - print = print_bak % "print hack" until luaotfload will be corrected }% \_gdef\_rfskipatX ##1" ##2\_relax{"##1"}% \_global\_let \_doresizefont=\_doresizeunifont @@ -837,6 +834,7 @@ Luaotfload documentation for more information. \endinput +2021-01-27 lua hack (print function) removed because luaotfload 3.17 removes bug. 2020-12-12 \_modlist added, doc improved 2020-04-18 \_tryloadfamslocal introduced \_fontdecl -> \_famdecl with different concept diff --git a/macros/luatex/optex/base/hyperlinks.opm b/macros/luatex/optex/base/hyperlinks.opm index 6e123596c2..5fc8a32233 100644 --- a/macros/luatex/optex/base/hyperlinks.opm +++ b/macros/luatex/optex/base/hyperlinks.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \ulink {Hyperlinks <2020-04-22>} % preloaded in format +\_codedecl \ulink {Hyperlinks <2021-01-27>} % preloaded in format \_doc ---------------------------- \`\dest``[:]` creates a destination of internal links. The @@ -88,7 +88,7 @@ \_let\_dest=\_destactive \_let\_link=\_linkactive \_def\_ilink[##1]##2{\_link[##1]{\_localcolor#1}{##2}}% \_def\_ulink[##1]##2{\_urlactive[url:##1]{\_localcolor#2}{##2}}% - \_public \dest \ilink \ulink ;% + \_public \dest \ilink \ulink \link ;% } \_public \hyperlinks ; @@ -152,5 +152,6 @@ of internal links are created at the same destination place: \_endinput +2021-01-27 \public \link added to \hyperlinks, bug fixed. 2020-04-22 \| in \url: bug fixed 2020-03-15 introduced \ No newline at end of file diff --git a/macros/luatex/optex/base/if-macros.opm b/macros/luatex/optex/base/if-macros.opm index 0e7e401558..462e496017 100644 --- a/macros/luatex/optex/base/if-macros.opm +++ b/macros/luatex/optex/base/if-macros.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \newif {Special if-macros, is-macros and loops <2020-05-22>} % preloaded in format +\_codedecl \newif {Special if-macros, is-macros and loops <2021-02-03>} % preloaded in format \_doc ---------------------------- \secc Classical \code{\\newif} @@ -55,7 +55,7 @@ \_cod ---------------------------- \_long\_def \_loop #1\_repeat{\_def\_body{#1}\_iterate} -\_def \loop #1\repeat{\_def\_body{#1}\_iterate} +\_long\_def \loop #1\repeat{\_def\_body{#1}\_iterate} \_let \_repeat=\_fi % this makes \loop...\if...\repeat skippable \_let \repeat=\_fi \_def \_iterate {\_body \_ea \_iterate \_fi} @@ -93,7 +93,7 @@ \_def\_testparam#1#2#3\_iftrue{\_ifx###1\_empty\_ea\_finbody\_else} \_def\_finbody#1\_finbody{} -\_def\foreach #1\do#2#{\_isempty{#2}\_iftrue +\_long\_def\foreach #1\do#2#{\_isempty{#2}\_iftrue \_afterfi{\_foreachA{#1}{##1}}\_else\_afterfi{\_foreachA{#1}{#2}}\_fi} \_doc ----------------------------- @@ -147,15 +147,18 @@ \_sxdef{_frnum:\_the\_forlevel\_ea}{\_the\_frnum}% \_global\_slet{_fbody:\_the\_forlevel}{_fbody}% \_fi - \_global\_advance\_forlevel by1 + \_incr\_forlevel }} \_def\_getforstack{\_immediateassigned{% - \_global\_advance\_forlevel by-1 + \_decr\_forlevel \_ifnum\_forlevel>0 \_global\_slet{_fbody}{_fbody:\_the\_forlevel}% \_global\_frnum=\_cs{_frnum:\_the\_forlevel}\_space \_fi }} +\_ifx\_immediateassignment\_undefined % for compatibility with older LuaTeX + \_let\_immediateassigned=\_useit \_let\_immediateassignment=\_empty +\_fi \_doc ---------------------------- User can define own expandable \"foreach" macro by @@ -301,6 +304,7 @@ \_endcode +2021-02-03 public version of \loop and \foreach are \long 2020-05-22 \foreach, \fornum: all settings are global, independent on TeX group 2020-05-06 \isnextchar: \let\tmp=#1 -> \let\tmp= #1 (bug fix, #1 should be space) 2020-05-02 \newif bug fix diff --git a/macros/luatex/optex/base/languages.opm b/macros/luatex/optex/base/languages.opm index 52b52f775e..ff9373b720 100644 --- a/macros/luatex/optex/base/languages.opm +++ b/macros/luatex/optex/base/languages.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \_mtext {Languages <2020-12-05>} % preloaded in format +\_codedecl \_mtext {Languages <2021-01-21>} % preloaded in format \_doc ----------------------------- Only four words are generated by \OpTeX/ macros: \"Chapter", @@ -110,17 +110,20 @@ itself by \code{\\"{`"`}"}. This is the reason why the sub-verbatim mode is used when the first character is \code{\{} in the parameter.\nl The `\"` is defined as `\_qqA\_qqB` and `\'` as `\_qqA\_qqC`. - The \`\_qqA``\_qqB` runs \`\_qqB``"`. + The \`\_qqA``\_qqB` runs \`\_qqB``"`.\nl + The \`\_regquotes``\""` does `\def\"#1"{#1}` for outlines but the `"` + separator is active (because `"` and `'` are active in \^`\pdfunidef`). \_cod ----------------------------- \_def \_quoteschars #1#2#3#4{\_def\_altquotes{\_quoteschars#3#4#1#2}\_public\altquotes;% \_protected\_def \"{\_qqA\_qqB#1#2}\_protected\_def \'{\_qqA\_qqC#3#4}% - \_regmacro{}{}{\_def \"##1"{#1##1#2}\_def \'##1'{#3##1#4}}} + \_regmacro{}{}{\_regquotes\""#1#2\_regquotes\''#3#4}} \_def\_qqA#1#2#3{\_bgroup\_setverb \_catcode`\ =10 \_isnextchar\_bgroup{\_catcode`\{=1 \_catcode`\}=2 #1#2#3}{#1#2#3}} \_long\_def\_qqB#1#2#3"{\_egroup#1\_scantextokens{#3}#2} \_long\_def\_qqC#1#2#3'{\_egroup#1\_scantextokens{#3}#2} +\_def\_regquotes#1#2#3#4{\_bgroup \_lccode`~=`#2\_lowercase{\_egroup \_def#1##1~}{#3##1#4}} \_doc ----------------------------- Sometimes should be usable to leave the markup `"such"` or `'such'` i.e.~without @@ -128,20 +131,10 @@ by the \`\activequotes` macro and leave quotes without the first backslash. First, declare `\quotes`, then \^`\altquotes` (if needed) and finally \^`\activequotes`. - - \`\_resetaquotes` redefines expandable version of `\""` and `\''` - used in outlines in order to the delimiter is {\em active} character. We - are testing if \^`\quoteschars` were used now because the error in outlines - can be more confusing. \_cod ----------------------------- -\_def\_activequotes{\_adef"{\"}\_adef'{\'}\_resetaquotes} - -\_bgroup \_catcode`,=13 \_lccode`\~=`\" \_lccode`\,=`\' \_lowercase{\_egroup - \_def\_resetaquotes{% - \_bgroup \_the\_regoul \_edef\_tmp{\"?"}\_egroup % test if \quoteschar were used - \_regmacro{}{}{\_edef\"##1~{\"##1"}\_edef\'##1,{\'##1'}}} -} +\_def\_activequotes{\_let\_actqq=\"\_adef"{\_actqq}\_let\_actq=\'\_adef'{\_actq}% + \_regmacro{}{}{\_adef"{\"}\_adef'{\'}}} \_public \quoteschars \activequotes \enquotes \csquotes \skquotes \frquotes \plquotes \esquotes \grquotes \ruquotes \itquotes \dequotes ; @@ -189,6 +182,7 @@ \_endcode % ------------------------------------- +2021-01-21 more robust quotes in outlines 2020-12-05 bib phrases moved here 2020-04-29 Obrazek -> Abbildung: bug fixed 2020-03-15 introduced diff --git a/macros/luatex/optex/base/makeindex.opm b/macros/luatex/optex/base/makeindex.opm index 22b09e396b..8c58f7085c 100644 --- a/macros/luatex/optex/base/makeindex.opm +++ b/macros/luatex/optex/base/makeindex.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \makeindex {Makeindex and sorting <2020-04-26>} % loaded in format +\_codedecl \makeindex {Makeindex and sorting <2021-02-01>} % loaded in format \_doc ----------------------------- \^`\makeindex` implements sorting algorithm at \TeX/ macro-language level. @@ -68,7 +68,7 @@ The characters declared in `\_ignoredchars` are ignored in the first pass without additional condition. All characters are taken into account in - second pass: ASCII characters with code $\lq65$ are sorted first if they + second pass: ASCII characters with code $\string<65$ are sorted first if they are not mentioned in the `\_sortingdata` macro. Others not mentioned characters have undefined behavior during sorting. \_cod ----------------------------- @@ -133,7 +133,7 @@ \_def \_act ##1{\_ifx##1\_relax \_else \_ifx##1,\_else \_advance\_tmpnum by1 \_lccode`##1=\_tmpnum \_fi \_ea\_act \_fi}% - \_tmpnum=65 \_ea\_act \_sortingdata \_relax + \_tmpnum=64 \_ea\_act \_sortingdata \_relax } \_doc ----------------------------- @@ -401,8 +401,8 @@ All other variants of indexing macros expand internally to `\iindex`. \_cod ----------------------------- -\_def\_iindex#1{\_isempty{#1}\_iffalse\_openref{\def~{ }% - \edef\_act{\_noexpand\_wref\_noexpand\_Xindex{{#1}{\_iitypesaved}}}\_act}\_fi} +\_def\_iindex#1{\_isempty{#1}\_iffalse + \_openref{\_def~{ }\_ewref\_Xindex{{#1}{\_iitypesaved}}}\_fi} \_public \iindex ; \_doc ----------------------------- @@ -457,5 +457,6 @@ \_endcode % ------------------------------------- +2021-02-01 secodary sorting: start from code 65 2020-04-21 \isempty \iffalse ... \fi added to \iindex 2020-03-26 introduced diff --git a/macros/luatex/optex/base/maketoc.opm b/macros/luatex/optex/base/maketoc.opm index 84e699d67d..8dfd821640 100644 --- a/macros/luatex/optex/base/maketoc.opm +++ b/macros/luatex/optex/base/maketoc.opm @@ -1,16 +1,17 @@ % This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \maketoc {Macros for maketoc <2020-03-12>} % preloaded in format +\_codedecl \maketoc {Macros for maketoc <2020-02-09>} % preloaded in format \_doc ------------------------------------ - \`\_Xtoc` `{}{}{}` (in `.ref` file) reads the - specified data and appends them to the \`\_toclist` as - \^`\_tocline``{<level>}{<type>}{<number>}{<title>}{<gpageno>}{<pageno>}` + \`\_Xtoc` `{<level>}{<type>}{<number>}{<o-title>}<title>` (in `.ref` file) reads + given data and appends them to the \`\_toclist` as + \^`\_tocline``{<level>}{<type>}{<number>}{<o-title>}{<title>}{<gpageno>}{<pageno>}` where: \begitems * `<level>`: 0 reserved, 1: chapter, 2: section, 3: subsection * `<type>`: the type of the level, i.e. chap, sec, secc * `<number>`: the number of the chapter/section/subsection in the format 1.2.3 + * `<o-title>`: outlines title, if differs from `<title>`. * `<title>`: the title text * `<gpageno>`: the page number numbered from 1 independently of pagination * `<pageno>`: the page number used in the pagination @@ -25,13 +26,13 @@ \_def\_toclist{} \_newifi \_ifischap \_ischapfalse -\_def\_Xtoc#1#2#3{\_ifnum#1=0 \_ischaptrue\_fi - \_addto\_toclist{\_tocline{#1}{#2}{#3}}\_scantoeol\_XtocA} +\_def\_Xtoc#1#2#3#4{\_ifnum#1=0 \_ischaptrue\_fi + \_addto\_toclist{\_tocline{#1}{#2}{#3}{#4}}\_scantoeol\_XtocA} \_def\_XtocA#1{\_addto\_toclist{{#1}}\_ea\_addto\_ea\_toclist\_ea{\_currpage}} \_doc ------------------------------------ - \`\_tocline``{<level>}{<type>}{<number>}{<title>}{<gpageno>}{<pageno>}` prints - the record to the table of contents. It opens group, reduces `\_leftskip`, + \`\_tocline``{<level>}{<type>}{<number>}{<o-title>}{<title>}{<gpageno>}{<pageno>}` + prints the record to the table of contents. It opens group, reduces `\_leftskip`, `\_rightskip`, runs the \^`\everytocline` (user can customise the design of TOC here) and runs `\_tocl:<level> {<number>}{<title>}{<pageno>}` macro. This macro starts with vertical mode, @@ -53,15 +54,15 @@ \_cod ------------------------------------ \_newcount \_tocrefnum -\_def\_tocline#1#2#3#4#5#6{% +\_def\_tocline#1#2#3#4#5#6#7{% \_advance\_tocrefnum by1 \_bgroup \_leftskip=\_iindent \_rightskip=2\_iindent \_ifischap \_advance\_leftskip by \_iindent \_fi - \_def\_pgn{\_ilink[pg:#5]}% + \_def\_pgn{\_ilink[pg:#6]}% \_the\_everytocline \_ifcsname _tocl:#1\_endcsname - \_cs{_tocl:#1}{#3}{\_scantextokens{#4}}{#6}\_par + \_cs{_tocl:#1}{#3}{\_scantextokens{#5}}{#7}\_par \_fi \_egroup } @@ -96,6 +97,29 @@ \_def\_tocpar{\_nobreak \_hskip-2\_iindent\_null \_par} \_doc ----------------------------------- + If you want a special formating of TOC with adding more + special lines (no generated as titles from `\chap`, `\sec`, `\secc`), you + can define `\addtotoc{<level>}{<type>}{<number>}{<o-title>}{<title>}` macro: + \begtt + \def\addtotoc#1#2#3#4#5{% + \incr\_tocrefnum + \_dest[toc:\_the\_tocrefnum]% + \_ewref\_Xtoc{{#1}{#2}{#3}{#4}#5}% + } + \endtt + and you can declare special lines (or something else) + as an unused level (10 in the following example): + \begtt + \sdef{_tocl:10}#1#2#3{\medskip\hbox{\Blue #2}\medskip} + \endtt + Now, users can add a blue line into TOC by + \begtt \catcode`\<=13 + \addtotoc{10}{blue-line}{}{\relax}{<blue text to be added in the TOC>} + \endtt + anywhere in the document. Note that `\relax` in the fourth parameter + means that outline will be not generated. And second parameter + `blue-line` is only a comment (unused in macros). + \`\maketoc` prints warning if TOC data is empty, else it creates TOC by running \^`\_toclist` \_cod ---------------------------------- @@ -124,6 +148,7 @@ \_endcode +2021-02-09 \thisoutline implemented 2020-04-23 \_tocpar introduced (incompatible change) 2020-04-22 \_pg -> \_pgn (incompatible change) -2020-03-12 introduced \ No newline at end of file +2020-03-12 introduced diff --git a/macros/luatex/optex/base/math-macros.opm b/macros/luatex/optex/base/math-macros.opm index a087d31c68..6d5278d5c2 100644 --- a/macros/luatex/optex/base/math-macros.opm +++ b/macros/luatex/optex/base/math-macros.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \sin {Math macros plus mathchardefs <2020-06-13>} % preloaded in format +\_codedecl \sin {Math macros plus mathchardefs <2021-02-04>} % preloaded in format \_doc ----------------------------- The category code of the character `_` remains as the letter (11) and the mathocode @@ -594,7 +594,7 @@ \_cod ----------------------------- \_protected\_def\_matrix#1{\_null\_thinsk - \_edef\_stylenum{\_the\_numexpr\_mathstyle/2\_relax}% + \_edef\_tmpa{\_the\_numexpr \_mathstyle/4\_relax}% 0 0 1 1 1 1 2 2 \_vcenter{\_matrixbaselines\_math \_ialign{\_the\_lmfil$\_matrixstyle##$\_hfil&&\_quad\_the\_lmfil$\_matrixstyle##$\_hfil\_crcr \_mathstrut\_crcr\_noalign{\_kern-\_baselineskip} @@ -602,22 +602,22 @@ \_def\_matrixbaselines{\_normalbaselines \_def\_matrixstyle{}% \_let\_matrixbaselines=\_relax % \matrix inside matrix does not change size again - \_ifcase\_stylenum \_or \_matrixscriptbaselines \_or \_matrixscriptbaselines + \_ifcase\_tmpa \_or + \_baselineskip=.7\_baselineskip \_def\_quad {\_hskip.7em\_relax}% + \_let\_matrixstyle=\_scriptstyle \_or - \_baselineskip=.5\_baselineskip - \_def\_quad {\_hskip.5em\_relax}% + \_baselineskip=.5\_baselineskip \_def\_quad {\_hskip.5em\_relax}% \_let\_matrixstyle=\_scriptscriptstyle \_fi } -\_def\_matrixscriptbaselines{\_baselineskip=.7\_baselineskip - \_def\_quad {\_hskip.7em\_relax}\_let\_matrixstyle=\_scriptstyle -} \_protected\_def\_pmatrix#1{\_left(\_matrix{#1}\_right)} \_public \matrix \pmatrix ; \_doc ----------------------------- - The \`\cases` and `\bordermatrix` macros are identical from plain \TeX/. + The \`\cases` and \`\bordermatrix` macros are almost identical as in plain \TeX/. + You can simply re-define `\bordermatrix` with other delimiters + using the common \`\_bordermatrixwithdelims` macro. \_cod ----------------------------- \_protected\_long\_def\_cases#1{\_left\{\_thinsk\_vcenter{\_normalbaselines\_math @@ -625,13 +625,14 @@ \_newdimen\_ptrenwd \_ptrenwd=8.75pt % width of the big left ( -\_protected\_def\_bordermatrix#1{\_begingroup \_math - \_setbox0=\_vbox{\_bordermatrixA #1\_stopbmatrix}% +\_protected\_def\_bordermatrix{\_bordermatrixwithdelims()} +\_def\_bordermatrixwithdelims#1#2#3{\_begingroup \_math + \_setbox0=\_vbox{\_bordermatrixA #3\_stopbmatrix}% \_setbox2=\_vbox{\_unvcopy0 \_global\_setbox1=\_lastbox}% \_setbox2=\_hbox{\_unhbox1 \_unskip\_global\_setbox1=\_lastbox}% - \_setbox2=\_hbox{$\_kern\_wd1 \_kern-\_ptrenwd\_left(\_kern-\_wd1 + \_setbox2=\_hbox{$\_kern\_wd1 \_kern-\_ptrenwd\_left#1\_kern-\_wd1 \_global\_setbox1=\_vbox{\_box1 \_kern.2em}% - \_vcenter{\_kern-\_ht1 \_unvbox0 \_kern-\_baselineskip}\_thinsk\_right)$}% + \_vcenter{\_kern-\_ht1 \_unvbox0 \_kern-\_baselineskip}\_thinsk\_right#2$}% \_null\_thicksk\_vbox{\_kern\_ht1 \_box2}\_endgroup} \_def\_bordermatrixA #1\cr#2\_stopbmatrix{% \_ialign{$##$\_hfil\_kern.2em\_kern\_ptrenwd&\_thinspace\_hfil$##$\_hfil @@ -1054,7 +1055,10 @@ \_endcode %--------------------------------------------------- -2020=12-17 \box0->\hbox{\box0} in \_finphant and \_finsmash, see https://tex.stackexchange.com/questions/574997/ +2021-02-04 \_bordermatrixwithdelims introduced. +2021-01-23 better expession for math styles in \matrix +2021-01-22 bad use of \_stylenum in \matrix + bad value (bug fix: \_stylenum->\_mtstylenum) +2020-12-17 \box0->\hbox{\box0} in \_finphant and \_finsmash, see https://tex.stackexchange.com/questions/574997/ 2020-06-14 \borermatrix, \cases corrected 2020-06-13 \adots introduced, \matrix smaller in T mode too. 2020-06-03 \notin corrected diff --git a/macros/luatex/optex/base/math-preload.opm b/macros/luatex/optex/base/math-preload.opm index 7f6aaa6fdb..0ec9abae2f 100644 --- a/macros/luatex/optex/base/math-preload.opm +++ b/macros/luatex/optex/base/math-preload.opm @@ -134,28 +134,34 @@ These parameters are given in the \`\ptmunit` unit, it is set to 1\`\ptunit` and it is set to 1\,pt by default. \nl - \`\_corrmsizes` should be used in the \^`\normalmath` and \^`\boldmath` - macros if you need a size correction when a selected math family is - loaded. It is similar to ex-height correction but for math fonts. + \`\_corrmsize` `<factor><space>` can be used just before + `\_loadmathfamily` or `\_setmathfamily`. + The `<factor>` is decimal number, it denotes + scale-factor \"size of loaded math font in `\textstyle` : size of text font". + You can use it in `\_normalmath` or `\_boldmath` macros if you want to do a + corrections (for example due to different ex-height in text and math + font). The `\_corrmsize` is applied only to one following + `\_loadmathfamily` or `\_setmathfamily`. If it is missing + then the `<factor>` is 1 for such math family (i.e.\ no size corrections). \_cod ----------------------------- -\_def\_corrmsizes{\_ptmunit=1\_ptunit\_relax} % for corrections of sizes in diferent fomts +\_def\_corrmsize#1 {\_ptmunit=#1\_ptunit} % for corrections of sizes in diferent fonts -\_def\_loadmathfamily #1 #2 {\_chardef\_tmp#1\_corrmsizes +\_def\_loadmathfamily #1 #2 {% \_edef\_optsizesave{\_the\_optsize}% \_optsize=\_sizemtext \_font\_mF=\_whichtfm{#2} at\_optsize \_textfont#1=\_mF \_optsize=\_sizemscript \_font\_mF=\_whichtfm{#2} at\_optsize \_scriptfont#1=\_mF \_optsize=\_sizemsscript \_font\_mF=\_whichtfm{#2} at\_optsize \_scriptscriptfont#1=\_mF - \_optsize=\_optsizesave \_relax + \_optsize=\_optsizesave \_ptmunit=\_ptunit } -\_def\_setmathfamily #1 #2{\_let\_mF=#2\_chardef\_tmp#1\_corrmsizes +\_def\_setmathfamily #1 #2{\_let\_mF=#2% \_edef\_optsizesave{\_the\_optsize}% \_optsize=\_sizemtext \_fontlet#2=#2 at\_optsize \_textfont#1=#2% \_optsize=\_sizemscript \_fontlet#2=#2 at\_optsize \_scriptfont#1=#2% \_optsize=\_sizemsscript \_fontlet#2=#2 at\_optsize \_scriptscriptfont#1=#2% - \_optsize=\_optsizesave \_let#2=\_mF + \_optsize=\_optsizesave \_ptmunit=\_ptunit \_let#2=\_mF } -\_def\_setmathsizes[#1/#2/#3]{% +\_def\_setmathsizes[#1/#2/#3]{\_ptmunit=\_ptunit \_def\_sizemtext{#1\_ptmunit}\_def\_sizemscript{#2\_ptmunit}% \_def\_sizemsscript{#3\_ptmunit}% } diff --git a/macros/luatex/optex/base/math-unicode.opm b/macros/luatex/optex/base/math-unicode.opm index f857deb175..680da012d6 100644 --- a/macros/luatex/optex/base/math-unicode.opm +++ b/macros/luatex/optex/base/math-unicode.opm @@ -118,7 +118,9 @@ If the math family 1 is loaded then the family 2 and 3 are set by the same font because \TeX/ needs to read dimension information about generating math formulae from these three math families. All information needed by - \TeX/ is collected in single Unicode-math font. + \TeX/ is collected in single Unicode-math font.\nl + The \^`\_corrmsize` `<factor><space>` can be used just before + `\_loadumathfamily`, see section~\ref[math-preload] for more information. \_cod ----------------------------- \_def\_umathname#1#2{"#1:\_mfontfeatures#2"} @@ -132,7 +134,7 @@ \_ifnum#1=1 \_scriptfont2=\_mF \_scriptfont3=\_mF \_fi \_optsize=\_sizemsscript \_font\_mF=\_umathname{#2}{+ssty=1;#3} at\_optsize\_scriptscriptfont#1=\_mF \_ifnum#1=1 \_scriptscriptfont2=\_mF \_scriptscriptfont3=\_mF \_fi - \_optsize=\_optsizesave \_relax + \_optsize=\_optsizesave \_ptmunit=\_ptunit } \_doc ----------------------------- diff --git a/macros/luatex/optex/base/more-macros.opm b/macros/luatex/optex/base/more-macros.opm index 406139b16f..d5ce88c1a6 100644 --- a/macros/luatex/optex/base/more-macros.opm +++ b/macros/luatex/optex/base/more-macros.opm @@ -214,7 +214,7 @@ The \`\catcode` primitive is redefined here. Why? There is very common cases like \code{\\catcode`}`<something>` or `\catcode"<number>` but these characters - \code{\`} or \code{"} can be set as active (typically by `\activettchar` macro). + \code{\`} or \code{"} can be set as active (typically by `\verbchar` macro). Nothing problematic happens if re-defined `\catcode` is used in this case. If you really need primitive `\catcode` then you can use `\_catcode`. diff --git a/macros/luatex/optex/base/optex.ini b/macros/luatex/optex/base/optex.ini index 9a4aeace8e..3826ccf0e1 100644 --- a/macros/luatex/optex/base/optex.ini +++ b/macros/luatex/optex/base/optex.ini @@ -21,7 +21,7 @@ % OpTeX version -\def\optexversion{Beta 0.19 Jan.2021} +\def\optexversion{1.00 Feb.2021} \def\fmtname{OpTeX} % Engine testing: diff --git a/macros/luatex/optex/base/others.opm b/macros/luatex/optex/base/others.opm index d96edc4dba..6ff15d4332 100644 --- a/macros/luatex/optex/base/others.opm +++ b/macros/luatex/optex/base/others.opm @@ -92,7 +92,7 @@ \_def\_lipsumload{{% \_setbox0=\_vbox{\_tmpnum=0 % vertical mode during \input lipsum.ltd.tex \_def\ProvidesFile##1[##2]{}% - \_def\NewLipsumPar{\_advance\_tmpnum by1 \_sxdef{_lip:\_the\_tmpnum}}% + \_def\NewLipsumPar{\_incr\_tmpnum \_sxdef{_lip:\_the\_tmpnum}}% \_opinput {lipsum.ltd.tex}% \_global\_let\_lipsumload=\_empty }}} diff --git a/macros/luatex/optex/base/outlines.opm b/macros/luatex/optex/base/outlines.opm index d1082f9580..ad05c97edc 100644 --- a/macros/luatex/optex/base/outlines.opm +++ b/macros/luatex/optex/base/outlines.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \outlines {PDF outlines <2020-03-12>} % preloaded in format +\_codedecl \outlines {PDF outlines <2021-02-09>} % preloaded in format \_def\_outlines#1{\_pdfcatalog{/PageMode/UseOutlines}\_openref \_ifx\_toclist\_empty @@ -16,13 +16,15 @@ \_toclist}% create outlines \_fi } -\_def\_outlinesA#1#2#3#4#5#6{% - \_advance\_count#1 by1 - \_ifcase#1\_or - \_addoneol{_ol:\_the\_count0}\_or - \_addoneol{_ol:\_the\_count0:\_the\_count1}\_or - \_addoneol{_ol:\_the\_count0:\_the\_count1:\_the\_count2}\_or - \_addoneol{_ol:\_the\_count0:\_the\_count1:\_the\_count2:\_the\_count3}\_fi +\_def\_outlinesA#1#2#3#4#5#6#7{% + \_isequal{\relax}{#4}\_iffalse + \_advance\_count#1 by1 + \_ifcase#1\_or + \_addoneol{_ol:\_the\_count0}\_or + \_addoneol{_ol:\_the\_count0:\_the\_count1}\_or + \_addoneol{_ol:\_the\_count0:\_the\_count1:\_the\_count2}\_or + \_addoneol{_ol:\_the\_count0:\_the\_count1:\_the\_count2:\_the\_count3}\_fi + \_fi } \_def\_addoneol#1{% \_ifcsname #1\_endcsname @@ -31,19 +33,21 @@ \_else \_sxdef{#1}{1}% \_fi } -\_def\_outlinesB#1#2#3#4#5#6{% - \_advance\_count#1 by1 - \_ifcase#1% - \_tmpnum=\_trycs{_ol:\_the\_count0}{0}\_or - \_tmpnum=\_trycs{_ol:\_the\_count0:\_the\_count1}{0}\_relax\_or - \_tmpnum=\_trycs{_ol:\_the\_count0:\_the\_count1:\_the\_count2}{0}\_relax\_or - \_tmpnum=\_trycs{_ol:\_the\_count0:\_the\_count1:\_the\_count2:\_the\_count3}{0}\_relax\_or - \_tmpnum = 0\_relax\_fi - \_pdfunidef\_tmp{#4}% +\_def\_outlinesB#1#2#3#4#5#6#7{% \_advance\_tocrefnum by1 - \_outlinesC{#1}{toc:\_the\_tocrefnum}{\_ifnum#1<\_outlinelevel\_space\_else-\_fi}{\_tmpnum}{\_tmp}% + \_isequal{\relax}{#4}\_iffalse + \_advance\_count#1 by1 + \_ifcase#1% + \_tmpnum=\_trycs{_ol:\_the\_count0}{0}\_or + \_tmpnum=\_trycs{_ol:\_the\_count0:\_the\_count1}{0}\_relax\_or + \_tmpnum=\_trycs{_ol:\_the\_count0:\_the\_count1:\_the\_count2}{0}\_relax\_or + \_tmpnum=\_trycs{_ol:\_the\_count0:\_the\_count1:\_the\_count2:\_the\_count3}{0}\_relax\_or + \_tmpnum = 0\_relax\_fi + \_isempty{#4}\_iftrue \_pdfunidef\_tmp{#5}\_else \_pdfunidef\_tmp{#4}\_fi + \_outlinesC{toc:\_the\_tocrefnum}{\_ifnum#1<\_outlinelevel\_space\_else-\_fi}{\_tmpnum}{\_tmp}% + \_fi } -\_def\_outlinesC#1#2#3#4#5{\_pdfoutline goto name{#2} count #3#4{#5}\_relax} +\_def\_outlinesC#1#2#3#4{\_pdfoutline goto name{#1} count #2#3{#4}\_relax} \_newcount\_oulnum \_def\_insertoutline#1{\_global\_advance\_oulnum by1 diff --git a/macros/luatex/optex/base/parameters.opm b/macros/luatex/optex/base/parameters.opm index addc6e9b8e..c8df6eec49 100644 --- a/macros/luatex/optex/base/parameters.opm +++ b/macros/luatex/optex/base/parameters.opm @@ -166,7 +166,7 @@ The \`\picdir` tokens list can include a directory where image files (loaded by `\inspic`) are saved. Empty `\picdir` (default value) means that image files are in the current directory (or somewhere in the \TeX/ - system where \LuaTeX/can find them). If you set a non-empty value to + system where \LuaTeX/ can find them). If you set a non-empty value to the `\picdir`, then it must end by `/` character, for example `\picdir={img/}` means that there exists a directory `img` in your current directory and the image files are stored here. @@ -185,10 +185,10 @@ a nonzero value then the height is given, the width is calculated. If both parameters are non-zero, the height and width are given and the aspect ratio of the image is (probably) broken. We recommend setting these - parameters locally in the group where `\inspic` is used in order to not + parameters locally in the group where \^`\inspic` is used in order to not influence the dimensions of other images. But there exist many situations you need to put the same dimensions to more images, - so you can set this parameter only once before more `\inspic` macros. + so you can set this parameter only once before more \^`\inspic` macros. \_cod ----------------------------- \_newdimen\_picwidth \_picwidth=0pt \_let\picw=\_picwidth @@ -197,21 +197,21 @@ \_doc ----------------------------- The \`\everytt` is the token list used in - `\begtt`...`\endtt` environment and - in the verbatim group opened by `\verbinput` macro. You can include a + \^`\begtt`...\^`\endtt` environment and + in the verbatim group opened by \^`\verbinput` macro. You can include a code which is processed inside the group after basic settings were done On the other hand, it is processed before the scanner of verbatim text is started. Your macros should influence scanner (catcode settings) or printing process of the verbatim code or both. - The code from the line immediately after `\begtt` is processed after - the `\everytt`. This code should overwrite `\everytt` settings. Use - `\everytt` for all verbatim environments in your document and use a code - after `\begtt` locally only for this environment. + The code from the line immediately after \^`\begtt` is processed after + the \^`\everytt`. This code should overwrite \^`\everytt` settings. Use + \^`\everytt` for all verbatim environments in your document and use a code + after \^`\begtt` locally only for this environment. The \`\everyintt` token list does similar work but acts in the in-line verbatim - text processed by a pair of `\activettchar` characters or by `\code{<text>}`. + text processed by a pair of \^`\verbchar` characters or by \^`\code``{<text>}`. You can set `\everyintt={\Red}` for example if you want in-line verbatim in red color. \_cod ----------------------------- @@ -222,12 +222,12 @@ \_doc ----------------------------- The \`\ttline` is used - in `\begtt`...`\endtt` environment or in the code - printed by `\verbinput`. If `\ttline` is positive or zero, then the + in \^`\begtt`...\^`\endtt` environment or in the code + printed by \^`\verbinput`. If `\ttline` is positive or zero, then the verbatim code has numbered lines from `\ttline+1`. The `\ttline` register is re-set to a new value after a code piece is printed, so next code pieces have numbered lines continuously. If `\ttline=-1`, then - `\begtt`...`\endtt` lines are without numbers and `\verbinput` lines + \^`\begtt`...\^`\endtt` lines are without numbers and \^`\verbinput` lines show the line numbers of inputted file. If `\ttline`\code{<-1} then no line numbers are printed. \_cod ----------------------------- @@ -237,8 +237,8 @@ \_doc ----------------------------- The \`\ttindent` gives default indentation - of verbatim lines printed by `\begtt`...`\endtt` pair or by - `\verbinput`. + of verbatim lines printed by \^`\begtt`...\^`\endtt` pair or by + \^`\verbinput`. \nl The \`\ttshift` gives the amount of shift of all verbatim lines to the right. Despite the \^`\ttindent`, it does not shift the line numbers, only @@ -283,13 +283,13 @@ \_public \hicolors ; \_doc ----------------------------- - The default item mark used between `\begitems` and `\enditems` is the bullet. + The default item mark used between \^`\begitems` and \^`\enditems` is the bullet. The \`\defaultitem` tokens list declares this default item mark. \nl The \`\everyitem` tokens list is applied in vertical mode at the start of each item. \nl - The \`\everylist` tokens list is applied after the group is opened by + The \`\everylist` tokens list is applied after the group is opened by \^`\begitems` \nl The \`\ilevel` keeps the value of the current nesting level of the items list. \nl @@ -305,14 +305,14 @@ \_public \defaultitem \everyitem \everylist \listskipamount \ilevel ; \_doc ----------------------------- - The `\tit` macro includes `\vglue`\`\titskip` above the title of the document. + The \^`\tit` macro includes `\vglue`\`\titskip` above the title of the document. \_cod ----------------------------- \_newskip\_titskip \_titskip=40pt \_relax % \vglue above title printed by \tit \_public \titskip ; \_doc ---------------------------- - The `\begmulti` `\endmulti` pair creates more columns. The parameter + The \^`\begmulti` and \^`\endmulti` pair creates more columns. The parameter \`\colsep` declares the space between columns. If $n$ columns are specified then we have $n-1$ `\colseps` and $n$ columns in total `\hsize`. This gives the definite result of the width of the columns. @@ -358,7 +358,7 @@ \_public \everyii ; \_doc ----------------------------- - The \`\everymnote` is used in the `\mnote` group before `\noindent` which + The \`\everymnote` is used in the \^`\mnote` group before `\noindent` which immediately precedes marginal note text. \nl The \`\mnotesize` is the horizontal size of the marginal notes. @@ -372,7 +372,7 @@ \_public \everymnote \mnotesize \mnoteindent ; \_doc ----------------------------- - The `\table` parameters follow. The \`\thistable` tokens list + The \^`\table` parameters follow. The \`\thistable` tokens list register should be used for giving an exception for only one `\table` which follows. It should change locally other parameters of the `\table`. It is reset to an empty list after the table is printed. diff --git a/macros/luatex/optex/base/pdfuni-string.opm b/macros/luatex/optex/base/pdfuni-string.opm index f9e28582d5..25781ddfb4 100644 --- a/macros/luatex/optex/base/pdfuni-string.opm +++ b/macros/luatex/optex/base/pdfuni-string.opm @@ -1,23 +1,29 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \pdfunidef {PDFunicode strings for outlines <2020-03-12>} % preloaded in format +\_codedecl \pdfunidef {PDFunicode strings for outlines <2021-02-08>} % preloaded in format \_doc ----------------------------- - The \`\_octalprint` is a Lua script that prints the character code in the - octal notation. + \`\_hexprint` is a command defined in Lua, that scans a number and expands + to its UTF-16 Big Endian encoded form for use in PDF hexadecimal strings. \_cod ----------------------------- -\_edef\_octalprint#1#2{\_noexpand\_directlua{% #1=character-code #2=character - if ('#2'>='A' and '#2'<='Z') or ('#2'>='a' and '#2'<='z') then - tex.print(string.format('000\_pcent s',"#2")) - else - local num=#1\_pcent256 - tex.print(string.format('\_pcent 03o\_nbb\_pcent03o',(#1-num)/256,num)) - end +\bgroup +\_catcode`\%=12 +\_gdef\_hexprint{\_directlua{ + local num = token.scan_int() + if num < 0x10000 then + tex.print(string.format("%04X", num)) + else + num = num - 0x10000 + local high = bit32.rshift(num, 10) + 0xD800 + local low = bit32.band(num, 0x3FF) + 0xDC00 + tex.print(string.format("%04X%04X", high, low)) + end }} +\egroup \_doc ----------------------------- - \`\pdfunidef``\macro{<text>}` does more things than only converting to octal notation. + \`\pdfunidef``\macro{<text>}` does more things than only converting to hexadecimal PDF string. The <text> can be scanned in verbatim mode (it is true becuase \^`\_Xtoc` reads the <text> in verbatim mode). First `\edef` do `\_scantextokens\unexpanded` and second `\edef` expands the parameter @@ -26,11 +32,15 @@ Then \`\_removeoutbraces` converts `..{x}..` to `..x..`. Finally, the <text> is detokenized, spaces are preprocessed using \^`\replstring` and then the \`\_pdfunidefB` is repeated on each character. It calls the - `\directlua` chunk to print octal numbers in the macro \^`\_octalprint`. + `\directlua` chunk to print hexadecimal numbers in the macro \^`\_hexprint`.\nl + Characters for quotes (and separators for quotes) are activated by first + `\_scatextokens` and they are defined as the same non-active characters. + But `\_regoul` can change this definition. \_cod ----------------------------- \_def\_pdfunidef#1#2{% \_begingroup + \_catcodetable\_optexcatcodes \_adef"{"}\_adef'{'}% \_the\_regoul \_relax % \_regmacro alternatives of logos etc. \_ifx\_savedttchar\_undefined \_def#1{\_scantextokens{\_unexpanded{#2}}}% \_else \_lccode`\;=\_savedttchar \_lowercase{\_prepinverb#1;}{#2}\fi @@ -43,19 +53,17 @@ \_edef#1{\_detokenize\_ea{#1}}% \_replstring#1{ }{{ }}% text text -> text{ }text \_catcode`\\=12 \_let\\=\_bslash - \_edef\_out{\\376\\377}% + \_edef\_out{<FEFF} \_ea\_pdfunidefB#1^% text -> \_out in octal \_ea \_endgroup - \_ea\_def\_ea#1\_ea{\_out} + \_ea\_def\_ea#1\_ea{\_out>} } \_def\_pdfunidefB#1{% \_ifx^#1\_else - \_tmpnum=`#1 - \_pdfunidefC{\_luaescapestring{#1}}% + \_edef\_out{\_out \_hexprint `#1} \_ea\_pdfunidefB \_fi } -\_def\_pdfunidefC #1{\_edef\_out{\_out \\\_ea\_octalprint\_ea{\_the\_tmpnum}{#1}}} \_def\_removeoutbraces #1#{#1\_removeoutbracesA} \_def\_removeoutbracesA #1{\_ifx\_end#1\_else #1\_ea\_removeoutbraces\_fi} @@ -91,22 +99,29 @@ \_endcode % -------------------------------- -There are only two encodings for PDF strings (used in PDFoutlines, PDFinfo -, etc.). The first one is PDFDocEncoding which is one-byte encoding, but most -Czech or Slovak characters are missing here. +There are only two encodings for PDF strings (used in PDFoutlines, PDFinfo, +etc.). The first one is PDFDocEncoding which is single-byte encoding, but it +misses most international characters. -The second encoding is PDFunicode encoding which is implemented in this file. +The second encoding is Big Endian UTF-16 which is implemented in this file. It +encodes a single character in either two or four bytes. This encoding is \TeX/-discomfortable because it looks like \begtt -\376\377\000C\000v\000i\001\015\000e\000n\000\355\000\040\000j\000e\000\040 -\000z\000\341\000t\001\033\001\176 +<FEFF 0043 0076 0069 010D 0065 006E 00ED 0020 006A 0065 0020 007A 00E1 0074 +011B 017E 0020 0061 0020 0078 2208 D835DD44> \endtt -This example is the real encoding of the string "Cvičení je zátěž". You can see -that this is UTF-16 encoding (two bytes per character) with two starting -bytes FEFF. Moreover, each byte is encoded by three octal digits preceded by -a backslash. The only exception is the visible ASCII character encoding: such -a character is encoded by its real byte preceded by `\000`. +This example shows a hexadecimal PDF string (enclosed in \code{<>} as opposed +to the literal PDF string enclosed in `()`). In these strings each byte is +represented by two hexadecimal characters (`0-9`, `A-F`). You can tell the +encoding is UTF-16BE, becuase it starts with \"Byte order mark" `FEFF`. Each +unicode character is then encoded in one or two byte pairs. The example string +corresponds to the text \"Cvičení je zátěž a ${\rm x} ∈ 𝕄$". Notice the 4 bytes +for the last character, $𝕄$. (Even the whitespace would be OK in a PDF file, +because it should be ignored by PDF viewers, but \LuaTeX\ doesn't allow it.) +\_endinput +2021-02-08 \_octalprint -> \_hexprint +2020-03-12 Released diff --git a/macros/luatex/optex/base/ref-file.opm b/macros/luatex/optex/base/ref-file.opm index fd7c1101d7..d594bf88c0 100644 --- a/macros/luatex/optex/base/ref-file.opm +++ b/macros/luatex/optex/base/ref-file.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \openref {File for references <2020-02-14>} % preloaded in format +\_codedecl \openref {File for references <2021-02-05>} % preloaded in format \_doc -------------------------- The \`\_inputref` macro is used in `\everyjob`. It reads `\jobname.ref` file @@ -34,7 +34,10 @@ the \`\_wref` `\<macro>{<data>}` is redefined in order to save the line `\<macro><data>` to the `.ref` file using asynchronous `\write` primitive. Finally, the `\_openref` destroys itself, because we - need not open the file again. + need not open the file again.\nl + The `\_wref``<csname>{<params>}` does exactly `\write\_reffile{\string<csname><params>}` + in this case and \`\_ewref``<csname>{<params>}` does + `\write\_reffile{\string<csname><expanded-params>}`. \_cod --------------------- \_def\_openref {% @@ -47,7 +50,8 @@ \_immediate\_write\_reffile {\_pcent\_pcent\_space OPTeX <\_optexversion> - REF file (#1)}% \_immediate\_wref \Xrefversion{{\_REFversion}}% } -\def\openref{\_openref} +\_def\_ewref #1#2{\_edef\_ewrefA{#2}\_ea\_wref\_ea#1\_ea{\_ewrefA}} +\_def\openref{\_openref} \_doc ---------------------- We are using the convention that the macros used in `.ref` file are named @@ -65,7 +69,7 @@ versa. \_cod ---------------------- -\_def\_REFversion{4} % actual version of .ref files in OpTeX +\_def\_REFversion{5} % actual version of .ref files in OpTeX \_def\_Xrefversion#1{\_ifnum #1=\_REFversion\_relax \_else \_endinput \_fi} \_public \Xrefversion ; % we want to ignore .ref files generated by OPmac @@ -107,7 +111,7 @@ The `.ref` file looks like: \begtt \catcode`\<=13 \Xrefversion{<ref-version>} \_Xpage{<gpageno>}{<pageno>} -\_Xtoc{<level>}{<type>}{<text>}<title> +\_Xtoc{<level>}{<type>}{<text>}{}<title> \_Xlabel{<label>}{<text>} \_Xlabel{<label>}{<text>} ... diff --git a/macros/luatex/optex/base/references.opm b/macros/luatex/optex/base/references.opm index 27e4f8d632..03c8f6955c 100644 --- a/macros/luatex/optex/base/references.opm +++ b/macros/luatex/optex/base/references.opm @@ -27,7 +27,7 @@ \_doc ---------------------------- \`\label``[<label>]` saves the decalred label to `\_lastlabel` and \`\wlabel``{<text>}` uses the `\_lastlabel` and activates - `\wref\_Xlabel{<label>}{<text>}`. + `\_wref\_Xlabel{<label>}{<text>}`. \_cod ---------------------------- \_def\_label[#1]{\_isempty{#1}\_iftrue \_global\_let \_lastlabel=\_undefined @@ -39,8 +39,7 @@ \_ifx\_lastlabel\_undefined \_else \_dest[ref:\_lastlabel]% \_printlabel\_lastlabel - \_edef\_tmp{{\_lastlabel}{#1}}% - \_ea\_wref \_ea\_Xlabel \_ea{\_tmp}% + \_ewref \_Xlabel {{\_lastlabel}{#1}}% \_sxdef{_lab:\_lastlabel}{#1}\_sxdef{l0:\_lastlabel}{}% \_global\_let\_lastlabel=\_undefined \_fi diff --git a/macros/luatex/optex/base/sections.opm b/macros/luatex/optex/base/sections.opm index 66dc9cd9e0..5e50fa3b9f 100644 --- a/macros/luatex/optex/base/sections.opm +++ b/macros/luatex/optex/base/sections.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \chap {Titles, chapters, sections, subsections <2020-03-28>} % preloaded in format +\_codedecl \chap {Titles, chapters, sections, subsections <2021-02-09>} % preloaded in format \_doc --------------------------- We are using scaled fonts for titles @@ -97,7 +97,8 @@ * `\_sectionlevel=1` -- chapters (used in `\chap`) * `\_sectionlevel=2` -- sections (used in `\sec`) * `\_sectionlevel=3` -- subsections (used in `\secc`) - * `\_sectionlevel=4` -- subsubsections (unused by default) + * `\_sectionlevel=4` -- subsubsections (unused by default, see the + \ulink[http://petr.olsak.net/optex/optex-tricks.html\#seccc]{\OpTeX/ trick 0033}) \enditems \_cod -------------------------- @@ -130,7 +131,6 @@ subsections <num>.<num>. On the other hand, if chapter is used in the document then `\_chapnum>0` and sections have numbers` <num>.<num>` and subsections have numbers `<num>.<num>.<num>`. - \_cod -------------------------- \_newcount \_chapnum % chapters @@ -152,7 +152,6 @@ \_def \_thednum {(\_the\_dnum)} \_def\_othe #1.{\_ifnum#1>0 \_the#1.\_fi} -\_def\_incr #1{\_global\_advance#1by1 } \_doc ---------------------------- The \`\notoc` and \`\nonum` prefixes are implemented by @@ -204,12 +203,11 @@ \_doc ---------------------------- The \`\_printrefnum``[<pre>@<post>]` macro is used in `\_print*` macros. - \nl - The \`\_wtotoc` `{<level>}{<info>}{<ref-num>}{<title-text>}` - macro expands its parameters and does \^`\_wref`. Note that the `<tite-text>` is `\detokenize`d before `\_wref`, so the problem of \"fragile macros" from old \LaTeX/ never occurs. + This fourth parameter is not delimited by `{...}` but by end of line. + This gives possibility to have unbalanced braces in inline verbatim in titles. \_cod ---------------------------- \_def \_printrefnum [#1@#2]{\_leavevmode % we must be in horizontal mode @@ -217,12 +215,20 @@ \_wlabel \_therefnum % references, if `\label[<label>]` is declared \_ifnotoc \_else \_incr \_tocrefnum \_dest[toc:\_the\_tocrefnum]% - \_wtotoc{\_the\_sectionlevel}{\_secinfo}% - {\_therefnum}{\_detokenize\_ea{\_savedtitle}}% + \_ewref\_Xtoc{{\_the\_sectionlevel}{\_secinfo}% + {\_therefnum}{\_theoutline}\_detokenize\_ea{\_savedtitle}}% \_fi + \_gdef\_theoutline{}% } -\_def \_wtotoc #1#2#3#4{\_edef\_tmp{{#1}{#2}{#3}{#4}}\_ea\_wtotocA\_tmp} -\_def \_wtotocA #1#2#3#4{\_wref\_Xtoc{{#1}{#2}{#3}#4}} + + \_doc ----------------------------- + \`\thisoutline``{<text>}` saves text to the \`\_theoutline` macro. + \^`\_printrefnum` uses it and removes it. + \_cod ----------------------------- + +\_def\_theoutline{} +\_def\_thisoutline#1{\_gdef\_theoutline{#1}} +\_public \thisoutline ; \_doc ----------------------------- The \`\_abovetitle``{<penaltyA>}{<skipA>}` and \`\_belowtitle``{<skipB>}` pair @@ -256,7 +262,7 @@ \_def\_nbpar{{\_interlinepenalty=10000\_endgraf}} -\_protected\_def\_nl{\_hfil\_break} +\_protected\_def\_nl{\_unskip\_hfil\_break} \_regmacro {\_def\_nl{\_unskip\_space}} {\_def\_nl{\_unskip\_space}} {\_def\_nl{ }} \_regmacro {\_def\nl{\_unskip\_space}} {\_def\nl{\_unskip\_space}} {\_def\nl{ }} @@ -321,7 +327,10 @@ \_public \secl ; \_doc ----------------------------- - The \`\caption``/<letter>` uses `\_<letter>num` counter. + The \`\caption``/<letter>` increases `\_<letter>num` counter, + edefines \`\_thecapnum` as `\_the<letter>num` and + defines \`\_thecaptitle` as language-dependent word using \^`\_mtext`, + runs the `\_everycaption<letter>` tokens register. The group opened by `\caption` is finalized by first `\par` from an empty line or from `\vskip` or from `\endinsert`. The `\_printcaption<letter>` is called, it starts with @@ -350,9 +359,9 @@ They switch to horizontal mode and use `\_wlabel\_thecapnum` (in order to make reference and hyperlink destination) a they can use: \begitems - * `\_thecaptitle` ... expands to the word Table or Figure (depending on - the current language). - * `\_thecapnum` ... expands to `\the<letter>num` (caption number). + * \^`\_thecaptitle` ... expands to the word Table or Figure (depending on + the current language). + * \^`\_thecapnum` ... expands to `\the<letter>num` (caption number). \enditems \_cod ----------------------------- @@ -363,6 +372,15 @@ \_let \_printcaptionf = \_printcaptiont % caption of figures = caption of tables \_doc ----------------------------- + If you want to declare a new type of `\caption` with independent counter, + you can use following lines, where `\caption/a` for Algorithms are + declared: + \begtt + \let\_printcaptiona = \_printcaptionf \let\_everycaptiona = \_everycaptionf + \newcount\_anum \addto\_secx {\_anum=0 } + \def\_theanum {\_othe\_chapnum.\_the\_secnum.\_the\_anum} + \sdef{_mt:a:en}{Algorithm} \sdef{_mt:a:cs}{Algoritmus} % + your language... + \endtt The default format of `\caption` text is a paragraph in block narrower by `\_iindent` and with the last line is centered. This setting is done by the \`\_narrowlastlinecentered` macro. @@ -432,6 +450,8 @@ \_endcode % ------------------------------------- +2021-02-09 \thisoutline implemented +2021-01-26 \_nl: \unskip added 2021-01-11 \secl introduced 2021-01-05 \_thednum printed in text mode in its both occurences. 2020-04-28 \_secfonts etc: \_boldify is last. diff --git a/macros/luatex/optex/base/slides.opm b/macros/luatex/optex/base/slides.opm index deba85c746..5ee4346674 100644 --- a/macros/luatex/optex/base/slides.opm +++ b/macros/luatex/optex/base/slides.opm @@ -1,6 +1,6 @@ % This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \slideshow {Slides style for OpTeX <2020-03-19>} % loaded on demand by \slides +\_codedecl \slideshow {Slides style for OpTeX <2021-01-16>} % loaded on demand by \slides \_doc ----------------------------- Default margins and design is declared here. @@ -197,7 +197,7 @@ \_maxlayers=0 \_long\_def\_layersactive #1 #2\endlayers{% - \_par\_egroup + \_par\_penalty0\_egroup \_gdef\_layertext{#2}% \_global\_maxlayers=#1 \_setbox\_slidepageB=\_vbox\_bgroup @@ -232,3 +232,5 @@ The user manual of \OpTeX/ slides are in `op-slides.tex` file. +2021-01-16 \layers at empty page raises error: problem fixed +2020-03-19 slides introduced diff --git a/macros/luatex/optex/base/table.opm b/macros/luatex/optex/base/table.opm index 09ece437ea..d6edaff20f 100644 --- a/macros/luatex/optex/base/table.opm +++ b/macros/luatex/optex/base/table.opm @@ -1,10 +1,10 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \table {Basic macros for OpTeX <2020-05-26>} % preloaded in format +\_codedecl \table {Basic macros for OpTeX <2021-01-27>} % preloaded in format \_doc ----------------------------- The result of the \`\table``{<declaration>}{<data>}` macro is inserted into - `\_tablebox`. You can change default value if you want by + \`\_tablebox`. You can change default value if you want by `\let\_tablebox=\vtop` or `\let\_tablebox=\relax`. \_cod ----------------------------- @@ -95,7 +95,7 @@ work in special cases here like \code{`\{`} for example. \_cod ----------------------------- -\_def\_tableB #1{\_egroup \_def\_tmpb{#1}% +\_long\_def\_tableB #1{\_egroup \_def\_tmpb{#1}% \_replstring\_tmpb{\crl}{\_crcr\crl}\_replstring\_tmpb{\crll}{\_crcr\crll}% \_replstring\_tmpb{\crli}{\_crcr\crli}\_replstring\_tmpb{\crlli}{\_crcr\crlli}% \_replstring\_tmpb{\crlp}{\_crcr\crlp}% @@ -199,8 +199,8 @@ \_doc ----------------------------- The default \"declaration letters" `c`, `l`, `r` and `p` are declared - by setting \`\tabdeclarec`, \`\tabdeclarel`, \`\tabdeclarer` and - \`\paramtabdeclarep` macros. In general, define + by setting \`\_tabdeclarec`, \`\_tabdeclarel`, \`\_tabdeclarer` and + \`\_paramtabdeclarep` macros. In general, define `\def\_tabdeclare<letter>{...}` for a non-parametric letter and `\def\_paramtabdeclare<letter>{...}` for a letter with a parameter. The double hash `##` must be in the definition, it is replaced by a real table item data. @@ -269,8 +269,7 @@ \_def\_crlpB#1#2-#3,{\_ifx\_end#3\_xdef\_crlplist{\_crlplist#1#2,}\_else\_crlpC#1#2-#3,\_fi} \_def\_crlpC#1-#2-#3,{\_tmpnum=#1\_relax \_loop \_xdef\_crlplist{\_crlplist\_the\_tmpnum,}\_ifnum\_tmpnum<#2\_advance\_tmpnum by1 \_repeat} -\_def\_crlpD{\_global\_advance\_tmpnum by1 - \_edef\_tmpa{\_noexpand\_isinlist\_noexpand\_crlplist{,\_the\_tmpnum,}}% +\_def\_crlpD{\_incr\_tmpnum \_edef\_tmpa{\_noexpand\_isinlist\_noexpand\_crlplist{,\_the\_tmpnum,}}% \_tmpa\_iftrue \_kern-\_drulewidth \_tablinefil \_kern-\_drulewidth\_else\_hfil \_fi} \_def\_tskip{\_afterassignment\_tskipA \_tmpdim} @@ -296,7 +295,7 @@ \_public \mspan ; \_doc ----------------------------- - The \`\vspan``{<number>}{<text>}` implementation is here. + The \`\vspan``<number>{<text>}` implementation is here. We need to lower the box by \begtt \catcode`\<=13 (<number>-1)*(\ht+\dp of \tabstrut) / 2. @@ -305,7 +304,8 @@ then use braces. \_cod ----------------------------- -\_def\_vspan#1#2{\_vtop to\_zo{\_hbox{\_lower \_dimexpr +\_def\_vspan#1#2#{\_vspanA{#1#2}} +\_def\_vspanA#1#2{\_vtop to\_zo{\_hbox{\_lower \_dimexpr #1\_dimexpr(\_ht\_tstrutbox+\_dp\_tstrutbox)/2\_relax -\_dimexpr(\_ht\_tstrutbox+\_dp\_tstrutbox)/2\_relax \_hbox{#2}}\_vss}} \_public \vspan ; @@ -511,6 +511,7 @@ after the second one. \_endinput +2021-01-27 \_tableB: \long\def added, \vspan syntax improved 2020-05-26 \eqbox implemented 2020-05-20 \colnum implemented. \vspan implemented. diff --git a/macros/luatex/optex/base/unimath-codes.opm b/macros/luatex/optex/base/unimath-codes.opm index 21a9b1caeb..a52a9a02cb 100644 --- a/macros/luatex/optex/base/unimath-codes.opm +++ b/macros/luatex/optex/base/unimath-codes.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \_ncharrmA {Uni math codes <2020-11-13>} % preloaded on demand by \loadmath +\_codedecl \_ncharrmA {Uni math codes <2021-02-03>} % preloaded on demand by \loadmath \_doc ----------------------------- The control sequences for `\alpha`, `\beta` etc are redefined here. @@ -158,7 +158,7 @@ } \_catcode`#=14 \_everypar={\_setbox0=\_lastbox \_par \_p} - \_input mathclass.opm + \_setbox0=\_vbox{\_input mathclass.opm } \_endgroup \_doc ----------------------------- @@ -170,7 +170,9 @@ \_begingroup % \input unimath-table.opm (it is a copy of unicode-math-table.tex): \_def\UnicodeMathSymbol #1#2#3#4{% - \_global\_Umathcharnumdef#2=\_Umathcodenum#1\_relax + \_ifnum#1=\_Umathcodenum#1 % the code isn't set by mathclass.opm + \_global\_Umathchardef#2=0 1 #1 \_global\_Umathcode#1=0 1 #1 + \_else \_global\_Umathcharnumdef#2=\_Umathcodenum#1 \_fi \_ifx#3\_mathopen \_gdef#2{\_Udelimiter 4 1 #1 }\_fi \_ifx#3\_mathclose \_gdef#2{\_Udelimiter 5 1 #1 }\_fi \_ifx#3\_mathaccent \_gdef#2{\_Umathaccent fixed 7 1 #1 }\_fi @@ -187,10 +189,21 @@ \_mit % default math alphabets setting +% hyphen character is transformed to minus: \_Umathcode `- = 2 1 "2212 -%\_Umathcode`: = 3 1 "3A % mathclass defines it as 6 1 "3A (punctuation) + +% mathclass defines : as Punct, plain.tex as Rel, we keep mathclass, +% i.e. there is difference from plain.tex, you can use $f:A\to B$. + \_let\{=\lbrace \_let\}=\rbrace +% mathclas defines ! as Ord, plain.tex as Close +\_Umathcode `! = 5 1 `! % keep plain.tex declaration +\_Umathchardef \mathexclam = 5 1 `! +% mathclas defines ? as Punct, plain.tex as Close +\_Umathcode `? = 5 1 `? % keep plain.tex declaration +\_Umathchardef \mathquestion = 5 1 `? + \_protected\_def \_sqrt {\_Uradical 1 "0221A } \_protected\_def \_cuberoot {\_Uradical 1 "0221B } \_protected\_def \_fourthroot {\_Uradical 1 "0221C } @@ -241,6 +254,20 @@ \_global\_Umathcode `/ = 0 1 `/ % mathclass says that / is Bin, Plain TeX says that it is Ord. +% compressed dots in S and SS styles (usable in \matrix when it is in T, S and SS style) +\_protected\_def \vdots {\_relax \_ifnum \_mathstyle>3 \_unicodevdots \_else \_vdots \_fi} +\_protected\_def \ddots {\_relax \_ifnum \_mathstyle>3 \_unicodeddots \_else \_ddots \_fi} +\_protected\_def \adots {\_relax \_ifnum \_mathstyle>3 \_unicodeadots \_else \_adots \_fi} + +% Unicode superscripts (²) and subscripts as simple macros with \mathcode"8000 +\_bgroup + \_def\_tmp#1#2{\_global\_mathcode#1="8000 \_lccode`\~=#1 \_lowercase{\_gdef~}{#2}} + \_fornum 0..1 \_do {\_tmp{"207#1}{{^#1}}} + \_tmp{"B2}{{^2}}\_tmp{"B3}{{^3}} + \_fornum 4..9 \_do {\_tmp{"207#1}{{^#1}}} + \_fornum 0..9 \_do {\_tmp{"208#1}{{_#1}}} +\_egroup + \_doc ----------------------------- Aliases are declared here. They are names not mentioned in the `unimath-table.opm` file but commonly used in \TeX. @@ -379,7 +406,7 @@ \ldotp \cdotp \bullet \triangleleft \trianglerigt \mapstochar \rightarrow \prime \lhook \rightarrow \leftarrow \rhook \triangleright \triangleleft \Relbar \Rightarrow \relbar \rightarrow \Leftarrow \mapstochar - \longrightarrow \Longleftrightarrow \vdots \ddots ; + \longrightarrow \Longleftrightarrow \unicodevdots \unicodeddots \unicodeadots ; \_endcode @@ -398,6 +425,9 @@ for technical details about Unicode-math. \_endinput History: +2021-02-03 Unicode superscripts, subscripts declared +2021-01-31 Mathcode of ! ? set to Close, codes undeclared in mathclass set correctly +2021-01-23 Compressed \vdots, \ddots, \adots in script(script)style. 2020-11-13 Bug fix: \colon declared 2020-06-13 Umathcode of / declared as in Plain TeX 2020-06-07 \_itgreek \_itGreek, \_rmgreek \_rmGreek etc. introduced, names changed diff --git a/macros/luatex/optex/base/unimath-table.opm b/macros/luatex/optex/base/unimath-table.opm index 066f57d352..252c1fc26a 100644 --- a/macros/luatex/optex/base/unimath-table.opm +++ b/macros/luatex/optex/base/unimath-table.opm @@ -3,6 +3,7 @@ % Only \ddots, \adots and \vdots are called differently: % \unicodeddots, \unicodeadots and \unicodevdots +% \mathquestion: Ord -> Close (because plain.tex declares it as Close) \UnicodeMathSymbol{"00021}{\mathexclam }{\mathclose}{exclamation mark}% \UnicodeMathSymbol{"00023}{\mathoctothorpe }{\mathord}{number sign}% @@ -20,7 +21,7 @@ \UnicodeMathSymbol{"0003C}{\less }{\mathrel}{less-than sign r:}% \UnicodeMathSymbol{"0003D}{\equal }{\mathrel}{equals sign r:}% \UnicodeMathSymbol{"0003E}{\greater }{\mathrel}{greater-than sign r:}% -\UnicodeMathSymbol{"0003F}{\mathquestion }{\mathord}{question mark}% +\UnicodeMathSymbol{"0003F}{\mathquestion }{\mathclose}{question mark}% \UnicodeMathSymbol{"00040}{\mathatsign }{\mathord}{commercial at}% \UnicodeMathSymbol{"0005B}{\lbrack }{\mathopen}{left square bracket}% \UnicodeMathSymbol{"0005C}{\backslash }{\mathord}{reverse solidus}% diff --git a/macros/luatex/optex/base/verbatim.opm b/macros/luatex/optex/base/verbatim.opm index dc701c96eb..8fd20ee531 100644 --- a/macros/luatex/optex/base/verbatim.opm +++ b/macros/luatex/optex/base/verbatim.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \begtt {Verbatim <2020-11-13>} % preloaded in format +\_codedecl \begtt {Verbatim <2021-01-22>} % preloaded in format \_doc ---------------------------- The internal parameters @@ -59,13 +59,13 @@ \_def\_setverb{\_catcodetable\_verbatimcatcodes }% \_doc ---------------------------- - \`\activettchar``<char>` saves original catcode of previously declared `<char>` (if + \`\verbchar``<char>` saves original catcode of previously declared `<char>` (if such character was declared) using \`\_savedttchar` and \`\_savedttcharc` values. Then new such values are stored. The declared character is activated by `\_adef` as a macro (active character) which opens a group, does `\_setverb` and other settings and reads its parameter until second the same character. This is done by the \`\_readverb` macro. Finally, it prints scanned - `<text>` by \^`\_printinverbatim` and closes group. Suppose that `\activettchar"` is + `<text>` by \^`\_printinverbatim` and closes group. Suppose that `\verbchar"` is used. Then the following work is schematically done: \begtt \_def "{\_begingroup \_setverb ... \_readverb} @@ -75,14 +75,15 @@ deactivates it. \_cod ---------------------------- -\_def\_activettchar#1{% +\_def\_verbchar#1{% \_ifx\_savedttchar\_undefined\_else \_catcode\_savedttchar=\_savedttcharc \_fi \_chardef\_savedttchar=`#1 \_chardef\_savedttcharc=\_catcode`#1 \_adef{#1}{\_begingroup \_setverb \_adef{ }{\_dsp}\_ttfont \_the\_everyintt\_relax \_readverb}% \_def\_readverb ##1#1{\_printinverbatim{##1}\_endgroup}% } -\_public \activettchar ; +\_let \_activettchar=\_verbchar % for backward compatibility +\_public \verbchar \activettchar ; \_doc ---------------------------- \`\begtt` is defined only as public. We don't need a private `\_begtt` variant. @@ -158,7 +159,7 @@ \_cod ---------------------------- \_def\_printverb #1^^J#2{% - \_ifx\_printverblinenum\_relax \_else \_global\_advance\_ttline by1 \_fi + \_ifx\_printverblinenum\_relax \_else \_incr\_ttline \_fi \_testcommentchars #1\_relax\_relax\_relax \_iftrue \_ifx\_end#2 \_printcomments\_fi @@ -269,7 +270,7 @@ \_ttskip \_isnextchar\_par{}{\_noindent}% } -\_def\_vireadline{\_read\_vifile to \_tmp \_global\_advance\_viline by1 } +\_def\_vireadline{\_read\_vifile to \_tmp \_incr\_viline } \_def\_visaveline{\_ea\_addto\_ea\_tmpb\_ea{\_tmp}} \_public \verbinput ; @@ -362,6 +363,7 @@ \_endinput History: +2020-01-22 ... \activettchar changed to \verbchar 2020-12-30 ... \secc followed by \begtt must be unbreakable 2020-11-13 ... \commentchars implemented 2020-04-22 ... \ttshift introduced diff --git a/macros/luatex/optex/demo/op-demo.tex b/macros/luatex/optex/demo/op-demo.tex index c116682e59..e17b2f0b2f 100644 --- a/macros/luatex/optex/demo/op-demo.tex +++ b/macros/luatex/optex/demo/op-demo.tex @@ -6,7 +6,7 @@ \typosize[9/10.5] % 9pt font / 10.5pt baselineskip \parindent=10pt % typesetting parameters \hyperlinks \Blue\Blue % active hyperlinks -\activettchar` % in-text verbatim by `...` +\verbchar` % in-text verbatim by `...` \everyintt={\Red} % in-text verbatim Red \enquotes % use \"text" for English quotation @@ -89,7 +89,7 @@ can be added if you need to refer to a figure. \sec Verbatim In-text verbatim is surrounded by the character declared -by `\activettchar` sequence. The listing can be surrounded +by `\verbchar` sequence. The listing can be surrounded by `\begtt` and `\endtt` sequences \begtt This is verbatim. diff --git a/macros/luatex/optex/demo/op-slides.tex b/macros/luatex/optex/demo/op-slides.tex index 8c9bca24fc..45b65fb657 100644 --- a/macros/luatex/optex/demo/op-slides.tex +++ b/macros/luatex/optex/demo/op-slides.tex @@ -9,7 +9,7 @@ \hyperlinks\Blue\Blue % hyperlinks are used in the title page \backgroundpic{op-slides-bg.png} % background picture -\activettchar` % inline verbatim +\verbchar` % inline verbatim \enquotes % English quotes \"..." \slideshow %------------------------------------------------------------ diff --git a/macros/luatex/optex/doc/omls.tex b/macros/luatex/optex/doc/omls.tex new file mode 100644 index 0000000000..f161f151d7 --- /dev/null +++ b/macros/luatex/optex/doc/omls.tex @@ -0,0 +1,832 @@ +\fontfam[lm] + +\adef<#1>{\ifcsname s:#1\endcsname + \link[s:#1]{}{\Blue$\langle$\hbox{\it#1\/}$\rangle$}% + \else {\Blue$\langle$\hbox{\it#1\/}$\rangle$}\fi} +\everyintt={\catcode`<=13 \Red} +\verbchar` +\enlang +\enquotes + +\def\r[#1]{\label[#1]\wlabel{\the\_itemnum}} +\def\:{$\to$} +\let\_narrowlastlinecentered=\ignoreit +\_def\_printsecc#1{\_par + \_abovetitle{\_penalty-200}{\_medskip\_smallskip} + {\_seccfont \_noindent \_raggedright \_printrefnum[@\_quad]% + \_label[\the\_secnum.\the\_seccnum]\wlabel{\the\_secnum.\the\_seccnum}#1\_nbpar}% + \_nobreak \_belowtitle{\_medskip}% + \_firstnoindent +} +\def\.`{\bgroup\catcode`\ =12 \scancs} +\def\scancs#1{\egroup + \immediate\_wref\Xknowncs{\string#1{\the\_secnum.\the\_seccnum}}% + \ea`\string#1% +} +\def\printcs#1{\ea\printcsred\csstring#1;~\ref[#1] \ } +\def\printcsred,#1;{{\Red\tt \bslash#1}} +\def\printknowncs{\ifx\knowncslist\undefined \let\knowncslist=\empty \fi + \ifx\knowncslist\empty TeX me again...\else + \_dosorting\knowncslist \ea\xargs \ea\printcs \knowncslist;\fi} + +\def\~`<#1>`{<#1>\sxdef{s:#1}{}\dest[s:#1]} + +\refdecl{ + \def\knowncslist{}^^J + \def\Xknowncs#1#2{% + \sxdef{,\csstring#1}{#2}% + \global\ea\addto\ea\knowncslist\ea{\csname,\csstring#1\endcsname}% + } +} +\sdef{_item:c}{\pdfsave\llap{\pdfscale{1.3}{1.3}$\circ$\enspace}\pdfrestore} + +%\parindent=15pt \iindent=\parindent \ttindent=\parindent +%\ttindent=0pt +\everylist={\advance\ttindent by-1em} +\hyperlinks \Green \Green +\def\cskip{\par\nobreak} +\def\begblock{\medskip\hbox\bgroup\vrule\vbox\bgroup\hrule\smallskip + \_fnset\leftskip=\parindent \rightskip=\parindent \medskip\noindent} +\def\endblock{\medskip\hrule\egroup\vrule\egroup} + +\def\raggedright{\rightskip=10pt plus1fil\relax} +\def\optexmanual{\ulink[http://petr.olsak.net/ftp/olsak/optex/optex-doc.pdf]{\OpTeX/ manual}} + +\titskip=1cm + +\hfill Version 0.1 + +\tit \OpTeX/ Markup Language Standard + +{\it\hfil Petr Olšák, 2021}\bigskip + +The \OpTeX/ markup language standard (OMLS) declares a list of control +sequences used in \OpTeX/ documents including their syntax and sematic. The +listed control sequences in OMLS in section~\ref[listcs] in table~\ref[alistcs] +are called {\it known} and other control sequences are {\it unknown}. + +The main reason for OMLS is to give instructions on how to program convertors +from \OpTeX/ documents to another formats (Html, Markdown, \LaTeX/) or how +to interpret the \OpTeX/ document sources in such applications as +{\tt texcount} or text editors\fnote +{We suppose advanced editor features: color highlighting, sections/chapters folding, + auto-completions, etc.}. +These converters and applications are called {\it cnv-programs} in this document. + +We suppose that if you need absolute control over the typography of the +document when it is converted to PDF pages, then you use \OpTeX/ itself. If +you need to create other formats of the same document then you can use a +cnv-program which accepts OMLS. The result is a document without +typographical instructions like dimensions of pages, margins, paginations +and headers, selection of a font-family, dimensions of the fonts, etc.\ You can +imagine the result of such a conversion as a single Html page where more +typographical features can be controlled in a different way, for example by +an external CSS file. This is a reason why control sequences like `\fontfam` or +`\margins` are ignored by cnv-programs. + +Obviously, \TeX/ and \OpTeX/ itself gives possibility to declare various +input formats for various purposes. Sometimes (in very special cases) there +exists a good reason to declare a different and special input format by +\TeX/ macros. But if the source of the document respects the OMLS then it is +reasonably transformable to other formats by cnv-programs. We hope that +OMLS-ready documents cover a very large set of typical documents used these +days. + +We suppose that cnv-programs work internally with strings of source lines +without tokenization. This is one of the great differences in processing the +document directly by \OpTeX/ and using a cnv-program. The second difference is +that the expansion process of macros is not implemented in cnv-programs in +its full range. We respect that the result of cnv-programs will be different +than from processing directly by \OpTeX/. But this is not a bug, this is +the feature. We concentrate on the fixed syntax and sematic given by OMLS of the +\OpTeX/ document and we throw behind the head the typographical +exactness of the document which can be done only directly by \TeX/ (and it is +exactly described in \TeX/book, for example). + +\notoc\nonum\sec Table of contents + +\begmulti 2 +\maketoc +\endmulti +\vfil\break + +\sec Syntactical rules + +The syntactical elements are described as strings here. No \TeX/'s tokenization is +taken into account. The rule with a smaller number has precedence. + +\begitems \style n +* end of line or end of file \: \~`<eol>`.\r[eol] +* `%%:` at beginning of the line \: \~`<cnv-declarator>`, see section~\ref[cnv-decl]. +* `<cnv-declarator><text><eol>` is interpreted specially. +* space or a tab-character \: \~`<space>`. +* non-empty sequence of `<space>`s \: \~`<spaces>`.\r[spcs] +* an empty line or a line only with `<spaces>` \: \~`<empty-line>`. +* a character `a`--`z` or `A`--`Z` \: \~`<letter>`. +* a `<letter>` or `_` \: \~`<specletter>`. +* a character different from previous rule or `<eol>` or `<spaces>` \: \~`<non-specletter>` +* `\<non-specletter>` \: \~`<singlechar-control-sequence>`.\r[scs] +* a non-empty sequence of `<specletter>`s \: \~`<letters-seq>`. +* `\<letters-seq><non-specletter>` \: \~`<multiletter-control-sequence>``<non-specletter>`. +* `%<text><eol>` \: `<comment>` and it is completely ignored including `<eol>`.\r[com] +* `<spaces>` at beginning of the line marks that the line as {\it indented}. +* `<spaces>` at beginning of the line \: are ignored.\r[bspace] +* `<spaces><eol>` or `<eol>` \: `<spaces>`.\r[eolrm] +* `<multileter-control-sequence><spaces>` \: `<multileter-control-sequence>`.\r[csspace] +* `<multiletter-control-sequence>` or `<singlechar-control-sequence>` \: \~`<control-sequence>`.\r[cs] +* `<spaces>` \: `<space>`.\r[sspace] +* `~` \: non-breakable space. +* text where all pairs `{` and `}` match at arbitrary level \: \~`<balanced-text>`.\r[balt] +* `{<balanced-text>}` can be interpreted as a parameter of a `<control-sequence>`, see section~\ref[listcs]. +* The `{` alone not used by previous rule opens a group and the `}` alone closes the same group.\r[group] +* There are two main modes: h-mode, v-mode\fnote + {this is great simplification of real \TeX/ modes.}. + The document processing starts in v-mode. +* In v-mode: a `<non-space>` character or a control sequence listed + in table~\ref[vtohmode] swithes to h-mode. +* In h-mode: an `<empty-line>` or a control sequence listed in table~\ref[htovmode] switches to v-mode.\r[htov] +* The switching from v-mode to h-mode \: a paragraph begins. +* The switching from h-mode to v-mode \: the current paragraph ends. +* `$<text>$` or `$$<text>$$` \: process `<text>` in math-mode, see section~\ref[math]. +* a non-empty sequence of digits with optional `+` or `-` in the front \: \~`<number>`. +* `<number>` with optional dot inside the sequence of digits \: \~`<decimal-number>`. +* a pair of letters listed in the table~\ref[tex-units] \: \~`<tex-unit>`. +* optional space, i.e.\ `<space>` or nothing \: \~`<o-space>`. +* `<decimal-number><o-space><tex-unit><o-space>` \: \~`<dimen>`. +* `<control-sequence>` not listed in table~\ref[alistcs] nor in configuration \: \~`<unknown-control-sequence>`.\r[unkncs] +* `=<o-space>` or `<o-space>` \: \~`<o-equal>`. +* `<unknown-control-sequence><o-equal><dimen>` \: should be completely ignored.\r[eqdim] +* `<unknown-control-sequence><o-equal><number>` \: should be completely ignored. +* `<unknown-control-sequence>=<o-space>{<balanced-text>}` \: should be completely ignored. +* `<unknown-control-sequence>[<balanced-text>]` \: should be completely ignored.\r[ibkt] +* `<unknown-control-sequence>` \: should be ignored.\r[ignore] +* `<control-sequence>`s are processed as described in section~\ref[listcs] or + by a configuration of the cnv-program. +\enditems + +\bigskip +\label[vtohmode]\caption/t +List of control sequences which switch from v-mode to h-mode. +\cskip +\begblock +`\`<space>, +`\hfil`, +`\hfill`, +`\hskip`, +`\hss`, +`\indent`, +`\leavevmode`, +`\noindent`, +`\quad`, +`\qquad`, +`\vrule`. +\endblock + +\bigskip +\label[htovmode]\caption/t +List of control sequences which switch from h-mode to v-mode. +\cskip +\begblock +`\begblock`, +`\begitems`, +`\begmulti`, +`\begtt`, +`\bib`, +`\bigskip`, +`\bye`, +`\caption`, +`\chap`, +`\cskip`, +`\end`, +`\endblock`, +`\enditems`, +`\endmulti` +`\hrule`, +`\medskip`, +`\par`, +`\sec`, +`\secc`, +`\secl`, +`\smallskip`, +`\vfil`, +`\vskip`. +\endblock + +\bigskip +\label[tex-units]\caption/t +List of \TeX/ units. +\cskip +\begblock +`bp`, +`cc`, +`cm`, +`dd`, +`em`, +`ex`, +`in`, +`mm`, +`pc`, +`pt`, +`sp`. +\endblock + +\nonum\secc Examples + +\begitems +* `\%` is `<control-sequence>` by rules \ref[scs], \ref[cs]. It does not start + comment, because rule \ref[scs] has precedence before rule \ref[com]. +* `\%<space>`: the `<space>` is kept, but `\foo<space>`: the space is removed + by rule~\ref[csspace]. +* `wordA<spaces><eol><spaces>wordB` is `wordA<space>wordB` by rules~\ref[bspace], + \ref[eolrm], and~\ref[sspace]. +* `\kern-3pt` should be ignored, because `\kern` is `<unknown-control-sequence>` and rule + \ref[eqdim] is applied. +* `\vskip42mm` should finalize paragraph in h-mode by rule~\ref[htov] and then it + is ignored by rule~\ref[eqdim] because `\vskip` is + `<unknown-control-sequence>` not listed in table~\ref[alistcs]. +* `\typosize[12/16]` is ignored by rule~\ref[ibkt]. +* `\foo{text}` is `{text}` (i.e. `text` in a group) by rules~\ref[ignore] and~\ref[group]. +\enditems + +\sec Scanning parameters + +If a control sequence listed in rules above or in the section~\ref[listcs] +has a parameter, the parameter is scanned +as a string with interpretation only those rules which are needed to +determine the boundary of the parameters. For example `\tit <title><eol>` +applies only rule~\ref[eol] during scanning the parameter, i.e.\ `<title>` +is a string telemetered by the end of the line or the end of the file. +Or `\fnote{<balanced-text>}` applies only rule~\ref[balt]. + +If the parameter is in the format `{<something>}` then the `<something>` is +always meant as `<balanced-text>`. We don't specify the type `<balanced-text>` +explicitly here, so we refer to `\fnote{<text>}` and not +`\fnote{<balanced-text>}`, for example. + +The spaces before the scanned parameter are optional +and they are ignored. Spaces inside `{`...`}` are not ignored. + +If the parameter is in the format `{<something>}` and the first non-space +character is not `{` then the parameter is this first non-space character or +a `<control-sequence>` if the first non-space character is~`\`. For example +`\fnote a` is equal to `\fnote{a}`. The difference from this rule is given +for `\input`, `\verbinput`,`\inspic` and `\inkinspic` control sequences in +section~\ref[listcs]. + +If the parameter is scanned as a string already then +all syntactical rules are applied when it is used. For example: +\begtt +\tit This is a title +\endtt +the parameter is scanned as `This is a title` and the rules~\ref[spcs] +and~\ref[sspace] are applied when it is used. + + +\sec Declaration and text parts of the document + +A typical \OpTeX/ document has two parts. A declaration part, where +macros are defined by `\def` and friends, fonts and sizes are declared, etc. +This part should be ignored by cnv-programs. +The second part includes the document text with a markup using well-declared control +sequences. The cnv-program has to interpret the second part. + +So, the cnv-program starts in declaration-skipping mode and it switches to +the text mode later. + +When cnv-program is in declaration-skipping mode then all indented lines are +ignored. And lines which begins by `}` or by a <control-sequence> not listed +in table~\ref[textopen] are ignored too. + +If the line begins by a character other than `}` or by a <control-sequence> +listed in table~\ref[textopen] then cnv-program switches to text mode. All +texts are interpreted from this line including this one. + +User can say explicitly where the second part of the document starts by +`%%:text` given at beginning of a line. Moreover, if `%%:decl` is given at +beginning of a line, then all text between `%%:decl` and `%%:text` is +ignored, only other possible `<cnv-declarator>`s are processed here. +It means that the declaration part and the text part of the document can be +simply determined by the pair `%%:decl` and `%%:text`. + +\bigskip +\label[textopen]\caption/t +List of control sequences which start the text mode. +\cskip +\begblock \raggedright +`\address`, +`\begblock`, +`\begitems`, +`\begmulti`, +`\begtt`, +`\bf`, +`\bi`, +`\bib`, +`\caption`, +`\cite`, +`\clipinoval`, +`\clipincircle`, +`\ecite`, +`\fnote`, +`\frame`, +`\hfil`, +`\hfill`, +`\ii`, +`\iid`, +`\incircle`, +`\inkinspic`, +`\inoval`, +`\inspic`, +`\it`, +`\LaTeX`, +`\LuaTeX`, +`\maketoc`, +`\mnote`, +`\OpTeX`, +`\putpic`, +`\puttext`, +`\rcite`, +`\rm`, +`\rotbox`, +`\sec`, +`\secc`, +`\secl`, +`\table`, +`\TeX`, +`\tit`, +`\usebib`, +`\verbinput`. +\endblock + + +\sec[cnv-decl] The `%%:` declarators + +The `%%:` declarators are ignored when the document is processed by \TeX/ +but they can give instructions to cnv-programs. The `%%:` must be placed at +beginning of the line. The list of `%%:` declarators follows: + +\begitems +* `%%:decl` -- the following text is ignored until `%%:text` occurs. Only + other `%%:` declarators are interpreted. +* `%%:text` -- the following text must be interpreted in text mode. +* `%%:to <format> <config-file>` -- if the cnv-program converts to the + <format> then it has to use the <config-file>. For example: + \begtt + %%:to html html-mydocument.cfg + %%:to markdown markdown-mydocument.cfg + %%:to latex preamble-mydocument.cfg + \endtt + The language of the config files are not a part of this standard, we + suppose something to be natural for used cnv-program. The config file should + give additional rules for interpreting control sequences not listed in the + section~\ref[listcs] (see rule~\ref[unkncs]). For example a tool for + defining a behavior of unknown control sequences can be here. + These definitions can depend on the converted document and on the output + format and they can be given in the configuration files. +* `%%:app <application> <config-file>` -- behaves like `%%;to` but the + cnv-program name instead output format is given here. +* `%%:do <format-or-app> <action>` -- does an `<action>` if `<format-or-app>` + is output format or used cnv\hbox{-}program name. The `<action>` syntax depends + on used cnv-program and it typicaly does a change in its configuration or + give a command to it. +* `%%:skip <formats-or-apps>` -- ignores all following lines until another `%%:` occurs + if the output format or application name is included in the `<formats-or-apps>` + space-separated list. Example: + \begtt + %%:skip html markdown + This text is not interpreted when Html or Markdown output is generated. + %%: + \endtt + If the `<formats-or-apps>` is empty then the `%%:skip` is applied for + each cnv-program and for each output. +* `%%:if <formats-or-apps>` -- processes following lines until another `%%:` + only if the output format or application name is included in the + `<formats-or-apps>` space-separated list. Other cnv-programs or output formats + not mentioned here skip these lines. Note that \TeX/ processes such lines always. + But you can use `\ignoreit{<text>}` which is processed as + `{<text>}` by cnv-programs (see rule~\ref[ignore]) but it is ignored by \OpTeX. + Example: + \begtt + %%:if html latex + \ignoreit{\input{file.tex}} + %%: + \endtt + The `file.tex` in this example is processed only if \LaTeX/ or Html output is generated. +* `%%:use` -- the next single line is fully interpreted unless cnv-program ignores + declarations by `%%:decl` or because it is in declaration-skipping mode. + Example: + \begtt + %%:use + \verbchar` \picdir={img/} + \endtt + The example shows how cnv-program is able to read `\verbchar` or + `\picdir` settings in the declaration\hbox{-}skipping mode although these control + sequences are not listed in table~\ref[textopen]. +* `%%:quotes <qql> <qqr> <ql> <qr>` -- declares \~`<qql>` and \~`<qqr>` (left + and right double quotation marks), \~`<ql>` and \~`<qr>` (left and right single + quotation mark). They are used when `\"` or `\'` control sequences are + processed. Default: unset, i.e.\ `\"` and `\'` are interpreted as + unknown control sequences. +\enditems + + +\sec[listcs] List of known control sequences + +The phrase \"should be" is used very often when the interpretation of +control sequences is declared here. It means that this is only a common +interpretation, but differences are possible due to the type of the output +format and used cnv-program. For example, when we convert to \LaTeX\, then +`\-` and `\/` are not ignored but they are re-written without change to the +output of the \LaTeX/ source file. + +\bigskip +\label[alistcs] +\caption/t List of known control sequences alphabeticaly sorted. +\cskip +\begblock +\raggedright \printknowncs +\endblock + + +\secc Character-like control sequences + +\begitems +* \.`\%`, \.`\$`, \.`\&`,\.`\#` respectively \: should be normal characters + `%`, `$`, `&`, `#` respectively. +* \.`\bslash` \: normal character `\`. +* \.`\space`, `\<space>`, `\<eol>` \: space. +* `\,` \: should be small space or space. +* \.`\quad`, \.`\qquad` \: should be bigger space or more spaces. +* \.`\-`, \.`\/` \: should be ignored. +* \.`\"<text>"` or \.`\'<text>'` \: `<clqq><text><crqq>` or `<clq><text><crq>`, + only if `%%:quotes` are set. +\enditems + +\secc Input files + +\begitems +* \.`\input {<file-name>}` or `\input <file-name><space>` should redirect the + input to given file. At the end of the input-ed file or at \.`\endinput` the + reading of the current file continues. The file is read from the current + directory, but the <file-name> should include the full path to the file + or relative path starting from the current directory. First, the file + `<file-name>.tex` is tried to read and if it doesn't exist then + the file `<file-name>` is read. +* \.`\picdir <o-equal>{<text>}` saves `<text>` to `<picdir-value>`. By + default, `<picdir-value>` is empty. +* \.`\inspic {<file-name>}` or `\inspic <file-name><space>` should include the + given picture from the `<picdir-value><file-name>`. +* \.`\inkinspic {<file-name>}` or `\inkinspic <file-name><space>` behaves like + `\inspic`. +* \.`\verinput <ignore> (<lines>) <file-name><space>` should include the + <file-name> (only given lines) as a verbatim text, i.\,e. without any + syntactical interpretation. +* \.`\usebib/<letter> (<style>) <file-names>` should use files from + `<file-names>` to generate the list of bib references. The `<file-names>` + is comma separated list (the `.bib` extension is appended to + each such file name). Only cited bib records should be used in this + bib-references, i.e. their label must be used in a `\cite[<labels>]` or + `\rcite[<labels>]` or `\ecite[<label>]`. + What bib fields are used in bib records depends on the cnv-program and + on its configuration. Maybe, simple cnv-programs should generate nothing here. +\enditems + +\secc Titles + +\begitems +* \.`\tit <title><eof>` should be a title of the document. +* \.`\chap <title><eof>` or `\chap [<label>] <title><eof>` is the title of + first level. +* \.`\sec <title><eof>` or `\sec [<label>] <title><eof>` is the title of + second level. +* \.`\secc <title><eof>` or `\secc [<label>] <title><eof>` is the title of + third level. +* \.`\secl<level> <title><eof>` is the title of given level. +\enditems + +\secc Fonts + +\.`\rm` selects upright normal font (it is selected by default), \.`\it` selects +italic, \.`\bf` selects upright bold font, \.`\bi` selects bold italic and +\.`\tt` selects a monospaced font, \.`\em` select italic (if upright is current) or upright +(if italic is current). The font sizes or other font features are typically ignored +by cnv-programs. The actual font selection is closed at the end of the current group. +The groups are given: +\begitems +* explicitly by `{` and `}` characters (which are not delimiters of + parameters of known control sequences), +* implicitly: parameters of control sequences listed in table~\ref[groupcs] + are processed in a group and blocks of text enclosed by + `\begitems`...`\enditems`, `\begblock`...`\endblock`, `\begmulti`...`\endmulti` + are processed in a group. + Each item in `\table` is in a group. +\enditems + +\label[groupcs] +\caption/t Parameters of following control sequences are processed in a group. +\cskip +\begblock +`\caption`, +`\chap`, +`\fnote`, +`\mnote`, +`\sec`, +`\secc`, +`\tit`. +\endblock + +\secc Colors + +\.`\Red`, \.`\Green`, \.`\Blue`, \.`\Cyan`, \.`\Magenta`, \.`\Yellow`, \.`\White`, +\.`\Black`, and \.`\Brown` should select the given color of the font. The selection +is closed at the end of the current group (like font selectors). + +\secc Blockquotes + +The blockquote\fnote +{The terminology is borrowed from Markdown.} +is opened by \.`\begblock` and closed by \.`\endblock`. +Blockquotes can contain multiple paragraphs and can contain nested +blockquotes. + +\secc Lists + +The list is opened by \.`\begitems` and closed by \.`\enditems`. The `*` starts +a new item in this environment. Nested lists are allowed. + +The type of items (ordered/unordered) +is given by \.`\style <character>`, see section 1.4.5 in the +\optexmanual. Default type is unordered (bullets are used). + + +\secc Code blocks (verbatim texts) + +Code blocks are inline verbatim or display verbatim. + +\begitems +* \.`\begtt <ignored><eol><text>\endtt<ignored><eol>` processes `<text>` in + \"display verbatim mode", i.\,e. there are no special characters, each character + is processed without special interpretation, the <eol>s are end of lines. + The text at the same line after `\begtt` and after `\endtt` (if any) is + ignored. +* \.`\verbchar <character>` declares `<verbchar>`. By default, it is undeclared.\nl + New `\verbchar <character>` rewrites previous setting. The setting is + local in the group. +* Inline verbatim is enclosed in the pairs of `<verbchar>`s. + The text between two `<verbchar>`s is processed without special interpretation. + Only possibly <eol>s are replaced by space. + Example: + \begtt + %%:use + \verbchar` + Now, `$this %text ~\` is processed as inline verbatim. + \endtt + gives: Now, `$this %text ~\` is processed as inline verbatim. +* \.`\code{<text>}` processes `<text>` like inline verbatim, but + all `\<character>` are processed as `<character>`, specially `\{` and `\}` + are `{` and `}` but without taking them into `<balanced-text>` rule, + `\\` is `\` but do not create a `<control-sequence>`, etc. +\enditems + + +\secc Multiclolumns + +\.`\begmulti <number><space>` opens the group and \.`\endmulti` +closes the group. If output format allows multi-columns then +the text enclosed between `\begmulti <number><space>` and matching +`\endmulti` should be printed in `<number>` balanced columns. + + +\secc Links + +\begitems +* \.`\url{<text>}` creates `<text>` as an external link which points to `<text>`. + The `\<character>` is interpreted as `<character>` in `<text>` with one + exception: `\|` is ignored. +* \.`\ulink[<url>]{<text>}` creates `<text>` as an external link which points + to `<url>`. The `\<character>` is interpreted as `<character>` only in + `<url>` parameter. +* \.`\label[<label>]` sets the `<label>`. First following occurence of `\chap`, `\sec`, + `\secc`, `\caption` or `\eqmark` sets this `<label>` as bounded to its + position in the document. +* \.`\ref[<label>]` should create an internal link to the position given by + `\chap`, `\sec`, `\secc`, `\caption` or `\eqmark`, + if `[<label>]` is used as the parameter of this control sequence + else if `<label>` is bounded here by previous `\label[<label>]` + The visual aspect of the link + is not declared by OMLS because we don't suppose that the chapters, + sections, equations, etc.\ are automatically numbered by exactly the same way as in + \OpTeX/. A recommendation should be: create a simple sequence of numbers over + all internal links. +* \.`\pgref[<label>]` should be replaced by `??` if cnv-program generates single-page + output (like Html, Markdown). Unfortunately, we get the irrelevant phrases in the output: + \"{\tt The problem is shown at the page ??}". + Users can declare `%%:skip` for such cases. +* \.`\bib[<label>]` or `\bib[<label>]<o-space>=<o-space>{<ignored>}` should open the new bib + record. More exactly, it closes previous paragraph (if h-mode is current) + and opens new h-mode. Then prints an auto-generated reference number in + `[...]`. Following text is interpreted as a bib record until the h-mode ends. +* \.`\cite[<labels>]` should create internal links to corresponding bib + records generated by `\usebib` or by `\bib`. The `<labels>` is a comma-separated list + of labels used in `.bib` files or in `\bib` commands to indicate + the corresponding bib record. The labels should be replaced by auto-generated + reference numbers used in bib records. All reference numbers created by + single `\cite` should be enclosed by single `[...]`. These numbers are + internal links. If the cnv-program does not implement this complicated + bib machinery then `\cite[<labels>]` should print only `[<labels>]`. +* \.`\rcite[<labels>]` does the same as `\cite[<labels>]` but doesn't print + outer `[...]`. +* \.`\ecite[<label>]{<text>}` creates the link to corresponding bib record, + `<text>` is is hyperlinked (no the auto-generated reference number). +* \.`\maketoc` should create a list of titles from all `\chap`, `\sec` and `\secc` + used in the document if they are not preceded by \.`\notoc`. All lines in + this list should include internal links to the position where the corresponding title + is used. +\enditems + +\secc Tables + +\begitems +* \.`\caption/<letter>` opens a caption. More exactly, if current mode is + h-mode, then switch to v-mode first (i.e.\ close the current paragraph). + Then switch from v-mode to h-mode and put a <caption-head>. The following + text should be interpreted as the caption text until h-mode ends. + If <letter> is `t` then <caption-head> is `Table` followed + by an auto-generated number. If the <letter> is `f` then <caption-head> is + `Figure` followed by an auto-generated number. The configuration of + cnv-programs shoud allow different words than default `Table` or `Figure` (for + example, if another language is used). +* \.`\table<ignored>{<declaration>}{<data>}` should create a table. The fidelity + rate of created output depends heavily on the used cnv-program and the output + format. We don't suppose that all aspects of \OpTeX/ tables are implemented. + The following features are listed in their priority of implementation. + \begitems \style c + * Items in `<data>` are separated by `&`. + The last item in each row is separated by end-row separator: \.`\cr`, \.`\crl`, \.`\crll`, + \.`\crli`, \.`\crlli`, or \.`\crlp{<list>}`. If there are $n$ columns in + the table then we have $n-1$ `&` separators and one end-row separator + for each table row. + There can be an optional end-row separator at the first item in `<data>` and + it should be ignored. The `<data>` can end without the end-row separator, it + should be added here. + * Spaces around `&` and before end-row separator are ignored. + * \.`\noalign{<text>}` and \.`\tskip <dimen>` should be ignored. + * Colum declarators in <declaration> should be interpreted: `l` (left aligned), `c` (center + aligned), `r` (right aligned) or `p{<ignored>}` (paragraph-like item). + * The `<number><letter>` or `<number>{<text>}` should be interpreted as + `<number>`-times repeated `<letter>` or `<text>` in `<declaration>`. + * \.`\vspan<decimal-number>{<text>}` should be an item with only `<text>`. + * \.`\mspan<number>[<decl>]{<text>}` should create `<text>` as an item which + spans over `<number>` columns. It is used instead `<number>` real + items, i.e.\ `<number>`$-1$ separators `&` aren't used here. + * Rules in the table should be interpreted, i.e. `|` in <declaration> + should be not ignored and + various end-row separators should be distinguished (see \optexmanual, + section 1.4.6). + * The aligning of `p{<p-data>}` columns should be interpreded by reading + \.`\fL`, \.`\fR`, \.`\fC`, \.`\fS` and \.`\fX` control sequences in `<p-data>`. + See \optexmanual, section 1.4.6. + \enditems +\enditems + +\secc Footnotes, marginal notes + +\begitems +* \.`\fnote{<text>}` should create a footnote link as an auto-generated + reference number. + The `<text>` should be appended at the end of the document labeled by this + reference number. Another alternative (for Html output, for example): the mouse over + the reference number riases an auto-popup `<text>`. +* \.`\fnotemark<number>` should create a pointer to a next declared + footnote as auto-generated reference number. The `<text>` of the footnote is + declared after that by \.`\fnotetext{<text>}`. Exact behavior: if the + reference number of the last processed `\fnote` is $n$ then + `\fnotemark<number>` uses the value + $n+{}$`<number>` as its reference number. A set of `\fnotemark`s + is followed by an equally large set of `\fnotetext{<text>}`. First one + have reference number $n+1$, second $n+2$, etc. When whole set of `\fnotetext{<text>}` + is processed then $n$ is reset to the last reference number used here. +* \.`\mnote <ignored>{<text>}` should be created as auto-popup `<text>` or the `<text>` + is inserted at the margin. +\enditems + +\secc Tagging for index + +We don't suppose that the cnv-program can generate the alphabetically sorted +index. So, the markup for creating the index should be ignored: + +\begitems +* \.`\ii <word><space>` (where `<word>` is a sequence of non-space characters) + should be ignored. +* \.`\iid <word><space>` is `<word><space>` by default, but + if `,` or `.` follows after `<space>` then the `<space>` is removed. +\enditems + +\secc Logos + +\.`\TeX`, \.`\LuaTeX`, \.`\OpTeX`, \.`\LaTeX`, respectively \: +`TeX`, `LuaTeX`, `OpTeX`, `LaTeX`, respectively. If `/` follows +these control sequences then it is ignored. Other logos should be declared +in the configuration of the cnv-program. + +\secc What should be ignored + +\begitems +* \.`\def<text>{<text>}` and other variants with \.`\gdef`, \.`\edef`, \.`\xdef`. + Reason: user can insert a special definition in the `%%:text` part of the + document in order to solve a problem. But cnv-program should ignore~it. +* \.`\outlines{<text>}`, \.`\insertoutline{<text>}` and \.`\thisoutline{<text>}`. +\enditems + + +\sec[math] Math mode processing + +There are two math modes, inline: `$<formula>$` or display: `$$<formula>$$`. +We suppose that `<formula>` will be processed by MathJax or similar +software. So, the `<formula>` should be kept without changes in cnv-program +output, but there are exceptions: + +\begitems +* `$<sign><decimal-number>$` should be transformed to non-math text + `<sign><decimal-number>`. The `<sign>` is~`+` or~`-` or nothing. + The `<decimal-number>` can include `,` (comma) instead `.` (period). + If the `<sign>` is~`-` (character U+002D) then + it must be converted to `−` (character U+2212, math minus). +* `{\bbchar <text>}` should be converted to `\mathbb{<text>}`, because + MathJax doesn't understand `\bbchar`. `$\bbchar <text>$` should be + converted to `$\mathbb{<text>}$`. +* `{\frak <text>}` or `$\frak <text>$` \: + `\mathfrak{<text>}` or `$\mathfrak{<text>}$`. +* `{\script <text>}` or `$\script <text>$` \: + `\mathscr{<text>}` or `$\mathscr{<text>}$`. +* `\eqmark`, `\eqmark[<label>]` \: `\leqno (<num>)`, where `<num>` is + auto-generated number. Or it should be completely ignored. +* It is strongly recommended to allow users to declare another replacement + rules over `<formula>` in configuration files of cnv-programs. +\enditems + + +\sec Notes on various conversions + +The cnv-programs behave differently because output formats have different +concepts and are intended for different purposes. The following sections +mention the main differences for typical conversions. + +\secc To Html + +The Html document is one single page. If we want to split the document to more +pages, then we can use `%%:do html <action>` in positions where the document +should be split (the syntax of `<action>` depends on the used cnv-program.) + +The design of Html pages should be declared by CSS files. + +Pictures inserted by `\inspic` should be inserted into the Html page as +\code{<img src="...">}, so the picture files must be installed in +the webserver to render the Html page correctly in a web browser. + +The `\maketoc` used in the \OpTeX/ document means that the Table of contents should +be here. It should be generated by the cnv-program, two-pass processing is +needed because the cnv-program needs to read all titles of `\chap`, `\sec` and +`\secc`. Another approach is to read the `.ref` file produced by \OpTeX/. + + +\secc To Markdown + +Markdown source file is \"one-page document" too. The principles a +re similar to conversion to Html. + +\secc From Markdown + +The cnv-program which does such a reverse conversion should be very useful for +people they prefer even clearer markup than in \OpTeX/. + +\secc To \LaTeX + +\LaTeX/ gives the same main feature as \OpTeX/: it can generate PDF +output from a source file. But different macros, a different concept, and +a different markup are used. + +The main reason for such conversion is that journal editors +require \LaTeX/ source file, but user want to prepare their real document in +more comfortable (\OpTeX/) markup and with more simple macros. + +This conversion should keep almost all features. For example, the +`\pgref[<label>]` is converted to `\pageref{<label>}`. The cnv-program +needs not to generate a Table of contents, bibliography references, etc. Only +appropriate \LaTeX/ markup must be used. + +The contents of generated \LaTeX/ preamble should be configurable. + + +\secc From \LaTeX + +The reverse conversion from \LaTeX/ to \OpTeX/ can be usable +for people, they want to switch to creating their documents in \OpTeX/. + +The cnv-program must solve additional problem in this type of conversion. +There are various math \LaTeX/ environments, they must be converted to +plain~\TeX/ syntax of math typesetting. For example:\nl +`\begin{array}...\end{array}` \: `\matrix{...}`,\nl +`\begin{align*}...\end{align*}` \: `$$\eqalign{...}$$`\nl +`\frac{...}{...}` \: `{...\over...}`. + +\bye diff --git a/macros/luatex/optex/doc/optex-doc.pdf b/macros/luatex/optex/doc/optex-doc.pdf index aacd564a60..4bd55547cb 100644 Binary files a/macros/luatex/optex/doc/optex-doc.pdf and b/macros/luatex/optex/doc/optex-doc.pdf differ diff --git a/macros/luatex/optex/doc/optex-doc.tex b/macros/luatex/optex/doc/optex-doc.tex index 4ce127f903..f8fcc45ca0 100644 --- a/macros/luatex/optex/doc/optex-doc.tex +++ b/macros/luatex/optex/doc/optex-doc.tex @@ -20,7 +20,7 @@ \tit Format Based on Plain \TeX/ and OPmac\fnotemark1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\hfill Version 0.19 +\hfill Version 1.00 \centerline{\it Petr Olšák, 2020, 2021} @@ -92,6 +92,8 @@ document \ulink[http://petr.olsak.net/ftp/olsak/optex/tex-nutshell.pdf] \notoc\nonum \sec Contents \maketoc +\thisoutline {USER DOCUMENTATION} + \chap User documentation \input optex-userdoc diff --git a/macros/luatex/optex/doc/optex-math.tex b/macros/luatex/optex/doc/optex-math.tex index c36459f74e..2fd21af218 100644 --- a/macros/luatex/optex/doc/optex-math.tex +++ b/macros/luatex/optex/doc/optex-math.tex @@ -13,7 +13,7 @@ \def\new #1 {\mnote{\Red$\blacktriangleleft$\,\sans\setfontsize{at9pt}\rm#1}} \fixmnotes\right \enquotes -\activettchar` +\verbchar` \catcode`\<=13 \def<#1>{$\langle\hbox{\it#1\/}\rangle$} \everyintt={\catcode`\<=13 } @@ -47,7 +47,7 @@ \tit Typesetting Math with \OpTeX/ -\hfill Version 02, October 2020 +\hfill Version 03, January 2021 \author Petr Olšák @@ -1475,7 +1475,7 @@ $$ \eqalignno{ \secc[fams] Math families -\TeX/can use more than one math font in math mode. This was a +\TeX/ can use more than one math font in math mode. This was a necessity in the old days when only 128-characters fonts existed. Each math font used in math mode has its \ii math/family {\em math family} represented by a number. Math family is a collection of three (almost) equal fonts in three sizes: diff --git a/macros/luatex/optex/doc/optex-techdoc.tex b/macros/luatex/optex/doc/optex-techdoc.tex index 2c0a71cc27..4ae25a9c7e 100644 --- a/macros/luatex/optex/doc/optex-techdoc.tex +++ b/macros/luatex/optex/doc/optex-techdoc.tex @@ -6,6 +6,8 @@ \load [doc.opm] +\thisoutline {TECHNICAL DOCUMENTATION} + \chap Technical documentation This documentation is written in the source files `*.opm` between diff --git a/macros/luatex/optex/doc/optex-userdoc.tex b/macros/luatex/optex/doc/optex-userdoc.tex index 8f2fe4d3d3..899b1d55aa 100644 --- a/macros/luatex/optex/doc/optex-userdoc.tex +++ b/macros/luatex/optex/doc/optex-userdoc.tex @@ -650,7 +650,7 @@ The \^`\url` macro prints its parameter in \~`\tt` font and creates a potential breakpoints in it (after slash or dot, for example). If the \^`\hyperlinks` declaration is used then the parameter of \^`\url` is treated as an external URL link. An example: `\url{http://www.olsak.net}` creates \url{http://www.olsak.net}. -The characters \code{\%}, `\`, `#`, `{` and `}` have to be protected by +The characters \code{\%}, `\`, `#`, `{`, and `}` have to be protected by backslash in the \^`\url` argument, the other special characters `~`, `^`, `&` can be written as single character\fnote {More exactly, there are the same rules as for `\code` command, see @@ -663,6 +663,8 @@ If the linked text have to be different than the URL, you can use `\ulink[http://petr.olsak.net/optex]{\OpTeX/ page}` outputs to the text \ulink[http://petr.olsak.net/optex]{\OpTeX/ page}. +The characters \code{\%}, `\`, `#`, `{`, and `}` must by escaped in +the <url> parameter. The PDF format provides {\em outlines} which are notes placed in the special frame of the PDF viewer. These notes can be managed as a structured and hyperlinked @@ -683,6 +685,11 @@ the main level~0. These entries can be placed before the table of contents (crea by \^`\outlines`) or after it. Their hyperlink destination is in the place where the \^`\insertoutline` macro is used. +The command \^`\thisoutline{<text>}` uses <text> in the outline instead of default +title text for the first following `\chap`, `\sec`, or `\secc`. +Special case: \^`\thisoutline{\relax}` doesn't create any outline for the following +`\chap`, `\sec`, or `\secc`. + \secc Lists %%%%%%%%%% @@ -768,9 +775,9 @@ These letters can be combined by the `|` character (vertical line). Example July & yacht & k\$ 170 \crl} \endtt % -generates the following result: +generates the result: -\medskip +\vskip-\medskipamount \noindent\hfil\table{||lc|r||}{ \crl Month & commodity & price \crli \tskip2pt January & notebook & \$ 700 \cr @@ -902,29 +909,28 @@ You can use this for creating tables like in the following example: & Exclusive & \mspan3[c|]{} &\mspan3[c|] X \crl \vspan2{II} & Informal & \mspan3[c|] X &\mspan3[c|] X \crlp{2-8} & Formal & \mspan6[c|] X \crl - \vspan2{III} & Informal & \vspan2 O & X & X &\mspan2[c|] X & \vspan2 O \crlp{2,4-7} + \vspan2{III} & Informal & \vspan2{O} & X & X &\mspan2[c|] X & \vspan2{O} \crlp{2,4-7} & Formal & &\mspan4[c|] X & \crl }}\pdfrestore} \hangindent=-7.5cm \hangafter=0 -The <number> parameter of \^`\vspan` must be one-digit number. -If you want to set more digits then use braces. -You can use non-integer values too if you feel that the -result is better, for example \^`\vspan{2.1}{text}`. +You can use \^`\vspan` with non-integer parameter too if you feel that the +result looks better, for example \^`\vspan2.1{text}`. \hangindent=-7.5cm \hangafter=0 The rule width of tables and implicit width of all `\vrule`s and `\hrule`s can be set by the command \^`\rulewidth=<dimen>`. The default value given by \TeX/ is 0.4\,pt. +\hangindent=-7.5cm \hangafter=-2 The `c`, `l`, `r` and `p` are default \"declaration letters" but you can define more such letters by `\def\_tabdeclare<letter>{<left>##<right>}`. More about it is in technical documentation in section~\ref[table.impl]. -See the definition of the \^`\tabdeclarec` macro, for example. +See the definition of the \^`\_tabdeclarec` macro, for example. The `:` columns boundary declarator is described in section~\ref[table.bound]. The tables with given width can be declared by `to<size>` or `pxto<size>`. -More about it is in section~\ref[table.w] +More about it is in section~\ref[table.w]. Many tips about tables can be seen on the site \url{http://petr.olsak.net/optex/optex-tricks.html}. @@ -935,7 +941,7 @@ The display verbatim text have to be surrounded by the \^`\begtt` and \^`\endtt` couple. The in-line verbatim have to be tagged (before and after) by a character which is declared by -\^`\activettchar``<char>`. For example \code{\\activettchar`} +\^`\verbchar``<char>`. For example \code{\\verbchar`} declares the character \code{`} for in-line verbatim markup. And you can use \code{`\\relax`} for @@ -974,7 +980,7 @@ the parameter of \^`\everytt` is read. So you don't have to worry about active categories in this parameter. There is an alternative to \^`\everytt` named \^`\everyintt` which is used for -in-line verbatim surrounded by an \^`\activettchar` or processed by the \~`\code` +in-line verbatim surrounded by an \^`\verbchar` or processed by the \~`\code` command. The \^`\everytt` is applied to all \^`\begtt...`\^`\endtt` environments (if it is not @@ -997,7 +1003,7 @@ Each occurrence of ? will be changed to ! and vice versa. @ \endtt -The in-line verbatim surrounded by an `\activettchar` doesn't work in +The in-line verbatim surrounded by a \^`\verbchar` doesn't work in parameter of macros and macro definitions. (It works in titles declared by \~`\chap`, \~`\sec` etc. and in \~`\fnote`s, because these macros are specially defined in \OpTeX/). @@ -1556,10 +1562,11 @@ coordinates `<x>`, `<y>`. More exactly the left edge of its baseline is at that position. \new -The \^`\putpic` `<x> <y> <width> <height> {<image>}` puts the `<image>` of given +The \^`\putpic` `<x> <y> <width> <height> {<image-file>}` puts an image +given by `<image-file>` (including extension) of given `<width>` and `<height>` at given position (its left-bottom corner). -You can write \^`\nospec` instead `<width>` or `<height>` if this parameter is -not given. +You can write \^`\nospec` instead `<width>` or `<height>` if this parameter +is not specified. \sec Others %%%%%%%%%%% @@ -1795,7 +1802,7 @@ put it as the first command in your document: ~endblock' % end of block of text ~begtt' % start a verbatim text ~endtt' % end verbatim text -~activettchar' X % initialization character X for in-text verbatim +~verbchar' X % initialization character X for in-text verbatim ~code' % another alternative for in-text verbatim ~verbinput' % verbatim extract from the external file ~begmulti' num % start multicolumn text (num columns) @@ -1873,7 +1880,8 @@ documentation. \^`\foreach` `<list>\do <parameters>{<what>}` is exapandable loop over <list>.\nl \^`\foreachdef` `\macro <parameters>{<what>}` declares expandable `\macro` as loop over <list>.\nl \^`\fornum` `<from>..<to>\do {<what>}` is expanadable loop with numeric variable.\nl -\^`\ignoreit` `<one>`, \^`\ignoresecond` `<one><two>`, \^`\usesecond` `<one><two>` ignores parameters.\nl +\^`\incr` `<counter>` increases and \^`\decr` `<counter>` decreases `<counter>` by one globally.\nl +\^`\ignoreit` `<one>`, \^`\ignoresecond` `<one><two>` ignores given parameter.\nl `\expandafter` \^`\ignorept` `\the<dimen>` expands to decimal number <dimen> without `pt`.\nl \~`\isempty`, \~`\istoksempty`, \~`\isequal`, \~`\ismacro`, \~`\isdefined`, \~`\isinlist` \~`\isfile`, \~`\isfont` do various tests. Example: \~`\isinlist\list{<text>}\iftrue` does @@ -1899,6 +1907,7 @@ documentation. \^`\slet` `{<stringA>}{<stringB>}` behaves like `\let\<stringA>=\<stringB>`\nl \^`\sxdef` `{<string>}<parameters>{<body>}` behaves like `\xdef\<string><parameters>{<body>}`.\nl \^`\trycs`` {<string>}{<text>}` expands `\<string>` if it is defined else expands <text>.\nl +\^`\useit` `<one>`, \^`\usesecond` `<one><two>` uses given parameter.\nl \^`\wlog`` {<text>}` writes <text> to .log file.\nl \^`\wterm`` {<text>}` writes <text> to the terminal and .log file.\nl \^`\xargs`` <what> <token> <token> ... ;` repeats <what><token> for each <token>.\nl diff --git a/macros/unicodetex/latex/texnegar/INSTALL.txt b/macros/unicodetex/latex/texnegar/INSTALL.txt index 30a096fb97..23e69ebe1f 100644 --- a/macros/unicodetex/latex/texnegar/INSTALL.txt +++ b/macros/unicodetex/latex/texnegar/INSTALL.txt @@ -1,7 +1,7 @@ texnegar -- INSTALL ====================== - Source: texnegar.dtx (2021-01-31 v0.1d) + Source: texnegar.dtx (2021-02-09 v0.1e) Author: Hossein Movahhedian Info: filecontents + macro + verbatim License: LPPL 1.3c diff --git a/macros/unicodetex/latex/texnegar/doc-ligature-texnegar.pdf b/macros/unicodetex/latex/texnegar/doc-ligature-texnegar.pdf index 1a2a98538c..49c7460249 100644 Binary files a/macros/unicodetex/latex/texnegar/doc-ligature-texnegar.pdf and b/macros/unicodetex/latex/texnegar/doc-ligature-texnegar.pdf differ diff --git a/macros/unicodetex/latex/texnegar/doc-ligature-xep.pdf b/macros/unicodetex/latex/texnegar/doc-ligature-xep.pdf index abe4facd9e..8cb68fb7f3 100644 Binary files a/macros/unicodetex/latex/texnegar/doc-ligature-xep.pdf and b/macros/unicodetex/latex/texnegar/doc-ligature-xep.pdf differ diff --git a/macros/unicodetex/latex/texnegar/doc-samples-glyph.pdf b/macros/unicodetex/latex/texnegar/doc-samples-glyph.pdf index 9461731e02..4cc8fcee48 100644 Binary files a/macros/unicodetex/latex/texnegar/doc-samples-glyph.pdf and b/macros/unicodetex/latex/texnegar/doc-samples-glyph.pdf differ diff --git a/macros/unicodetex/latex/texnegar/doc-samples-hrule.pdf b/macros/unicodetex/latex/texnegar/doc-samples-hrule.pdf index 25e9856e58..36c0969903 100644 Binary files a/macros/unicodetex/latex/texnegar/doc-samples-hrule.pdf and b/macros/unicodetex/latex/texnegar/doc-samples-hrule.pdf differ diff --git a/macros/unicodetex/latex/texnegar/doc-samples-xep.pdf b/macros/unicodetex/latex/texnegar/doc-samples-xep.pdf index e1dbc20a38..4cbeccc931 100644 Binary files a/macros/unicodetex/latex/texnegar/doc-samples-xep.pdf and b/macros/unicodetex/latex/texnegar/doc-samples-xep.pdf differ diff --git a/macros/unicodetex/latex/texnegar/texnegar-doc.ltx b/macros/unicodetex/latex/texnegar/texnegar-doc.ltx index 6b38d66e34..124d153bef 100644 --- a/macros/unicodetex/latex/texnegar/texnegar-doc.ltx +++ b/macros/unicodetex/latex/texnegar/texnegar-doc.ltx @@ -63,7 +63,7 @@ } } -\date{Released \quad 2021-01-31 \quad v0.1d} +\date{Released \quad 2021-02-09 \quad v0.1e} \definecolor{HMhighlightBlueI}{rgb}{0,0,1} \definecolor{HMhighlightbgYellowII}{rgb}{1,1,1} @@ -535,6 +535,12 @@ I also would like to thank the developer teams of TeX's friends especially LaTeX fonts other than \textsf{HM Series} and \textsf{Adobe Arab}. \end{Itemize} +\SubSecItem{2021-02-09~v0.1e} +\begin{Itemize} + \item Fixed the problem of inserting the kashida before the diacritical marks. Now, after stretching, + the diacritical marks appear before kashida. +\end{Itemize} + \section*{To Do's} To do diff --git a/macros/unicodetex/latex/texnegar/texnegar-doc.pdf b/macros/unicodetex/latex/texnegar/texnegar-doc.pdf index 75a809b26d..fcf76c2da5 100644 Binary files a/macros/unicodetex/latex/texnegar/texnegar-doc.pdf and b/macros/unicodetex/latex/texnegar/texnegar-doc.pdf differ diff --git a/macros/unicodetex/latex/texnegar/texnegar-luatex-glyph.pdf b/macros/unicodetex/latex/texnegar/texnegar-luatex-glyph.pdf index 38f55ce7ae..453573d8c2 100644 Binary files a/macros/unicodetex/latex/texnegar/texnegar-luatex-glyph.pdf and b/macros/unicodetex/latex/texnegar/texnegar-luatex-glyph.pdf differ diff --git a/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-glyph.pdf b/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-glyph.pdf index d2175bb022..6f6bd2823e 100644 Binary files a/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-glyph.pdf and b/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-glyph.pdf differ diff --git a/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-hrule.pdf b/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-hrule.pdf index 245750465a..222eb78108 100644 Binary files a/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-hrule.pdf and b/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-hrule.pdf differ diff --git a/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-glyph.pdf b/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-glyph.pdf index b27a5a2d23..f4ca7ba05f 100644 Binary files a/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-glyph.pdf and b/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-glyph.pdf differ diff --git a/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf b/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf index 8ebdff53b3..0cbd1edd49 100644 Binary files a/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf and b/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf differ diff --git a/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf b/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf index e45da3f31f..dd10b46f26 100644 Binary files a/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf and b/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf differ diff --git a/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf b/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf index 16a3d0bac9..dce968d0d8 100644 Binary files a/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf and b/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf differ diff --git a/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf b/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf index b76e2e3e15..8359e4ca0f 100644 Binary files a/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf and b/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf differ diff --git a/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf b/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf index db2648da2d..09b90cf079 100644 Binary files a/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf and b/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf differ diff --git a/macros/unicodetex/latex/texnegar/texnegar.dtx b/macros/unicodetex/latex/texnegar/texnegar.dtx index 40a5baef1c..1024a64dce 100644 --- a/macros/unicodetex/latex/texnegar/texnegar.dtx +++ b/macros/unicodetex/latex/texnegar/texnegar.dtx @@ -101,7 +101,7 @@ make time to fix. % }^^A % } % -% \date{Released \quad 2021-01-31 \quad v0.1d} +% \date{Released \quad 2021-02-09 \quad v0.1e} % % \maketitle % @@ -137,7 +137,7 @@ make time to fix. \RequirePackage{newverbs}[2010/09/02] \RequirePackage{environ}[2014/05/04] -\ProvidesExplPackage {texnegar} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX } +\ProvidesExplPackage {texnegar} {2021-02-09} {0.1e} { Full implementation of kashida feature in XeLaTex and LuaLaTeX } \sys_if_engine_luatex:T { @@ -165,7 +165,7 @@ make time to fix. % % \begin{macrocode} %<*texnegar-luatex-sty> -\ProvidesExplPackage {texnegar-luatex} {2021-01-31} {0.1d} { Full implementation of kashida feature in xetex and luatex } +\ProvidesExplPackage {texnegar-luatex} {2021-02-09} {0.1e} { Full implementation of kashida feature in xetex and luatex } \tex_input:D { texnegar-ini.tex } @@ -201,7 +201,7 @@ make time to fix. % \begin{macrocode} %<*texnegar-xetex-sty> \RequirePackage{zref-savepos}[2020-03-03] -\ProvidesExplPackage {texnegar-xetex} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX } +\ProvidesExplPackage {texnegar-xetex} {2021-02-09} {0.1e} { Full implementation of kashida feature in XeLaTex and LuaLaTeX } \tex_input:D { texnegar-ini.tex } @@ -218,7 +218,7 @@ make time to fix. % % \begin{macrocode} %<*texnegar-ini-tex> -\ProvidesExplFile {texnegar-ini.tex} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX } +\ProvidesExplFile {texnegar-ini.tex} {2021-02-09} {0.1e} { Full implementation of kashida feature in XeLaTex and LuaLaTeX } \def\TeXNegar{\TeX Negar} @@ -653,6 +653,7 @@ make time to fix. \bool_if:NF \l_texnegar_minimal_bool { + \directlua{dofile(kpse.find_file("luatex-tools.lua"))} \input texnegar-luabidi.tex } @@ -663,7 +664,7 @@ make time to fix. % \subsection{File: \texttt{texnegar-common-kashida.tex}} % \begin{macrocode} %<*texnegar-common-kashida-tex> -\ProvidesExplFile {texnegar-common-kashida.tex} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX } +\ProvidesExplFile {texnegar-common-kashida.tex} {2021-02-09} {0.1e} { Full implementation of kashida feature in XeLaTex and LuaLaTeX } \bool_if:NT \l_texnegar_ligature_bool { @@ -740,7 +741,7 @@ make time to fix. % % \begin{macrocode} %<*texnegar-xetex-kashida-tex> -\ProvidesExplFile {texnegar-xetex-kashida.tex} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX } +\ProvidesExplFile {texnegar-xetex-kashida.tex} {2021-02-09} {0.1e} { Full implementation of kashida feature in XeLaTex and LuaLaTeX } \newXeTeXintercharclass \c_texnegar_d_charclass % dual-joiner class \newXeTeXintercharclass \c_texnegar_l_charclass % lam @@ -961,8 +962,8 @@ make time to fix. -- local texnegar_char_table = texnegar_char_table -- texnegar_char_table.module = { -- name = "texnegar_char_table", --- version = "0.1d", --- date = "2021-01-31", +-- version = "0.1e", +-- date = "2021-02-09", -- description = "Full implementation of kashida feature in XeLaTex and LuaLaTeX", -- author = "Hossein Movahhedian", -- copyright = "Hossein Movahhedian", @@ -975,6 +976,31 @@ make time to fix. -- texnegar_char_table.warning = warn or (function (s) luatexbase.module_warning("texnegar_char_table", s) end) -- texnegar_char_table.error = err or (function (s) luatexbase.module_error("texnegar_char_table", s) end) +local peCharTableDiacritic = { + [1611] = utf8.char(1611), -- "ً", utf8.codepoint("ً") == 1611, "\u{064B}", ARABIC-FATHATAN + [1612] = utf8.char(1612), -- "ٌ", utf8.codepoint("ٌ") == 1612, "\u{064C}", ARABIC-DAMMATAN + [1613] = utf8.char(1613), -- "ٍ", utf8.codepoint("ٍ") == 1613, "\u{064D}", ARABIC-KASRATAN + [1614] = utf8.char(1614), -- "َ", utf8.codepoint("َ") == 1614, "\u{064E}", ARABIC-FATHA + [1615] = utf8.char(1615), -- "ُ", utf8.codepoint("ُ") == 1615, "\u{064F}", ARABIC-DAMMA + [1616] = utf8.char(1616), -- "ِ", utf8.codepoint("ِ") == 1616, "\u{0650}", ARABIC-KASRA + [1617] = utf8.char(1617), -- "ّ", utf8.codepoint("ّ") == 1617, "\u{0651}", ARABIC-SHADDA + [1618] = utf8.char(1618), -- "ْ", utf8.codepoint("ْ") == 1618, "\u{0652}", ARABIC-SUKUN + [1619] = utf8.char(1619), -- "ٓ", utf8.codepoint("ٓ") == 1619, "\u{0653}", ARABIC-MADDA ABOVE + [1620] = utf8.char(1620), -- "ٔ", utf8.codepoint("ٔ") == 1620, "\u{0654}", ARABIC-HAMZA ABOVE + [1621] = utf8.char(1621), -- "ٕ", utf8.codepoint("ٕ") == 1621, "\u{0655}", ARABIC-HAMZA BELOW + [1622] = utf8.char(1622), -- "ٖ", utf8.codepoint("ٖ") == 1622, "\u{0656}", ARABIC-SUBSCRIPT ALEF + [1623] = utf8.char(1623), -- "ٗ", utf8.codepoint("ٗ") == 1623, "\u{0657}", ARABIC-INVERTED DAMMA + [1624] = utf8.char(1624), -- "٘", utf8.codepoint("٘") == 1624, "\u{0658}", ARABIC-MARK NOON GHUNNA + [1625] = utf8.char(1625), -- "ٙ", utf8.codepoint("ٙ") == 1625, "\u{0659}", ARABIC-ZWARAKAY + [1648] = utf8.char(1648), -- "", utf8.codepoint("") == 1648, "\u{0670}", ARABIC-SUPERSCRIPT ALEF + [64606] = utf8.char(64606), -- "", utf8.codepoint("") == 64606, "\u{FC5E}", ARABIC-LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM + [64607] = utf8.char(64607), -- "", utf8.codepoint("") == 64607, "\u{FC5F}", ARABIC-LIGATURE SHADDA WITH KASRATAN ISOLATED FORM + [64608] = utf8.char(64608), -- "", utf8.codepoint("") == 64608, "\u{FC60}", ARABIC-LIGATURE SHADDA WITH FATHA ISOLATED FORM + [64609] = utf8.char(64609), -- "", utf8.codepoint("") == 64609, "\u{FC61}", ARABIC-LIGATURE SHADDA WITH DAMMA ISOLATED FORM + [64610] = utf8.char(64610), -- "", utf8.codepoint("") == 64610, "\u{FC62}", ARABIC-LIGATURE SHADDA WITH KASRA ISOLATED FORM + [64611] = utf8.char(64611), -- "", utf8.codepoint("") == 64611, "\u{FC63}", ARABIC-LIGATURE SHADDA WITH SUPERSCRIPT ALEF ISOLATED FORM +} + local peCharTableDigit = { [1632] = utf8.char(1632), -- "٠", utf8.codepoint("٠") == 1632, "\u{0660}", ARABIC-INDIC DIGIT ZERO [1633] = utf8.char(1633), -- "١", utf8.codepoint("١") == 1633, "\u{0661}", ARABIC-INDIC DIGIT ONE @@ -1157,7 +1183,7 @@ local peCharTableFinal = { [65276] = utf8.char(65276), -- "ﻼ", utf8.codepoint("ﻼ") == 65276, "\u{FEFC}", FINAL FORM LIGATURE LAM WITH ALEF } -return peCharTableInitial, peCharTableMedial, peCharTableFinal +return peCharTableInitial, peCharTableMedial, peCharTableFinal, peCharTableDiacritic -- -- -- End of file `texnegar-char-table.lua'. @@ -1186,8 +1212,8 @@ return peCharTableInitial, peCharTableMedial, peCharTableFinal -- local texnegar = texnegar -- texnegar.module = { -- name = "texnegar", --- version = "0.1d", --- date = "2021-01-31", +-- version = "0.1e", +-- date = "2021-02-09", -- description = "Full implementation of kashida feature in XeLaTex and LuaLaTeX", -- author = "Hossein Movahhedian", -- copyright = "Hossein Movahhedian", @@ -1338,8 +1364,8 @@ dofile(kpse.find_file("texnegar-ini.lua")) -- local texnegar_ini = texnegar_ini -- texnegar_ini.module = { -- name = "texnegar_ini", --- version = "0.1d", --- date = "2021-01-31", +-- version = "0.1e", +-- date = "2021-02-09", -- description = "Full implementation of kashida feature in XeLaTex and LuaLaTeX", -- author = "Hossein Movahhedian", -- copyright = "Hossein Movahhedian", @@ -1392,8 +1418,8 @@ dofile(kpse.find_file("texnegar-luatex-kashida.lua")) -- local texnegar_luatex_kashida = texnegar_luatex_kashida -- texnegar_luatex_kashida.module = { -- name = "texnegar_luatex_kashida", --- version = "0.1d", --- date = "2021-01-31", +-- version = "0.1e", +-- date = "2021-02-09", -- description = "Full implementation of kashida feature in XeLaTex and LuaLaTeX", -- author = "Hossein Movahhedian", -- copyright = "Hossein Movahhedian", @@ -1406,7 +1432,7 @@ dofile(kpse.find_file("texnegar-luatex-kashida.lua")) -- texnegar_luatex_kashida.warning = warn or (function (s) luatexbase.module_warning("texnegar_luatex_kashida", s) end) -- texnegar_luatex_kashida.error = err or (function (s) luatexbase.module_error("texnegar_luatex_kashida", s) end) -local peCharTableInitial, peCharTableMedial, peCharTableFinal = dofile(kpse.find_file("texnegar-char-table.lua")) +local peCharTableInitial, peCharTableMedial, peCharTableFinal, peCharTableDiacritic = dofile(kpse.find_file("texnegar-char-table.lua")) local kashida_unicode = 1600 local kashida_subtype = 256 @@ -1417,6 +1443,7 @@ local GLUE = node_id("glue") local GLYPH = node_id("glyph") local HLIST = node_id("hlist") local RULE = node_id("rule") +local VLIST = node_id("vlist") local WHATSIT = node_id("whatsit") local l_texnegar_kashida_glyph_bool = token.create("l_texnegar_kashida_glyph_bool") @@ -1519,11 +1546,11 @@ function ProcessTableKashidaHlist(ksh_hlistNode, hbox_num, in_font) local tn_id = tn.id local tn_subtype = tn.subtype - if tn_id == 0 then + if tn_id == HLIST then for tp in node.traverse(tn.head) do local tp_id = tp.id local tp_subtype = tp.subtype - if tp_id == 29 then + if tp_id == GLYPH then if l_texnegar_color_bool.mode == c_true_bool.mode then local col_str = color_tbl[1] .. " " .. color_tbl[2] .. " " .. color_tbl[3] local col_str_rg = col_str .. " rg " @@ -1555,17 +1582,17 @@ function ProcessTableKashidaHlist(ksh_hlistNode, hbox_num, in_font) tn_width = tn.width ksh_hlistNode.width = tn_width end - elseif tp_id == 0 then + elseif tp_id == HLIST then if tp.subtype ~= 3 then tbl_kashida_hlist_nodes[ #tbl_kashida_hlist_nodes + 1 ] = tp end end end - elseif tn_id == 1 then + elseif tn_id == VLIST then do end - elseif tn_id == 8 then + elseif tn_id == WHATSIT then do end - elseif tn_id == 29 then + elseif tn_id == GLYPH then if l_texnegar_color_bool.mode == c_true_bool.mode then local col_str = color_tbl[1] .. " " .. color_tbl[2] .. " " .. color_tbl[3] local col_str_rg = col_str .. " rg " @@ -1681,13 +1708,28 @@ function StretchGlyph(t_plb_node, t_plb_glyph_node, t_gluePerJoiner, t_dir, t_fi node_glue.leader.dir = t_dir - node.insert_after(t_plb_node.list, t_plb_glyph_node, node_glue) + local t_plb_glyph_node_next = t_plb_glyph_node.next + local t_plb_glyph_node_next_id = t_plb_glyph_node_next.id + if not t_plb_glyph_node_next then + node.insert_after(t_plb_node.list, t_plb_glyph_node, node_glue) + else + if t_plb_glyph_node_next_id == GLYPH then + local t_plb_glyph_node_next_char = t_plb_glyph_node_next.char + if peCharTableDiacritic[t_plb_glyph_node_next_char] then + node.insert_after(t_plb_node.list, t_plb_glyph_node_next, node_glue) + else + node.insert_after(t_plb_node.list, t_plb_glyph_node, node_glue) + end + else + node.insert_after(t_plb_node.list, t_plb_glyph_node, node_glue) + end + end if t_filler == "leaders+hrule" then for tn in node.traverse(t_plb_node.head) do local tn_id = tn.id local tn_subtype = tn.subtype - if tn_id == 12 and tn_subtype == 100 then + if tn_id == GLUE and tn_subtype == 100 then local t_hbox = node.new(HLIST) local t_hrule = node.copy(tn) @@ -1731,20 +1773,20 @@ function GetFillerSpec(t_plb_node, t_plb_head_node, t_tbl_line_fields, t_CharTab for p in node.traverse(t_plb_head_node) do local p_id = p.id local p_subtype = p.subtype - if p_id == 0 then + if p_id == HLIST then t_tbl_line_fields.lineWidthRemainder = t_tbl_line_fields.lineWidthRemainder - p.width if p.subtype ~= 3 then tbl_hlist_nodes[ #tbl_hlist_nodes + 1 ] = p end - elseif p_id == 1 then + elseif p_id == VLIST then t_tbl_line_fields.lineWidthRemainder = t_tbl_line_fields.lineWidthRemainder - p.width tbl_vlist_nodes[ #tbl_vlist_nodes + 1 ] = p - elseif p_id == 12 then + elseif p_id == GLUE then tbl_p_glue = GetGlue(p, t_plb_node) t_tbl_line_fields.lineWidthRemainder = t_tbl_line_fields.lineWidthRemainder - tbl_p_glue["effective_glue"] t_tbl_line_fields.total_glues = t_tbl_line_fields.total_glues + 1 t_tbl_line_fields.stretchedGlue = t_tbl_line_fields.stretchedGlue + tbl_p_glue["delta"] - elseif p_id == 29 then + elseif p_id == GLYPH then tbl_p_glyph, t_tbl_line_fields = GetGlyph(p, t_tbl_line_fields, t_CharTableInitial, t_CharTableMedial, t_CharTableFinal) selected_font_old = selected_font selected_font = tbl_p_glyph["font"] @@ -1781,7 +1823,7 @@ function ProcessTableHlist(tmphl_n) local tbl_p_glue, tbl_p_glyph - if (tmphl_n_id == 0) and (tmphl_n_subtype == 1 or tmphl_n_subtype == 2) then + if (tmphl_n_id == HLIST) and (tmphl_n_subtype == 1 or tmphl_n_subtype == 2) then tbl_line_fields.line_width = tmphl_n.width tbl_line_fields.line_dir = tmphl_n.dir tbl_line_fields.lineWidthRemainder = tbl_line_fields.line_width @@ -1846,9 +1888,9 @@ function ProcessTableVlist(tmpvl_n) local tmpvl_n_subtype = tmpvl_n.subtype for vbNode in node.traverse(tmpvl_n) do - if vbNode.id == 1 and vbNode.subtype == 0 then + if vbNode.id == VLIST and vbNode.subtype == 0 then for tr_vbNode in node.traverse(vbNode.head) do - if (tr_vbNode.id == 0) and (tr_vbNode.subtype == 1 or tr_vbNode.subtype == 2) then + if (tr_vbNode.id == HLIST) and (tr_vbNode.subtype == 1 or tr_vbNode.subtype == 2) then ProcessTableHlist(tr_vbNode) end end diff --git a/macros/unicodetex/latex/texnegar/texnegar.pdf b/macros/unicodetex/latex/texnegar/texnegar.pdf index 3abdf6da0b..a5c1d33ee5 100644 Binary files a/macros/unicodetex/latex/texnegar/texnegar.pdf and b/macros/unicodetex/latex/texnegar/texnegar.pdf differ diff --git a/macros/unicodetex/latex/texnegar/xepersian-XB.pdf b/macros/unicodetex/latex/texnegar/xepersian-XB.pdf index 18a3e065fa..1cad32f51d 100644 Binary files a/macros/unicodetex/latex/texnegar/xepersian-XB.pdf and b/macros/unicodetex/latex/texnegar/xepersian-XB.pdf differ -- cgit v1.2.3