2

I am in the middle of a very long document (which means I will not be able to switch to XeTeX or LuaTeX), and everything is close to done with the exception of a few missing symbols. The symbols all exist as unicode characters; for now, I'm working on the Chi Rho symbol. It exists as a unicode symbol, but it does not exist in the Comprehensive LaTeX Symbol List. Does that mean that I cannot insert this character into my document in some way (other than trying to draw something)?

2
  • I understand what the Chi Rho symbol is and I know the unicode codepoints for it; the question is how to insert this as a symbol (and not a graphic). This is an example, since there are 3-4 of these that I need. – Karl Wolfschtagg Jan 22 at 6:08
5

You can compile the ☧ symbol as a standalone PDF, with LuaLaTeX or XeLaTeX, and include it. This embeds the Unicode font you used into your PDFTeX document. You can even copy and paste it.

First, compile this to chiro.pdf with LuaLaTeX or XeLaTeX: Upload it with your project as a graphic.

\documentclass{standalone}
\tracinglostchars=2
\usepackage{libertinus}

\begin{document}
☧
\end{document}

You can then embed the document in PDFLaTeX. This code with automatically scale the symbol to the height of a capital letter in the current font.

\documentclass{article}
\tracinglostchars=2
\usepackage{libertinus}
\usepackage{graphicx} % For \includegraphics
\usepackage{parskip}

\newlength{\capheight}

\newcommand\ChiRo{%
  \settoheight{\capheight}{P}%
  \includegraphics[height=\capheight]{chiro.pdf}}

\begin{document}
Chi-Ro: {\ChiRo}.

{\Huge A big \ChiRo}

{\footnotesize A small \ChiRo}
\end{document}

Libertinus sample

If you want to use the Unicode character ☧ in your source, you can add the lines

 \usepackage{newunicodechar}
 \newunicodechar{☧}{\ChiRo}
3
  • 2
    +1: Seems to be a very robust solution. – Dr. Manuel Kuehner Jan 22 at 6:45
  • If I copy/paste this solution (the standalone portion) into a new document and run XeLaTeX, I get a single page of output with a question mark in it. What am I missing? – Karl Wolfschtagg Jan 22 at 17:54
  • 1
    @KarlWolfschtagg You might be missing the latest version of Libertinus Serif. Version 7.020 has the glyph. You can substitute any other font that does; Libertinus was just an example. – Davislor Jan 22 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.