\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}