jgm / pandoc

Universal markup converter
https://pandoc.org
Other
33.21k stars 3.3k forks source link

Typst to Latex conversion error: unexpected end of input, function does not have a method "caption" #9692

Open m-krastev opened 2 months ago

m-krastev commented 2 months ago

Explain the problem. Include the exact command line you used and all inputs necessary to reproduce the issue. Please create as minimal an example as possible, to help the maintainers isolate the problem. Explain the output you received and how it differs from what you expected.

Pandoc does not compile a Typst document correctly.

 > pandoc --from typst --to latex main.typ  

"main.typ" (line 74, column 152):
unexpected end of input
expecting end of input
Function does not have a method "caption" or Function scope does not contain "caption"

The relevant line:

Monolingual data has been used for the improving of machine translation systems since the early days of statistical MT, with early models proposed by #cite(<brownStatisticalApproachMachine1990>, form: "prose"). 

The document compiles just fine by Typst 0.11, I am using a template called "lucky-icml" if that's any help.

Commenting out the relevant line leads to another error leading upwards in the documents to a #vruler statement. Commenting that one as well leads to an error with #show: icml2024.with(...) statement by the template. Finally commenting that one allows Pandoc to finish but then the produced document has references looking like this {[edunovUnderstandingBackTranslationScale2018{]}

Pandoc version? What version of pandoc are you using, on what OS? (If it's not the latest release, please try with the latest release before reporting the issue.)

pandoc 3.1.13 (macOS 14.4.1)

jgm commented 2 months ago

Can you upload a complete file (ideally trimmed down to the minimum necessary) that will allow me to reproduce this? Pandoc has no trouble with the one line you quote, in isolation. I need to be able to reproduce the issue or I can't solve it.