I am writing a bilingual test file for English and Tamil in the same markdown document to yield a PDF via lualatex and babel. The file, which correctly gives HTML and epub outputs, is: ``` --- title: "Bilingual Test for LuaLaTeX and Babel: English and Tamil" lang: en-GB --- This is English. {\sffamily This is also English.} இது தமிழ். {\sffamily இதுவும் தமிழ்.} :::{lang=ta} இது கூட தமிழ் தான். ::: Back to English and EOF. ``` The included `babel-in-header.tex` file is: ``` % babel-in-header.textsf \babelfont{rm}[Scale=1.0,Language=Default,BoldFont={* SemiBold}]{Noto Serif} \babelfont{sf}[Language=Default,BoldFont={* SemiBold}]{Noto Sans} \babelfont[tamil]{rm}[Language=Default]{Noto Serif Tamil} \babelfont[tamil]{sf}[Language=Default]{Noto Sans Tamil} \babelprovide[import,onchar=ids fonts]{tamil} \defaultfontfeatures{Scale=MatchLowercase,Ligatures=TeX,Renderer=HarfBuzz} \thispagestyle{empty} ``` The compilation command is: pandoc --from markdown --to latex --include-in-header babel-in-header.tex --standalone --output en-ta-test.tex en-ta-test.md I find that the generated .tex file cannot be compiled to PDF because there appear to be two errors, which might be bugs: 1. The \babelfont commands appear _before_ the \usepackage{babel} invocation in the .tex file because of a commented requirement for polyglossia, which I am not using. As a result, I get an ``` ! Undefined control sequence. l.59 \babelfont {rm}[Scale=1.0,Language=Default,BoldFont={* SemiBold}]{Noto Serif} ``` error with lualatex. 2. If I manually transpose the \babelfont commands inserted by the `babel-in-header.tex` file to appear _after_ the babel invocation but before \title in the .tex file, I get this error: ``` ! Package babel Error: Unknown option 'tamil'. Either you misspelled it (babel) or the language definition file tamil.ldf was not found. See the babel package documentation for explanation. ``` 3. If I remove `tamil,` from the babel invocation, ``` \usepackage[tamil,main=british]{babel} ``` I am able to compile with lualatex, using the same command as before, and get the expected PDF, as shown in the attached screenshot. I realize that both pandoc and the babel package are under development, and are therefore moving targets. Nevertheless, I believe these are bugs in the markdown to latex conversion process and point them out so that they may be corrected or circumvented, automatically rather than manually, from the pandoc end. Thanks. Chandra -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b865ce6f-aa23-a1f0-b5f7-35601791d215%40gmail.com.