Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using XeLaTeX with pandoc to generate PDFs from markdown files: but the "⇒" character (UTF8) does not get correctly generated (it's not show in the output file). Is it possible to get the "⇒" character converted from markdown to PDF without using $\Rightarrow$?

(I'm already using the xunicode and xlxstra packages)

share|improve this question
1  
Pandoc converts the file correctly. The point is that the text font you use (probably latin modern) does not contain the ⇒ character. If you change the font to e.g. iwona, the ⇒ symbol appears. –  Marco Feb 24 '13 at 21:03
    
Thanks! ...It was embarassing simple to solve :) –  Federico Feb 24 '13 at 21:51
    
@Marco: Make that an answer, please. –  Martin Schröder Feb 25 '13 at 11:19
add comment

1 Answer

Pandoc converts the file correctly. If you open the resulting file with a text editor you see the ⇒ symbol, which in turn means that pandoc has done a good job.

The point is that the text font you use (probably Latin Modern) does not contain the ⇒ character. If you change the font to a different one which contains the ⇒ symbol, e.g. iwona, it will appear as expected.

If you want to keep using Latin Modern as bodyfont, here's a small hack which takes the ⇒ symbol from the math font instead (it's a plain TeX solution, maybe LaTeX provides some nice abstraction around this): Place the following code into fixRightarrow.tex:

\catcode`\⇒\active
\def⇒{$\Rightarrow$}

and call pandoc with the --include-before-body argument:

pandoc \
  --include-before-body=fixRightarrow.tex \
  --to=latex                              \
  --output=output.tex                     \
  input.md
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.