LyX ⇒ Linguistic Glosses in Examples not aligned in Book class
Linguistic Glosses in Examples not aligned in Book class
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.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Linguistic Glosses in Examples not aligned in Book class
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
\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
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