I'm trying to create linguistic examples with interlinear glosses where the first line is not interlinearized. This would be useful for adding a line of orthographic text in the local language, then having a line of IPA marked for clitics/affixes, and then appropriate glosses.
I'm attaching a minimal example as a LyX file, which should be pretty straightforward. I'm also attaching a couple PDFs. The first is what the LyX file outputs. The second is what I have been able to do through a variety of workaround solutions. I'm hoping someone on the list has a much simpler redefinition code that would allow me to adjust the Tri-glosse environment.
What I currently get:
What I want to get:
LyX ⇒ No interlinear on first line of gloss?
No interlinear on first line of gloss?
- Attachments
-
- Gloss and Tri-glosse.lyx
- Minimal working example
- (2.3 KiB) Downloaded 524 times
No interlinear on first line of gloss?
SOLVED!
So excited when I found this solution, after many headaches, trial and error. I was able to locally redefine the
Just paste the following code in your document's preamble:
This prints the first line of Tri-Glosse as an un-interlinearized line and then the following two lines are interlinearized.
I'm also attaching a .LyX file as a MWE.
So excited when I found this solution, after many headaches, trial and error. I was able to locally redefine the
\threesent
macro for covington.sty
in my preamble.Just paste the following code in your document's preamble:
Code: Select all
{\catcode`\^^M=12 \endlinechar=-1 % 12 = other
\gdef\threesent#1^^M#2^^M#3^^M % #1 = first line, #2 = second line, #3 = third
{\eachwordone#1\newline%
\getwords(\linetwo,\eachwordtwo)#2 ^^M%
\getwords(\linethree,\eachwordthree)#3 ^^M%
\loop\lastword{\eachwordtwo}{\linetwo}{\wordtwo}%
\lastword{\eachwordthree}{\linethree}{\wordthree}%
\global\setbox\gline=\hbox{\unhbox\gline
\hskip\glossglue
\vtop{\box\lineone%\wordone % vtop was vbox
\nointerlineskip
\box\wordtwo
\nointerlineskip
\box\wordthree
}%
}%
\testdone
\ifnotdone
\repeat
\egroup % matches \bgroup in \gloss
}
}
I'm also attaching a .LyX file as a MWE.
- Attachments
-
- Gloss and Tri-glosse.lyx
- Working example with preamble code
- (3.32 KiB) Downloaded 493 times