From b838c9c2b471f38d784e44638b063cc608894573 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 14 May 2015 21:26:34 +0000 Subject: tagpair (14may15) git-svn-id: svn://tug.org/texlive/trunk@37398 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/tagpair/tagpair.sty | 51 +++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/tagpair/tagpair.sty (limited to 'Master/texmf-dist/tex/latex/tagpair/tagpair.sty') diff --git a/Master/texmf-dist/tex/latex/tagpair/tagpair.sty b/Master/texmf-dist/tex/latex/tagpair/tagpair.sty new file mode 100644 index 00000000000..bd66e0efb93 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tagpair/tagpair.sty @@ -0,0 +1,51 @@ +\ProvidesPackage{tagpair}[2015/05/14 v1.0 Word-by-word glosses, translations, +and bibliographic attributions] + +% Copyright (C) 2015 Andreas Nolda + +% Author: Andreas Nolda +% Version: 1.0 + +% This work may be distributed and/or modified under the conditions of the LaTeX +% Project Public License, either version 1.3 of this license or (at your option) +% any later version. The latest version of this license is in +% http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all +% distributions of LaTeX version 2005/12/01 or later. + +% The following code is inspired by Marcel R. van der Goot's classic "gloss.tex". + +\RequirePackage{varwidth} + +\newsavebox{\t@g} +\newsavebox{\p@irs} + +% cf. the "\narrowragged" command in the "varwidth" package +\newcommand{\narrowraggedleft}{\rightskip\z@skip% + \leftskip\z@ plus \hsize% + \parfillskip\z@skip} + +\newenvironment{taggedline}[2][0.75]% + {\def\linewidthfactor{#1}% + \savebox{\t@g}{#2}% + \ignorespaces}% + {\unskip% + \hfil\penalty0% + \hskip1em% + \hbox{}% + \nobreak% + \hfill% + \begin{varwidth}[t]{\linewidthfactor\linewidth} + \narrowraggedleft\strut\unhbox\t@g + \end{varwidth}} + +\newenvironment{pairingline}% + {\begin{lrbox}{\p@irs}}% + {\end{lrbox}% + \unhbox\p@irs} + +\newcommand{\pairing}[2]% + {\vtop{\hbox{\strut\smash{#1}}% + \hbox{\strut\smash{#2}}}} + +\newcommand{\bottomline}[1]% + {\par\nopagebreak #1} -- cgit v1.2.3