summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/aeb_mlink/examples
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/aeb_mlink/examples')
-rw-r--r--macros/latex/contrib/aeb_mlink/examples/mlink_tst.pdfbin0 -> 62931 bytes
-rw-r--r--macros/latex/contrib/aeb_mlink/examples/mlink_tst.tex150
-rw-r--r--macros/latex/contrib/aeb_mlink/examples/mlink_tst_url.pdfbin0 -> 35662 bytes
-rw-r--r--macros/latex/contrib/aeb_mlink/examples/mlink_tst_url.tex48
-rw-r--r--macros/latex/contrib/aeb_mlink/examples/np_test.txt1
-rw-r--r--macros/latex/contrib/aeb_mlink/examples/shameless_ad.pdfbin0 -> 40725 bytes
6 files changed, 199 insertions, 0 deletions
diff --git a/macros/latex/contrib/aeb_mlink/examples/mlink_tst.pdf b/macros/latex/contrib/aeb_mlink/examples/mlink_tst.pdf
new file mode 100644
index 0000000000..02be88e97a
--- /dev/null
+++ b/macros/latex/contrib/aeb_mlink/examples/mlink_tst.pdf
Binary files differ
diff --git a/macros/latex/contrib/aeb_mlink/examples/mlink_tst.tex b/macros/latex/contrib/aeb_mlink/examples/mlink_tst.tex
new file mode 100644
index 0000000000..e2a2a4ec43
--- /dev/null
+++ b/macros/latex/contrib/aeb_mlink/examples/mlink_tst.tex
@@ -0,0 +1,150 @@
+\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
+
+
+\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}
diff --git a/macros/latex/contrib/aeb_mlink/examples/mlink_tst_url.pdf b/macros/latex/contrib/aeb_mlink/examples/mlink_tst_url.pdf
new file mode 100644
index 0000000000..b8467599ab
--- /dev/null
+++ b/macros/latex/contrib/aeb_mlink/examples/mlink_tst_url.pdf
Binary files differ
diff --git a/macros/latex/contrib/aeb_mlink/examples/mlink_tst_url.tex b/macros/latex/contrib/aeb_mlink/examples/mlink_tst_url.tex
new file mode 100644
index 0000000000..926dda1b14
--- /dev/null
+++ b/macros/latex/contrib/aeb_mlink/examples/mlink_tst_url.tex
@@ -0,0 +1,48 @@
+\documentclass{article}
+% compile with or without the colorlinks option
+\usepackage{xcolor}
+\usepackage[colorlinks]{hyperref}
+\usepackage{aeb_mlink}
+
+\definePath{\urlAcroTeXBlog}{http://www.acrotex.net/blog}
+\definecolor{webgreen}{rgb}{0,.6,0}
+
+\parindent0pt \parskip3pt
+
+\begin{document}
+
+In this demo file we test the \verb~\mlurl~ command.
+
+OK, let's see if we still wrap around the line
+\mlurl{http://www.math.uakron.edu/~dpstory}. Now let's try another link, the following URL
+\mlurl[\S{U}\W{1}\Color{0 .6 0}\linktxtcolor{webgreen}]{http://www.acrotex.net}, does it wrap? Yes,
+but did the change in color also change the color of the next link: \setLink[\A{\JS{app.alert("Splendid, you clicked a link, a link to nowhere. The color of the link is as it should be.")}}\Color{1 0 0}]{Go There!}
+
+Let's try a footnote.\footnote{OK, lets see if we still wrap around the line, does it work?
+\mlurl{http://www.math.uakron.edu/~dpstory}.}
+
+Here, we reference a \textsf{AeB Pro} articles \mlurl{\urlAcroTeXBlog/?tag=aeb-pro}.
+
+If the URL contains spaces, uses URL encoding, see \mlurl{http://www.w3schools.com/tags/ref_urlencode.asp}, for example.
+In the next example, we use \verb~\%20~ for space, the normal \texttt{\%20} is a problem because \texttt{\%}
+is still the {\LaTeX} comment character.
+
+Try a PDF with search: \mlurl{http://www.math.uakron.edu/~dpstory/acrotex/aeb_man.pdf#page=8%
+&search=AcroTeX\%20web\%20exerquiz}.
+
+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/macros/latex/contrib/aeb_mlink/examples/np_test.txt b/macros/latex/contrib/aeb_mlink/examples/np_test.txt
new file mode 100644
index 0000000000..d9ea39964e
--- /dev/null
+++ b/macros/latex/contrib/aeb_mlink/examples/np_test.txt
@@ -0,0 +1 @@
+This is a test document for notepad to open.
diff --git a/macros/latex/contrib/aeb_mlink/examples/shameless_ad.pdf b/macros/latex/contrib/aeb_mlink/examples/shameless_ad.pdf
new file mode 100644
index 0000000000..69a0444099
--- /dev/null
+++ b/macros/latex/contrib/aeb_mlink/examples/shameless_ad.pdf
Binary files differ