{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)

190
votes
2answers
52k 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 ...
79
votes
4answers
122k 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.
68
votes
4answers
27k 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 ...
65
votes
6answers
4k 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 ...
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?
31
votes
4answers
5k 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} ...
30
votes
4answers
21k 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 ...
24
votes
1answer
934 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 ...
20
votes
2answers
739 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 ...
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
3answers
1k 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 ...
17
votes
2answers
196 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 ...
16
votes
4answers
707 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. ...
16
votes
2answers
274 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
2k 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
2answers
1k 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 ...
15
votes
1answer
3k 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: ...
14
votes
1answer
997 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 ...
13
votes
1answer
876 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 ...
12
votes
2answers
389 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
3answers
632 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 ...
12
votes
1answer
307 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 \$ \% ...
12
votes
1answer
551 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
2answers
258 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
1answer
180 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
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
660 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
1answer
1k 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
870 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
157 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
2answers
2k 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 ...
10
votes
2answers
1k 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 ...
9
votes
2answers
1k 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} ...
9
votes
2answers
1k 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
1answer
140 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
1answer
543 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
910 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 ...
8
votes
3answers
890 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} ...
8
votes
2answers
11k 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: ...
8
votes
1answer
169 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
2answers
283 views

Dollar sign with txfonts and fontenc

I have a strange problem with the dollar sign ($) and \textbf{} when using the txfonts and fontenc packages. The dollar sign has a space after it. Both packages are required to reproduce the problem. ...
8
votes
2answers
4k views

Error when using T1 fontenc and urw-garamond from mathdesign

What is causing this error? (see the transcript file for additional information){E:/MikTeX/fonts/enc/dvips/ fontname/texnansi.enc} !pdfTeX error: miktex-pdftex (file ugmr8a.pfb): cannot open Type 1 ...
8
votes
2answers
566 views

best practice international template

I would like to have a template which can be internationalised (i.e. is suited for latin script languages) and uses the microtype package. I suppose that we therefore need the following packages: ...
8
votes
1answer
76 views

space after characters with carons

If I write ďalej or ťaťa, there is a little space after characters ď and ť (and also ľ). Is it possible to remove this space ? I'm using cp1250 encoding and Slovak babel. Can somebody help, please ...
8
votes
1answer
290 views

Why is the cmss font in OT1 and T1 very different?

When I compile the code below with and without the \usepackage[T1]{fontenc}, I get quite different results. The normalfonts are the same, but with T1 the characters in the section heading seem way too ...
8
votes
1answer
219 views

Specifying a different font for polytonic Greek in pdfTeX with Babel

I am writing my master’s thesis with the ulthese class, which is now part of MiKTeX and TeX Live. This class is based on memoir and is fairly flexible, but assumes the use of pdfTeX and sets the font ...
8
votes
2answers
788 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 ...
8
votes
0answers
128 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 ...
7
votes
3answers
385 views

Strange page numbers in PDF

I generate my pdfs using MikTex 2.9 on Windows 7. On W7 everything looks good. On my other computer where I have CentOS release 5.2 (Final) installed I experience strange display on page numbers. On ...
7
votes
2answers
201 views

Can't make greek sign of question “;” shown right

I tried to make a greek text in Latex. But there is a small problem the sign of question ";" shows as upper dot. \documentclass[twoside,a5paper,12pt]{book} \usepackage[T1]{fontenc} ...