4

I've written a main.tex document in Kile under Debian and I want to continue writing it in Windows where I've just installed TexMaker (I need to type and hear audio-recordigs, Windows has a better sound system). Both OS have a minimum installation of TeXLive 2013 with few additional packages. When I compile the main file, I get over a dozen errors: in Kile/Debian those were classified as Warnings rather than Errors. Almost all of them say this:

! Package textcomp Error: Symbol \textrightarrow not provided by (textcomp) font family ppl in TS1 encoding. (textcomp) Default family used instead. See the textcomp package documentation for explanation. Type H for immediate help.

I don't know what encoding to choose or what option to put for \usepackage[???]{inputenc}. Clearly ISO-8859-1 isn't working AND is turning my keyboard crazy (some keys don't corresppond to the symbols above them if Ctrl or Alt keys are also pressed). TexMaker is suggesting UTF-8. I thought adding \PassOptionsToPackage{warn}{textcomp} in the preamble would help compile the file...but to no avail! Help me please, I need to expedite my work!

MWE:

    \documentclass[a4paper,12pt]{scrartcl}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[italian]{babel}

\usepackage{amssymb, amsmath, amsfonts, xfrac} %tutto matematica
\usepackage{outlines}    
\PassOptionsToPackage{warn}{textcomp}
\usepackage{textcomp}

\begin{document}

\begin{outline}[enumerate]
 \1 What was blah blaha and blah?
 \2[] blah blah \textrightarrow{} lorem ipsum etc.
 \end{outline}

\end{document}

2nd not-so-MWE:

\documentclass[a4paper,12pt]{scrartcl}
\usepackage{enumerate}
\usepackage{outlines}
\usepackage{enumitem}
\setlist[enumerate,2]{label= \roman*)}
\setlist[enumerate,3]{label=\textbf{\alph*})}
\usepackage{siunitx}
\renewcommand{\SIrange}[3]{\lbrack\num{#1}\ {;}\ \num{#2}\rbrack\,\si{#3}}
 \sisetup{range-phrase = \ ;\ ,
          range-units  = brackets,
          list-units   = brackets,
          list-separator = {,\ },
          list-final-separator = {\ e\ }}
\usepackage{listings}% needed by siunitex
\usepackage{mathpazo}% needed by siunitex
%\usepackage{helvet}% needed by siunitex
\usepackage{cancel}
\usepackage{blindtext}
\usepackage{miller}
\usepackage{hyperref}
\hypersetup{pdfstartview=FitH} 
\usepackage[italian]{cleveref}

\begin{outline}[enumerate]
 \1 What was blah blaha and blah?
 \2[] blah blah \textrightarrow{} lorem ipsum etc.
 \end{outline}

\end{document} 
  • Well if I remove the undefined \blindtext your MWE compiles fine. So try to make an example that actually shows your problem. The option warn will only turn errors in warnings but not print more symbols -- and you should either pass the option to the package directly or setup it before you actually load textcomp. It is to late behind the package. – Ulrike Fischer Jun 3 '14 at 10:10
  • I've made some changes to the MWE file and it's compiling correctly (I didn't have the outlines package installed in Win7). However the real file, main.tex file is still showing a gazillion errors concerning the textcomp package and the \textrightarrow{} command. – WobblyWindows Jun 3 '14 at 10:38
  • Maybe I should post the entire list of packages and their options? I tried it on the MWE and guess what? Errors! – WobblyWindows Jun 3 '14 at 10:43
  • 1
    Move \usepackage[warn]{textcomp} up in your document – Ulrike Fischer Jun 3 '14 at 10:43
  • Please check the 2nd not-so-MWE above: it's giving errors just like the original main.tex file. – WobblyWindows Jun 3 '14 at 10:57
5

MWE:

\documentclass{article}
\usepackage{textcomp}
\usepackage{mathpazo}
\begin{document}
\textrightarrow
\end{document}

It generates the error:

! Package textcomp Error: Symbol \textrightarrow not provided by
(textcomp)                font family ppl in TS1 encoding.
(textcomp)                Default family used instead.

The problem is independent from package inputenc. The package mainly controls characters with character codes between 127 and 255, not the ASCII characters. It maps them to LICRs (LaTeX internal character represnetation), e.g. ö becomes \"o.

Package fontenc maps the LICRs to the font encoding slots or replacement code.

The font encoding TS1 is a little special. There are many fonts that do not cover all characters in this encoding. Therefore package textcomp defines encoding subsets that do not define all slots for such fonts. Font ppl (Palatino) has subset 3. It is explained in the .log file:

Package textcomp Info: Sub-encoding information:
(textcomp)               5 = only ISO-Adobe without \textcurrency
(textcomp)               4 = 5 + \texteuro
(textcomp)               3 = 4 + \textohm
(textcomp)               2 = 3 + \textestimated + \textcurrency
(textcomp)               1 = TS1 - \textcircled - \t
(textcomp)               0 = TS1 (full)

The font project TeX Gyre extends the free available URW fonts:

TeX Gyre Pag­ella is based on URW Pal­la­dio L (from Palatino, de­signed by Her­mann Zapf in the 1940s).

The text fonts can be easily replaced by TeX Gyre Pagella with package tgpagella:

\usepackage{mathpazo}
\usepackage{tgpagella}

Package mathpazo is kept for the math fonts, that still use Palatino.

Full example:

\documentclass{article}
\usepackage{textcomp}
\usepackage{mathpazo}
\usepackage{tgpagella}
\begin{document}
\textrightarrow $\rightarrow$
\end{document}

Result

Here the text version comes from TeX Gyre Pagella, the math version from the default Computer Modern fonts.


Example for LuaTeX/XeTeX:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}
\begin{document}
  \textrightarrow → $\rightarrow →$
\end{document}

Result LuaTeX

The text and math versions of TeX Gyre Pagella (Math) use a different shape for U+2192 (RIGHTWARDS ARROW).

| improve this answer | |

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.