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

How can I get sans serif linguex glosses?

You need to tell cgloss4e (style file invoked by linguex to handle glosses) that each word in the first and second line of the glossed example is to be set in a sans serif font by adding the following ...
Pavel Rudnev's user avatar
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
4 votes
Accepted

Parsing non-expandable commands like \small, using expl3

As MaxChernoff said, you can't expand \small. For this reason the following uses \exp_not:n for your two optional sub-arguments, so that the \tl_if_novalue:nTF tests are completely processed, but ...
Skillmon's user avatar
  • 61.1k
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
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
3 votes
Accepted

Getting small caps in linguistics glosses automatically using gb4e

The leipzig package provides many macros for linguistics gloss abbreviations, which you can redefine as desired, along with adding your own. Small caps are taken care of as part of the general macro ...
Jason Zentz's user avatar
  • 4,158
3 votes
Accepted

how to 'skip' a word when using linguex glosses

You can use an empty group: \documentclass[12pt,letterpaper]{article} \usepackage[utf8]{inputenc} \usepackage{linguex} \renewcommand{\firstrefdash}{} \begin{document} \exg. Chi pensi t verrà alla ...
egreg's user avatar
  • 1.1m
2 votes
Accepted

Updated gb4e + cgloss has fixed spacing between gloss and translation, but not between "preamble" and gloss

The issue is \usepackage[doublespacing]{setspace}. Apparently the \gll command triggers a new paragraph that is affected by the setspace package. A workaround is to surround your examples by the ...
Marijn's user avatar
  • 38.3k
2 votes
Accepted

Is there a way to make the first line of a four-line gloss not have gloss alignment spacing?

The simplest solution to this is to not use a three line gloss, but instead use a two line gloss with a simple \\ to end the first line. I've adjusted your code to make it compilable. \documentclass[...
Alan Munn's user avatar
  • 219k
2 votes
Accepted

Gloss command and spaces

There are two reasons for the differences in your two output examples. Both stem from your initial settings definition: \keys_define:nn { coolgl } { glue.tl_set:N = \coolgl_glue, space.tl_set:...
MentatOfDune's user avatar
2 votes
Accepted

How to fix spacing with multi-line cgloss4e examples?

The unwanted vertical spacing is caused by the flushleft environment. See this answer for a description. New answer Since we are patching a lot of commands, I’d recommend using the etoolbox package. ...
Ruixi Zhang's user avatar
  • 9,583
1 vote
Accepted

Change the line spacing inside the long free translation (gb4e)

Generally if you want to change the document line spacing it's better to use the setspace package do do so. This will give you commands that can be used inside environments to go back to singlespacing ...
Alan Munn's user avatar
  • 219k
1 vote

Parsing non-expandable commands like \small, using expl3

Obligatory self-advertisement since key=value solutions were mentioned: expkv An implementation with a key=value solution and smartish unknown-key handling (literal numeric input will be assumed to be ...
Skillmon's user avatar
  • 61.1k
1 vote

Typgloss small capitalization on glossing third line

This is a nice little package. The author didn't add support for three line glosses, but it's easy to do. Code explanation: The cgloss (and cgloss4e) packages define macros corresponding to a word ...
Alan Munn's user avatar
  • 219k
1 vote

Using abbreviation commands in glosses

A regular expression can convert .nom to .NOM: It means wrapping the gll/glt/etc in a command so the regex can get at it, though. MWE \documentclass{article} \usepackage{langsci-gb4e} \usepackage{...
Cicada's user avatar
  • 10.1k
1 vote

How to colour text inside aligned gb4e gloss examples?

If you want to shorten \color{blue} to make your code more readable, then you can define a \newcommand to change it to something shorter, in this case I chose \cb, and you still get the same output ...
AML's user avatar
  • 2,265
1 vote
Accepted

Baselineskip varies when using linguex.sty uses

The \\ in linguex (actually cgloss4e, the glossing macros) is not a newline but is a delimiter for the lines of the gloss. So to introduce the translation line properly, you should use the \glt macro: ...
Alan Munn's user avatar
  • 219k
1 vote

Extra space between lines (gb4e)

Would switching to a different gloss package be an option? In general, expex gives much better control over spacing and formatting than gb4e, and the extraglskip parameter in that package does exactly ...
Leah Velleman's user avatar

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