Questions tagged [font-encodings]

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

Filter by
Sorted by
Tagged with
437 votes
2 answers
247k 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 ...
  • 29.2k
304 votes
3 answers
639k 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.
202 votes
4 answers
162k 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 ...
  • 4,878
141 votes
5 answers
160k 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: (/usr/local/texlive/2012/texmf-...
111 votes
6 answers
19k 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 ...
84 votes
4 answers
110k 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 ...
  • 1,165
79 votes
4 answers
34k 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: \...
76 votes
5 answers
23k 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} \begin{...
49 votes
4 answers
8k 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?
42 votes
2 answers
7k 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 ...
  • 12.6k
42 votes
1 answer
5k 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 ...
  • 12.6k
34 votes
1 answer
34k views

Command \k unavailable in encoding OT1 (error takes me to line which doesn't even have "\k" in it

I am in an incredibly frustrating situation - after weeks and weeks of editing my dissertation in Latex, the inevitable error that just doesn't seem to make any sense has surfaced. I get the error "...
  • 343
33 votes
2 answers
4k 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 ...
  • 60.3k
32 votes
5 answers
4k 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. ...
  • 2,233
31 votes
6 answers
4k views

What is the history of the ß (Eszett) in the T1 encoding of Computer modern?

In the default font (Computer modern) the ß looks ugly to me. It really sticks out on a page as if it would come from a different font. Here's an image: What is the history of this character? Why ...
  • 1,697
29 votes
1 answer
4k 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 they’...
  • 52.4k
28 votes
1 answer
6k 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 differences?...
25 votes
2 answers
15k views

T1 Encoding causing bad PDF quality? [duplicate]

I recently noticed that some of the papers I've listed on my homepage look a lot sharper than others when rendered in a PDF viewer. Curious about this, I tracked it down to this import: \usepackage[...
  • 7,237
25 votes
2 answers
12k 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 ...
  • 253
24 votes
2 answers
11k 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} \usepackage[T1]{fontenc}...
  • 841
24 votes
2 answers
14k views

What fonts are compatible with T2A (Cyrillic) encoding?

I'm trying to figure out what fonts are compatible with T2A encoding - seems like there's no such a list known to Google. I've identified that iwona and computer roman (default) are supported. ...
  • 467
23 votes
2 answers
1k views

TeX history: what was the diagonal dash at codepoint 32 in cmr10 intended for?

The answers to this useful question explain how to show the encoding of a TeX font. And this is the default encoding used in the default TeX font, cmr10: What was the strange diagonal dash character ...
  • 36.7k
23 votes
3 answers
5k 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 en-...
  • 20k
23 votes
2 answers
7k views

Can we stop recommending fontspec as first choice in case lualatex is used?

This question may belong on Meta, please move it in that case, I'm not sure. This answer made me think again why almost everybody is recommending loading fontspec in case lualatex is used. I see just ...
22 votes
2 answers
6k 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 ...
21 votes
1 answer
18k views

What is wrong with my cyrillic text?

This is the document: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T2A]{fontenc} \begin{document} This text is in Russian: проверка. \end{document} This is what TeXLive on Mac OS ...
  • 10.3k
21 votes
2 answers
4k 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 correctly,...
20 votes
3 answers
23k views

Why does inputenc abandon so quickly under "utf8 based engines"?

Why do I need to do the extra work starting with \ifdefined in order to get my French guillemets correct in the pdf output, when using xelatex with a source specifying the use of T1-encoded fonts ? \...
's user avatar
20 votes
1 answer
1k views

What is the equivalent of \usepackage[T1]{fontenc} in plain TeX?

I have inherited a semi-small TeX project in which I, after syncing across various computers and OS'es, had some problems with encodings of special characters like åäö. My initial approach for fixing ...
19 votes
3 answers
4k views

How is a mathematical formula represented in PDF?

If I compile a .tex file to a PDF, how will the PDF encode a mathematical formula like f.ex. the integral below? Is it a bitmap? Or how else is it encoded? And how can I extract the formula from a PDF ...
  • 193
19 votes
4 answers
123k views

"ö ü ä ß" in Latex (Mac, German, TeXShop) [closed]

It sounds simple but I have a really heavy issue with the "ö ü ä ß" in Latex. I use a template from my university, i have a mac and i use TeXShop if that matters. Within there is a packages.tex with ...
  • 191
18 votes
2 answers
11k 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 ...
  • 559
18 votes
2 answers
951 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 ...
  • 1,857
18 votes
2 answers
535 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 there a ...
  • 1,917
17 votes
1 answer
5k 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 ...
16 votes
3 answers
11k 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 ...
  • 5,320
16 votes
2 answers
2k 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 ...
15 votes
2 answers
6k 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 ...
  • 1,451
15 votes
3 answers
2k 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 ...
15 votes
2 answers
1k views

Fine tuning diacritical marks in fonts

I am about to make the paradigm-shift from the traditional way of hard-coding fonts with diacritical marks on top of them to simply using utf8. What surprised me, however, that the rendering of the ...
  • 936
15 votes
1 answer
938 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 \$ \% \&...
  • 41.3k
15 votes
1 answer
448 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 ...
  • 184k
14 votes
5 answers
14k views

greek encodings under lyx

In my newly installed linux machine (Fedora 19), editing a formerly working document under lyx, I get: Package fontenc Error: Encoding file 'lgrenc.def' not found and in fact I see that the dir /usr/...
14 votes
3 answers
2k views

When should package fontenc be used with pdflatex?

I have been using package fontenc with the following invocation, mainly because of what I read here. \usepackage[T1]{fontenc} But I've noticed that I lose some of the ligatures with the libertine ...
  • 1,934
14 votes
2 answers
4k 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 ...
  • 70.8k
14 votes
1 answer
942 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} \...
13 votes
4 answers
9k 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} ...
13 votes
2 answers
2k 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 characters ...
13 votes
3 answers
12k 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 ...
  • 15.7k
13 votes
2 answers
3k views

Interpreting unicode ², ³, etc... characters in math mode

Short question: Is there some font encoding or other trick that would allow the unicode character ² (exponent 2) to be correctly interpreted by LaTeX, notably in math mode (i.e. translate it ...
  • 419

1
2 3 4 5
13