2

I am looking to create something that will look like this:

(1) A: word word word?

gloss gloss gloss?

translation translation translation?

B: word word word!

gloss gloss gloss!

translation translation translation!

For ordinary examples I am using expex like this:

\pex 
\begingl
\gla ...
\glb ...
\glft ... 
\endgl...
\xe

One thing I tried was this:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{expex}
\begin{document}
\pex<withparts>
\a<first>
\begingl
\gla Meri - mal'čik.//
\glb Mary - boy.//
\glft `Mary is a boy.'//
\endgl
\a<second>
\begingl
\gla Net, Mèri - devočka.//
\glb No, Mary - girl//
\glft `Mary is a boy.'//
\endgl
\xe\end
{document}

but it does not really work because I may need to do the gloss of a dialogue where it is speaker A - speaker B - speaker A again, but with this method I will be getting a-b-c-d...

Next I also tried this:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{expex}
\begin{document}
\pex<withparts> 
\a<first>
\begingl
\gla A: Meri - mal'čik.//
\glb A: Mary - boy.//
\glc ...//
\glft ...//
\endgl
\xe\end
{document}

I thought I would be able to replicate the example in (1) by adding \glc, \gld, \gle, but evidently a b in \gla \glb do not stand for a,b,c ...

6
  • Welcome to TeX.SX! Please show us a compilable code example of what you have tried (MWE).
    – TeXnician
    Commented Oct 27, 2017 at 16:00
  • TeXnician thank you! I have edited the question.
    – LeighEnne
    Commented Oct 27, 2017 at 16:23
  • Would it be possible to remove all those backticks and use the {} button? That would make it easier for people to help you as they can copy and paste your code better (and it looks more like a code block).
    – TeXnician
    Commented Oct 27, 2017 at 16:31
  • I hope I got it right this time)
    – LeighEnne
    Commented Oct 27, 2017 at 16:39
  • Related although maybe more than you need. tex.stackexchange.com/q/299264/2693
    – Alan Munn
    Commented Oct 27, 2017 at 17:33

1 Answer 1

4

If all you need to do is supply speaker labels, you can simply use the label= key for the example, and add your speaker labels there. All that is needed is to adjust the width of the label accordingly. To do this, I've created a command that takes your longest envisioned speaker name and adjusts the label width based on its length.

Here's a complete example:

\documentclass{article}
\usepackage{expex}
\usepackage{calc}
\newlength{\largestspkr}
\newcommand*\largestlabel[1]{\settowidth{\largestspkr}{#1~}}
\largestlabel{Speaker A}
\begin{document}
\pex[labelwidth=\largestspkr]
\a[label=Speaker A]
\begingl
\gla Meri - mal'čik.//
\glb Mary - boy.//
\glft `Mary is a boy.'//
\endgl
\a[label=Speaker B]
\begingl
\gla Net, Mèri - devočka.//
\glb No, Mary - girl//
\glft `Mary is a girl.'//
\endgl
\xe\end
{document}

output of code

0

You must log in to answer this question.

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