summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tagpair/tagpair.tex
blob: ff6b5336f3ec7ad3fb6a85b5ad8b6d54f1ff7fa9 (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[a4paper]{ltxdoc}
\usepackage{tagpair}
\usepackage{hang}
\usepackage[hidelinks]{hyperref}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{dutch}
\setlength{\parindent}{1em}
\setlength{\leftmargini}{2em}
\frenchspacing
\sloppy

\begin{document}
\title{\textsf{tagpair} -- word-by-word glosses, translations, and bibliographic
attributions}
\author{Andreas Nolda}
\date{2016/02/03 (v.\,1.1)}
\maketitle

\noindent The \textsf{tagpair} package provides environments and commands for
pairing lines, bottom lines, and tagged lines, intended to be used in particular
for word-by-word glosses, translations, and bibliographic attributions,
respectively.

This \LaTeX{} package is inspired by Marcel R. van der Goot's classic Plain
\TeX{} macros in \textsf{gloss.tex} \hyperlink{goot}{[1]}.

\section{Pairing lines}

An \emph{pairing line} is a horizontal line consisting of \emph{pairings} of
vertically stacked horizontal text boxes:
\begin{quote}
\begin{pairingline}
\pairing{\textdutch{\textit{Dit}}}{this}
\pairing{\textdutch{\textit{is}}}{is}
\pairing{\textdutch{\textit{een}}}{a}
\pairing{\textdutch{\textit{voorbeeld.}}}{example}
\pairing{\textdutch{\textit{Dit}}}{this}
\pairing{\textdutch{\textit{is}}}{is}
\pairing{\textdutch{\textit{een}}}{a}
\pairing{\textdutch{\textit{lange}}}{long}
\pairing{\textdutch{\textit{voorbeeld.}}}{example}
\pairing{\textdutch{\textit{En}}}{and}
\pairing{\textdutch{\textit{dit}}}{this}
\pairing{\textdutch{\textit{is}}}{is}
\pairing{\textdutch{\textit{een}}}{a}
\pairing{\textdutch{\textit{zeer}}}{very}
\pairing{\textdutch{\textit{lange}}}{long}
\pairing{\textdutch{\textit{voorbeeld.}}}{example}
\end{pairingline}
\end{quote}
The width of a pairing is the width of its widest text box. Pairing lines are
automatically broken across text lines, as can be seen from the above example.

\DescribeMacro{pairingline}\DescribeMacro{\pairing} For pairing lines, the
package provides the |pairingline| environment, which should contain one or more
|\pairing| commands. A |\pairing| command, in turn, has an \meta{upper text} and
a \meta{lower text} argument:
\begin{quote}
|\begin{pairingline}| \\
|\pairing{|\meta{upper text}|}{|\meta{lower text}|}| \\
\vdots \\
|\end{pairingline}|
\end{quote}

\section{Bottom lines}

A \emph{bottom line} is a horizontal line vertically below another one:
\begin{quote}
\textdutch{\textit{Dit is een voorbeeld.}}
\bottomline{`This is an example.'}
\end{quote}

\DescribeMacro{\bottomline} The |\bottomline| command sets a bottom line with
\meta{bottom text} below some \meta{preceding text}:
\begin{quote}
\meta{preceding text} \\
|\bottomline{|\meta{bottom text}|}|
\end{quote}

\section{Tagged lines}

A \emph{tagged line} is a horizontal line with a \emph{tag} set flush right on
the same line or on the next one if it does not fit into the remaining space:
\begin{quote}
\begin{taggedline}{(Marcel R. van der Goot 1990)}
\textdutch{\textit{Dit is een Nederlands voorbeeld.}}
\end{taggedline}
\end{quote}
\begin{quote}
\begin{taggedline}{(Marcel R. van der Goot 1990)}
\textdutch{\textit{Dit is een voorbeeldje in het Nederlands.}}
\end{taggedline}
\end{quote}

\DescribeMacro{taggedline} The |taggedline| environment sets a tagged line
\meta{text} with tag \meta{tag}:
\begin{quote}
|\begin{taggedline}{|\meta{tag}|}| \\
\meta{text} \\
|\end{taggedline}|
\end{quote}

\section*{\refname}
\begin{labeledpar}{{[1]}}{\hypertarget{goot}{[1]}}
Marcel R. van der Goot (1990). Midnight Macros: \textsf{gloss.tex}.
\url{http://mirrors.ctan.org/macros/generic/midnight/midnight.pdf}.
\end{labeledpar}
\end{document}