{font-encodings} is about the various font or output code pages like T1 (for Latin) or T2*x* (for Cyrillic) which tell the compiler where to find a particular glyph (character) in a font file, hereby supporting correct hyphenation of words. A popular package for pdfLaTeX is fontenc.

learn more… | top users | synonyms (1)

225
votes
2answers
71k views

Why should I use \usepackage[T1]{fontenc}?

As a native English speaker, I've mostly been allowed the luxury of pretending that ASCII is enough, and have been able to treat font encodings as not my problem. I've seen lots of advice that I ought ...
113
votes
4answers
178k views

Why do the less than symbol (<) and the greater than symbol (>) appear wrong as upside down exclamation (¡) or question mark (¿)?

When typing < or > in LaTeX and compiling with pdflatex, the less than and greater than symbols appear at upside down exclamation points. I'm not in math mode.
87
votes
4answers
44k views

fontenc vs inputenc

I just don't seem to get it. So I come from the german speaking part of Switzerland and naturally I need ä ü ö a lot when I write german texts. So in LaTeX I have the option to go via "a "u "o which ...
69
votes
6answers
6k views

What are good ways to make pdflatex output copy-and-pasteable?

One frequent aspect of pdflatex output that could be improved is to what extent one can select text output from the generated pdf-file and copy-and-paste it. This is essentially an issue of having the ...
39
votes
4answers
28k views

How to insert pipe symbol in (La)TeX?

How to insert pipe symbol | in TeX (LaTeX)? I have tried this sample with pdflatex tmp.tex \documentclass{extarticle} \begin{document} \textpipe \end{document} And it give undefined control ...
38
votes
4answers
2k views

What is the difference between font encoding and input encoding?

From list of obsolete packages and classes we must avoid, I found 2 terminologies, i.e., font-encoding and input-encoding. What is the difference between them?
38
votes
4answers
8k views

Why are Bitmap-Fonts used automatically?

I have the following LaTeX-document: \documentclass[a4paper,11pt]{article} \usepackage[utf8x]{inputenc} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \title{Sample} \author{Litb} ...
32
votes
2answers
34k views

Error in TeX Live – Font … not loadable: Metric (TFM) file not found

I freshly installed 'basic' version of TeX Live 2012 (not full, only basic version). I have following line in my code: \usepackage[T1]{fontenc} I get following error: ...
27
votes
1answer
1k views

microtype + siunitx and \micro - mysterious warnings

This code \documentclass{scrreprt} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage{microtype} \usepackage{siunitx} \begin{document} \SI{10}{\micro\metre} \end{document} produces these ...
25
votes
2answers
2k views

How to decypher font shape warnings?

Often one gets warnings of the form (example) LaTeX Font Warning: Font shape `T1/qcs/m/sl' in size <10.95> not available (Font) Font shape `T1/qcs/m/it' tried instead on input line ...
20
votes
3answers
2k views

Do I need fontenc and inputenc

My question feels like a duplicate of: fontenc vs inputenc, but in that question the OP uses German and non-ascii characters. I speak and write in English exclusively. My keyboard is the standard ...
20
votes
2answers
4k views

How can I stop LaTeX from converting two hyphens to a single hyphen when loading package fontenc?

In the following minimal test document, I can have two hyphens appear as two hyphens (which is what I want): \documentclass[letterpaper]{article} \begin{document} A hyphen: \texttt{-} Two hyphens: ...
19
votes
2answers
2k views

Should the fontenc package be loaded before or after font packages?

I seem to recall reading somewhere that fontenc should be loaded either before or after the packages loading fonts, but I cannot remember which. I don't see differences between loading it before and ...
18
votes
1answer
2k views

In which order should I load inputenc and fontenc?

When I’m using pdfLaTeX, my preamble usually contains \usepackage[utf8]{inputenc} and \usepackage[T1]{fontenc} Should these two be loaded in any particular order? What problems could arise if ...
17
votes
4answers
774 views

Are the original CM fonts better than the current type1 fonts?

What are the differences between the original (rasterized) CM fonts and the current (smooth PDF-friendly) type1 versions of these fonts? It seems to me that the originals are much better looking. ...
17
votes
2answers
238 views

Why doesn't parskip=half work together with fontenc in bibliographies?

If \usepackage[T1]{fontenc} is used and parskip=half is set: Else (either \usepackage[T1]{fontenc} isn't used or parskip=half isn't set): I consider the second one the correct style. Why is ...
17
votes
1answer
146 views

! Corrupted NFSS tables

Update The LaTeX-bug described in this question has been resolved. With the new LaTeX in TeXlive 2015 (tested on 2015-05-14) there is no longer an error. Original Question The following code gives ...
16
votes
2answers
372 views

Where/how is kerning data stored in actual font files?

Where in most font files do they store information such as "If character %1 is followed by character %2, decrease the spacing by x points"? Are all the (%1,%2, resulting_kerning) tuples in a central ...
16
votes
2answers
3k views

Why words with accented characters can't be automatic hyphenated with the default OT1 enconding?

I was reading the first answer to this question: Why should I use \usepackage[T1]{fontenc}? [...] the default font encoding (OT1) of TeX is 7-bit and uses fonts that have 128 glyphs, and so do ...
16
votes
1answer
1k views

Proper use of cmap and mmap

I am curious about the differences between \usepackage{cmap} \usepackage[resetfonts]{cmap} \usepackage{mmap} (= \usepackage[useTeX]{mmap}) \usepackage[noTeX]{mmap} What are their precise ...
15
votes
1answer
1k views

Font encoding in LaTeX

I've been using LaTeX for a while and I've read a lot of discussion about fonts encodings. Some suggest to use T1 fonts adding \usepackage[T1]{fontenc}, other suggest to add nothing, other suggest to ...
14
votes
1answer
421 views

Escaped characters in typewriter font

I know a number of ways to fix this (e.g. \usepackage[T1]{fontenc}), but I want to understand what's happening in the following example. \documentclass{article} \begin{document} \noindent \$ \% ...
14
votes
1answer
264 views

What is the recommended way to respond to bug reports for font packages where the bug is caused by characters missing from fonts?

I received a bug report for ebgaramond-maths. Although the issue is clearly caused by my package in one sense, it is not clear to me whether there is anything which I should do about it beyond ...
13
votes
3answers
848 views

Horn accent in LaTeX

Sorry if the question is so trivial. I've just started using LaTeX couple of weeks ago and till now it's so new to me. I was trying to finish my name in a report where it's required to type a ...
13
votes
2answers
330 views

How to create new font encoding in LaTeX?

The technical documentation for the Latin Modern font family lists all available glyphs. There are more glyphs than are gathered in the accompanying encoding tables (CS, T1, L7X, OT1, OT4, QX, T5, ...
12
votes
2answers
3k views

CM clearer than CMsuper? After applying \usepackage[T1]{fontenc}, fonts get blurry

minimum working code: \documentclass{article} % \usepackage[T1]{fontenc} \begin{document} abc ABC 123 \end{document} It opens as pdf in Mac's preview and Acrobat X respectively. The left is ...
12
votes
2answers
559 views

Encoding to be able to search pdf

I am writing a document in Czech. I want To be able to fully search the pdf (at the moment I can search only for words with non-Czech characters, but I want to be able to search with Czech ...
12
votes
1answer
619 views

Why do some fonts used by siunitx and textcomp look rasterized?

For example, the mu in \SI{1.55}{\micro\metre} looks really bad for some reason. For textcomp, \textmu looks the same.
12
votes
1answer
268 views

Should I use the font encoding LY1 with the package libertine?

I normally use \usepackage[T1]{fontenc} without giving it any thought. The package libertine seems to provide more ligatures with the LY1 encoding. \documentclass{article} \usepackage{libertine} ...
11
votes
4answers
417 views

What is the reason behind why > and < don't display properly without T1 font encoding?

I've read a number of posts that ask about why the symbols > and < show up incorrectly as ¡ and ¿. The solution is to use the T1 font encoding. Okay. I'd like to learn about why these symbols show ...
11
votes
2answers
2k views

How can I get utf8 character

I want to make cross references for sections to be symbols but after using the description given I got error report saying keyboard character used is undefined in inputencoding 'utf8'. What might be ...
11
votes
2answers
1k views

Ugly d with stroke character (đ)

So, is there a font in LaTeX that will reproduce decent looking d with stroke (đ)? I'm writing a report, on Croatian, and it just looks ugly :\ mwe: \documentclass[onecolumn,11pt]{revtex4-1} ...
11
votes
2answers
3k views

Why does \usepackage[T2A]{fontenc} take over?

I want to produce a document with non-serif type. I also want to include Cyrillic characters. These two aims seem to be mutually exclusive. When I comment out \usepackage[T2A]{fontenc}, the document ...
11
votes
1answer
2k views

Migrating from pdfTeX to LuaTeX: Problems with reproducing output for legacy projects

I'm currently analyzing and evaluating a migration process from pdfTeX to LuaTeX for our current TeX workflow. With LuaTeX being a fork of pdfTeX and packages like luainputenc at hand it seemed ...
11
votes
2answers
1k views

Unicode in XeTeX with automatic font substitution?

I've got a word processor (WordGrinder) which supports Unicode. It can export LaTeX files, which then get run through XeTeX. Unfortunately, it seems that while XeTeX understands the Unicode ...
11
votes
1answer
184 views

How to make a new greek font to work with babel

I have an OpenType font (.otf) and I need to use it from pdftex. I use an 8 bit input encoding. I am stuck on the greek part with babel. The input I use is the following: ...
10
votes
3answers
557 views

File size generated from Pdflatex is too big

My instructor demands a maximum size of submitted assignment of 50kb in PDF-format. Whenever I try to build from PDFLatex the files exceed this limit. I expected the problem to be related to bitmap ...
10
votes
2answers
2k views

XeTeX: “ß” compiles as “SS”, German umlauts work

I have a problem with XeLaTeX. Although German umlauts (äöü) work, "ß" compiles to "SS". I use TeX Live 2011 on Debian x64. See this minimal example: \documentclass{minimal} ...
10
votes
2answers
2k views

Why do lower case mathcal letters show up as random symbols?

amsfonts doesn't have lowercase caligraphic letters, so when you do $\mathcal{Hello World}$ you get some odd results. (Likewise for \mathbb I believe) Now, what surprises me is not that there aren't ...
9
votes
3answers
1k views

Incompatibilities of cmap with fontenc/hyperref?

The following code doesn't compile (with pdflatex) \documentclass{article} \usepackage{cmap} \usepackage[T1]{fontenc} \usepackage[pdfa=true]{hyperref} \begin{document} Hello. \end{document} ...
9
votes
1answer
162 views

What is the difference between the hyphen-like characters #45 and #127 from the T1 encoding?

What is the difference between the symbols with decimal indices #45 and #127 from the T1 encoding? Character #45 seems to be the ordinary hyphen, but what about #127? The en-dash and em-dash are at ...
9
votes
2answers
797 views

Linux Libertine ligatures / T1

The libertine package documentation says It is recommended that the font encoding be set to T1 or LY1 but the default OT1 encoding is also supported. \documentclass{article} % ...
9
votes
1answer
721 views

How to use fonts that need different fontenc together?

I want to use one font for text and another for dropped capitals. Unfortunately, the font catalogue states that one needs fontenc parameter T1 and the other B1. Now, using T1 kind of works. ...
9
votes
1answer
81 views

Tool to find characters encoded differently in T1 vs OT1

Suppose I have written a very long document using \usepackage[T1]{fontenc}; then I remove the line to revert to the default OT1 encoding (or vice versa.) Now I want to know if anything's changed in ...
9
votes
2answers
1k views

Pi, Kappa, Latin Small Letter Long S: problems with UTF8

I'm using Springers svmono for a book with many mathematical symbols and special characters. There are quite a few problems with characters that are simply not printed (using pdfLatex), so I tried ...
9
votes
1answer
964 views

Configure LaTeX to use lmodern for T1 by default?

Like those contributing to the discussion of Why are Bitmap-Fonts used automatically?, I have also found the automatic use of bitmap fonts very annoying as the output is really horrible. My question ...
9
votes
1answer
257 views

Typesetting the Kvanta journal (Задачник «Кванта» по математике)

I've visited a colleague of mine, Karel Horák, a Czech TeXist, in Prague and he presented/gave me a nice TeX problem. He wishes to get PDF file from TeX file. It sounds easy! Issues of the Kvanta ...
8
votes
3answers
3k views

Command \nobreakspace unavailable when switching to T1 encoding under XeLaTeX

I'd like to use the luximono face for monospaced typesetting under XeLaTeX. Since it is already installed in the MikTeX distribution under T1 encoding, I switch to the latter when I need monospaced ...
8
votes
1answer
213 views

How does \_ work if OT1 is default encoding for LaTeX?

Fair warning: I know approximately zero things about fonts and font encodings, so this is perhaps another naive question on my part. Recently, I asked about the behavior of \detokenize{_}, as one ...
8
votes
1answer
311 views

How does LaTeX know which of multiple loaded output encodings to use?

The difference between LaTeX's input and output encodings has been discussed in various places; I especially like user @egreg's answer here. There is however an aspect of dealing with output ...