Inline annotation with transliteration, furigana, grammar etc

I don’t think this has any existing solutions, but I want to ask before causing myself unnecessary complications.

In some contexts it’s useful to write a line of “actual text” and then have additional information under or over each line. In Chinese you sometimes want pinyin underneath; Japanese has furigana which is usually over the text; for linguistics and teaching it’s helpful to show the grammatical syntax underneath.

Example of Chinese:

Example of syntax markup:

If the text and annotation are needed to line up neatly (as here) I can’t think of an option other than laboriously writing everything out in tables while monitoring to check it doesn’t get wider than the page and start flowing.

If they aren’t, I can’t think of a solution other than writing out each line manually with the corresponding annotations underneath.

I won’t be surprised if there isn’t a way of doing this more neatly, but if there is, I’d love to know.

Furigana is a bit different because it’s often only associated with specific characters whose pronunciation needs clarifying, like personal names. So there might be a different solution, like wrapping those characters in something that creates a box that is placed just above them. I don’t need furigana at the moment, I just brought it up because it’s related to the overall question.

For the syntax markup, have a look at leipzig-glossing in Typst Universe.

:slight_smile:

Mark

1 Like

Have started playing with leipzig-glossing, thanks! I think it’s probably going to be good enough for my purposes, but I need more experimentation.

I have a feeling that doing some kind of blasphemous mashup with 📖 How to typeset two texts in parallel on pairs of facing pages? - #5 by sijo may allow parallel text in facing pages with glossed (pinyin’ed, etc.) text on one page and a translation on matching lines. Will see when I’ve had more sleep…

You’re going to be up against it a bit creating a parallel translation with matching lines given that (a) an English translation needs roughly 1.5 times the length of the Chinese source, and (b) the discourse structure of the two languages is so different.

:slight_smile:

Mark

I really am. For what I’m doing, though, the English text doesn’t need to line up exactly; roughly-corresponding sentences will do, and I’ll just be leaving gaps between them as necessary to achieve that.