| 1 |
\documentclass[a4paper]{ltxdoc} |
| 2 |
\usepackage{tagpair} |
| 3 |
\usepackage{hang} |
| 4 |
\usepackage[hidelinks]{hyperref} |
| 5 |
\usepackage{polyglossia} |
| 6 |
\setdefaultlanguage{english} |
| 7 |
\setotherlanguage{dutch} |
| 8 |
\setlength{\parindent}{1em} |
| 9 |
\setlength{\leftmargini}{2em} |
| 10 |
\frenchspacing |
| 11 |
\sloppy |
| 12 |
|
| 13 |
\begin{document} |
| 14 |
\title{\textsf{tagpair} -- word-by-word glosses, translations, and bibliographic |
| 15 |
attributions} |
| 16 |
\author{Andreas Nolda} |
| 17 |
\date{2016/02/03 (v.\,1.1)} |
| 18 |
\maketitle |
| 19 |
|
| 20 |
\noindent The \textsf{tagpair} package provides environments and commands for |
| 21 |
pairing lines, bottom lines, and tagged lines, intended to be used in particular |
| 22 |
for word-by-word glosses, translations, and bibliographic attributions, |
| 23 |
respectively. |
| 24 |
|
| 25 |
This \LaTeX{} package is inspired by Marcel R. van der Goot's classic Plain |
| 26 |
\TeX{} macros in \textsf{gloss.tex} \hyperlink{goot}{[1]}. |
| 27 |
|
| 28 |
\section{Pairing lines} |
| 29 |
|
| 30 |
An \emph{pairing line} is a horizontal line consisting of \emph{pairings} of |
| 31 |
vertically stacked horizontal text boxes: |
| 32 |
\begin{quote} |
| 33 |
\begin{pairingline} |
| 34 |
\pairing{\textdutch{\textit{Dit}}}{this} |
| 35 |
\pairing{\textdutch{\textit{is}}}{is} |
| 36 |
\pairing{\textdutch{\textit{een}}}{a} |
| 37 |
\pairing{\textdutch{\textit{voorbeeld.}}}{example} |
| 38 |
\pairing{\textdutch{\textit{Dit}}}{this} |
| 39 |
\pairing{\textdutch{\textit{is}}}{is} |
| 40 |
\pairing{\textdutch{\textit{een}}}{a} |
| 41 |
\pairing{\textdutch{\textit{lange}}}{long} |
| 42 |
\pairing{\textdutch{\textit{voorbeeld.}}}{example} |
| 43 |
\pairing{\textdutch{\textit{En}}}{and} |
| 44 |
\pairing{\textdutch{\textit{dit}}}{this} |
| 45 |
\pairing{\textdutch{\textit{is}}}{is} |
| 46 |
\pairing{\textdutch{\textit{een}}}{a} |
| 47 |
\pairing{\textdutch{\textit{zeer}}}{very} |
| 48 |
\pairing{\textdutch{\textit{lange}}}{long} |
| 49 |
\pairing{\textdutch{\textit{voorbeeld.}}}{example} |
| 50 |
\end{pairingline} |
| 51 |
\end{quote} |
| 52 |
The width of a pairing is the width of its widest text box. Pairing lines are |
| 53 |
automatically broken across text lines, as can be seen from the above example. |
| 54 |
|
| 55 |
\DescribeMacro{pairingline}\DescribeMacro{\pairing} For pairing lines, the |
| 56 |
package provides the |pairingline| environment, which should contain one or more |
| 57 |
|\pairing| commands. A |\pairing| command, in turn, has an \meta{upper text} and |
| 58 |
a \meta{lower text} argument: |
| 59 |
\begin{quote} |
| 60 |
|\begin{pairingline}| \\ |
| 61 |
|\pairing{|\meta{upper text}|}{|\meta{lower text}|}| \\ |
| 62 |
\vdots \\ |
| 63 |
|\end{pairingline}| |
| 64 |
\end{quote} |
| 65 |
|
| 66 |
\section{Bottom lines} |
| 67 |
|
| 68 |
A \emph{bottom line} is a horizontal line vertically below another one: |
| 69 |
\begin{quote} |
| 70 |
\textdutch{\textit{Dit is een voorbeeld.}} |
| 71 |
\bottomline{`This is an example.'} |
| 72 |
\end{quote} |
| 73 |
|
| 74 |
\DescribeMacro{\bottomline} The |\bottomline| command sets a bottom line with |
| 75 |
\meta{bottom text} below some \meta{preceding text}: |
| 76 |
\begin{quote} |
| 77 |
\meta{preceding text} \\ |
| 78 |
|\bottomline{|\meta{bottom text}|}| |
| 79 |
\end{quote} |
| 80 |
|
| 81 |
\section{Tagged lines} |
| 82 |
|
| 83 |
A \emph{tagged line} is a horizontal line with a \emph{tag} set flush right on |
| 84 |
the same line or on the next one if it does not fit into the remaining space: |
| 85 |
\begin{quote} |
| 86 |
\begin{taggedline}{(Marcel R. van der Goot 1990)} |
| 87 |
\textdutch{\textit{Dit is een Nederlands voorbeeld.}} |
| 88 |
\end{taggedline} |
| 89 |
\end{quote} |
| 90 |
\begin{quote} |
| 91 |
\begin{taggedline}{(Marcel R. van der Goot 1990)} |
| 92 |
\textdutch{\textit{Dit is een voorbeeldje in het Nederlands.}} |
| 93 |
\end{taggedline} |
| 94 |
\end{quote} |
| 95 |
|
| 96 |
\DescribeMacro{taggedline} The |taggedline| environment sets a tagged line |
| 97 |
\meta{text} with tag \meta{tag}: |
| 98 |
\begin{quote} |
| 99 |
|\begin{taggedline}{|\meta{tag}|}| \\ |
| 100 |
\meta{text} \\ |
| 101 |
|\end{taggedline}| |
| 102 |
\end{quote} |
| 103 |
|
| 104 |
\section*{\refname} |
| 105 |
\begin{labeledpar}{{[1]}}{\hypertarget{goot}{[1]}} |
| 106 |
Marcel R. van der Goot (1990). Midnight Macros: \textsf{gloss.tex}. |
| 107 |
\url{http://mirrors.ctan.org/macros/generic/midnight/midnight.pdf}. |
| 108 |
\end{labeledpar} |
| 109 |
\end{document} |