summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/artthreads/examples
diff options
context:
space:
mode:
Diffstat (limited to 'texmf-dist/doc/latex/artthreads/examples')
-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.tex127
-rw-r--r--texmf-dist/doc/latex/artthreads/examples/article_tst.tex62
3 files changed, 189 insertions, 0 deletions
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/examples/article_tech.tex b/texmf-dist/doc/latex/artthreads/examples/article_tech.tex
new file mode 100644
index 00000000..b9483dd9
--- /dev/null
+++ b/texmf-dist/doc/latex/artthreads/examples/article_tech.tex
@@ -0,0 +1,127 @@
+\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}}
+\let\pkg\textsf
+
+\setAddToBorder{addtow=4bp,addtoh=4bp}
+
+\begin{document}
+
+%\noindent
+%The two article threads: \setLink[\A{/S/Thread/D(Lipsum)}]{Read Lipsum}
+%and \setLink[\Color{red}\A{/S/Thread/D(more Lipsum)}]{Read more Lipsum}.
+
+
+\noindent
+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{%
+ title=Methodology,
+ author=D. P. Story,
+ subject=Article thread test,
+ keywords={AeB, PDF, LaTeX}
+}
+
+\begin{multicols}{2}
+\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}%
+There are two places...
+\end{Verbatim}
+Place article threads after you've finished composing your document. While
+placing threads, one or both of the options \texttt{preview} or
+\texttt{viewMagWin} should be in effect. In a \textsf{DVI} viewer, we can see
+the bounding rectangles. We can see its too low, too long and so on. For
+users of \textsf{pdflatex}, \textsf{xelatex}, etc., view your documents in
+the \textsf{DVI} previewer first (or view them as a \textsf{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 \texttt{width} is usually
+\cs{linewidth}, but the value of \texttt{height} may have to be adjusted, in
+this example, I've ``tweaked'' the \texttt{4in} by
+\texttt{2\string\baselineskip}.
+
+Naturally, after you're satisfied, you then remove \texttt{preview} and
+\texttt{viewMagWin} or change them to \texttt{!preview} and
+\texttt{!viewMagWin}. Method~(2): Another possible location is from within a
+paragraph, here, we continue the current thread using the \cs{cArticle}
+command in conjunction with the \cs{vadjust} {\TeX}
+primitive\vadjust{\noindent
+\cArticle{lift=2\baselineskip,width=\linewidth,height=4in+2\baselineskip}}.
+Between the end of the word `primitive' and the period (.) ending the
+sentence, I've place
+\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small]
+primitive\vadjust{\noindent
+ \cArticle{lift=2\baselineskip,
+ width=\linewidth,
+ height=4in+2\baselineskip}}.
+ Between the ...
+\end{Verbatim}
+The value of \texttt{lift=2\string\baselineskip} we chosen because the
+original positioning of the thread rectangle was too low by about two lines.
+The value of \texttt{height} was chosen to cover the paragraph once the
+complete paragraph was composed.
+
+Of course, in this example, it was unnecessary to insert the \cs{cArticle}
+mid-paragraph, it would have been better placed at the beginning of a
+paragraph and `lifting' more. Placing \cs{cArticle} mid-paragraph is useful
+for multi-column formats. When the paragraph flows from the first column the
+second column, use the \cs{vadjust} technique to cover the portion of the
+text that flows to the right column.
+
+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.
+\end{multicols}
+
+\noindent
+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}