biohackrxiv / bhxiv-gen-pdf

Generate a PDF for BioHackrXiv.org
GNU General Public License v3.0
5 stars 12 forks source link

Failed to convert a markdown with diacritical or CJK chars #29

Open inutano opened 1 year ago

inutano commented 1 year ago
Failed to run command: ["/tmp/93847ba1-4359-4e4a-93ed-75d24d51b6be/bh23-pbo/paper", "BH23JP", "/app/public/papers/93847ba1-4359-4e4a-93ed-75d24d51b6be/paper.pdf", "https://github.com/biohackathon-japan/bh23-pbo"]
Generating /app/public/papers/93847ba1-4359-4e4a-93ed-75d24d51b6be/paper.pdf
Scanning directory "/tmp/93847ba1-4359-4e4a-93ed-75d24d51b6be/bh23-pbo/paper" for paper source

      -V journal_name='BioHackrXiv.org'
      -V journal_url='https://biohackrxiv.org/'
      -V logo_path='/bhxiv-gen-pdf/resources/biohackrxiv/logo.png'
      -V year='2023'
      -V submitted='05 Jul 2023'
      -V git_url='https://github.com/biohackathon-japan/bh23-pbo'
      -V event_title='DBCLS BioHackathon 2023'
      -V event_url='https://2023.biohackathon.org/'
      -V event_location='Kagawa, Japan, 2023'
      -V geometry:margin=1in
      --from markdown+autolink_bare_uris
      --template '/bhxiv-gen-pdf/resources/biohackrxiv/latex.template'
      --no-check-certificate
      --csl=/bhxiv-gen-pdf/resources/biohackrxiv/apa-new.csl
      --lua-filter='/bhxiv-gen-pdf/resources/biohackrxiv/filters/extract-cito.lua'
      --citeproc
      --lua-filter='/bhxiv-gen-pdf/resources/biohackrxiv/filters/insert-cito-in-ref.lua'
      -s
      --output='/app/public/papers/93847ba1-4359-4e4a-93ed-75d24d51b6be/paper.pdf'
      paper.md
Change into directory /tmp/93847ba1-4359-4e4a-93ed-75d24d51b6be/bh23-pbo/paper
Executing "pandoc  -V journal_name='BioHackrXiv.org' -V journal_url='https://biohackrxiv.org/' -V logo_path='/bhxiv-gen-pdf/resources/biohackrxiv/logo.png' -V year='2023' -V submitted='05 Jul 2023' -V git_url='https://github.com/biohackathon-japan/bh23-pbo' -V event_title='DBCLS BioHackathon 2023' -V event_url='https://2023.biohackathon.org/' -V event_location='Kagawa, Japan, 2023' -V geometry:margin=1in --from markdown+autolink_bare_uris --template '/bhxiv-gen-pdf/resources/biohackrxiv/latex.template' --no-check-certificate --csl=/bhxiv-gen-pdf/resources/biohackrxiv/apa-new.csl --lua-filter='/bhxiv-gen-pdf/resources/biohackrxiv/filters/extract-cito.lua' --citeproc --lua-filter='/bhxiv-gen-pdf/resources/biohackrxiv/filters/insert-cito-in-ref.lua' -s --output='/app/public/papers/93847ba1-4359-4e4a-93ed-75d24d51b6be/paper.pdf' paper.md"
Error producing PDF.
! Package inputenc Error: Unicode character 雑 (U+96D1)
(inputenc)                not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.781 (JP): 雑

Try running pandoc with --pdf-engine=xelatex.
Failed to generate /app/public/papers/93847ba1-4359-4e4a-93ed-75d24d51b6be/paper.pdf!

So far I've tried adding --pdf-engine=xelatex or --pdf-engine=lualatex parameters to the pandoc command with several combinations of the engines and the templates, but it didn't work.

I assume I need to overwrite/add the font setting of the given latex template. Any idea? @pjotrp @egonw

pjotrp commented 1 year ago

We need to add the latex font to the dependencies. Are you running this on your own machine? See also

https://tex.stackexchange.com/questions/480071/package-inputenc-error-unicode-character