1

I'm fairly new to ExPex and the documentation is fairly large and I couldn't find anything about font size. Maybe I'm looking for the wrong words. I basically want to make a 5 storied gloss (original language, phonetics, inflections, description of inflections, translation) and have different font size for them. The main reason being is the inflections and descriptions of inflections can become relatively long which makes the whole gloss long, especially because I want ExPex for longer texts.

Thus, how can I make different font sizes for different gloss parts.

3

The formatting of the gloss lines is controlled by the everygl<level> key (where level can be a, b, or c, or a user defined level) which can be set globally using the \lingset macro, or added to particular examples. This is described in section 9 of the ExPex documentation.

Here's an example showing how all three gloss lines can be set to use different sizes using the built-in font size commands \small and \footnotesize. For a 10pt document, this corresponds to 9pt and 8pt, respectively. I've also shown how to define a new gloss line for the phonetic transcription and set that line to use the tipa font. (In practice, though I would recommend using XeLaTeX and using IPA characters directly in the source, as in the second code example.)

pdfLaTeX code

\documentclass{article}
\usepackage{expex}
\usepackage[T1]{tipa}
\begin{document}
\defineglwlevels{ipa}
\lingset{everygla=\normalsize\itshape,everyglipa=\tipaencoding,everyglb=\small,everyglc=\footnotesize}
\ex
\begingl
\gla This is the first gloss line//
\glipa DIs Iz D@ f@nEtIk glOs laIn//
\glb This is the second gloss line//
\glc This is the third gloss line//
\glft This is the free translation line//
\endgl
\xe
\end{document}

output of pdflatex code

XeLaTeX code

In this example I've used XeLaTeX and set the font size using two different methods, one directly specifying the font size and the other using the same commands as in the previous example. As you can see, there is no discernible difference. Since the regular font size commands are relative to the document font size, they are safer to use than specifying absolute sizes.

\documentclass{article}
\usepackage{expex}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\setmonofont{Linux Libertine Mono O}
\begin{document}
\defineglwlevels{ipa}
\lingset{everygla=\normalsize\itshape,everyglipa=\normalsize,everyglb=\small,everyglc=\footnotesize}
\pex
\a
\begingl
\gla This is the first gloss line//
\glipa ðɪs ɪz ðə fənɛtɪk glɔs laɪn//
\glb This is the second gloss line//
\glc This is the third gloss line//
\glft This is the free translation line//
\endgl
\a
\begingl[everygla=\normalsize\itshape,everyglipa=\normalsize,everyglb=\fontsize{9}{10.8}\selectfont,everyglc=\fontsize{8}{9.6}\selectfont]
\gla This is the first gloss line//
\glipa ðɪs ɪz ðə fənɛtɪk glɔs laɪn//
\glb This is the second gloss line//
\glc This is the third gloss line//
\glft This is the free translation line//
\endgl
\xe
\end{document}

output of XeLaTeX code

  • But how does that relate to font size? Even though you typed\small, there is no visable size difference between the gloss lines, at least I don't see it. I'm looking for to give gloss lines exact sizes, these'd be 10pt, 9pt and 8pt. Could you give me a small tutorial about that? Maybe my English isn't good enough (at least in this area) to find it in the documentary but I don't find it. – Arhama Sep 4 '16 at 3:53
  • @Arhama It seems like you need a more basic introduction to LaTeX. See What are good learning resources for a LaTeX beginner?. This question What point (pt) font size are \Large etc.? will help explain how the font size commands work in LaTeX. For setting exact sizes you can use \fontsize{<size>}{<leading>}\selectfont, e.g. \fontsize{9}{10.8}\selectfont. See LaTeX — specify font point size?. – Alan Munn Sep 4 '16 at 5:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.