summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/artthreads/article_tech.tex
blob: 10505b3cad47386e8133872287114bbbeb831f43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
\documentclass{article}
\usepackage[forcolorpaper]{web}
\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}

\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{/S/Thread/D(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}\indent
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
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.

\end{document}