Packages I am loading:
\usepackage{unicode-math}
\usepackage{ucharclasses}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{tikz}
\usepackage{xpatch}
\usepackage{imakeidx}
\usepackage{xltxtra}
\setmainfont{TeX Gyre Schola}
\setmathfont{TeX Gyre Schola Math}
\setmathfont{TeX Gyre Termes Math}
\setmathfont{Latin Modern Math}
\setmathfont{TeX Gyre Bonum Math}
\setmathfont{TeX Gyre Pagella Math}
\usepackage{geometry}
\geometry{%
twoside
,bindingoffset=1cm
,top=1.5cm
,bottom=0.5cm
,left=0.9cm
,right=0.6cm
,asymmetric
}
%% Leave me LAST!
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=blue,
urlcolor=black
}
My setting: I download some data from the web which contains html-formatted chunks (e.g. give me £12 and 1 ≤ x! etc.), then I pass this through pandoc to convert the same chunk in latex. I place those latex chunks inside my latex template and run xelatex on it. Just to be clear: the template is mine, pandoc only converts some chunks of html to latex, it does not produce the whole latex document.
The html's £ are converted by pandoc to unicode chars which xelatex can deal with (I would prefered to have them all as tex-math symbols as i am really annoyed with littering my source documents with unicode except "foreign" languages).
The problem with above setting is that unicode chars like ≤ (U+2264), and | (U+2502) are not found by xelatex. I have managed to load different fonts (as per Missing character: There is no ℕ in font cmss10! , my packages are shown at the beginning of this post) and now xelatex recognises most of these unicode chars except | (U+2502).
I get:
Missing character: There is no │ (U+2502) in font TeX Gyre Schola/OT:script=lat
n;language=dflt;mapping=tex-text;!
Update: The above problem has been solved thanks to the comments I got. But I have now same problem with different character. Here is the script:
\documentclass[12pt,a4paper]{book}
%\usepackage{fontspec}
\usepackage{unicode-math}
\setmainfont{TeX Gyre Schola}
\setmathfont{TeX Gyre Schola Math}
\usepackage{newunicodechar}
%\newunicodechar{^^^^1D45A}{a} % this does not recognise hex
\begin{document}
this -1 should read $m-1$
\end{document}
m is not rendered with this error in log:
Missing character: There is no (U+1D45A) in font TeX Gyre Schola/OT:script=la
But that font is there.
Update: this has now been solved (thanks @David Carlisle):
Is there a font which supports this char?
Update: this has now been solved, Yes use albatross!!!! (which is great, thanks @Ulrike Fischer):
Is there a place where I can enter the unicode char and find a tex font which supports it?


albatross U+2502will output a list of fonts on your system. see e.g. https://tex.stackexchange.com/a/627471/2388. Side remark: xltxtra is mostly obsolete and textcomp is in the kernel now. – Ulrike Fischer Sep 29 '22 at 10:32\usepackage{textcomp}with xelatex (or even with pdflatex with current releases) avoid\usepackage{xltxtra}as well, just use\usepackage{fontspec}– David Carlisle Sep 29 '22 at 10:37\setmathfont{TeX Gyre Schola Math} \setmathfont{TeX Gyre Termes Math} \setmathfont{Latin Modern Math} \setmathfont{TeX Gyre Bonum Math} \setmathfont{TeX Gyre Pagella Math}all these are resetting everything, only the last one is having any effect – David Carlisle Sep 29 '22 at 10:39TeX Gyre Scholayou should probably have\setmathfont{TeX Gyre Schola Math}not\setmathfont{TeX Gyre Pagella Math}– David Carlisle Sep 29 '22 at 10:42this does not recognise hexyou have invalid syntax,^^^^requires lowercase hex, you could also use\newunicodechar{}{m}– David Carlisle Sep 29 '22 at 16:06\newunicodechar{}{m}did not work, I stupidly missed\usepackage{newunicodechar}. So it DOES work. But this doesnt (so as not pollute my document with all these unicodes):\newunicodechar{^^^^1d454}{a}– bliako Sep 29 '22 at 16:46^. – egreg Sep 29 '22 at 21:07^. – bliako Sep 30 '22 at 07:19