TransWikia.com

How to Type Clitic Examples with the gb4e Package

TeX - LaTeX Asked on July 5, 2021

I was struggling to use clitics in my glosses, as it forces the use of an = sign. I searched for a long time, but every question I was able to find was specific to math. Normally, the use of mathematical symbols is not a problem, as you can just use the $__$ format. However, this does not work withing the forest package, as shown by the example below.

documentclass[12pt, letterpaper]{article}

usepackage{forest}

usepackage{gb4e}

begin{document}

begin{exe}
ex Enclisis 
label{EnclisisorLocativeCase1}
begin{center}
begin{forest}
[PP [DP [NP [N[pahá,tier=word]]] [D[-ø,tier=word]]] [P[=ta,tier=word]]]
end{forest}
end{center}
end{exe}

end{document}

2 Answers

To fix this, you have to use the ensuremath{} command. The following MWE actually works:

documentclass[12pt, letterpaper]{article}

usepackage{forest}

usepackage{gb4e}

begin{document}

begin{exe}
ex Enclisis 
label{EnclisisorLocativeCase1}
begin{center}
begin{forest}
[PP [DP [NP [N[pahá,tier=word]]] [D[-ø,tier=word]]] [P[ensuremath{=}ta,tier=word]]]
end{forest}
end{center}
end{exe}

end{document}

Answered by NLing on July 5, 2021

As David Carlisle says in the comment, there's no need for ensuremath here, and in fact you probably don't want it. You simply need to protect the = sign from the forest parsing mechanism. And the normal way to do that is to simply enclose the =ta (or even just the =) in {..}.

Also, you shouldn't use to get a new line in an example like this (as opposed to within a gll line, of course, in which is a delimiter.)

If you really need a blank line, or you want to put unnumbered material below an example, you should use the sn macro (which stands for 'sin número' = without number).

documentclass[12pt, letterpaper]{article}

usepackage{forest}

usepackage{gb4e}

begin{document}

begin{exe}
ex Enclisis
label{EnclisisorLocativeCase1}
snbegin{center}
begin{forest}
[PP [DP [NP [N[pahá,tier=word]]] [D[-ø,tier=word]]] [P[{=ta},tier=word]]]
end{forest}
end{center}
end{exe}

end{document}

Answered by Alan Munn on July 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP