{kerning} is the process of adjusting the spacing between characters in a proportional font, usually to achieve a visually pleasing result.

learn more… | top users | synonyms

75
votes
6answers
8k views

Prettiest way to typeset “C++” (cplusplus)?

Writing "C++" in plain text results in an ugly setting, as the '+' signs are too big and too spaced: I've seen around the web several marcos for typesetting the "C++" symbol, ranging from mild ...
45
votes
1answer
456 views

Is it always best practice to not include text punctuation in inline math mode?

It has been pointed out on this site, e.g. here by egreg, that text punctuation doesn't belong to the formula in inline math. I've been following this practice for a long time, so I write for all ...
37
votes
2answers
948 views

Improved kerning in fractions?

Question How can I apply selective kerning within the numerator and denominator of an inline fraction? Specifically, I'd like to: Tighten kerning after the numerator if it ends in 7 Loosen kerning ...
30
votes
0answers
508 views

The Last Obstacle — Measuring sidebearings in LuaLaTeX [duplicate]

I've just realised that this question might be interpreted as a duplicate of Accessing side-bearings in LuaTeX, and therefore eligible to be closed as such. Apologies for the lapse of memory; I'll ...
26
votes
2answers
2k views

Is there a way to adjust kerning for a specific character combination?

Is it possible to tell (La)TeX to adjust the kerning of a specific character combination? For example, suppose I want !! to be typeset as !\kern 1.2pt!, just like ff is automatically turned into a ...
26
votes
2answers
1k views

Is there a way to automatically change kerning between commas/full stops and footnote marks?

This question led to a new package: fnpct Following up on my question on the kerning of footnote marks after punctuation marks, I'd like to know if there is a way to achieve the kerning of ...
25
votes
2answers
2k views

An example of changing kerning of a font in LuaLaTeX

LuaLaTeX, through the luaotfload package, is able to dynamically add and modify features and properties of a font. This is performed by using the FeatureFile option in fontspec when loading a font; ...
24
votes
4answers
913 views

Kerning between bold and non-bold text

I'd like to write a word in bold followed by a comma and a non-bold word, like this: \textbf{why}, blah If I just write why, TeX inserts a kern to shift the comma a little closer to the "y". But ...
20
votes
0answers
228 views

Tests for checking kerning and sidebearings

To test the kerning and sidebearings of digital fonts, Bringhurst suggests the following methods: To check the sidebearings typeset consecutive pairs of letters and check the symmetry. For the ...
18
votes
1answer
554 views

Problem with kerning using LuaLaTeX

I am having a problem with kerning while using LuaLaTeX. In my example, the pair “AT” does not render well. This is clear by comparing LuaLaTeX output with XeLaTeX's, which from the same code renders ...
17
votes
1answer
263 views

Is there a method just write `---` to get an em-dash, putting thinspace both before and after it?

Is there a method just write --- to get an em-dash, putting a thinspace both before and after it? The situation about break is similar with the original ---.
16
votes
3answers
375 views

German-style quotation marks too close to italics letters and mathpazo font package

When I type an text in italic with the Palladio font the German quotation marks are (far) too close to the letters. The problem does not occur with English quotation marks. Is there any solution or ...
16
votes
2answers
266 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 ...
15
votes
2answers
341 views

How to reduce the space between two slashes when using \url?

This is a follow-up question to Space between two slashes. Bianca Lobo's answer (defining a \twobar command with proper kerning) is nice; however, it doesn't work in the argument of the \url command ...
15
votes
2answers
4k views

How to properly typeset footnotes/superscripts after punctuation marks?

I find the spacing of footnote marks after punctuation marks quite unsatisfactory, especially with sans serif fonts and compared to the spacing after letters. Example follows: I came up with a ...
15
votes
2answers
207 views

siunitx not using kerning units correctly ahead of a sentence-ending dot (period, full stop)

If the unit is the final character in a sentence, the sentence-ending dot is not kerned correctly. MWE: \documentclass{article} \usepackage{siunitx} \usepackage{mathpazo} \begin{document} ...
15
votes
1answer
747 views

How to fix kerning of comma/colon after quotes?

How to fix kerning of comma/colon after quotes? Hello, I’m a relative newbie in latex and am trying to reduce the space between closing quotes and colon/comma, but by a general way in the preamble, ...
14
votes
1answer
217 views

Insert negative kern before “Y” in Calabi-Yau

Some pairs of glyphs look more visually appealing when a kern is inserted between the glyphs. For instance, if the word Calabi–Yau is typeset with a font that does not include kerning information for ...
13
votes
1answer
3k views

Margin kerning in Xe(La)TeX for TeXlive 2010: how to enable?

I'm using the pre-release testing version of TeXlive 2010. From what I understand from the TeXlive Guide, a new feature is that support for magin kerning has been added to XeTeX. From what I can ...
12
votes
3answers
752 views

Redefine apostrophes to prevent bad kerning

The apostrophe in Adobe’s Minion Pro font has a kerning that is much too tight for typesetting French, where sequences of letters like l’a or d’e or j'a are common. One solution I found is to wrap ...
12
votes
2answers
338 views

Kerning of subscripts

I have a large document that's full of subscripted variables that represent points and vectors. I want to typeset the points and vectors upright and bold. I'm using Unicode Math with Latin Modern, and ...
12
votes
3answers
255 views

non-invasive kerning/spacing modification: what options are there?

Once in a while, you may want to (1) adjust or create a kerning pair (or, better yet, kerning class) in a font, or (2) adjust a particular glyph's sidebearings. examples of scenario (1) would include ...
12
votes
2answers
485 views

Vain question about cdot kerning

I'm writing my first "real" paper in Latex, and one of my major pieces of notation involves item-wise multiplying the Nx1 vector \widehat{w} to the Nx1 vector \widehat{S}, and I've been using cdot to ...
12
votes
1answer
7k views

Using listing for displaying Matlab code

I'm trying to display matlab code in a LaTeX document and the comments are typeset with an ugly space between letters: \documentclass{article} \usepackage{listings} \lstset{language=Matlab} ...
12
votes
1answer
1k views

How are amounts of money to be typeset?

Writing a letter to Americans, I have wondered how to properly typeset amounts of money. As far as I know, the $-sign is supposed to precede the number, but I am clueless of the rest. Here are some ...
12
votes
1answer
282 views

Is there a way to improve kerning on mathematics?

It seems that some mathematical formulae do not have as good kerning as standard text? Taking a specific example, I would like to change The version on the left is LaTeX produced from ...
11
votes
2answers
327 views

Bad kerning with dvipng

I am using dvipng to render sans serif documents, and the results are especially bad. At the default resolution (100 dpi IIRC), there are some serious kerning issues. Here, I rendered with two sans ...
11
votes
2answers
3k views

How to use \widthof as parameter to \kern

I sometimes encounter a problem when I attempt to use \widthof from the calc package, and don't know why. In the past I have just worked around it using a two step process of defining a \newdimen{} ...
11
votes
2answers
301 views

To kern double em-dashes

In Virginia Woolf's novels, she used double em-dashes quite often. In Latin Modern, the two dashes closely set together without gap. However, In ebgaramond there is a little gap which is quite ...
11
votes
2answers
229 views

Should a negative kern be added after a degree symbol if followed by punctuation?

Not sure why I have not noticed this before, but spacing between a degree unit and punctuation seems strange as shown in red. Should a manual \kern be added (as shown in blue)? Code: ...
10
votes
3answers
328 views

How can I superimpose a summation operator with its following character?

How can I create the following symbol? PS: It is not the classic \sum_{i=0}^n k
10
votes
2answers
252 views

Uneven spacing around a hyphen in sans-serif?

I am used to writing the names of categories in sans-serif. Thus, for the category of R-modules, I have been using $R\textrm{-}\textsf{Mod}$ However, the kerning/spacing this produces has never ...
10
votes
2answers
820 views

Kerning issue with Adobe Garamond Pro: XeTeX or font file to blame ?

I have run into a strange kerning issue, limited to the German letter pair Wä, when using the Adobe Garamond Pro font with XeTeX. The document looks great except for that particular pair. But see for ...
10
votes
1answer
308 views

Space between the two slashes in “http://” too big

I'm using a lot of links with http:// in my document, but the two slashes are too much separated, I'd like them to be more near each other. How do I do this, in a neat way? I'm using a sans-serif ...
10
votes
1answer
117 views

Kerning in \Cref of cleveref

When I use the \Cref command of cleveref package, it doesn't apply the corresponding kerning: Here is a minimal example: \documentclass{scrartcl} \usepackage[thref]{ntheorem} \usepackage{cleveref} ...
10
votes
2answers
106 views

Correct kerning of hyperlinks in math mode

I use hyperlinks in math mode to if a reader does not read my thesis sequentially and finds a very arcane symbol somewhere, he may just click it and go to where it is defined. However, adding links ...
9
votes
3answers
208 views

Latin's scansion : length of vowels

I am a total enthusiastic beginner in LaTeX and my work in latin studies requires some twisty signs to mark the length of the vowels. I would love to find a way to have the length display on the same ...
9
votes
3answers
278 views

Fixing fonts with LuaTeX feature files

Bringhurst urges us in Chapter 10 of The Elements of Typographic Style: Version 4.0 to fix the font files if needed. See below a summary of the chapter using the section titles. Bringhurst suggests ...
9
votes
4answers
142 views

Configurable spacing after \dots

LaTeX adds some space after the ellipsis \textellipsis. This is enhanced by ellipsis package, which only adds space before certain characters (and also gives the option to configure “easily” the ...
9
votes
1answer
197 views

Kerning between V and / in Palatino and Euler

Edit 1 I made the test with real palatino font and Neo-Euler, with the same result (As far as I can see) \documentclass{standalone} \usepackage{fontspec} \setmainfont[] {PalatinoLTStd-Roman.otf} ...
9
votes
1answer
1k views

The kerning option of microtype

I wonder what the kerning option of the microtype package does? In the manual it says that kerning=true will give additional kerning. But how? Is this something that has to be specified in addition to ...
9
votes
2answers
876 views

How to adjust the kerning around a forward slash in text

In contrast to \texttt{typewriter} normal text is "connected". When using a forward slash, I get for y/. this: while I would like to get something like that: which can be accomplished by ...
9
votes
1answer
689 views

Why \leaders and \mkern works strangely in different font size?

I can hardly determine a good title for this question, I'm sorry. Minimal test code: \documentclass{minimal} \usepackage{lipsum} \begin{document} foo {\fontsize{18}{18}\leaders\hbox{$\mkern ...
9
votes
1answer
971 views

Basic kerning with XeTeX

Trying to use custom fonts with LyX, so I started using XeTeX. Unfortunately, It seems kerning only works with certain OpenType fonts (Linux Libertine) but not for others (Doulos SIL or Charis SIL). ...
9
votes
1answer
204 views

How to change kerning around ( glyph with lualatex?

Inspired by An example of changing kerning of a font in LuaLaTeX I decided to try to change the kerning for some letter combinations together with parentheses which have been bothering me in my ...
9
votes
1answer
177 views

Alternates for specific characters & kerning

I am trying to change the stylistic set used for italic y in my document. I used Alan Munn's method, explained here: Use stylistic set variations only for certain glyphs. It works properly, except ...
8
votes
2answers
191 views

Three emdashes bound together

In many bibliography styles repeating authors are indicated with three emdashes, forming a single line. This works well with some fonts, while for others it leaves gaps: ...
8
votes
2answers
182 views

Cannot “kern back” after applying kerning

Usually when I apply kerning to a pair of characters, I undo the kerning by adding the negative of the kerning afterwards, i.e. {x}\kern1em\{y}\kern-1em (cf. Move a combining character with both ...
8
votes
2answers
123 views

Letter with ' (and correct spacing)

I am struggling with a problem I can't even name properly: I'm writing an article about an object A as well as its slightly different variant A'. I am wondering what character/symbol and/or spacing ...
8
votes
1answer
334 views

Kerning for arabic digits?

In most fonts, arabic digits have nonproportional width, meaning that 1 and 8 have exactly the same width even if the former has a smaller natural width. This is good for typesetting tables, but in ...