Skip to content

Error for table inside noFormat=true example for Latex output #33

Description

@speechchemistry

From the README:

If you want to add something else (not a linguistic example) in a numbered example, then there is the local option noFormat=true. An attempt will be made to try and do a reasonable layout.

This is helpful functionality. I have paradigms that I would like to have give a single example number to but represented in a table. This works for HTML but not Latex. For example with the following table:

::: {#ex:reflexive_pronouns .ex noFormat=true}

| Zhire    | Gloss      |
| -------- | ---------- |
| [ʑʷòtì]  | myself     |
| [ʑʷòrkù] | yourself   |
| [ʑʷòrkà] | himself    |
| [ʑʷōlē]  | ourselves  |
| [ʑʷōrkī] | yourselves |
| [ʑʷòrmɔ̀] | themselves |

:::

pandoc input.md --lua-filter pandoc-ling.lua -o output.tex
I get the following error:

Error running filter pandoc-ling.lua:
pandoc-ling.lua:974: bad argument #1 to 'extend' (table expected, got nil)
stack traceback:
        pandoc-ling.lua:974: in function 'texSquashMulti'
        pandoc-ling.lua:1155: in function 'texMakeLinguex'
        pandoc-ling.lua:990: in function 'texMakeExample'
        pandoc-ling.lua:271: in function 'processDiv'

A workaround would be to just use a standard table and forget about using pandoc-ling for paradigms. (In fact I can't quite work out what the linguistic convention should be for this type of data. I haven't found explicit guidance e.g. in Haspelmath (2014). Google Gemini suggests my current approach of creating a table with an example number.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions