That's a great tip. I had never figured out how to do that with the xlatex engine. On Tuesday, November 28, 2023 at 4:28:04 AM UTC-5 BPJ wrote: > > > Den mån 27 nov. 2023 23:25BPJ skrev: > >> The easiest fix is to put this in a text file headerincludes.tex: >> >> \usepackage{newunicodefont} >> \newfontface\notoemoji{Noto Emoji} >> \newunicodechar{📁}{\notoemoji 📁} >> > > Sorry. I made a typo. It should be "newunicodechar", not > ~~"newunicodefont"~~. > > >> Repeat the last line substituting each emoji you want to use. >> >> You may need to use Noto Sans Symbols for any non-emoji symbols you want >> to use which XeLaTeX complains about. Just repeat the second line suitably >> adjusted, and then use similar lines to the third line with the font >> command in the second pair of braces adjusted. >> >> Then when you run pandoc add "-H headerincludes.tex" (without the quotes) >> to the command line. >> >> >> Den mån 27 nov. 2023 21:58Bastien DUMONT skrev: >> >>> As the error message states, the character does not exist in DejaVu >>> Sans. You just have to use a font that has it. You may find the following >>> page useful: >>> https://graphicdesign.stackexchange.com/questions/46363/how-to-know-in-which-fonts-a-specific-glyph-is-available >>> >>> (BTW, to render characters that are missing in the selected font, >>> Word/Libreoffice substitutes it with the glyph in another font, often >>> resulting in a disharmonious display. TeX/LaTeX prefers to inform you that >>> the character doesn't exist, so that you can take the appropriate decision.) >>> >>> Le Monday 27 November 2023 à 12:09:59PM, J-F Rivard a écrit : >>> > Hello good people! >>> > >>> > Simply trying to use Unicode symbols in a Pandoc Markdown document to >>> be >>> > converted to a PDF. Please help me figure out what I'm doing wrong. >>> > >>> > Here's my input file "test.md" (it's only one line): >>> > Folder 📁 >>> > >>> > Here's the Pandoc command: >>> > pandoc test.md -o test.pdf -V mainfont="DejaVu Sans" >>> --pdf-engine=xelatex >>> > >>> > Here's the result: >>> > Missing character: There is no 📁 (U+1F4C1) in font DejaVu >>> Sans/OT:script= >>> > latn;language=dflt;mapping=tex-text;! >>> > >>> > Attached is the "verbose" version (test.log). >>> > >>> > Additional info: >>> > >>> > • This simple markdown file renders perfectly with all the other >>> output >>> > formats (i.e. html, docx, odt, tex, etc.). >>> > • I am running Ubuntu 22.04 with the latest available version of >>> Pandoc. >>> > • I've tried with all sorts of fonts (including Noto). >>> > >>> > From the bottom of my heart, I thank you for any help you can provide. >>> (I am >>> > thoroughly desperate). >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > -- >>> > You received this message because you are subscribed to the Google >>> Groups >>> > "pandoc-discuss" group. >>> > To unsubscribe from this group and stop receiving emails from it, send >>> an email >>> > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> > To view this discussion on the web visit [2] >>> https://groups.google.com/d/msgid/ >>> > pandoc-discuss/05781e20-6d14-4eab-a155-1b5ccf0edb86n% >>> 40googlegroups.com. >>> > >>> > References: >>> > >>> > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >>> > [2] >>> https://groups.google.com/d/msgid/pandoc-discuss/05781e20-6d14-4eab-a155-1b5ccf0edb86n%40googlegroups.com?utm_medium=email&utm_source=footer >>> >>> > pandoc test.md -o test.pdf -V mainfont="DejaVu Sans" >>> --pdf-engine=xelatex --verbose >>> > >>> > [makePDF] temp dir: >>> > /tmp/tex2pdf.-57b9a0d9b38c7a78 >>> > [makePDF] Command line: >>> > xelatex "-halt-on-error" "-interaction" "nonstopmode" >>> "-output-directory" "/tmp/tex2pdf.-57b9a0d9b38c7a78" >>> "/tmp/tex2pdf.-57b9a0d9b38c7a78/input.tex" >>> > >>> > [makePDF] Relevant environment variables: >>> > ("TEXINPUTS","/tmp/tex2pdf.-57b9a0d9b38c7a78:") >>> > ("TEXMFOUTPUT","/tmp/tex2pdf.-57b9a0d9b38c7a78") >>> > ("SHELL","/bin/bash") >>> > ("PWD","/home/jfr/ubiman/pandoc") >>> > ("HOME","/home/jfr") >>> > ("LANG","en_CA.UTF-8") >>> > >>> ("PATH","/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin") >>> > >>> > [makePDF] Source: >>> > % Options for packages loaded elsewhere >>> > \PassOptionsToPackage{unicode}{hyperref} >>> > \PassOptionsToPackage{hyphens}{url} >>> > % >>> > \documentclass[ >>> > ]{article} >>> > \usepackage{amsmath,amssymb} >>> > \usepackage{iftex} >>> > \ifPDFTeX >>> > \usepackage[T1]{fontenc} >>> > \usepackage[utf8]{inputenc} >>> > \usepackage{textcomp} % provide euro and other symbols >>> > \else % if luatex or xetex >>> > \usepackage{unicode-math} % this also loads fontspec >>> > \defaultfontfeatures{Scale=MatchLowercase} >>> > \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} >>> > \fi >>> > \usepackage{lmodern} >>> > \ifPDFTeX\else >>> > % xetex/luatex font selection >>> > \setmainfont[]{DejaVu Sans} >>> > \fi >>> > % Use upquote if available, for straight quotes in verbatim >>> environments >>> > \IfFileExists{upquote.sty}{\usepackage{upquote}}{} >>> > \IfFileExists{microtype.sty}{% use microtype if available >>> > \usepackage[]{microtype} >>> > \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt >>> fonts >>> > }{} >>> > \makeatletter >>> > \@ifundefined{KOMAClassName}{% if non-KOMA class >>> > \IfFileExists{parskip.sty}{% >>> > \usepackage{parskip} >>> > }{% else >>> > \setlength{\parindent}{0pt} >>> > \setlength{\parskip}{6pt plus 2pt minus 1pt}} >>> > }{% if KOMA class >>> > \KOMAoptions{parskip=half}} >>> > \makeatother >>> > \usepackage{xcolor} >>> > \setlength{\emergencystretch}{3em} % prevent overfull lines >>> > \providecommand{\tightlist}{% >>> > \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} >>> > \setcounter{secnumdepth}{-\maxdimen} % remove section numbering >>> > \ifLuaTeX >>> > \usepackage{selnolig} % disable illegal ligatures >>> > \fi >>> > >>> \IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} >>> > \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if >>> available >>> > \urlstyle{same} >>> > \hypersetup{ >>> > hidelinks, >>> > pdfcreator={LaTeX via pandoc}} >>> > >>> > \author{} >>> > \date{} >>> > >>> > \begin{document} >>> > >>> > Folder 📁 >>> > >>> > \end{document} >>> > >>> > [makePDF] Run #1 >>> > This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live >>> 2022/dev/Debian) (preloaded format=xelatex) >>> > restricted \write18 enabled. >>> > entering extended mode >>> > (/tmp/tex2pdf.-57b9a0d9b38c7a78/input.tex >>> > LaTeX2e <2021-11-15> patch level 1 >>> > L3 programming layer <2022-01-21> >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls >>> > Document Class: article 2021/10/04 v1.4n Standard LaTeX document class >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty >>> > For additional information on amsmath, use the `?' option. >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty)) >>> > (/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/unicode-math/unicode-math.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-xetex.def >>> > (|extractbb --version))) >>> > >>> (/usr/share/texlive/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty) >>> > >>> (/usr/share/texlive/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg))) >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/fix-cm.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def)) >>> > >>> (/usr/share/texlive/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex))) >>> > (/usr/share/texmf/tex/latex/lm/lmodern.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/upquote/upquote.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype-xetex.def) >>> > (/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.cfg)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/parskip/parskip.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty >>> > (/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) >>> > (/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty))) >>> > (/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg) >>> > (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/xetex.def)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/bookmark/bookmark.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty >>> > (/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty >>> > (/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty)) >>> > >>> (/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty) >>> > (/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def) >>> > >>> (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref-langpatches.def) >>> > (/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty) >>> > (/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def) >>> > (/usr/share/texlive/texmf-dist/tex/latex/url/url.sty) >>> > (/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty >>> > (/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/atbegshi-ltx.sty)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hxetex.def >>> > (/usr/share/texlive/texmf-dist/tex/generic/stringenc/stringenc.sty) >>> > >>> (/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/atveryend-ltx.sty) >>> > >>> (/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty))) >>> > (/usr/share/texlive/texmf-dist/tex/latex/bookmark/bkm-dvipdfm.def)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/xurl/xurl.sty) >>> > No file input.aux. >>> > (/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty) >>> > >>> (/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty)) >>> > >>> > Package hyperref Warning: Rerun to get /PageLabels entry. >>> > >>> > Missing character: There is no 📁 (U+1F4C1) in font DejaVu >>> Sans/OT:script=latn;l >>> > anguage=dflt;mapping=tex-text;! >>> > [1] (/tmp/tex2pdf.-57b9a0d9b38c7a78/input.aux) ) >>> > Output written on /tmp/tex2pdf.-57b9a0d9b38c7a78/input.pdf (1 page). >>> > Transcript written on /tmp/tex2pdf.-57b9a0d9b38c7a78/input.log. >>> > >>> > [makePDF] Run #2 >>> > This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live >>> 2022/dev/Debian) (preloaded format=xelatex) >>> > restricted \write18 enabled. >>> > entering extended mode >>> > (/tmp/tex2pdf.-57b9a0d9b38c7a78/input.tex >>> > LaTeX2e <2021-11-15> patch level 1 >>> > L3 programming layer <2022-01-21> >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls >>> > Document Class: article 2021/10/04 v1.4n Standard LaTeX document class >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty >>> > For additional information on amsmath, use the `?' option. >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty)) >>> > (/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/unicode-math/unicode-math.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-xetex.def >>> > (|extractbb --version))) >>> > >>> (/usr/share/texlive/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty) >>> > >>> (/usr/share/texlive/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg))) >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/fix-cm.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def)) >>> > >>> (/usr/share/texlive/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex))) >>> > (/usr/share/texmf/tex/latex/lm/lmodern.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/upquote/upquote.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype-xetex.def) >>> > (/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.cfg)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/parskip/parskip.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty >>> > (/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) >>> > (/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty))) >>> > (/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg) >>> > (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/xetex.def)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/bookmark/bookmark.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty >>> > (/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty >>> > (/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty)) >>> > >>> (/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty) >>> > (/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def) >>> > >>> (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref-langpatches.def) >>> > (/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty) >>> > (/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty) >>> > (/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def) >>> > (/usr/share/texlive/texmf-dist/tex/latex/url/url.sty) >>> > (/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty >>> > (/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/atbegshi-ltx.sty)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hxetex.def >>> > (/usr/share/texlive/texmf-dist/tex/generic/stringenc/stringenc.sty) >>> > >>> (/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/base/atveryend-ltx.sty) >>> > >>> (/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty))) >>> > (/usr/share/texlive/texmf-dist/tex/latex/bookmark/bkm-dvipdfm.def)) >>> > (/usr/share/texlive/texmf-dist/tex/latex/xurl/xurl.sty) >>> > (/tmp/tex2pdf.-57b9a0d9b38c7a78/input.aux) >>> > (/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty >>> > (/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty) >>> > >>> (/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty)) >>> > Missing character: There is no 📁 (U+1F4C1) in font DejaVu >>> Sans/OT:script=latn;l >>> > anguage=dflt;mapping=tex-text;! >>> > [1] (/tmp/tex2pdf.-57b9a0d9b38c7a78/input.aux) ) >>> > Output written on /tmp/tex2pdf.-57b9a0d9b38c7a78/input.pdf (1 page). >>> > Transcript written on /tmp/tex2pdf.-57b9a0d9b38c7a78/input.log. >>> > >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "pandoc-discuss" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/pandoc-discuss/ZWUCtVj8OMjy8eR0%40localhost >>> . >>> >> -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/4f4816d7-ff5c-42ea-b608-c9d56deccf2en%40googlegroups.com.