Hi folks,
I'm having the same problem as this post from 2009, with Covington style linguistic glosses not aligning properly on the free translation line, but what solved their problem doesn't solve mine: http://comments.gmane.org/gmane.editors ... eral/58322
Does anyone have any suggestions? Basically, when I compile this LyX document in book format with chapter numbering turned on for examples, Examples 10 and 11 have a free translation (line 3) that doesn't line up with the rest of the example. I'm trying to figure out how to make the translation line up properly with the rest.
Also attached is an image of what the attached lyx document looks like when I compile to PDF.
LyX ⇒ Linguistic Glosses in Examples not aligned in Book class
Linguistic Glosses in Examples not aligned in Book class
Last edited by Hiram on Tue Jan 29, 2013 7:53 am, edited 4 times in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Linguistic Glosses in Examples not aligned in Book class
Just to clarify, I try to use the following code in the Preamble, and it doesn't work:
I'm wondering if there is a problem with the \renewenvironment - ie why doesn't it update the {example} environment?
Do I need to do something like globally setting the list environment? Like in this post: http://tex.stackexchange.com/questions/ ... 1128#91128
ie:
But what is the syntax I can use to globally set the \leftmargin for the example environment? Can I use the \let command to redefine the leftmargin properties for examples, as is done for figure centering in this post: http://stackoverflow.com/questions/1565 ... nvironment
ie:
I just don't know what the syntax should be, and what I've tried doesn't properly line up the third line of the gloss.
Code: Select all
\renewenvironment{example}{%
\setlength\leftmargini{3.05em}
\begin{examples}%
\settowidth{\labelwidth}{(0.00)}%
\item}
{\end{examples}}
Do I need to do something like globally setting the list environment? Like in this post: http://tex.stackexchange.com/questions/ ... 1128#91128
ie:
Code: Select all
\setlist[itemize]{leftmargin=*}
ie:
Code: Select all
\let\oldfigure\figure
\def\figure{\oldfigure\centering}
Linguistic Glosses in Examples not aligned in Book class
I discovered a temporary workaround this morning. Unfortunately I have to type it in at every instance where the free translation is not aligned, but I can force-insert a space to the line using the
Kind of annoying to adjust every single example, though. Is there a way to globally modify the equation numbering box for glosses? Or is there a way to locate the left margin of the previous sentence and start outputting the \glt line at that horizontal point?
Any help is greatly appreciated.
\hspace*{}
command, as in:Code: Select all
\gll Example 1
example one
\glt \hspace*{0.1in}`this example no longer screws up'
Any help is greatly appreciated.
Linguistic Glosses in Examples not aligned in Book class
Success! This now works, turns out I was trying to redefine the wrong environment the whole time ('example' instead of 'examples')! Thanks to Jürgen Spitzmüller on the other thread (http://comments.gmane.org/gmane.editors ... eral/58322) for this solution:
The tip on the wiki only changes the example (singular) environment.
To achieve the same with examples (plural), add the following to the
preamble;
\let\oldexamples\examples
\let\endoldexamples\endexamples
\renewenvironment{examples}{%
\setlength\leftmargini{3.05em}
\begin{oldexamples}%
\settowidth{\labelwidth}{(0.00)}}
{\end{oldexamples}}
HTH
Jürgen
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Linguistic Glosses in Examples not aligned in Book class
Many thanks for posting back with the solution, Hiram.Hiram wrote:Success! This now works, turns out I was trying to redefine the wrong environment the whole time ('example' instead of 'examples')! Thanks to Jürgen Spitzmüller on the other thread (http://comments.gmane.org/gmane.editors ... eral/58322) for this solution:
The tip on the wiki only changes the example (singular) environment.
To achieve the same with examples (plural), add the following to the
preamble;
\let\oldexamples\examples
\let\endoldexamples\endexamples
\renewenvironment{examples}{%
\setlength\leftmargini{3.05em}
\begin{oldexamples}%
\settowidth{\labelwidth}{(0.00)}}
{\end{oldexamples}}
HTH
Jürgen
Jürgen also put the solution on this wiki page:
http://wiki.lyx.org/LyX.LinguistLyX
Scott