summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-08-03 12:19:52 +0900
committerNorbert Preining <norbert@preining.info>2020-08-03 12:19:52 +0900
commit6702092fd01de6e5cb8bf4eddb1a76cb00669c8d (patch)
tree363aca7dc84e5815320b98e58a904cf18d03c6da
parent6d01229a1f06834661f6e820e861a4be03a7f860 (diff)
artthreads update
-rw-r--r--ctan2tds-config.pl1
-rw-r--r--texmf-dist/doc/latex/artthreads/README.md14
-rw-r--r--texmf-dist/doc/latex/artthreads/article_tst.tex78
-rw-r--r--texmf-dist/doc/latex/artthreads/artthreads.pdfbin0 -> 1725574 bytes
-rw-r--r--texmf-dist/doc/latex/artthreads/artthreads_man.pdfbin141045 -> 315175 bytes
-rw-r--r--texmf-dist/doc/latex/artthreads/artthreads_man.tex393
-rw-r--r--texmf-dist/doc/latex/artthreads/examples/article_tech.pdfbin0 -> 95016 bytes
-rw-r--r--texmf-dist/doc/latex/artthreads/examples/article_tech.tex (renamed from texmf-dist/doc/latex/artthreads/article_tech.tex)56
-rw-r--r--texmf-dist/doc/latex/artthreads/examples/article_tst.tex62
-rw-r--r--texmf-dist/source/latex/artthreads/artthreads.dtx513
-rw-r--r--texmf-dist/tex/latex/artthreads/artthreads.sty446
11 files changed, 994 insertions, 569 deletions
diff --git a/ctan2tds-config.pl b/ctan2tds-config.pl
index 433ef0a5..d30d2af9 100644
--- a/ctan2tds-config.pl
+++ b/ctan2tds-config.pl
@@ -36,6 +36,7 @@ $special{'thorshammer'} = '&MAKEdps';
$special{'richtext'} = '&MAKEdps';
$special{'thorshammer'} = '&MAKEdps';
$special{'fitr'} = '&MAKEdps';
+$special{'artthreads'} = '&MAKEdps';
sub MAKEdps {
diff --git a/texmf-dist/doc/latex/artthreads/README.md b/texmf-dist/doc/latex/artthreads/README.md
index d3cb0470..1d8f1249 100644
--- a/texmf-dist/doc/latex/artthreads/README.md
+++ b/texmf-dist/doc/latex/artthreads/README.md
@@ -1,21 +1,23 @@
The artthreads Package
Author: D. P. Story
-Version: v1.1
-Dated: 2016/04/09
+Version: v1.3.1
+Dated: 2020-07-09
Through the commands of the artthreads package, create PDF article threads,
a concept/feature of Adobe Reader/Acrobat that has been around since the
product's beginning. The use of article threads typically only makes sense in
-a document in which the text is in a multi-column format.
+a document in which the text is in a multi-column format or in narrow columns.
Set the article threads after the composition of the document is completed.
The method of setting the threads is very visual not automatic as in the
threadcol package of Scott Patkin (available for pdftex only).
-The artthreads package supports all drivers: dvips, pdflatex (which includes
-lualatex), dvipdfm, dvipdfmx, and xelatex.
+The artthreads package supports all drivers: dvips, pdflatex,
+lualatex, xelatex, dvipdfm, and dvipdfmx.
-Unpack the distribution by latexing artthreads.ins.
+What's New v1.3.1 (2020-07-09) Fixed some issues with lualatex.
+Additonal built-in push buttons and link actions to direct the
+reader to a particular thread.
Enjoy.
diff --git a/texmf-dist/doc/latex/artthreads/article_tst.tex b/texmf-dist/doc/latex/artthreads/article_tst.tex
deleted file mode 100644
index 6333cf24..00000000
--- a/texmf-dist/doc/latex/artthreads/article_tst.tex
+++ /dev/null
@@ -1,78 +0,0 @@
-\documentclass{article}
-\usepackage[dvipsone,!viewMagWin,!preview]{artthreads}
-\usepackage{multicol,lipsum}
-\hypersetup{colorlinks}
-
-% A selection of pushbutton actions for articles
-\def\toggleArticlePane{\pushButton[
- \CA{Article}\A{\Named{ShowHideArticles}}]{TAPBtn}{}{11bp}}
-\def\toggleArticlePaneRead{\pushButton[
- \CA{Article}\A{\Named{ShowHideArticles}
- \Next{/S/Thread/D(\threadTitle)}}]{TAPRBtn}{}{11bp}}
-\def\showArticlePane{\pushButton[
- \CA{Article}\A{\Named{ArticleThreads}}]{SAPBtn}{}{11bp}}
-\def\showArticlePaneRead{\pushButton[
- \CA{Article}\A{\Named{ArticleThreads}
- \Next{/S/Thread /D(\threadTitle)}}]{SAPRBtn}{}{11bp}}
-% Links may be used as well, here is only one such, this link below is hard-wired
-% modify as needed.
-%\setLink[\A{/S/Thread/D(Lipsum)}]{Read Article}
-
-\setAddToBorder{addtow=10bp,addtoh=10bp}
-
-\begin{document}
-
-\noindent
-The two article threads: \setLink[\A{/S/Thread/D(Lipsum)}]{Read Lipsum}
-and \setLink[\A{/S/Thread/D(more Lipsum)}]{Read more Lipsum}.
-
-
-\setThreadInfo{title=Lipsum,author=D. P. Story,subject=Article thread test,keywords={AeB, PDF, LaTeX}}%
-
-\raggedcolumns
-\begin{multicols}{2}
-\noindent\makebox[0pt][r]{\showArticlePaneRead\kern11bp}%
-\bArticle{lift=\baselineskip,width=\linewidth,height=\textheight}%
-This is a series of paragraphs to fill the multi-columns of this document. It is imperative
-that we have a lot of text to fill these columns, but I fear that I don't know what to write.
-
-Well, here goes. \lipsum[2]
-
-That went well, more? \lipsum[4]
-
-Ok, I have the hang of it now. \lipsum[6]
-
-\noindent\cArticle{lift=9\baselineskip,width=\linewidth,height=\textheight}\indent
-Continuing now with \lipsum[8]
-
-I'm on a roll, \lipsum[10]
-
-\end{multicols}
-
-\newpage
-
-\noindent
-Same `article' but broken down into smaller pieces as an exercise.
-
-\setThreadInfo{title=more Lipsum,author=D. P. Story,subject=Article thread test,keywords={AeB, PDF, LaTeX}}%
-\begin{multicols}{2}\previewtrue % locally turn on preview
-\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=3in+3\baselineskip}%
-This is a series of paragraphs to fill the multi-columns of this document. It is imperative
-that we have a lot of text to fill these columns, but I fear that I don't know what to write.
-
-Well, here goes. \lipsum[2]
-
-\noindent\cArticle{lift=\baselineskip,width=\linewidth,height=4in-2\baselineskip}\indent
-That went well, more? \lipsum[4]
-
-Ok, I have the hang of it now. \lipsum[6]
-
-\noindent\cArticle{lift=9\baselineskip,width=\linewidth,height=4in+2\baselineskip}\indent
-Continuing now with \lipsum[8]
-
-\noindent\cArticle{lift=\baselineskip,width=\linewidth,height=3in-\baselineskip}\indent
-I'm on a roll, \lipsum[10]
-
-\end{multicols}
-
-\end{document}
diff --git a/texmf-dist/doc/latex/artthreads/artthreads.pdf b/texmf-dist/doc/latex/artthreads/artthreads.pdf
new file mode 100644
index 00000000..23158680
--- /dev/null
+++ b/texmf-dist/doc/latex/artthreads/artthreads.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/artthreads/artthreads_man.pdf b/texmf-dist/doc/latex/artthreads/artthreads_man.pdf
index 5420d548..3d5dbdea 100644
--- a/texmf-dist/doc/latex/artthreads/artthreads_man.pdf
+++ b/texmf-dist/doc/latex/artthreads/artthreads_man.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/artthreads/artthreads_man.tex b/texmf-dist/doc/latex/artthreads/artthreads_man.tex
index 93967ebf..a8d7ff65 100644
--- a/texmf-dist/doc/latex/artthreads/artthreads_man.tex
+++ b/texmf-dist/doc/latex/artthreads/artthreads_man.tex
@@ -10,10 +10,12 @@
%\usepackage{calibri}
\usepackage[altbullet]{lucidbry}
-\usepackage[dvipsone,!viewMagWin,!preview]{artthreads}
+\usepackage[!viewMagWin,!preview]{artthreads}
\usepackage{lipsum,multicol}
\raggedcolumns
+%\previewOn\pmpvOn
+
\makeatletter
\renewenvironment{quote}[1][]
{\def\@rgi{#1}\ifx\@rgi\@empty
@@ -27,15 +29,16 @@
%\usepackage{makeidx}
%\makeindex
\usepackage{acroman}
+\usepackage[active]{srcltx}
+\newcommand{\FmtMP}[2][0pt]{\mbox{}\marginpar{\raisebox{#1}{\parbox{\marginparwidth}{\slshape\raggedleft\small#2}}}}
+\addtolength{\marginparwidth}{1in}
-\usepackage[active]{srcltx}
+\let\uif\textsf
-\urlstyle{tt}
+\leftmargini\amtIndent\relax
-%\def\tutpath{doc/tutorial}
-%\def\tutpathi{tutorial}
-%\def\expath{../examples}
+\urlstyle{tt}
\DeclareDocInfo
{
@@ -46,7 +49,7 @@
email={dpstory@acrotex.net},
subject=Documentation for artthreads package,
talksite={\url{www.acrotex.net}},
- version={1.0},
+ version={1.3.1, 2020/07/09},
Keywords={LaTeX, article threads, multi-column documents, AcroTeX},
copyrightStatus=True,
copyrightNotice={Copyright (C) \the\year, D. P. Story},
@@ -63,31 +66,101 @@
\subsubDefaultDing{\texorpdfstring{$\bullet$}{\textrm\textbullet}}
\optionalPageMatter{%
+\setThreadInfo{title=Stop!,author=D. P. Story,
+ subject=Some early advice,keywords={AeB, PDF, LaTeX}}%
\begin{center}
-\fcolorbox{blue}{webyellow}{
+\fcolorbox{blue}{webyellow}{%\previewOn
\begin{minipage}{.67\linewidth}%
-\textbf{\textcolor{red}{Stop!}} Before you read this documentation, take a moment to change
-your preferences: On your menu system if \app{Adobe Acrobat/Reader}, select \textsf{Edit\,>\,\penalty0Preferences\,>\,\penalty0General}, and \emph{clear
+\bArticle{lift=\baselineskip-1pt,shift=-\fboxsep-\fboxrule,width=\linewidth+2\fboxsep+2\fboxrule,height=13\baselineskip+\fboxsep+6pt}%
+\textbf{\textcolor{red}{Stop!}} Before you read this documentation, take a
+moment to change your preferences: On your menu system of \app{Adobe
+Acrobat/Reader}, select
+\textsf{Edit\,>\,\penalty0Preferences\,>\,\penalty0General}, and \emph{clear
the checkbox} for the item named \textsf{Make Hand tool select text \&
images}, as listed under \textsf{Basic Tools} on that dialog box.
-(\textsf{Ctrl+K} or \textsf{Command+K} is the shortcut to the Preferences
-dialog box on \app{Windows} and \app{Mac OS}, respectively.) This makes reading an article thread
-much easier. Look for the hand icon with a down arrow on it.\hfill\dps
+(\textsf{Ctrl+K} or \textsf{Command+K} is the shortcut to the \textsf{Preferences}
+dialog box on \app{Windows} or \app{Mac OS}, respectively.) This makes
+reading an article thread much easier. Look for the hand icon with a down
+arrow on it.\medskip
+
+Article threads are an \app{Adobe Reader}/\app{Acrobat} feature. To my knowledge, they
+have not been implemented in any other PDF viewer. So, a PDF containing article threads
+must be viewed in \app{Adobe Reader} or \app{Acrobat}\hfill\dps
\end{minipage}}
\end{center}
}
-
+\def\bART{\placeImage{Art-Start}{10bp}{10bp}}
+\def\cART{\placeImage{Art-Down}{10bp}{10bp}}
+\def\rART{\placeImage{Art-Up}{10bp}{10bp}}
+\def\eART{\placeImage{Art-End}{10bp}{10bp}}
+\def\bARTDC{\placeImage{Art-StartDC}{10bp}{10bp}}
+\def\cARTDC{\placeImage{Art-DownDC}{10bp}{10bp}}
+\def\rARTDC{\placeImage{Art-UpDC}{10bp}{10bp}}
+\def\eARTDC{\placeImage{Art-EndDC}{10bp}{10bp}}
+
+
+\declareMultiImages
+{%
+ {path=article_icons.pdf,page=0,placement={Art-Start}}
+ {path=article_icons.pdf,page=1,placement={Art-Down}}
+ {path=article_icons.pdf,page=2,placement={Art-Up}}
+ {path=article_icons.pdf,page=3,placement={Art-End}}
+% New DC icons
+ {path=article_icons.pdf,page=4,placement={Art-StartDC}}
+ {path=article_icons.pdf,page=5,placement={Art-DownDC}}
+ {path=article_icons.pdf,page=6,placement={Art-UpDC}}
+ {path=article_icons.pdf,page=7,placement={Art-EndDC}}
+}
+%\begin{docassembly}
+%\insertPreDocAssembly
+%\addWatermarkFromFile({
+% bOnTop:false,
+% cDIPath:"C:/Users/Public/Documents/ManualBGs/Manual_BG_Print_AeB.pdf"
+%});
+%\executeSave();
+%\end{docassembly}
+
+\chngDocObjectTo{\newDO}{doc}
\begin{docassembly}
+\insertPreDocAssembly
+var titleOfManual="The artthreads Package";
+var manualfilename="Manual_BG_Print_artthreads.pdf";
+var manualtemplate="Manual_BG_Brown.pdf"; // Blue, Green, Brown
+var _pathToBlank="C:/Users/Public/Documents/ManualBGs/"+manualtemplate;
+var doc;
+var buildIt=false;
+if ( buildIt ) {
+ console.println("Creating new " + manualfilename + " file.");
+ doc = \appopenDoc({cPath: _pathToBlank, bHidden: true});
+ var _path=this.path;
+ var pos=_path.lastIndexOf("/");
+ _path=_path.substring(0,pos)+"/"+manualfilename;
+ \docSaveAs\newDO ({ cPath: _path });
+ doc.closeDoc();
+ doc = \appopenDoc({cPath: manualfilename, oDoc:this, bHidden: true});
+ f=doc.getField("ManualTitle");
+ f.value=titleOfManual;
+ doc.flattenPages();
+ \docSaveAs\newDO({ cPath: manualfilename });
+ doc.closeDoc();
+} else {
+ console.println("Using the current "+manualfilename+" file.");
+}
+var _path=this.path;
+var pos=_path.lastIndexOf("/");
+_path=_path.substring(0,pos)+"/"+manualfilename;
\addWatermarkFromFile({
bOnTop:false,
- cDIPath:"C:/Users/Public/Documents/ManualBGs/Manual_BG_Print_AeB.pdf"
+ bOnPrint:false,
+ cDIPath:_path
});
\executeSave();
\end{docassembly}
\begin{document}
+
\maketitle
\selectColors{linkColor=black}
@@ -96,9 +169,9 @@ much easier. Look for the hand icon with a down arrow on it.\hfill\dps
\setAddToBorder{addtow=5bp,addtoh=0bp}
-\newcommand\showArtPanel[1][Article]{\pushButton[
- \CA{#1}\A{\Named{ArticleThreads}
- \Next{/S/Thread /D(\threadTitle)}}]{Btn}{}{11bp}}
+%\newcommand\showArtPanel[1][Article]{\pushButton[
+% \CA{#1}\A{\Named{ArticleThreads}
+% \Next{/S/Thread /D(\threadTitle)}}]{Btn}{}{11bp}}
\section{Introduction}
@@ -107,8 +180,12 @@ much easier. Look for the hand icon with a down arrow on it.\hfill\dps
subject=Introduction to article threads,keywords={AeB, PDF, LaTeX}}%
+%\makebox[0pt][r]{\showArtPanel[Intro]\relax\kern11bp}%
+%\showArticlePaneRead
+%\showArticlePaneRead[\CA{Intro}]{}{11bp}
+
\begin{multicols}{2}
-\noindent\makebox[0pt][r]{\showArtPanel[Intro]\relax\kern11bp}%
+\noindent\makebox[0pt][r]{\pushButton[\CA{Intro}\A{\Thread{Introduction}}]{BtnIntro}{}{11bp}\kern11bp}%
\bArticle{lift=\baselineskip,width=\linewidth,height=2.5in}%
\noindent Through the commands of the \pkg{artthreads} package, you can
create \textit{article threads}, a concept/feature of \app{Adobe
@@ -118,14 +195,14 @@ is in a multi-column format, or, perhaps, a single narrow column.
When a document uses a multiple column format, it is often difficult, or at
the very least inconvenient, to read it. When document page is fit into the viewing
-window, the text may be two small to read. This requires the reader, that's
+window, the text may be too small to read. This requires the reader, that's
you, to adjust the magnification (zoom) level of the page to fit a column of
text comfortably in the application window.\vadjust{\noindent
\cArticle{lift=2\baselineskip,width=\linewidth,height=2.5in}}
Once the column is fitted, additional navigation is needed to move the window
view down one column, then up to the top of the next column. Think of trying
to read a digital newspaper with many columns. Such navigation is tedious and
-distracts from reading the information begin presented.
+distracts from reading the information being presented.
Set the article threads after the composition of the document is completed.
The method of setting the threads is \emph{very visual} not automatic as in
@@ -138,13 +215,16 @@ the \pkg{threadcol} package of Scott Patkin.
\setThreadInfo{title=Navigation,author=D. P. Story,
subject=Navigation to article threads,keywords={AeB, PDF, LaTeX}}%
+%\makebox[0pt][r]{\showArtPanel[Navigate]\kern11bp}%
+%\showArticlePaneRead[\CA{Navigate}]{}{11bp}
+
\begin{multicols}{2}
-\noindent\makebox[0pt][r]{\showArtPanel[Navigate]\kern11bp}%
+\noindent\makebox[0pt][r]{\pushButton[\CA{Navigate}\A{\Thread{Navigation}}]{BtnNavi}{}{11bp}\kern11bp}%
\bArticle{lift=\baselineskip,width=\linewidth,height=4.2in}%
-\noindent Perhaps you noticed the `Intro' button on exhibit in this previous
-section or the `Navigate' button in this section as well. Clicking these
-buttons reveals the \textsf{Article} panel in the left-hand navigation pane.
-Listed there are all the articles created for this documentation.
+\noindent Perhaps you've noticed the `Intro' button on exhibit in this
+previous section or the `Navigate' button in this section as well. Clicking
+these buttons reveals the \mlsetLink[\linktxtcolor{red}\A{\shArticlesPaneActn}]{\kern0pt\sffamily Articles \normalfont panel} in the left-hand navigation
+pane. Listed there are all the articles created for this documentation.
Right-clicking on any of the listed article names brings up a context menu;
select \textsf{Read Article} to begin reading or choose \textsf{Properties}
to see the thread info, which (may) include the title, author, subject, and
@@ -155,17 +235,18 @@ reading a thread: (1)~first open the \textsf{Article} pane
(\textsf{View\,\penalty0>\penalty0\,\penalty0Show/Hide\,\penalty0>\,\penalty0Navigation
Panes\,>\,Articles}), left-click an article title and select \textsf{Read
Article}, or simple double-click an article title; or (2) place your mouse
-pointer over text, if it changes to a hand with an arrow on it, the text is
+pointer over text, if it changes to a hand with an arrow on it (\bART), the text is
part of an article thread, simply click on it to begin.
\paragraph*{Navigating a thread.} Once you have initiated \textsf{Read
Article}, you can navigate through the article thread using any of the
following methods\vadjust{\noindent
\cArticle{lift=2\baselineskip,width=\linewidth,height=4.2in}}: (1)~click in
-an area when the mouse is a hand icon with an arrow on it to move forward
-(shift-click to move back); (2) press the \textsf{Enter} key to move forward
+an area when the mouse is a hand icon with an arrow on it (\cART) to move forward
+(shift-click to move back (\rART)); (2) press the \textsf{Enter} key to move forward
(or shift+\textsf{Enter} to move back); or (3) the page down (or page up)
-keys will also move you around within the thread.
+keys will also move you around within the thread. At the end of the thread, you'll
+see this hand icon \eART.
There may be problems in getting the hand icon with the arrow on it to
appear, if this is the case, open the \textsf{Preferences} menu,
@@ -180,6 +261,10 @@ article threads and see how they work, the next thing to do is to see how
they are created with the \pkg{artthreads} package.
\end{multicols}
+It should be noted that in recent versions of \app{DC}, the thread icons are
+changed from \bART, \cART, \rART, and {\eART} to \bARTDC, \cARTDC,
+\rARTDC, and \eARTDC, respectively.
+
\section{Creating article threads}
We begin by including the \pkg{artthreads} package in your document.
@@ -188,7 +273,7 @@ We begin by including the \pkg{artthreads} package in your document.
\end{Verbatim}
The \pkg{artthreads} package brings in the \pkg{fitr} package
(\url{http://ctan.org/pkg/fitr}), many commands from that package are used.
-In fact, the same set of package options are used.
+All options of \pkg{artthreads} are passed to \pkg{fitr}.
\setThreadInfo{title=Package options,author=D. P. Story,
subject=options of the artthreads package,keywords={AeB, PDF, LaTeX}}%
@@ -197,21 +282,22 @@ In fact, the same set of package options are used.
\paragraph*{Package options.}
The package has ten options: six driver options and four viewing
options.
-\begin{multicols}{2}\previewtrue\viewMagWintrue
+\begin{multicols}{2}\previewOn\viewMagWinOn
\setAddToBorder{addtow=10bp,addtoh=10bp}
\begin{itemize}
\item \bArticle{lift=\baselineskip,width=\linewidth,height=2.5in}%
- \textbf{Driver Options:} These are \texttt{dvips} (the default),
- \texttt{dvipsone}, and \texttt{pdftex} (which includes the use of
- \textsf{lualatex}), \texttt{dvipdfm}, \texttt{dvipdfmx}, and
- \texttt{xetex}. If you specify one of the first two, it is assumed that
- you are using \textsf{Adobe Distiller} as your PDF creator.
-
- The \textsf{fitr} package checks whether the \textsf{web} package is
- loaded, if so, its uses the driver used by \textsf{web}; otherwise
- \textsf{fitr} auto-detects for \textsf{pdftex} and \textsf{xetex}. If
- no driver is passed, and neither \textsf{pdftex} nor \textsf{xetex} are
- detected, then \textsf{dvips} is the default driver.
+ \textbf{Driver Options:} The major driver options are \opt{dvips} (the
+ default), \opt{pdftex}, \opt{luatex}, and \opt{xetex}; there are two
+ minor driver options, these are \opt{dvipdfm} and \opt{dvipdfmx}. If
+ you specify \opt{dvips}, it is assumed the PDF creator is \app{Adobe
+ Distiller}.\footnote{You can use \app{dvips\,->\,ps2pdf} if there
+ are no document JavaScripts.}
+
+ The \pkg{artthreads} package uses the driver of the \pkg{web} package,
+ if it is loaded; otherwise \pkg{artthreads} auto-detects for
+ \app{pdflatex}, \app{lualatex} and \app{xelatex}. If no driver is
+ passed and no driver is automatically detected, the \app{dvips} driver
+ is used.
\setAddToBorder{addtow=0bp,addtoh=0bp}
@@ -221,7 +307,7 @@ options.
dvi-previewer (or the PDF document); you can turn off this preview
by specifying \texttt{!preview} (or removing \texttt{preview}
entirely from the option list). The other option type is
- \texttt{viewMagWin}, when this option the viewing window, a
+ \texttt{viewMagWin}. When this option is specified, the viewing window, a
rectangular region, becomes visible in the dvi-previewer (or in the
PDF document); specifying \texttt{!viewMagWin} turns off this type
of preview.
@@ -229,21 +315,21 @@ options.
%\item[] The effects of the viewing options will be illustrated later in this
%document, see \autoref{previewEx} on page~\pageref*{previewEx}.
\end{itemize}
-\end{multicols}
+\end{multicols}\noindent
You'll notice the two rectangular regions around the left column. The inner
one is made visible by the \texttt{preview} option (or locally by
-\cs{previewtrue}), you can see that it covers `precisely' the text of the
+\cs{previewOn}), you can see that it covers `precisely' the text of the
item. The outer rectangle is exposed by the \texttt{viewMagWin} option (or
-locally by \cs{viewMagWintrue}). When you view the thread -- and you do not
+locally by \cs{viewMagWinOn}). When you view the thread -- and you do not
define an `extra' border around the viewing area -- the inner rectangle is
-use. The text in this inner rectangle may not be entirely adequate for
+used. The text in this inner rectangle may not be entirely adequate for
reading as it is very `tight' around the text. It is for this reason, we
expand the viewing area by a specified amount. Compare the reading comfort of
-the left column verses the right column. (Try viewing the column thread with
+the left column versus the right column. (Try viewing the column thread with
a narrow application window.)
-You may have also that the viewer returns to the same page view the page was
-in prior to reading the thread.
+You may have noticed that the viewer returns to the same page view the page
+was in prior to reading the thread.
\paragraph*{The article info.} The specifications for an article thread require
it to have a title, and to optionally have key-values for author, subject, and keywords.
@@ -256,9 +342,9 @@ it to have a title, and to optionally have key-values for author, subject, and k
a generated value of \texttt{thread-\ameta{num}}. The \cs{setThreadInfo}
command must appear prior to the opening the thread (see \cs{bArticle} below)
to which it applies, if it does not, a {\LaTeX} error occurs. The drivers
-\opt{dvips}, \opt{dvipsone}, \opt{xetex} (\opt{dvipdfm}, \opt{dvipdfmx})
-support all four keys; however, \opt{pdftex} only supports the \texttt{title}
-key.
+\opt{dvips} and \opt{xetex} (\opt{dvipdfm}, \opt{dvipdfmx}) support all four
+keys; however, \opt{pdftex} and \opt{lualatex} only supports the
+\texttt{title} key.
\paragraph*{The article thread commands.} There is one command
(\cs{bArticle}) for beginning an article thread, and another (\cs{cArticle})
@@ -274,8 +360,7 @@ to continue that thread.
\item \texttt{width=\ameta{length}}: The value of \opt{width} sets the
width of the thread to \ameta{length}; \ameta{length} is usually, but
not always, \cs{linewidth}. Dimension arithmetic is supported with the
- value of \opt{width} (\texttt{width=\cs{linewidth}\,+\,3pt}, for
- example).
+ value of \opt{width}; for example, \texttt{width=\cs{linewidth}\,+\,3pt}.
\item \texttt{height=\ameta{length}}: The value of \opt{height} sets the
height of the thread to \ameta{length}. As with the \opt{width} key,
@@ -308,16 +393,16 @@ sides of the rectangular boundary of the thread; \opt{addtoh} adds
\ameta{length} to the top and bottom of the rectangular boundary of the
thread. The default dimensions for these two keys are \texttt{0pt}.
\begin{multicols}{2}\setThreadInfo{title=Illustrate \string\\setAddToBorder}%
-\noindent\setAddToBorder{addtow=10bp,addtoh=10bp}\previewtrue\viewMagWintrue
+\noindent\setAddToBorder{addtow=10bp,addtoh=10bp}\previewOn\viewMagWinOn
{\small\verb|\setAddToBorder{addtow=10bp,|\\
-\null\qquad\verb|addtoh=10bp}|}\\\vadjust{\noindent\bArticle{lift=3\baselineskip,width=\linewidth,height=6\baselineskip}}
+\null\quad\verb|addtoh=10bp}|}\\\vadjust{\noindent\bArticle{lift=3\baselineskip,width=\linewidth,height=6\baselineskip}}%
In this column we've set a \texttt{10bp} border around the thread. When you click
on the reading area, the viewer should zoom to the width of the wider rectangle.
\vfill
\columnbreak
-\noindent\setAddToBorder{addtow=4bp,addtoh=4bp}\previewtrue\viewMagWintrue
+\noindent\setAddToBorder{addtow=4bp,addtoh=4bp}\previewOn\viewMagWinOn
{\small\verb|\setAddToBorder{addtow=4bp,|\\
-\null\qquad\verb|addtoh=4bp}|}\\\vadjust{\noindent\cArticle{lift=3\baselineskip,width=\linewidth,height=6\baselineskip}}
+\null\quad\verb|addtoh=4bp}|}\\\vadjust{\noindent\cArticle{lift=3\baselineskip,width=\linewidth,height=6\baselineskip}}%
In this column, we've set a \texttt{4bp} border. Again, when you click on the
reading area, the viewer should zoom to the width of the wider rectangle.
\end{multicols}
@@ -329,56 +414,74 @@ Postscript or PDF dimensions, depending on the driver.
documentation, a description of the methodology, accompanied by examples. As
pointed out early in this documentation, the method for applying the article
threads is very visual. Compose your document content first, and then insert the
-document threads. Page~\arabic{page}
-\begin{center}\previewtrue\viewMagWintrue
+document threads.
+\begin{center}\previewOn\viewMagWinOn
\begin{minipage}{.8\linewidth}\parindent=20pt\relax
-We illustrate the techniques in a single column of goodly width.
+We illustrate the techniques in a single column with a generous width.
First we declare our add to border dimension and article info
-\begin{Verbatim}[fontsize=\small]
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
\setAddToBorder{addtow=4bp,addtoh=4bp}
\setThreadInfo{title=Methodology,author=D. P. Story}
\end{Verbatim}
There are two places to begin a thread: (1) at the very beginning of a paragraph;
and (2) from within a paragraph. Method~(1) is preferred. We begin the next paragraph
with
-\begin{Verbatim}[fontsize=\small]
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
\noindent\bArticle{lift=\baselineskip,
width=\linewidth,height=1in+3\baselineskip}%
Now we begin our deep thoughts...
\end{Verbatim}
+\end{minipage}
+\end{center}
\setAddToBorder{addtow=4bp,addtoh=4bp}
\setThreadInfo{title=Methodology,author=D. P. Story}
-\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=1in+3\baselineskip}%
+
+\def\pi{\noindent\makebox[0pt][r]{\ding{182}\hskip\marginparsep}}
+\def\pii{\noindent\makebox[0pt][r]{\ding{183}\hskip\marginparsep}}
+\def\piii{\noindent\makebox[0pt][r]{\ding{184}\hskip\marginparsep}}
+
+\begin{center}\previewOn\viewMagWinOn
+\begin{minipage}{.8\linewidth}\parindent=\amtIndent\relax
+\newtopic\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=1in+3\baselineskip}%
+\pi\indent
Now we begin our deep thoughts. During this development phase, the options
\opt{preview} and \opt{viewMagWin} should be in effect. In a \EXT{DVI}
-viewer, we can see the bounding rectangles. We can see its too low, too long
+viewer, we can see the bounding rectangles. We can see it is too low, too long
and so on. For users of \app{pdflatex}, \app{xelatex}, etc., view your
documents in the \EXT{DVI} previewer first (or view them as a \EXT{PDF}).
I've used \texttt{lift=\string\baselineskip} to raise up the thread rectangle
by that mount to enclose the first line. The value of \opt{width} is usually
\cs{linewidth}, but the value of \opt{height} may have to be adjusted, in this
example, I've ``tweaked'' the \texttt{1in} by \texttt{3\string\baselineskip}.
+\end{minipage}
+\end{center}
-\newtopic Naturally, after you're satisfied, you then remove
+\begin{center}\previewOn\viewMagWinOn
+\begin{minipage}{.8\linewidth}\parindent=\amtIndent\relax
+\newtopic\pii Naturally, after you're satisfied, you then remove
\opt{preview} and \opt{viewMagWin} or change them to
\opt{!preview} and \opt{!viewMagWin}. Another possible location is from within
a paragraph, here, we continue the previous thread using the \cs{cArticle} command
in conjunction with the \cs{vadjust} {\TeX} primitive\vadjust{\noindent
\cArticle{lift=5\baselineskip,width=\linewidth,height=2in+\baselineskip}}.
-Between the end of the word `primitive' and the period (.) ending the sentence, I've place
+Between the end of the word `primitive' and the period (.) ending the sentence, I've placed,
\begin{Verbatim}[fontsize=\small]
primitive\vadjust{\noindent\cArticle{lift=5\baselineskip,
width=\linewidth,height=2in+\baselineskip}}. Between the
\end{Verbatim}
-The value of \texttt{lift=5\string\baselineskip} we chosen because the
+We chose \texttt{lift=5\string\baselineskip} because the
original positioning of the thread rectangle was too low by about five lines.
The value of \texttt{height} was chosen to cover the paragraph once the
complete paragraph was composed.
+\end{minipage}
+\end{center}
-\previewfalse\viewMagWinfalse
-We now declare \verb|\previewfalse\viewMagWinfalse|.
+\previewOff\viewMagWinOff
+\begin{center}
+\begin{minipage}{.8\linewidth}\parindent=20pt\relax
+We now declare \verb|\previewOff\viewMagWinOff|.
-\noindent\cArticle{lift=\baselineskip,width=\linewidth,height=.5in+3\baselineskip}\indent
+\noindent\piii\cArticle{lift=\baselineskip,width=\linewidth,height=.5in+3\baselineskip}\indent
Of course, in this example, it was entirely unnecessary to insert the
\cs{cArticle} mid-paragraph, it would have been better placed at the
beginning of the paragraph. Placing \cs{cArticle} mid-paragraph is useful for
@@ -391,34 +494,44 @@ By the way, notice the use of \cs{noindent}, this is
oftentimes needed to position the article thread in the left margin of the
text block.
-\paragraph*{The demo file.} The demo file \texttt{article\_tech.tex}
+\paragraph*{Continuing a thread from one page to the next.} To continue
+reading across a page boundary, continue the thread on the previous page
+using \cs{cArticle}. For example, the most recent thread begins with
+paragraph~\ding{182} (\cs{bArticle}) and continues with paragraph~\ding{183}
+and~\ding{184} (\cs{cArticle}). Paragraphs~\ding{182} and~\ding{183} are on
+the previous page, while paragraph~\ding{184} is on this page. As you read
+this thread, paragraph~\ding{182} is presented first, followed by
+paragraph~\ding{183}, and finally, paragraph~\ding{185} on the subsequent
+page.
+
+\paragraph*{The demo files.} The demo file \texttt{article\_tech.tex}
reproduces the discussion on methods, it is found in the \texttt{examples}
folder.
-
\setThreadInfo{title=Final Thread,{author=D. P. Story, Ph.D.}}
\newtopic\noindent In this documentation, I've covered the content with many article threads; normally,
-for multi-column content, one thread per column is sufficient.
-\begin{multicols}{2} %\previewtrue
-\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=6.7in}\indent
+for multi-column content, one thread per column is sufficient. The thread for this article continues
+on to the next page, as this Lipsum text illustrates.
+\begin{multicols}{2} %\previewOn
+\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=4.1in-\baselineskip}\relax
\lipsum[2]
\lipsum[4]
+\noindent\cArticle{lift=4\baselineskip,width=\linewidth,height=4.1in-\baselineskip}\indent
\lipsum[6]
-\noindent\cArticle{lift=3\baselineskip,width=\linewidth,height=6.7in}\indent
\lipsum[7]
+\noindent\cArticle{lift=11\baselineskip,width=\linewidth,height=6.25in+\baselineskip}\indent
\lipsum[10]
\lipsum[12]
-\noindent\cArticle{lift=10\baselineskip,width=\linewidth,height=4in-\baselineskip}\indent
+\noindent\cArticle{lift=2\baselineskip,width=\linewidth,height=6.25in+\baselineskip}\indent
\lipsum[14]
-\noindent\cArticle{lift=8\baselineskip,width=\linewidth,height=4in-\baselineskip}\indent
\lipsum[16]
\end{multicols}
@@ -426,6 +539,124 @@ for multi-column content, one thread per column is sufficient.
\paragraph*{The demo file.} The demo file for this package is \texttt{article\_tst.tex},
available in the \texttt{examples} folder.
+\section{Other navigation commands}
+
+There are several commands for creating links or push button actions that
+open the \uif{Articles} pane and/or begin reading a specified article.
+
+\paragraph*{Manipulating the \uif{Articles} pane.} The following two commands represent
+actions that toggle the \uif{Articles} pane (\cs{shArticlesPaneActn}) or just open/show the \uif{Articles} pane (\cs{sArticlesPaneActn}).
+\bVerb\takeMeasure{\string\shArticlesPaneReadActn}%
+\setlength{\dimen0}{\bxSize}%
+\def\1{\rlap{\hskip\dimen0\relax\sffamily(Toggle Articles pane action)}}
+\def\2{\rlap{\hskip\dimen0\relax\sffamily(Show Articles pane action)}}
+\def\3{\rlap{\hskip\dimen0\relax\sffamily(Toggle Articles pane and read article action)}}
+\def\4{\rlap{\hskip\dimen0\relax\sffamily(Show Articles pane and read article action)}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
+!1\shArticlesPaneActn
+!2\sArticlesPaneActn
+!3\shArticlesPaneReadActn
+!4\sArticlesPaneReadActn
+\end{dCmd}
+\eVerb For example,
+\begin{quote}
+ \setLink[\A{\shArticlesPaneActn}]{Toggle \uif{Articles} pane}\\
+ \verb!\setLink[\A{\shArticlesPaneActn}]{Toggle \textsf{Articles} pane}!\\[3pt]
+ \setLink[\A{\sArticlesPaneActn}]{Show \uif{Articles} pane}\\
+ \verb!\setLink[\A{\sArticlesPaneActn}]{Show \textsf{Articles} pane}!
+\end{quote}
+These two actions can be used by push buttons as well.
+
+\paragraph*{Reading a thread.} To create an action to read a thread with a title of \ameta{thread-title},
+use \cs{Thread\darg{\ameta{thread-title}}}. For example,
+\begin{quote}
+ Read about the \setLink[\A{\Thread{Package options}}]{Package options}.\\
+ \verb~\setLink[\A{\Thread{Package options}}]{Package options}.~
+\end{quote}
+Again notice that the viewer returns you to the jumping off point after
+you've finished reading the thread. The \cs{Thread\darg{\ameta{thread-title}}}
+action can be part of a push button action as well.
+
+\paragraph*{Some push buttons.} \pkg{artthreads} has some push buttons with common actions,
+these are,
+\bVerb\takeMeasure{\string\toggleArticlePaneRead[\ameta{KV-pairs}]\darg{\ameta{wd}}\darg{\ameta{ht}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
+\toggleArticlePane[!ameta(KV-pairs)]{!ameta(wd)}{!ameta(ht)}
+\toggleArticlePaneRead[!ameta(KV-pairs)]{!ameta(wd)}{!ameta(ht)}
+\showArticlePane[!ameta(KV-pairs)]{!ameta(wd)}{!ameta(ht)}
+\showArticlePaneRead[!ameta(KV-pairs)]{!ameta(wd)}{!ameta(ht)}
+\end{dCmd}
+\eVerb The names of the commands describe the action they perform. However,
+the commands \cs{toggleArticlePaneRead} and \cs{showArticlePaneRead} require special comment.
+Each begins an article thread, but which article thread?
+\begin{quote}%\previewOn\pmpvOn
+ \showArticlePaneRead{}{11bp}\\[2bp]
+ \verb!\showArticlePaneRead{}{11bp}!
+\end{quote}
+Without any further qualifiers, this button begins reading the thread as
+determined by the value of the \texttt{title} key of the last
+\cs{setThreadInfo} command declared. So, the above push button should begin
+the thread titled ``\threadTitle''. However, to program the button to begin
+reading the thread titled \ameta{thread-title}, use the following syntax:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\showArticlePaneRead[!textbf(\cmd{\readArticle{!ameta(thread-title)}})]{}{11bp}
+\end{Verbatim}
+We illustrate by using \cs{showArticlePaneRead} to read the thread with title
+``Package options,'' and the same action in a link.
+\begin{quote} %\previewOn\pmpvOn
+ \showArticlePaneRead[\cmd{\readArticle{Package options}}]{}{11bp}\\[2bp]
+ \verb~\showArticlePaneRead[\cmd{\readArticle{Package options}}]{}{11bp}~\\[4bp]
+ \setLink[\cmd{\readArticle{Package options}}\A{\sArticlesPaneReadActn}]{Show \textsf{Articles} pane and read the Package options article}\\[2bp]
+ \verb~\setLink[\cmd{\readArticle{Package options}}~\\
+ \null\quad\verb~\A{\sArticlesPaneReadActn}]{Show \textsf{Articles} pane~\\
+ \null\quad\verb~and read the Package options article}~
+\end{quote}
+
+\subparagraph*{Tooltips for push buttons.} The tooltips for the commands
+\cs{toggleArticlePane} and \cs{showArticlePane} are \textsf{Toggle Articles
+Pane} and \textsf{Show Articles Pane}, respectively. These can be localized
+using the \cs{TU} key if \pkg{eforms}; for example,
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars={|()}]
+\showArticlePane[|textbf(\TU{Umschalten der Artikel Schaltfl\"{a}che})]{}{11bp}
+\end{Verbatim}
+which may be German for \textsf{Toggle Articles Pane}.
+
+For the other two, \cs{toggleArticlePaneRead} and \cs{showArticlePaneRead}, two convenience
+commands are defined.
+\bVerb\takeMeasure{\string\tooltipTogglePaneRead\darg{\ameta{text}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
+\tooltipTogglePaneRead{!ameta(text)}
+\tooltipShowPaneRead{!ameta(text)}}
+\end{dCmd}
+\eVerb The values of \ameta{text} allows for the inclusion of the command
+\cs{threadTitle}, which expands to the current title of the thread article.
+The default definitions are,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\tooltipTogglePaneRead{Toggle Articles pane and
+ read the article \threadTitle}
+\tooltipShowPaneRead{Show Articles pane and
+ read the article \threadTitle}
+\end{Verbatim}
+If you roll over the button at the top of the this page, its tooltip will read \textsf{Show Articles pane and
+ read the article Package options}. The two commands may be declare with an appropriate language localization.
+
+\setThreadInfo{%
+ title=J\"{u}rgen's Thread,
+ author={D. P. Story, J\"{u}rgen},
+ subject=Discussion of the PDFDocEncloding Character Set,
+ keywords={AeB, PDF, LaTeX}
+}
+
+%\previewOn
+\noindent\bArticle{lift=-\medskipamount-4pt,width=\linewidth,height=5\baselineskip+6pt}%
+\paragraph*{Beyond Basic ASCII.} Begin by reading \setLink[\cmd{\readArticle{J\"{u}rgen's Thread}}\linktxtcolor{red}\A{\Thread{\threadTitle}}]{J\"{u}rgen's Thread}.
+The examples of this reference and, for the most part in the sample
+files, use Basic ASCII as the thread titles; however, the full PDFDocEncoding
+character set is also supported. The sample file \texttt{article\_tech.tex}
+provides a more complete discussion of this topic, as well as a more
+complicated example. Check out the
+\setLink[\linktxtcolor{red}\A{\sArticlesPaneActn}]{\textsf{Articles}} pane to
+see the title of this thread listed.
\section{My retirement}
diff --git a/texmf-dist/doc/latex/artthreads/examples/article_tech.pdf b/texmf-dist/doc/latex/artthreads/examples/article_tech.pdf
new file mode 100644
index 00000000..efbc0573
--- /dev/null
+++ b/texmf-dist/doc/latex/artthreads/examples/article_tech.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/artthreads/article_tech.tex b/texmf-dist/doc/latex/artthreads/examples/article_tech.tex
index 10505b3c..b9483dd9 100644
--- a/texmf-dist/doc/latex/artthreads/article_tech.tex
+++ b/texmf-dist/doc/latex/artthreads/examples/article_tech.tex
@@ -1,26 +1,15 @@
\documentclass{article}
\usepackage[forcolorpaper]{web}
+% To compiles with latex > dvips > ps2pdf, use the option gonative, which gets
+% passed on to fitr. With gonative, no document JavaScript is created, which
+% is not supported by a non-Acrobat PDF viewer.
\usepackage[!viewMagWin,!preview]{artthreads}
\usepackage{fancyvrb}
\usepackage{multicol}
\useFullWidthForPaper % from web
\providecommand{\cs}[1]{\texttt{\char`\\#1}}
-
-% A selection of pushbutton actions for articles
-\def\toggleArticlePane{\pushButton[
- \CA{Article}\A{\Named{ShowHideArticles}}]{TAPBtn}{}{11bp}}
-\def\toggleArticlePaneRead{\pushButton[
- \CA{Article}\A{\Named{ShowHideArticles}
- \Next{/S/Thread/D(\threadTitle)}}]{TAPRBtn}{}{11bp}}
-\def\showArticlePane{\pushButton[
- \CA{Article}\A{\Named{ArticleThreads}}]{SAPBtn}{}{11bp}}
-\def\showArticlePaneRead{\pushButton[
- \CA{Article}\A{\Named{ArticleThreads}
- \Next{/S/Thread /D(\threadTitle)}}]{SAPRBtn}{}{11bp}}
-% Links may be used as well, here is only one such, this link below is hard-wired
-% modify as needed.
-%\setLink[\A{/S/Thread/D(Methodology)}]{Read Article}
+\let\pkg\textsf
\setAddToBorder{addtow=4bp,addtoh=4bp}
@@ -32,14 +21,14 @@
\noindent
-Below is a description of the \setLink[\linktxtcolor{red}\A{/S/Thread/D(Methodology)}]{methodology}
+Below is a description of the \setLink[\linktxtcolor{red}\A{\Thread{Methodology}}]{methodology}
for developing article threads. You
may compile this document using any of the usual drivers (options
\texttt{dvips}, \texttt{pdftex}, \texttt{xetex}, \texttt{dvipdfm}, \texttt{dvipdfmx}).
Play around with various combinations of \texttt{preview}, \texttt{!preview},
\texttt{viewMagWin}, and \texttt{!viewMagWin}.
-\setThreadInfo{
+\setThreadInfo{%
title=Methodology,
author=D. P. Story,
subject=Article thread test,
@@ -47,14 +36,14 @@ Play around with various combinations of \texttt{preview}, \texttt{!preview},
}
\begin{multicols}{2}
-\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=4in+2\baselineskip}\indent
+\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=4in+2\baselineskip}%
There are two places to begin a thread: (1) at the very beginning of a paragraph;
and (2) from within a paragraph. Method~(1) is preferred. We began this paragraph
with
\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small]
\noindent\bArticle{lift=\baselineskip,
width=\linewidth,
- height=4in+2\baselineskip}\indent
+ height=4in+2\baselineskip}%
There are two places...
\end{Verbatim}
Place article threads after you've finished composing your document. While
@@ -106,4 +95,33 @@ text block.
Adding text to the columns will change the positions of the article threads, for
this reason, the threads need to be inserted after the document is finished.
+
+\setThreadInfo{%
+ title=\textbraceleft J\"{u}rgen's Thread\textbraceright,
+ author={D. P. Story, J\"{u}rgen},
+ subject=Discussion of the PDFDocEncloding Character Set,
+ keywords={AeB, PDF, LaTeX}
+}
+
+% Pass the title through \pdfstringdef, then pass directly as the argument of \Thread
+\pdfstringdef\JT{\textbraceleft J\"{u}rgen's Thread\textbraceright}
+% Here is a link with the thread title pass directly to the \Thread command.
+% \setLink[\linktxtcolor{red}\A{\Thread{\JT}}]{\textbraceleft{J\"{u}rgen's Thread}\textbraceright}
+\begin{center}
+\setLink[\cmd{\readArticle{\textbraceleft J\"{u}rgen's Thread\textbraceright}}\linktxtcolor{red}\A{\Thread{\threadTitle}}]{\textbraceleft{J\"{u}rgen's Thread}\textbraceright}\\[10bp]
+\begin{minipage}{5in}
+\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=12\baselineskip+6pt}%
+The \pkg{artthreads} package does support, through \pkg{hyperref}, the PDFDocEncloding Character Set. This thread offers
+a brief discussion of the topic. The \texttt{title} of this thread is
+\verb~\textbraceleft J\"{u}rgen's Thread\textbraceright~, which is properly understood to be
+``\textbraceleft J\"{u}rgen's Thread\textbraceright'' and appears correctly in the \setLink[\linktxtcolor{red}\A{\sArticlesPaneActn}]{\textsf{Articles}} pane.
+Use standard {\LaTeX} markup for accents, as in \verb~J\"{u}rgen~. Creating a link to such ``special titles''
+requires a little bit of trouble. When using the \cs{Thread} command to create an action to read an article thread,
+rather than passing the thread title directly as an argument, pass \verb~\A{\Thread{\threadTitle}}~ in the optional
+argument of a link, prior to that, insert \verb~\cmd{<thread-title>}}~ in the optional argument. See
+the link created for this article. You can also pass the thread title directly to \cs{Thread} but you must
+pass the title through \cs{pdfstringdef} first, the source of this file for details.
+\end{minipage}
+\end{center}
+
\end{document}
diff --git a/texmf-dist/doc/latex/artthreads/examples/article_tst.tex b/texmf-dist/doc/latex/artthreads/examples/article_tst.tex
new file mode 100644
index 00000000..1d63fb0d
--- /dev/null
+++ b/texmf-dist/doc/latex/artthreads/examples/article_tst.tex
@@ -0,0 +1,62 @@
+\documentclass{article}
+\usepackage[!viewMagWin,!preview]{artthreads}
+\usepackage{multicol,lipsum}
+\hypersetup{colorlinks}
+
+\setAddToBorder{addtow=10bp,addtoh=10bp}
+
+\begin{document}
+
+\noindent
+The two article threads: \setLink[\A{\Thread{Lipsum}}]{Read Lipsum}
+and \setLink[\A{\Thread{more Lipsum}}]{Read more Lipsum}.
+
+\setThreadInfo{title=Lipsum,author=D. P. Story,subject=Article thread test,keywords={AeB, PDF, LaTeX}}%
+
+\raggedcolumns
+\begin{multicols}{2}
+\noindent\makebox[0pt][r]{\showArticlePaneRead{}{11bp}\hspace{\marginparsep}}%
+\bArticle{lift=\baselineskip,width=\linewidth,height=\textheight-2\baselineskip}%
+\textsl{This is a series of paragraphs to fill the multi-columns of this document. It is imperative
+that we have a lot of text to fill these columns, but I fear that I don't know what to write.}
+
+\textsl{Well, here goes.} \lipsum[2]
+
+\textsl{That want well, more?} \lipsum[4]
+
+\textsl{Ok, I have the hang of it now.} \lipsum[6]
+
+\noindent\cArticle{lift=9\baselineskip,width=\linewidth,height=\textheight-2\baselineskip}\indent
+\textsl{Continuing now with} \lipsum[8]
+
+\textsl{I'm on a roll!} \lipsum[10]
+
+\end{multicols}
+
+\newpage
+
+\noindent\cArticle{lift=\baselineskip,width=\linewidth,height=1.5\baselineskip}%
+Same `article' but broken down into smaller pieces as an exercise.
+
+\setThreadInfo{title=more Lipsum,author=D. P. Story,subject=Article thread test,keywords={AeB, PDF, LaTeX}}%
+\begin{multicols}{2}\previewOn % locally turn on preview
+\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=3in+3\baselineskip}%
+\textsl{This is a series of paragraphs to fill the multi-columns of this document. It is imperative
+that we have a lot of text to fill these columns, but I fear that I don't know what to write.}
+
+\textsl{Well, here goes.} \lipsum[2]
+
+\noindent\cArticle{lift=\baselineskip,width=\linewidth,height=4in-1.5\baselineskip}\indent
+\textsl{That want well, more?} \lipsum[4]
+
+\textsl{Ok, I have the hang of it now.} \lipsum[6]
+
+\noindent\cArticle{lift=9\baselineskip,width=\linewidth,height=4in+2\baselineskip}\indent
+\textsl{Continuing now with,} \lipsum[8]
+
+\noindent\cArticle{lift=\baselineskip,width=\linewidth,height=3in-\baselineskip}\indent
+\textsl{I'm on a roll!} \lipsum[10]
+
+\end{multicols}
+
+\end{document}
diff --git a/texmf-dist/source/latex/artthreads/artthreads.dtx b/texmf-dist/source/latex/artthreads/artthreads.dtx
index 3eda0771..ad68e804 100644
--- a/texmf-dist/source/latex/artthreads/artthreads.dtx
+++ b/texmf-dist/source/latex/artthreads/artthreads.dtx
@@ -1,8 +1,8 @@
%\iffalse
%<*copyright>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% artthreads.sty package, 2016-04-09 %%
-%% Copyright (C) 2016 D. P. Story %%
+%% artthreads.sty package, %%
+%% Copyright (C) 2016 -- 2020 %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
@@ -14,20 +14,29 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
%<package>\ProvidesPackage{artthreads}
-%<package> [2016/04/09 v1.1 Support for article threads (dps)]
+%<package> [2020/07/09 v1.3.1 Support for article threads (dps)]
%<*driver>
\documentclass{ltxdoc}
-\usepackage[colorlinks,hyperindex]{hyperref}
+\usepackage[colorlinks,hyperindex=false]{hyperref}
\usepackage{fancyvrb,array,calc}
%\pdfstringdefDisableCommands{\let\\\textbackslash}
-%\EnableCrossrefs \CodelineIndex
+\EnableCrossrefs
+\CodelineIndex
\RecordChanges
\bgroup\ttfamily
\gdef\brpr#1{\char123\relax#1\char125\relax}\egroup
+\let\darg\brpr
+\let\env\texttt
+\let\opt\texttt
+\let\app\textsf
+\let\pkg\textsf
+\let\tops\texorpdfstring
+\def\nmpsep#1{\hskip-\marginparsep\texttt{#1}}
\def\ameta#1{\ensuremath{\langle\textsl{\texttt{#1}}\rangle}}
\def\meta#1{\textsl{\texttt{#1}}}
\def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}}
\def\cs#1{\texttt{\bslash#1}}
+\def\EXCL{!}
\DeclareRobustCommand{\tmspace}[3]{%
\ifmmode\mskip#1#2\else\kern#1#3\fi\relax}
\renewcommand{\,}{\tmspace+\thinmuskip{.1667em}}
@@ -47,10 +56,13 @@
\renewenvironment{quote}[1][]
{\def\@rgi{#1}\ifx\@rgi\@empty
\let\rghtm\@empty\else\def\rghtm{\rightmargin\leftmargin}\fi
- \list{}{\rghtm} %{\rightmargin\leftmargin}%
+ \list{}{\rghtm}%{\rightmargin\leftmargin}%
\item\relax}
{\endlist}
\makeatother
+\InputIfFileExists{aebdocfmt.def}{\PackageInfo{artthreads}{Inputting aebdocfmt.def}}
+ {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
+ \PackageInfo{artthreads}{aebdocfmt.def cannot be found}}
\begin{document}
\def\CMD#1{\textbackslash#1}
\GetFileInfo{artthreads.sty}
@@ -60,28 +72,27 @@
\date{processed \today}
\maketitle
\tableofcontents
- \let\Email\texttt
- \renewenvironment{theglossary}{%
- \let\efill\relax
- \begin{itemize}}{\end{itemize}}
- \value{GlossaryColumns}=1
\DocInput{artthreads.dtx}
- \PrintIndex
+\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\PrintIndex}{\paragraph*{Index}
+ The index goes here.\\Execute
+ \texttt{makeindex -s gind.ist -o artthreads.ind artthreads.idx} on the command line
+ and recompile \texttt{artthreads.dtx}.}
+\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of
+ changes goes here.\\Execute
+ \texttt{makeindex -s gglo.ist -o artthreads.gls artthreads.glo} on the command line
+ and recompile \texttt{artthreads.dtx}.}
\end{document}
%</driver>
% \fi
-% \MakeShortVerb{|}
-% \StopEventually{}
%
-% \DoNotIndex{\def,\edef,\gdef,\xdef,\global,\long,\let}
-% \DoNotIndex{\expandafter,\string,\the,\ifx,\else,\fi}
-% \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup}
-% \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand}
-% \DoNotIndex{\space,\@empty,\special}
+% \MakeShortVerb{|}
+% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{artthreads}{Inputting aebdonotindex.def}}
+% {\PackageInfo{artthreads}{aebdonotindex.def cannot be found}}
%
% \begin{macrocode}
%<*package>
% \end{macrocode}
+% \changes{v1.2}{2016/05/02}{Modified documentation to reflect new \string\textsf{DC} thread icons.}
%
% \section{Introduction}
% This package is used to create \textit{article threads} around blocks of content. Generally,
@@ -96,80 +107,102 @@
% \section{Options and Required Packages}
% \begin{macrocode}
\RequirePackage{xkeyval}
-\RequirePackage{ifpdf}[2006/02/20]
-\RequirePackage{ifxetex}[2006/08/21]
-\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse
-\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi
-% \end{macrocode}
-% \paragraph*{Driver options.} Three options, \DescribeMacro{dvips,dvipsone}\texttt{dvips} (the default)
-% and \texttt{dvipsone}, both of which require \textbf{Adobe Distiller}
-% as the PDF creator; the \DescribeMacro{pdftex}\texttt{pdftex} allows for the same functionality
-% for the \textsf{pdflatex} executable. We also support \DescribeMacro{xetex,dvipdfm,dvipdfmx}\texttt{dvipdfm}
-% and its extensions.
+% \end{macrocode}
+% \paragraph*{Driver options.} These options are \opt{dvips} (the default),
+% \opt{pdftex}, \opt{luatex}, and \opt{xetex}
+% are automatically detected, other drivers supported are \opt{dvipdfm} and
+% \opt{dvipdfmx}.
%
-% \paragraph*{Preview options.} The \DescribeMacro{preview}\texttt{preview}
+% \paragraph*{Preview options.} The \texttt{preview}
% option is a carry over from \textsf{eforms}. When selected, all form fields are outlined; useful when
% setting the location of fields in a dvi previewer. The other option is \texttt{viewMagWin}
-% \DescribeMacro{viewMagWin} will show the viewing windows surrounding the target. This is the rectangle
+% will show the viewing windows surrounding the target. This is the rectangle
% that will be jumped to. Use this option to adjust the size of the window to your needs.
% When either of the last two options has an exclamation point prior, that means to
% turn off the switch. You can conveniently use \texttt{viewMagWin} to see the viewing window,
-% then change it to \DescribeMacro{!viewMagWin}\texttt{!viewMagWin} to remove the visible window. Cool.
-% Similarly, you can turn off \texttt{preview} using \DescribeMacro{!preview}\texttt{!preview}.
+% then change it to \texttt{!viewMagWin} to remove the visible window. Cool.
+% Similarly, you can turn off \texttt{preview} using \texttt{!preview}.
% \begin{macrocode}
% \end{macrocode}
-% All options are passed to the \textsf{fitr} package, which contains a lot of the code
+% \leavevmode\IndexOpt{pdftex}^^A
+% \IndexOpt{luatex}^^A
+% All options are passed to the \pkg{fitr} package, which contains a lot of the code
% used in this package.
% \begin{macrocode}
\DeclareOptionX{pdftex}{\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{luatex}{\PassOptionsToPackage{\CurrentOption}{fitr}}
% \end{macrocode}
+% \leavevmode\IndexOpt{dvips}^^A
+% \IndexOpt{dvipsone}^^A
% Distiller based drivers.
% \begin{macrocode}
\DeclareOptionX{dvips}{\PassOptionsToPackage{\CurrentOption}{fitr}}
\DeclareOptionX{dvipsone}{\PassOptionsToPackage{\CurrentOption}{fitr}}
% \end{macrocode}
-% \textsf{dvipdfm} and its variants.
+% \leavevmode\IndexOpt{xetex}^^A
+% \IndexOpt{dvipdfm}^^A
+% \IndexOpt{dvipdfmx}^^A
+% \opt{xetex} and its variants.
% \begin{macrocode}
\DeclareOptionX{dvipdfm}{\PassOptionsToPackage{\CurrentOption}{fitr}}
\DeclareOptionX{dvipdfmx}{\PassOptionsToPackage{\CurrentOption}{fitr}}
\DeclareOptionX{xetex}{\PassOptionsToPackage{\CurrentOption}{fitr}}
% \end{macrocode}
+% \leavevmode\IndexOpt{preview}^^A
+% \IndexOpt[\protect\EXCL]{!preview}^^A
+% \IndexOpt{viewMagWin}^^A
+% \IndexOpt[\protect\EXCL]{!viewMagWin}^^A
+% Preview preferences
% \begin{macrocode}
-\DeclareOptionX{preview}{\PassOptionsToPackage{\CurrentOption}{fitr}}
-\DeclareOptionX{!preview}{\PassOptionsToPackage{\CurrentOption}{fitr}}
-\DeclareOptionX{viewMagWin}{\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{preview}
+ {\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{!preview}
+ {\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{viewMagWin}
+ {\PassOptionsToPackage{\CurrentOption}{fitr}}
\DeclareOptionX{!viewMagWin}
- {\PassOptionsToPackage{\CurrentOption}{fitr}}
+ {\PassOptionsToPackage{\CurrentOption}{fitr}}
+% \end{macrocode}
+% Any other options are passed on to \pkg{fitr}. One useful
+% option is \opt{gonative}, which creates no document JavaScript.
+% Consequently, the \texttt{latex\,->\,dvips\,->\,ps2pdf} workflow
+% is supported.
+% \begin{macrocode}
+\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}{fitr}}
\ProcessOptionsX
% \end{macrocode}
% \section{The Main Code}
% We require the package \textsf{fitr}, as we use many commands from that package.
% We pass all options to \textsf{fitr}.
+% \changes{v1.3.1}{2020/07/09}{Require \string\pkg{fitr} package, dated 2020/07/09}
% \begin{macrocode}
-\RequirePackage{fitr}[2016/04/04]
+\RequirePackage{fitr}[2020/07/09]
% \end{macrocode}
% Some scratch counters, lengths, boxes.
% \begin{macrocode}
\newif\ifnewarticle
-\newcounter{artthrdcnt}
+\newcounter{@rtBtnCnt}
\def\CntArt{0}\def\CntArtInfo{0}
\def\inc@CntMacro#1{{\@tempcnta#1\relax\advance\@tempcnta1\relax
\xdef#1{\the\@tempcnta}}}
\def\artM@rk{[\space}
% \end{macrocode}
-% \paragraph*{Key-values for \cs{setThreadInfo}} We set up
-% key-values\DescribeMacro{title}\DescribeMacro{author}\DescribeMacro{subject}^^A
-% \DescribeMacro{keywords} for the thread \textsf{Info} dictionary. Only the title
-% is required, that's why a default value of \texttt{thread-<num>} is otherwise provided.
+% \subsection{\tops{\protect\cs{setThreadInfo}}{\textbackslash{setThreadInfo}} and its KV-pairs}
+% We set up
+% key-values\IndexKey{title}\IndexKey{author}\IndexKey{subject}^^A
+% \IndexKey{keywords} for the thread \textsf{Info} dictionary. Only the title
+% is required, that's why a default value of \texttt{thread-\ameta{num}} is otherwise provided.
+% For \app{pdflatex} and \app{lualtex}, only \texttt{title} is supported.
% \begin{macrocode}
-\define@key{artthrd}{title}[]{\def\threadTitle{#1}}
- \let\threadTitle\@empty
-\define@key{artthrd}{author}[]{\def\threadAuthor{#1}}
- \let\threadAuthor\@empty
-\define@key{artthrd}{keywords}[]{\def\threadKeywords{#1}}
- \let\threadKeywords\@empty
-\define@key{artthrd}{subject}[]{\def\threadSubject{#1}}
- \let\threadSubject\@empty
+\define@key{artthrd}{title}[]{\Hy@unicodefalse
+ \pdfstringdef\threadTitle{#1}}
+ \let\threadTitle\@empty
+\define@key{artthrd}{author}[]{\pdfstringdef\threadAuthor{#1}}
+ \let\threadAuthor\@empty
+\define@key{artthrd}{keywords}[]{\pdfstringdef\threadKeywords{#1}}
+ \let\threadKeywords\@empty
+\define@key{artthrd}{subject}[]{\pdfstringdef\threadSubject{#1}}
+ \let\threadSubject\@empty
% \end{macrocode}
% Use \DescribeMacro{\setThreadInfo}\cmd{\setThreadInfo} prior to the opening of a
% new thread using \cs{cArticle}. Through its key-values, set the title, author,
@@ -179,16 +212,15 @@
\let\threadTitle\@empty\let\threadAuthor\@empty
\let\threadKeywords\@empty\let\threadSubject\@empty
\setkeys{artthrd}{#1}\ifx\threadTitle\@empty
- \def\threadTitle{thread-\CntArtInfo}\fi
-}
+ \def\threadTitle{thread-\CntArtInfo}\fi}
\def\bArtErrMsg{When starting a new article thread
- (\string\cArticle)\MessageBreak
+ (\string\bArticle)\MessageBreak
first use \string\setThreadInfo\space to set the title,\MessageBreak
author, subject, and keywords}
% \end{macrocode}
% \paragraph*{Additional key-values for threads} In addition to the key-values provided
% by \textsf{fitr}, we provide a few more. The two keys
-% \DescribeMacro{addtow}\texttt{addtow} and \DescribeMacro{addtoh}\texttt{addtoh}
+% \IndexKey{addtow}\texttt{addtow} and \IndexKey{addtoh}\texttt{addtoh}
% adds to the reading border of the threads. These are set through the
% command \DescribeMacro{\setAddToBorder}\cs{setAddToBorder}. For the most part,
% choices for \texttt{addtow} (add to the width) and \texttt{addtoh} (add to the height)
@@ -202,20 +234,20 @@
\def\artthrd@@addtoh{0}
\newcommand{\setAddToBorder}[1]{\setkeys{@rtthrd}{#1}}
% \end{macrocode}
+% \subsection{The \tops{\protect\cs{bArticle} and \protect\cs{cArticle}}{\textbackslash{bArticle} and \textbackslash{cArticle}} commands}
% The \DescribeMacro{\bArticle}\cmd{\bArticle} is used to start an article thread. The thread
% may continue with \cs{cArticle}. Both commands have a required argument, consisting of
% key-values defined by \textsf{fitr}.
% The following is the syntax, with appropriate keys defined in \texttt{fitr}.
-% \begin{quote}\ttfamily
-% \string\cArticle\char123lift=\ameta{length},width=\ameta{length},height=\ameta{length}\char125
-% \end{quote}
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},commandchars={!()}]
+%\cArticle{lift=!ameta(length),width=!ameta(length),height=!ameta(length)}
+%\end{Verbatim}
% \begin{macrocode}
\newcommand{\bArticle}{\begingroup\inc@CntMacro\CntArt
\ifnum\CntArt=\CntArtInfo\relax\else
\PackageError{artthreads}{\bArtErrMsg}{See package documentation
for \string\setThreadInfo}\fi
- \newarticletrue\set@rectart
-}
+ \newarticletrue\set@rectart}
% \end{macrocode}
% The only difference between \DescribeMacro{\cArticle}\cmd{\cArticle} and
% \cmd{\bArticle} is the stepping of the counter \cmd{\CntArt}
@@ -225,164 +257,275 @@
% \end{macrocode}
% \cmd{\set@rectart} continues \cs{bArticle}/\cs{cArticle}.
% \begin{macrocode}
-\newcommand{\set@rectart}[1]{\def\fitr@artrect@argi{#1}%
+\newcommand{\set@rectart}[1]{%\def\fitr@artrect@argi{#1}% dps
\edef\temp@exp{\noexpand\setkeys{fitr}{#1}}\temp@exp
\set@@rectart}
% \end{macrocode}
% \cmd{\set@@rectart} is the main command for building the thread.
% \begin{macrocode}
\def\set@@rectart{\def\fitr@setBL{0pt}%
- \@ifundefined{ef@Bbox}{\let\fitr@FLB@ction\Bbox}%
- {\let\fitr@FLB@ction\ef@Bbox}%
- \get@fitr@dimen{%
- \parbox[\fitr@@refPt][\fitr@@height]{\fitr@@width}%
- {\kern0pt\fitr@FLB@ction{\fitr@@width}{\fitr@@height}\kern0pt}%
- }%
- \makebox[0pt][l]{\hspace*{\fitr@@shift}\smash{%
- \raisebox{\fitr@@lift-\fitr@setBL}{%
+ \@ifundefined{ef@Bbox}{\let\fitr@FLB@ction\Bbox}%
+ {\let\fitr@FLB@ction\ef@Bbox}%
+ \get@fitr@dimen{%
+ \parbox[\fitr@@refPt][\fitr@@height]{\fitr@@width}%
+ {\kern0pt\fitr@FLB@ction{\fitr@@width}{\fitr@@height}\kern0pt}%
+ }%
+ \makebox[0pt][l]{\hspace*{\fitr@@shift}\smash{%
+ \raisebox{\fitr@@lift-\fitr@setBL}{%
% \end{macrocode}
% Actually insert the thread code here by inserting \cs{setThre@d}.
% \begin{macrocode}
- \setThre@d{\artthrd@@addtow}{\artthrd@@addtoh}%
- \unhbox\fitr@bbox
- \fitr@urxury@fixup{\artthrd@@addtow}{\artthrd@@addtoh}{}%
- }}}\setlength{\fboxsep}{0pt}%
+ \setThre@d{\artthrd@@addtow}{\artthrd@@addtoh}%
+ \unhbox\fitr@bbox
+ \fitr@urxury@fixup{\artthrd@@addtow}{\artthrd@@addtoh}{}%
+ }}}\setlength{\fboxsep}{0pt}%
% \end{macrocode}
% Now place an extended border around the viewing area
% \begin{macrocode}
- \ifviewMagWin
- \fitr@length=\artthrd@@addtow bp
- \fitr@length=2\fitr@length
- \addtolength{\fitr@length}{\fitr@@width}%
- \edef\fitr@@width{\the\fitr@length}%
- \fitr@length=\artthrd@@addtoh bp
- \fitr@length=2\fitr@length
- \addtolength{\fitr@length}{\fitr@@height}%
- \edef\fitr@@height{\the\fitr@length}%
- \setlength\fitr@length{-\artthrd@@addtow bp}%
- \addtolength\fitr@length{\fitr@@shift}%
- \makebox[0pt][l]{\hspace*{\fitr@length}\smash{%
- \setlength\fitr@length{\fitr@@lift-\fitr@setBL}%
- \if\fitr@@refPt b%
- \addtolength\fitr@length{-\artthrd@@addtoh bp}\else
- \if\fitr@@refPt t%
- \addtolength\fitr@length{\artthrd@@addtoh bp}%
- \fi\fi
- \raisebox{\fitr@length}%
- {\fbox{\parbox[\fitr@@refPt][\fitr@@height]%
- {\fitr@@width}{\kern0pt\hfill\vfill\kern0pt}}}}%
- }%
- \fi
+ \ifviewMagWin
+ \fitr@length=\artthrd@@addtow bp
+ \fitr@length=2\fitr@length
+ \addtolength{\fitr@length}{\fitr@@width}%
+ \edef\fitr@@width{\the\fitr@length}%
+ \fitr@length=\artthrd@@addtoh bp
+ \fitr@length=2\fitr@length
+ \addtolength{\fitr@length}{\fitr@@height}%
+ \edef\fitr@@height{\the\fitr@length}%
+ \setlength\fitr@length{-\artthrd@@addtow bp}%
+ \addtolength\fitr@length{\fitr@@shift}%
+ \makebox[0pt][l]{\hspace*{\fitr@length}\smash{%
+ \setlength\fitr@length{\fitr@@lift-\fitr@setBL}%
+ \if\fitr@@refPt b%
+ \addtolength\fitr@length{-\artthrd@@addtoh bp}\else
+ \if\fitr@@refPt t%
+ \addtolength\fitr@length{\artthrd@@addtoh bp}%
+ \fi\fi
+ \raisebox{\fitr@length}%
+ {\fbox{\parbox[\fitr@@refPt][\fitr@@height]%
+ {\fitr@@width}{\kern0pt\hfill\vfill\kern0pt}}}}%
+ }%
+ \fi
\endgroup}
% \end{macrocode}
-% \paragraph*{Driver dependent macros} The \cs{ThrBbox} macros perform different tasks
-% depending on the driver.
+% \subsection{The driver dependent commands}
+% We begin with a required definition to enable \app{lualatex} to function correctly.
+% \begin{macrocode}
+\ifluatex\protected\def\pdfthread{\pdfextension thread }\fi
+% \end{macrocode}
+% \DescribeMacro\AT@ThrBbox\nmpsep{\darg{\ameta{add-wd}\darg{\ameta{add-ht}}}} The definition
+% of \cmd{\set@rtThrd} depends on the driver. The arguments are dimensionless numbers, representing
+% Adobe points. The \cs{AT@ThrBbox} macros perform different tasks, one of which is to calculate the dimensions
+% of the bounding box for the viewing rectangle. It is used in \cs{set@rtThrd}, defined below.
+% \changes{v1.3}{2020/07/03}{Add special definition for threads in the case of lualatex}
+% \changes{v1.3}{2020/07/03}{Added \string\cs{Thread}}
% \begin{macrocode}
\if@fitr@dvipdfm
% \end{macrocode}
-% For the \textsf{dvipdfm} and friends
+% For the \app{xelatex} and friends
% \begin{macrocode}
-\def\ThrBbox#1#2{%
- \fitr@length=#1bp
- \fitr@length=2\fitr@length
- \advance\fitr@length\wd\fitr@bbox
- \edef\fitr@xetex@view@width{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\ht\fitr@bbox
- \edef\fitr@xetex@view@height{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\dp\fitr@bbox
- \edef\fitr@xetex@view@depth{\the\fitr@length}%
-}\else\ifx\fitr@driver\fitr@pdftex@driver
-% \end{macrocode}
-% For the \textsf{pdftex} and friends
-% \begin{macrocode}
-\def\ThrBbox#1#2{%
- \fitr@length=#1bp
- \fitr@length=2\fitr@length
- \advance\fitr@length\wd\fitr@bbox
- \edef\fitr@pdftex@view@width{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\ht\fitr@bbox
- \edef\fitr@pdftex@view@height{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\dp\fitr@bbox
- \edef\fitr@pdftex@view@depth{\the\fitr@length}%
-}\else\ifx\fitr@driver\fitr@dvipsone@driver
-% \end{macrocode}
-% For the \textsf{dvipsone} driver
-% \begin{macrocode}
-\def\ThrBbox#1#2{%
- currentpoint 2 copy %
- \the\fitr@depth\space add #2\space PDFtoTeX add % y1
- exch #1\space PDFtoTeX sub exch % x1
- 4 2 roll exch
- \the\fitr@width\space add #1\space PDFtoTeX add exch % x2
- \the\fitr@height\space sub #2\space PDFtoTeX sub} % y2
-\else\ifx\fitr@driver\fitr@dvips@driver
-% \end{macrocode}
-% For the \textsf{dvips} driver
-% \begin{macrocode}
-\def\ThrBbox#1#2{% Uses \fitr@bbox
- currentpoint 2 copy %
- \the\fitr@depth\space SPtoDvips add
- #2\space BPToDvips add % y1
- exch #1\space BPToDvips sub exch % x1
- 4 2 roll exch
- \the\fitr@width\space SPtoDvips add
- #1\space BPToDvips add exch % x2
- \the\fitr@height \space SPtoDvips sub
- #2\space BPToDvips sub} % y2
+\def\AT@ThrBbox#1#2{%
+ \fitr@length=#1bp
+ \fitr@length=2\fitr@length
+ \advance\fitr@length\wd\fitr@bbox
+ \edef\fitr@xetex@view@width{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\ht\fitr@bbox
+ \edef\fitr@xetex@view@height{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\dp\fitr@bbox
+ \edef\fitr@xetex@view@depth{\the\fitr@length}%
+}\else
+\ifpdf
+% \end{macrocode}
+% For the \app{pdftex} and friends
+% \changes{v1.3}{2020/07/03}{Use \string\cs{ifpdf}}
+% \begin{macrocode}
+\def\AT@ThrBbox#1#2{%
+ \fitr@length=#1bp
+ \fitr@length=2\fitr@length
+ \advance\fitr@length\wd\fitr@bbox
+ \edef\fitr@pdftex@view@width{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\ht\fitr@bbox
+ \edef\fitr@pdftex@view@height{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\dp\fitr@bbox
+ \edef\fitr@pdftex@view@depth{\the\fitr@length}%
+}\else
+\ifx\fitr@driver\fitr@dvipsone@driver
+% \end{macrocode}
+% For the \app{dvipsone} driver
+% \begin{macrocode}
+\def\AT@ThrBbox#1#2{%
+ currentpoint 2 copy %
+ \the\fitr@depth\space add #2\space PDFtoTeX add % y1
+ exch #1\space PDFtoTeX sub exch % x1
+ 4 2 roll exch
+ \the\fitr@width\space add #1\space PDFtoTeX add exch % x2
+ \the\fitr@height\space sub #2\space PDFtoTeX sub} % y2
+\else
+\ifx\fitr@driver\fitr@dvips@driver
+% \end{macrocode}
+% For the \app{dvips} driver
+% \begin{macrocode}
+\def\AT@ThrBbox#1#2{% Uses \fitr@bbox
+ currentpoint 2 copy %
+ \the\fitr@depth\space SPtoDvips add
+ #2\space BPToDvips add % y1
+ exch #1\space BPToDvips sub exch % x1
+ 4 2 roll exch
+ \the\fitr@width\space SPtoDvips add
+ #1\space BPToDvips add exch % x2
+ \the\fitr@height \space SPtoDvips sub
+ #2\space BPToDvips sub} % y2
\fi\fi\fi\fi
% \end{macrocode}
% \paragraph*{Code to set the thread} The \cs{setThre@d} macros are driver dependent.
+% \medskip\par\noindent
+% \DescribeMacro\setThre@d\nmpsep{\darg{\ameta{add-wd}\darg{\ameta{add-ht}}}} This macro
+% strips out the dimensions of its arguments (10bp becomes 10) and passes these new arguments
+% to \cmd{\set@rtThrd}.
% \begin{macrocode}
\def\setThre@d#1#2{%
- \fitr@defaultbp{\aWd}{#1}\fitr@defaultbp{\aHt}{#2}%
- \edef\tmp@exp{\noexpand\set@rtThrd{\aWd}{\aHt}}\tmp@exp
-}
+ \fitr@defaultbp{\aWd}{#1}\fitr@defaultbp{\aHt}{#2}%
+ \edef\tmp@exp{\noexpand\set@rtThrd{\aWd}{\aHt}}\tmp@exp}
\if@fitr@dvipdfm
% \end{macrocode}
-% For the \textsf{dvipdfm} and friends
-% \begin{macrocode}
-\def\set@rtThrd#1#2{\ThrBbox{#1}{#2}%
- \smash{\raisebox{-\fitr@xetex@view@height+#2bp}%
- {\makebox[0pt][l]{\hspace*{-#1bp}%
- \@pdfm@mark{thread @artthrd\CntArt\space
- width \fitr@xetex@view@width\space
- height \fitr@xetex@view@height\space
- depth \fitr@xetex@view@depth\space
- << /Title (\threadTitle)
-\ifnewarticle
- /Author (\threadAuthor)
- /Subject (\threadSubject)
- /Keywords (\threadKeywords)
-\fi >>}}}}}\else\ifx\fitr@driver\fitr@pdftex@driver
+% \DescribeMacro\set@rtThrd\nmpsep{\darg{\ameta{add-wd}\darg{\ameta{add-ht}}}} The definition
+% of \cmd{\set@rtThrd} depends on the driver. The arguments are dimensionless numbers, representing
+% Adobe points.\medskip\par\noindent
+% For the \textsf{xelatex} and friends
+% \begin{macrocode}
+\def\set@rtThrd#1#2{\AT@ThrBbox{#1}{#2}%
+ \smash{\raisebox{-\fitr@xetex@view@height+#2bp}%
+ {\makebox[0pt][l]{\hspace*{-#1bp}%
+ \@pdfm@mark{thread @artthrd\CntArt\space
+ width \fitr@xetex@view@width\space
+ height \fitr@xetex@view@height\space
+ depth \fitr@xetex@view@depth\space
+ << /Title (\threadTitle)
+ \ifnewarticle
+ /Author (\threadAuthor)
+ /Subject (\threadSubject)
+ /Keywords (\threadKeywords)\fi >>}}}}}\else
+\ifpdf
% \end{macrocode}
-% \textsf{pdftex} and friends
+% For \app{pdftex} and friends
+% \changes{v1.3}{2020/07/03}{Use \string\cs{ifpdf}}
% \begin{macrocode}
-\def\set@rtThrd#1#2{\ThrBbox{#1}{#2}%
- \makebox[0pt][l]{\hspace*{-#1bp}%
- \pdfthread
- width \fitr@pdftex@view@width\space
- height \fitr@pdftex@view@height\space
- depth \fitr@pdftex@view@depth\space
- name {\threadTitle}}}\else
+\def\set@rtThrd#1#2{\AT@ThrBbox{#1}{#2}%
+ \makebox[0pt][l]{\hspace*{-#1bp}%
+ \pdfthread
+ width \fitr@pdftex@view@width\space
+ height \fitr@pdftex@view@height\space
+ depth \fitr@pdftex@view@depth\space
+ name {\threadTitle}}}\else
% \end{macrocode}
-% For drivers that use PostScript and the \textbf{pdfmark}.
-% \changes{v1.1}{2016/04/09}{Removed the Page key and dependence on the refcount package}
+% For drivers that use PostScript and the \textsf{\textbf{pdfmark}}.
+% \changes{v1.1}{2016/04/09}{Removed the Page key and dependence on the
+% \string\textsf{refcount} package}
% \begin{macrocode}
\def\set@rtThrd#1#2{\literalps@out{\artM@rk
- /Rect [\ThrBbox{\artthrd@@addtow}{\artthrd@@addtoh}]
- /Title (\threadTitle)
-\ifnewarticle
+ /Rect [\AT@ThrBbox{\artthrd@@addtow}{\artthrd@@addtoh}]
+ /Title (\threadTitle)
+ \ifnewarticle
/Author (\threadAuthor)
/Subject (\threadSubject)
- /Keywords (\threadKeywords)
-\fi
+ /Keywords (\threadKeywords)\fi
/ARTICLE pdfmark}}
\fi\fi
% \end{macrocode}
+% \subsection{Some navigation commands}
+% \begin{macrocode}
+\let\threadTitle\@empty
+% \end{macrocode}
+% \DescribeMacro{\Thread}\nmpsep{\darg{\ameta{thread-title}}} The action to start
+% read a thread whose title is \ameta{thread-title}. For example,
+% |\setLink[\A{\Thread{Lipsum}}]{Read Lipsum}| \medskip
+% \begin{macrocode}
+\providecommand{\Thread}[1]{/S/Thread/D(#1)}
+% \end{macrocode}
+% \DescribeMacro\shArticlesPaneActn\DescribeMacro\sArticlesPaneActn Actions for show/hid
+% articles pane and to just show articles pane (The named action \texttt{ArticleThreads} is
+% undocumented, don't remember show I got this name.) In addition to these two, we combine
+% them with read thread actions: \DescribeMacro\shArticlesPaneReadActn\DescribeMacro\sArticlesPaneReadActn
+% \begin{macrocode}
+\def\shArticlesPaneActn{\Named{ShowHideArticles}}
+\def\sArticlesPaneActn{\Named{ArticleThreads}}
+\def\shArticlesPaneReadActn{\shArticlesPaneActn
+ \Next{\Thread{\threadTitle}}}
+\def\sArticlesPaneReadActn{\sArticlesPaneActn
+ \Next{\Thread{\threadTitle}}}
+% \end{macrocode}
+% \DescribeMacro\readArticle\nmpsep{\darg{\ameta{thread-title}}} is a macro intended
+% to be passed to a push button action through the \cs{cmd} key. For example,\medskip
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},commandchars={!()}]
+%\showArticlePaneRead[!textbf(\cmd{\readArticle{more Lipsum}})]{}{11bp}
+%\end{Verbatim}
+%It should be used with \cs{toggleArticlePaneRead} and \cs{showArticlePaneRead} (push buttons). Alternatively,
+%these actions can be done through a link:
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},commandchars={!()}]
+%\setLink[\cmd{\readArticle{Lipsum}}
+%\A{\shArticlesPaneReadActn}]{Lipsum}
+%\end{Verbatim}
+% \begin{macrocode}
+\def\readArticle#1{\Hy@unicodefalse
+ \pdfstringdef\AT@x{#1}\edef\threadTitle{\AT@x}}
+\def\chkThreadName{%
+ \ifx\threadTitle\@empty
+ \global\let\isThrTtl\ef@NO
+ \def\readArtPresets{\cmd{\let\Next\@gobble}}\else
+ \global\let\isThrTtl\ef@YES
+ \let\readArtPresets\@empty
+ \fi
+}
+\def\readThreadMsg{\ifx\isThrTtl\ef@NO
+ \PackageWarning{artthreads}{No thread title specified to read}\fi}
+% \end{macrocode}
+% \DescribeMacro\toggleArticlePane\nmpsep{[\ameta{KV-pairs}]\darg{\ameta{wd}}\darg{\ameta{ht}}}
+% A push button whose action toggles the Articles pane open and closed.
+% \begin{macrocode}
+\newcommand{\toggleArticlePane}[3][]{\stepcounter{@rtBtnCnt}%
+ \pushButton[\CA{Article}\TU{Toggle Articles Pane}#1
+ \A{\shArticlesPaneActn}
+]{TAPBtn\the@rtBtnCnt}{#2}{#3}}
+% \end{macrocode}
+% \DescribeMacro\toggleArticlePaneRead\nmpsep{[\ameta{KV-pairs}]\darg{\ameta{wd}}\darg{\ameta{ht}}}
+% A push button whose action us to toggle the Articles pane state (show/hide) and to begin reading the
+% thread titled \cs{threadTitle}. If this command is placed after the \cs{setThreadInfo}
+% command, then \cs{threadTitle} is the title set by the title key of \cs{setThreadInfo}.
+% \begin{macrocode}
+\def\tooltipTogglePaneRead#1{\def\ttToggleP@neRead{#1}}
+\tooltipTogglePaneRead{Toggle Articles pane and read
+ the article \threadTitle}
+\newcommand{\toggleArticlePaneRead}[3][]{\begingroup
+ \stepcounter{@rtBtnCnt}\pushButton[\CA{Article}#1
+ \TU{\ttToggleP@neRead}\cmd{\chkThreadName}
+ \presets{\readArtPresets}\A{\shArticlesPaneReadActn}
+]{TAPRBtn\the@rtBtnCnt}{#2}{#3}\readThreadMsg\endgroup}
+% \end{macrocode}
+% \DescribeMacro\showArticlePane\nmpsep{[\ameta{KV-pairs}]\darg{\ameta{wd}}\darg{\ameta{ht}}} A push button
+% whose action is to show the Articles pane.
+% \begin{macrocode}
+\newcommand{\showArticlePane}[3][]{\stepcounter{@rtBtnCnt}%
+ \pushButton[\CA{Article}\TU{Show Articles Pane}#1
+ \A{\sArticlesPaneActn}
+]{SAPBtn\the@rtBtnCnt}{#2}{#3}}
+% \end{macrocode}
+% \DescribeMacro\showArticlePaneRead\nmpsep{[\ameta{KV-pairs}]\darg{\ameta{wd}}\darg{\ameta{ht}}}
+% A push button whose action is to show the Articles and to begin reading the
+% thread titled \cs{threadTitle}. If this command is placed after the \cs{setThreadInfo}
+% command, then \cs{threadTitle} is the title set by the title key of \cs{setThreadInfo}.
+% \begin{macrocode}
+\def\tooltipShowPaneRead#1{\def\ttShowP@neRead{#1}}
+\tooltipShowPaneRead{Show Articles pane and read
+ the article \threadTitle}
+\newcommand{\showArticlePaneRead}[3][]{\begingroup
+ \stepcounter{@rtBtnCnt}\pushButton[\CA{Article}#1
+ \TU{\ttShowP@neRead}\cmd{\chkThreadName}
+ \presets{\readArtPresets}\A{\sArticlesPaneReadActn}
+]{SAPRBtn\the@rtBtnCnt}{#2}{#3}\readThreadMsg\endgroup}
+% \end{macrocode}
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/texmf-dist/tex/latex/artthreads/artthreads.sty b/texmf-dist/tex/latex/artthreads/artthreads.sty
index f8ec0fbb..82db7a4f 100644
--- a/texmf-dist/tex/latex/artthreads/artthreads.sty
+++ b/texmf-dist/tex/latex/artthreads/artthreads.sty
@@ -1,200 +1,246 @@
-%%
-%% This is file `artthreads.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% artthreads.dtx (with options: `copyright,package')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% artthreads.sty package, 2016-04-09 %%
-%% Copyright (C) 2016 D. P. Story %%
-%% dpstory@uakron.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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\NeedsTeXFormat{LaTeX2e}[1997/12/01]
-\ProvidesPackage{artthreads}
- [2016/04/09 v1.1 Support for article threads (dps)]
-\RequirePackage{xkeyval}
-\RequirePackage{ifpdf}[2006/02/20]
-\RequirePackage{ifxetex}[2006/08/21]
-\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse
-\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi
-\DeclareOptionX{pdftex}{\PassOptionsToPackage{\CurrentOption}{fitr}}
-\DeclareOptionX{dvips}{\PassOptionsToPackage{\CurrentOption}{fitr}}
-\DeclareOptionX{dvipsone}{\PassOptionsToPackage{\CurrentOption}{fitr}}
-\DeclareOptionX{dvipdfm}{\PassOptionsToPackage{\CurrentOption}{fitr}}
-\DeclareOptionX{dvipdfmx}{\PassOptionsToPackage{\CurrentOption}{fitr}}
-\DeclareOptionX{xetex}{\PassOptionsToPackage{\CurrentOption}{fitr}}
-\DeclareOptionX{preview}{\PassOptionsToPackage{\CurrentOption}{fitr}}
-\DeclareOptionX{!preview}{\PassOptionsToPackage{\CurrentOption}{fitr}}
-\DeclareOptionX{viewMagWin}{\PassOptionsToPackage{\CurrentOption}{fitr}}
-\DeclareOptionX{!viewMagWin}
- {\PassOptionsToPackage{\CurrentOption}{fitr}}
-\ProcessOptionsX
-\RequirePackage{fitr}[2016/04/04]
-\newif\ifnewarticle
-\newcounter{artthrdcnt}
-\def\CntArt{0}\def\CntArtInfo{0}
-\def\inc@CntMacro#1{{\@tempcnta#1\relax\advance\@tempcnta1\relax
- \xdef#1{\the\@tempcnta}}}
-\def\artM@rk{[\space}
-\define@key{artthrd}{title}[]{\def\threadTitle{#1}}
- \let\threadTitle\@empty
-\define@key{artthrd}{author}[]{\def\threadAuthor{#1}}
- \let\threadAuthor\@empty
-\define@key{artthrd}{keywords}[]{\def\threadKeywords{#1}}
- \let\threadKeywords\@empty
-\define@key{artthrd}{subject}[]{\def\threadSubject{#1}}
- \let\threadSubject\@empty
-\newcommand{\setThreadInfo}[1]{\inc@CntMacro\CntArtInfo
- \let\threadTitle\@empty\let\threadAuthor\@empty
- \let\threadKeywords\@empty\let\threadSubject\@empty
- \setkeys{artthrd}{#1}\ifx\threadTitle\@empty
- \def\threadTitle{thread-\CntArtInfo}\fi
-}
-\def\bArtErrMsg{When starting a new article thread
- (\string\cArticle)\MessageBreak
- first use \string\setThreadInfo\space to set the title,\MessageBreak
- author, subject, and keywords}
-\define@key{@rtthrd}{addtow}[0]{%
- \fitr@defaultbp{\artthrd@@addtow}{#1}}
-\def\artthrd@@addtow{0}
-\define@key{@rtthrd}{addtoh}[0]{%
- \fitr@defaultbp{\artthrd@@addtoh}{#1}}
-\def\artthrd@@addtoh{0}
-\newcommand{\setAddToBorder}[1]{\setkeys{@rtthrd}{#1}}
-\newcommand{\bArticle}{\begingroup\inc@CntMacro\CntArt
- \ifnum\CntArt=\CntArtInfo\relax\else
- \PackageError{artthreads}{\bArtErrMsg}{See package documentation
- for \string\setThreadInfo}\fi
- \newarticletrue\set@rectart
-}
-\newcommand{\cArticle}{\begingroup\newarticlefalse\set@rectart}
-\newcommand{\set@rectart}[1]{\def\fitr@artrect@argi{#1}%
- \edef\temp@exp{\noexpand\setkeys{fitr}{#1}}\temp@exp
- \set@@rectart}
-\def\set@@rectart{\def\fitr@setBL{0pt}%
- \@ifundefined{ef@Bbox}{\let\fitr@FLB@ction\Bbox}%
- {\let\fitr@FLB@ction\ef@Bbox}%
- \get@fitr@dimen{%
- \parbox[\fitr@@refPt][\fitr@@height]{\fitr@@width}%
- {\kern0pt\fitr@FLB@ction{\fitr@@width}{\fitr@@height}\kern0pt}%
- }%
- \makebox[0pt][l]{\hspace*{\fitr@@shift}\smash{%
- \raisebox{\fitr@@lift-\fitr@setBL}{%
- \setThre@d{\artthrd@@addtow}{\artthrd@@addtoh}%
- \unhbox\fitr@bbox
- \fitr@urxury@fixup{\artthrd@@addtow}{\artthrd@@addtoh}{}%
- }}}\setlength{\fboxsep}{0pt}%
- \ifviewMagWin
- \fitr@length=\artthrd@@addtow bp
- \fitr@length=2\fitr@length
- \addtolength{\fitr@length}{\fitr@@width}%
- \edef\fitr@@width{\the\fitr@length}%
- \fitr@length=\artthrd@@addtoh bp
- \fitr@length=2\fitr@length
- \addtolength{\fitr@length}{\fitr@@height}%
- \edef\fitr@@height{\the\fitr@length}%
- \setlength\fitr@length{-\artthrd@@addtow bp}%
- \addtolength\fitr@length{\fitr@@shift}%
- \makebox[0pt][l]{\hspace*{\fitr@length}\smash{%
- \setlength\fitr@length{\fitr@@lift-\fitr@setBL}%
- \if\fitr@@refPt b%
- \addtolength\fitr@length{-\artthrd@@addtoh bp}\else
- \if\fitr@@refPt t%
- \addtolength\fitr@length{\artthrd@@addtoh bp}%
- \fi\fi
- \raisebox{\fitr@length}%
- {\fbox{\parbox[\fitr@@refPt][\fitr@@height]%
- {\fitr@@width}{\kern0pt\hfill\vfill\kern0pt}}}}%
- }%
- \fi
-\endgroup}
-\if@fitr@dvipdfm
-\def\ThrBbox#1#2{%
- \fitr@length=#1bp
- \fitr@length=2\fitr@length
- \advance\fitr@length\wd\fitr@bbox
- \edef\fitr@xetex@view@width{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\ht\fitr@bbox
- \edef\fitr@xetex@view@height{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\dp\fitr@bbox
- \edef\fitr@xetex@view@depth{\the\fitr@length}%
-}\else\ifx\fitr@driver\fitr@pdftex@driver
-\def\ThrBbox#1#2{%
- \fitr@length=#1bp
- \fitr@length=2\fitr@length
- \advance\fitr@length\wd\fitr@bbox
- \edef\fitr@pdftex@view@width{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\ht\fitr@bbox
- \edef\fitr@pdftex@view@height{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\dp\fitr@bbox
- \edef\fitr@pdftex@view@depth{\the\fitr@length}%
-}\else\ifx\fitr@driver\fitr@dvipsone@driver
-\def\ThrBbox#1#2{%
- currentpoint 2 copy %
- \the\fitr@depth\space add #2\space PDFtoTeX add % y1
- exch #1\space PDFtoTeX sub exch % x1
- 4 2 roll exch
- \the\fitr@width\space add #1\space PDFtoTeX add exch % x2
- \the\fitr@height\space sub #2\space PDFtoTeX sub} % y2
-\else\ifx\fitr@driver\fitr@dvips@driver
-\def\ThrBbox#1#2{% Uses \fitr@bbox
- currentpoint 2 copy %
- \the\fitr@depth\space SPtoDvips add
- #2\space BPToDvips add % y1
- exch #1\space BPToDvips sub exch % x1
- 4 2 roll exch
- \the\fitr@width\space SPtoDvips add
- #1\space BPToDvips add exch % x2
- \the\fitr@height \space SPtoDvips sub
- #2\space BPToDvips sub} % y2
-\fi\fi\fi\fi
-\def\setThre@d#1#2{%
- \fitr@defaultbp{\aWd}{#1}\fitr@defaultbp{\aHt}{#2}%
- \edef\tmp@exp{\noexpand\set@rtThrd{\aWd}{\aHt}}\tmp@exp
-}
-\if@fitr@dvipdfm
-\def\set@rtThrd#1#2{\ThrBbox{#1}{#2}%
- \smash{\raisebox{-\fitr@xetex@view@height+#2bp}%
- {\makebox[0pt][l]{\hspace*{-#1bp}%
- \@pdfm@mark{thread @artthrd\CntArt\space
- width \fitr@xetex@view@width\space
- height \fitr@xetex@view@height\space
- depth \fitr@xetex@view@depth\space
- << /Title (\threadTitle)
-\ifnewarticle
- /Author (\threadAuthor)
- /Subject (\threadSubject)
- /Keywords (\threadKeywords)
-\fi >>}}}}}\else\ifx\fitr@driver\fitr@pdftex@driver
-\def\set@rtThrd#1#2{\ThrBbox{#1}{#2}%
- \makebox[0pt][l]{\hspace*{-#1bp}%
- \pdfthread
- width \fitr@pdftex@view@width\space
- height \fitr@pdftex@view@height\space
- depth \fitr@pdftex@view@depth\space
- name {\threadTitle}}}\else
-\def\set@rtThrd#1#2{\literalps@out{\artM@rk
- /Rect [\ThrBbox{\artthrd@@addtow}{\artthrd@@addtoh}]
- /Title (\threadTitle)
-\ifnewarticle
- /Author (\threadAuthor)
- /Subject (\threadSubject)
- /Keywords (\threadKeywords)
-\fi
- /ARTICLE pdfmark}}
-\fi\fi
-\endinput
-%%
-%% End of file `artthreads.sty'.
+%%
+%% This is file `artthreads.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% artthreads.dtx (with options: `copyright,package')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% artthreads.sty package, %%
+%% Copyright (C) 2016 -- 2020 %%
+%% dpstory@uakron.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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\NeedsTeXFormat{LaTeX2e}[1997/12/01]
+\ProvidesPackage{artthreads}
+ [2020/07/09 v1.3.1 Support for article threads (dps)]
+\RequirePackage{xkeyval}
+\DeclareOptionX{pdftex}{\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{luatex}{\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{dvips}{\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{dvipsone}{\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{dvipdfm}{\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{dvipdfmx}{\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{xetex}{\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{preview}
+ {\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{!preview}
+ {\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{viewMagWin}
+ {\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{!viewMagWin}
+ {\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}{fitr}}
+\ProcessOptionsX
+\RequirePackage{fitr}[2020/07/09]
+\newif\ifnewarticle
+\newcounter{@rtBtnCnt}
+\def\CntArt{0}\def\CntArtInfo{0}
+\def\inc@CntMacro#1{{\@tempcnta#1\relax\advance\@tempcnta1\relax
+ \xdef#1{\the\@tempcnta}}}
+\def\artM@rk{[\space}
+\define@key{artthrd}{title}[]{\Hy@unicodefalse
+ \pdfstringdef\threadTitle{#1}}
+ \let\threadTitle\@empty
+\define@key{artthrd}{author}[]{\pdfstringdef\threadAuthor{#1}}
+ \let\threadAuthor\@empty
+\define@key{artthrd}{keywords}[]{\pdfstringdef\threadKeywords{#1}}
+ \let\threadKeywords\@empty
+\define@key{artthrd}{subject}[]{\pdfstringdef\threadSubject{#1}}
+ \let\threadSubject\@empty
+\newcommand{\setThreadInfo}[1]{\inc@CntMacro\CntArtInfo
+ \let\threadTitle\@empty\let\threadAuthor\@empty
+ \let\threadKeywords\@empty\let\threadSubject\@empty
+ \setkeys{artthrd}{#1}\ifx\threadTitle\@empty
+ \def\threadTitle{thread-\CntArtInfo}\fi}
+\def\bArtErrMsg{When starting a new article thread
+ (\string\bArticle)\MessageBreak
+ first use \string\setThreadInfo\space to set the title,\MessageBreak
+ author, subject, and keywords}
+\define@key{@rtthrd}{addtow}[0]{%
+ \fitr@defaultbp{\artthrd@@addtow}{#1}}
+\def\artthrd@@addtow{0}
+\define@key{@rtthrd}{addtoh}[0]{%
+ \fitr@defaultbp{\artthrd@@addtoh}{#1}}
+\def\artthrd@@addtoh{0}
+\newcommand{\setAddToBorder}[1]{\setkeys{@rtthrd}{#1}}
+\newcommand{\bArticle}{\begingroup\inc@CntMacro\CntArt
+ \ifnum\CntArt=\CntArtInfo\relax\else
+ \PackageError{artthreads}{\bArtErrMsg}{See package documentation
+ for \string\setThreadInfo}\fi
+ \newarticletrue\set@rectart}
+\newcommand{\cArticle}{\begingroup\newarticlefalse\set@rectart}
+\newcommand{\set@rectart}[1]{%\def\fitr@artrect@argi{#1}% dps
+ \edef\temp@exp{\noexpand\setkeys{fitr}{#1}}\temp@exp
+ \set@@rectart}
+\def\set@@rectart{\def\fitr@setBL{0pt}%
+ \@ifundefined{ef@Bbox}{\let\fitr@FLB@ction\Bbox}%
+ {\let\fitr@FLB@ction\ef@Bbox}%
+ \get@fitr@dimen{%
+ \parbox[\fitr@@refPt][\fitr@@height]{\fitr@@width}%
+ {\kern0pt\fitr@FLB@ction{\fitr@@width}{\fitr@@height}\kern0pt}%
+ }%
+ \makebox[0pt][l]{\hspace*{\fitr@@shift}\smash{%
+ \raisebox{\fitr@@lift-\fitr@setBL}{%
+ \setThre@d{\artthrd@@addtow}{\artthrd@@addtoh}%
+ \unhbox\fitr@bbox
+ \fitr@urxury@fixup{\artthrd@@addtow}{\artthrd@@addtoh}{}%
+ }}}\setlength{\fboxsep}{0pt}%
+ \ifviewMagWin
+ \fitr@length=\artthrd@@addtow bp
+ \fitr@length=2\fitr@length
+ \addtolength{\fitr@length}{\fitr@@width}%
+ \edef\fitr@@width{\the\fitr@length}%
+ \fitr@length=\artthrd@@addtoh bp
+ \fitr@length=2\fitr@length
+ \addtolength{\fitr@length}{\fitr@@height}%
+ \edef\fitr@@height{\the\fitr@length}%
+ \setlength\fitr@length{-\artthrd@@addtow bp}%
+ \addtolength\fitr@length{\fitr@@shift}%
+ \makebox[0pt][l]{\hspace*{\fitr@length}\smash{%
+ \setlength\fitr@length{\fitr@@lift-\fitr@setBL}%
+ \if\fitr@@refPt b%
+ \addtolength\fitr@length{-\artthrd@@addtoh bp}\else
+ \if\fitr@@refPt t%
+ \addtolength\fitr@length{\artthrd@@addtoh bp}%
+ \fi\fi
+ \raisebox{\fitr@length}%
+ {\fbox{\parbox[\fitr@@refPt][\fitr@@height]%
+ {\fitr@@width}{\kern0pt\hfill\vfill\kern0pt}}}}%
+ }%
+ \fi
+\endgroup}
+\ifluatex\protected\def\pdfthread{\pdfextension thread }\fi
+\if@fitr@dvipdfm
+\def\AT@ThrBbox#1#2{%
+ \fitr@length=#1bp
+ \fitr@length=2\fitr@length
+ \advance\fitr@length\wd\fitr@bbox
+ \edef\fitr@xetex@view@width{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\ht\fitr@bbox
+ \edef\fitr@xetex@view@height{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\dp\fitr@bbox
+ \edef\fitr@xetex@view@depth{\the\fitr@length}%
+}\else
+\ifpdf
+\def\AT@ThrBbox#1#2{%
+ \fitr@length=#1bp
+ \fitr@length=2\fitr@length
+ \advance\fitr@length\wd\fitr@bbox
+ \edef\fitr@pdftex@view@width{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\ht\fitr@bbox
+ \edef\fitr@pdftex@view@height{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\dp\fitr@bbox
+ \edef\fitr@pdftex@view@depth{\the\fitr@length}%
+}\else
+\ifx\fitr@driver\fitr@dvipsone@driver
+\def\AT@ThrBbox#1#2{%
+ currentpoint 2 copy %
+ \the\fitr@depth\space add #2\space PDFtoTeX add % y1
+ exch #1\space PDFtoTeX sub exch % x1
+ 4 2 roll exch
+ \the\fitr@width\space add #1\space PDFtoTeX add exch % x2
+ \the\fitr@height\space sub #2\space PDFtoTeX sub} % y2
+\else
+\ifx\fitr@driver\fitr@dvips@driver
+\def\AT@ThrBbox#1#2{% Uses \fitr@bbox
+ currentpoint 2 copy %
+ \the\fitr@depth\space SPtoDvips add
+ #2\space BPToDvips add % y1
+ exch #1\space BPToDvips sub exch % x1
+ 4 2 roll exch
+ \the\fitr@width\space SPtoDvips add
+ #1\space BPToDvips add exch % x2
+ \the\fitr@height \space SPtoDvips sub
+ #2\space BPToDvips sub} % y2
+\fi\fi\fi\fi
+\def\setThre@d#1#2{%
+ \fitr@defaultbp{\aWd}{#1}\fitr@defaultbp{\aHt}{#2}%
+ \edef\tmp@exp{\noexpand\set@rtThrd{\aWd}{\aHt}}\tmp@exp}
+\if@fitr@dvipdfm
+\def\set@rtThrd#1#2{\AT@ThrBbox{#1}{#2}%
+ \smash{\raisebox{-\fitr@xetex@view@height+#2bp}%
+ {\makebox[0pt][l]{\hspace*{-#1bp}%
+ \@pdfm@mark{thread @artthrd\CntArt\space
+ width \fitr@xetex@view@width\space
+ height \fitr@xetex@view@height\space
+ depth \fitr@xetex@view@depth\space
+ << /Title (\threadTitle)
+ \ifnewarticle
+ /Author (\threadAuthor)
+ /Subject (\threadSubject)
+ /Keywords (\threadKeywords)\fi >>}}}}}\else
+\ifpdf
+\def\set@rtThrd#1#2{\AT@ThrBbox{#1}{#2}%
+ \makebox[0pt][l]{\hspace*{-#1bp}%
+ \pdfthread
+ width \fitr@pdftex@view@width\space
+ height \fitr@pdftex@view@height\space
+ depth \fitr@pdftex@view@depth\space
+ name {\threadTitle}}}\else
+\def\set@rtThrd#1#2{\literalps@out{\artM@rk
+ /Rect [\AT@ThrBbox{\artthrd@@addtow}{\artthrd@@addtoh}]
+ /Title (\threadTitle)
+ \ifnewarticle
+ /Author (\threadAuthor)
+ /Subject (\threadSubject)
+ /Keywords (\threadKeywords)\fi
+ /ARTICLE pdfmark}}
+\fi\fi
+\let\threadTitle\@empty
+\providecommand{\Thread}[1]{/S/Thread/D(#1)}
+\def\shArticlesPaneActn{\Named{ShowHideArticles}}
+\def\sArticlesPaneActn{\Named{ArticleThreads}}
+\def\shArticlesPaneReadActn{\shArticlesPaneActn
+ \Next{\Thread{\threadTitle}}}
+\def\sArticlesPaneReadActn{\sArticlesPaneActn
+ \Next{\Thread{\threadTitle}}}
+\def\readArticle#1{\Hy@unicodefalse
+ \pdfstringdef\AT@x{#1}\edef\threadTitle{\AT@x}}
+\def\chkThreadName{%
+ \ifx\threadTitle\@empty
+ \global\let\isThrTtl\ef@NO
+ \def\readArtPresets{\cmd{\let\Next\@gobble}}\else
+ \global\let\isThrTtl\ef@YES
+ \let\readArtPresets\@empty
+ \fi
+}
+\def\readThreadMsg{\ifx\isThrTtl\ef@NO
+ \PackageWarning{artthreads}{No thread title specified to read}\fi}
+\newcommand{\toggleArticlePane}[3][]{\stepcounter{@rtBtnCnt}%
+ \pushButton[\CA{Article}\TU{Toggle Articles Pane}#1
+ \A{\shArticlesPaneActn}
+]{TAPBtn\the@rtBtnCnt}{#2}{#3}}
+\def\tooltipTogglePaneRead#1{\def\ttToggleP@neRead{#1}}
+\tooltipTogglePaneRead{Toggle Articles pane and read
+ the article \threadTitle}
+\newcommand{\toggleArticlePaneRead}[3][]{\begingroup
+ \stepcounter{@rtBtnCnt}\pushButton[\CA{Article}#1
+ \TU{\ttToggleP@neRead}\cmd{\chkThreadName}
+ \presets{\readArtPresets}\A{\shArticlesPaneReadActn}
+]{TAPRBtn\the@rtBtnCnt}{#2}{#3}\readThreadMsg\endgroup}
+\newcommand{\showArticlePane}[3][]{\stepcounter{@rtBtnCnt}%
+ \pushButton[\CA{Article}\TU{Show Articles Pane}#1
+ \A{\sArticlesPaneActn}
+]{SAPBtn\the@rtBtnCnt}{#2}{#3}}
+\def\tooltipShowPaneRead#1{\def\ttShowP@neRead{#1}}
+\tooltipShowPaneRead{Show Articles pane and read
+ the article \threadTitle}
+\newcommand{\showArticlePaneRead}[3][]{\begingroup
+ \stepcounter{@rtBtnCnt}\pushButton[\CA{Article}#1
+ \TU{\ttShowP@neRead}\cmd{\chkThreadName}
+ \presets{\readArtPresets}\A{\sArticlesPaneReadActn}
+]{SAPRBtn\the@rtBtnCnt}{#2}{#3}\readThreadMsg\endgroup}
+\endinput
+%%
+%% End of file `artthreads.sty'.