Motivation
In Julia, many Unicode characters are allowed as identifier. This facilitates the reading of algorithms containing greek letters like α, λ, ετc.
Question
How to fix the following Markdown codeblock so that pandoc can compile it to PDF?
```julia
= 2
```
Minimal example test.md.
Error received
$ pandoc --pdf-engine=xelatex test.md -o test.pdf
[WARNING] Missing character: There is no in font [lmmono10-regular]:!
I tried
---
mainfont: Liberation Serif
---
= 2
but I'm getting the same error.
(Edited)
My TeX Live 2020 :
I've tried mixing normal text with emojis and compile with LuaLaTeX, but only emojis were shown when the main font is set to Noto Emoji Color.
(Edit) Thanks to comment, I've managed to get LuaLaTeX working with
\documentclass{minimal}
\usepackage{fontspec}
\directlua
{luaotfload.add_fallback
("myfallback",
{
"NotoColorEmoji:mode=harf;"
}
)
}
\setmainfont{LatinModernRoman}[
RawFeature={fallback=myfallback}
]
\begin{document}
It lorem \LaTeX.
\end{document}
My new try:
---
header-includes: |
\directlua
{luaotfload.add_fallback
("myfallback",
{
"NotoColorEmoji:mode=harf;"
}
)
}
mainfont: LatinModernRoman
mainfontoptions:
- RawFeature={fallback=myfallback}
---
It lorem \LaTeX.
Error received:
$ pandoc --pdf-engine=lualatex test.md -o test.pdf
Error producing PDF.
! Undefined control sequence.
<argument> \LaTeX3 error:
Misplaced equals sign in key-value input on line 17
l.17 \fi




mainfont: Noto Color Emojibut failed. I wonder what can be done. I have two ideas : 1. try lualatex with some special pakcages 2. try last resort. – GNUSupporter 8964民主女神 地下教會 Oct 23 '20 at 16:13xelatexwithlualatexfor--pdf-engine, but I ran into the problem of "missing loca table".lualatex-devhas to be used, which is not supported by pandoc. – GNUSupporter 8964民主女神 地下教會 Oct 23 '20 at 23:21pandoc --pdf-engine=lualatex test.md -o test.pdfgives me an error of "missing loca table" as mentioned in my previous comment. I wonder if there's a way to get this simple codeblock compiled by pandoc. – GNUSupporter 8964民主女神 地下教會 Oct 24 '20 at 11:17\setmainfont{Noto Color Emoji}[Renderer=Harfbuzz]from TeX to pandoc, especially the part in[]. – GNUSupporter 8964民主女神 地下教會 Oct 24 '20 at 14:26harfbuzzfor pandoc. – GNUSupporter 8964民主女神 地下教會 Oct 25 '20 at 20:41*fontoptionsallows options infontspec, so my question becomes a LuaLaTeX question about compiling text mixed with emoji. – GNUSupporter 8964民主女神 地下教會 Oct 25 '20 at 21:08"NotoColorEmoji:mode=harf;"in direct Lua gives the desired result in LuaLaTeX. However, I ran into a problem withmainfontoptions: - RawFeature={fallback=myfallback}when I try to compile it with pandoc. LaTeX 3 is complaining abt the "Misplaced equals sign in key-value input on line 17"l.17 \fi. – GNUSupporter 8964民主女神 地下教會 Oct 25 '20 at 22:28