Special Characters in Markdown - Pandoc and Github Flavored

I am trying to use the characters greater than or equal to and less than or equal to in a document that I create in Markdown. I'm trying to get this document to render properly in PDF via Pandoc and GitHub via Giddub flavored with Markdown. However, I can't seem to find a solution to create these symbols that works as interpreted by Markdown

Regular characters (≥ and ≤) are rendered in Git Flavored Markdown just like HTML-style special characters. However, when I try to run this to get the PDF via Pandoc, I get this error:

pandoc test.md -o test.pdf
pandoc.exe: Error producing PDF from TeX source.
! Package inputenc Error: Unicode char \u8:≤ not set up for use with LaTeX.

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

l.120

Try running pandoc with --latex-engine=xelatex.

      

I used the xelatex engine and it just doesn't create the character at this location.

Latex-style special characters (like $ \ geq $) carry over perfectly to PDF via Pandoc, but not interpreted by Git Flavored Markdown.

Are there any suggestions for using special characters that work with spiced up Github Markdown and Pandoc / Latex? Or is there a way to tell Pandoc / LaTeX that it needs to interpret special characters in HTML format or something?

+3


source to share


1 answer


The default LaTeX engine (pdflatex) does not work with unicode. So using XeLaTeX is a good idea, but as @MatthewPickering pointed out, the font must also have a glyph for ≤, so switch the font to one that solves the problem:



$ echo "≤" | pandoc --latex-engine=xelatex -o test.pdf --variable mainfont=Georgia

      

+4


source







All Articles