\documentclass[]{article}

\usepackage[iso-8859-1]{inputenx}
\usepackage[T1]{fontenc} 

\begin{document}
¡
£
§
©
ª
«   
¬   
®   
\end{document}

I was wondering. When I typeset a document using the package+option \usepackage[iso-8859-1]{inputenx} then I would naturally assume that I can use all characters that are defined for iso-8859-1 (Wikipedia link).

My exampke document here works but as soon as I add some characters then I get an error message. For example the Yen symbol (¥):

! LaTeX Error: Command \textyen unavailable in encoding T1.

In the inputenx documentation there you can find the following code in the iso-8859-1 section:

\ProvideTextCommandDefault{\textyen}{%
    \TextSymbolUnavailable\textyen
}

Maybe this is related.

On the other hand maybe the error nessage refers to the fontenc T1.

Main Question

Why are not all iso-8859-1 chatacters are availabe when using \usepackage[iso-8859-1]{inputenx}?

  • 1
    Because there is no yen symbol in the T1 encoding, exactly as the message says. The input encoding option simply translates ¥ to \textyen. Load also textcomp. – egreg Sep 24 '16 at 17:00
  • @egreg Thanks - I just didn't get it. – Dr. Manuel Kuehner Sep 25 '16 at 9:16
up vote 4 down vote accepted

the input encoding specifies the interpretation of the input bytes, and there the byte is correctly interpreted as a yen and latex converts it to \textyen.

What happens then is independent of the input encoding, and equivalent to if you have \textyen in your source file. If that command is defined to produce a character it will (You could use textcomp package for example), but as the document font encoding is specified as T1 which does not have a yen, then by default you get the error that you show.

It is easier perhaps to see the distinction if you use [utf8] input, that allows the interpretation of thousands of input characters, but still if you are using T1 encoding the font only has 256 characters in it.

  • Thanks for the explanation. Is there something similar to utf-8 for the fontenc package? Isn't Latin 1 also 265 characters as T1? – Dr. Manuel Kuehner Sep 24 '16 at 21:27
  • 1
    @Dr.ManuelKuehner latin1 and T1 are both 256 character things but not the same set of characters. There are unicode fonts with thousands of characters but you can not access them from pdftex, you need xetex or luatex. – David Carlisle Sep 24 '16 at 21:55

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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