Text FormattingHow to change space between letters, for extended words (kerning) ?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

How to change space between letters, for extended words (kerning) ?

Post by Cham »

I would like to add an extended effect to a warning sign in the margin. Here's a nice MWE example to work with :

Code: Select all

\RequirePackage[l2tabu,orthodox]{nag}
\documentclass[10pt,letterpaper,nofootinbib,notitlepage,tightenlines]{revtex4-1}
\usepackage[total={6.5in,10in},centering,left=1in,top=0.75in,bottom=0.5in,includefoot]{geometry}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[dvipsnames,table]{xcolor}
\usepackage{blindtext}
\usepackage[printwatermark]{xwatermark}
 
\begin{document}
 
\section{Some section title}

\Blindtext
 
\newpage
 
\blindtext
 
\newwatermark*[allpages,angle=90,color=gray!25,scale=1.5,textalign=center,height=\paperheight,width=\paperwidth,xpos=-100,ypos=0]{\bfseries\sffamily TOP SECRET}
 
\subsection{Subsection title}
 
\Blindtext
 
\end{document}
Now, the TOP SECRET warning on the left margin of the second page would be better looking if it was vertically extended a bit. How can I achieve this ? Is there an "extended" command in LaTeX ?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

How to change space between letters, for extended words (kerning) ?

Post by cgnieder »

Package microtype (which is always a good addition to a LaTeX document because of its many micro-typographic improvements even with its standard settings) provides \textls for this.

Code: Select all

\RequirePackage[l2tabu,orthodox]{nag}
\documentclass[10pt,letterpaper,nofootinbib,notitlepage,tightenlines]{revtex4-1}
\usepackage[total={6.5in,10in},centering,left=1in,top=0.75in,bottom=0.5in,includefoot]{geometry}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[dvipsnames,table]{xcolor}
\usepackage{blindtext}
\usepackage[printwatermark]{xwatermark}

\usepackage{microtype}

\begin{document}
 
\section{Some section title}
 
\Blindtext
 
\newpage
 
\blindtext
 
\newwatermark*[allpages,angle=90,color=gray!25,scale=1.5,textalign=center,height=\paperheight,width=\paperwidth,xpos=-100,ypos=0]{\bfseries\sffamily\textls[100]{TOP SECRET}}
 
\subsection{Subsection title}
 
\Blindtext
 
\end{document}
site moderator & package author
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

How to change space between letters, for extended words (kerning) ?

Post by Cham »

Wow ! Thanks a lot !

I do use always the microtype package in all of my LaTeX documents. Its fine tuning is great !
Post Reply