I'd like to convert markdown text like:
This is a smile 😀
To a PDF with the emoji on it. To be clear, I want to be able to insert the emoji character itself in the source text, not something like
How can I do this with Pandoc?
Try replacing the
:smile: with HTML like so:
This is a smile <img src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f604.png"/>
After initially having read the OP too superficially (overlooking his need to NOT use
:smile: & friends in his source Markdown), here is a better answer. Try one of these:
pandoc -o emoji.pdf --pdf-engine=lualatex -V mainfonts="DejaVu Sans" pandoc -o emoji.pdf --pdf-engine=xelatex -V mainfonts="DejaVu Sans"
If you use the default pdf-engine (
pdflatex), you'll not succeed, but get an error like
! Package inputenc Error: Unicode character 😀 (U+1F600) (inputenc) not set up for use with LaTeX.
If you do not specify the
mainfonts param, you'll get an warning message of
[WARNING] Missing character: There is no 😄 (U+1F604) in font [lmroman10-regular]:+tlig;
for XeLaTeX and of
[WARNING] Missing character: There is no 😄 in font [lmroman10-regular]:mapping=tex-text;!
for LuaLaTeX. While both will be producing a PDF, they'll have no emoji where you wanted it.