tags:

views:

634

answers:

2

A font I am using does not have the slanted/oblique variant to it in LaTeX (NB: not italics), and I would like to have slanted text in places.

Is there an easy way to slant text without having to generate entirely new font files and such?

One suggested solution was to do:

\renewcommand{\textsl}[1]{\tikz[baseline=(X.base)] \node[xslant=0.2231153] (X) {#1};}

This works well for one or two words, but tikz nodes don't break across lines, so it's not adequate, for, say, a theorem environment.

Obviously, a quick-and-dirty method will not give exceptional kerning or spacing, but I am not concerned about that. However, a 13 degree shear/slant would be desirable.

+7  A: 

Use a font that does have italics. Standard fonts are best unless you're in marketing.

mcandre
In LaTeX, you don't want to "fake" or "hack" things. As with pretty much everything, it's better to do it the right way. That's why it's the right way.
Matt Ball
+1 Fonts that have a italics variant work better than slanting a non-italic fonts.
Spoike
Please note the difference between slanted and italic.
Svante
+3  A: 

You can do this easily in XeLaTeX:

\usepackage{fontspec}
...
\fontspec[ItalicFont=*,ItalicFeatures=FakeSlant]{Minion Pro}

Highly undesirable, however, if there's any chance you can get a real italic.

Update: why undesirable? Because font outlines are not designed to be distorted! Any sort of transformation besides linear scaling in both directions will change the relationship between the inner/outer curves of the letters, effectively going against the wishes of the font designer.

If you want to highlight something in a different font than the roman and not use italic, try something completely different like a harmonising sans serif, for example.

Will Robertson
Please note the difference between slanted and italic.
Svante