6

The combination of linguex.sty and Brill Roman font via fontspec.sty stops examples from aligning properly. When the label gets too wide (e.g., (108)), the example text ends up directly after the label instead of standing away from it. This ought to be controlled by \Exlabelwidth and \Exlabelsep, but tinkering with them does not work as it would with Computer Modern. Is there a straightforward solution (or do I have to do something odd, like put the example label in a widthless box)?

\documentclass[12pt]{article}
\usepackage{fontspec, linguex} 
\setmainfont{Brill Roman}
\AtBeginDocument{\settowidth{\Exlabelwidth}{(000)}}
\AtBeginDocument{\settowidth{\Exlabelsep}{(000)}}

\begin{document}

\ex.[(111)] Margin works 

\ex.[(108)] Margin collapses (label too wide)

\end{document}

Brill_version

And here is the same version without Brill/fontspec

Computer_Modern_version

6
  • I haven't got the font but if 8 is wider than 0 you probably want to use 888 not 000 as your target width May 14, 2021 at 7:03
  • That doesn’t work. I also tried setting the labels to width (0000) and (00000). May 14, 2021 at 11:10
  • The documentation says: “With some non standard fonts the default spacing can be defined only \AtBeginDocument (for reasons I do not understand), therefore the default values for the above lengths are declared \AtBeginDocument.” As you can see, I tried that, but it also did not work. May 14, 2021 at 11:12
  • these fonts? brill.com/fileasset/downloads_static/… May 14, 2021 at 13:00
  • Yes, those are the ones May 14, 2021 at 13:02

1 Answer 1

6

The linguex package does quite a bit of measuring to determine the correct widths of labels, but depending on the particular font properties its default guesses aren't necessarily correct. As you can see from the contrast between the 111 and the 108, Brill has a lot of variation in glyph width. In this case it suffices to make the internal command \philarge value slightly bigger (it's set to 4\mindigitwidth):

\documentclass[12pt]{article}
\usepackage{fontspec, linguex} 
\setmainfont{Brill Roman}
\renewcommand\philarge{4.25\mindigitwidth}

\begin{document}

\ex.[(111)] Margin works 

\ex.[(108)] Margin collapses (label now works)

\end{document}

output of code

2
  • Wouldn't 3\maxdigitwidth be more appropriate (for proportional digits)? (Of course, I don't know whether \maxdigitwidth is defined. I usually use "999" as a model in comparable situations, never "111".) May 14, 2021 at 16:19
  • @barbarabeeton There is no \maxdigitwidth defined.
    – Alan Munn
    May 14, 2021 at 16:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .