teaxyz/white-paper

Convert markdown to pdf for Cyrillic languages

mfts opened this issue · 0 comments

mfts commented

Problem

Translation into Cyrillic languages cannot be converted to PDF with the current method.

Currently there's an issue on the first Cyrillic letter in the document like this

! LaTeX Error: Unicode character Д (U+0414)
               not set up for use with LaTeX.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.96 \begin

Solution

  1. We need to choose a font that supports Cyrillic letters / glyphs
  2. Use xelatex as pdf-engine

Proposal

Change the Makefile for Cyrillic languages to

tea.white-paper_%.pdf: i18n/%/white-paper.md i18n/%/metadata.yml tea.csl img/*
	pandoc \
	--number-sections \
	--output $@ \
	--metadata-file i18n/$*/metadata.yml \
	--filter pandoc-crossref \
	--csl=tea.csl \
	--citeproc \
	-V mainfont="Georgia" \    <--- new
	--pdf-engine xelatex \    <--- new
	$<