TeX - LaTeX Asked by Daniel Harbour on August 10, 2021
A linguistics publisher wants me to switch from morpheme-by-morpheme alignment:
to word-by-word alignment:
I have been using the tabular environment for glossing. For the purposes of this question, let’s pretend I have been using two commands, gloss
and glom
. Both take two arguments and build them into a left-aligned table, with one under the other (the second under the first). The two commands differ in that gloss
leaves a space after the table it builds, but glom
gobbles the space and puts a hyphen after both its arguments. (See MWE below.)
Can I redefine these commands so that they align as the publisher wants? I probably don’t need a full solution. Knowing how to redefine gloss
so as to close up the space between teuer- and er (and the space between herb- and tea) will probably be enough.
documentclass[12pt]{article}
newcommand{gloss}[2]{begin{tabular}[t]{@{}l@{}}#1#2end{tabular} }
newcommand{glom}[2]{begin{tabular}[t]{@{}l@{}}#1-#2-end{tabular}ignorespaces}
begin{document}
glom{teuer}{expensive}
gloss{er}{textsc{m.sg.nom}}
glom{Kr"auter}{herb}
gloss{tee}{tea}
end{document}
documentclass[12pt]{article}
newcommand{gloss}[2]{begin{tabular}[t]{@{}l@{}}#1#2end{tabular} }
newcommand{glom}[5]{#3{#1-#4}{#2-#5}}
begin{document}
glom{teuer}{expensive}
gloss{er}{textsc{m.sg.nom}}
glom{Kr"auter}{herb}
gloss{tee}{tea}
end{document}
Correct answer by David Carlisle on August 10, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP