public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Issue with Unicode symbols when output is PDF
Date: Mon, 27 Nov 2023 20:57:25 +0000	[thread overview]
Message-ID: <ZWUCtVj8OMjy8eR0@localhost> (raw)
In-Reply-To: <05781e20-6d14-4eab-a155-1b5ccf0edb86n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

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-discuss+unsubscribe-/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-discuss+unsubscribe-/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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ZWUCtVj8OMjy8eR0%40localhost.


  parent reply	other threads:[~2023-11-27 20:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27 20:09 J-F Rivard
     [not found] ` <05781e20-6d14-4eab-a155-1b5ccf0edb86n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-27 20:57   ` Bastien DUMONT [this message]
2023-11-27 22:25     ` BPJ
     [not found]       ` <CADAJKhC84_5urJABDdzJth49SGeuXeBb4U1ukHgdaiMx-ibyJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-11-28  9:27         ` BPJ
2023-11-28 16:34           ` Jack D. Lail
     [not found]             ` <4f4816d7-ff5c-42ea-b608-c9d56deccf2en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-28 17:18               ` J-F Rivard
     [not found]                 ` <5e64416c-2993-4f2b-902b-ffcfa4512b91n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-28 19:24                   ` BP Jonsson
     [not found]                     ` <CAFC_yuR45wn3_KaYeyr=ASKdr8qvue6BAQVUqW=M+WLEvciafg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-11-28 19:42                       ` BP Jonsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZWUCtVj8OMjy8eR0@localhost \
    --to=bastien.dumont-vwifzpto/vqstnjn9+bgxg@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).