# list of supported chars for current LaTeX configuration

I am calling pdfLaTeX with text entered in a web form. I would like to replace important chars not supported by LaTeX with the right LaTeX command.

How can I get a list of chars supported by LaTeX so that I can program replacements for chars which I think are important? The method should include the usepackage commands I am about to have in my document because e.g. the \usepackage[utf8]{inputenc} command is extending the list of supported chars.

I am using the TeX Live distribution, provided by the package manager of Ubuntu.

-
@Stephan: A lot of chars are not directly enabled if you load inputenc e.g. the euro, but for everyone you could add a suitable definition. –  Ulrike Fischer Mar 28 '12 at 10:46
@UlrikeFischer Oh, wow. I didn't know that. Strange. Thanks for clarifying. I'll delete my comment. –  Stephan Lehmke Mar 28 '12 at 10:52

With the utf8 option, inputenc loads (if existent) a configuration file called <enc>def.dfu for every output encoding declared in the document; for example, with

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}


the loaded configuration file will be t1enc.dfu. It's really irrelevant whether fontenc is called before or after inputenc, but I prefer to have this "cleaner" order.

If the fontenc package is not loaded, very few Unicode points are activated, as results clearly from ot1enc.dfu.

However the list of supported Unicode characters can be extended either by declarations such as

\DeclareUnicodeCharacter{201D}{\textquotedblright}


where the hexadecimal code is given together with a suitable definition for the character, or by the similar

\usepackage{newunicodechar}
\newunicodechar{”}{\textquotedblright}


which has the advantage that one doesn't need to hunt through the code tables to find the correct number.

A rather rough way to show what a .dfu file contains is to run LaTeX on the following file

\documentclass{article}
\usepackage[T2A,TS1,T1]{fontenc}
\usepackage[utf8]{inputenc}
\parindent=0pt
\newcommand{\showdfu}[1]{%
\section{Encoding #1}
\begingroup\makeatletter
\renewcommand\DeclareUnicodeCharacter[2]{%
\par Code point: \texttt{##1}, Meaning: \texttt{\detokenize{##2}}, character: {\fontencoding{#1}\selectfont##2}}%
\nonstopmode\lowercase{\input{#1enc.dfu}}
\endgroup
}

\begin{document}

\showdfu{T1}
\showdfu{T2A}
\showdfu{TS1}

\end{document}


The encodings should be loaded beforehand, as shown in the example.

-
So with output encoding T1 and input encoding utf8 the resulting supported input characters will be the ASCII chars plus the Unicode chars defined in t1enc.dfu? –  Pascal Rosin Mar 29 '12 at 11:53
@PascalRosin Yes, that's basically what you get. A list of the characters and their "LaTeX Internal Character Representation" is available in the LaTeX companion. –  egreg Mar 29 '12 at 11:55
wow, that example in the last update is very helpful. Thank you! –  Pascal Rosin Mar 29 '12 at 12:19

Hava a look at The Comprehensive Latex Symbol List (164 pages) were you'll find nearly every symbol you want to set in LaTeX.

-