Skip to main content
Share Your Experience: Take the 2024 Developer Survey
16 votes
Accepted

Incompatibility between siunitx and gb4e

The cause of the problem The redefinition of ^ and _ that gb4e does has nothing to do with this problem, because (as @cfr notes) it isn't solved by \noautomath. The problem is some code in the ...
Alan Munn's user avatar
  • 219k
13 votes
Accepted

gb4e package causing capacity errors

The gb4e package redefines the underscore character so that it can be used in regular text mode. Although this is very useful for linguists, it can easily cause problems and in your case the problem ...
Alan Munn's user avatar
  • 219k
11 votes

While using package gb4e all the dental marks in IPA go berserk

This is caused by a bug in gb4e that arose after changes to the LaTeX kernel a few years ago. The solution is to add. \makeatletter \def\new@fontshape{} \makeatother before you load gb4e. But ...
Alan Munn's user avatar
  • 219k
8 votes
Accepted

Example number from bottom to top of a Tree in Forest

In the linguistics library, the root node is automatically set as baseline. However (since forest v2.0.3), baseline on phantom nodes is ignored --- as it should be, as they are not drawn. To set the ...
Sašo Živanović's user avatar
6 votes

Moving number labelling on forest linguistics diagrams

Forest provides the option baseline which aligns the current node with TeX's baseline when setting the tree. For this case, we can include the option in the definition of the syll style and ...
cfr's user avatar
  • 202k
6 votes

Movement arrow in gloss

Finally I have made good on my comment, and have turned my original answer into a package. The underlying code is different, and the package allows both over- and under-arrows, so I'm adding a ...
Alan Munn's user avatar
  • 219k
6 votes
Accepted

Align gb4e examples horizontally

A solution using multicol You can use the multicol package to do this. The examples really do need to be quite small, though: \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage{...
Alan Munn's user avatar
  • 219k
6 votes
Accepted

TeX capacity exceeded (OT1+ztmcm)

The code below identifies the cause and prevents the infinite loop but unfortunately \protected definitions still expand while handling primitive input file names so the _ will still be misinterpreted....
David Carlisle's user avatar
6 votes
Accepted

Syntax movement arrows in examples in XeLaTeX in beamerposter

I shouldn't do this, because you really need to learn to ask a proper question. But here is a minimal working document that shows the problem, followed by a solution. (In fact this is not totally ...
Alan Munn's user avatar
  • 219k
6 votes
Accepted

tufte-book and gb4e and footnotes / sidenotes

The gb4e package does modify the footnote code to number examples in footnotes correctly. Usually this doesn't interfere with other footnoting modifications, but the tufte classes make quite ...
Alan Munn's user avatar
  • 219k
6 votes

How to use gb4e to produce glossed example with bracket?

The \ex command assumes an optional argument for the grammaticality judgement, so your example needs to be enclosed in braces, otherwise the [ will be treated as the grammaticality judgement. There ...
Alan Munn's user avatar
  • 219k
5 votes

does not compile when using gb4e

gb4e redefines the underscore character. It looks from your error message like you have underscores in some of your labels which will stop your document compiling. So try removing the underscores from ...
Gareth Walker's user avatar
5 votes

gb4e examples numbering in chapters and footnotes

Apparently resetting arabic numerals at the end of each footnote also resets the numbering scheme. You can append this setting to \@footnotetext to keep the setting (note that you also need the global ...
Marijn's user avatar
  • 38.2k
5 votes
Accepted

Interlinear glosses with overlaps, line numbers, and speaker labels

This is a kind of proof of concept using ExPex and the savepos module of the zref package. Thanks to David Carlisle for helping with the zref code in chat. The basic idea is to set reference points ...
Alan Munn's user avatar
  • 219k
5 votes
Accepted

Automatic parentheses around example numbers

One way to do this is to use cleveref: \documentclass{article} % Package loading order matters here. % Load these packages in this order, after all other packages. \usepackage{gb4e} \usepackage{...
Alan Munn's user avatar
  • 219k
5 votes

Extra space between lines (gb4e)

You can redefine \eachwordtwo to include more space. If that leaves too much space between the free translation and the gloss line, you can redefine \trans to have a small negative \vspace{}. If you ...
Alan Munn's user avatar
  • 219k
5 votes
Accepted

Adjust margins and interline spaces in gb4e

The gb4e package isn't really designed to be customizable in this way, but it's not to hard to fix as a one time thing: \documentclass{article} \usepackage{etoolbox} \usepackage{gb4e} \makeatletter \...
Alan Munn's user avatar
  • 219k
5 votes
Accepted

gb4e: Pull out only subexample label

You can do this with the refcount and xstring packages: \documentclass[]{article} \usepackage{refcount} \usepackage{xstring} \newcommand{\subref}[1]{\StrRight{\getrefnumber{#1}}{1}} \usepackage{gb4e} ...
Alan Munn's user avatar
  • 219k
5 votes
Accepted

Cyrillic Italicization error for Times New Roman font from times package

The times package doesn't support Cyrillic. I suggest to use \usepackage{newtx} and to substitute the font family for Cyrillic with Tempora, which supports Cyrillic and is Times-based as well. Please, ...
egreg's user avatar
  • 1.1m
4 votes

Aligning gb4e examples in multicols

Instead of the horizontal space you can put a phantom sentence: change \glt \hspace{1cm}} to \glt \phantom{\lq This is correct'}}. With \phantom the vertical and horizontal space of the argument is ...
Marijn's user avatar
  • 38.2k
4 votes
Accepted

gb4e: phantom, spacing

gb4e The solution to this problem is the same as the solution provided by alexis to a question about how to put judgment marks in front of the translation line: you can use \llap. See that answer for ...
Jason Zentz's user avatar
  • 4,158
4 votes
Accepted

left-edge vertical alignment in gb4e

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 ...
alexis's user avatar
  • 7,991
4 votes

How to get the top of a tree to align with the example number and its bottom with the example text?

I believe this is quite hard to do outside forest: from TeX's perspective, a tree is just a box. However, the effect is easy to achieve by adding a tikz node next to the desired forest node using ...
Sašo Živanović's user avatar
4 votes

Long-distance movement arrow in gloss

There's no way to do this completely automatically, i.e., break up the arrow whenever the gloss line wraps. But it's possible to define two other arrow styles to draw the arrows separately. I've made ...
Alan Munn's user avatar
  • 219k
4 votes
Accepted

Linguistic glosses in polytonic Greek (polyglossia, XeLaTex) with covington

Your code sets the first gloss tier as a single "word", which is why only one word of the other tiers is aligned with it. To fix it you must enclose each aligned word in a separate set of top-level ...
alexis's user avatar
  • 7,991
4 votes
Accepted

boxed text and underline within the gb4e environment

Because of the way the glossing is done each individual word/gloss pair in the gloss lines must be separated. This is why you can't use \underline around groups of words: the entire underlined group ...
Alan Munn's user avatar
  • 219k
4 votes
Accepted

How do I put text on multiple lines in a forest tree within a gb4e example?

This has nothing to do with gb4e, but with the definition of the GP1 style in forest. There are at least three ways to fix this: Use an explicit tabular You can put the node inside an explicit ...
Alan Munn's user avatar
  • 219k
4 votes
Accepted

How to colour text inside aligned gb4e gloss examples?

Here's a version which patches the cgloss4e glossing macros to add the colour of your choice. I've created three macros: \glosscolor{} % sets the colour of the gloss elements \clt % turn colouring ...
Alan Munn's user avatar
  • 219k
4 votes
Accepted

How to combine cgloss4e, colouring and pinyin?

The xpinyin command \pinyin appears to take an argument (the documentation is all in Mandarin, which I can't read). Since the way I added the colour code was to the cgloss4e parsing macro, there's ...
Alan Munn's user avatar
  • 219k

Only top scored, non community-wiki answers of a minimum length are eligible