[pstricks] Letterspaced text.
Herbert Voss
LaTeX at zedat.fu-berlin.de
Tue Jun 26 20:16:37 CEST 2007
John R. Culleton wrote:
> Is there a pstricks sequence that will insert extra space between
> letters in a string?
>
you can modify it easily to a real TeX solution
Herbert
\documentclass{minimal}
\usepackage{pst-func,pst-xkey}
% pst-func only for the other options
\parindent=0pt
\makeatletter
\newdimen\psk at LSpace
\define at key[psset]{pst-func}{LSpace}{\pssetlength\psk at LSpace{#1}}
\psset[pst-func]{LSpace=2pt}
%
\def\psLetterSpace{\pst at object{psLetterSpace}}
\def\psLetterSpace at i#1{%
\begin at SpecialObj%
\addto at pscode{
gsave
\psk at PSfont findfont \psk at fontscale scalefont setfont
0 0 moveto { \pst at number\psk at LSpace 0 rmoveto } (#1) kshow
grestore
}%
\end at SpecialObj%
}
\makeatother
\pagestyle{empty}
\begin{document}
\psLetterSpace[fontscale=20]{PSTricks with Times}\\[10pt]
\psLetterSpace[LSpace=5pt,fontscale=20]{PSTricks with Times}\\[10pt]
\psLetterSpace[LSpace=15pt,fontscale=20]{PSTricks with Times}\\[10pt]
\psLetterSpace[PSfont=Helvetica,fontscale=20]{PSTricks with
Helvetica}\\[10pt]
\psLetterSpace[LSpace=-2pt,PSfont=Helvetica,fontscale=20]{PSTricks with
Helvetica}\\[10pt]
\psLetterSpace[LSpace=-5pt,PSfont=Helvetica,fontscale=20]{PSTricks with
Helvetica}\\[10pt]
\psLetterSpace[LSpace=10pt,PSfont=Helvetica,fontscale=20]{PSTricks with
Helvetica}\\[10pt]
\end{document}
More information about the PSTricks
mailing list