3

On various sites, they recommend not loading the textcomp package under XeLaTeX but to simply use the combination of fontspec & xunicode (the latter being loaded automatically by the former). This recommendation is based upon the fact that textcomp uses the deprecated TS1 encoding. However, when I try to typeset a symbol from the textcomp package, e.g. \textleaf (character 108 in the CRM font) I receive a compilation error.

My question is: Do we still need to load the textcomp package or is there an automated way, like unicode-math (for mathematical symbols) to use these symbols without loading the package?

2

This is more a comment which would be too long:

I am not getting any error. Could you please be more specific? What does the error say? What does your MWE look like?

In the following I print two leafs for you, which look nice and work without problems:

% arara: xelatex

\documentclass{article}
\usepackage{fontspec}
\usepackage{textcomp}
\usepackage{fontawesome}

\begin{document}
    \textleaf\faLeaf
\end{document}

enter image description here

  • the problems occurs when you do not load the textcomp package (recommended on different sites as obsolete for XeLaTeX) and stil want to use their glyphs. May be you can manually define them in XeLaTex/Fontspec, but I lack the knowledge? – Pieter Stroobants Jan 14 '15 at 15:06
  • @PieterStroobants I see no disadvantage in loading that package. Works like a charm. We will have to wait for other opinions. – LaRiFaRi Jan 14 '15 at 15:14

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.