diff options
Diffstat (limited to 'texmf-dist/source/latex/aeb-mlink')
-rw-r--r-- | texmf-dist/source/latex/aeb-mlink/aeb_mlink.dtx | 624 | ||||
-rw-r--r-- | texmf-dist/source/latex/aeb-mlink/aeb_mlink.ins | 59 | ||||
-rw-r--r-- | texmf-dist/source/latex/aeb-mlink/doc/aebmlink_man.pdf | bin | 0 -> 129039 bytes | |||
-rw-r--r-- | texmf-dist/source/latex/aeb-mlink/doc/aebmlink_man.tex | 544 |
4 files changed, 1227 insertions, 0 deletions
diff --git a/texmf-dist/source/latex/aeb-mlink/aeb_mlink.dtx b/texmf-dist/source/latex/aeb-mlink/aeb_mlink.dtx new file mode 100644 index 00000000..c4c7b7be --- /dev/null +++ b/texmf-dist/source/latex/aeb-mlink/aeb_mlink.dtx @@ -0,0 +1,624 @@ +% \iffalse +%<*copyright> +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% aeb_mlink.sty package, 2015-10-28 %% +%% Copyright (C) 2006--2015 D. P. Story %% +%% dpstory@acrotex.net %% +%% storyd@owc.edu %% +%% %% +%% 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. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%</copyright> +%<package>\NeedsTeXFormat{LaTeX2e} +%<package>\ProvidesPackage{aeb_mlink} +%<package> [2016/02/16 v2.0 AeB MLink (dps)] +%<*driver> +\documentclass{ltxdoc} +\usepackage[colorlinks,hyperindex]{hyperref} +\pdfstringdefDisableCommands{\let\\\textbackslash}% +\EnableCrossrefs \CodelineIndex +\OnlyDescription % comment out for implementation details +\begin{document} + \GetFileInfo{aeb_mlink.sty} + \title{The \textsf{aeb\_mlink} Package\texorpdfstring{\\}{: } + A member of the AeB Pro family} + \author{D. P. Story\\ + Email: \texttt{storyd@owc.edu}} + \date{processed \today} + \maketitle + \tableofcontents + \let\Email\texttt + \DocInput{aeb_mlink.dtx} + \PrintIndex +\end{document} +%</driver> +% \fi +% \section{Introduction} +% This package creates \underbar{m}ultiline-\underbar{links}. +% The package \textsf{hyperref} does create links, but generally +% these links cannot be broken across lines, unless \textsf{pdflatex} +% is used to create a PDF. +% +% This package uses the \texttt{QuadPoints} entry in the link annotation to create +% a bounding region; consequently, this package requires \textbf{Acrobat Distiller} +% to create a PDF. \texttt{QuadPoints} is a PDF 1.6 feature, so these multiline links +% will work in Adobe Reader 7.0 or later. If viewed in a version of Adobe Reader previous +% to 7.0, the viewer will use the underlying bounding box. +% +% LaTeX package requirements are the \textsf{eForms} and \textsf{hyperref}. Only the use +% of \textsf{dvips} and \textsf{dvipsone} is supported. +% +%The key to creating a multi-line is contained in Table~8.24 of the +%PDF Reference. The description of \texttt{QuadPoints} in the PDF Reference +%is as follows: +% +%\begin{quote}\small +%(Optional; PDF 1.6) An array of $8 \times n$ numbers specifying the +%coordinates of $n$ quadrilaterals in default user space that comprise +%the region in which the link should be activated. The coordinates +%for each quadrilateral are given in the order +%$$ +% x_1\ y_1\ x_2\ y_2\ x_3\ y_3\ x_4\ y_4 +%$$ +%specifying the four vertices of the quadrilateral in +%counterclockwise order. For orientation purposes, such as when +%applying an underline border style, the bottom of a quadrilateral is +%the line formed by $(x_1 , y_1)$ and $(x_2 , y_2)$. If this entry is not +%present or the viewer application does not recognize it, the region +%specified by the \texttt{Rect} entry should be used. \texttt{QuadPoints} should be +%ignored if any coordinate in the array lies outside the region +%specified by \texttt{Rect}. +%\end{quote} +% \begin{macrocode} +%<*package> +% \end{macrocode} +% \begin{macrocode} +\RequirePackage{ifpdf}[2006/02/20] +\RequirePackage{ifxetex}[2006/08/21] +\newif\if@ml@dvips \@ml@dvipstrue +% \end{macrocode} +% \begin{macro}{dvipsone} +% Set the driver for \texttt{dvipsone} +% \begin{macrocode} +\DeclareOption{dvipsone}{\def\eq@drivernum{0}\@ml@dvipsfalse + \PassOptionsToPackage{dvipsone}{eforms} + \PassOptionsToPackage{dvipsone}{hyperref} %,colorlinks +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{dvips} +% Set the driver for \texttt{dvips} +% \begin{macrocode} +\DeclareOption{dvips}{\def\eq@drivernum{0}\@ml@dvipstrue + \PassOptionsToPackage{dvips}{eforms} + \PassOptionsToPackage{dvips}{hyperref} %,colorlinks +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\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 + \InputIfFileExists{web.cfg}{}{} +\fi\fi +\ProcessOptions +% \end{macrocode} +% We require hyperref, eforms and soul. For eforms, a recent version is needed, +% \texttt{2008/03/14} or later. +% \begin{macrocode} +\RequirePackage{hyperref} +\RequirePackage{eforms}[2008/03/14] +\RequirePackage{soul} +% \end{macrocode} +% +% \section{Driver Dependent Code} +% +% Driver dependent definitions for dvipsone and dvips. +% \begin{macrocode} +\def\ps@mark{[\space} +\if@ml@dvips +% \end{macrocode} +% This next \cs{special} defines some standard conversion +% formulas, {\TeX} to PDF and PDF to {\TeX} for \textsf{dvips}. +% \begin{macrocode} +\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 end} % sp to dots +% \end{macrocode} +% This command calculates the \cs{QuadPoints} array +% when we are using the \textsf{dvips} driver. +% \begin{macrocode} +\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 +{% + 72 neg PDFtoDvips vsize 72 sub PDFtoVDvips + hsize 72 sub PDFtoDvips 72 neg PDFtoVDvips +} +% \end{macrocode} +% This next \cs{special} defines some standard conversion +% formulas, {\TeX} to PDF and PDF to {\TeX} in the YandY TeX System. +% \begin{macrocode} +\else +\special{!/TeXtoPDF {65536 div mag 1000 div mul} def +/PDFtoTeX {65536 mul mag 1000 div div} def} +% \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 +} +% \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 +} +\fi +% \end{macrocode} +% +% \section{The Multi-line Linking Commands} +% +% We use a box, and two counters for this package. +% \begin{macrocode} +\newbox\aeb@bbox +\newcount\aeb@arrayIndx \aeb@arrayIndx=0 +\newcount\aeb@mLinkCnt \aeb@mLinkCnt=0 +% \end{macrocode} +% \begin{macro}{\mlhypertext} +% +% 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. +% +% The commands takes two arguments, the first an optional one the second +% one requires. +% \begin{enumerate} +% \item[\texttt{[\#1]}] A standard optional argument for eForms, to change +% the appearance of the link and/or to include actions. +% \item[\texttt{\#2}] The text to be enclosed in a link. +% \end{enumerate} +% \begin{macrocode} +\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}% +} +\let\mlh@preambleCmdInsert\relax +\newcommand{\mlhypertext}[1][]{\global\aeb@arrayIndx=0\relax + \global\advance\aeb@mLinkCnt1\relax +% \end{macrocode} +% We do something different, we process the options early, mostly +% to get any change in \texttt{linktxtcolor}, but only if the user-friendly \texttt{ui} is +% present. +% \begin{macrocode} + \special{ps: \ps@mark/_objdef {mLink\the\aeb@mLinkCnt} + /type /array /OBJ pdfmark}% + \def\mlh@preambleCmdInsert{\ml@earlyExecProps{#1}}% + \def\mlh@postambleCmd{\setLinkPbox{\S{S}\W{0}% + \presets{\ml@nocolor@defaults}% + \QuadPoints{mLink\the\aeb@mLinkCnt}#1}\endgroup}% + \aeb@mlh +} +\def\mlh@setQuadSyllable#1{% + \setbox\aeb@bbox=\hbox{\strut#1}% + {% + \count\z@=\ht\aeb@bbox\xdef\aeb@bbox@ht{\the\count\z@}% + \count\z@=\wd\aeb@bbox\xdef\aeb@bbox@wd{\the\count\z@}% + \dp\aeb@bbox=1pt\relax + \count\z@=\dp\aeb@bbox\xdef\aeb@bbox@dp{\the\count\z@}% + }% + \special{ps: \ps@mark{mLink\the\aeb@mLinkCnt} + \the\aeb@arrayIndx\space [\setQuadBox] + \space /PUTINTERVAL pdfmark}% + \global\advance\aeb@arrayIndx8\relax +} +% \end{macrocode} +% \end{macro} +% The next four commands are used internally, though \cs{aebnameref}, +% \cs{labelRef} and \cs{atPage} are public, and can be used. +% \begin{macrocode} +\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{\@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. +% 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 +% target/destination of the link, the third is the text the link is +% wrapped around. In the case of \cs{mlhyperlink} that target is a +% defined by \cs{hypertarget}; for \cs{mlhyperref} the target is a +% latex label. +% +% 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{macrocode} +\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}} +% \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{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}} +% \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 +% our own command \cs{mlhypertext} so the link string gets wrapped around +% if needed. +% \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 +}% +\def\ml@hyper@linkfile#1#2#3{% + \let\ef@thislinkcolor\@filecolor + \let\CurrentBorderColor\@filebordercolor + \def\theView{[0 \@pdfstartview]}% + \@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 +} +% \end{macrocode} +% Below is the code for \cs{mlhref}. We first let the old commands found in \texttt{pdfmark.def} +% equal to the new versions, then we call \cs{href} to do all the parsing. Things +% eventually comes back to the above three commands. +% \begin{macrocode} +\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 +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\mlurl} +% The multi-line version of Donald Arseneau's url package. There +% are problems with this one, will continue to work on it. +% \changes{v2.0}{2016/02/16}{Added support for the \cs{url} command.} +% +% The problem is not as ``easy'' as the previous cases. Arseneau places the URL in math mode +% and it does not reconstruct (\texttt{soul} terminology) as it should. Our solution is to +% hijack three commands of \texttt{soul} \cs{SOUL@doword}, \cs{SOUL@analyze}, and \cs{SOUL@dosyllable}, +% and modify them to do the work on an URL. +% \begin{macrocode} +\newbox\ml@urlbuild +\setbox\ml@urlbuild\hbox{} +% \end{macrocode} +% We modify \cs{SOUL@doword} and name it \cs{ml@SOUL@doword}. +% \begin{macrocode} +\def\ml@SOUL@doword{% + \global\setbox\ml@urlbuild\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 +% \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 +} +% \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\@ne\hbox{\unhbox\@ne}% +% \end{macrocode} +% If we say \verb!\mlurl{http://www.math.uakron.edu/~dpstory}!, then the \cs{box\cs{z@}} above contains +% the following tokens, listed at their breakpoints:\goodbreak +% \begin{flushleft} +% \texttt{http:}\\ +% \texttt{\string\\}\\ +% \texttt{www.}\\ +% \texttt{math.}\\ +% \texttt{uakron.}\\ +% \texttt{edu/}\\ +% \texttt{\string~dpstory} +% \end{flushleft} +% The idea is to get each of these using \verb~\global\setbox\@ne=\lastbox~ (bottom to top) +% and to build the URL with the quad points calculated. Each new token is added in front +% of the URL as we build it. Results are held in \cs{ml@urlbuild}. We insert \cs{penalty0} to +% promote a break point between components, as each component is enclosed in an \cs{hbox} now. +% \begin{macrocode} + \global\setbox\ml@urlbuild=\hbox{% + \mlh@setQuadSyllable{\unhcopy\@ne}% + \hbox{\unhcopy\@ne}\penalty0\unhcopy\ml@urlbuild}% + \SOUL@syllgoal=\wd\@ne + \advance\count@\@ne +% \end{macrocode} +% We get the tokens recursively, be 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 +% \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 +% \end{macrocode} +% Use \cs{ml@SOUL@dosyllable} not \cs{SOUL@dosyllable}. +% \begin{macrocode} + \ml@SOUL@dosyllable + \fi + \fi +}} +% \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@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 +% \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 +} +% \end{macrocode} +% After the above preliminaries, we finally define \DescribeMacro{\mlurl}\cmd{\mlurl}. +% \begin{macrocode} +\newcommand{\mlurl}{\begingroup\def~{\string~}% + \ef@sanitize@toks\mlurl@} +% \end{macrocode} +% After sanitizing, we save the URL (\texttt{\#2}) an a macro +% \cs{ml@url} using the \cs{urldef} command, defined in the \textsf{url} package. +% \begin{macrocode} +\newcommand{\mlurl@}[2][]{\urldef\ml@url\nolinkurl{#2}% +\def\SOUL@mlhpreamble{%\begingroup + \mlh@preambleCmdInsert\ef@colorthislink}\hyper@chars + \let\ef@thislinkcolor\@urlcolor + \let\CurrentBorderColor\@urlbordercolor +% \end{macrocode} +% Within this group, we direct the \textsf{soul} package to our customized versions of the +% commands. +% \begin{macrocode} + \let\ml@SOUL@doword@SAVE\SOUL@doword + \let\SOUL@doword\ml@SOUL@doword +% \end{macrocode} +% 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} + \global\aeb@arrayIndx=0\relax + \global\advance\aeb@mLinkCnt1\relax + \special{ps: \ps@mark/_objdef {mLink\the\aeb@mLinkCnt}% + /type /array /OBJ pdfmark}% + \def\mlh@preambleCmdInsert{\ml@earlyExecProps{#1}}% + \def\mlh@postambleCmd{\setLinkPbox{\S{S}\W{0}\A{\URI{#2}}% + \presets{\ml@nocolor@defaults} + \QuadPoints{mLink\the\aeb@mLinkCnt}#1}\expandafter +% \end{macrocode} +% The coloring of the hypertext does not work unless we make the definition +% global, so we do so and hope this does not mess other things up. +% \begin{macrocode} + \gdef\expandafter\ef@thislinkcolor + \expandafter{\ef@thislinkcolor}}% +% \end{macrocode} +% Finally, we call \cs{aeb@mlh} which starts \textsf{soul} with \cs{SOUL@}. +% This does this analysis, the custom command build the url in \cs{ml@urlbuild}, which +% we then unbox. +% \begin{macrocode} + \aeb@mlh\ml@url\ef@colorthislink\unhcopy\ml@urlbuild\endgroup +} +% \end{macrocode} +% \end{macro} +% \section{Macros used by the SOUL Interface} +% \begin{macrocode} +\ifHy@colorlinks + \def\ef@colorthislink{\color{\ef@thislinkcolor}} +\else + \let\ef@colorthislink\relax +\fi +% \end{macrocode} +% I've inserted \verb|\let\protect\@empty| to make |mlnameref| and |mlNameref| work. +% \begin{macrocode} +\def\ml@SOUL@stop{\relax} +\def\SOUL@mlhpreamble{\begingroup +% \end{macrocode} +% (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\let\protect\@empty} + \mlh@preambleCmdInsert\ef@colorthislink} +\def\SOUL@mlheverysyllable{% + \mlh@setQuadSyllable{\the\SOUL@syllable}% + \the\SOUL@syllable% + \SOUL@setkern\SOUL@charkern}% +%\def\SOUL@mlheveryspace#1{% +% \mlh@setQuadSyllable{ #1\space\hskip\spaceskip}% +% #1\space\hskip\spaceskip}% +\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{\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@} +% \end{macrocode} +% \begin{macrocode} +%</package> +% \end{macrocode} +% \Finale +\endinput diff --git a/texmf-dist/source/latex/aeb-mlink/aeb_mlink.ins b/texmf-dist/source/latex/aeb-mlink/aeb_mlink.ins new file mode 100644 index 00000000..db8819d8 --- /dev/null +++ b/texmf-dist/source/latex/aeb-mlink/aeb_mlink.ins @@ -0,0 +1,59 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1999-2006 D. P. Story +%% +%% This file is part of the `AcroTeX eDucation Bundle'. +%% ------------------------------------------- +%% +%% It may be distributed under the conditions of the LaTeX Project Public +%% License, either version 1.2 of this license or (at your option) any +%% later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{2007/05/14} +\def\batchfile{aeb_mlink.ins} +% +\input docstrip +\ifx\generate\undefined + \Msg{**********************************************} + \Msg{*} + \Msg{* This installation requires docstrip} + \Msg{* version 2.4 or later.} + \Msg{*} + \Msg{* An older version of docstrip has been input} + \Msg{*} + \Msg{**********************************************} + \errhelp{Move or rename old docstrip.tex and get a newer one.} + \errmessage{Old docstrip in input path} + \batchmode + \csname @@end\endcsname\end +\fi + +\keepsilent +\askforoverwritefalse +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\preamble +\endpreamble +\generate +{% + \file{aeb_mlink.sty}{\from{aeb_mlink.dtx}{copyright,package}} +} + +\Msg{***************************************************************} +\Msg{*} +\Msg{* \space To finish the installation you have to copy the files } +\Msg{*} +\Msg{* \space *.sty, *.cfg and *.def into a directory searched by TeX} +\Msg{*} +\Msg{***************************************************************} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput 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 differnew file mode 100644 index 00000000..2d697917 --- /dev/null +++ b/texmf-dist/source/latex/aeb-mlink/doc/aebmlink_man.pdf diff --git a/texmf-dist/source/latex/aeb-mlink/doc/aebmlink_man.tex b/texmf-dist/source/latex/aeb-mlink/doc/aebmlink_man.tex new file mode 100644 index 00000000..4295fd8d --- /dev/null +++ b/texmf-dist/source/latex/aeb-mlink/doc/aebmlink_man.tex @@ -0,0 +1,544 @@ +% makeindex < aebpro_man.idx > aebpro_man.ind +\documentclass{article} +%\usepackage[fleqn]{amsmath} +\usepackage[ + web={centertitlepage,designv,forcolorpaper, + tight*,latextoc,pro,usetemplates}, + eforms={useui}, + aebxmp +]{aeb_pro} +\usepackage{aeb_mlink} + +%\usepackage{myriadpro} +\usepackage[altbullet]{lucidbry} + +\usepackage{acroman} + +\usepackage[active]{srcltx} + +\DeclareDocInfo +{ + university={\AcroTeX.Net}, + title={The \textsf{aeb\_mlink} Package\texorpdfstring{\\[1em]}{: }AeB Pro Family}, + author={D. P. Story}, + email={dpstory@acrotex.net}, + subject={Wrapping links around to the next line}, + keywords={XMP, E4X, Adobe Acrobat, JavaScript}, + talksite={\url{www.acrotex.net}}, + version={2.0}, + copyrightStatus={True}, + copyrightNotice={Copyright (C) 2006-\the\year, D. P. Story}, + copyrightInfoURL={http://www.acrotex.net} +} +\nocopyright +\DeclareInitView{windowoptions=showtitle} + +\def\dps{$\hbox{$\mathfrak D$\kern-.3em\hbox{$\mathfrak P$}% + \kern-.6em \hbox{$\mathcal S$}}$} + + +\def\AcroTeX{Acro\negthinspace\TeX} + +\def\unskipparskip{\vskip-\parskip} +\renewenvironment{sverbatim} +{\parskip0pt\noindent\small\verbatim}{\endverbatim\par\aftergroup\unskipparskip} +\renewenvironment{ssverbatim} +{\parskip0pt\noindent\footnotesize\verbatim}{\endverbatim\par\aftergroup\unskipparskip} + +\def\anglemeta#1{$\langle\textit{\texttt{#1}}\rangle$} +\def\meta#1{\textit{\texttt{#1}}} +\def\darg#1{\texttt{\{#1\}}} +\def\takeMeasure{\bgroup\obeyspaces\takeMeasurei} +\def\takeMeasurei#1{\global\setbox\webtempboxi\hbox{\ttfamily#1}\egroup} +\def\bxSize{\wd\webtempboxi+2\fboxsep+2\fboxrule} +\let\pkg\textsf +\let\env\texttt +\let\opt\texttt +\let\app\textsf + +\let\amtIndent\leftmargini +\def\SUB#1{${}_{\text{#1}}$} + +\newdimen\aebdimen \aebdimen 0pt %\advance\aebdimen\partopsep +\newcommand\bVerb[1][]{\begingroup#1\vskip\aebdimen\parindent0pt}% +\def\eVerb{\vskip\aebdimen\endgroup\noindent} + +\def\cmdtitle#1{\texorpdfstring{\protect\cs{#1}}{\textbackslash{#1}}} + +\renewcommand\hproportionwebauthor{.5} +\universityLayout{fontsize=Large} +\titleLayout{fontsize=LARGE} +\authorLayout{fontsize=Large} +\tocLayout{fontsize=Large,color=aeb} +\sectionLayout{indent=-62.5pt,fontsize=large,color=aeb} +\subsectionLayout{indent=-31.25pt,color=aeb} +\subsubsectionLayout{indent=0pt,color=aeb} +\subsubDefaultDing{\texorpdfstring{$\bullet$}{\textrm\textbullet}} + +\makeatletter +\renewcommand{\paragraph} + {\@startsection{paragraph}{4}{0pt}{6pt}{-3pt}{\bfseries}} +\makeatother + +%\parindent0pt\parskip\medskipamount + + +\definePath\bgPath{"C:/Users/Public/Documents/% + ManualBGs/Manual_BG_Print_AeB.pdf"} +\begin{docassembly} +\addWatermarkFromFile({% + bOnTop: false, + cDIPath: \bgPath +}) +\executeSave() +\end{docassembly} + +\begin{document} + +\maketitle + +\selectColors{linkColor=black} + +\tableofcontents + +\selectColors{linkColor=webgreen} + +\section{Introduction} + +This package creates \underbar{m}ulti-line \underbar{link}s, a dream +that I have had for a number of years. The package \pkg{hyperref} +does create links, but generally these links cannot be broken across +lines, unless the application \app{pdflatex} is used to create a +PDF; however, since my workflow is primarily through \app{Acrobat +Distiller}, this does me little good. + +This package uses the \texttt{QuadPoints} entry of the link +annotation dictionary to create a bounding region; consequently, +\textbf{this package requires \app{Acrobat Distiller}} to create a PDF. The +\texttt{QuadPoints} entry in the link annotation is a PDF 1.6 +feature, so these multi-line links will work in Adobe Reader 7.0 or +later. If viewed in a version of Adobe Reader previous to 7.0, the +viewer will use the underlying bounding box, which in the case of +this package, is the entire page. \emph{Because the multi-line links don't +work for versions of Adobe Reader prior to 7.0, this package should +be used only when the reading audience has the required version}. + + +\section{Requirements} + +The following {\LaTeX} packages are the major ones required by \texttt{aeb\_mlink}. +\begin{itemize} + \item \pkg{eforms} provides form and link support, \`a la + {Acro\negthinspace\TeX} (\url{ctan.org/pkg/acrotex}). + \item \pkg{hyperref} provides link support, including the + commands \cs{hyperref}, \cs{hyperlink}, \cs{href}, \cs{nameref}, + \cs{Nameref}, and \cs{href}. + \item \pkg{soul} a very nice package by Melchior FRANZ, used by + \pkg{aeb\_mlink} to hyphenate links (\url{ctan.org/pkg/soul}). +% \nolinkurl{CTAN: tex-archive/macros/latex/contrib/soul/}} + +\end{itemize} + +\section{Package options} + +There are only two package options---the name of the dvi-to-ps converter application to be used---, +these are \opt{dvips} and \opt{dvipsone}.\footnote{\app{dvipsone.exe} is the dvi-to-ps converter +of the Y\&Y {\TeX} System, no longer available, but is used by this author.} The default is \opt{dvips}. + +%\Hy@colorlinksfalse + +\bVerb[\aebdimen=6pt] +\begin{minipage}[t]{.5\linewidth} +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!(),fontsize=\small] +\documentclass{article} +\usepackage{xcolor} +\usepackage[colorlinks]{hyperref} +\usepackage[!anglemeta(driver)]{aeb_mlink} +\end{Verbatim} +\end{minipage}\quad\begin{minipage}[t]{.4\linewidth} +\begin{Verbatim}[commandchars=!(),fontsize=\small] +\documentclass{article} +\usepackage[designi]{web} +\usepackage[!anglemeta(driver)]{aeb_mlink} +\end{Verbatim} +\end{minipage} +\eVerb Above are two typical preambles for the use of \pkg{aeb\_mlink}: +\begin{itemize} + \item The one on the left inputs \pkg{xcolor} (recommended) and + \pkg{hyperref} explicitly. The \opt{colorlinks} option is + recommended for \pkg{hyperref}. These two are followed by + \pkg{aeb\_mlink}. + \item The preamble representation on the right uses the \pkg{web} + package, which internally inputs both \pkg{xcolor} (if available) and + \pkg{hyperref} (with \opt{colorlinks} option). Again, \pkg{aeb\_mlink} + comes last. +\end{itemize} + +Since \pkg{eforms} is a required package, the \pkg{acrotex} bundle +(\pkg{AeB}) is installed; consequently, if you've set up the \texttt{web.cfg} +configuration file (that accompanies \pkg{AeB}) with either +\cs{ExecuteOptions\darg{dvips}} or \cs{ExecuteOptions\darg{dvipsone}}, the +specification of the \anglemeta{driver} is not normally needed. + +\section{Multi-line link commands} + +We define seven multi-line hypertext link commands: \cs{mlhypertext}, +\cs{mlhyperlink}, \cs{mlhyperref}, \cs{mlnameref}, \cs{mlNameref}, +\cs{href}, and \cs{mlurl}. The first is a basic command that is used in the definitions of +the other six. + +\newtopic\noindent\textbf{Note:} Because of the way the bounding boxes are +constructed, it is best that the bounding rectangle is set on invisible, that +is, the line width of the boundary line is zero. The \opt{colorlinks} option +of \app{hyperref} should be taken. + +\exSrc{mlink_tst}The demo file is \texttt{mlink\_tst.tex}, it illustrates all +the commands -- with the exception of \cs{mlurl} -- of this package. The +demo file for \cs{mlurl} is a separate file and is mentioned in +\hyperref[ss:mlrul]{Section~\ref*{ss:mlrul}}. + +\subsection{\cmdtitle{mlhypertext} (\cmdtitle{mlsetLink})} A general purpose multi-line link command. + +\bVerb[\aebdimen=8pt]\takeMeasure{\string\mlhypertext[\#1]\darg{\#2}}% +\begin{minipage}{\bxSize} +\begin{Verbatim}[frame=single,rulecolor=\color{webblue}] +\mlhypertext[#1]{#2} +\end{Verbatim} +\end{minipage}\quad\takeMeasure{\string\mlsetLink[\#1]\darg{\#2}}% +\begin{minipage}{\bxSize} +\begin{Verbatim}[frame=single,rulecolor=\color{webblue}] +\mlsetLink[#1]{#2} +\end{Verbatim} +\end{minipage} +\endgroup + + +\PD The first parameter is optional, and is used to set the appearance and the actions of the link. +The second parameter is the text around which the link is constructed. + +\CmdDescription The \pkg{eforms} package defines \cs{mlsetLink} to +\cs{mlhypertext} (this is to conform to the naming conventions of +\pkg{eforms}). Either command sets a hypertext link having a default +appearance, and no action. The default appearance is the same as that of +\cs{hyperlink}, the command from \pkg{hyperref}. If \opt{colorlinks} +option was taken in the hyperref package, the text is colored \cs{@linkcolor} +(usually red); otherwise, the text is the default color at the time, and a +boundary rectangle is created by AcroForms with color \cs{@linkbordercolor} +(usually red).\footnote{The \pkg{web} package changes the default coloring of \pkg{hyperref}.} + +\newtopic +For example, the following link is constructed using +\cs{mlhypertext}: \mlhypertext[\A{\JS{app.alert("AcroTeX rocks!")}}]% +{Acrobat Distiller, version~7.0 or greater} was used to +create this PDF document. + +\bVerb\takeMeasure{\string\mlhypertext[\string\A\darg{\string\JS\darg{app.alert("AcroTeX rocks!")}}]\%}% +\begin{dCmd*}{\bxSize} +\mlhypertext[\A{\JS{app.alert("AcroTeX rocks!")}}]% + {Acrobat Distiller, version~7.0 or greater} +\end{dCmd*} +\eVerb In the above example, the link, shown in \textcolor{webgreen}{green} +is broken across lines. Though is is not shown in this example, these links +can break a line at a hyphenation point as well. The optional argument is +used to create an alert box that appears when the link is clicked. + +\subsection{\cmdtitle{mlhyperlink}} A multi-line version of the \cs{hyperlink} command. + +\bVerb\takeMeasure{\string\mlhyperlink[\#1]\darg{\#2}\darg{\#3}}% +\begin{dCmd}{\bxSize} +\mlhyperlink[#1]{#2}{#3} +\end{dCmd} +\endgroup + +\PD The first parameter is optional, and is used to set the appearance, but \textit{not the actions} of the link. +The second parameter is a named destination, perhaps created by the \cs{hypertarget} command of +\pkg{hyperref}. The third parameter is the text around which the link is constructed. + +\CmdDescription This command is the multi-line version of the \pkg{hyperref} command \cs{hyperlink}. +The default appearance is the same as \cs{hyperlink}, as described above in \cs{mlhypertext}. +The action of this link is to jump to a named destination; the action cannot be changed by defining +a different action through the first parameter. + +This link uses the \cs{mlhyperlink} command: +\so{Welcome!} \mlhyperlink{retire}{Welcome, $\dots$ to my humble retirement residence, such as it is!} +\bVerb\takeMeasure{\string\mlhyperlink\darg{retire}\{Welcome, \$\string\dots\$ to my humble}% +\begin{dCmd*}{\bxSize} +\mlhyperlink{retire}{Welcome, $\dots$ to my humble +retirement residence, such as it is!} +\end{dCmd*} +\eVerb In this example, the line is broken at a hyphenation, cool! We jump to +the named destination, \texttt{retire}. On the last page, +the following text appears +\begin{quote} +\verb!My humble retirement \hypertarget{retire}{home}.! +\end{quote} +creating the named destination of \texttt{retire}. + +\subsection{\cmdtitle{mlhyperref}} A multi-line version of the \cs{hyperref} command. + +\bVerb\takeMeasure{\string\mlhyperref[\#1]\darg{\#2}\darg{\#3}}% +\begin{dCmd}{\bxSize} +\mlhyperref[#1]{#2}{#3} +\end{dCmd} +\endgroup +\PD The first parameter is optional, and is used to set the +appearance, but \textit{not the actions} of the link. The second +parameter is a label name created by the \cs{label} command of +\LaTeX. The third parameter is the text around which the link is +constructed. + +\CmdDescription This is the multi-line version of \cs{hyperref}, the command +defined by the \pkg{hyperref} package. The default appearance is the same +as \cs{hyperref}. The action of this link is to jump to a destination created +by the \cs{label} command of the cross-referencing system of \LaTeX; the +action cannot be changed by defining a different action through the first +parameter. + +\newtopic +This link uses the \cs{mlhyperref} command: \mlhyperref[\ui{linktxtcolor=red}]{retirement} +{Welcome! Welcome to my humble retirement residence, such as it is!} + +\bVerb\takeMeasure{\string\mlhyperref[\string\ui\darg{linktxtcolor=red}]\darg{retirement}}% +\begin{dCmd*}{\bxSize} +\mlhyperref[\ui{linktxtcolor=red}]{retirement} +{Welcome! Welcome to my humble retirement +residence, such as it is!} +\end{dCmd*} +\eVerb The user-friendly interface is used to change the appearance of the +color of the link text. The second argument is \texttt{retirement}, which is +the label +affixed to the last section of this document, +\begin{quote} +\verb!\section{My \textbf{Retirement} Home}\label{retirement}! +\end{quote} +See \mlNameref{retirement}. + + +\subsection{\cmdtitle{mlnameref}} A multi-line version of the \cs{nameref} command. + +\bVerb\takeMeasure{\string\mlnameref[\#1]\darg{\#2}}% +\begin{dCmd}{\bxSize} +\mlnameref[#1]{#2} +\end{dCmd} +\endgroup + +\PD The first parameter is optional, and is used to set the appearance, but + \textit{not the actions} of the link. The second parameter is a name of + a {\LaTeX} label. + +\CmdDescription This is the multi-line version of the +\pkg{hyperref} (\pkg{nameref}) command, \cs{nameref}. The default appearance is +the same as \cs{hyperref}. The action of this link is to jump to a +destination created by the \cs{label} command of the +cross-referencing system of \LaTeX; the action cannot be changed by +defining a different action through the first parameter. + +\newtopic +This link uses the \cs{mlnameref} command: Click the link to witness \mlnameref{retirement}. +The code for this link is seen below: +\bVerb\takeMeasure{\string\mlnameref\darg{retirement}}% +\begin{dCmd*}{\bxSize} +\mlnameref{retirement} +\end{dCmd*} +\endgroup + +\subsection{\cmdtitle{mlNameref}} A multi-line version of the +\pkg{hyperref} command, \cs{Nameref}. + +\bVerb\takeMeasure{\string\mlNameref[\#1]\darg{\#2}}% +\begin{dCmd}{\bxSize} +\mlNameref[#1]{#2} +\end{dCmd} +\endgroup +\PD The first parameter is optional, and is used to set the + appearance, but \textit{not the actions} of the link. The second + parameter is a name of a {\LaTeX} label. + +\CmdDescription This is the multi-line version of the \pkg{hyperref} +(\pkg{nameref}) command, \cs{Nameref}. The default appearance is the same as +\cs{hyperref}. The action of this link is to jump to a destination created by +the \cs{label} command of the cross-referencing system of \LaTeX; the action +cannot be changed by defining a different action through the first parameter. + +\newtopic +This link uses the \cs{mlNameref} command: Click the link or go to +the page, \mlNameref{retirement}. The code for the link is seen below: +\bVerb\takeMeasure{\string\mlNameref\darg{retirement}}% +\begin{dCmd*}{\bxSize} +\mlNameref{retirement} +\end{dCmd*} +\endgroup + +\subsection{\cmdtitle{mlhref}} A multi-line version of the +\pkg{hyperref} command, \cs{href}. +\bVerb\takeMeasure{\string\mlhref[\#1]\darg{\#2}\darg{\#3}}% +\begin{dCmd}{\bxSize} +\mlhref[#1]{#2}{#3} +\end{dCmd} +\endgroup + +\PD The first parameter is optional, and is used to set the + appearance, but \textit{not the actions} of the link. The + second parameter is a URL, while the third parameter is the link text. + +\CmdDescription This is the multi-line version of the +\pkg{hyperref} command, \cs{href}. The default appearance is +the same as \cs{hyperref}. There is one of three actions, depending on the +third argument, just as with \cs{href}. The action cannot be changed by +defining a different action through the first parameter. + +%\begingroup +%\makeatletter +%\def\Hy@temp#1{\expandafter\Hy@@temp\csname @#1color\endcsname{#1}} +%\Hy@temp{link}{red} +%\Hy@temp{anchor}{black} +%\Hy@temp{cite}{green} +%\Hy@temp{file}{cyan} +%\Hy@temp{url}{magenta} +%\Hy@temp{menu}{red} +%\makeatother + +\newtopic +The next link uses the \cs{mlhref} command with URL: \mlhref{% +http://www.math.uakron.edu/~dpstory/acrotex.html#educational} +{See the educational offerings of the {Acro\negthinspace{\TeX}} Web +Site at the University of Akron} +\bVerb\takeMeasure{\{See the educational offerings of the \darg{Acro\string\negthinspace\darg{\string\TeX}} Web}% +\begin{dCmd*}{\bxSize} +\mlhref{% +http://www.math.uakron.edu/~dpstory/acrotex.html#educational} +{See the educational offerings of the {Acro\negthinspace{\TeX}} Web +Site at the University of Akron} +\end{dCmd*} +\eVerb +Use the \cs{mlhref} command with mailto URL: My email address at Acro\negthinspace\TeX.Net, +\mlhref{mailto:dpstory@acrotex.net}{dpstory at acrotex dot net}. +\bVerb\takeMeasure{\string\mlhref\darg{mailto:dpstory@acrotex.net}\darg{dpstory at acrotex dot net}}% +\begin{dCmd*}{\bxSize} +\mlhref{mailto:dpstory@acrotex.net}{dpstory at acrotex dot net} +\end{dCmd*} +\eVerb +If the second argument is a PDF file, the PDF viewer will open it from your local file system, +or if you are in a browser, will open it from the web, provided it can find the relative path +\bVerb\takeMeasure{shameless advertisement for Acro\string\negthinspace\string\TeX\}.}% +\begin{dCmd*}{\bxSize} +\mlhref{shameless_ad.pdf}{Here is a +shameless advertisement for Acro\negthinspace\TeX}. +\end{dCmd*} +\eVerb If the key word `\texttt{run:}' is used, the link is set up to launch +an application. The PDF viewer will attempt to open the file with the +application associated with the extension of the file provided. +\bVerb\takeMeasure{\string\mlhref\darg{run:\string\jobname.tex}\darg{This is the source file of this document}.}% +\begin{dCmd*}{\bxSize} +\mlhref{run:\jobname.tex}{This is the source file of this document}. +\end{dCmd*} +\endgroup + +\subsection{\cmdtitle{mlurl}}\label{ss:mlrul} + +A multi-line version of the \cs{url} command of the \pkg{url} package. +The \pkg{hyperref} modifies this command to make it into an unbreakable link (at least for those +using \app{Distiller}). +\bVerb\takeMeasure{\string\mlurl[\#1]\darg{\#2}}% +\begin{dCmd}{\bxSize} +\mlurl[#1]{#2} +\end{dCmd} +\endgroup + +\PD The first parameter is optional, and is used to set the + appearance, but \textit{not the actions} of the link. The + second parameter is a URL, the text of the link is the same as the URL. + +\CmdDescription This is the multi-line version of the +\pkg{url}/\pkg{hyperref} command, \cs{hurl}. The default appearance is +the same as set by \cs{hyperref}. + +\newtopic +The next link is an example of \cs{mlurl}: +\mlurl{http://www.math.uakron.edu/~dpstory/acrotex.html#educational}. The code for this link is found below: +\bVerb\takeMeasure{\string\mlurl\darg{http://www.math.uakron.edu/\string~dpstory/acrotex.html\#educational}}% +\begin{dCmd*}{\bxSize} +\mlurl{http://www.math.uakron.edu/~dpstory/acrotex.html#educational} +\end{dCmd*} +\eVerb The \pkg{url} package typesets the URL in math mode, which makes it +very difficult to wrap it to the next line with a hypertext link around it. +In math mode, spaces are ignored; consequently, if the URL contains spaces, +use \verb!\%20! (with backslash), the URL encoding for the space character. +See the Internet reference +\mlurl{http://www.w3schools.com/tags/ref_urlencode.asp} for a discussion of +the \textbf{\caps{HTML URL Encoding Reference}}. + + +\exSrc{mlink_tst_url}The demo file that illustrate all the commands to +follow is \texttt{mlink\_tst\_url.tex}. Additional details and examples are found in this +example file. + +\section{Setting the appearance and action} + +The appearance and the action (at least for \cs{mlhypertex}) can be set through the first +optional parameter. The optional parameter takes key-value pairs of two types: +\paragraph*{Key-value Pairs.} The optional first parameter of each of the form and link commands take +two styles of key-values: +\begin{enumerate} + \item eForms KVP: This is the key-value system originally developed, where each KVP has the form + \cs{\anglemeta{key}\darg{\anglemeta{val}}}. Through these keys, the appearance + and action of a link---if otherwise not restricted---may be set. + For example, \mlhypertext[\S{U}\W{1}\Color{0 0.6 0} + \linktxtcolor{webgreen} \A{\JS{app.alert("AcroTeX + rocks!")}}]{AcroTeX can be found at + \texttt{www.acrotex.net}, as close as your nearest web + browser.} +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small] +\mlhypertext[\S{U}\W{1}\Color{0 0.6 0}\linktxtcolor{webgreen} +\A{\JS{app.alert("AcroTeX rocks!")}}]{AcroTeX...browser.} +\end{Verbatim} + + The eForms KVP system is explained in the eforms manual, + \textsl{\mlhref{http://www.math.uakron.edu/~dpstory/acrotex/eformman.pdf}{Support for AcroForms and Links, and for Document JavaScript and Open Page Events}},\footnote + {\url{http://www.math.uakron.edu/~dpstory/acrotex/eformman.pdf}} + where a complete listing of all supported KVPs is found in the appendices. + + \item \pkg{xkeyval} KVP: When the \opt{useui} option is taken of the eforms package, key-value pairs are + defined of the form \texttt{\anglemeta{key}[\,=\,\anglemeta{value}]}. The key-value pairs are actually a value of + a special eForms key, \cs{ui}. The value of \cs{ui} consists of a comma-delimited list of + \pkg{xkeyval} key-value pairs. For example, + \mlsetLink[\ui{% + border=visible, + linestyle=underlined, + bordercolor={0 0.6 0}, + linktxtcolor=webgreen, + js={app.alert("AcroTeX rocks!")}}]{AcroTeX + can be found at \texttt{www.acrotex.net}, as + close as your nearest web browser.} +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small] +\mlsetLink[\ui{% + border=visible, + linestyle=underlined, + bordercolor={0 0.6 0}, + linktxtcolor=webgreen, + js={app.alert("AcroTeX rocks!")}}]{AcroTeX...browser.} +\end{Verbatim} + + + \item[] The \pkg{xkeyval} KVP system is described in the document + \textsl{\mlhref{http://www.math.uakron.edu/~dpstory/acrotex/eformman.pdf}{Support for AcroForms and Links, and for Document JavaScript and Open Page Events}}.\footnote + {ibid.} + +\end{enumerate} + +\newpage + +\section{My \textbf{Retirement} Home}\label{retirement} + +My humble retirement \hypertarget{retire}{home}. +\begin{flushleft} +\setLink[\H{N}\A{\Named{GoBack}}]{\includegraphics[scale=.5]{DSC01404}}\quad \raisebox{75pt}{\textbf{Click image to return from jump}} +\end{flushleft} + + +\newtopic\noindent +Now, I simply must get back to my retirement. \dps + + + +\end{document} |