diff options
-rw-r--r-- | texmf-dist/doc/latex/aeb-mlink/README.md | 7 | ||||
-rw-r--r-- | texmf-dist/doc/latex/aeb-mlink/aebmlink_man.pdf | bin | 328132 -> 309586 bytes | |||
-rw-r--r-- | texmf-dist/doc/latex/aeb-mlink/aebmlink_man.tex (renamed from texmf-dist/source/latex/aeb-mlink/doc/aebmlink_man.tex) | 80 | ||||
-rw-r--r-- | texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst.pdf | bin | 66094 -> 62931 bytes | |||
-rw-r--r-- | texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst.tex | 9 | ||||
-rw-r--r-- | texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst_url.pdf | bin | 37152 -> 35662 bytes | |||
-rw-r--r-- | texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst_url.tex | 11 | ||||
-rw-r--r-- | texmf-dist/source/latex/aeb-mlink/aeb_mlink.dtx | 919 | ||||
-rw-r--r-- | texmf-dist/source/latex/aeb-mlink/aeb_mlink.ins | 2 | ||||
-rw-r--r-- | texmf-dist/source/latex/aeb-mlink/doc/aebmlink_man.pdf | bin | 129039 -> 0 bytes | |||
-rw-r--r-- | texmf-dist/tex/latex/aeb-mlink/aeb-mlink.sty | 57 | ||||
-rw-r--r-- | texmf-dist/tex/latex/aeb-mlink/aeb_mlink.sty | 1798 |
12 files changed, 1545 insertions, 1338 deletions
diff --git a/texmf-dist/doc/latex/aeb-mlink/README.md b/texmf-dist/doc/latex/aeb-mlink/README.md index 58255db7..5903461b 100644 --- a/texmf-dist/doc/latex/aeb-mlink/README.md +++ b/texmf-dist/doc/latex/aeb-mlink/README.md @@ -1,6 +1,6 @@ Package: aeb_mlink Author: D. P. Story -Dated: 2018/04/26 +Dated: 2018/08/18 The aeb_mlink package defines new link commands to create multi-line links. The new commands are \mlhypertext, \mlhyperlink, \mlhyperref, \mlnameref, @@ -8,6 +8,11 @@ The new commands are \mlhypertext, \mlhyperlink, \mlhyperref, \mlnameref, PDF Creators: Adobe Distiller or ps2pdf +What's New (2018/08/18): Created \turnSyllbCntOn (\turnSyllbCntOff) to turn +on (resp., off) the viewing of syllable numbers. Reorganize core program to +accommodate the use of \mlhypertext command within the program code of +annot_pro. (This is to implement text markup annotations in that package.) + What's New (2018/04/26): Included a 'dummy' package named aeb-mlink. The aeb_mlink package is listed on CTAN as aeb-mlink, though there is no such package by that name. Well, now there is. diff --git a/texmf-dist/doc/latex/aeb-mlink/aebmlink_man.pdf b/texmf-dist/doc/latex/aeb-mlink/aebmlink_man.pdf Binary files differindex 2cd55b33..b672ae4a 100644 --- a/texmf-dist/doc/latex/aeb-mlink/aebmlink_man.pdf +++ b/texmf-dist/doc/latex/aeb-mlink/aebmlink_man.pdf diff --git a/texmf-dist/source/latex/aeb-mlink/doc/aebmlink_man.tex b/texmf-dist/doc/latex/aeb-mlink/aebmlink_man.tex index 5190c8fa..6957dcf2 100644 --- a/texmf-dist/source/latex/aeb-mlink/doc/aebmlink_man.tex +++ b/texmf-dist/doc/latex/aeb-mlink/aebmlink_man.tex @@ -11,10 +11,16 @@ %\usepackage{myriadpro} \usepackage[altbullet]{lucidbry} +\usepackage{xbmks} + +\DeclareInitView{layoutmag={navitab:UseOutlines}} +\xbmksetup{colors={int=red},styles={intbf}} + \usepackage{acroman} -\def\amtIndent{15pt} +%\def\amtIndent{15pt} +\edef\amtIndent{\the\leftmargini} \usepackage[active]{srcltx} @@ -27,7 +33,7 @@ subject={Wrapping links around to the next line}, keywords={multi-line links, quad points, latex, pdf, aeb}, talksite={\url{www.acrotex.net}}, - version={2.3, 2018/04/26}, + version={2.3.4, 2018/08/18}, copyrightStatus={True}, copyrightNotice={Copyright (C) 2006-\the\year, D. P. Story}, copyrightInfoURL={http://www.acrotex.net} @@ -146,6 +152,15 @@ _path=_path.substring(0,pos)+"/"+manualfilename; \maketitle +\pdfbookmarkx[1]{Title Page}[action={\Named{FirstPage}}]{TitlePage} +\pdfbookmarkx[1]{Links to AcroTeX.Net}[action={/S/GoTo/D(undefined)},% + color=magenta,style={bf}]{acrotex} +\belowpdfbookmarkx{http://www.acrotex.net}[action={\URI{http://www.acrotex.net}},% + color=magenta,style={bf}]{home} +\belowpdfbookmarkx{http://blog.acrotex.net}[action={\URI{http://blog.acrotex.net}},% + color=magenta,style={bf}]{blog} + + \selectColors{linkColor=black} \tableofcontents @@ -655,8 +670,8 @@ for an individual link, use the key-value pairs \verb~\mlfix{y}~ to turn on the fix and \verb~\mlfix{n}~ to turn it off. These key-values are placed as an optional argument of any of the \cs{ml\ameta{cmdname}} commands. For example, -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -\mlhypertext[!textbf(\mlfix{n})\A{\JS{app.alert("And so it is");}} +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars={!@^}] +\mlhypertext[!textbf@\mlfix{n}^\A{\JS{app.alert("And so it is");}} \linktxtcolor{}\W1\H{O}\S{S}\Color{red}]{the acrotex website is free to all} \end{Verbatim} @@ -669,8 +684,9 @@ You can simple increase the vertical dimensions of the boxes by \verb~\mlstrut{\large\strut}~ or \verb~\mlstrut{\huge\strut}~. \mlhypertext[\A{\JS{app.alert("And so it is");}}\mlstrut{\large\strut}\linktxtcolor{}\W1\H{O}\S{S}\Color{red}] {The acrotex website is free to all} link should have vertically expanded rectangles. -\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] -\mlhypertext[!textbf(\mlstrut{\large\strut})\A{\JS{app.alert("And so it is");}} +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars={!@^}] +\mlhypertext[!textbf@\mlstrut{\large\strut}^ +\A{\JS{app.alert("And so it is");}} \linktxtcolor{}\W1\H{O}\S{S}\Color{red}]{The acrotex website is free to all} \end{Verbatim} @@ -712,6 +728,39 @@ link will be a tiny `L\ameta{num}'. The format for this little `L\ameta{num}' is determined by the internal command \cs{ml@MrkLnk}; it may redefined as desired. + +\paragraph*{Viewing the syllable numbers.} You can display the syllable numbers of multi-line +hypertext by expanding \cs{turnSyllbCntOn}; \cs{turnSyllbCntOff} turns off this feature again. +For example, we expand \cs{turnSyllbCntOn} in a group: +\begin{quote} +\turnSyllbCntOn\mlhypertext{We have set {\cs{turnSyllbCntOn}} +in a group so the effects are not felt after the group}. +\end{quote} +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small] +\begin{quote}\turnSyllbCntOn +\mlhypertext{We have set {\cs{turnSyllbCntOn}} in a +group so the effects are not felt after the group}. +\end{quote} +\end{Verbatim} +The sentence has 10 syllables, as counted by \pkg{soul} and \pkg{aeb\_mlink}. It should be noted that +\cs{turnSyllbCntOn} also executes \cs{mlMarksOn}. This feature may be useful for determining where to +break a link across pages, see the next paragraph. + +Notice we've enclose \verb~\cs{turnSyllbCntOn}~ in braces, as a reault, \pkg{soul} treats the contents +as a single syllable. If we want to break this long command across a line (or page), we would have to register +the command \cs{cs} with \cs{soulregister}: +\begin{quote}\turnSyllbCntOn\soulregister{\cs}{1} +\mlhypertext[\A{\JS{app.alert("...and it was so")}}]{Register \cs{cs} with \cs{soulregister} to have the command name \cs{turnSyllbCntOn} +break across lines (or pages).} +\end{quote} +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small] +\begin{quote}\turnSyllbCntOn\soulregister{\cs}{1} % global declaration +\mlhypertext{Register \cs{cs} with \cs{soulregister} to have +the command name \cs{turnSyllbCntOn} break across lines (or pages).} +\end{quote} +\end{Verbatim} + + \mlMarksOn \paragraph*{Multi-line links that break across pages.}\label{para:xpage} This phenomenon is not @@ -736,18 +785,23 @@ and can't be missed. The link is not constructed. You can see here, there is a r to \texttt{mLink4}. You need to turn on link marking (\cs{mlMarksOn}) or just go to page~2 and look at the bottom of the page. -\subparagraph*{Fixing a cross-page link.}\label{spara:fixxpage} There are several actions you can +\subparagraph*{Fixing a cross-page link.}\label{spara:fixxpage} There are a couple of action choices you can take to fix a link that has crossed a page boundary: (1) rewrite the -paragraph so the link does not cross the page boundary; (2) as the log file suggests, you +paragraph so the link does not cross the page boundary; (2) manually break the link; (3) do as the log file suggests, you can use the \cs{mlcrackat\darg{4}} option. In this latter case, for example, \begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()] \mlhypertext[\mlcrackat{4}\mlhyph{y}!ameta(other-opts)] {Doctor Story created the acrotex website.} \end{Verbatim} +\begin{quote}\turnSyllbCntOn\def\pb{\penalty-10 \\\rule[2pt]{\linewidth-\widthof{\ (page break)}}{.4pt}\ \makebox[0pt][l]{(page break)}\\[3pt]}% +\ameta{latex-content}\dotfill\mlhypertext[\mlcrackat{4}\mlhyph{y}\mlcrackinsat{\pb}] + {Doctor Story created the acrotex website.} +\end{quote} Two links are created, the first consisting of the text `Doctor Story cre-' and the second on `ated the acrotex website.'; the second link (should) be -inserted on the next page. The link option \cs{mlhyp\darg{y}} inserts an -hyphen at the break point. For URLs, a hyphen may not be appropriate. +inserted on the next page. The link option \cs{mlhyp\darg{y}} inserts a +hyphen at the break point; for URLs, a hyphen may not be appropriate. +\textbf{Question:} What is the missing \ameta{other-opts} in the above example? %\kern7pt @@ -818,7 +872,7 @@ To illustrate, we reference the section title ``\mlnameref{ss:probs}.'' The verb {\textbackslash{mlnameref}, \textbackslash{mlNameref}, and \textbackslash{mlhypertext}}}\label{ss:probs} \end{Verbatim} -Observe use of \cs{texorpdfstring}, the first argument is typeset, the second +Observe the use of \cs{texorpdfstring}, the first argument is typeset, the second one is placed in the bookmarks. \begin{itemize} \item On the first argument of \cs{texorpdfstring}, we focus our comments @@ -868,6 +922,6 @@ My humble retirement \hypertarget{retire}{home}. \newtopic\noindent Now, I simply must get back to my retirement. \dps - - \end{document} + +\def\mlMaxNSylls{30} diff --git a/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst.pdf b/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst.pdf Binary files differindex 5f2e7d64..02be88e9 100644 --- a/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst.pdf +++ b/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst.pdf diff --git a/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst.tex b/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst.tex index 4c74a11a..e2a2a4ec 100644 --- a/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst.tex +++ b/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst.tex @@ -46,7 +46,6 @@ next line. Now, I'll \mlhypertext[\A{\JS{app.alert("Second Link")}}]{insert a multi-line link.}\footnote{Techniques by D. P. Story} Can we continue with this? Yes, so says D. P. Story. - This paragraph contains two links that go beyond the \mlhypertext[\A{\JS{app.alert("Third Link")}}]{margins of this text width}, so it wraps around to the next line. Let's try a numbered equation: @@ -60,12 +59,10 @@ multiline type.}\footnote{D.P. Story is very nice fellow, but he has a rather compliments} so we don't inflate his ego more.} Can we continue with this? Yes, so says D. P. Story. +%\turnSyllbCntOn On the next page, we try multiple column format. - -\goodbreak - -\mlhypertext[\S{U}\W{1}\Color{0 0.6 0}\A{\JS{app.alert(\Msgii)}}]{Welcome my friends to my residence, humble as it is. The encyclopedia is a wonderful book.} +\mlhypertext[\mlcrackat{3}\S{U}\W{1}\Color{0 0.6 0}\A{\JS{app.alert(\Msgii)}}]{Welcome my friends to my residence, humble as it is. The encyclopedia is a wonderful book.} We shall study it closely during your visit. Try this great link: \mlhypertext[\A{\JS{app.alert("Yes, they do!");}}]{J\"{u}rgen, \LaTeX{} and @@ -118,7 +115,7 @@ this section. I take that back, below are notes and problem areas: \begin{enumerate} \item It is possible to break multi-line links across page boundaries, see - the \href{http://www.acrotex.net/blog/?p=1383}{{Acro\!\TeX} Blog} article + the \href{http://www.acrotex.net/blog/?p=1383}{{Acro\!\TeX} Blog} article \textsl{\mlhref{http://www.acrotex.net/blog/?p=1383}{Crossing page boundaries with multi-line links}} for a demo file of this. \item See the \textsf{soul} package documentation for limitations on the arguments of the \cs{mlxx} commands. diff --git a/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst_url.pdf b/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst_url.pdf Binary files differindex 17e2a612..b8467599 100644 --- a/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst_url.pdf +++ b/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst_url.pdf diff --git a/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst_url.tex b/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst_url.tex index ca8c7d8f..926dda1b 100644 --- a/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst_url.tex +++ b/texmf-dist/doc/latex/aeb-mlink/examples/mlink_tst_url.tex @@ -33,5 +33,16 @@ Try a PDF with search: \mlurl{http://www.math.uakron.edu/~dpstory/acrotex/aeb_ma The comment character can be used to wrap a long URL to the next line without effecting the address, as is done in the source file. +Let's take that long URL and break it across the page. + +\vspace{23\baselineskip} + +%\turnSyllbCntOn + + +Try a PDF with search: \mlurl[\mlcrackat{8}]{http://www.math.uakron.edu/~dpstory/acrotex/aeb_man.pdf#page=8% +&search=AcroTeX\%20web\%20exerquiz} + +That's a long URL that has been broken across the page boundary. \end{document} diff --git a/texmf-dist/source/latex/aeb-mlink/aeb_mlink.dtx b/texmf-dist/source/latex/aeb-mlink/aeb_mlink.dtx index 7d61b888..5a8b97fe 100644 --- a/texmf-dist/source/latex/aeb-mlink/aeb_mlink.dtx +++ b/texmf-dist/source/latex/aeb-mlink/aeb_mlink.dtx @@ -8,16 +8,18 @@ %% This program can redistributed and/or modified under %% %% the terms of the LaTeX Project Public License %% %% Distributed from CTAN archives in directory %% -%% macros/latex/base/lppl.txt; either version 1 of the %% -%% License, or (at your option) any later version. %% +%% macros/latex/base/lppl.txt; either version 1.2 of %% +%% the License, or (at your option) any later version. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %</copyright> %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{aeb_mlink} -%<package> [2018/04/26 v2.3 AeB MLink (dps)] +%<package> [2018/08/18 v2.3.4 AeB MLink (dps)] %<*driver> \documentclass{ltxdoc} +\usepackage{xcolor} \usepackage[colorlinks,hyperindex=false]{hyperref} +\usepackage{aeb_mlink} \pdfstringdefDisableCommands{\let\\\textbackslash}% \OnlyDescription % comment out for implementation details \EnableCrossrefs @@ -38,7 +40,7 @@ \def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}} \def\darg#1{\texttt{\char123\relax#1\char125\relax}} \addtolength{\marginparwidth}{3pt} - \GetFileInfo{web.sty} + \GetFileInfo{aeb_mlink.sty} \title{The \textsf{aeb\_mlink} Package\texorpdfstring{\\}{: } A member of the AeB Pro family} \author{D. P. Story\\ @@ -47,7 +49,6 @@ \maketitle \tableofcontents \DocInput{aeb_mlink.dtx} - \IfFileExists{\jobname.ind}{\newpage\setupFullwidth\par\PrintIndex} {\paragraph*{Index} The index goes here. Execute \[\texttt{makeindex -s gind.ist -o aeb\_mlink.ind aeb\_mlink.idx}\] on the command line and recompile @@ -56,7 +57,6 @@ {\paragraph*{Change History} The list of changes goes here. Execute \[\texttt{makeindex -s gglo.ist -o aeb\_mlink.gls aeb\_mlink.glo}\] on the command line and recompile \texttt{aeb\_mlink.dtx}.} - \end{document} %</driver> % \fi @@ -107,19 +107,22 @@ % fact, no \pkg{aeb-mlink}. Here, we provide a `dummy' package by that name which % passes everything on to \pkg{aeb\_mlink}. % \begin{macrocode} +% Begin Alt pkg %<*altpkgname> \NeedsTeXFormat{LaTeX2e} +\RequirePackage{xkeyval} \ProvidesPackage{aeb-mlink} [2018/04/26 v1.0 AeB MLink Alt-name (dps)] -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{aeb_mlink}} -\ProcessOptions -\RequirePackage{aeb_mlink}[2018/03/22] +\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}{aeb_mlink}} +\ProcessOptionsX +\RequirePackage{aeb_mlink}[2018/08/18] %</altpkgname> % \end{macrocode} % \section{Package Requirements and Options} % After having established the alternate of this package, we now work on the package itself. % \changes{v2.3}{2018/04/26}{Added \string\pkg{aeb-mlink} as an alternate name for this package} % \begin{macrocode} +% Begin Package %<*package> \RequirePackage{xkeyval} \RequirePackage{ifpdf}[2006/02/20] @@ -131,8 +134,8 @@ % Set the driver for \texttt{dvipsone} % \begin{macrocode} \DeclareOptionX{dvipsone}{\def\eq@drivernum{0}\@ml@dvipsfalse - \PassOptionsToPackage{dvipsone}{eforms} - \PassOptionsToPackage{dvipsone}{hyperref} + \PassOptionsToPackage{dvipsone}{eforms} + \PassOptionsToPackage{dvipsone}{hyperref} } % \end{macrocode} % \end{macro} @@ -140,27 +143,28 @@ % Set the driver for \texttt{dvips} % \begin{macrocode} \DeclareOptionX{dvips}{\def\eq@drivernum{0}\@ml@dvipstrue - \PassOptionsToPackage{dvips}{eforms} - \PassOptionsToPackage{dvips}{hyperref} + \PassOptionsToPackage{dvips}{eforms} + \PassOptionsToPackage{dvips}{hyperref} } \DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}{eforms}} % \end{macrocode} % \end{macro} % \begin{macrocode} -\newcount\mldblevel \mldblevel=0 +\@ifundefined{mldblevel}{\newcount\mldblevel + \mldblevel=0 }{} \define@key{aeb_mlink.sty}{dblevel}[0]{\mldblevel=#1 } % \end{macrocode} % \begin{macrocode} \def\ml@err@msg{This package requires the driver dvips and\MessageBreak - Adobe Distiller as the PDF creator} + Adobe Distiller as the PDF creator} \ifpdf\PackageError{aeb_mlink}{\ml@err@msg}\else - \ifxetex\PackageError{aeb_mlink}{\ml@err@msg}\else - \let\ExecuteOptions@SAVE\ExecuteOptions - \let\ExecuteOptions\ExecuteOptionsX - \InputIfFileExists{web.cfg}{} - {\@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}} - {\ExecuteOptionsX{dvipsone}}}% - \let\ExecuteOptions\ExecuteOptions@SAVE + \ifxetex\PackageError{aeb_mlink}{\ml@err@msg}\else + \let\ExecuteOptions@SAVE\ExecuteOptions + \let\ExecuteOptions\ExecuteOptionsX + \InputIfFileExists{web.cfg}{} + {\@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}} + {\ExecuteOptionsX{dvipsone}}}% + \let\ExecuteOptions\ExecuteOptions@SAVE \fi\fi \ProcessOptionsX % \end{macrocode} @@ -174,7 +178,7 @@ % link options that are defined. These are \cs{mlfix}, \cs{mlstrut}, \cs{mlcrackat} and % \cs{mlhyph}. % \begin{macrocode} -\RequirePackage{eforms}[2018/03/22] +\RequirePackage{eforms}[2018/08/16] \RequirePackage{soul} % \end{macrocode} % @@ -203,9 +207,10 @@ \def\smallRectTF{\ifoldstylequads false\else \iffixmlinks true\else false\fi\fi\space \ifSmallRect true\else false\fi\space and} +\def\ml@@nnotName{mLink} % dps \def\mllnkcontainer#1{bCreateLink { xoMsgB { \smallRectTF\space mlRectFix^^J% - #1}if}{\the\aeb@mLinkCnt\space mlIsBldMsg}ifelse} + #1}if}{(\ml@@nnotName\the\aeb@mLinkCnt) mlIsBldMsg}ifelse} % \end{macrocode} % \cs{pboxRect} is defined in \pkg{eforms} % \begin{macrocode} @@ -216,8 +221,8 @@ % This next \cs{special} defines some standard conversion % formulas, {\TeX} to PDF and PDF to {\TeX} for \textsf{dvips}. % \begin{macrocode} -\def\mlDict{SDict} -\special{!userdict begin + \def\mlDict{SDict} + \special{!userdict begin /TeXtoPDF {65536 div DVImag mul} def % sp to pts /PDFtoDvips {72.27 div Resolution mul} def % points to dots /PDFtoVDvips {72.27 div VResolution mul} def % points to dots @@ -229,62 +234,61 @@ /PDFtoTeX {PDFtoDvips} def^^J% /pf{print flush}def^^J% /bop-hook{ \pgmonitoring\space } def -end} - + end} % \end{macrocode} % This command calculates the \cs{QuadPoints} array % when we are using the \textsf{dvips} driver. % \begin{macrocode} -\def\setQuadBox{% + \def\setQuadBox{% currentpoint DvipstoPDF \aeb@bbox@dp\space TeXtoPDF add neg vsize add 72 sub % y1 exch DvipstoPDF 72 add exch % x1 2 copy exch \aeb@bbox@wd\space TeXtoPDF add exch % x2 2 copy \aeb@bbox@ht\space TeXtoPDF add % y3 2 copy exch \aeb@bbox@wd\space TeXtoPDF sub exch % x4 -} + } % \end{macrocode} % For the bounding rectangle, we just enclose the entire page. This % simplifies things greatly. % \begin{macrocode} -\def\par@@Rect -{% + \def\par@@Rect + {% 72 neg PDFtoDvips vsize 72 sub PDFtoVDvips hsize 72 sub PDFtoDvips 72 neg PDFtoVDvips -} + } % \end{macrocode} % \textsf{\textbf{dvipsone} driver:} Code for the \textsf{dvipsone} driver % This next \cs{special} defines some standard conversion % formulas, {\TeX} to PDF and PDF to {\TeX} in the \textsf{YandY {\TeX} System}. % \begin{macrocode} \else -\def\mlDict{dvidict} -\special{!/TeXtoPDF {65536 div mag 1000 div mul} def - /PDFtoTeX {65536 mul mag 1000 div div} def^^J% - /pf{print flush}def^^J% - /bphook{ \pgmonitoring\space } def^^J% -} + \def\mlDict{dvidict} + \special{!/TeXtoPDF {65536 div mag 1000 div mul} def + /PDFtoTeX {65536 mul mag 1000 div div} def^^J% + /pf{print flush}def^^J% + /bphook{ \pgmonitoring\space } def^^J% + } % \end{macrocode} % This command calculates the \cs{QuadPoints} array % when we are using the \textsf{dvipsone} driver. % \begin{macrocode} -\def\setQuadBox{% - currentpoint \aeb@bbox@dp\space add TeXtoPDF - neg PageHeight add 72 sub % y1 - exch TeXtoPDF 72 add exch % x1 - 2 copy exch \aeb@bbox@wd\space TeXtoPDF add exch % x2 - 2 copy \aeb@bbox@ht\space TeXtoPDF add % y3 - 2 copy exch \aeb@bbox@wd\space TeXtoPDF sub exch % x4 -} + \def\setQuadBox{% + currentpoint \aeb@bbox@dp\space add TeXtoPDF + neg PageHeight add 72 sub % y1 + exch TeXtoPDF 72 add exch % x1 + 2 copy exch \aeb@bbox@wd\space TeXtoPDF add exch % x2 + 2 copy \aeb@bbox@ht\space TeXtoPDF add % y3 + 2 copy exch \aeb@bbox@wd\space TeXtoPDF sub exch % x4 + } % \end{macrocode} % For the bounding rectangle, we just enclose the entire page. This % simplifies things greatly. % \begin{macrocode} -\def\par@@Rect -{% - 72 neg PDFtoTeX PageHeight 72 sub PDFtoTeX - PageWidth 72 sub PDFtoTeX 72 neg PDFtoTeX -} + \def\par@@Rect + {% + 72 neg PDFtoTeX PageHeight 72 sub PDFtoTeX + PageWidth 72 sub PDFtoTeX 72 neg PDFtoTeX + } \fi % \end{macrocode} % @@ -295,6 +299,7 @@ end} \newbox\aeb@bbox \newcount\aeb@arrayIndx \aeb@arrayIndx=0 \newcount\aeb@mLinkCnt \aeb@mLinkCnt=0 +\newcount\syllableCnt \syllableCnt=0 \newif\ifmllinktotalchanged\mllinktotalchangedfalse % \end{macrocode} % When \cs{ifSmallRect} is true (the default), the smallest possible \texttt{Rect} @@ -304,7 +309,7 @@ end} \newif\ifSmallRect \SmallRecttrue \AtEndDocument{\wrtmlinktot@l\ckchngmlinktot@l\wrt@linksnotformed} \def\wrt@linksnotformed{\iflinknotformed - \PackageWarningNoLine{aeb_mlinks}{Some link calculations are not + \PackageWarningNoLine{aeb_mlink}{Some link calculations are not complete.\MessageBreak DO NOT CONVERT TO PDF at this time. Compile at \MessageBreak least twice more}\fi} @@ -330,13 +335,13 @@ end} \def\ml@nocolorLineWidth{1} \def\ml@setnocolorDefaults{% \def\ml@nocolor@defaults{\H{\ml@nocolorHighlight}% - \S{\ml@nocolorLineStyle}\W{\ml@nocolorLineWidth}% - \Color{\CurrentBorderColor}}% + \S{\ml@nocolorLineStyle}\W{\ml@nocolorLineWidth}% + \Color{\CurrentBorderColor}}% } \ifHy@colorlinks - \let\ml@nocolor@defaults\@empty + \let\ml@nocolor@defaults\@empty \else - \ml@setnocolorDefaults + \ml@setnocolorDefaults \fi \def\ml@earlyExecProps#1{% \eq@setWidgetProps\relax{#1}% @@ -362,6 +367,9 @@ end} \def\mldbModeOff{\def\mldb##1##2{}} \def\mldb#1#2{\ifnum#1<\mldblevel#2\fi} \def\ml@adj@x{2}\def\ml@adj@y{2} +\def\mlMaxNSylls{30} +% usage \mlcrackinsat{\removelastspace} +\def\removelastspace{\hskip-\fontdimen2\font} \AtBeginDvi{\special{!% % \end{macrocode} % \paragraph*{Begin Postscript code} This code is executed as the PDF is created @@ -377,35 +385,47 @@ end} % of 17 as a way of testing whether an array size has been updated. All arrays % are set to 17 in length initially. % \begin{macrocode} -/mlIsBld 17 def -/mlIsBldMsg { - /lnkCnt exch def - (\string\n!! mLink)pf - lnkCnt 20 string cvs pf +/mlIsBld 17 def^^J% +/mlIsBldMsg {^^J% + /sName exch def^^J% + (\string\n!! )pf + sName 20 string cvs pf ( is not completely formed, - compile again!!\string\n)pf -} def + compile again!!\string\n)pf^^J% +} def^^J% /xoMsgB true def^^J% /xoMsg {^^J% - /lnkCnt exch def^^J% /Indx exch def^^J% + /sName exch def^^J% /nSyllable Indx 8 div def^^J% dpsa08 (!!------------------------------------------------------------------% \string\n Warning:\string\n - The text of mLink)pf - lnkCnt 20 string cvs pf + The text of )pf + sName 20 string cvs pf ( has crossed a page boundary from page )pf PhysicalPage 1 sub 10 string cvs pf ( to ) pf PhysicalPage 10 string cvs pf - (.\string\n Cross page links are not supported by the + sName 0 1 getinterval (m) eq { + (.\string\n Cross page links are not supported by the PDF Specification)pf - (.\string\n This link is not constructed, - please fix it.\string\n) pf - (Break point is after syllable number )pf - nSyllable cvi 20 string cvs pf (.\string\n)pf - (Use the \string\\mlcrackat{)pf - nSyllable cvi 20 string cvs pf - (} option with this link.\string\n)pf + (.\string\n This link is not constructed, + please fix it.\string\n)pf + (Break point is after syllable number )pf + nSyllable cvi 20 string cvs pf (.\string\n)pf + (Use the \string\\mlcrackat{)pf + nSyllable cvi 20 string cvs pf + (} option with this link.\string\n)pf + }{ + (.\string\n Cross page annotations are not supported by the + PDF Specification)pf + (.\string\n This annotation is not constructed, + please fix it.\string\n)pf + (Break point is after syllable number )pf + nSyllable cvi 20 string cvs pf (.\string\n)pf + (Use the mlcrackat=)pf + nSyllable cvi 20 string cvs pf + ( option with this annotation.\string\n)pf + } ifelse (!!------------------------------------------------------------------% \string\n)pf^^J% } def^^J% @@ -416,9 +436,9 @@ end} /quadpointsfixup {^^J% /ary exch def^^J% /quadL exch def^^J% - /lnkCnt exch def^^J% -\mldb0{(Processing mLink)pf^^J}% -\mldb0{lnkCnt 20 string cvs pf (: OK\string\n) pf^^J}% + /sName exch def^^J% +\mldb0{(Processing )pf sName pf (: OK\string\n)pf^^J}% +%\mldb0{lnkCnt 20 string cvs pf (: OK\string\n) pf^^J}% quadL 0 eq { (Problems with this link, length=0, will skip the creation of this link)pf^^J% @@ -437,7 +457,7 @@ quadL 0 eq { \mldb1{flush (\string\n) pf^^J}% /gN 0 def^^J% % \end{macrocode} -% \texttt{gMrk} is an array that will hold the offsets into \texttt{mLinkFxup<num>}. Each +% \texttt{gMrk} is an array that will load the offsets into \texttt{mLinkFxup\ameta{num}}. Each % offset is the beginning of a line. We initially set the length of the array to 10, though % this may not be correct. That is, we assume the hypertext will not exceed 10 lines in length. % \begin{macrocode} @@ -455,7 +475,7 @@ gMrk 0 0 put^^J% \mldb2{(Begin first for\string\n) pf^^J}% % \end{macrocode} % Begin a for loop\marginpar{\raggedleft for loop}. The purpose of this loop is to search -% through the quad points of \texttt{mLinkFxup<num>} and find the offsets into the +% through the quad points of \texttt{mLinkFxup\ameta{num}} and find the offsets into the % structure where the line breaks occur. % \begin{macrocode} 0 8 quadL 8 sub {^^J% @@ -485,7 +505,7 @@ gMrk 0 0 put^^J% % \end{macrocode} % The two entries differ, so a line break must have occurred. We inert value % of \texttt{gIndx} into \texttt{gMrk}. \texttt{gIndx} is essentially the offset -% into \texttt{mLinkFxup<num>} where the line break occurs. +% into \texttt{mLinkFxup\ameta{num}} where the line break occurs. % \begin{macrocode} gMrk gMrkL gIndx put^^J% % \end{macrocode} @@ -517,21 +537,25 @@ gMrk 0 0 put^^J% % in the \texttt{gMrk} array. Now, if there are now line breaks, the length % of \texttt{gMrk} is one % -% \texttt{gAry} is an temporary array what holds all the quads corresponding to -% one line. Each syllable generates an quad of length 8. Here, we assume any given -% line has at most 20 syllables, this may be revised. The array \texttt{gAry} is declared -% inside the next loop, so it is redeclared at each iteration of the loop. -% \begin{macrocode} - /gAryL 8 20 mul def^^J% limitation +% \texttt{gAry} is a temporary array that holds all the quads \emph{corresponding to +% one line}. Each syllable generates an quad of length 8. Here, we assume any given +% line has at most \cs{mlMaxNSylls} syllables, (currently set to \mlMaxNSylls, but may be revised). The array \texttt{gAry} is declared +% inside the next loop, so it is redeclared at each iteration of the loop. If \app{Distiller} of \app{ps2pdf} +% fails, it may be due to \cs{mlMaxNSylls} being too small for some of your sentences; in this case, redefine +% \cs{mlMaxNSylls} to a larger value. +% \changes{v2.3.2}{2018/08/09}{\string\cs{mlMaxNSylls} now sets the array size of gAryL} +% \begin{macrocode} + /gAryL 8 \mlMaxNSylls\space mul def^^J% limitation \mldb2{(gAryL=) pf gAryL 20 string cvs pf^^J}% \mldb2{(\string\n)pf^^J}% % \end{macrocode} -% \texttt{gFixup} is an array that will old the final combined quad points, this array +% \texttt{gFixup} is an array that will hold the final combined quad points, this array % is the one that will be referenced by the \texttt{QuadPoints} entry of the link annotation. % It's length is set to 8 times the number of lines over which the hypertext is broken (\texttt{gMrkL}) % One quad for each line, rather than many quads, one for each syllable. % \begin{macrocode} - /gFixup 8 gMrkL mul array def^^J% + /gFixup 8 gMrkL mul array def^^J% links + /aFixup 8 gMrkL mul array def^^J% text markup annotations /gOffset 0 def^^J% \mldb2{(for loop: gMrkL=)pf gMrkL 20 string cvs pf^^J}% \mldb2{(\string\n) pf^^J}% @@ -566,12 +590,12 @@ gIndx 1 add gMrkL eq {^^J% \mldb2{(gCount=)pf gCount 20 string cvs pf^^J}% \mldb2{(\string\n)pf^^J}% % \end{macrocode} -% We want to copy a slice of \texttt{mLinkFxup<num>}, we declare the next +% We want to copy a slice of \texttt{mLinkFxup\ameta{num}}, we declare the next % array of length \texttt{gCount} just computed. % \begin{macrocode} /sliceOfLinkfxup gCount array def^^J% % \end{macrocode} -% Populate this array with a slice of \texttt{mLinkFxup<num>} beginning at +% Populate this array with a slice of \texttt{mLinkFxup\ameta{num}} beginning at % \texttt{gMrk[gIndx]} and including the subsequent \texttt{gCount} entries. % array of length \texttt{gCount} just computed. % \begin{macrocode} @@ -592,23 +616,39 @@ sliceOfLinkfxup 0 ary gMrk gIndx get^^J% \mldb1{gAry 6 get 20 string cvs pf (\string\n)pf^^J}% \mldb1{gAry 7 get 20 string cvs pf (\string\n)pf^^J}% gFixup gOffset [^^J% - gAry 0 get ^^J% x1 ll - gAry 1 get^^J% y1 ll - gAry gCount 1 sub 5 sub get^^J% x2 lr - gAry gCount 1 sub 4 sub get^^J% y2 lr - gAry gCount 1 sub 3 sub get^^J% x3 ur - gAry gCount 1 sub 2 sub get^^J% y3 ur - gAry 6 get^^J% x4 ul - gAry 7 get^^J% y4 ul + gAry 0 get ^^J% x1 ll 1 + gAry 1 get^^J% y1 ll 1 + gAry gCount 1 sub 5 sub get^^J% x2 lr 2 + gAry gCount 1 sub 4 sub get^^J% y2 lr 2 + gAry gCount 1 sub 3 sub get^^J% x3 ur 3 + gAry gCount 1 sub 2 sub get^^J% y3 ur 3 + gAry 6 get^^J% x4 ul 4 + gAry 7 get^^J% y4 ul 4 + ] putinterval^^J% +% \end{macrocode} +% When forming quad points for text markup annotations, the PDF reference is not followed. We have +% to reorder the array \texttt{gFixup} to conform to how Acrobat/Reader expect it. Entries 0 and 4 +% are increased by the same amount that was subtracted out earlier in +% \changes{v2.3.2}{2018/08/09}{Form the array \string\texttt{aFixup} for \string\pkg{aeb\_mlink}} +% \begin{macrocode} + aFixup gOffset [^^J% + gAry 6 get gOffset 0 eq {\ml@adj@x\space add}if^^J% x4 ul 4 + gAry 7 get^^J% y4 ul 4 + gAry gCount 1 sub 3 sub get^^J% x3 ur 3 + gAry gCount 1 sub 2 sub get^^J% y3 ur 3 + gAry 0 get gOffset 0 eq {\ml@adj@x\space add}if^^J% x1 ll 1 + gAry 1 get 1 sub^^J% y1 ll 1 + gAry gCount 1 sub 5 sub get^^J% x2 lr 2 + gAry gCount 1 sub 4 sub get 1 sub^^J% y2 lr 2 ] putinterval^^J% /gOffset gOffset 8 add def^^J% } for^^J% \mldb2{(End of second for\string\n) pf^^J}% } ifelse - } def^^J% +} def^^J% % \end{macrocode} % \texttt{smallquadpointsfixup} fixes up the bounding boxes. Raises their heights -% by \cs{ml@adj@y}, and moves the left boundary \cs{ml@adj@x} to the left. +% by \cs{ml@adj@y} (removed), and moves the left boundary \cs{ml@adj@x} to the left. % \changes{v2.1.2}{2018/03/09}{Added PS proc \string\texttt{smallquadpointsfixup}} % \begin{macrocode} /smallquadpointsfixup {^^J% @@ -618,14 +658,14 @@ sliceOfLinkfxup 0 ary gMrk gIndx get^^J% /quadL exch def^^J% /gSFup 8 array def^^J% gSFup 0 ary 0 gIndx add get - gIndx 0 eq {\ml@adj@x\space sub} if put^^J% x1 + gIndx 0 eq {\ml@adj@x\space sub} if put^^J% x1 gSFup 1 ary 1 gIndx add get put^^J% y1 gSFup 2 ary 2 gIndx add get put^^J% x2 gSFup 3 ary 3 gIndx add get put^^J% y2 gSFup 4 ary 4 gIndx add get put^^J% x3 gSFup 5 ary 5 gIndx add get put^^J% gSFup 6 ary 6 gIndx add get - gIndx 0 eq {\ml@adj@x\space sub} if put^^J% x4 + gIndx 0 eq {\ml@adj@x\space sub} if put^^J% x4 gSFup 7 ary 7 gIndx add get put^^J% ary gIndx gSFup putinterval^^J% } def^^J% @@ -693,15 +733,17 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % plus a little. % \changes{v2.1.9}{2018/03/22}{Changed the definition of \cs{ml@MrkLnk}} % \begin{macrocode} +\def\MrkLnkLtr{L} \def\ml@MrkLnk#1{\ifmlmarks\bgroup\ifdim\baselineskip=0pt - \setbox\z@\hbox{T}\def\ml@raiseamt{\ht\z@+.4pt}\else - \def\ml@raiseamt{.6\baselineskip}\fi\smash{\rlap{\normalcolor\bfseries - \raisebox{\ml@raiseamt}{\tiny\strut{L#1}}}}\egroup\fi} + \setbox\z@\hbox{T}\gdef\ml@raiseamt{\ht\z@+.4pt}\else + \gdef\ml@raiseamt{.6\baselineskip}\fi\smash{\rlap{\normalfont\normalcolor\bfseries + \raisebox{\ml@raiseamt}{\tiny\strut{\MrkLnkLtr#1}}}}\egroup\fi} \newif\iflinknotformed \linknotformedfalse +\newif\ifcr@ckit \cr@ckitfalse \def\ml@underlinded{U} % \end{macrocode} % \begin{macro}{\mlhypertext} -% +% \leavevmode\hskip-\marginparsep\texttt{[\ameta{opts}]\darg{\ameta{text}}} % This is a general purpose hypertext link. Not only is it % a fine stand-alone linking command, but it also serves % as a building block to some convenience commends that follow. @@ -709,21 +751,23 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % The commands takes two arguments, the first an optional one the second % one requires. % \begin{enumerate} -% \item[\texttt{[\#1]}] A standard optional argument for \pkg{eforms}, to change +% \item[\texttt{\ameta{opts}}] (Optional) A standard optional argument for \pkg{eforms} to change % the appearance of the link and/or to include actions. -% \item[\texttt{\#2}] The text to be enclosed in a link. +% \item[\texttt{\ameta{text}}] The text to be enclosed by the link. % \end{enumerate} % The most recently, \pkg{eforms} defines \cs{mlhypertext} to a warning % message. So if \cs{mlhypertext} is already defined, we \cs{renewcommand} % else we \cs{newcommand}. % \changes{v2.1.17}{2018/04/19}{added conditional command definition for \string\cs{mlhypertext}} +% \changes{v2.3.1}{2018/07/18}{added \string\cs{hglue0pt} to add some hard glue just before +% the beginning of \string\cs{mlhypertext}} % \begin{macrocode} \@ifundefined{mlhypertext}{\newcommand}{\renewcommand}% -{\mlhypertext}[2][]{\begingroup +{\mlhypertext}[2][]{\hglue0pt\begingroup + \global\ml@displaytrue \toks@=\expandafter{#2}% \edef\ml@HytextArg{{\the\toks@}}% - \global\aeb@arrayIndx=\z@ % dpsa08 -% \global\advance\aeb@mLinkCnt\@ne\relax + \global\aeb@arrayIndx=\z@ \def\ml@setlink##1{\setLinkPbox{% \QuadPoints{mLink##1}#1}}% \expandafter\processAppArgs\set@LinkPboxDefaults @@ -743,32 +787,45 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % \begin{macrocode} \global\advance\aeb@mLinkCnt\@ne\relax \def\ml@next{\mlhypertext@i{#1}}% - \else -% \end{macrocode} -% We need to crack this link up into two -% \begin{macrocode} - \edef\temp@crackAt{\noexpand - \crackAt{\eq@mlcrackat}{\the\toks@}}\temp@crackAt - \def\ml@next{\mlhypertext[#1\mlignore{}]{\the\mlfrstoftwo}% - \eq@mlcrackinsat\penalty-50 - \mlhypertext[#1\mlignore{}]{\the\mlsndoftwo}\aftergroup + \else % \eq@mlcrackat not \@empty +% \end{macrocode} +% \textbf{Crack it up.} We define \cs{ml@next} to call \cs{mlhypertext} consecutively; +% the first time we specify |\mlignore{0}| to indicate this link +% is the first part, and then |mlignore{1}| to indicate the second part. +% For the first part, we proceed as usual until we get the the syllable +% number specified by \cs{mlcrackAt}, then we continue with the next +% \cs{mlhypertext} command, we remove all content up to the syllable number +% \cs{mlcrackAt}, and typeset the rest; for example, +%\begin{quote} +%This is a test sentence that \textcolor{gray}{we want to break across pages.} (1)\\ +%\textcolor{gray}{This is a test sentence that} we want to break across pages. (2) +%\end{quote} +%The first link produces the typeset material in (1), where grayed-out text are removed; while +%the second link produces line (2), again, with the grayed-out material removed. +% \begin{macrocode} + \def\ml@next{\global\ml@displaytrue\let\ml@space\space + \mlhypertext[#1\mlignore{0}]{#2}\eq@mlcrackinsat + \penalty-100 \cr@ckittrue + \global\ml@displayfalse\let\ml@space\space + \mlhypertext[#1\mlignore{1}]{#2}\aftergroup \normalcolor\endgroup}% - \fi\fi - \ml@next + \fi + \fi + \ml@next } \def\mlhypertext@i#1{% \@ifundefined{mLinkLngth\the\aeb@mLinkCnt}{\global - \linknotformedtrue\def\lngth{17}} - {\edef\lngth{\@nameuse{mLinkLngth\the\aeb@mLinkCnt}}}% - \ml@start@link{\the\aeb@mLinkCnt}{\lngth}% Step 1 + \linknotformedtrue\def\ml@lngth{17}} + {\edef\ml@lngth{\@nameuse{mLinkLngth\the\aeb@mLinkCnt}}}% + \ml@start@link{\the\aeb@mLinkCnt}{\ml@lngth}% Step 1 \def\mlh@preambleCmdInsert{% \ml@MrkLnk{\the\aeb@mLinkCnt}\ml@earlyExecProps{#1}}% \def\mlh@postambleCmd{\endgroup}% % \end{macrocode} -% Start \pkg{soul} on hypertext +% Start \pkg{soul} on \cs{mlhypertext} (\cs{aeb@mlh}) % \begin{macrocode} \expandafter\aeb@mlh\ml@HytextArg - \ml@finish@link{\the\aeb@mLinkCnt}{\lngth}% + \ml@finish@link{\the\aeb@mLinkCnt}{\ml@lngth}% \ml@setlink{\the\aeb@mLinkCnt}% \ifoldstylequads\else \iffixmlinks\literalps@out{restore}\fi\fi @@ -784,42 +841,43 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % #2 = quad total % #3 = link cnt % #4 = content - \setbox\aeb@bbox=\hbox{\ml@strut#4}% - {% - \setbox\@tempboxa\hbox{\ml@strut}% - \ifx\itsunderline\ef@YES\@tempdima1bp\relax\else - \@tempdima\dp\@tempboxa \ifdim\@tempdima>2bp - \advance\@tempdima-2bp\fi - \fi - \dp\aeb@bbox\@tempdima - \@tempdima\ht\@tempboxa \advance\@tempdima\dp\aeb@bbox - \advance\@tempdima1bp - \ht\aeb@bbox\@tempdima\def\x{\the\count\z@}% - \count\z@=\ht\aeb@bbox\xdef\aeb@bbox@ht{\x}% - \count\z@=\wd\aeb@bbox\xdef\aeb@bbox@wd{\x}% - \count\z@=\dp\aeb@bbox\xdef\aeb@bbox@dp{\x}% + \setbox\aeb@bbox=\hbox{\ml@strut#4}% + {% + \setbox\@tempboxa\hbox{\ml@strut}% + \ifx\itsunderline\ef@YES\@tempdima1bp\relax\else + \@tempdima\dp\@tempboxa \ifdim\@tempdima>2bp + \advance\@tempdima-2bp\fi + \fi + \ifx\isstrikeout\ef@YES\advance\@tempdima-2bp\fi + \dp\aeb@bbox\@tempdima + \@tempdima\ht\@tempboxa \advance\@tempdima\dp\aeb@bbox + \advance\@tempdima1bp + \ht\aeb@bbox\@tempdima\def\x{\the\count\z@}% + \count\z@=\ht\aeb@bbox\xdef\aeb@bbox@ht{\x}% + \count\z@=\wd\aeb@bbox\xdef\aeb@bbox@wd{\x}% + \count\z@=\dp\aeb@bbox\xdef\aeb@bbox@dp{\x}% + }% + \ifoldstylequads + \literalps@out{% + bCreateLink {^^J% + \mlDict\space/mLinkFxup#3\space known {^^J% + \ps@mark{mLink#3} + \the\aeb@arrayIndx\space [\setQuadBox] + \space /PUTINTERVAL pdfmark}{^^J% + xoMsgB { + /xoMsgB false def + (\ml@@nnotName\the\aeb@arrayIndx) + #3\space + xoMsg % dpsa08 + } if^^J% xoMsgB + } ifelse } if }% - \ifoldstylequads - \literalps@out{% - bCreateLink {^^J% - \mlDict\space/mLinkFxup#3\space known {^^J% - \ps@mark{mLink#3} - \the\aeb@arrayIndx\space [\setQuadBox] - \space /PUTINTERVAL pdfmark}{^^J% - xoMsgB { - /xoMsgB false def - \the\aeb@arrayIndx\space - #3\space - xoMsg % dpsa08 - } if^^J% xoMsgB - } ifelse } if - }% - \else - \literalps@out{% - bCreateLink {^^J% - \mlDict\space/mLinkFxup#3\space known {^^J% - mLinkFxup#3\space - #1\space[\setQuadBox] putinterval^^J% + \else + \literalps@out{% + bCreateLink {^^J% + \mlDict\space/mLinkFxup#3\space known {^^J% + mLinkFxup#3\space + #1\space[\setQuadBox] putinterval^^J% % \end{macrocode} % Initiate fix up of little rectangles % \begin{macrocode} @@ -829,13 +887,12 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% #1\space smallquadpointsfixup }{^^J% xoMsgB { - /xoMsgB false def -% \the\aeb@arrayIndx\space - #1\space - #3\space - xoMsg % dpsa08 + /xoMsgB false def + (\ml@@nnotName#3) + #1\space + xoMsg % dpsa08 } if^^J% xoMsgB - } ifelse } if + } ifelse } if }% \fi \global\advance\aeb@arrayIndx8\relax @@ -846,21 +903,17 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % \cs{labelRef} and \cs{atPage} are public, and can be used. % \begin{macrocode} \def\aeb@exiii{\expandafter\expandafter\expandafter} -%\def\aebnameref#1{\getrefbykeydefault{#1}{name}{??}} \def\aebnameref#1{\@ifundefined{r@#1}{??} {\aeb@exiii\@thirdoffive\csname r@#1\endcsname}} -%\def\labelRef#1{\getrefbykeydefault{#1}{}{Doc-Start}} \def\labelRef#1{\@ifundefined{r@#1}{Doc-Start} {\aeb@exiii\@fourthoffive\csname r@#1\endcsname}} \def\atPage#1{\getrefbykeydefault{#1}{page}{??}} -%\def\atPage#1{\@ifundefined{r@#1}{1} -% {\aeb@exiii\@secondoffive\csname r@#1\endcsname}} % \end{macrocode} % \begin{macro}{\mlhyperlink} % \begin{macro}{\mlhyperref} % \begin{macro}{\mlnameref} % \begin{macro}{\mlNameref} -% These four commands mimic the hyperref commands of the same root name. +% These four commands mimic the \pkg{hyperref} commands of the same root name. % The commands \cs{mlhyperlink} and \cs{mlhyperref} take three % parameters (the first one optional). The optional parameter % modifies the appearance of the link, the second is the @@ -872,72 +925,81 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % The commands \cs{mlnameref} and \cs{mlNameref} take two parameters % (the first is optional). As before, the first modifies the % appearance of the link, the second is the target, a latex label. +%\begin{flushleft} +% Syntax: \ttfamily\string\mlhyperlink[\ameta{opts}]\darg{\ameta{named-dest}}\darg{\ameta{text}} +%\end{flushleft} % \begin{macrocode} \newcommand\mlhyperlink[3][]{% - \mlhypertext[#1\A{/S/GoTo/D (#2)}]{#3}} + \mlhypertext[#1\A{/S/GoTo/D (#2)}]{#3}} +% \end{macrocode} +%\begin{flushleft} +% Syntax: \ttfamily\string\mlhyperref[\ameta{opts}]\darg{\ameta{label}}\darg{\ameta{text}} +%\end{flushleft} +% \begin{macrocode} \newcommand\mlhyperref[3][]{% - \mlhypertext[#1\A{/S/GoTo/D (\labelRef{#2})}]{#3}} + \mlhypertext[#1\A{/S/GoTo/D (\labelRef{#2})}]{#3}} +% \end{macrocode} +%\begin{flushleft} +% Syntax: \ttfamily\string\mlnameref[\ameta{opts}]\darg{\ameta{label}} +%\end{flushleft} +% \begin{macrocode} \newcommand\mlnameref[2][]{\protected@edef\ml@temp{\aebnameref{#2}}% - \def\ml@tempi{\mlhypertext[#1\A{/S/GoTo/D (\labelRef{#2})}]}% - \expandafter\ml@tempi\expandafter{\ml@temp}} + \def\ml@tempi{\mlhypertext[#1\A{/S/GoTo/D (\labelRef{#2})}]}% + \expandafter\ml@tempi\expandafter{\ml@temp}} % \end{macrocode} % We use a work around to a |\relax| problem encountered in the % |\mlNameRef| command. {\LaTeX} inserts a |relax| at the end of label % titles, which stops soul. We insert |\let\SOUL@stop\ml@SOUL@stop|, % this seems to work, no guarantees. +%\begin{flushleft} +% Syntax: \ttfamily\string\mlNameref[\ameta{opts}]\darg{\ameta{label}} +%\end{flushleft} % \begin{macrocode} \newcommand\mlNameref[2][]{\let\SOUL@stop\ml@SOUL@stop - \protected@edef\ml@temp{`\aebnameref{#2}' on page~\atPage{#2}}% - \def\ml@tempi{\mlhypertext[#1\A{/S/GoTo/D (\labelRef{#2})}]}% - \expandafter\ml@tempi\expandafter{\ml@temp}} + \protected@edef\ml@temp{`\aebnameref{#2}' on page~\atPage{#2}}% + \def\ml@tempi{\mlhypertext[#1\A{/S/GoTo/D (\labelRef{#2})}]}% + \expandafter\ml@tempi\expandafter{\ml@temp}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} -% \begin{macro}{\mlhref} -% This command is similar to \cs{href}. This command also takes -% three arguments, one optional. The first is usual optional argument -% that allow one to modify the appearance of the link, the second one -% is the URL that we are linking to, the third is the text that we are -% wrapping this link around. -% -% The next three commands are modifications some low hyperref commands -% found in the \texttt{pdfmark.def} file. Depending on the parsing, -% \cs{href} calls one of these three; we intercept them, and insert +% The next three commands are modifications some low \pkg{hyperref} commands +% found in the \texttt{pdfmark.def} file. Depending on the parsing, \cs{href} +% calls one of these three; we intercept them, and insert % our own command \cs{mlhypertext} so the link string gets wrapped around -% if needed. +% if needed. These are in preparation for the definition of \cs{mlhref}. % \begin{macrocode} \def\ml@hyper@linkurl#1#2{\hyper@chars - \let\ef@thislinkcolor\@urlcolor - \let\CurrentBorderColor\@urlbordercolor - \mlhypertext[\presets{\mlhref@args}\A{/S/URI/URI(#2)}]{#1}% - \endgroup -}% + \let\ef@thislinkcolor\@urlcolor + \let\CurrentBorderColor\@urlbordercolor + \mlhypertext[\presets{\mlhref@args}\A{/S/URI/URI(#2)}]{#1}% + \endgroup +} \def\ml@hyper@linkfile#1#2#3{% - \let\ef@thislinkcolor\@filecolor - \let\CurrentBorderColor\@filebordercolor - \ifx\@pdfstartview\@empty - \def\theView{[0 /Fit]}\else - \def\theView{[0 \@pdfstartview]}\fi - \@ifundefined{ifHy@pdfnewwindow} - {\ifHy@newwindow}{\ifHy@pdfnewwindow}% - \def\isWindow{/NewWindow true}\else - \let\isWindow\@empty\fi - \mlhypertext[\presets{\mlhref@args}\A{/S/GoToR \isWindow - /F (#2) /D \ifx\\#3\\\theView\else(#3)\fi}]{#1}% - \endgroup + \let\ef@thislinkcolor\@filecolor + \let\CurrentBorderColor\@filebordercolor + \ifx\@pdfstartview\@empty + \def\theView{[0 /Fit]}\else + \def\theView{[0 \@pdfstartview]}\fi + \@ifundefined{ifHy@pdfnewwindow} + {\ifHy@newwindow}{\ifHy@pdfnewwindow}% + \def\isWindow{/NewWindow true}\else + \let\isWindow\@empty\fi + \mlhypertext[\presets{\mlhref@args}\A{/S/GoToR \isWindow + /F (#2) /D \ifx\\#3\\\theView\else(#3)\fi}]{#1}% + \endgroup } \def\ml@hyper@launch run:#1\\#2#3{% - \let\ef@thislinkcolor\@filecolor - \let\CurrentBorderColor\@runbordercolor - \@ifundefined{ifHy@pdfnewwindow} + \let\ef@thislinkcolor\@filecolor + \let\CurrentBorderColor\@runbordercolor + \@ifundefined{ifHy@pdfnewwindow} {\ifHy@newwindow}{\ifHy@pdfnewwindow}% - \def\isWindow{/NewWindow true}\else - \let\isWindow\@empty\fi - \mlhypertext[\presets{\mlhref@args}\A{/S/Launch\isWindow - /F (#1) \ifx\\#3\\\else /Win << /P (#3) /F (#1) >> \fi}]{#2}% - \endgroup + \def\isWindow{/NewWindow true}\else + \let\isWindow\@empty\fi + \mlhypertext[\presets{\mlhref@args}\A{/S/Launch\isWindow + /F (#1) \ifx\\#3\\\else /Win << /P (#3) /F (#1) >> \fi}]{#2}% + \endgroup } % \end{macrocode} % Below is the code for \cs{mlhref}. We first let the old commands found in \texttt{pdfmark.def} @@ -945,13 +1007,24 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % eventually comes back to the above three commands. % \begin{macrocode} \let\aeb@saved@href\href +% \end{macrocode} +% \begin{macro}{\mlhref} +% This command is similar to \cs{href}. This command also takes +% three arguments, one optional. The first is usual optional argument +% that allow one to modify the appearance of the link, the second one +% is the URL that we are linking to, the third is the text that we are +% wrapping this link around. +%\begin{flushleft} +% Syntax: \ttfamily\string\mlhref[\ameta{opts}]\darg{\ameta{url}}\darg{\ameta{text}} +%\end{flushleft} +% \begin{macrocode} \newcommand{\mlhref}[1][]{% - \begingroup - \def\mlhref@args{#1}% - \let\hyper@linkurl\ml@hyper@linkurl - \let\hyper@linkfile\ml@hyper@linkfile - \let\@hyper@launch\ml@hyper@launch - \aeb@saved@href + \begingroup + \def\mlhref@args{#1}% + \let\hyper@linkurl\ml@hyper@linkurl + \let\hyper@linkfile\ml@hyper@linkfile + \let\@hyper@launch\ml@hyper@launch + \aeb@saved@href } % \end{macrocode} % \end{macro} @@ -971,128 +1044,132 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % We modify \cs{SOUL@doword} and name it \cs{ml@SOUL@doword}. % \begin{macrocode} \def\ml@SOUL@doword{% - \global\setbox\ml@urlbuildi\hbox{}% - \global\setbox\ml@urlbuildii\hbox{}% - \edef\x{\the\SOUL@word}% - \ifx\x\empty - \else - \SOUL@buffer={}% - \setbox\z@\vbox{% - \SOUL@tt - \hyphenchar\font`\- - \hfuzz\maxdimen - \hbadness\@M - \pretolerance\m@ne - \tolerance\@M - \leftskip\z@ - \rightskip\z@ - \hsize1sp - \everypar{}% - \parfillskip\z@\@plus1fil - \hyphenpenalty-\@M - \noindent - \hskip\z@ - \relax - \the\SOUL@word}% + \global\setbox\ml@urlbuildi\hbox{}% + \global\setbox\ml@urlbuildii\hbox{}% + \edef\x{\the\SOUL@word}% + \ifx\x\empty + \else + \SOUL@buffer={}% + \setbox\z@\vbox{% + \SOUL@tt + \hyphenchar\font`\- + \hfuzz\maxdimen + \hbadness\@M + \pretolerance\m@ne + \tolerance\@M + \leftskip\z@ + \rightskip\z@ + \hsize1sp + \everypar{}% + \parfillskip\z@\@plus1fil + \hyphenpenalty-\@M + \noindent + \hskip\z@ + \relax + \the\SOUL@word}% % \end{macrocode} % We don't do the reconstruction, so no need for the message. % \begin{macrocode} - \let\SOUL@errmsg\relax -% \let\SOUL@errmsg\SOUL@error - \let\-\relax - \count@\m@ne + \let\SOUL@errmsg\relax +% \let\SOUL@errmsg\SOUL@error + \let\-\relax + \count@\m@ne % \end{macrocode} % Here is the first major change, rather than splitting off to \cs{SOUL@analyze}, we go % to our modified version, \cs{ml@SOUL@analyze}. % \begin{macrocode} - \ml@SOUL@analyze - \SOUL@word={}% - \fi + \ml@SOUL@analyze + \SOUL@word={}% + \fi } % \end{macrocode} % We modify \cs{SOUL@analyze} and name it \cs{ml@SOUL@analyze}. % \begin{macrocode} \def\ml@SOUL@analyze{{% - \setbox\z@\vbox{% - \unvcopy\z@ - \unskip - \unpenalty - \global\setbox\@ne=\lastbox}% - \ifvoid\@ne - \else + \setbox\z@\vbox{% + \unvcopy\z@ + \unskip + \unpenalty + \global\setbox\@ne=\lastbox}% + \ifvoid\@ne + \else % \end{macrocode} % We encapsulate our changes at this point in \cs{ml@interface@analyze} % \begin{macrocode} - \ml@interface@analyze - \SOUL@syllgoal=\wd\@ne - \advance\count@\@ne + \ml@interface@analyze + \SOUL@syllgoal=\wd\@ne + \advance\count@\@ne % \end{macrocode} % We get the tokens recursively, but we jump back to \cs{ml@SOUL@analyze} not % \cs{SOUL@analyze}. % \begin{macrocode} - \ml@SOUL@analyze - \SOUL@syllwidth\z@ - \SOUL@syllable={}% - \ifnum\count@>\z@ - \advance\SOUL@syllgoal-\SOUL@ttwidth + \ml@SOUL@analyze + \SOUL@syllwidth\z@ + \SOUL@syllable={}% + \ifnum\count@>\z@ + \advance\SOUL@syllgoal-\SOUL@ttwidth % \end{macrocode} % At this point, we jump to \cs{ml@SOUL@dosyllable} rather than % \cs{SOUL@dosyllable}. % \begin{macrocode} - \ml@SOUL@dosyllable - \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@hyphkern}% - {\SOUL@sethyphenchar}% - \SOUL@everyhyphen - \else + \ml@SOUL@dosyllable + \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@hyphkern}% + {\SOUL@sethyphenchar}% + \SOUL@everyhyphen + \else % \end{macrocode} % Use \cs{ml@SOUL@dosyllable} not \cs{SOUL@dosyllable}. % \begin{macrocode} \ml@SOUL@dosyllable - \fi + \fi \fi }} % \end{macrocode} +% +% \begin{macrocode} +\newif\ifml@display \ml@displaytrue +% \end{macrocode} % We modify \cs{SOUL@dosyllable} and name it \cs{ml@SOUL@dosyllable}. % \begin{macrocode} \def\ml@SOUL@dosyllable{% + \SOUL@gettoken + \SOUL@eventuallyexhyphen{\the\SOUL@token}% + \edef\x{\the\SOUL@token}% + \ifx\x\SOUL@hyphenhintM + \let\SOUL@n\ml@SOUL@dosyllable + \else\ifx\x\SOUL@lowerthanM \SOUL@gettoken - \SOUL@eventuallyexhyphen{\the\SOUL@token}% - \edef\x{\the\SOUL@token}% - \ifx\x\SOUL@hyphenhintM - \let\SOUL@n\ml@SOUL@dosyllable - \else\ifx\x\SOUL@lowerthanM - \SOUL@gettoken - \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@charkern} - {\the\SOUL@token}% - \SOUL@everylowerthan - \SOUL@puttoken - \let\SOUL@n\ml@SOUL@dosyllable - \else\ifdim\SOUL@syllwidth=\SOUL@syllgoal - \SOUL@everysyllable - \SOUL@puttoken - \let\SOUL@n\relax - \else + \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@charkern} + {\the\SOUL@token}% + \SOUL@everylowerthan + \SOUL@puttoken + \let\SOUL@n\ml@SOUL@dosyllable + \else\ifdim\SOUL@syllwidth=\SOUL@syllgoal + \SOUL@everysyllable + \SOUL@puttoken + \let\SOUL@n\relax + \else \ifx\x\SOUL@stopM - \SOUL@errmsg - \global\let\SOUL@errmsg\relax - \let\SOUL@n\relax + \SOUL@errmsg + \global\let\SOUL@errmsg\relax + \let\SOUL@n\relax \else - \setbox\tw@\hbox{\SOUL@tt\the\SOUL@token}% - \advance\SOUL@syllwidth\wd\tw@ - \global\SOUL@lasttoken=\SOUL@token - \SOUL@gettoken - \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@charkern} - {\the\SOUL@token}% - \SOUL@puttoken - \global\SOUL@token=\SOUL@lasttoken - \SOUL@everytoken - \edef\x{\SOUL@syllable={\the\SOUL@syllable\the\SOUL@token}}\x + \setbox\tw@\hbox{\SOUL@tt\the\SOUL@token}% + \advance\SOUL@syllwidth\wd\tw@ + \global\SOUL@lasttoken=\SOUL@token + \SOUL@gettoken + \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@charkern} + {\the\SOUL@token}% + \SOUL@puttoken + \global\SOUL@token=\SOUL@lasttoken + \SOUL@everytoken + \edef\x{\SOUL@syllable={\the\SOUL@syllable\the\SOUL@token}}\x % \end{macrocode} % Here is the only change, we direct flow back to \cs{ml@SOUL@dosyllable} % \begin{macrocode} - \let\SOUL@n\ml@SOUL@dosyllable - \fi\fi\fi\fi - \SOUL@n + \let\SOUL@n\ml@SOUL@dosyllable + \fi\fi\fi\fi + \SOUL@n } % \end{macrocode} % We put most of our changes to \cs{ml@SOUL@analyze} in @@ -1155,15 +1232,15 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % \end{macrocode} % Everything is in reverse order, this is the last syllable of the second chunk % \begin{macrocode} - \ml@start@link{\aeb@mLinkCnt@}{\ml@qlngthchunkii}% - \ml@bld@quadchunks{\aeb@mLinkCnt@} - {\ml@qlngthchunkii}{\ml@urlbuildii}% + \ml@start@link{\aeb@mLinkCnt@}{\ml@qlngthchunkii}% + \ml@bld@quadchunks{\aeb@mLinkCnt@} + {\ml@qlngthchunkii}{\ml@urlbuildii}% \else % \end{macrocode} % continue with second link % \begin{macrocode} - \ml@bld@quadchunks{\aeb@mLinkCnt@} - {\ml@qlngthchunkii}{\ml@urlbuildii}% + \ml@bld@quadchunks{\aeb@mLinkCnt@} + {\ml@qlngthchunkii}{\ml@urlbuildii}% \fi \fi \fi @@ -1180,12 +1257,18 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% \advance\@tempcnta-\aeb@arrayIndx \def\@indx{\the\@tempcnta}% }% + \@tempcntb=\@indx \divide\@tempcntb by 8 + \advance\@tempcntb by 1 +\ifx#3\ml@urlbuildii \advance\@tempcntb by \eq@mlcrackat\relax\fi \global\setbox#3=\hbox{% \mlh@setQuadSyllable{\@indx}{#2}{#1}{\unhcopy\@ne}% - \hbox{\unhcopy\@ne}\penalty0\unhcopy#3}%hbox + \hbox{\unhcopy\@ne}\relax\ml@typeset@@syl{\@tempcntb}\penalty0\unhcopy#3}%hbox }} % \end{macrocode} % After the above preliminaries, we finally define \DescribeMacro{\mlurl}\cmd{\mlurl}. +%\begin{flushleft} +% Syntax: \ttfamily\string\mlurl[\ameta{opts}]\darg{\ameta{url}} +%\end{flushleft} % \begin{macrocode} \newcommand{\mlurl}{\begingroup\@makeother\~\relax% \def~{\string~}% \ef@sanitize@toks\mlurl@} @@ -1197,7 +1280,6 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% {\let\ef@thislinkcolor\normalcolor}{}\expandafter \def\expandafter\ef@thislinkcolor@SAVE \expandafter{\ef@thislinkcolor}% -%\def\ml@urlOpts{#1}\def\ml@urlURI{#2}% \def\ml@setlink##1{\setLinkPbox{\A{\URI{#2}}% \QuadPoints{mLink##1}#1}}% % \end{macrocode} @@ -1217,27 +1299,27 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % \end{macrocode} % \begin{macrocode} \@ifundefined{mLinkLngth\the\aeb@mLinkCnt}{% - \global\linknotformedtrue\def\lngth{17}% + \global\linknotformedtrue\def\ml@lngth{17}% \def\ml@qlngthchunki{17}} {\@tempcnta\@nameuse{mLinkLngth\the\aeb@mLinkCnt}\relax - \edef\lngth{\the\@tempcnta}%\multiply\@tempcnta8\relax + \edef\ml@lngth{\the\@tempcnta}%\multiply\@tempcnta8\relax \edef\ml@qlngthchunki{\the\@tempcnta}}% % \end{macrocode} % We make some calculations in preparation to a link that will be % cracked apart. -% \cs{MAXCNT} is the number of syllables of the un-cracked URL. +% \cs{mlM@XCNT} is the number of syllables of the un-cracked URL. % \begin{macrocode} \@ifundefined{mLinkSyCnt\the\aeb@mLinkCnt} - {\def\MAXCNT{0}\def\ml@lngthchunki{0}\def\ml@lngthchunkii{0}% + {\def\mlM@XCNT{0}\def\ml@lngthchunki{0}\def\ml@lngthchunkii{0}% \def\ml@qlngthchunki{0}\def\ml@qlngthchunkii{0}\def\revCrackAt{0}} - {\edef\MAXCNT{\@nameuse{mLinkSyCnt\the\aeb@mLinkCnt}}% + {\edef\mlM@XCNT{\@nameuse{mLinkSyCnt\the\aeb@mLinkCnt}}% % \end{macrocode} -% When \cs{MAXCNT} is known, and \cs{eq@mlcrackat} is known, we can calculate +% When \cs{mlM@XCNT} is known, and \cs{eq@mlcrackat} is known, we can calculate % the number of syllables of each chunk of the URL, for the first chunk, it is -% \cs{eq@mlcrackat}, for the second it is $\cs{MAXCNT} - \cs{eq@mlcrackat}$. +% \cs{eq@mlcrackat}, for the second it is $\cs{mlM@XCNT} - \cs{eq@mlcrackat}$. % \begin{macrocode} \ifx\eq@mlcrackat\@empty\else - \@tempcnta\MAXCNT\relax\advance\@tempcnta-\eq@mlcrackat\relax + \@tempcnta\mlM@XCNT\relax\advance\@tempcnta-\eq@mlcrackat\relax \edef\ml@lngthchunki{\eq@mlcrackat}% \edef\ml@lngthchunkii{\the\@tempcnta}% \@tempcnta\ml@lngthchunki\relax\multiply\@tempcnta8\relax @@ -1249,14 +1331,13 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % This calculation can be move to earlier code where it is not executed for each syllable (chunk). % \cs{revCrackAt} is the value of \cs{eq@mlcrackat} as measure from the end of the url. % \begin{macrocode} - \@tempcnta\MAXCNT\relax + \@tempcnta\mlM@XCNT\relax \advance\@tempcnta-\eq@mlcrackat\relax \advance\@tempcnta\@ne \edef\revCrackAt{\the\@tempcnta}% \fi}% \@tempcnta\aeb@mLinkCnt\advance\@tempcnta\@ne \edef\aeb@mLinkCnt@{\the\@tempcnta}% -% \begin{macrocode} \urldef\ml@url\nolinkurl{#2}% \def\SOUL@mlhpreamble{%\begingroup \mlh@preambleCmdInsert\ef@colorthislink}\hyper@chars @@ -1272,7 +1353,8 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % The next several lines are taken from the definition of \cs{mlhypertext}, the basic command % for construction many of the `\cs{ml}' commands of this package. % \begin{macrocode} - \ifx\eq@mlcrackat\@empty\ml@start@link{\the\aeb@mLinkCnt}{\lngth}\fi + \ifx\eq@mlcrackat\@empty + \ml@start@link{\the\aeb@mLinkCnt}{\ml@lngth}\fi \def\mlh@preambleCmdInsert{\ml@MrkLnk{\the\aeb@mLinkCnt}% \ml@earlyExecProps{#1}}% \def\mlh@postambleCmd{% @@ -1299,14 +1381,14 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% \immediate\write\@auxout{\string\mlcsarg \string\gdef{mLinkLngth\the\aeb@mLinkCnt}{\the\aeb@arrayIndx}}% \ifx\eq@mlcrackat\@empty - \ml@finish@link{\the\aeb@mLinkCnt}{\lngth}% + \ml@finish@link{\the\aeb@mLinkCnt}{\ml@lngth}% \ml@setlink{\the\aeb@mLinkCnt}% \iffixmlinks\literalps@out{restore}\fi \else \ml@finish@link{\the\aeb@mLinkCnt}{\ml@qlngthchunki}% \ml@setlink{\the\aeb@mLinkCnt}% \iffixmlinks\literalps@out{restore}\fi - \eq@mlcrackinsat\penalty-50 + \eq@mlcrackinsat\penalty-100 \ml@start@link{\aeb@mLinkCnt@}{\ml@qlngthchunkii}% \penalty0\@ifundefined{mLinkLngth\the\aeb@mLinkCnt}{} {\ml@MrkLnk{\aeb@mLinkCnt@}}\unhcopy\ml@urlbuildii @@ -1332,14 +1414,20 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% \fi }% } +% \end{macrocode} +% Make \texttt{gFixup} into a macro, so other packages (\pkg{aeb\_mlink} can intercept and insert +% its own procedure here. +% \changes{v2.3.2}{2018/08/09}{We make \string\texttt{gFixup} into a macro name \string\cs{FixupProc}} +% \begin{macrocode} +\def\FixupProc{gFixup} \def\ml@finish@link#1#2{% Step 4 and 5 % #1=link number % #2 = final quad length \ifoldstylequads\else \ifnum\aeb@arrayIndx=0\relax \PackageWarning{aeb_mlink}{% - Problem with mLink\the\aeb@mLinkCnt,\MessageBreak - Will skip the creation of this link}\fi + Problem with mLink\the\aeb@mLinkCnt, Will skip the \MessageBreak + creation of this link}\fi \literalps@out{% % \end{macrocode} % If \cs{iffixmlinks} is true, we fix the links, otherwise, we no not. @@ -1349,11 +1437,11 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% save^^J% bCreateLink {^^J% \mlDict\space/mLinkFxup#1\space known {^^J% - #1\space + (\ml@@nnotName#1) #2\space mLinkFxup#1\space quadpointsfixup^^J% - \ps@mark{mLink#1} 0 gFixup + \ps@mark{mLink#1} 0 \FixupProc\space /PUTINTERVAL pdfmark^^J% }if }if \fi @@ -1376,9 +1464,9 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % \section{Macros used by the SOUL Interface} % \begin{macrocode} \ifHy@colorlinks - \def\ef@colorthislink{\color{\ef@thislinkcolor}} + \def\ef@colorthislink{\color{\ef@thislinkcolor}} \else - \let\ef@colorthislink\relax + \let\ef@colorthislink\relax \fi % \end{macrocode} % I've inserted \verb|\let\protect\@empty| to make |mlnameref| and |mlNameref| work. @@ -1389,99 +1477,94 @@ yMin 20 string cvs pf(]\string\n)pf^^J}% % (2011/12/27) Originally, I had \verb|\let\protect\@empty| here, but removing this % seems to do no harm, so, we'll go for it. % \begin{macrocode} - \mlh@preambleCmdInsert\ef@colorthislink} -\def\SOUL@mlheverysyllable{% - \mlh@setQuadSyllable{\the\aeb@arrayIndx}{\lngth}% - {\the\aeb@mLinkCnt}{\the\SOUL@syllable}% - \the\SOUL@syllable\SOUL@setkern\SOUL@charkern}% -\def\SOUL@mlheveryspace#1{#1\space\hskip\spaceskip}% + \mlh@preambleCmdInsert\ef@colorthislink} +\def\SOUL@mlheverysyllable{% dpsaug16 + \global\advance\syllableCnt\@ne + \ifx\eq@mlcrackat\@empty + \expandafter\SOUL@mlheverysyllable@i + \else + \expandafter\SOUL@mleverysyllable@ii + \fi +} +\let\eq@@mlhyph\@empty +\def\ml@typset@syl#1{\raisebox{\ml@raiseamt} + {\smash{\normalfont\normalcolor\tiny\strut\llap{\the#1}}}} +\def\turnSyllbCntOn{\mlMarksOn\let\ml@typeset@@syl\ml@typset@syl} +\def\turnSyllbCntOff{\let\ml@typeset@@syl\@gobble} +\turnSyllbCntOff +\def\SOUL@mlheverysyllable@i{% + \mlh@setQuadSyllable{\the\aeb@arrayIndx}{\ml@lngth}% + {\the\aeb@mLinkCnt}{\the\SOUL@syllable\eq@@mlhyph}% + \the\SOUL@syllable %\SOUL@setkern\SOUL@charkern + \ml@typeset@@syl{\syllableCnt}\eq@@mlhyph +}% +\def\SOUL@mleverysyllable@ii{% + \ifnum\eq@mlchunk=0\relax + \ifnum\syllableCnt>\eq@mlcrackat\relax + \global\ml@displayfalse + \else + \global\ml@displaytrue + \ifnum\syllableCnt=\eq@mlcrackat\relax + \let\eq@@mlhyph\eq@mlhyph + \global\let\ml@space\relax + \else + \let\eq@@mlhyph\@empty + \global\let\ml@space\space + \fi + \SOUL@mlheverysyllable@i + \fi + \else + \ifnum\syllableCnt>\eq@mlcrackat\relax + \global\ml@displaytrue + \SOUL@mlheverysyllable@i + \else + \global\ml@displayfalse + \fi + \fi + \ml@dynamicsetup +} +%\def\SOUL@mlheveryspace#1{#1\space\hskip\spaceskip} +\let\ml@space\space +\def\SOUL@mlheveryspace#1{% + #1\ml@space\global\let\ml@space\space +} \def\SOUL@mlheveryhyphen{% - \discretionary{% - \unkern - \SOUL@setkern\SOUL@hyphkern - \SOUL@sethyphenchar - }{}{}% + \discretionary{% + \unkern + \SOUL@setkern\SOUL@hyphkern + \SOUL@sethyphenchar + }{}{}% } -\def\SOUL@mlheveryexhyphen#1{% - \mlh@setQuadSyllable{\the\aeb@arrayIndx}{\lngth}% - {\the\aeb@mLinkCnt}{\SOUL@setkern\SOUL@hyphkern#1}% - \SOUL@setkern\SOUL@hyphkern#1% - \discretionary{}{}{% - \SOUL@setkern\SOUL@charkern - }% +\def\SOUL@mlheveryexhyphen#1{\global\advance\syllableCnt\@ne + \mlh@setQuadSyllable{\the\aeb@arrayIndx}{\ml@lngth}% + {\the\aeb@mLinkCnt}{\SOUL@setkern\SOUL@hyphkern#1}% + \SOUL@setkern\SOUL@hyphkern\hbox{#1}% + \discretionary{}{}{% + \SOUL@setkern\SOUL@charkern + }% } \def\mlh@postambleCmd{\relax} +\def\ml@dynamicsetup{%dpsaug16 + \ifml@display + \global\let\SOUL@everyspace\SOUL@mlheveryspace + \global\let\SOUL@everyexhyphen\SOUL@mlheveryexhyphen + \else + \gdef\SOUL@everyspace##1{}% + \gdef\SOUL@everyexhyphen##1{}% + \fi +} \def\SOUL@mlhpostamble{\mlh@postambleCmd} \def\SOUL@mlhsetup{\SOUL@setup - \let\SOUL@preamble\SOUL@mlhpreamble - \let\SOUL@everysyllable\SOUL@mlheverysyllable - \let\SOUL@everyspace\SOUL@mlheveryspace - \let\SOUL@everyhyphen\SOUL@mlheveryhyphen - \let\SOUL@everyexhyphen\SOUL@mlheveryexhyphen - \def\SOUL@postamble{\SOUL@mlhpostamble}% -} -\DeclareRobustCommand*\aeb@mlh{\SOUL@mlhsetup\SOUL@} -% \end{macrocode} -% \leavevmode\DescribeMacro{\crackAt}\hskip-\marginparsep\darg{\ameta{num}}\darg{\ameta{string}} -% The macro \cs{crackAt} breaks \ameta{string} into two parts and places the two parts in their -% own token register: \cs{mofrstoftwo} contains contains that portion of the string up to and including -% the \ameta{num}${}^{\mbox{\scriptsize th}}$ syllable. We use this macro to break apart a string that itself -% breaks across a page boundary on the \ameta{num}${}^{\mbox{\scriptsize th}}$ syllable. -% \begin{macrocode} -\newtoks\mlfrstoftwo \mlfrstoftwo={} -\newtoks\mlsndoftwo \mlsndoftwo={} -\newcount\syllableCnt \syllableCnt=0 -% \end{macrocode} -% We use the \pkg{soul} engine to break \ameta{string} apart, we count the syllables are they are -% determined by \pkg{soul}. Next is the setup for our soul command, \cs{crackAt}. -% \begin{macrocode} -\def\SOUL@ckhsetup{\SOUL@setup -% \end{macrocode} -% Processing syllables -% \begin{macrocode} - \def\SOUL@everysyllable{\global\advance\syllableCnt\@ne - \ifnum\syllableCnt=\mlcr@ckAt\relax - \edef\x{\the\mlfrstoftwo\the\SOUL@syllable\eq@mlhyph}% - \global\mlfrstoftwo=\expandafter{\x}\else - \ifnum\syllableCnt>\mlcr@ckAt\relax - \edef\x{\the\mlsndoftwo\the\SOUL@syllable}% - \global\mlsndoftwo=\expandafter{\x}\else - \edef\x{\the\mlfrstoftwo\the\SOUL@syllable}% - \global\mlfrstoftwo=\expandafter{\x}\fi\fi - }% -% \end{macrocode} -% Processing spaces -% \begin{macrocode} - \def\SOUL@everyspace##1{% - \ifnum\syllableCnt<\mlcr@ckAt\relax - \edef\x{\the\mlfrstoftwo}% - \global\mlfrstoftwo=\expandafter{\x##1 }\else - \edef\x{\the\mlsndoftwo}% - \ifnum\syllableCnt=\mlcr@ckAt\relax -% \end{macrocode} -% We assume the link breaks across a page here, so we try to toss the space. -% \begin{macrocode} - \global\mlsndoftwo=\expandafter{\x##1}\else - \global\mlsndoftwo=\expandafter{\x##1 }\fi\fi - }% -% \def\SOUL@everyhyphen{% -% \ifnum\syllableCnt>\mlcr@ckAt\relax -% \edef\x{\the\mlsndoftwo}\global -% \mlsndoftwo=\expandafter{\x\SOUL@mlheveryhyphen}\else -% \edef\x{\the\mlfrstoftwo}\global -% \mlfrstoftwo=\expandafter{\x\SOUL@mlheveryhyphen}\fi -% }% - \def\SOUL@everyexhyphen##1{\global - \ifnum\syllableCnt>\mlcr@ckAt\relax - \edef\x{\the\mlsndoftwo}\global - \mlsndoftwo=\expandafter{\x##1}\else - \edef\x{\the\mlfrstoftwo}\global - \mlfrstoftwo=\expandafter{\x##1}\fi - }% + \let\SOUL@preamble\SOUL@mlhpreamble + \let\SOUL@everysyllable\SOUL@mlheverysyllable + \ml@dynamicsetup +% \let\SOUL@everyspace\SOUL@mlheveryspace + \let\SOUL@everyhyphen\SOUL@mlheveryhyphen +% \let\SOUL@everyexhyphen\SOUL@mlheveryexhyphen + \def\SOUL@postamble{\SOUL@mlhpostamble}% } -\DeclareRobustCommand*\crackAt[1]{\def\mlcr@ckAt{#1}% - \mlfrstoftwo={}\mlsndoftwo={}\syllableCnt=0 - \SOUL@ckhsetup\SOUL@} +\DeclareRobustCommand*\aeb@mlh{\syllableCnt=0 + \SOUL@mlhsetup\SOUL@} % \end{macrocode} % \begin{macrocode} % End of Package diff --git a/texmf-dist/source/latex/aeb-mlink/aeb_mlink.ins b/texmf-dist/source/latex/aeb-mlink/aeb_mlink.ins index 23b18e35..d98e0b69 100644 --- a/texmf-dist/source/latex/aeb-mlink/aeb_mlink.ins +++ b/texmf-dist/source/latex/aeb-mlink/aeb_mlink.ins @@ -17,7 +17,7 @@ %% %% --------------- start of docstrip commands ------------------ %% -\def\filedate{2007/05/14} +\def\filedate{2018/04/26} \def\batchfile{aeb_mlink.ins} % \input docstrip diff --git a/texmf-dist/source/latex/aeb-mlink/doc/aebmlink_man.pdf b/texmf-dist/source/latex/aeb-mlink/doc/aebmlink_man.pdf Binary files differdeleted file mode 100644 index 2d697917..00000000 --- a/texmf-dist/source/latex/aeb-mlink/doc/aebmlink_man.pdf +++ /dev/null diff --git a/texmf-dist/tex/latex/aeb-mlink/aeb-mlink.sty b/texmf-dist/tex/latex/aeb-mlink/aeb-mlink.sty index 9064bb26..e827b392 100644 --- a/texmf-dist/tex/latex/aeb-mlink/aeb-mlink.sty +++ b/texmf-dist/tex/latex/aeb-mlink/aeb-mlink.sty @@ -1,28 +1,29 @@ -%%
-%% This is file `aeb-mlink.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% aeb_mlink.dtx (with options: `copyright,altpkgname')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% aeb_mlink.sty package, %%
-%% Copyright (C) 2006--2018 D. P. Story %%
-%% dpstory@acrotex.net %%
-%% %%
-%% This program can redistributed and/or modified under %%
-%% the terms of the LaTeX Project Public License %%
-%% Distributed from CTAN archives in directory %%
-%% macros/latex/base/lppl.txt; either version 1 of the %%
-%% License, or (at your option) any later version. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{aeb-mlink}
- [2018/04/26 v1.0 AeB MLink Alt-name (dps)]
-\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{aeb_mlink}}
-\ProcessOptions
-\RequirePackage{aeb_mlink}[2018/03/22]
-\endinput
-%%
-%% End of file `aeb-mlink.sty'.
+%% +%% This is file `aeb-mlink.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% aeb_mlink.dtx (with options: `copyright,altpkgname') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% aeb_mlink.sty package, %% +%% Copyright (C) 2006--2018 D. P. Story %% +%% dpstory@acrotex.net %% +%% %% +%% This program can redistributed and/or modified under %% +%% the terms of the LaTeX Project Public License %% +%% Distributed from CTAN archives in directory %% +%% macros/latex/base/lppl.txt; either version 1.2 of %% +%% the License, or (at your option) any later version. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e} +\RequirePackage{xkeyval} +\ProvidesPackage{aeb-mlink} + [2018/04/26 v1.0 AeB MLink Alt-name (dps)] +\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}{aeb_mlink}} +\ProcessOptionsX +\RequirePackage{aeb_mlink}[2018/08/18] +\endinput +%% +%% End of file `aeb-mlink.sty'. diff --git a/texmf-dist/tex/latex/aeb-mlink/aeb_mlink.sty b/texmf-dist/tex/latex/aeb-mlink/aeb_mlink.sty index 479b2cc8..73f8c6b2 100644 --- a/texmf-dist/tex/latex/aeb-mlink/aeb_mlink.sty +++ b/texmf-dist/tex/latex/aeb-mlink/aeb_mlink.sty @@ -1,871 +1,927 @@ -%%
-%% This is file `aeb_mlink.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% aeb_mlink.dtx (with options: `copyright,package')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% aeb_mlink.sty package, %%
-%% Copyright (C) 2006--2018 D. P. Story %%
-%% dpstory@acrotex.net %%
-%% %%
-%% This program can redistributed and/or modified under %%
-%% the terms of the LaTeX Project Public License %%
-%% Distributed from CTAN archives in directory %%
-%% macros/latex/base/lppl.txt; either version 1 of the %%
-%% License, or (at your option) any later version. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{aeb_mlink}
- [2018/04/26 v2.3 AeB MLink (dps)]
-\RequirePackage{xkeyval}
-\RequirePackage{ifpdf}[2006/02/20]
-\RequirePackage{ifxetex}[2006/08/21]
-\newif\if@ml@dvips \@ml@dvipstrue
-\def\mlcsarg#1#2{\expandafter#1\csname#2\endcsname}
-\DeclareOptionX{dvipsone}{\def\eq@drivernum{0}\@ml@dvipsfalse
- \PassOptionsToPackage{dvipsone}{eforms}
- \PassOptionsToPackage{dvipsone}{hyperref}
-}
-\DeclareOptionX{dvips}{\def\eq@drivernum{0}\@ml@dvipstrue
- \PassOptionsToPackage{dvips}{eforms}
- \PassOptionsToPackage{dvips}{hyperref}
-}
-\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}{eforms}}
-\newcount\mldblevel \mldblevel=0
-\define@key{aeb_mlink.sty}{dblevel}[0]{\mldblevel=#1 }
-\def\ml@err@msg{This package requires the driver dvips and\MessageBreak
- Adobe Distiller as the PDF creator}
-\ifpdf\PackageError{aeb_mlink}{\ml@err@msg}\else
- \ifxetex\PackageError{aeb_mlink}{\ml@err@msg}\else
- \let\ExecuteOptions@SAVE\ExecuteOptions
- \let\ExecuteOptions\ExecuteOptionsX
- \InputIfFileExists{web.cfg}{}
- {\@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}}
- {\ExecuteOptionsX{dvipsone}}}%
- \let\ExecuteOptions\ExecuteOptions@SAVE
-\fi\fi
-\ProcessOptionsX
-\RequirePackage{hyperref}
-\RequirePackage{refcount}
-\RequirePackage{eforms}[2018/03/22]
-\RequirePackage{soul}
-\def\ps@mark{[\space}
-\ifnum\mldblevel>0
- \def\mlpgMsg{(\string\n Beginning of page: ) pf
- PhysicalPage 20 string cvs
- pf(\string\n)pf}\else
- \def\mlpgMsg{}\fi
-\def\pgmonitoring{\if@ml@dvips
- dup /PhysicalPage exch 1 add def
- /PhysicalPage PhysicalPage def^^J\fi
- \mlpgMsg
-}
-\def\smallRectTF{\ifoldstylequads false\else
- \iffixmlinks true\else false\fi\fi\space
- \ifSmallRect true\else false\fi\space and}
-\def\mllnkcontainer#1{bCreateLink { xoMsgB {
- \smallRectTF\space mlRectFix^^J%
- #1}if}{\the\aeb@mLinkCnt\space mlIsBldMsg}ifelse}
-\def\pboxRect{mlRect }
-\if@ml@dvips
-\def\mlDict{SDict}
-\special{!userdict begin
- /TeXtoPDF {65536 div DVImag mul} def % sp to pts
- /PDFtoDvips {72.27 div Resolution mul} def % points to dots
- /PDFtoVDvips {72.27 div VResolution mul} def % points to dots
- /DvipstoPDF {72.27 mul Resolution div} def % dots to points
- /HTeXtoDvips {TeXtoPDF PDFtoDvips} def % sp to dots
- /VTeXtoDvips {TeXtoPDF PDFtoVDvips} def^^J% % sp to dots
- /PhysicalPage 0 def^^J%
- /PageHeight {vsize} def^^J%
- /PDFtoTeX {PDFtoDvips} def^^J%
- /pf{print flush}def^^J%
- /bop-hook{ \pgmonitoring\space } def
-end}
-
-\def\setQuadBox{%
- currentpoint DvipstoPDF \aeb@bbox@dp\space TeXtoPDF add
- neg vsize add 72 sub % y1
- exch DvipstoPDF 72 add exch % x1
- 2 copy exch \aeb@bbox@wd\space TeXtoPDF add exch % x2
- 2 copy \aeb@bbox@ht\space TeXtoPDF add % y3
- 2 copy exch \aeb@bbox@wd\space TeXtoPDF sub exch % x4
-}
-\def\par@@Rect
-{%
- 72 neg PDFtoDvips vsize 72 sub PDFtoVDvips
- hsize 72 sub PDFtoDvips 72 neg PDFtoVDvips
-}
-\else
-\def\mlDict{dvidict}
-\special{!/TeXtoPDF {65536 div mag 1000 div mul} def
- /PDFtoTeX {65536 mul mag 1000 div div} def^^J%
- /pf{print flush}def^^J%
- /bphook{ \pgmonitoring\space } def^^J%
-}
-\def\setQuadBox{%
- currentpoint \aeb@bbox@dp\space add TeXtoPDF
- neg PageHeight add 72 sub % y1
- exch TeXtoPDF 72 add exch % x1
- 2 copy exch \aeb@bbox@wd\space TeXtoPDF add exch % x2
- 2 copy \aeb@bbox@ht\space TeXtoPDF add % y3
- 2 copy exch \aeb@bbox@wd\space TeXtoPDF sub exch % x4
-}
-\def\par@@Rect
-{%
- 72 neg PDFtoTeX PageHeight 72 sub PDFtoTeX
- PageWidth 72 sub PDFtoTeX 72 neg PDFtoTeX
-}
-\fi
-\newbox\aeb@bbox
-\newcount\aeb@arrayIndx \aeb@arrayIndx=0
-\newcount\aeb@mLinkCnt \aeb@mLinkCnt=0
-\newif\ifmllinktotalchanged\mllinktotalchangedfalse
-\newif\ifSmallRect \SmallRecttrue
-\AtEndDocument{\wrtmlinktot@l\ckchngmlinktot@l\wrt@linksnotformed}
-\def\wrt@linksnotformed{\iflinknotformed
- \PackageWarningNoLine{aeb_mlinks}{Some link calculations are not
- complete.\MessageBreak
- DO NOT CONVERT TO PDF at this time. Compile at \MessageBreak
- least twice more}\fi}
-\def\wrtmlinktot@l{\immediate\write\@auxout{\string\gdef
- \string\mlinkstotal{\the\aeb@mLinkCnt}}}
-\def\ckchngmlinktot@l{\@ifundefined{mlinkstotal}{}
- {\ml@mlinktot@l@changed}}
-\def\ml@mlinktot@l@changed{%
- \ifnum\mlinkstotal=\the\aeb@mLinkCnt\relax\else
- \PackageWarningNoLine{aeb_mlink}{The number of links has
- changed. Compile again\MessageBreak until this message
- does not appear}\immediate
- \write\@auxout{\string\mllinktotalchangedtrue}\fi
-}
-\def\ml@mllinktotalchanged{\ifmllinktotalchanged
- \PackageWarningNoLine{aeb_mlink}
- {The number of links has changed, continue\MessageBreak
- to compile}\fi}
-\AtBeginDocument{\ml@mllinktotalchanged}
-\def\CurrentBorderColor{\@linkbordercolor}
-\def\ml@nocolorHighlight{I}
-\def\ml@nocolorLineStyle{S}
-\def\ml@nocolorLineWidth{1}
-\def\ml@setnocolorDefaults{%
-\def\ml@nocolor@defaults{\H{\ml@nocolorHighlight}%
- \S{\ml@nocolorLineStyle}\W{\ml@nocolorLineWidth}%
- \Color{\CurrentBorderColor}}%
-}
-\ifHy@colorlinks
- \let\ml@nocolor@defaults\@empty
-\else
- \ml@setnocolorDefaults
-\fi
-\def\ml@earlyExecProps#1{%
- \eq@setWidgetProps\relax{#1}%
-}
-\newif\ifoldstylequads \oldstylequadsfalse
-\def\OldStyleBoxesOn{\mlfixOff\oldstylequadstrue}
-\def\OldStyleBoxesOff{\oldstylequadsfalse}
-\@onlypreamble\OldStyleBoxesOn
-\@onlypreamble\OldStyleBoxesOff
-\let\mlh@preambleCmdInsert\relax
-\def\mlcs#1{\texttt{\@backslashchar#1}}
-\bgroup\@makeother\%
-\gdef\CMT#1{ %\space #1}\egroup
-\def\mldbModeOn{\def\mldb##1##2{##2}}
-\def\mldbModeOff{\def\mldb##1##2{}}
-\def\mldb#1#2{\ifnum#1<\mldblevel#2\fi}
-\def\ml@adj@x{2}\def\ml@adj@y{2}
-\AtBeginDvi{\special{!%
-/bCreateLink true def
-/mlIsBld 17 def
-/mlIsBldMsg {
- /lnkCnt exch def
- (\string\n!! mLink)pf
- lnkCnt 20 string cvs pf
- ( is not completely formed,
- compile again!!\string\n)pf
-} def
-/xoMsgB true def^^J%
-/xoMsg {^^J%
- /lnkCnt exch def^^J%
- /Indx exch def^^J%
- /nSyllable Indx 8 div def^^J% dpsa08
- (!!------------------------------------------------------------------%
- \string\n Warning:\string\n
- The text of mLink)pf
- lnkCnt 20 string cvs pf
- ( has crossed a page boundary from page )pf
- PhysicalPage 1 sub 10 string cvs pf
- ( to ) pf PhysicalPage 10 string cvs pf
- (.\string\n Cross page links are not supported by the
- PDF Specification)pf
- (.\string\n This link is not constructed,
- please fix it.\string\n) pf
- (Break point is after syllable number )pf
- nSyllable cvi 20 string cvs pf (.\string\n)pf
- (Use the \string\\mlcrackat{)pf
- nSyllable cvi 20 string cvs pf
- (} option with this link.\string\n)pf
- (!!------------------------------------------------------------------%
- \string\n)pf^^J%
-} def^^J%
-/quadpointsfixup {^^J%
- /ary exch def^^J%
- /quadL exch def^^J%
- /lnkCnt exch def^^J%
-\mldb0{(Processing mLink)pf^^J}%
-\mldb0{lnkCnt 20 string cvs pf (: OK\string\n) pf^^J}%
-quadL 0 eq {
-(Problems with this link, length=0,
- will skip the creation of this link)pf^^J%
-}{
-/gOffset 0 def^^J%
-/gY ary\space 1 gOffset add get def^^J%
-\mldb1{(gY is ) pf gY 20 string cvs print^^J}%
-\mldb1{flush (\string\n) pf^^J}%
-/gN 0 def^^J%
-/gMrk 10 array def^^J% limitation
-gMrk 0 0 put^^J%
-/gMrkL 1 gOffset add def^^J%
-\mldb2{(Begin first for\string\n) pf^^J}%
-0 8 quadL 8 sub {^^J%
- /gIndx exch def^^J%
-\mldb2{(Outside gt if with gIndx=) pf^^J}%
-\mldb2{gIndx 20 string cvs pf^^J}%
-\mldb2{(\string\n) pf^^J}%
- /getEntry ary\space 1 gOffset add get def^^J%
-\mldb2{(getEntry=) pf getEntry 20 string cvs pf^^J}%
-\mldb2{(\string\n) pf^^J}%
- gY getEntry sub abs 2 gt {^^J%
-\mldb2{(Inside gt if\string\n) pf^^J}%
- gMrk gMrkL gIndx put^^J%
- /gMrkL gMrkL 1 add def^^J%
- /gY getEntry def^^J%
-\mldb2{(Updating gY to )pf gY 20 string cvs pf^^J}%
-\mldb2{(\string\n) pf^^J}%
-\mldb2{(gMrkL=)pf gMrkL 20 string cvs pf^^J}%
-\mldb2{(\string\n) pf^^J}%
- } if^^J%
- /gOffset gOffset 8 add def^^J%
-} for^^J%
-\mldb2{(end first for\string\n) pf^^J}%
- /gAryL 8 20 mul def^^J% limitation
-\mldb2{(gAryL=) pf gAryL 20 string cvs pf^^J}%
-\mldb2{(\string\n)pf^^J}%
- /gFixup 8 gMrkL mul array def^^J%
- /gOffset 0 def^^J%
-\mldb2{(for loop: gMrkL=)pf gMrkL 20 string cvs pf^^J}%
-\mldb2{(\string\n) pf^^J}%
-0 1 gMrkL 1 sub {^^J%
-\mldb2{(After gAry\string\n) pf^^J}%
-\mldb2{(Top of for loop\string\n) pf^^J}%
- /gIndx exch def^^J%
-\mldb2{(gIndx=)pf gIndx 20 string cvs pf^^J}%
-\mldb2{(\string\n)pf^^J}%
-\mldb2{(gMrk=)pf gMrk gIndx get 20 string cvs pf^^J}%
-\mldb2{(\string\n) pf^^J}%
-\mldb2{(mLinkFxup<num> length = )^^J}%
-\mldb2{pf ary\space length 20 string cvs^^J}%
-\mldb2{pf (\string\n) pf^^J}%
-gIndx 1 add gMrkL eq {^^J%
- /gCount ary\space length gMrk gIndx get sub def^^J%
-}{^^J%
- /gCount gMrk gIndx 1 add get gMrk gIndx get sub def^^J%
-} ifelse^^J%
-/gAry gAryL array def^^J%
-\mldb2{(gCount=)pf gCount 20 string cvs pf^^J}%
-\mldb2{(\string\n)pf^^J}%
-/sliceOfLinkfxup gCount array def^^J%
-sliceOfLinkfxup 0 ary gMrk gIndx get^^J%
- gCount getinterval putinterval^^J%
- gAry 0 sliceOfLinkfxup putinterval^^J%
-\mldb1{(Listing elements of gFixup\string\n) pf^^J}%
-\mldb1{gAry 0 get 20 string cvs pf (\string\n)pf^^J}%
-\mldb1{gAry 1 get 20 string cvs pf (\string\n)pf^^J}%
-\mldb1{gAry gCount 1 sub 5 sub get
- 20 string cvs pf (\string\n)pf^^J}%
-\mldb1{gAry gCount 1 sub 4 sub get
- 20 string cvs pf (\string\n)pf^^J}%
-\mldb1{gAry gCount 1 sub 3 sub get
- 20 string cvs pf (\string\n)pf^^J}%
-\mldb1{gAry gCount 1 sub 2 sub get
- 20 string cvs pf (\string\n)pf^^J}%
-\mldb1{gAry 6 get 20 string cvs pf (\string\n)pf^^J}%
-\mldb1{gAry 7 get 20 string cvs pf (\string\n)pf^^J}%
- gFixup gOffset [^^J%
- gAry 0 get ^^J% x1 ll
- gAry 1 get^^J% y1 ll
- gAry gCount 1 sub 5 sub get^^J% x2 lr
- gAry gCount 1 sub 4 sub get^^J% y2 lr
- gAry gCount 1 sub 3 sub get^^J% x3 ur
- gAry gCount 1 sub 2 sub get^^J% y3 ur
- gAry 6 get^^J% x4 ul
- gAry 7 get^^J% y4 ul
- ] putinterval^^J%
- /gOffset gOffset 8 add def^^J%
- } for^^J%
-\mldb2{(End of second for\string\n) pf^^J}%
- } ifelse
- } def^^J%
-/smallquadpointsfixup {^^J%
-/gIndx exch def^^J%
-/ary exch def^^J%
-/lnkCnt exch def^^J%
-/quadL exch def^^J%
-/gSFup 8 array def^^J%
- gSFup 0 ary 0 gIndx add get
- gIndx 0 eq {\ml@adj@x\space sub} if put^^J% x1
- gSFup 1 ary 1 gIndx add get put^^J% y1
- gSFup 2 ary 2 gIndx add get put^^J% x2
- gSFup 3 ary 3 gIndx add get put^^J% y2
- gSFup 4 ary 4 gIndx add get put^^J% x3
- gSFup 5 ary 5 gIndx add get put^^J%
- gSFup 6 ary 6 gIndx add get
- gIndx 0 eq {\ml@adj@x\space sub} if put^^J% x4
- gSFup 7 ary 7 gIndx add get put^^J%
- ary gIndx gSFup putinterval^^J%
-} def^^J%
-/mlRectFix {^^J%
-/ifRectFix exch def^^J%
-ifRectFix {
- /nL gFixup length 8 sub def^^J% number of lines
- /xMin gFixup 0 get def^^J%
- 0 8 nL {^^J%
- /Indx exch def^^J%
- gFixup Indx get xMin lt {/xMin gFixup Indx get def}if } for^^J%
- /xMin xMin 2 sub def^^J%
- /xMax gFixup 2 get def^^J%
- 2 8 nL 2 add {^^J%
- /Indx exch def^^J%
- gFixup Indx get xMax gt {/xMax gFixup Indx get def}if } for^^J%
- /xMax xMax 2 add def^^J%
- /yMin gFixup 1 get def^^J%
- 1 8 nL 1 add {^^J%
- /Indx exch def^^J%
- gFixup Indx get yMin lt {/yMin gFixup Indx get def}if } for^^J%
- /yMin yMin 4 sub def^^J%
- /yMax gFixup 5 get def^^J%
- 5 8 nL 5 add{^^J%
- /Indx exch def^^J%
- gFixup Indx get yMax gt {/yMax gFixup Indx get def}if } for^^J%
- /yMax yMax 2 add def^^J%
- /mlRect {/Rect [^^J%
- xMin 72 sub PDFtoTeX^^J%
- PageHeight 72 sub yMax sub PDFtoTeX^^J%
- xMax 72 sub PDFtoTeX^^J%
- PageHeight yMin sub 72 sub PDFtoTeX ]^^J%
- }def^^J%
-}{^^J%
- /mlRect{/Rect [ \par@@Rect ] }def^^J%
-}ifelse^^J%
-ifRectFix {
-\mldb1{(/Rect [)pf^^J%
-xMin 20 string cvs pf( )pf^^J%
-yMax 20 string cvs pf( )pf^^J%
-xMax 20 string cvs pf( )pf^^J%
-yMin 20 string cvs pf(]\string\n)pf^^J}%
-} if^^J%
-} def
-}}
-\newif\ifmlmarks\mlmarksfalse
-\def\mlMarksOn{\mlmarkstrue}
-\def\mlMarksOff{\mlmarksfalse}
-\def\ml@MrkLnk#1{\ifmlmarks\bgroup\ifdim\baselineskip=0pt
- \setbox\z@\hbox{T}\def\ml@raiseamt{\ht\z@+.4pt}\else
- \def\ml@raiseamt{.6\baselineskip}\fi\smash{\rlap{\normalcolor\bfseries
- \raisebox{\ml@raiseamt}{\tiny\strut{L#1}}}}\egroup\fi}
-\newif\iflinknotformed \linknotformedfalse
-\def\ml@underlinded{U}
-\@ifundefined{mlhypertext}{\newcommand}{\renewcommand}%
-{\mlhypertext}[2][]{\begingroup
- \toks@=\expandafter{#2}%
- \edef\ml@HytextArg{{\the\toks@}}%
- \global\aeb@arrayIndx=\z@ % dpsa08
- \def\ml@setlink##1{\setLinkPbox{%
- \QuadPoints{mLink##1}#1}}%
- \expandafter\processAppArgs\set@LinkPboxDefaults
- \presets{\ml@nocolor@defaults}\S{S}\W{0}#1\end\@nil
- \ifx\eq@S@value\ml@underlinded
- \let\itsunderline\ef@YES\else\let\itsunderline\ef@NO\fi
- \ifx\eq@mlignore\ef@YES
- \global\advance\aeb@mLinkCnt\@ne\relax
- \def\ml@next{\mlhypertext@i{#1}}\else
- \ifx\eq@mlcrackat\@empty
- \global\advance\aeb@mLinkCnt\@ne\relax
- \def\ml@next{\mlhypertext@i{#1}}%
- \else
- \edef\temp@crackAt{\noexpand
- \crackAt{\eq@mlcrackat}{\the\toks@}}\temp@crackAt
- \def\ml@next{\mlhypertext[#1\mlignore{}]{\the\mlfrstoftwo}%
- \eq@mlcrackinsat\penalty-50
- \mlhypertext[#1\mlignore{}]{\the\mlsndoftwo}\aftergroup
- \normalcolor\endgroup}%
- \fi\fi
- \ml@next
-}
-\def\mlhypertext@i#1{%
- \@ifundefined{mLinkLngth\the\aeb@mLinkCnt}{\global
- \linknotformedtrue\def\lngth{17}}
- {\edef\lngth{\@nameuse{mLinkLngth\the\aeb@mLinkCnt}}}%
- \ml@start@link{\the\aeb@mLinkCnt}{\lngth}% Step 1
- \def\mlh@preambleCmdInsert{%
- \ml@MrkLnk{\the\aeb@mLinkCnt}\ml@earlyExecProps{#1}}%
- \def\mlh@postambleCmd{\endgroup}%
- \expandafter\aeb@mlh\ml@HytextArg
- \ml@finish@link{\the\aeb@mLinkCnt}{\lngth}%
- \ml@setlink{\the\aeb@mLinkCnt}%
- \ifoldstylequads\else
- \iffixmlinks\literalps@out{restore}\fi\fi
- \@ifundefined{mLinkLngth\the\aeb@mLinkCnt}{%
- \immediate\write\@auxout{\string\mlcsarg
- \string\gdef{mLinkLngth\the\aeb@mLinkCnt}{17}}%
- }{\immediate\write\@auxout{\string\mlcsarg
- \string\gdef{mLinkLngth\the\aeb@mLinkCnt}%
- {\the\aeb@arrayIndx}}}\endgroup
-}
-\def\mlh@setQuadSyllable#1#2#3#4{%
- \setbox\aeb@bbox=\hbox{\ml@strut#4}%
- {%
- \setbox\@tempboxa\hbox{\ml@strut}%
- \ifx\itsunderline\ef@YES\@tempdima1bp\relax\else
- \@tempdima\dp\@tempboxa \ifdim\@tempdima>2bp
- \advance\@tempdima-2bp\fi
- \fi
- \dp\aeb@bbox\@tempdima
- \@tempdima\ht\@tempboxa \advance\@tempdima\dp\aeb@bbox
- \advance\@tempdima1bp
- \ht\aeb@bbox\@tempdima\def\x{\the\count\z@}%
- \count\z@=\ht\aeb@bbox\xdef\aeb@bbox@ht{\x}%
- \count\z@=\wd\aeb@bbox\xdef\aeb@bbox@wd{\x}%
- \count\z@=\dp\aeb@bbox\xdef\aeb@bbox@dp{\x}%
- }%
- \ifoldstylequads
- \literalps@out{%
- bCreateLink {^^J%
- \mlDict\space/mLinkFxup#3\space known {^^J%
- \ps@mark{mLink#3}
- \the\aeb@arrayIndx\space [\setQuadBox]
- \space /PUTINTERVAL pdfmark}{^^J%
- xoMsgB {
- /xoMsgB false def
- \the\aeb@arrayIndx\space
- #3\space
- xoMsg % dpsa08
- } if^^J% xoMsgB
- } ifelse } if
- }%
- \else
- \literalps@out{%
- bCreateLink {^^J%
- \mlDict\space/mLinkFxup#3\space known {^^J%
- mLinkFxup#3\space
- #1\space[\setQuadBox] putinterval^^J%
- #2\space %
- #3\space
- mLinkFxup#3\space
- #1\space
- smallquadpointsfixup }{^^J%
- xoMsgB {
- /xoMsgB false def
- #1\space
- #3\space
- xoMsg % dpsa08
- } if^^J% xoMsgB
- } ifelse } if
- }%
- \fi
- \global\advance\aeb@arrayIndx8\relax
-}
-\def\aeb@exiii{\expandafter\expandafter\expandafter}
-\def\aebnameref#1{\@ifundefined{r@#1}{??}
- {\aeb@exiii\@thirdoffive\csname r@#1\endcsname}}
-\def\labelRef#1{\@ifundefined{r@#1}{Doc-Start}
- {\aeb@exiii\@fourthoffive\csname r@#1\endcsname}}
-\def\atPage#1{\getrefbykeydefault{#1}{page}{??}}
-\newcommand\mlhyperlink[3][]{%
- \mlhypertext[#1\A{/S/GoTo/D (#2)}]{#3}}
-\newcommand\mlhyperref[3][]{%
- \mlhypertext[#1\A{/S/GoTo/D (\labelRef{#2})}]{#3}}
-\newcommand\mlnameref[2][]{\protected@edef\ml@temp{\aebnameref{#2}}%
- \def\ml@tempi{\mlhypertext[#1\A{/S/GoTo/D (\labelRef{#2})}]}%
- \expandafter\ml@tempi\expandafter{\ml@temp}}
-\newcommand\mlNameref[2][]{\let\SOUL@stop\ml@SOUL@stop
- \protected@edef\ml@temp{`\aebnameref{#2}' on page~\atPage{#2}}%
- \def\ml@tempi{\mlhypertext[#1\A{/S/GoTo/D (\labelRef{#2})}]}%
- \expandafter\ml@tempi\expandafter{\ml@temp}}
-\def\ml@hyper@linkurl#1#2{\hyper@chars
- \let\ef@thislinkcolor\@urlcolor
- \let\CurrentBorderColor\@urlbordercolor
- \mlhypertext[\presets{\mlhref@args}\A{/S/URI/URI(#2)}]{#1}%
- \endgroup
-}%
-\def\ml@hyper@linkfile#1#2#3{%
- \let\ef@thislinkcolor\@filecolor
- \let\CurrentBorderColor\@filebordercolor
- \ifx\@pdfstartview\@empty
- \def\theView{[0 /Fit]}\else
- \def\theView{[0 \@pdfstartview]}\fi
- \@ifundefined{ifHy@pdfnewwindow}
- {\ifHy@newwindow}{\ifHy@pdfnewwindow}%
- \def\isWindow{/NewWindow true}\else
- \let\isWindow\@empty\fi
- \mlhypertext[\presets{\mlhref@args}\A{/S/GoToR \isWindow
- /F (#2) /D \ifx\\#3\\\theView\else(#3)\fi}]{#1}%
- \endgroup
-}
-\def\ml@hyper@launch run:#1\\#2#3{%
- \let\ef@thislinkcolor\@filecolor
- \let\CurrentBorderColor\@runbordercolor
- \@ifundefined{ifHy@pdfnewwindow}
- {\ifHy@newwindow}{\ifHy@pdfnewwindow}%
- \def\isWindow{/NewWindow true}\else
- \let\isWindow\@empty\fi
- \mlhypertext[\presets{\mlhref@args}\A{/S/Launch\isWindow
- /F (#1) \ifx\\#3\\\else /Win << /P (#3) /F (#1) >> \fi}]{#2}%
- \endgroup
-}
-\let\aeb@saved@href\href
-\newcommand{\mlhref}[1][]{%
- \begingroup
- \def\mlhref@args{#1}%
- \let\hyper@linkurl\ml@hyper@linkurl
- \let\hyper@linkfile\ml@hyper@linkfile
- \let\@hyper@launch\ml@hyper@launch
- \aeb@saved@href
-}
-\newbox\ml@urlbuildi
-\newbox\ml@urlbuildii
-\def\ml@SOUL@doword{%
- \global\setbox\ml@urlbuildi\hbox{}%
- \global\setbox\ml@urlbuildii\hbox{}%
- \edef\x{\the\SOUL@word}%
- \ifx\x\empty
- \else
- \SOUL@buffer={}%
- \setbox\z@\vbox{%
- \SOUL@tt
- \hyphenchar\font`\-
- \hfuzz\maxdimen
- \hbadness\@M
- \pretolerance\m@ne
- \tolerance\@M
- \leftskip\z@
- \rightskip\z@
- \hsize1sp
- \everypar{}%
- \parfillskip\z@\@plus1fil
- \hyphenpenalty-\@M
- \noindent
- \hskip\z@
- \relax
- \the\SOUL@word}%
- \let\SOUL@errmsg\relax
- \let\-\relax
- \count@\m@ne
- \ml@SOUL@analyze
- \SOUL@word={}%
- \fi
-}
-\def\ml@SOUL@analyze{{%
- \setbox\z@\vbox{%
- \unvcopy\z@
- \unskip
- \unpenalty
- \global\setbox\@ne=\lastbox}%
- \ifvoid\@ne
- \else
- \ml@interface@analyze
- \SOUL@syllgoal=\wd\@ne
- \advance\count@\@ne
- \ml@SOUL@analyze
- \SOUL@syllwidth\z@
- \SOUL@syllable={}%
- \ifnum\count@>\z@
- \advance\SOUL@syllgoal-\SOUL@ttwidth
- \ml@SOUL@dosyllable
- \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@hyphkern}%
- {\SOUL@sethyphenchar}%
- \SOUL@everyhyphen
- \else
- \ml@SOUL@dosyllable
- \fi
- \fi
-}}
-\def\ml@SOUL@dosyllable{%
- \SOUL@gettoken
- \SOUL@eventuallyexhyphen{\the\SOUL@token}%
- \edef\x{\the\SOUL@token}%
- \ifx\x\SOUL@hyphenhintM
- \let\SOUL@n\ml@SOUL@dosyllable
- \else\ifx\x\SOUL@lowerthanM
- \SOUL@gettoken
- \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@charkern}
- {\the\SOUL@token}%
- \SOUL@everylowerthan
- \SOUL@puttoken
- \let\SOUL@n\ml@SOUL@dosyllable
- \else\ifdim\SOUL@syllwidth=\SOUL@syllgoal
- \SOUL@everysyllable
- \SOUL@puttoken
- \let\SOUL@n\relax
- \else
- \ifx\x\SOUL@stopM
- \SOUL@errmsg
- \global\let\SOUL@errmsg\relax
- \let\SOUL@n\relax
- \else
- \setbox\tw@\hbox{\SOUL@tt\the\SOUL@token}%
- \advance\SOUL@syllwidth\wd\tw@
- \global\SOUL@lasttoken=\SOUL@token
- \SOUL@gettoken
- \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@charkern}
- {\the\SOUL@token}%
- \SOUL@puttoken
- \global\SOUL@token=\SOUL@lasttoken
- \SOUL@everytoken
- \edef\x{\SOUL@syllable={\the\SOUL@syllable\the\SOUL@token}}\x
- \let\SOUL@n\ml@SOUL@dosyllable
- \fi\fi\fi\fi
- \SOUL@n
-}
-\def\ml@interface@analyze{%
- \global\advance\syllableCnt\@ne % dpsa11
- \setbox\@ne\hbox{\unhbox\@ne}%
- \ifx\eq@mlcrackat\@empty
- \ml@bld@quadchunks{\the\aeb@mLinkCnt}
- {\ml@qlngthchunki}{\ml@urlbuildi}%
- \else
- \ifnum\syllableCnt=\revCrackAt\relax
- \aeb@arrayIndx=\z@
- \ml@start@link{\the\aeb@mLinkCnt}{\ml@qlngthchunki}%
- \ml@bld@quadchunks{\the\aeb@mLinkCnt}
- {\ml@qlngthchunki}{\ml@urlbuildi}%
- \else
- \ifnum\syllableCnt>\revCrackAt\relax
- \ml@bld@quadchunks{\the\aeb@mLinkCnt}
- {\ml@qlngthchunki}{\ml@urlbuildi}%
- \else
- \ifnum\syllableCnt=\@ne
- \aeb@arrayIndx=\z@
- \ml@start@link{\aeb@mLinkCnt@}{\ml@qlngthchunkii}%
- \ml@bld@quadchunks{\aeb@mLinkCnt@}
- {\ml@qlngthchunkii}{\ml@urlbuildii}%
- \else
- \ml@bld@quadchunks{\aeb@mLinkCnt@}
- {\ml@qlngthchunkii}{\ml@urlbuildii}%
- \fi
- \fi
- \fi
- \fi
-}
-\def\ml@bld@quadchunks#1#2#3{{%
- \@ifundefined{mLinkLngth\the\aeb@mLinkCnt}
- {\edef\@indx{\the\aeb@arrayIndx}}
- {\@tempcnta#2\relax
- \advance\@tempcnta-8\relax
- \advance\@tempcnta-\aeb@arrayIndx
- \def\@indx{\the\@tempcnta}%
- }%
- \global\setbox#3=\hbox{%
- \mlh@setQuadSyllable{\@indx}{#2}{#1}{\unhcopy\@ne}%
- \hbox{\unhcopy\@ne}\penalty0\unhcopy#3}%hbox
-}}
-\newcommand{\mlurl}{\begingroup\@makeother\~\relax% \def~{\string~}%
- \ef@sanitize@toks\mlurl@}
-\newcommand{\mlurl@}[2][]{\@ifundefined{ef@thislinkcolor}
- {\let\ef@thislinkcolor\normalcolor}{}\expandafter
- \def\expandafter\ef@thislinkcolor@SAVE
- \expandafter{\ef@thislinkcolor}%
- \def\ml@setlink##1{\setLinkPbox{\A{\URI{#2}}%
- \QuadPoints{mLink##1}#1}}%
- \expandafter\processAppArgs\set@LinkPboxDefaults
- \presets{\ml@nocolor@defaults}\S{S}\W{0}#1\end\@nil
- \ifx\eq@S@value\ml@underlinded
- \let\itsunderline\ef@YES\else\let\itsunderline\ef@NO\fi
- \global\aeb@arrayIndx=0\relax
- \global\syllableCnt=0\relax
- \global\advance\aeb@mLinkCnt\@ne\relax
- \@ifundefined{mLinkLngth\the\aeb@mLinkCnt}{%
- \global\linknotformedtrue\def\lngth{17}%
- \def\ml@qlngthchunki{17}}
- {\@tempcnta\@nameuse{mLinkLngth\the\aeb@mLinkCnt}\relax
- \edef\lngth{\the\@tempcnta}%\multiply\@tempcnta8\relax
- \edef\ml@qlngthchunki{\the\@tempcnta}}%
- \@ifundefined{mLinkSyCnt\the\aeb@mLinkCnt}
- {\def\MAXCNT{0}\def\ml@lngthchunki{0}\def\ml@lngthchunkii{0}%
- \def\ml@qlngthchunki{0}\def\ml@qlngthchunkii{0}\def\revCrackAt{0}}
- {\edef\MAXCNT{\@nameuse{mLinkSyCnt\the\aeb@mLinkCnt}}%
- \ifx\eq@mlcrackat\@empty\else
- \@tempcnta\MAXCNT\relax\advance\@tempcnta-\eq@mlcrackat\relax
- \edef\ml@lngthchunki{\eq@mlcrackat}%
- \edef\ml@lngthchunkii{\the\@tempcnta}%
- \@tempcnta\ml@lngthchunki\relax\multiply\@tempcnta8\relax
- \edef\ml@qlngthchunki{\the\@tempcnta}%
- \@tempcnta\ml@lngthchunkii\relax\multiply\@tempcnta8\relax
- \edef\ml@qlngthchunkii{\the\@tempcnta}%
- \@tempcnta\MAXCNT\relax
- \advance\@tempcnta-\eq@mlcrackat\relax
- \advance\@tempcnta\@ne
- \edef\revCrackAt{\the\@tempcnta}%
- \fi}%
- \@tempcnta\aeb@mLinkCnt\advance\@tempcnta\@ne
- \edef\aeb@mLinkCnt@{\the\@tempcnta}%
- \urldef\ml@url\nolinkurl{#2}%
- \def\SOUL@mlhpreamble{%\begingroup
- \mlh@preambleCmdInsert\ef@colorthislink}\hyper@chars
- \let\ef@thislinkcolor\@urlcolor
- \let\CurrentBorderColor\@urlbordercolor
- \let\ml@SOUL@doword@SAVE\SOUL@doword
- \let\SOUL@doword\ml@SOUL@doword
- \ifx\eq@mlcrackat\@empty\ml@start@link{\the\aeb@mLinkCnt}{\lngth}\fi
- \def\mlh@preambleCmdInsert{\ml@MrkLnk{\the\aeb@mLinkCnt}%
- \ml@earlyExecProps{#1}}%
- \def\mlh@postambleCmd{%
- \expandafter
- \def\expandafter\ef@thislinkcolor
- \expandafter{\ef@thislinkcolor}}%
- \aeb@mlh\ml@url\ef@colorthislink\unhcopy\ml@urlbuildi
- \expandafter\gdef\expandafter\ef@thislinkcolor
- \expandafter{\ef@thislinkcolor@SAVE}%
- \immediate\write\@auxout{\string\mlcsarg\string
- \gdef{mLinkSyCnt\the\aeb@mLinkCnt}{\the\syllableCnt}}% dpsa11
- \immediate\write\@auxout{\string\mlcsarg
- \string\gdef{mLinkLngth\the\aeb@mLinkCnt}{\the\aeb@arrayIndx}}%
- \ifx\eq@mlcrackat\@empty
- \ml@finish@link{\the\aeb@mLinkCnt}{\lngth}%
- \ml@setlink{\the\aeb@mLinkCnt}%
- \iffixmlinks\literalps@out{restore}\fi
- \else
- \ml@finish@link{\the\aeb@mLinkCnt}{\ml@qlngthchunki}%
- \ml@setlink{\the\aeb@mLinkCnt}%
- \iffixmlinks\literalps@out{restore}\fi
- \eq@mlcrackinsat\penalty-50
- \ml@start@link{\aeb@mLinkCnt@}{\ml@qlngthchunkii}%
- \penalty0\@ifundefined{mLinkLngth\the\aeb@mLinkCnt}{}
- {\ml@MrkLnk{\aeb@mLinkCnt@}}\unhcopy\ml@urlbuildii
- \ml@finish@link{\aeb@mLinkCnt@}{\ml@qlngthchunkii}%
- \ml@setlink{\aeb@mLinkCnt@}\iffixmlinks
- \literalps@out{restore}\fi
- \global\advance\aeb@mLinkCnt\@ne
- \fi\aftergroup\normalcolor\endgroup
-}
-\def\ml@start@link#1#2{% Step 1
- \literalps@out{%
- /xoMsgB true def^^J%
- \ps@mark/_objdef {mLink#1}%
- /type /array /OBJ pdfmark^^J%
- \ifoldstylequads
- /mLinkFxup#1\space0 array def
- \else
- /bCreateLink mlIsBld #2\space eq not def^^J%
- bCreateLink{ /mLinkFxup#1\space
- #2\space array def }if
- \fi
- }%
-}
-\def\ml@finish@link#1#2{% Step 4 and 5
- \ifoldstylequads\else
- \ifnum\aeb@arrayIndx=0\relax
- \PackageWarning{aeb_mlink}{%
- Problem with mLink\the\aeb@mLinkCnt,\MessageBreak
- Will skip the creation of this link}\fi
- \literalps@out{%
- \iffixmlinks
- \ifnum\aeb@arrayIndx>0
- save^^J%
- bCreateLink {^^J%
- \mlDict\space/mLinkFxup#1\space known {^^J%
- #1\space
- #2\space
- mLinkFxup#1\space
- quadpointsfixup^^J%
- \ps@mark{mLink#1} 0 gFixup
- /PUTINTERVAL pdfmark^^J%
- }if }if
- \fi
- \else
- bCreateLink {^^J%
- \mlDict\space/mLinkFxup#1\space known {^^J%
- \ps@mark{mLink#1} 0 mLinkFxup#1
- /PUTINTERVAL pdfmark^^J%
- }if }if
- \fi}%
-\fi}
-\ifHy@colorlinks
- \def\ef@colorthislink{\color{\ef@thislinkcolor}}
-\else
- \let\ef@colorthislink\relax
-\fi
-\def\ml@SOUL@stop{\relax}
-\def\SOUL@mlhpreamble{\begingroup
- \mlh@preambleCmdInsert\ef@colorthislink}
-\def\SOUL@mlheverysyllable{%
- \mlh@setQuadSyllable{\the\aeb@arrayIndx}{\lngth}%
- {\the\aeb@mLinkCnt}{\the\SOUL@syllable}%
- \the\SOUL@syllable\SOUL@setkern\SOUL@charkern}%
-\def\SOUL@mlheveryspace#1{#1\space\hskip\spaceskip}%
-\def\SOUL@mlheveryhyphen{%
- \discretionary{%
- \unkern
- \SOUL@setkern\SOUL@hyphkern
- \SOUL@sethyphenchar
- }{}{}%
-}
-\def\SOUL@mlheveryexhyphen#1{%
- \mlh@setQuadSyllable{\the\aeb@arrayIndx}{\lngth}%
- {\the\aeb@mLinkCnt}{\SOUL@setkern\SOUL@hyphkern#1}%
- \SOUL@setkern\SOUL@hyphkern#1%
- \discretionary{}{}{%
- \SOUL@setkern\SOUL@charkern
- }%
-}
-\def\mlh@postambleCmd{\relax}
-\def\SOUL@mlhpostamble{\mlh@postambleCmd}
-\def\SOUL@mlhsetup{\SOUL@setup
- \let\SOUL@preamble\SOUL@mlhpreamble
- \let\SOUL@everysyllable\SOUL@mlheverysyllable
- \let\SOUL@everyspace\SOUL@mlheveryspace
- \let\SOUL@everyhyphen\SOUL@mlheveryhyphen
- \let\SOUL@everyexhyphen\SOUL@mlheveryexhyphen
- \def\SOUL@postamble{\SOUL@mlhpostamble}%
-}
-\DeclareRobustCommand*\aeb@mlh{\SOUL@mlhsetup\SOUL@}
-\newtoks\mlfrstoftwo \mlfrstoftwo={}
-\newtoks\mlsndoftwo \mlsndoftwo={}
-\newcount\syllableCnt \syllableCnt=0
-\def\SOUL@ckhsetup{\SOUL@setup
- \def\SOUL@everysyllable{\global\advance\syllableCnt\@ne
- \ifnum\syllableCnt=\mlcr@ckAt\relax
- \edef\x{\the\mlfrstoftwo\the\SOUL@syllable\eq@mlhyph}%
- \global\mlfrstoftwo=\expandafter{\x}\else
- \ifnum\syllableCnt>\mlcr@ckAt\relax
- \edef\x{\the\mlsndoftwo\the\SOUL@syllable}%
- \global\mlsndoftwo=\expandafter{\x}\else
- \edef\x{\the\mlfrstoftwo\the\SOUL@syllable}%
- \global\mlfrstoftwo=\expandafter{\x}\fi\fi
- }%
- \def\SOUL@everyspace##1{%
- \ifnum\syllableCnt<\mlcr@ckAt\relax
- \edef\x{\the\mlfrstoftwo}%
- \global\mlfrstoftwo=\expandafter{\x##1 }\else
- \edef\x{\the\mlsndoftwo}%
- \ifnum\syllableCnt=\mlcr@ckAt\relax
- \global\mlsndoftwo=\expandafter{\x##1}\else
- \global\mlsndoftwo=\expandafter{\x##1 }\fi\fi
- }%
- \def\SOUL@everyexhyphen##1{\global
- \ifnum\syllableCnt>\mlcr@ckAt\relax
- \edef\x{\the\mlsndoftwo}\global
- \mlsndoftwo=\expandafter{\x##1}\else
- \edef\x{\the\mlfrstoftwo}\global
- \mlfrstoftwo=\expandafter{\x##1}\fi
- }%
-}
-\DeclareRobustCommand*\crackAt[1]{\def\mlcr@ckAt{#1}%
- \mlfrstoftwo={}\mlsndoftwo={}\syllableCnt=0
- \SOUL@ckhsetup\SOUL@}
-\endinput
-%%
-%% End of file `aeb_mlink.sty'.
+%% +%% This is file `aeb_mlink.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% aeb_mlink.dtx (with options: `copyright,package') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% aeb_mlink.sty package, %% +%% Copyright (C) 2006--2018 D. P. Story %% +%% dpstory@acrotex.net %% +%% %% +%% This program can redistributed and/or modified under %% +%% the terms of the LaTeX Project Public License %% +%% Distributed from CTAN archives in directory %% +%% macros/latex/base/lppl.txt; either version 1.2 of %% +%% the License, or (at your option) any later version. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{aeb_mlink} + [2018/08/18 v2.3.4 AeB MLink (dps)] +\RequirePackage{xkeyval} +\RequirePackage{ifpdf}[2006/02/20] +\RequirePackage{ifxetex}[2006/08/21] +\newif\if@ml@dvips \@ml@dvipstrue +\def\mlcsarg#1#2{\expandafter#1\csname#2\endcsname} +\DeclareOptionX{dvipsone}{\def\eq@drivernum{0}\@ml@dvipsfalse + \PassOptionsToPackage{dvipsone}{eforms} + \PassOptionsToPackage{dvipsone}{hyperref} +} +\DeclareOptionX{dvips}{\def\eq@drivernum{0}\@ml@dvipstrue + \PassOptionsToPackage{dvips}{eforms} + \PassOptionsToPackage{dvips}{hyperref} +} +\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}{eforms}} +\@ifundefined{mldblevel}{\newcount\mldblevel + \mldblevel=0 }{} +\define@key{aeb_mlink.sty}{dblevel}[0]{\mldblevel=#1 } +\def\ml@err@msg{This package requires the driver dvips and\MessageBreak + Adobe Distiller as the PDF creator} +\ifpdf\PackageError{aeb_mlink}{\ml@err@msg}\else + \ifxetex\PackageError{aeb_mlink}{\ml@err@msg}\else + \let\ExecuteOptions@SAVE\ExecuteOptions + \let\ExecuteOptions\ExecuteOptionsX + \InputIfFileExists{web.cfg}{} + {\@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}} + {\ExecuteOptionsX{dvipsone}}}% + \let\ExecuteOptions\ExecuteOptions@SAVE +\fi\fi +\ProcessOptionsX +\RequirePackage{hyperref} +\RequirePackage{refcount} +\RequirePackage{eforms}[2018/08/16] +\RequirePackage{soul} +\def\ps@mark{[\space} +\ifnum\mldblevel>0 + \def\mlpgMsg{(\string\n Beginning of page: ) pf + PhysicalPage 20 string cvs + pf(\string\n)pf}\else + \def\mlpgMsg{}\fi +\def\pgmonitoring{\if@ml@dvips + dup /PhysicalPage exch 1 add def + /PhysicalPage PhysicalPage def^^J\fi + \mlpgMsg +} +\def\smallRectTF{\ifoldstylequads false\else + \iffixmlinks true\else false\fi\fi\space + \ifSmallRect true\else false\fi\space and} +\def\ml@@nnotName{mLink} % dps +\def\mllnkcontainer#1{bCreateLink { xoMsgB { + \smallRectTF\space mlRectFix^^J% + #1}if}{(\ml@@nnotName\the\aeb@mLinkCnt) mlIsBldMsg}ifelse} +\def\pboxRect{mlRect } +\if@ml@dvips + \def\mlDict{SDict} + \special{!userdict begin + /TeXtoPDF {65536 div DVImag mul} def % sp to pts + /PDFtoDvips {72.27 div Resolution mul} def % points to dots + /PDFtoVDvips {72.27 div VResolution mul} def % points to dots + /DvipstoPDF {72.27 mul Resolution div} def % dots to points + /HTeXtoDvips {TeXtoPDF PDFtoDvips} def % sp to dots + /VTeXtoDvips {TeXtoPDF PDFtoVDvips} def^^J% % sp to dots + /PhysicalPage 0 def^^J% + /PageHeight {vsize} def^^J% + /PDFtoTeX {PDFtoDvips} def^^J% + /pf{print flush}def^^J% + /bop-hook{ \pgmonitoring\space } def + end} + \def\setQuadBox{% + currentpoint DvipstoPDF \aeb@bbox@dp\space TeXtoPDF add + neg vsize add 72 sub % y1 + exch DvipstoPDF 72 add exch % x1 + 2 copy exch \aeb@bbox@wd\space TeXtoPDF add exch % x2 + 2 copy \aeb@bbox@ht\space TeXtoPDF add % y3 + 2 copy exch \aeb@bbox@wd\space TeXtoPDF sub exch % x4 + } + \def\par@@Rect + {% + 72 neg PDFtoDvips vsize 72 sub PDFtoVDvips + hsize 72 sub PDFtoDvips 72 neg PDFtoVDvips + } +\else + \def\mlDict{dvidict} + \special{!/TeXtoPDF {65536 div mag 1000 div mul} def + /PDFtoTeX {65536 mul mag 1000 div div} def^^J% + /pf{print flush}def^^J% + /bphook{ \pgmonitoring\space } def^^J% + } + \def\setQuadBox{% + currentpoint \aeb@bbox@dp\space add TeXtoPDF + neg PageHeight add 72 sub % y1 + exch TeXtoPDF 72 add exch % x1 + 2 copy exch \aeb@bbox@wd\space TeXtoPDF add exch % x2 + 2 copy \aeb@bbox@ht\space TeXtoPDF add % y3 + 2 copy exch \aeb@bbox@wd\space TeXtoPDF sub exch % x4 + } + \def\par@@Rect + {% + 72 neg PDFtoTeX PageHeight 72 sub PDFtoTeX + PageWidth 72 sub PDFtoTeX 72 neg PDFtoTeX + } +\fi +\newbox\aeb@bbox +\newcount\aeb@arrayIndx \aeb@arrayIndx=0 +\newcount\aeb@mLinkCnt \aeb@mLinkCnt=0 +\newcount\syllableCnt \syllableCnt=0 +\newif\ifmllinktotalchanged\mllinktotalchangedfalse +\newif\ifSmallRect \SmallRecttrue +\AtEndDocument{\wrtmlinktot@l\ckchngmlinktot@l\wrt@linksnotformed} +\def\wrt@linksnotformed{\iflinknotformed + \PackageWarningNoLine{aeb_mlink}{Some link calculations are not + complete.\MessageBreak + DO NOT CONVERT TO PDF at this time. Compile at \MessageBreak + least twice more}\fi} +\def\wrtmlinktot@l{\immediate\write\@auxout{\string\gdef + \string\mlinkstotal{\the\aeb@mLinkCnt}}} +\def\ckchngmlinktot@l{\@ifundefined{mlinkstotal}{} + {\ml@mlinktot@l@changed}} +\def\ml@mlinktot@l@changed{% + \ifnum\mlinkstotal=\the\aeb@mLinkCnt\relax\else + \PackageWarningNoLine{aeb_mlink}{The number of links has + changed. Compile again\MessageBreak until this message + does not appear}\immediate + \write\@auxout{\string\mllinktotalchangedtrue}\fi +} +\def\ml@mllinktotalchanged{\ifmllinktotalchanged + \PackageWarningNoLine{aeb_mlink} + {The number of links has changed, continue\MessageBreak + to compile}\fi} +\AtBeginDocument{\ml@mllinktotalchanged} +\def\CurrentBorderColor{\@linkbordercolor} +\def\ml@nocolorHighlight{I} +\def\ml@nocolorLineStyle{S} +\def\ml@nocolorLineWidth{1} +\def\ml@setnocolorDefaults{% +\def\ml@nocolor@defaults{\H{\ml@nocolorHighlight}% + \S{\ml@nocolorLineStyle}\W{\ml@nocolorLineWidth}% + \Color{\CurrentBorderColor}}% +} +\ifHy@colorlinks + \let\ml@nocolor@defaults\@empty +\else + \ml@setnocolorDefaults +\fi +\def\ml@earlyExecProps#1{% + \eq@setWidgetProps\relax{#1}% +} +\newif\ifoldstylequads \oldstylequadsfalse +\def\OldStyleBoxesOn{\mlfixOff\oldstylequadstrue} +\def\OldStyleBoxesOff{\oldstylequadsfalse} +\@onlypreamble\OldStyleBoxesOn +\@onlypreamble\OldStyleBoxesOff +\let\mlh@preambleCmdInsert\relax +\def\mlcs#1{\texttt{\@backslashchar#1}} +\bgroup\@makeother\% +\gdef\CMT#1{ %\space #1}\egroup +\def\mldbModeOn{\def\mldb##1##2{##2}} +\def\mldbModeOff{\def\mldb##1##2{}} +\def\mldb#1#2{\ifnum#1<\mldblevel#2\fi} +\def\ml@adj@x{2}\def\ml@adj@y{2} +\def\mlMaxNSylls{30} +\def\removelastspace{\hskip-\fontdimen2\font} +\AtBeginDvi{\special{!% +/bCreateLink true def +/mlIsBld 17 def^^J% +/mlIsBldMsg {^^J% + /sName exch def^^J% + (\string\n!! )pf + sName 20 string cvs pf + ( is not completely formed, + compile again!!\string\n)pf^^J% +} def^^J% +/xoMsgB true def^^J% +/xoMsg {^^J% + /Indx exch def^^J% + /sName exch def^^J% + /nSyllable Indx 8 div def^^J% dpsa08 + (!!------------------------------------------------------------------% + \string\n Warning:\string\n + The text of )pf + sName 20 string cvs pf + ( has crossed a page boundary from page )pf + PhysicalPage 1 sub 10 string cvs pf + ( to ) pf PhysicalPage 10 string cvs pf + sName 0 1 getinterval (m) eq { + (.\string\n Cross page links are not supported by the + PDF Specification)pf + (.\string\n This link is not constructed, + please fix it.\string\n)pf + (Break point is after syllable number )pf + nSyllable cvi 20 string cvs pf (.\string\n)pf + (Use the \string\\mlcrackat{)pf + nSyllable cvi 20 string cvs pf + (} option with this link.\string\n)pf + }{ + (.\string\n Cross page annotations are not supported by the + PDF Specification)pf + (.\string\n This annotation is not constructed, + please fix it.\string\n)pf + (Break point is after syllable number )pf + nSyllable cvi 20 string cvs pf (.\string\n)pf + (Use the mlcrackat=)pf + nSyllable cvi 20 string cvs pf + ( option with this annotation.\string\n)pf + } ifelse + (!!------------------------------------------------------------------% + \string\n)pf^^J% +} def^^J% +/quadpointsfixup {^^J% + /ary exch def^^J% + /quadL exch def^^J% + /sName exch def^^J% +\mldb0{(Processing )pf sName pf (: OK\string\n)pf^^J}% +quadL 0 eq { +(Problems with this link, length=0, + will skip the creation of this link)pf^^J% +}{ +/gOffset 0 def^^J% +/gY ary\space 1 gOffset add get def^^J% +\mldb1{(gY is ) pf gY 20 string cvs print^^J}% +\mldb1{flush (\string\n) pf^^J}% +/gN 0 def^^J% +/gMrk 10 array def^^J% limitation +gMrk 0 0 put^^J% +/gMrkL 1 gOffset add def^^J% +\mldb2{(Begin first for\string\n) pf^^J}% +0 8 quadL 8 sub {^^J% + /gIndx exch def^^J% +\mldb2{(Outside gt if with gIndx=) pf^^J}% +\mldb2{gIndx 20 string cvs pf^^J}% +\mldb2{(\string\n) pf^^J}% + /getEntry ary\space 1 gOffset add get def^^J% +\mldb2{(getEntry=) pf getEntry 20 string cvs pf^^J}% +\mldb2{(\string\n) pf^^J}% + gY getEntry sub abs 2 gt {^^J% +\mldb2{(Inside gt if\string\n) pf^^J}% + gMrk gMrkL gIndx put^^J% + /gMrkL gMrkL 1 add def^^J% + /gY getEntry def^^J% +\mldb2{(Updating gY to )pf gY 20 string cvs pf^^J}% +\mldb2{(\string\n) pf^^J}% +\mldb2{(gMrkL=)pf gMrkL 20 string cvs pf^^J}% +\mldb2{(\string\n) pf^^J}% + } if^^J% + /gOffset gOffset 8 add def^^J% +} for^^J% +\mldb2{(end first for\string\n) pf^^J}% + /gAryL 8 \mlMaxNSylls\space mul def^^J% limitation +\mldb2{(gAryL=) pf gAryL 20 string cvs pf^^J}% +\mldb2{(\string\n)pf^^J}% + /gFixup 8 gMrkL mul array def^^J% links + /aFixup 8 gMrkL mul array def^^J% text markup annotations + /gOffset 0 def^^J% +\mldb2{(for loop: gMrkL=)pf gMrkL 20 string cvs pf^^J}% +\mldb2{(\string\n) pf^^J}% +0 1 gMrkL 1 sub {^^J% +\mldb2{(After gAry\string\n) pf^^J}% +\mldb2{(Top of for loop\string\n) pf^^J}% + /gIndx exch def^^J% +\mldb2{(gIndx=)pf gIndx 20 string cvs pf^^J}% +\mldb2{(\string\n)pf^^J}% +\mldb2{(gMrk=)pf gMrk gIndx get 20 string cvs pf^^J}% +\mldb2{(\string\n) pf^^J}% +\mldb2{(mLinkFxup<num> length = )^^J}% +\mldb2{pf ary\space length 20 string cvs^^J}% +\mldb2{pf (\string\n) pf^^J}% +gIndx 1 add gMrkL eq {^^J% + /gCount ary\space length gMrk gIndx get sub def^^J% +}{^^J% + /gCount gMrk gIndx 1 add get gMrk gIndx get sub def^^J% +} ifelse^^J% +/gAry gAryL array def^^J% +\mldb2{(gCount=)pf gCount 20 string cvs pf^^J}% +\mldb2{(\string\n)pf^^J}% +/sliceOfLinkfxup gCount array def^^J% +sliceOfLinkfxup 0 ary gMrk gIndx get^^J% + gCount getinterval putinterval^^J% + gAry 0 sliceOfLinkfxup putinterval^^J% +\mldb1{(Listing elements of gFixup\string\n) pf^^J}% +\mldb1{gAry 0 get 20 string cvs pf (\string\n)pf^^J}% +\mldb1{gAry 1 get 20 string cvs pf (\string\n)pf^^J}% +\mldb1{gAry gCount 1 sub 5 sub get + 20 string cvs pf (\string\n)pf^^J}% +\mldb1{gAry gCount 1 sub 4 sub get + 20 string cvs pf (\string\n)pf^^J}% +\mldb1{gAry gCount 1 sub 3 sub get + 20 string cvs pf (\string\n)pf^^J}% +\mldb1{gAry gCount 1 sub 2 sub get + 20 string cvs pf (\string\n)pf^^J}% +\mldb1{gAry 6 get 20 string cvs pf (\string\n)pf^^J}% +\mldb1{gAry 7 get 20 string cvs pf (\string\n)pf^^J}% + gFixup gOffset [^^J% + gAry 0 get ^^J% x1 ll 1 + gAry 1 get^^J% y1 ll 1 + gAry gCount 1 sub 5 sub get^^J% x2 lr 2 + gAry gCount 1 sub 4 sub get^^J% y2 lr 2 + gAry gCount 1 sub 3 sub get^^J% x3 ur 3 + gAry gCount 1 sub 2 sub get^^J% y3 ur 3 + gAry 6 get^^J% x4 ul 4 + gAry 7 get^^J% y4 ul 4 + ] putinterval^^J% + aFixup gOffset [^^J% + gAry 6 get gOffset 0 eq {\ml@adj@x\space add}if^^J% x4 ul 4 + gAry 7 get^^J% y4 ul 4 + gAry gCount 1 sub 3 sub get^^J% x3 ur 3 + gAry gCount 1 sub 2 sub get^^J% y3 ur 3 + gAry 0 get gOffset 0 eq {\ml@adj@x\space add}if^^J% x1 ll 1 + gAry 1 get 1 sub^^J% y1 ll 1 + gAry gCount 1 sub 5 sub get^^J% x2 lr 2 + gAry gCount 1 sub 4 sub get 1 sub^^J% y2 lr 2 + ] putinterval^^J% + /gOffset gOffset 8 add def^^J% + } for^^J% +\mldb2{(End of second for\string\n) pf^^J}% + } ifelse +} def^^J% +/smallquadpointsfixup {^^J% +/gIndx exch def^^J% +/ary exch def^^J% +/lnkCnt exch def^^J% +/quadL exch def^^J% +/gSFup 8 array def^^J% + gSFup 0 ary 0 gIndx add get + gIndx 0 eq {\ml@adj@x\space sub} if put^^J% x1 + gSFup 1 ary 1 gIndx add get put^^J% y1 + gSFup 2 ary 2 gIndx add get put^^J% x2 + gSFup 3 ary 3 gIndx add get put^^J% y2 + gSFup 4 ary 4 gIndx add get put^^J% x3 + gSFup 5 ary 5 gIndx add get put^^J% + gSFup 6 ary 6 gIndx add get + gIndx 0 eq {\ml@adj@x\space sub} if put^^J% x4 + gSFup 7 ary 7 gIndx add get put^^J% + ary gIndx gSFup putinterval^^J% +} def^^J% +/mlRectFix {^^J% +/ifRectFix exch def^^J% +ifRectFix { + /nL gFixup length 8 sub def^^J% number of lines + /xMin gFixup 0 get def^^J% + 0 8 nL {^^J% + /Indx exch def^^J% + gFixup Indx get xMin lt {/xMin gFixup Indx get def}if } for^^J% + /xMin xMin 2 sub def^^J% + /xMax gFixup 2 get def^^J% + 2 8 nL 2 add {^^J% + /Indx exch def^^J% + gFixup Indx get xMax gt {/xMax gFixup Indx get def}if } for^^J% + /xMax xMax 2 add def^^J% + /yMin gFixup 1 get def^^J% + 1 8 nL 1 add {^^J% + /Indx exch def^^J% + gFixup Indx get yMin lt {/yMin gFixup Indx get def}if } for^^J% + /yMin yMin 4 sub def^^J% + /yMax gFixup 5 get def^^J% + 5 8 nL 5 add{^^J% + /Indx exch def^^J% + gFixup Indx get yMax gt {/yMax gFixup Indx get def}if } for^^J% + /yMax yMax 2 add def^^J% + /mlRect {/Rect [^^J% + xMin 72 sub PDFtoTeX^^J% + PageHeight 72 sub yMax sub PDFtoTeX^^J% + xMax 72 sub PDFtoTeX^^J% + PageHeight yMin sub 72 sub PDFtoTeX ]^^J% + }def^^J% +}{^^J% + /mlRect{/Rect [ \par@@Rect ] }def^^J% +}ifelse^^J% +ifRectFix { +\mldb1{(/Rect [)pf^^J% +xMin 20 string cvs pf( )pf^^J% +yMax 20 string cvs pf( )pf^^J% +xMax 20 string cvs pf( )pf^^J% +yMin 20 string cvs pf(]\string\n)pf^^J}% +} if^^J% +} def +}} +\newif\ifmlmarks\mlmarksfalse +\def\mlMarksOn{\mlmarkstrue} +\def\mlMarksOff{\mlmarksfalse} +\def\MrkLnkLtr{L} +\def\ml@MrkLnk#1{\ifmlmarks\bgroup\ifdim\baselineskip=0pt + \setbox\z@\hbox{T}\gdef\ml@raiseamt{\ht\z@+.4pt}\else + \gdef\ml@raiseamt{.6\baselineskip}\fi\smash{\rlap{\normalfont\normalcolor\bfseries + \raisebox{\ml@raiseamt}{\tiny\strut{\MrkLnkLtr#1}}}}\egroup\fi} +\newif\iflinknotformed \linknotformedfalse +\newif\ifcr@ckit \cr@ckitfalse +\def\ml@underlinded{U} +\@ifundefined{mlhypertext}{\newcommand}{\renewcommand}% +{\mlhypertext}[2][]{\hglue0pt\begingroup + \global\ml@displaytrue + \toks@=\expandafter{#2}% + \edef\ml@HytextArg{{\the\toks@}}% + \global\aeb@arrayIndx=\z@ + \def\ml@setlink##1{\setLinkPbox{% + \QuadPoints{mLink##1}#1}}% + \expandafter\processAppArgs\set@LinkPboxDefaults + \presets{\ml@nocolor@defaults}\S{S}\W{0}#1\end\@nil + \ifx\eq@S@value\ml@underlinded + \let\itsunderline\ef@YES\else\let\itsunderline\ef@NO\fi + \ifx\eq@mlignore\ef@YES + \global\advance\aeb@mLinkCnt\@ne\relax + \def\ml@next{\mlhypertext@i{#1}}\else + \ifx\eq@mlcrackat\@empty + \global\advance\aeb@mLinkCnt\@ne\relax + \def\ml@next{\mlhypertext@i{#1}}% + \else % \eq@mlcrackat not \@empty + \def\ml@next{\global\ml@displaytrue\let\ml@space\space + \mlhypertext[#1\mlignore{0}]{#2}\eq@mlcrackinsat + \penalty-100 \cr@ckittrue + \global\ml@displayfalse\let\ml@space\space + \mlhypertext[#1\mlignore{1}]{#2}\aftergroup + \normalcolor\endgroup}% + \fi + \fi + \ml@next +} +\def\mlhypertext@i#1{% + \@ifundefined{mLinkLngth\the\aeb@mLinkCnt}{\global + \linknotformedtrue\def\ml@lngth{17}} + {\edef\ml@lngth{\@nameuse{mLinkLngth\the\aeb@mLinkCnt}}}% + \ml@start@link{\the\aeb@mLinkCnt}{\ml@lngth}% Step 1 + \def\mlh@preambleCmdInsert{% + \ml@MrkLnk{\the\aeb@mLinkCnt}\ml@earlyExecProps{#1}}% + \def\mlh@postambleCmd{\endgroup}% + \expandafter\aeb@mlh\ml@HytextArg + \ml@finish@link{\the\aeb@mLinkCnt}{\ml@lngth}% + \ml@setlink{\the\aeb@mLinkCnt}% + \ifoldstylequads\else + \iffixmlinks\literalps@out{restore}\fi\fi + \@ifundefined{mLinkLngth\the\aeb@mLinkCnt}{% + \immediate\write\@auxout{\string\mlcsarg + \string\gdef{mLinkLngth\the\aeb@mLinkCnt}{17}}% + }{\immediate\write\@auxout{\string\mlcsarg + \string\gdef{mLinkLngth\the\aeb@mLinkCnt}% + {\the\aeb@arrayIndx}}}\endgroup +} +\def\mlh@setQuadSyllable#1#2#3#4{% + \setbox\aeb@bbox=\hbox{\ml@strut#4}% + {% + \setbox\@tempboxa\hbox{\ml@strut}% + \ifx\itsunderline\ef@YES\@tempdima1bp\relax\else + \@tempdima\dp\@tempboxa \ifdim\@tempdima>2bp + \advance\@tempdima-2bp\fi + \fi + \ifx\isstrikeout\ef@YES\advance\@tempdima-2bp\fi + \dp\aeb@bbox\@tempdima + \@tempdima\ht\@tempboxa \advance\@tempdima\dp\aeb@bbox + \advance\@tempdima1bp + \ht\aeb@bbox\@tempdima\def\x{\the\count\z@}% + \count\z@=\ht\aeb@bbox\xdef\aeb@bbox@ht{\x}% + \count\z@=\wd\aeb@bbox\xdef\aeb@bbox@wd{\x}% + \count\z@=\dp\aeb@bbox\xdef\aeb@bbox@dp{\x}% + }% + \ifoldstylequads + \literalps@out{% + bCreateLink {^^J% + \mlDict\space/mLinkFxup#3\space known {^^J% + \ps@mark{mLink#3} + \the\aeb@arrayIndx\space [\setQuadBox] + \space /PUTINTERVAL pdfmark}{^^J% + xoMsgB { + /xoMsgB false def + (\ml@@nnotName\the\aeb@arrayIndx) + #3\space + xoMsg % dpsa08 + } if^^J% xoMsgB + } ifelse } if + }% + \else + \literalps@out{% + bCreateLink {^^J% + \mlDict\space/mLinkFxup#3\space known {^^J% + mLinkFxup#3\space + #1\space[\setQuadBox] putinterval^^J% + #2\space % + #3\space + mLinkFxup#3\space + #1\space + smallquadpointsfixup }{^^J% + xoMsgB { + /xoMsgB false def + (\ml@@nnotName#3) + #1\space + xoMsg % dpsa08 + } if^^J% xoMsgB + } ifelse } if + }% + \fi + \global\advance\aeb@arrayIndx8\relax +} +\def\aeb@exiii{\expandafter\expandafter\expandafter} +\def\aebnameref#1{\@ifundefined{r@#1}{??} + {\aeb@exiii\@thirdoffive\csname r@#1\endcsname}} +\def\labelRef#1{\@ifundefined{r@#1}{Doc-Start} + {\aeb@exiii\@fourthoffive\csname r@#1\endcsname}} +\def\atPage#1{\getrefbykeydefault{#1}{page}{??}} +\newcommand\mlhyperlink[3][]{% + \mlhypertext[#1\A{/S/GoTo/D (#2)}]{#3}} +\newcommand\mlhyperref[3][]{% + \mlhypertext[#1\A{/S/GoTo/D (\labelRef{#2})}]{#3}} +\newcommand\mlnameref[2][]{\protected@edef\ml@temp{\aebnameref{#2}}% + \def\ml@tempi{\mlhypertext[#1\A{/S/GoTo/D (\labelRef{#2})}]}% + \expandafter\ml@tempi\expandafter{\ml@temp}} +\newcommand\mlNameref[2][]{\let\SOUL@stop\ml@SOUL@stop + \protected@edef\ml@temp{`\aebnameref{#2}' on page~\atPage{#2}}% + \def\ml@tempi{\mlhypertext[#1\A{/S/GoTo/D (\labelRef{#2})}]}% + \expandafter\ml@tempi\expandafter{\ml@temp}} +\def\ml@hyper@linkurl#1#2{\hyper@chars + \let\ef@thislinkcolor\@urlcolor + \let\CurrentBorderColor\@urlbordercolor + \mlhypertext[\presets{\mlhref@args}\A{/S/URI/URI(#2)}]{#1}% + \endgroup +} +\def\ml@hyper@linkfile#1#2#3{% + \let\ef@thislinkcolor\@filecolor + \let\CurrentBorderColor\@filebordercolor + \ifx\@pdfstartview\@empty + \def\theView{[0 /Fit]}\else + \def\theView{[0 \@pdfstartview]}\fi + \@ifundefined{ifHy@pdfnewwindow} + {\ifHy@newwindow}{\ifHy@pdfnewwindow}% + \def\isWindow{/NewWindow true}\else + \let\isWindow\@empty\fi + \mlhypertext[\presets{\mlhref@args}\A{/S/GoToR \isWindow + /F (#2) /D \ifx\\#3\\\theView\else(#3)\fi}]{#1}% + \endgroup +} +\def\ml@hyper@launch run:#1\\#2#3{% + \let\ef@thislinkcolor\@filecolor + \let\CurrentBorderColor\@runbordercolor + \@ifundefined{ifHy@pdfnewwindow} + {\ifHy@newwindow}{\ifHy@pdfnewwindow}% + \def\isWindow{/NewWindow true}\else + \let\isWindow\@empty\fi + \mlhypertext[\presets{\mlhref@args}\A{/S/Launch\isWindow + /F (#1) \ifx\\#3\\\else /Win << /P (#3) /F (#1) >> \fi}]{#2}% + \endgroup +} +\let\aeb@saved@href\href +\newcommand{\mlhref}[1][]{% + \begingroup + \def\mlhref@args{#1}% + \let\hyper@linkurl\ml@hyper@linkurl + \let\hyper@linkfile\ml@hyper@linkfile + \let\@hyper@launch\ml@hyper@launch + \aeb@saved@href +} +\newbox\ml@urlbuildi +\newbox\ml@urlbuildii +\def\ml@SOUL@doword{% + \global\setbox\ml@urlbuildi\hbox{}% + \global\setbox\ml@urlbuildii\hbox{}% + \edef\x{\the\SOUL@word}% + \ifx\x\empty + \else + \SOUL@buffer={}% + \setbox\z@\vbox{% + \SOUL@tt + \hyphenchar\font`\- + \hfuzz\maxdimen + \hbadness\@M + \pretolerance\m@ne + \tolerance\@M + \leftskip\z@ + \rightskip\z@ + \hsize1sp + \everypar{}% + \parfillskip\z@\@plus1fil + \hyphenpenalty-\@M + \noindent + \hskip\z@ + \relax + \the\SOUL@word}% + \let\SOUL@errmsg\relax + \let\-\relax + \count@\m@ne + \ml@SOUL@analyze + \SOUL@word={}% + \fi +} +\def\ml@SOUL@analyze{{% + \setbox\z@\vbox{% + \unvcopy\z@ + \unskip + \unpenalty + \global\setbox\@ne=\lastbox}% + \ifvoid\@ne + \else + \ml@interface@analyze + \SOUL@syllgoal=\wd\@ne + \advance\count@\@ne + \ml@SOUL@analyze + \SOUL@syllwidth\z@ + \SOUL@syllable={}% + \ifnum\count@>\z@ + \advance\SOUL@syllgoal-\SOUL@ttwidth + \ml@SOUL@dosyllable + \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@hyphkern}% + {\SOUL@sethyphenchar}% + \SOUL@everyhyphen + \else + \ml@SOUL@dosyllable + \fi + \fi +}} +\newif\ifml@display \ml@displaytrue +\def\ml@SOUL@dosyllable{% + \SOUL@gettoken + \SOUL@eventuallyexhyphen{\the\SOUL@token}% + \edef\x{\the\SOUL@token}% + \ifx\x\SOUL@hyphenhintM + \let\SOUL@n\ml@SOUL@dosyllable + \else\ifx\x\SOUL@lowerthanM + \SOUL@gettoken + \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@charkern} + {\the\SOUL@token}% + \SOUL@everylowerthan + \SOUL@puttoken + \let\SOUL@n\ml@SOUL@dosyllable + \else\ifdim\SOUL@syllwidth=\SOUL@syllgoal + \SOUL@everysyllable + \SOUL@puttoken + \let\SOUL@n\relax + \else + \ifx\x\SOUL@stopM + \SOUL@errmsg + \global\let\SOUL@errmsg\relax + \let\SOUL@n\relax + \else + \setbox\tw@\hbox{\SOUL@tt\the\SOUL@token}% + \advance\SOUL@syllwidth\wd\tw@ + \global\SOUL@lasttoken=\SOUL@token + \SOUL@gettoken + \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@charkern} + {\the\SOUL@token}% + \SOUL@puttoken + \global\SOUL@token=\SOUL@lasttoken + \SOUL@everytoken + \edef\x{\SOUL@syllable={\the\SOUL@syllable\the\SOUL@token}}\x + \let\SOUL@n\ml@SOUL@dosyllable + \fi\fi\fi\fi + \SOUL@n +} +\def\ml@interface@analyze{% + \global\advance\syllableCnt\@ne % dpsa11 + \setbox\@ne\hbox{\unhbox\@ne}% + \ifx\eq@mlcrackat\@empty + \ml@bld@quadchunks{\the\aeb@mLinkCnt} + {\ml@qlngthchunki}{\ml@urlbuildi}% + \else + \ifnum\syllableCnt=\revCrackAt\relax + \aeb@arrayIndx=\z@ + \ml@start@link{\the\aeb@mLinkCnt}{\ml@qlngthchunki}% + \ml@bld@quadchunks{\the\aeb@mLinkCnt} + {\ml@qlngthchunki}{\ml@urlbuildi}% + \else + \ifnum\syllableCnt>\revCrackAt\relax + \ml@bld@quadchunks{\the\aeb@mLinkCnt} + {\ml@qlngthchunki}{\ml@urlbuildi}% + \else + \ifnum\syllableCnt=\@ne + \aeb@arrayIndx=\z@ + \ml@start@link{\aeb@mLinkCnt@}{\ml@qlngthchunkii}% + \ml@bld@quadchunks{\aeb@mLinkCnt@} + {\ml@qlngthchunkii}{\ml@urlbuildii}% + \else + \ml@bld@quadchunks{\aeb@mLinkCnt@} + {\ml@qlngthchunkii}{\ml@urlbuildii}% + \fi + \fi + \fi + \fi +} +\def\ml@bld@quadchunks#1#2#3{{% + \@ifundefined{mLinkLngth\the\aeb@mLinkCnt} + {\edef\@indx{\the\aeb@arrayIndx}} + {\@tempcnta#2\relax + \advance\@tempcnta-8\relax + \advance\@tempcnta-\aeb@arrayIndx + \def\@indx{\the\@tempcnta}% + }% + \@tempcntb=\@indx \divide\@tempcntb by 8 + \advance\@tempcntb by 1 +\ifx#3\ml@urlbuildii \advance\@tempcntb by \eq@mlcrackat\relax\fi + \global\setbox#3=\hbox{% + \mlh@setQuadSyllable{\@indx}{#2}{#1}{\unhcopy\@ne}% + \hbox{\unhcopy\@ne}\relax\ml@typeset@@syl{\@tempcntb}\penalty0\unhcopy#3}%hbox +}} +\newcommand{\mlurl}{\begingroup\@makeother\~\relax% \def~{\string~}% + \ef@sanitize@toks\mlurl@} +\newcommand{\mlurl@}[2][]{\@ifundefined{ef@thislinkcolor} + {\let\ef@thislinkcolor\normalcolor}{}\expandafter + \def\expandafter\ef@thislinkcolor@SAVE + \expandafter{\ef@thislinkcolor}% + \def\ml@setlink##1{\setLinkPbox{\A{\URI{#2}}% + \QuadPoints{mLink##1}#1}}% + \expandafter\processAppArgs\set@LinkPboxDefaults + \presets{\ml@nocolor@defaults}\S{S}\W{0}#1\end\@nil + \ifx\eq@S@value\ml@underlinded + \let\itsunderline\ef@YES\else\let\itsunderline\ef@NO\fi + \global\aeb@arrayIndx=0\relax + \global\syllableCnt=0\relax + \global\advance\aeb@mLinkCnt\@ne\relax + \@ifundefined{mLinkLngth\the\aeb@mLinkCnt}{% + \global\linknotformedtrue\def\ml@lngth{17}% + \def\ml@qlngthchunki{17}} + {\@tempcnta\@nameuse{mLinkLngth\the\aeb@mLinkCnt}\relax + \edef\ml@lngth{\the\@tempcnta}%\multiply\@tempcnta8\relax + \edef\ml@qlngthchunki{\the\@tempcnta}}% + \@ifundefined{mLinkSyCnt\the\aeb@mLinkCnt} + {\def\mlM@XCNT{0}\def\ml@lngthchunki{0}\def\ml@lngthchunkii{0}% + \def\ml@qlngthchunki{0}\def\ml@qlngthchunkii{0}\def\revCrackAt{0}} + {\edef\mlM@XCNT{\@nameuse{mLinkSyCnt\the\aeb@mLinkCnt}}% + \ifx\eq@mlcrackat\@empty\else + \@tempcnta\mlM@XCNT\relax\advance\@tempcnta-\eq@mlcrackat\relax + \edef\ml@lngthchunki{\eq@mlcrackat}% + \edef\ml@lngthchunkii{\the\@tempcnta}% + \@tempcnta\ml@lngthchunki\relax\multiply\@tempcnta8\relax + \edef\ml@qlngthchunki{\the\@tempcnta}% + \@tempcnta\ml@lngthchunkii\relax\multiply\@tempcnta8\relax + \edef\ml@qlngthchunkii{\the\@tempcnta}% + \@tempcnta\mlM@XCNT\relax + \advance\@tempcnta-\eq@mlcrackat\relax + \advance\@tempcnta\@ne + \edef\revCrackAt{\the\@tempcnta}% + \fi}% + \@tempcnta\aeb@mLinkCnt\advance\@tempcnta\@ne + \edef\aeb@mLinkCnt@{\the\@tempcnta}% + \urldef\ml@url\nolinkurl{#2}% + \def\SOUL@mlhpreamble{%\begingroup + \mlh@preambleCmdInsert\ef@colorthislink}\hyper@chars + \let\ef@thislinkcolor\@urlcolor + \let\CurrentBorderColor\@urlbordercolor + \let\ml@SOUL@doword@SAVE\SOUL@doword + \let\SOUL@doword\ml@SOUL@doword + \ifx\eq@mlcrackat\@empty + \ml@start@link{\the\aeb@mLinkCnt}{\ml@lngth}\fi + \def\mlh@preambleCmdInsert{\ml@MrkLnk{\the\aeb@mLinkCnt}% + \ml@earlyExecProps{#1}}% + \def\mlh@postambleCmd{% + \expandafter + \def\expandafter\ef@thislinkcolor + \expandafter{\ef@thislinkcolor}}% + \aeb@mlh\ml@url\ef@colorthislink\unhcopy\ml@urlbuildi + \expandafter\gdef\expandafter\ef@thislinkcolor + \expandafter{\ef@thislinkcolor@SAVE}% + \immediate\write\@auxout{\string\mlcsarg\string + \gdef{mLinkSyCnt\the\aeb@mLinkCnt}{\the\syllableCnt}}% dpsa11 + \immediate\write\@auxout{\string\mlcsarg + \string\gdef{mLinkLngth\the\aeb@mLinkCnt}{\the\aeb@arrayIndx}}% + \ifx\eq@mlcrackat\@empty + \ml@finish@link{\the\aeb@mLinkCnt}{\ml@lngth}% + \ml@setlink{\the\aeb@mLinkCnt}% + \iffixmlinks\literalps@out{restore}\fi + \else + \ml@finish@link{\the\aeb@mLinkCnt}{\ml@qlngthchunki}% + \ml@setlink{\the\aeb@mLinkCnt}% + \iffixmlinks\literalps@out{restore}\fi + \eq@mlcrackinsat\penalty-100 + \ml@start@link{\aeb@mLinkCnt@}{\ml@qlngthchunkii}% + \penalty0\@ifundefined{mLinkLngth\the\aeb@mLinkCnt}{} + {\ml@MrkLnk{\aeb@mLinkCnt@}}\unhcopy\ml@urlbuildii + \ml@finish@link{\aeb@mLinkCnt@}{\ml@qlngthchunkii}% + \ml@setlink{\aeb@mLinkCnt@}\iffixmlinks + \literalps@out{restore}\fi + \global\advance\aeb@mLinkCnt\@ne + \fi\aftergroup\normalcolor\endgroup +} +\def\ml@start@link#1#2{% Step 1 + \literalps@out{% + /xoMsgB true def^^J% + \ps@mark/_objdef {mLink#1}% + /type /array /OBJ pdfmark^^J% + \ifoldstylequads + /mLinkFxup#1\space0 array def + \else + /bCreateLink mlIsBld #2\space eq not def^^J% + bCreateLink{ /mLinkFxup#1\space + #2\space array def }if + \fi + }% +} +\def\FixupProc{gFixup} +\def\ml@finish@link#1#2{% Step 4 and 5 + \ifoldstylequads\else + \ifnum\aeb@arrayIndx=0\relax + \PackageWarning{aeb_mlink}{% + Problem with mLink\the\aeb@mLinkCnt, Will skip the \MessageBreak + creation of this link}\fi + \literalps@out{% + \iffixmlinks + \ifnum\aeb@arrayIndx>0 + save^^J% + bCreateLink {^^J% + \mlDict\space/mLinkFxup#1\space known {^^J% + (\ml@@nnotName#1) + #2\space + mLinkFxup#1\space + quadpointsfixup^^J% + \ps@mark{mLink#1} 0 \FixupProc\space + /PUTINTERVAL pdfmark^^J% + }if }if + \fi + \else + bCreateLink {^^J% + \mlDict\space/mLinkFxup#1\space known {^^J% + \ps@mark{mLink#1} 0 mLinkFxup#1 + /PUTINTERVAL pdfmark^^J% + }if }if + \fi}% +\fi} +\ifHy@colorlinks + \def\ef@colorthislink{\color{\ef@thislinkcolor}} +\else + \let\ef@colorthislink\relax +\fi +\def\ml@SOUL@stop{\relax} +\def\SOUL@mlhpreamble{\begingroup + \mlh@preambleCmdInsert\ef@colorthislink} +\def\SOUL@mlheverysyllable{% dpsaug16 + \global\advance\syllableCnt\@ne + \ifx\eq@mlcrackat\@empty + \expandafter\SOUL@mlheverysyllable@i + \else + \expandafter\SOUL@mleverysyllable@ii + \fi +} +\let\eq@@mlhyph\@empty +\def\ml@typset@syl#1{\raisebox{\ml@raiseamt} + {\smash{\normalfont\normalcolor\tiny\strut\llap{\the#1}}}} +\def\turnSyllbCntOn{\mlMarksOn\let\ml@typeset@@syl\ml@typset@syl} +\def\turnSyllbCntOff{\let\ml@typeset@@syl\@gobble} +\turnSyllbCntOff +\def\SOUL@mlheverysyllable@i{% + \mlh@setQuadSyllable{\the\aeb@arrayIndx}{\ml@lngth}% + {\the\aeb@mLinkCnt}{\the\SOUL@syllable\eq@@mlhyph}% + \the\SOUL@syllable %\SOUL@setkern\SOUL@charkern + \ml@typeset@@syl{\syllableCnt}\eq@@mlhyph +}% +\def\SOUL@mleverysyllable@ii{% + \ifnum\eq@mlchunk=0\relax + \ifnum\syllableCnt>\eq@mlcrackat\relax + \global\ml@displayfalse + \else + \global\ml@displaytrue + \ifnum\syllableCnt=\eq@mlcrackat\relax + \let\eq@@mlhyph\eq@mlhyph + \global\let\ml@space\relax + \else + \let\eq@@mlhyph\@empty + \global\let\ml@space\space + \fi + \SOUL@mlheverysyllable@i + \fi + \else + \ifnum\syllableCnt>\eq@mlcrackat\relax + \global\ml@displaytrue + \SOUL@mlheverysyllable@i + \else + \global\ml@displayfalse + \fi + \fi + \ml@dynamicsetup +} +\let\ml@space\space +\def\SOUL@mlheveryspace#1{% + #1\ml@space\global\let\ml@space\space +} +\def\SOUL@mlheveryhyphen{% + \discretionary{% + \unkern + \SOUL@setkern\SOUL@hyphkern + \SOUL@sethyphenchar + }{}{}% +} +\def\SOUL@mlheveryexhyphen#1{\global\advance\syllableCnt\@ne + \mlh@setQuadSyllable{\the\aeb@arrayIndx}{\ml@lngth}% + {\the\aeb@mLinkCnt}{\SOUL@setkern\SOUL@hyphkern#1}% + \SOUL@setkern\SOUL@hyphkern\hbox{#1}% + \discretionary{}{}{% + \SOUL@setkern\SOUL@charkern + }% +} +\def\mlh@postambleCmd{\relax} +\def\ml@dynamicsetup{%dpsaug16 + \ifml@display + \global\let\SOUL@everyspace\SOUL@mlheveryspace + \global\let\SOUL@everyexhyphen\SOUL@mlheveryexhyphen + \else + \gdef\SOUL@everyspace##1{}% + \gdef\SOUL@everyexhyphen##1{}% + \fi +} +\def\SOUL@mlhpostamble{\mlh@postambleCmd} +\def\SOUL@mlhsetup{\SOUL@setup + \let\SOUL@preamble\SOUL@mlhpreamble + \let\SOUL@everysyllable\SOUL@mlheverysyllable + \ml@dynamicsetup + \let\SOUL@everyhyphen\SOUL@mlheveryhyphen + \def\SOUL@postamble{\SOUL@mlhpostamble}% +} +\DeclareRobustCommand*\aeb@mlh{\syllableCnt=0 + \SOUL@mlhsetup\SOUL@} +\endinput +%% +%% End of file `aeb_mlink.sty'. |