I want to change the tracking (space between the characters) for a sans serif font. I found that I can use the microtype package to change the tracking of the smallcaps font (\textsc{foo}
), but I can't figure out how to make \textsc{}
a sans serif font.
Do you mean, you want to 'set tracking' only for your sans serif font? (Because I hope you don't want to 'make' small caps be sans serif ... rather you should choose a sans serif that contains a small caps schape, as in the below example.)
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage[tracking=true]{microtype}
\DeclareMicrotypeSet*[tracking]{my}
{ encoding = *,
font = */sf*/*/*/*,
}
\SetTracking[
% spacing = {500*,166, }
]{
encoding = *,
family = sf*,
}{ 500 }
\SetTracking[]{encoding = *, family = rm* }{ 10 }
\SetTracking[]{encoding = *, shape = sc }{ 100 }
\def\test{I want to change the tracking (space between the characters)
for a sans serif font. I found that I can use the microtype package
to change the tracking of the smallcaps font
({\ttfamily\textbackslash textsc\{foo\}}), but I can't figure out
how to make {\ttfamily\textbackslash textsc{}} a sans serif font.}
\begin{document}
\parskip 12pt
\parindent 0pt
RM:
\test
SF:
{\sffamily\test}
SC (RM):
{\scshape\test}
SF+SC:
{\sffamily\scshape\test}
TT:
{\ttfamily\test}
\end{document}
-
I tried compiling that and got this error:
! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts.
– vy32 Oct 16 '16 at 1:39 -
By Tracking, I mean that I want the text to look like this: T H E ` ` T E X T – vy32 Oct 16 '16 at 2:00
-
I know what you want to achieve. I choose a deliberately exaggerated value for your sans serif family. But I don't know why you get that
pdfTeX
error. (I am using TeX Live 2016: ` pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016);
libertine.sty 2014/11/25;
microtype.sty 2016/05/14`.) If you are using MikTeX, then maybe this question is of value: tex.stackexchange.com/q/283960/8528 ..? – jon Oct 16 '16 at 2:06 -
okay. apparently Macports corrupted my LaTeX installation (again???) and I had to wipe it and download TeXLive. Now it works great. Thanks! – vy32 Oct 17 '16 at 13:54
-
\textsf
? – barbara beeton Oct 14 '16 at 15:27