cysouw / pandoc-ling

Pandoc Lua filter for linguistic examples
Creative Commons Zero v1.0 Universal
36 stars 6 forks source link

Interlinear examples without free translation #6

Open camilstaps opened 3 years ago

camilstaps commented 3 years ago

When the meaning of a sentence in an interlinear example is obvious from the glosses (or not important for the argument), I like to exclude the free translation. I currently approximate this with:

::: ex
| Dutch
| Het meisje dat over straat liep.
| The girl that on street walked.
|
:::

But then an empty free translation is included. This is visible with ExPex; note the space between the examples:

2021-08-27-114657_271x107

When I omit the empty last line, the glosses are used as a translation (not sure if this is a feature or a bug):

::: ex
| Dutch
| Het meisje dat over straat liep.
| The girl that on street walked.
:::

2021-08-27-114754_272x110

Would it be possible to omit the free translation when it's empty (first example) and/or unspecified (second example)? Or is there already another way to accomplish this?

I would be happy to try and implement this myself, if you let me know what the desired behaviour is.

cysouw commented 3 years ago

Good point. I assumed that an interlinear gloss always needs a translation. The current implementation is a mess, though. I have to refactor that ... I'll have a look whether I can add this with a quick fix in the meantime.

cysouw commented 1 year ago

Sorry, I don't see any quick fix possibility for now. I hope to make a version 2 at some point with a complete rewrite of the code. I'll keep this in mind for then!