\documentclass{article}
\usepackage[fleqn]{amsmath}
\usepackage[designi]{web}
\usepackage{eforms}
\usepackage{aeb_mlink}
\usepackage{multicol}

\renewcommand\hproportionwebtitle{.75}
\renewcommand{\titleauthorproportion}{.5}



\title{Demonstrating the \textsf{aeb\_mlink} Package\texorpdfstring{\\[3pt]}{: }A member of AeB Pro}
\author{D. P. Story}
\subject{Multi-line links using the AcroTeX eDucation Bundle}
\keywords{AeB, multi-line links}

\university{NORTHWEST FLORIDA STATE COLLEGE\\
   Department of Mathematics}
\email{storyd@nwfsc.edu}
\version{2.2}
\revisionLabel{}

\newcommand{\cs}[1]{\texttt{\char`\\#1}}

\flJSStr\Msgi{First Link\\n\\nLet's try another! J\\374rgen and with unicode J\\u00FCrgen}
\flJSStr\Msgii{Success! Multi-line links with hyphenation!\\n\\nCongrats, J\\u00FCrgen}
\flJSStr\Msgiii{I said, \\"No, they won't work.\\"...I'm wrong again.}

\mlMarksOn
\turnSyllbCntOn

\begin{document}

\maketitle

\section{Introduction}


This file tests and demonstrates new macros for creating hypertext
links that wrap around a line. Most of the text is nonsense, and was
created to fill the page, no offence taken I hope

This paragraph contains two links that go beyond the
\mlhypertext[\S{U}\W{1}\Color{0 .6 0}\A{\JS{app.alert(\Msgi);}}]{margins of this text width} so it wraps around to the
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:
\begin{equation}
                \boxed{x + y = 1}
\end{equation}
Now, with your permission, I'll insert another one of these
\mlhypertext[\A{\JS{app.alert("Fourth Link")}}]{links of the
multiline type.}\footnote{D.P. Story is very nice fellow, but he has a rather
\mlhypertext[\A{\JS{app.alert("Footnote!")}}]{grand head; we must watch the
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.
\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
math \mbox{\smash[b]{$\displaystyle\int_0^1 f(x)\,dx$}} work admirably.}


\parskip0pt

\begin{multicols}{2}
\noindent Being able to create multi-line links becomes important when the
\texttt{\string\linewidth} is narrow. On this page we create some
mindless text that will fill up all or part of the page, then create
some multi-line links.

Without a doubt, \textsl{this method will fail if the paragraph contains
multi-line links that crosses a \emph{page boundary} or a \emph{\mlhypertext[\A{\JS{app.alert("Wrong again! However, there are problems
with page boundaries.");}}]{column boundary}}}.

This paragraph contains two links that extend beyond the
\mlhypertext[\A{\JS{app.alert("Fifth Link")}}]{margins of this text
width} which causes it to wrap around to the next line. Note the
hyphenation of the link, this is due to the \textsf{soul} package.
As a further test, I'll \mlhypertext[\A{\JS{app.alert("Sixth
Link")}}]{insert a multi-line link} again. Can we continue with
this? Yes, so says D. P. Story.

\end{multicols}


\section{Second of Three Sections}\label{second}

Let us begin by having page filling mindless text,
then we'll force a page break, but before we break, a friend of
mine, asked if multi-line links work with math formulas. A very strange request,
\mlhypertext[\A{\JS{app.alert(\Msgiii)}}]{$ x= f(t)$, $ x= g(t)$, $h(x) = e^x$}, very strange
indeed. Let's try.

Use \LaTeX/hyperref system of cross-referencing
\mlnameref{three}. The last link is a modification of
the \texttt{\string\nameref} command from hyperref.The
\texttt{\string\Nameref} command can be duplicated
\mlNameref{three} as well.

\newpage

\section{Third of Three Sections}\label{three}

The second section, oops, I've lost count. I have nothing to say in
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
          \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.
    \item Works for footnotes
    \item Can use verbatim text in a paragraph, \verb!$#}^!,
          but cannot include verbatim in a multi-line link. Is
          there any real need to do so?
\end{enumerate}

\section{URLs}

Let us try a URL across lines: \mlhref[\S{U}\W{1}\Color{0.6 0 0}]{%
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}. This link plays off the
\texttt{\string\href} \hypertarget{command}{command}. There is also the \cs{mlurl}
command, illustrated in the file \texttt{mlink\_tst\_url.tex}.

We can also call a local file, let's try: \mlhref{shameless_ad.pdf}{Here
is a shameless advertisement for Acro\!\TeX}.

Try launching  a file now, let's try a \LaTeX{} file:
\mlhref[\S{U}\W{1}\Color{.6 0 0}]{run:\jobname.tex}{This is the
source file of this document}.\footnote{Source document needs to be in the folder
containing this PDF file.}

Finally, let's try my own email address at Acro\!\TeX.Net,
\mlhref{mailto:dpstory@acrotex.net}{dpstory at acrotex dot net}.

\href{run:np_test.txt}{Launch Notepad}\footnote{Windows system required.}

\end{document}
