10.07.2015 Views

The microtype package

The microtype package

The microtype package

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

THE LETTERSPACING ILLUSTRATION: Document 217A.2 DocumentNow we can start the document.8981 \documentclass[10pt,a4paper]{ltxdoc}8982 \providecommand\MakePercentComment{\relax}8983 \expandafter\def\csname ver@<strong>microtype</strong>.dtx\endcsname{2999/99/99}Re-use the preamble from <strong>microtype</strong>.dtx.8984 \use<strong>package</strong>{<strong>microtype</strong>-doc}8985 \use<strong>package</strong>{attachfile}8986 \makeatletter8987 \pdfcatalog{/OCProperties >>}8988 \makeatother8989 \begin{document}You are currently reading this.8990 \DocInput{<strong>microtype</strong>-logo.dtx}And here’s the logo.8991 \vfill8992 \begin{center}8993 \printlogo \null8994 \end{center}8995 \vfill8996 \expandafter\enddocument8997 \fiThat’s it.8998 B <strong>The</strong> letterspacing illustration8999 \ifx\lssample\undefined9000 Upon popular request, here’s how I’ve created the letterspacing illustration. 32B.1 MacrosRule width and image height and depth.9001 \makeatletter9002 \newdimen\lsamount9003 \newdimen\lsrule9004 \lsrule=0.2pt9005 \def\lsheight{8pt}9006 \def\lsdepth{12pt}Our font (Adobe Caslon).9007 \def\lsfont{\fontfamily{paca}\selectfont}Loop over all letters in 〈#2〉, letterspacing them by 〈#1〉.9008 \def\dols#1#2{\lsamount=#1\relax \dolss#2\enddols}9009 \def\dolss#1#2\enddols{%9010 \ifx\empty#2\empty\divide\lsamount 2\fi9011 \ls{#1}%9012 \ifx\empty#2\empty\else \dolss#2\enddols \fi9013 }One tikz picture for each letter.9014 \def\ls#1{%9015 \begin{tikzpicture}[remember picture,line width=\lsrule]9016 \tikzstyle{every node}=[inner sep=0pt]32 Note that the lssample module will not be created when installing <strong>microtype</strong>. Instead, I’ve included the source in thePDF file as an attachment. If your PDF reader supports this, you can to extract it; alternatively, may can usthe pdftk tool.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!