3

I use gb4e for formatting linguistic examples. I came to an example in which I want to show that one translation is correct and another reading is not allowed. I'd like to indicate that the second translation is bad by placing a raised asterisk before it. gb4e provides a way to align the left-edge vertically when an asterisk is placed in front of the first line (to indicate that the example itself is ungrammatical). Is there a way to align the left-edge when an asterisk is put on the second translation line (the \glt line)?

A MWE is as follows (I'm using xelatex):

\documentclass{article}
\usepackage{fontspec,xunicode}
\usepackage{gb4e}
\begin{document}
\begin{exe}
\ex
\gll  bites dog cat\\
    verb dd  cc\\
 \glt   `The dog bites the cat.'\\
 $^*$`The cat bites the dog.'
\end{exe}
\end{document}
renoh
  • 159

1 Answers1

4

You don't need to roll your own: Latex provides \llap, which will do just what you're after.

\glt     `The dog bites the cat.'\\
  \llap{$^*$}`The cat bites the dog.'

The contents of \llap{} are typeset in a box aligned to the left of the insertion point. The box is assigned nominal zero width, keeping the insertion point unchanged.

Note that the contents of \llap{} are effectively plastered over whatever is on its left. In your case this is always whitespace, but if you use it at the very start of an example, i.e., immediately after \ex, it may overstrike the example number if there is not enough space.

alexis
  • 7,961