| 1 |
%% |
| 2 |
%% This is file `typog-example.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% typog.dtx (with options: `example') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Copyright (C) 2024, 2025 by Ch. L. Spiel |
| 12 |
%% |
| 13 |
%% This work may be distributed and/or modified under the conditions |
| 14 |
%% of the LaTeX Project Public License, either version 1.3c of this |
| 15 |
%% license or (at your option) any later version. The latest version |
| 16 |
%% of this license is in |
| 17 |
%% https://www.latex-project.org/lppl.txt |
| 18 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 19 |
%% version 2003/12/01 or later. |
| 20 |
%% |
| 21 |
%% This work has the LPPL maintenance status `maintained'. |
| 22 |
%% |
| 23 |
%% The Current Maintainer of this work is Ch. L. Spiel. |
| 24 |
%% |
| 25 |
%% This work consists of the files typog.dtx and typog.ins |
| 26 |
%% and the derived files typog.sty, slant-angle.mp, invertedmarks.mp, |
| 27 |
%% crooked-paragraphs.mp, smooth-parshapes.mp, title.mp, |
| 28 |
%% typog-example.tex, typog-minimal-test.tex, |
| 29 |
%% typog-without-microtype-test.tex |
| 30 |
%% typog-grep.pl.in, typog-grep.pl, |
| 31 |
%% typog-grep.pod, and teximan2latex.sed. |
| 32 |
%% |
| 33 |
%% |
| 34 |
\documentclass[a4paper]{article} |
| 35 |
|
| 36 |
\tracingonline=0 |
| 37 |
|
| 38 |
\PassOptionsToPackage{dvipsnames}{xcolor} |
| 39 |
|
| 40 |
\usepackage{amsmath} |
| 41 |
\makeatletter\def\bbl@languages{}\makeatother\usepackage[german,english]{babel} |
| 42 |
\usepackage{float} |
| 43 |
\usepackage[T1]{fontenc} |
| 44 |
\usepackage{hyphenat} |
| 45 |
\usepackage{mathtools} |
| 46 |
\usepackage[activate=true, letterspace=50, verbose=false]{microtype} |
| 47 |
\usepackage{ragged2e} |
| 48 |
\usepackage[nobottomtitles*]{titlesec}\renewcommand*{\bottomtitlespace}{.2\textheight} |
| 49 |
\usepackage{trace} |
| 50 |
\usepackage[debug, |
| 51 |
trackingttspacing, |
| 52 |
uppercaselabelitemadjustments={-0.025em, .075em, .14em, .075em}, |
| 53 |
lowercaselabelitemadjustments={-.1em, 0pt, .065em, 0pt}]{typog} |
| 54 |
\usepackage{xcolor} |
| 55 |
|
| 56 |
\usepackage[loosest, proportional, scaled=1.064]{erewhon} |
| 57 |
\usepackage[erewhon]{newtxmath} |
| 58 |
\usepackage[scaled=.95]{cabin} |
| 59 |
\usepackage{inconsolata} |
| 60 |
\usepackage{setspace}\setstretch{1.08333} |
| 61 |
|
| 62 |
\def\xsfdefault{\relax} |
| 63 |
|
| 64 |
\def\examplefont{6} |
| 65 |
|
| 66 |
\ifcase\examplefont % 0 -- document's default sans-serif font (e.g., ecrm1000) |
| 67 |
\def\examplefontname{default} |
| 68 |
\let\xsf=\sf |
| 69 |
\let\xsfdefault=\sfdefault |
| 70 |
\or % 1 -- Nunito |
| 71 |
\def\examplefontname{Nunito} |
| 72 |
\def\xsfdefault{Nunito-TOsF} |
| 73 |
\def\xsf{\let\sfdefault=\xsfdefault\sf} |
| 74 |
\or % 2 -- OpenSans |
| 75 |
\def\examplefontname{OpenSans} |
| 76 |
\def\xsfdefault{opensans-TLF} |
| 77 |
\def\xsf{\let\sfdefault=\xsfdefault\sf} |
| 78 |
\or % 3 -- Noto Sans |
| 79 |
\def\examplefontname{Noto Sans} |
| 80 |
\def\xsfdefault{NotoSans-TLF} |
| 81 |
\def\xsf{\let\sfdefault=\xsfdefault\sf} |
| 82 |
\or % 4 -- Roboto |
| 83 |
\def\examplefontname{Roboto} |
| 84 |
\def\xsfdefault{Roboto-LF} |
| 85 |
\def\xsf{\let\sfdefault=\xsfdefault\sf} |
| 86 |
\or % 5 -- Montserrat |
| 87 |
\def\examplefontname{Montserrat Alternates} |
| 88 |
\def\xsfdefault{MontserratAlternates-LF} |
| 89 |
\def\xsf{\let\sfdefault=\xsfdefault\sf} |
| 90 |
\or % 6 -- Inter |
| 91 |
\def\examplefontname{Inter} |
| 92 |
\def\xsfdefault{Inter-LF} |
| 93 |
\def\xsf{\let\sfdefault=\xsfdefault\sf} |
| 94 |
\else |
| 95 |
\SelectedUnknownExampleFont |
| 96 |
\fi |
| 97 |
|
| 98 |
\typeout{typog-example: font for examples: `\xsfdefault'}% |
| 99 |
|
| 100 |
\usepackage{hyperref} |
| 101 |
\usepackage{cleveref} |
| 102 |
|
| 103 |
\hypersetup{ |
| 104 |
citecolor = CadetBlue, |
| 105 |
colorlinks = true, |
| 106 |
linkcolor = Blue, |
| 107 |
linktocpage = true, |
| 108 |
pdfauthor={Dr. Christoph L. Spiel}, |
| 109 |
pdfkeywords={Examples, |
| 110 |
LaTeX, typography, ligature, italic-correction, paragraph justification, sloppy, ragged}, |
| 111 |
pdfsubject={Examples for typographic fine-tuning of LaTeX}, |
| 112 |
pdftitle={Examples for LaTeX package typog}, |
| 113 |
raiselinks = false, |
| 114 |
urlcolor = Mulberry |
| 115 |
} |
| 116 |
|
| 117 |
\makeatletter |
| 118 |
\newcommand{\fs@myruled}{% |
| 119 |
\fs@ruled |
| 120 |
\def\@fs@capt##1##2{\floatc@ruled{##1\space\capitaldash*\space}{\fussy ##2}}% |
| 121 |
\def\@fs@pre{\hrule height.8pt depth0pt \kern4pt}% |
| 122 |
\def\@fs@mid{\kern3pt\hrule\kern3pt}% |
| 123 |
\def\@fs@post{\kern4pt\hrule\relax}% |
| 124 |
} |
| 125 |
\makeatother |
| 126 |
|
| 127 |
\floatstyle{myruled} |
| 128 |
\newfloat{exemplary}{htbp}{loe}[section] |
| 129 |
\floatname{exemplary}{Example} |
| 130 |
\Crefname{exemplary}{Example}{Examples} |
| 131 |
\crefname{exemplary}{Ex.}{Ex.} |
| 132 |
|
| 133 |
\newcommand*{\acronym}[1]{\mbox{\letterspacecapitals{\MakeUppercase{#1}}}} |
| 134 |
\newcommand*{\bibauthor}[1]{\textsc{#1}} |
| 135 |
\newcommand*{\bibtitle}[1]{\textit{#1}} |
| 136 |
\newcommand*{\bottomstrut}{\rule[-.5em]{0pt}{0pt}} |
| 137 |
\newcommand*{\code}[1]{{\ttfamily\hyphenchar\font=`\-\relax #1}} |
| 138 |
\newcommand*{\doublequotes}[1]{\doubleguillemetright#1\doubleguillemetleft} |
| 139 |
\newcommand*{\eTeX}{\mbox{\(\epsilon\)-\TeX}} |
| 140 |
\newcommand*{\letterspacecapitals}[1]{\textls[30]{#1}} |
| 141 |
\newcommand*{\metavar}[1]{\textit{#1}} |
| 142 |
\newcommand*{\packagename}[1]{\mbox{\textsf{#1}}} |
| 143 |
\newcommand*{\propername}[1]{\mbox{\textsc{\textls[25]{#1}}}} |
| 144 |
\newcommand*{\sample}[1]{\mbox{`\texttt{#1}'}} |
| 145 |
\newcommand*{\singlequotes}[1]{\singleguillemetright#1\singleguillemetleft} |
| 146 |
\newcommand*{\topstrut}{\rule{0pt}{1.25em}} |
| 147 |
\newcommand*{\visualpar}{\,\P\quad} |
| 148 |
|
| 149 |
\newlength{\emreference} |
| 150 |
\AtBeginDocument{\setlength{\emreference}{\fontdimen6\font}} |
| 151 |
\newrobustcmd*{\milliem}[1] |
| 152 |
{\ifdim #1=0pt |
| 153 |
#1% |
| 154 |
\else |
| 155 |
\generictextfraction{\the\numexpr\dimexpr (#1) * 1000 / \emreference}{1000}\:em% |
| 156 |
\fi} |
| 157 |
|
| 158 |
\makeatletter |
| 159 |
\newcommand*{\getpackagefullinfo}[1]{\csname ver@#1.sty\endcsname} |
| 160 |
|
| 161 |
\def\@synthslant@getpackagedate#1/#2/#3 v#4\@nil{#1/#2/#3} |
| 162 |
\newcommand*{\getpackagedate}[1] |
| 163 |
{\edef\@tempa{\getpackagefullinfo{#1}}% |
| 164 |
\expandafter\@synthslant@getpackagedate\@tempa\@nil} |
| 165 |
|
| 166 |
\def\@synthslant@getpackageversion#1/#2/#3 v#4 #5\@nil{#4} |
| 167 |
\newcommand*{\getpackageversion}[1] |
| 168 |
{\edef\@tempa{\getpackagefullinfo{#1}}% |
| 169 |
\expandafter\@synthslant@getpackageversion\@tempa\@nil} |
| 170 |
|
| 171 |
\def\@synthslant@getpackageinfo#1/#2/#3 v#4 #5\@nil{#5} |
| 172 |
\newcommand*{\getpackageinfo}[1] |
| 173 |
{\edef\@tempa{\getpackagefullinfo{#1}}% |
| 174 |
\expandafter\@synthslant@getpackageinfo\@tempa\@nil} |
| 175 |
\makeatother |
| 176 |
|
| 177 |
\newcommand*{\generictextfraction}[2] |
| 178 |
{\raisebox{.4em}[0pt]{\scriptsize #1}% |
| 179 |
\kern-.05em\textfractionsolidus\kern-.05em |
| 180 |
\raisebox{-.15em}[0pt][0pt]{\scriptsize #2}} |
| 181 |
|
| 182 |
\newcommand*{\leftmarker}{\rule{.2em}{.1pt}\rule{.1pt}{.667em}} |
| 183 |
\newcommand*{\rightmarker}{\rule{.1pt}{.667em}\rule{.2em}{.1pt}} |
| 184 |
\newcommand*{\indicatewidth}[1]{\mbox{\leftmarker #1\rightmarker}} |
| 185 |
|
| 186 |
\newenvironment*{widebody} |
| 187 |
{\begin{list}{}{\leftmargin=0pt |
| 188 |
\listparindent=\parindent |
| 189 |
\parsep=\parskip |
| 190 |
\rightmargin=-\marginparwidth |
| 191 |
\topsep=0pt} |
| 192 |
\item\relax} |
| 193 |
{\end{list}} |
| 194 |
|
| 195 |
\newlength{\examplewidth} |
| 196 |
\setlength{\examplewidth}{160pt} |
| 197 |
|
| 198 |
\newcommand*{\texbooktolerancesample} |
| 199 |
{If you want to avoid overfull boxes at all costs without trying to fix them manually, |
| 200 |
you might be tempt\-ed to set \texttt{tol\-er\-ance=\allowbreak10000}; this allows |
| 201 |
arbitrarily bad lines to be acceptable in tough situations. But infinite tolerance |
| 202 |
is a bad idea, because \TeX{} doesn't distinguish between terribly bad and |
| 203 |
preposterously horrible lines. Indeed, a tolerance of 10000 encourages \TeX{} to |
| 204 |
concentrate all the badness in one place, making one truly unsightly line instead of |
| 205 |
two moderately bad ones, because a single ``write-off'' produces fewest total |
| 206 |
demerits according to the rules.} |
| 207 |
\newcommand*{\texbooktolerancesamplecredits} |
| 208 |
{\medskip\noindent |
| 209 |
\textsl{The sample text was taken from The~\TeX{}book~\cite[p.~107]{knuth:1986}.}} |
| 210 |
|
| 211 |
\newcommand*{\texbookparfillskipsample} |
| 212 |
{We still haven't discussed the special trick that allows the final line of a paragraph |
| 213 |
to be shorter than the others. Just before \TeX{} begins to choose breakpoints, |
| 214 |
it does two important things: [\dots\itcorr{-4}]} |
| 215 |
\newcommand*{\texbooklongparfillskipsample} |
| 216 |
{We still haven't discussed the special trick that allows the final line of a paragraph |
| 217 |
to be shorter than the others. Just before \TeX{} begins to choose breakpoints, |
| 218 |
it does two important things: (1)~If the final item of the current horizontal list is glue, |
| 219 |
that glue is discarded. (The reason is that a blank space often gets into a token list just |
| 220 |
before \code{\char92par} or just before \code{\char36\char36}, and this blank space should not be |
| 221 |
part of the paragraph.) (2)~Three or more items are put at the end of the |
| 222 |
current horizontal list~[\dots\itcorr{-4}]} |
| 223 |
\newcommand*{\texbookparfillskipsamplecredits} |
| 224 |
{\medskip\noindent |
| 225 |
\textsl{The sample text was taken from The~\TeX{}book~\cite[p.~99n]{knuth:1986}.}} |
| 226 |
|
| 227 |
\newcommand*{\texbookparshapeskipsample} |
| 228 |
{It's possible to control the length of lines in a much more general way, if simple |
| 229 |
changes to \code{\string\leftskip} and \code{\string\rightskip} aren't flexible enough for your |
| 230 |
purposes. For example, a semicircular hole has been cut out of the present paragraph, |
| 231 |
in order to make room for a circular illustration that contains some of |
| 232 |
Galileo's immortal words about circles; all of the line breaks in this |
| 233 |
paragraph and in the circular quotation were found by \TeX's line-breaking algorithm. |
| 234 |
You can specify a essentially arbitrary paragraph shape, by saying |
| 235 |
\code{parshape}=\metavar{number}, where the \metavar{number} is a positive integer~\(n\), |
| 236 |
followed by \(2n\)~\metavar{dimen} specifications.} |
| 237 |
\newcommand*{\texbookparshapeskipsamplecredits} |
| 238 |
{\medskip\noindent |
| 239 |
\textsl{The sample text was taken from The~\TeX{}book~\cite[p.~101]{knuth:1986}.}} |
| 240 |
|
| 241 |
\newcommand*{\texbookbaselineskipsample} |
| 242 |
{When you are typsetting a document that spans several pages, it's generally best to |
| 243 |
define \code{\string\baselineskip} so that it cannot stretch or shrink, because |
| 244 |
this will give more uniformity to the pages. A small variation in the distance |
| 245 |
between the baselines---say only half a point---can make a substantial difference |
| 246 |
in the appearance of the type, since it significantly affects the proportion of |
| 247 |
white to black. On the other hand, if you are preparing a one-page document, you |
| 248 |
might want to give the baselineskip some stretchability, so that \TeX{} will help |
| 249 |
you fit the copy on the page.} |
| 250 |
\newcommand*{\texbookbaselineskipsamplecredits} |
| 251 |
{\medskip\noindent |
| 252 |
\textsl{The sample text was taken from The~\TeX{}book~\cite[p.~78]{knuth:1986}.}} |
| 253 |
|
| 254 |
\newcommand*{\examplepreset}{\microtypesetup{activate=false}} |
| 255 |
\newcommand*{\examplesetup}{\frenchspacing\xsf\small\fussy} |
| 256 |
\newcommand*{\exampleparbox}[2][n/a] |
| 257 |
{\begin{typoginspect}{#1} |
| 258 |
\examplepreset |
| 259 |
\parbox[t]{\examplewidth}{\examplesetup #2}% |
| 260 |
\end{typoginspect}} |
| 261 |
\newcommand*{\examplesep}{\hspace*{20pt}} |
| 262 |
\def\fontnameandweightinfo#1{% |
| 263 |
{\def\projectoutfontname##1-##2-##3\relax{##1~\lowercase{##2}}% |
| 264 |
\global\expandafter\edef\csname#1\endcsname{\expandafter\projectoutfontname\fontname\font\relax}}} |
| 265 |
\newcommand*{\examplefontinformation} |
| 266 |
{\smallskip |
| 267 |
\examplesetup |
| 268 |
\fontnameandweightinfo{exfontnameinfo}% |
| 269 |
\fontsizeinfo{exfontsizeinfo}% |
| 270 |
The font used in this example is \exfontnameinfo, \exfontsizeinfo*.} |
| 271 |
|
| 272 |
\setcounter{tocdepth}{1} |
| 273 |
\setlength{\overfullrule}{0pt} |
| 274 |
\hbadness=-1 |
| 275 |
|
| 276 |
\input{ushyphex} |
| 277 |
|
| 278 |
\hyphenation{ |
| 279 |
Double-guillemet-left |
| 280 |
Double-guillemet-right |
| 281 |
Double-quotes |
| 282 |
Single-guillemet-left |
| 283 |
Single-guillemet-right |
| 284 |
Single-quotes |
| 285 |
adj-demerits |
| 286 |
allow-display-breaks |
| 287 |
babel-hyphenation |
| 288 |
base-line-skip |
| 289 |
break-penalty |
| 290 |
breakable-display |
| 291 |
capital-hyphen |
| 292 |
capital-times |
| 293 |
cite-dash |
| 294 |
club-penalties |
| 295 |
cref-range-conjunction |
| 296 |
display-break |
| 297 |
display-widow-penalties |
| 298 |
double-guillemet-right |
| 299 |
double-hyphen-demerits |
| 300 |
double-quotes |
| 301 |
final-hyphen-demerits |
| 302 |
inter-display-line-penalty |
| 303 |
inter-text |
| 304 |
kerned-hyphen |
| 305 |
last-line-ragged-left |
| 306 |
last-line-ragged-left-par |
| 307 |
loose-ness |
| 308 |
loose-spacing |
| 309 |
make-at-letter |
| 310 |
make-at-other |
| 311 |
mar-gin-al |
| 312 |
math-italic-correction |
| 313 |
micro-type |
| 314 |
number-dash |
| 315 |
par-box |
| 316 |
par-indent |
| 317 |
parfillskip |
| 318 |
pdf-string-def-Disable-Commands |
| 319 |
post-display-penalty |
| 320 |
pre-display-penalty |
| 321 |
raise-capital-guillemets |
| 322 |
raise-capital-times |
| 323 |
raise-number-dash |
| 324 |
set-font-expand |
| 325 |
set-font-shrink |
| 326 |
set-font-stretch |
| 327 |
short-inter-text |
| 328 |
single-guillemet-left |
| 329 |
single-guillemet-right |
| 330 |
single-quotes |
| 331 |
slash-kern |
| 332 |
slightly-sloppy-par |
| 333 |
sloppy-par |
| 334 |
smooth-ragged-right-fuzz-factor |
| 335 |
smooth-ragged-right-par |
| 336 |
smooth-ragged-right-shape-quintuplet |
| 337 |
smooth-ragged-right-shape-septuplet |
| 338 |
smooth-ragged-right-shape-triplet |
| 339 |
space-skip |
| 340 |
text-italic-correction |
| 341 |
tight-spacing |
| 342 |
tracing-boxes |
| 343 |
tracing-para-graphs |
| 344 |
vtie-bot |
| 345 |
vtie-bot-disp |
| 346 |
vtie-bot-disp-par |
| 347 |
vtie-bot-disp-top-par |
| 348 |
vtie-bot-par |
| 349 |
vtie-top |
| 350 |
vtie-top-par |
| 351 |
widow-penalties |
| 352 |
} |
| 353 |
|
| 354 |
\SetExpansion[context=sloppy, stretch=30, shrink=60, step=5]{encoding={OT1, T1, TS1}}{}% p15 |
| 355 |
\SetTracking{encoding=*, shape=sc}{20} |
| 356 |
|
| 357 |
\newcount\defaultlastlinefit |
| 358 |
\defaultlastlinefit=\lastlinefit |
| 359 |
|
| 360 |
\begin{document} |
| 361 |
\fussy |
| 362 |
\lastlinefit=1000% |
| 363 |
\nonfrenchspacing |
| 364 |
|
| 365 |
\begin{center} |
| 366 |
\sf |
| 367 |
{\Huge\bfseries TypoG Examples} |
| 368 |
|
| 369 |
\medskip |
| 370 |
|
| 371 |
for \packagename{typog} version~\getpackageversion{typog} as of |
| 372 |
\getpackagedate{typog} |
| 373 |
\end{center} |
| 374 |
|
| 375 |
\bigskip |
| 376 |
|
| 377 |
\noindent |
| 378 |
The section numbers correspond to the subsections of section~3 |
| 379 |
in the official documentation of package~\packagename{typog}. |
| 380 |
|
| 381 |
\bigskip |
| 382 |
|
| 383 |
\tableofcontents |
| 384 |
|
| 385 |
\clearpage |
| 386 |
\listof{exemplary}{Examples} |
| 387 |
|
| 388 |
\clearpage |
| 389 |
\noindent |
| 390 |
Unless otherwise noted the font used in the examples is \singlequotes{\examplefontname}. |
| 391 |
|
| 392 |
\section{Setup and Reconfiguration} |
| 393 |
|
| 394 |
\noindent |
| 395 |
\code{\char`\\ typogget} |
| 396 |
|
| 397 |
\begin{list}{}{\itemsep=0pt\parsep=0pt} |
| 398 |
\newcommand*{\expandsto}{$\mathbin{\mapsto}$} |
| 399 |
\item \code{breakpenalty} \expandsto{} \the\typogget{breakpenalty} |
| 400 |
\item \code{emdashspace} \expandsto{} \the\typogget{emdashspace} |
| 401 |
\item \code{endashspace} \expandsto{} \the\typogget{endashspace} |
| 402 |
\item \code{ligaturekern} \expandsto{} \milliem{\typogget{ligaturekern}} |
| 403 |
\item \code{lowercaselabelitemadjustments} \expandsto{} \typogget{lowercaselabelitemadjustments} |
| 404 |
\item \code{lowerslash} \expandsto{} \the\typogget{lowerslash} |
| 405 |
\item \code{mathitaliccorrection} \expandsto{} \the\typogget{mathitaliccorrection} |
| 406 |
\item \code{raisecapitaldash} \expandsto{} \the\typogget{raisecapitaldash} |
| 407 |
\item \code{raisecapitalguillemets} \expandsto{} \the\typogget{raisecapitalguillemets} |
| 408 |
\item \code{raisecapitalhyphen} \expandsto{} \the\typogget{raisecapitalhyphen} |
| 409 |
\item \code{raisecapitaltimes} \expandsto{} \the\typogget{raisecapitaltimes} |
| 410 |
\item \code{raisefiguredash} \expandsto{} \the\typogget{raisefiguredash} |
| 411 |
\item \code{raiseguillemets} \expandsto{} \the\typogget{raiseguillemets} |
| 412 |
\item \code{raiseinvertedmarks} \expandsto{} \typogget{raiseinvertedmarks} |
| 413 |
\item \code{shrinklimits} \expandsto{} \typogget{shrinklimits} |
| 414 |
\item \code{slashkern} \expandsto{} \the\typogget{slashkern} |
| 415 |
\item \code{stretchlimits} \expandsto{} \typogget{stretchlimits} |
| 416 |
\item \code{textitaliccorrection} \expandsto{} \the\typogget{textitaliccorrection} |
| 417 |
\item \code{trackingttspacing} \expandsto{} \typogget{trackingttspacing} |
| 418 |
\item \code{uppercaselabelitemadjustments} \expandsto{} \typogget{uppercaselabelitemadjustments} |
| 419 |
\end{list} |
| 420 |
|
| 421 |
\begingroup |
| 422 |
\dimen0=\typogget{raisecapitaldash}% |
| 423 |
\setbox0=\hbox to \typogget{ligaturekern} {}% |
| 424 |
\endgroup |
| 425 |
|
| 426 |
\noindent |
| 427 |
\code{\char`\\ typoggetnth} |
| 428 |
|
| 429 |
\begin{list}{}{\parsep=0pt} |
| 430 |
\item |
| 431 |
\code{lowercaselabelitemadjustments}: |
| 432 |
(1)~\typoggetnth{\dimen0}{lowercaselabelitemadjustments}{1}\the\dimen0, |
| 433 |
(2)~\typoggetnth{\dimen0}{lowercaselabelitemadjustments}{2}\the\dimen0, |
| 434 |
(3)~\typoggetnth{\dimen0}{lowercaselabelitemadjustments}{3}\the\dimen0, and |
| 435 |
(4)~\typoggetnth{\dimen0}{lowercaselabelitemadjustments}{4}\the\dimen0. |
| 436 |
|
| 437 |
Same elements now accessed from the right-hand-side, i.\,e.~with negative indices: |
| 438 |
(\textminus4)~\typoggetnth{nth}{lowercaselabelitemadjustments}{-4}\nth, |
| 439 |
(\textminus3)~\typoggetnth{nth}{lowercaselabelitemadjustments}{-3}\nth, |
| 440 |
(\textminus2)~\typoggetnth{nth}{lowercaselabelitemadjustments}{-2}\nth, and |
| 441 |
(\textminus1)~\typoggetnth{nth}{lowercaselabelitemadjustments}{-1}\nth. |
| 442 |
|
| 443 |
\item \code{raiseinvertedmarks}: |
| 444 |
(1)~\typoggetnth{nth}{raiseinvertedmarks}{1}\nth, |
| 445 |
(2)~\typoggetnth{nth}{raiseinvertedmarks}{2}\nth, and |
| 446 |
(3)~\typoggetnth{nth}{raiseinvertedmarks}{3}\nth. |
| 447 |
|
| 448 |
\item \code{shrinklimits}: |
| 449 |
(1)~\typoggetnth{nth}{shrinklimits}{1}\nth, |
| 450 |
(2)~\typoggetnth{nth}{shrinklimits}{2}\nth, and |
| 451 |
(3)~\typoggetnth{nth}{shrinklimits}{3}\nth. |
| 452 |
|
| 453 |
\item \code{stretchlimits}: |
| 454 |
(1)~\typoggetnth{nth}{stretchlimits}{1}\nth, |
| 455 |
(2)~\typoggetnth{nth}{stretchlimits}{2}\nth, and |
| 456 |
(3)~\typoggetnth{nth}{stretchlimits}{3}\nth. |
| 457 |
|
| 458 |
\item \code{trackingttspacing}: |
| 459 |
(1)~\typoggetnth{nth}{trackingttspacing}{1}\nth, |
| 460 |
(2)~\typoggetnth{nth}{trackingttspacing}{2}\nth, and |
| 461 |
(3)~\typoggetnth{nth}{trackingttspacing}{3}\nth. |
| 462 |
|
| 463 |
\item \code{uppercaselabelitemadjustments}: |
| 464 |
(1)~\typoggetnth{\dimen0}{uppercaselabelitemadjustments}{1}\the\dimen0, |
| 465 |
(2)~\typoggetnth{\dimen0}{uppercaselabelitemadjustments}{2}\the\dimen0, |
| 466 |
(3)~\typoggetnth{\dimen0}{uppercaselabelitemadjustments}{3}\the\dimen0, and |
| 467 |
(4)~\typoggetnth{\dimen0}{uppercaselabelitemadjustments}{4}\the\dimen0. |
| 468 |
\end{list} |
| 469 |
|
| 470 |
\section{Information} |
| 471 |
|
| 472 |
\code{\string\fontsizeinfo} --\fontsizeinfo{docsizeinfo} |
| 473 |
At this point of the document, the font~size |
| 474 |
and the line~spacing are \docsizeinfo*~(w/o~units). |
| 475 |
For footnotes however, the current sizes are% |
| 476 |
\footnote{This is the footnote where we get the sizes from.\fontsizeinfo{footsizeinfo}} |
| 477 |
\footsizeinfo. |
| 478 |
|
| 479 |
Next we show a comparison of different font sizes and line spacings |
| 480 |
decorated with the results of \code{\string\fontsizeinfo}. |
| 481 |
|
| 482 |
\medskip |
| 483 |
|
| 484 |
\begin{widebody} |
| 485 |
\setstretch{1} |
| 486 |
\newcommand*{\baselineskipdoc}% |
| 487 |
{Macro \code{\string\baselineskip} is a length macro which |
| 488 |
specifies the minimum space between the bottom of two |
| 489 |
successive lines in a paragraph. Its value may be |
| 490 |
automatically reset by \LaTeX, for example, by font |
| 491 |
changes in the text.} |
| 492 |
\renewcommand*{\examplefontname}{Merriweather} |
| 493 |
Different font sizes and line spacings exemplified with the \examplefontname~font. |
| 494 |
|
| 495 |
\smallskip |
| 496 |
|
| 497 |
\begingroup |
| 498 |
\fontfamily{Merriwthr-TLF}\selectfont |
| 499 |
\noindent |
| 500 |
\parbox[t]{.31\linewidth}% |
| 501 |
{\fontsize{8.5}{12}\selectfont |
| 502 |
\baselineskipdoc |
| 503 |
\fontsizeinfo{examplesizeinfotight}} |
| 504 |
\hfill |
| 505 |
\parbox[t]{.31\linewidth}% |
| 506 |
{\fontsize{10}{12}\selectfont |
| 507 |
\baselineskipdoc |
| 508 |
\fontsizeinfo{examplesizeinfo}} |
| 509 |
\hfill |
| 510 |
\parbox[t]{.31\linewidth}% |
| 511 |
{\fontsize{10}{13.5}\selectfont |
| 512 |
\baselineskipdoc |
| 513 |
\fontsizeinfo{examplesizeinfoloose}} |
| 514 |
\endgroup |
| 515 |
|
| 516 |
\medskip |
| 517 |
|
| 518 |
\noindent |
| 519 |
\parbox[t]{.31\linewidth}{\examplefontname~\examplesizeinfotight*} |
| 520 |
\hfill |
| 521 |
\parbox[t]{.31\linewidth}{\examplefontname~\examplesizeinfo*} |
| 522 |
\hfill |
| 523 |
\parbox[t]{.31\linewidth}{\examplefontname~\examplesizeinfoloose*} |
| 524 |
\end{widebody} |
| 525 |
|
| 526 |
\noindent Starred form eats spaces? \examplesizeinfo* . |
| 527 |
|
| 528 |
\section{Hyphenation} |
| 529 |
|
| 530 |
\noindent Line-Break Behavior |
| 531 |
|
| 532 |
\begin{quote} |
| 533 |
\setlength{\overfullrule}{0pt} |
| 534 |
\parbox[t]{0pt}{% |
| 535 |
\code{\string\mbox+\string\breakpoint*} \\ |
| 536 |
\mbox{(pre-)}\breakpoint*Hilbert space} |
| 537 |
\hspace{100pt} |
| 538 |
\parbox[t]{0pt}{% |
| 539 |
\code{\string\breakpoint*} \\ |
| 540 |
(pre-)\breakpoint*Hilbert space} |
| 541 |
\hspace{100pt} |
| 542 |
\parbox[t]{0pt}{% |
| 543 |
\code{\string\breakpoint} \\ |
| 544 |
(pre-)\breakpoint Hilbert space} |
| 545 |
\end{quote} |
| 546 |
|
| 547 |
\noindent Starred form eats spaces? a\breakpoint* b. Unstarred: a\breakpoint b. |
| 548 |
|
| 549 |
\medskip |
| 550 |
|
| 551 |
\begin{quote} |
| 552 |
\setlength{\overfullrule}{0pt} |
| 553 |
\parbox[t]{0pt}{% |
| 554 |
\begin{hyphenmin}{6} |
| 555 |
Set minimum hyphenation values for both \code{\string\lefthyphenmin} and |
| 556 |
\code{\string\righthyphenmin}: \the\lefthyphenmin{} and \the\righthyphenmin. |
| 557 |
\end{hyphenmin}} |
| 558 |
\hspace{100pt} |
| 559 |
\parbox[t]{0pt}{% |
| 560 |
\begin{hyphenmin}[4]{5} |
| 561 |
Set minimum hyphenation values for \code{\string\lefthyphenmin} and |
| 562 |
\code{\string\righthyphenmin} separately: \the\lefthyphenmin{} and \the\righthyphenmin. |
| 563 |
\end{hyphenmin}} |
| 564 |
\hspace{100pt} |
| 565 |
\parbox[t]{0pt}{% |
| 566 |
Returned to the default values for \code{\string\lefthyphenmin} and |
| 567 |
\code{\string\righthyphenmin}: \the\lefthyphenmin{} and \the\righthyphenmin.} |
| 568 |
\end{quote} |
| 569 |
|
| 570 |
\section{Disable\kernedslash*Break Ligatures} |
| 571 |
|
| 572 |
\begin{center} |
| 573 |
\begin{tabular}{@{}ll@{}} |
| 574 |
\hline |
| 575 |
\multicolumn{1}{@{}l|}{Macro} & Result \\ |
| 576 |
\hline |
| 577 |
n/a & |
| 578 |
fine affirmation of baffling flavors \\ |
| 579 |
\code{\string\nolig*} & |
| 580 |
f\nolig*ine af\nolig*f\nolig*irmation of baf\nolig*f\nolig*ling f\nolig*lavors \\ |
| 581 |
\code{\string\nolig} & |
| 582 |
f\nolig{}ine af\nolig{}f\nolig{}irmation of baf\nolig{}f\nolig{}ling f\nolig{}lavors \\ |
| 583 |
\code{\string\nolig*[75]} & of\nolig*[75]f\nolig*[75]ice |
| 584 |
\end{tabular} |
| 585 |
\end{center} |
| 586 |
|
| 587 |
\noindent Line-Break Behavior |
| 588 |
|
| 589 |
\begin{quote} |
| 590 |
\setlength{\overfullrule}{0pt} |
| 591 |
\parbox[t]{0pt}{% |
| 592 |
\code{\string\nolig*} \\ |
| 593 |
bi\nolig*{}jection} |
| 594 |
\hspace{60pt} |
| 595 |
\parbox[t]{0pt}{% |
| 596 |
\code{\string\nolig} \\ |
| 597 |
bi\nolig{}jection} |
| 598 |
\end{quote} |
| 599 |
|
| 600 |
\noindent Starred form eats spaces? f\nolig* i, f\nolig*[0] i. |
| 601 |
|
| 602 |
\section{Manual Italic Correction} |
| 603 |
|
| 604 |
\paragraph{Text Mode.} |
| 605 |
|
| 606 |
The italic correction of the current font is \the\fontdimen1\font/pt. |
| 607 |
|
| 608 |
We demonstrate the effect of \code{\string\itcorr} with a pair of bookends: |
| 609 |
uncorrected italic: \indicatewidth{\it X}, |
| 610 |
\TeX-corrected (\code{\string\/}): \indicatewidth{\it X\/}, |
| 611 |
and \code{\string\itcorr\{7\}}: \indicatewidth{\it X\itcorr{7}}. |
| 612 |
|
| 613 |
Correction~0: \indicatewidth{\itcorr*{0}}; |
| 614 |
corr.~3: \indicatewidth{\itcorr{3}}, \indicatewidth{\itcorr*{3}} (starred); |
| 615 |
corr.~\textminus6: \indicatewidth{\itcorr{-6}}. |
| 616 |
|
| 617 |
\paragraph{Mathematical Mode.} |
| 618 |
|
| 619 |
Uncorrected: \([f]\), |
| 620 |
corrected: \([\itcorr{1} f\itcorr{1}]\) |
| 621 |
|
| 622 |
Correction~0: \indicatewidth{\(\itcorr{0}\)}; |
| 623 |
corr.~3: \indicatewidth{\(\itcorr{3}\)}; |
| 624 |
corr.~\textminus6: \indicatewidth{\(\itcorr{-6}\)}. |
| 625 |
|
| 626 |
\section{Apply Extra Kerning} |
| 627 |
|
| 628 |
\subsection{Slash} |
| 629 |
|
| 630 |
The slash with some extra space~(\code{slashkern}=\the\typogget{slashkern}) around it can be |
| 631 |
helpful for certain pairs, as for example years or names. |
| 632 |
|
| 633 |
\begin{center} |
| 634 |
\begin{tabular}{@{}lp{9em}p{15em}@{}} |
| 635 |
\hline |
| 636 |
\multicolumn{1}{@{}l|}{Macro} & \multicolumn{1}{l|}{Local Settings} & Result \\ |
| 637 |
\hline |
| 638 |
n/a & n/a & 1991/1992, New~York/NY, Korringa/Kohn/Rostoker \\ |
| 639 |
\code{\string\kernedslash} & |
| 640 |
n/a & |
| 641 |
1991\kernedslash 1992, New~York\kernedslash NY, Korringa\kernedslash Kohn\kernedslash Rostoker \\ |
| 642 |
\code{\string\kernedslash} & |
| 643 |
\ttfamily lowerslash=.1em, slashkern=-.0333em & |
| 644 |
\typogsetup{lowerslash=.1em, slashkern=-.0333em} |
| 645 |
\scshape bardeen\kernedslash cooper\kernedslash shrieffer \\ |
| 646 |
\code{\string\kernedslash} & |
| 647 |
\ttfamily lowerslash=.1em, slashkern=0pt & |
| 648 |
\typogsetup{lowerslash=.1em, slashkern=0pt}abc\kernedslash def, uvw\kernedslash jkl |
| 649 |
\end{tabular} |
| 650 |
\end{center} |
| 651 |
|
| 652 |
\noindent Line-Break Behavior |
| 653 |
|
| 654 |
\begin{quote} |
| 655 |
\setlength{\overfullrule}{0pt} |
| 656 |
\parbox[t]{0pt}{% |
| 657 |
\code{\string\kernedslash*} \\ |
| 658 |
1991\kernedslash*1992, |
| 659 |
New~York\kernedslash*NY, |
| 660 |
Korringa\kernedslash*Kohn\kernedslash*Rostoker} |
| 661 |
\hspace{120pt} |
| 662 |
\parbox[t]{0pt}{% |
| 663 |
\code{\string\kernedslash} \\ |
| 664 |
1991\kernedslash{}1992, |
| 665 |
New~York\kernedslash{}NY, |
| 666 |
Korringa\kernedslash{}Kohn\kernedslash{}Rostoker} |
| 667 |
\end{quote} |
| 668 |
|
| 669 |
\begin{quote} |
| 670 |
\setlength{\overfullrule}{0pt} |
| 671 |
\parbox[t]{0pt}{% |
| 672 |
\code{\string\kernedslash*}\code{\string\nobreak} \\ |
| 673 |
1991\kernedslash*\nobreak{}1992, |
| 674 |
New~York\kernedslash*\nobreak{}NY, |
| 675 |
Korringa\kernedslash*Kohn\kernedslash*\nobreak{}Rostoker} |
| 676 |
\hspace{140pt} |
| 677 |
\parbox[t]{0pt}{% |
| 678 |
\code{\string\allowhyphenation\string\kernedslash} \\ |
| 679 |
1991\kernedslash{}1992, |
| 680 |
New~York\kernedslash{}NY, |
| 681 |
Korringa\allowhyphenation\kernedslash{}Kohn\kernedslash{}Rostoker} |
| 682 |
\end{quote} |
| 683 |
|
| 684 |
\noindent Starred form eats spaces? p\kernedslash* q. |
| 685 |
|
| 686 |
\subsection{Hyphen} |
| 687 |
|
| 688 |
Uncorrected |
| 689 |
|
| 690 |
\begin{quote} |
| 691 |
\(K\)-vector space, \(g\)-factor, \(f\)-function |
| 692 |
\end{quote} |
| 693 |
|
| 694 |
\noindent Corrected |
| 695 |
|
| 696 |
\begin{quote} |
| 697 |
\typogsetup{raisecapitalhyphen=.075em, raiseguillemets=.05em} |
| 698 |
\(K\)\leftkernedhyphen{-75}vector space, |
| 699 |
\(g\)\leftkernedhyphen{-25}factor, |
| 700 |
\(f\)\leftkernedhyphen{-100}function |
| 701 |
%% \(G\)\kernedhyphen[*]{50}{-50}Wirkung, |
| 702 |
%% \(G\)\leftkernedhyphen{50}äquivalent, |
| 703 |
%% \(K\)\kernedhyphen[*]{-50}{-50}Vektorraum, |
| 704 |
%% \(K\)\kernedhyphen{-50}{-25}bilinear, |
| 705 |
%% \propername{Young}\rightkernedhyphen{-50}Tableaux, |
| 706 |
%% \singlequotes{Bra}\kernedhyphen[50]{50}{-50}Vektor, |
| 707 |
%% \singlequotes{Ket}\kernedhyphen[50]{50}{-50}Vektor, |
| 708 |
%% halbzahlige~\(l\)\kernedhyphen{50}{-50}Werte. |
| 709 |
\end{quote} |
| 710 |
|
| 711 |
\noindent Line-Break Behavior |
| 712 |
|
| 713 |
\begin{quote} |
| 714 |
\setlength{\overfullrule}{0pt} |
| 715 |
|
| 716 |
\parbox[t]{0pt}{hyphen~\mbox{`\code{-}'} \\ self-energy} |
| 717 |
\hspace{80pt} |
| 718 |
\parbox[t]{0pt}{\code{\string\hyp} \\ self\hyp{}energy} |
| 719 |
\hspace{60pt} |
| 720 |
\parbox[t]{0pt}{\code{\string\kernedhyphen*} \\ self\kernedhyphen*{5}{-5}energy} |
| 721 |
\hspace{80pt} |
| 722 |
\parbox[t]{0pt}{\code{\string\kernedhyphen} \\ self\kernedhyphen{5}{-5}energy} |
| 723 |
\end{quote} |
| 724 |
|
| 725 |
\noindent If a \code{\string\kernedhyphen} goes astray in a math environment, |
| 726 |
it decays to an ordinary minus with appropriate kerning: |
| 727 |
\(G \kernedhyphen{-30}{-50} V\)\!. |
| 728 |
|
| 729 |
\subsection{En-Dash and Em-Dash} |
| 730 |
|
| 731 |
\iffalse |
| 732 |
\section{abc\spacedendash\relax def} |
| 733 |
\section{ghi\spacedendash*{}jkl} |
| 734 |
\section{mno\spacedendash[1pt]\relax pqr} |
| 735 |
\section{stu\spacedendash*[1pt]{}vwx} |
| 736 |
|
| 737 |
\section{GHI\spacedemdash\relax JKL} |
| 738 |
\section{MNO\spacedemdash[1pt]{}PQR} |
| 739 |
\fi |
| 740 |
|
| 741 |
En-Dash |
| 742 |
|
| 743 |
\setbox0=\hbox{\leftspacedendash}% |
| 744 |
\setbox0=\hbox{\leftspaceddash}% |
| 745 |
\setbox0=\hbox{\leftspacedendash*}% |
| 746 |
\setbox0=\hbox{\leftspaceddash*}% |
| 747 |
\setbox0=\hbox{\rightspacedendash}% |
| 748 |
\setbox0=\hbox{\rightspaceddash}% |
| 749 |
\setbox0=\hbox{\spacedendash}% |
| 750 |
\setbox0=\hbox{\spaceddash}% |
| 751 |
\setbox0=\hbox{\rightspacedendash*}% |
| 752 |
\setbox0=\hbox{\spacedendash*}% |
| 753 |
\setbox0=\hbox{\spaceddash*}% |
| 754 |
\begin{quote} |
| 755 |
abc\spacedendash{}def, ghi\spacedendash* jkl, mno\spacedendash[.3em] pqr (raised by .3\,em) |
| 756 |
\end{quote} |
| 757 |
|
| 758 |
\noindent Line-Break Behavior |
| 759 |
|
| 760 |
\begin{quote} |
| 761 |
\setlength{\overfullrule}{0pt} |
| 762 |
|
| 763 |
\parbox[t]{0pt}{\code{\string\leftspacedendash} \\ En\-dash\leftspacedendash Spacing} |
| 764 |
\hspace{100pt} |
| 765 |
\parbox[t]{0pt}{\code{\string\rightspacedendash} \\ En\-dash\rightspacedendash Spacing} |
| 766 |
\hspace{100pt} |
| 767 |
\parbox[t]{0pt}{\code{\string\spacedendash*} \\ En\-dash\spacedendash* Spacing} |
| 768 |
\end{quote} |
| 769 |
|
| 770 |
\noindent Em-Dash |
| 771 |
|
| 772 |
\setbox0=\hbox{\leftspacedemdash}% |
| 773 |
\setbox0=\hbox{\leftspacedemdash*}% |
| 774 |
\setbox0=\hbox{\rightspacedemdash}% |
| 775 |
\setbox0=\hbox{\spacedemdash}% |
| 776 |
\setbox0=\hbox{\rightspacedemdash*}% |
| 777 |
\setbox0=\hbox{\spacedemdash*}% |
| 778 |
\begin{quote} |
| 779 |
abc\spacedemdash{}def, ghi\spacedemdash* jkl, mno\spacedemdash[.3em] pqr (raised by .3\,em) |
| 780 |
\end{quote} |
| 781 |
|
| 782 |
\noindent Line-Break Behavior |
| 783 |
|
| 784 |
\begin{quote} |
| 785 |
\setlength{\overfullrule}{0pt} |
| 786 |
|
| 787 |
\parbox[t]{0pt}{\code{\string\leftspacedemdash} \\ Dash\leftspacedemdash Spacing} |
| 788 |
\hspace{100pt} |
| 789 |
\parbox[t]{0pt}{\code{\string\rightspacedemdash} \\ Dash\rightspacedemdash Spacing} |
| 790 |
\hspace{100pt} |
| 791 |
\parbox[t]{0pt}{\code{\string\spacedemdash*} \\ Dash\spacedemdash* Spacing} |
| 792 |
\end{quote} |
| 793 |
|
| 794 |
\section{Raise Selected Characters} |
| 795 |
|
| 796 |
\subsection{Capital Hyphen} |
| 797 |
|
| 798 |
\newlength{\exemplaryraisecapitalhyphen} |
| 799 |
\setlength{\exemplaryraisecapitalhyphen}{.6667pt} |
| 800 |
With the standard hyphen we get |
| 801 |
|
| 802 |
\begin{quote} |
| 803 |
\begin{otherlanguage}{german} |
| 804 |
\acronym{NMR}-Spektroskopie, |
| 805 |
\acronym{SI}-Einheit, |
| 806 |
\(G\)-Modul, and |
| 807 |
\(K\)-Vektorraum, |
| 808 |
\end{otherlanguage} |
| 809 |
\end{quote} |
| 810 |
|
| 811 |
\noindent whereas with raising the hyphen by \the\exemplaryraisecapitalhyphen{} |
| 812 |
when calling \code{\string\capitalhyphen}, we arrive at |
| 813 |
|
| 814 |
\begin{quote} |
| 815 |
\begin{otherlanguage}{german} |
| 816 |
\typogsetup{raisecapitalhyphen=.075em} |
| 817 |
|
| 818 |
\acronym{NMR}\capitalhyphen{}Spektroskopie, |
| 819 |
\acronym{SI}\capitalhyphen{}Einheit, |
| 820 |
\(G\)\capitalhyphen{}Modul, and |
| 821 |
\(K\)\capitalhyphen{}Vektorraum |
| 822 |
(even better with \code{\string\kernedhyphen} |
| 823 |
and the star-option for the correct raise-amount: |
| 824 |
\(K\)\leftkernedhyphen[*]{-100}Vektorraum). |
| 825 |
\end{otherlanguage} |
| 826 |
\end{quote} |
| 827 |
|
| 828 |
\noindent Line-Break Behavior |
| 829 |
|
| 830 |
\begin{quote} |
| 831 |
\setlength{\overfullrule}{0pt} |
| 832 |
\begin{otherlanguage}{german} |
| 833 |
\parbox[t]{0pt}{% |
| 834 |
\code{\string\capitalhyphen*} \\ |
| 835 |
\acronym{NMR}\capitalhyphen*{}Spektroskopie |
| 836 |
} |
| 837 |
\hspace{120pt} |
| 838 |
\parbox[t]{0pt}{% |
| 839 |
\code{\string\capitalhyphen} \\ |
| 840 |
\acronym{NMR}\capitalhyphen{}Spektroskopie |
| 841 |
} |
| 842 |
\end{otherlanguage} |
| 843 |
\end{quote} |
| 844 |
|
| 845 |
\noindent Starred form eats spaces? |
| 846 |
{\typogsetup{raisecapitalhyphen=.075em} |
| 847 |
V\capitalhyphen* W.} |
| 848 |
|
| 849 |
\subsection{Capital Dash} |
| 850 |
|
| 851 |
\newlength{\exemplaryraisecapitaldash} |
| 852 |
\setlength{\exemplaryraisecapitaldash}{.075em} |
| 853 |
|
| 854 |
Compare the result of plain~\code{\string\textendash} |
| 855 |
|
| 856 |
\begin{quote} |
| 857 |
A\textendash M, N\textendash Z, C1\,\textendash\,C4, LEED\:\textendash\:STM |
| 858 |
\end{quote} |
| 859 |
|
| 860 |
\noindent with \code{\string\capitaldash}: |
| 861 |
|
| 862 |
\begin{quote} |
| 863 |
\typogsetup{raisecapitaldash=\exemplaryraisecapitaldash} |
| 864 |
|
| 865 |
A\capitaldash{}M, N\capitaldash{}Z, C1\,\capitaldash\,C4, LEED\:\capitaldash\:STM |
| 866 |
\end{quote} |
| 867 |
|
| 868 |
\noindent where the en-dash has been raised by \milliem{\exemplaryraisecapitaldash}. |
| 869 |
|
| 870 |
Starred form eats spaces? V\capitaldash* W. |
| 871 |
|
| 872 |
\smallskip |
| 873 |
|
| 874 |
\noindent Spaced Capital En-Dash |
| 875 |
|
| 876 |
\setbox0=\hbox{\leftspacedcapitalendash}% |
| 877 |
\setbox0=\hbox{\leftspacedcapitaldash}% |
| 878 |
\setbox0=\hbox{\leftspacedcapitalendash*}% |
| 879 |
\setbox0=\hbox{\leftspacedcapitaldash*}% |
| 880 |
\setbox0=\hbox{\rightspacedcapitalendash}% |
| 881 |
\setbox0=\hbox{\rightspacedcapitaldash}% |
| 882 |
\setbox0=\hbox{\spacedcapitalendash}% |
| 883 |
\setbox0=\hbox{\spacedcapitaldash}% |
| 884 |
\setbox0=\hbox{\rightspacedcapitalendash*}% |
| 885 |
\setbox0=\hbox{\spacedcapitalendash*}% |
| 886 |
\setbox0=\hbox{\spacedcapitaldash*}% |
| 887 |
\begin{quote} |
| 888 |
abc\spacedcapitalendash{}def, ghi\spacedcapitalendash* jkl |
| 889 |
\end{quote} |
| 890 |
|
| 891 |
\noindent Spaced Capital Em-Dash |
| 892 |
|
| 893 |
\setbox0=\hbox{\leftspacedcapitalemdash}% |
| 894 |
\setbox0=\hbox{\leftspacedcapitalemdash*}% |
| 895 |
\setbox0=\hbox{\rightspacedcapitalemdash}% |
| 896 |
\setbox0=\hbox{\spacedcapitalemdash}% |
| 897 |
\setbox0=\hbox{\rightspacedcapitalemdash*}% |
| 898 |
\setbox0=\hbox{\spacedcapitalemdash*}% |
| 899 |
\begin{quote} |
| 900 |
abc\spacedcapitalemdash{}def, ghi\spacedcapitalemdash* jkl |
| 901 |
\end{quote} |
| 902 |
|
| 903 |
\subsection{Number Dash} |
| 904 |
|
| 905 |
\newlength{\exemplaryraisefiguredash} |
| 906 |
\setlength{\exemplaryraisefiguredash}{.6667pt} |
| 907 |
Compare the result of plain~\code{\string\textendash} |
| 908 |
|
| 909 |
\begin{quote} |
| 910 |
3--5, 81--82, 485--491 |
| 911 |
\end{quote} |
| 912 |
|
| 913 |
\noindent with \code{\string\figuredash}: |
| 914 |
|
| 915 |
\begin{quote} |
| 916 |
\typogsetup{raisefiguredash=\exemplaryraisefiguredash} |
| 917 |
3\figuredash 5, 81\figuredash 82, 485\figuredash 491 |
| 918 |
\end{quote} |
| 919 |
|
| 920 |
\noindent where the en-dash has been raised by \the\exemplaryraisefiguredash. |
| 921 |
|
| 922 |
\noindent Line-Break Behavior |
| 923 |
|
| 924 |
\begin{quote} |
| 925 |
\setlength{\overfullrule}{0pt} |
| 926 |
\typogsetup{raisefiguredash=\exemplaryraisefiguredash} |
| 927 |
\parbox[t]{0pt}{% |
| 928 |
\code{\string\figuredash*} \\ |
| 929 |
3\figuredash*5, 81\figuredash*82, 485\figuredash*491 |
| 930 |
} |
| 931 |
\hspace{80pt} |
| 932 |
\parbox[t]{0pt}{% |
| 933 |
\code{\string\figuredash} \\ |
| 934 |
3\figuredash 5, 81\figuredash 82, 485\figuredash 491 |
| 935 |
} |
| 936 |
\end{quote} |
| 937 |
|
| 938 |
\noindent Starred form eats spaces? 44\figuredash* 55. |
| 939 |
|
| 940 |
\subsection{Multiplication Sign \capitaldash{} Times~``\texttimes''} |
| 941 |
|
| 942 |
\newlength{\exemplaryraisetimes} |
| 943 |
\setlength{\exemplaryraisetimes}{.6667pt} |
| 944 |
The problem with a too-low multiplication sign arises |
| 945 |
for example with matrices of a given, specific size. |
| 946 |
|
| 947 |
\noindent Uncorrected |
| 948 |
|
| 949 |
\begin{quote} |
| 950 |
\acronym{LR}-mode: 2\texttimes2-matrix, \(N\)\texttimes\(M\)-matrix \\ |
| 951 |
Math-mode: \(2\times2\)-matrix, \(N\times M\)-matrix |
| 952 |
\end{quote} |
| 953 |
|
| 954 |
\noindent and corrected |
| 955 |
|
| 956 |
\begin{quote} |
| 957 |
\typogsetup{raisecapitalhyphen=\exemplaryraisecapitalhyphen, |
| 958 |
raisecapitaltimes=\exemplaryraisetimes} |
| 959 |
\acronym{LR}-mode: 2\capitaltimes2-matrix, \(N\)\capitaltimes\(M\)-matrix \\ |
| 960 |
Math-mode: \(2\capitaltimes2\)-matrix, \(N\capitaltimes M\)-matrix. |
| 961 |
\end{quote} |
| 962 |
|
| 963 |
\subsection{Guillemets} |
| 964 |
|
| 965 |
\newcommand*{\tschicholdi} |
| 966 |
{Use single quotes for a first quotation.} |
| 967 |
\newcommand*{\tschicholdii} |
| 968 |
{Use double quotes for quotations within quotations.} |
| 969 |
|
| 970 |
\newcommand*{\frenchsinglequotes}[1]{\singleguillemetright #1\singleguillemetleft} |
| 971 |
\newcommand*{\Frenchsinglequotes}[1]{\Singleguillemetright #1\Singleguillemetleft} |
| 972 |
\newcommand*{\frenchdoublequotes}[1]{\doubleguillemetright #1\doubleguillemetleft} |
| 973 |
\newcommand*{\Frenchdoublequotes}[1]{\Doubleguillemetright #1\Doubleguillemetleft} |
| 974 |
|
| 975 |
\newcommand*{\frenchsinglequotesFR}[1]{\singleguillemetleft\,\allowhyphenation#1\,\singleguillemetright} |
| 976 |
\newcommand*{\FrenchsinglequotesFR}[1]{\Singleguillemetleft\,\allowhyphenation#1\,\Singleguillemetright} |
| 977 |
\newcommand*{\frenchdoublequotesFR}[1]{\doubleguillemetleft\,\allowhyphenation#1\,\doubleguillemetright} |
| 978 |
\newcommand*{\FrenchdoublequotesFR}[1]{\Doubleguillemetleft\,\allowhyphenation#1\,\Doubleguillemetright} |
| 979 |
|
| 980 |
\newlength{\exemplaryraiseguillemets} |
| 981 |
\setlength{\exemplaryraiseguillemets}{.05em} |
| 982 |
\newlength{\exemplaryraisecapitalguillemets} |
| 983 |
\setlength{\exemplaryraisecapitalguillemets}{.1em} |
| 984 |
|
| 985 |
We again compare the default implementation with the adjusted one. |
| 986 |
|
| 987 |
\begin{quote} |
| 988 |
\frenchsinglequotes{\tschicholdi} \\ |
| 989 |
\frenchdoublequotes{\tschicholdii} \\ |
| 990 |
\Frenchsinglequotes{1}, \Frenchsinglequotes{2}, \Frenchsinglequotes{3}. \\ |
| 991 |
\Frenchdoublequotes{\letterspacecapitals{ABC}}, |
| 992 |
\Frenchdoublequotes{\letterspacecapitals{MN}}, |
| 993 |
\Frenchdoublequotes{\letterspacecapitals{XYZ}}. |
| 994 |
\end{quote} |
| 995 |
|
| 996 |
\noindent Corrected by raising the glyphs by |
| 997 |
\milliem{\exemplaryraiseguillemets} and |
| 998 |
\milliem{\exemplaryraisecapitalguillemets}: |
| 999 |
|
| 1000 |
\begin{quote} |
| 1001 |
\typogsetup{raiseguillemets=\exemplaryraiseguillemets, |
| 1002 |
raisecapitalguillemets=\exemplaryraisecapitalguillemets} |
| 1003 |
\frenchsinglequotes{\tschicholdi} \\ |
| 1004 |
\frenchdoublequotes{\tschicholdii} \\ |
| 1005 |
\Frenchsinglequotes{1}, \Frenchsinglequotes{2}, \Frenchsinglequotes{3}. \\ |
| 1006 |
\Frenchdoublequotes{\letterspacecapitals{ABC}}, |
| 1007 |
\Frenchdoublequotes{\letterspacecapitals{MN}}, |
| 1008 |
\Frenchdoublequotes{\letterspacecapitals{XYZ}}. |
| 1009 |
\end{quote} |
| 1010 |
|
| 1011 |
\noindent And the same using French typographic conventions: |
| 1012 |
|
| 1013 |
\begin{quote} |
| 1014 |
\typogsetup{raiseguillemets=\exemplaryraiseguillemets, |
| 1015 |
raisecapitalguillemets=\exemplaryraisecapitalguillemets} |
| 1016 |
\frenchsinglequotesFR{\tschicholdi} \\ |
| 1017 |
\frenchdoublequotesFR{\tschicholdii} \\ |
| 1018 |
\FrenchsinglequotesFR{1}, \FrenchsinglequotesFR{2}, \FrenchsinglequotesFR{3}. \\ |
| 1019 |
\FrenchdoublequotesFR{\letterspacecapitals{ABC}}, |
| 1020 |
\FrenchdoublequotesFR{\letterspacecapitals{MN}}, |
| 1021 |
\FrenchdoublequotesFR{\letterspacecapitals{XYZ}}. |
| 1022 |
\end{quote} |
| 1023 |
|
| 1024 |
\noindent Line-Break Behavior |
| 1025 |
|
| 1026 |
\begin{quote} |
| 1027 |
\setlength{\overfullrule}{0pt} |
| 1028 |
\typogsetup{raiseguillemets=\exemplaryraiseguillemets, |
| 1029 |
raisecapitalguillemets=\exemplaryraisecapitalguillemets} |
| 1030 |
|
| 1031 |
\newcommand*{\samplestring}{relation} |
| 1032 |
|
| 1033 |
\parbox[t]{0pt}{\frenchsinglequotes{\samplestring}} |
| 1034 |
\hspace{30pt} |
| 1035 |
\parbox[t]{0pt}{\Frenchsinglequotes{\samplestring}} |
| 1036 |
\hspace{30pt} |
| 1037 |
\parbox[t]{0pt}{\frenchdoublequotes{\samplestring}} |
| 1038 |
\hspace{30pt} |
| 1039 |
\parbox[t]{0pt}{\Frenchdoublequotes{\samplestring}} |
| 1040 |
|
| 1041 |
\smallskip |
| 1042 |
|
| 1043 |
\parbox[t]{0pt}{\frenchsinglequotesFR{\samplestring}} |
| 1044 |
\hspace{30pt} |
| 1045 |
\parbox[t]{0pt}{\FrenchsinglequotesFR{\samplestring}} |
| 1046 |
\hspace{30pt} |
| 1047 |
\parbox[t]{0pt}{\frenchdoublequotesFR{\samplestring}} |
| 1048 |
\hspace{30pt} |
| 1049 |
\parbox[t]{0pt}{\FrenchdoublequotesFR{\samplestring}} |
| 1050 |
\end{quote} |
| 1051 |
|
| 1052 |
\subsection{Inverted Exclamation Mark and Inverted Question Mark} |
| 1053 |
|
| 1054 |
Without \typoglogo{} support: |
| 1055 |
g\textexclamdown jk\textquestiondown y\enspace |
| 1056 |
\textexclamdown E! \textquestiondown Q? |
| 1057 |
|
| 1058 |
All-caps versus small-caps: |
| 1059 |
|
| 1060 |
\noindent |
| 1061 |
\begin{minipage}{.4\textwidth}\parindent=15pt |
| 1062 |
\noindent |
| 1063 |
\textsc{Carmen}\par |
| 1064 |
{\lsstyle\capitalinvertedquestionmark{1}CÓMO ESTÁS, JOSÉ?} |
| 1065 |
|
| 1066 |
\noindent |
| 1067 |
\textsc{José}\par |
| 1068 |
{\lsstyle\capitalinvertedexclamationmark{1}BIEN! \capitalinvertedquestionmark{1}\itcorr{-2}Y TÚ?} |
| 1069 |
|
| 1070 |
\noindent |
| 1071 |
\textsc{Carmen}\par |
| 1072 |
{\lsstyle\capitalinvertedexclamationmark{1}BIEN TAMBIÉN!} |
| 1073 |
\end{minipage} |
| 1074 |
\hfill |
| 1075 |
\begin{minipage}{.4\textwidth}\parindent=15pt |
| 1076 |
\noindent |
| 1077 |
\textsc{Carmen}\par |
| 1078 |
{\scshape\capitalinvertedquestionmark{1}cómo estás, josé?} |
| 1079 |
|
| 1080 |
\noindent |
| 1081 |
\textsc{José}\par |
| 1082 |
{\scshape\capitalinvertedexclamationmark{1}bien! \capitalinvertedquestionmark{1}\itcorr{-2}y tú?} |
| 1083 |
|
| 1084 |
\noindent |
| 1085 |
\textsc{Carmen}\par |
| 1086 |
{\scshape\capitalinvertedexclamationmark{1}bien también!} |
| 1087 |
\end{minipage} |
| 1088 |
|
| 1089 |
\medskip |
| 1090 |
|
| 1091 |
\begin{typogsetup}{raiseinvertedmarks={5pt,*,1sp}} |
| 1092 |
\noindent |
| 1093 |
Local settings are \{\typoggetnth{\dimen0}{raiseinvertedmarks}{1}\the\dimen0, |
| 1094 |
\typoggetnth{\dimen0}{raiseinvertedmarks}{2}\the\dimen0, |
| 1095 |
\typoggetnth{\dimen0}{raiseinvertedmarks}{3}\the\dimen0\}. |
| 1096 |
|
| 1097 |
Primaries: ?\capitalinvertedquestionmark{1}? and !\capitalinvertedexclamationmark{1}! |
| 1098 |
|
| 1099 |
\makeatletter |
| 1100 |
\def\typog@inverted@exclamationmark@ii{\textexclamdown\textsubscript{2}} |
| 1101 |
\def\typog@inverted@exclamationmark@iii{\textexclamdown\textsubscript{3}} |
| 1102 |
\def\typog@inverted@questionmark@ii{\textquestiondown\textsubscript{2}} |
| 1103 |
\def\typog@inverted@questionmark@iii{\textquestiondown\textsubscript{3}} |
| 1104 |
\makeatother |
| 1105 |
Secondaries -- indexed with 2: |
| 1106 |
\capitalinvertedquestionmark{2}Más? |
| 1107 |
\capitalinvertedexclamationmark{2}Por venir! |
| 1108 |
|
| 1109 |
Tertiaries -- indexed with 3: |
| 1110 |
\capitalinvertedquestionmark{3}Continuemos? |
| 1111 |
\capitalinvertedexclamationmark{3}Con el texto! |
| 1112 |
|
| 1113 |
\iffalse |
| 1114 |
\section{\capitalinvertedexclamationmark{1}E! \capitalinvertedquestionmark{1}Q?} |
| 1115 |
\section{\capitalinvertedexclamationmark{2}E! \capitalinvertedquestionmark{2}Q?} |
| 1116 |
\section{\capitalinvertedexclamationmark{3}E! \capitalinvertedquestionmark{3}Q?} |
| 1117 |
\fi |
| 1118 |
\end{typogsetup} |
| 1119 |
|
| 1120 |
\section{Label Items} |
| 1121 |
|
| 1122 |
The current configurations for the uppercase and lowercase adjustments are |
| 1123 |
\{\typogget{uppercaselabelitemadjustments}\} and \{\typogget{lowercaselabelitemadjustments}\}. |
| 1124 |
Here are the results of the freestanding macros~\code{\string\adjusted\-label\-itemi}, |
| 1125 |
\code{\string\adjusted\-label\-itemi} and so on: |
| 1126 |
|
| 1127 |
\begin{center} |
| 1128 |
A\Adjustedlabelitemi B\Adjustedlabelitemii E\Adjustedlabelitemiii G\Adjustedlabelitemiv H. |
| 1129 |
|
| 1130 |
a\adjustedlabelitemi b\adjustedlabelitemii e\adjustedlabelitemiii g\adjustedlabelitemiv h. |
| 1131 |
\end{center} |
| 1132 |
|
| 1133 |
For the following nested lists we adjust levels one and three for uppercase and levels two and |
| 1134 |
four for lowercase. |
| 1135 |
|
| 1136 |
\begingroup |
| 1137 |
\uppercaseadjustlabelitems{1,3} |
| 1138 |
\lowercaseadjustlabelitems{2,4} |
| 1139 |
\setlength{\itemsep}{0pt} |
| 1140 |
\setlength{\parsep}{0pt} |
| 1141 |
\setlength{\topsep}{0pt} |
| 1142 |
\begin{itemize} |
| 1143 |
\item A |
| 1144 |
\item B |
| 1145 |
\item C |
| 1146 |
\begin{itemize} |
| 1147 |
\item d |
| 1148 |
\item e |
| 1149 |
\item f |
| 1150 |
\begin{itemize} |
| 1151 |
\item G |
| 1152 |
\item H |
| 1153 |
\item I |
| 1154 |
\begin{itemize} |
| 1155 |
\item j |
| 1156 |
\item k |
| 1157 |
\item l |
| 1158 |
\end{itemize} |
| 1159 |
\end{itemize} |
| 1160 |
\end{itemize} |
| 1161 |
\end{itemize} |
| 1162 |
\endgroup |
| 1163 |
\noadjustlabelitems{*}% not necessary, but we want to exercise the macro |
| 1164 |
|
| 1165 |
The left example shows the result of \code{\string\typogadjuststairs\{.25pt\}\{11\}\{ABC\}} and |
| 1166 |
the one on the right hand side just uses the same parameters except for the sample~\sample{ace}, |
| 1167 |
this is, only lowercase letters. |
| 1168 |
|
| 1169 |
\begin{center} |
| 1170 |
\begin{minipage}[t]{12em} |
| 1171 |
\centering |
| 1172 |
\typogadjuststairs{.25pt}{11}{ABC} |
| 1173 |
\end{minipage} |
| 1174 |
\begin{minipage}[t]{12em} |
| 1175 |
\centering |
| 1176 |
\typogadjuststairs{.25pt}{11}{ace} |
| 1177 |
\end{minipage} |
| 1178 |
\end{center} |
| 1179 |
|
| 1180 |
For this document the calls |
| 1181 |
\code{\string\typoguppercaseadjustcheck\{ABC\-DEF\-GHI\-JKL\-MNO\-PQR\-STU\-VWX\-YZ\}} and |
| 1182 |
\code{\string\typoglowercaseadjustcheck\{ace\-gmn\-opq\-rsu\-vwx\-yz\}} yield |
| 1183 |
\sample{\typoguppercaseadjustcheck{ABCDEFGHIJKLMNOPQRSTUVWXYZ}} and |
| 1184 |
\sample{\typoglowercaseadjustcheck{acegmnopqrsuvwxyz}}, where the adjustments in effect are |
| 1185 |
\code{\{\typogget{uppercaselabelitemadjustments}\}} and |
| 1186 |
\code{\{\typogget{lowercaselabelitemadjustments}\}}. |
| 1187 |
|
| 1188 |
\clearpage |
| 1189 |
\section{Align Last Line} |
| 1190 |
|
| 1191 |
\subsection{Last Line Ragged Left/Flush Right} |
| 1192 |
|
| 1193 |
\Cref{ex:lastlineraggedleftpar} is a typical use of environment~\code{lastlineraggedleftpar}: |
| 1194 |
A narrow paragraph gets typeset with full justification |
| 1195 |
and put \code{\string\flushright} against the right margin as a whole. |
| 1196 |
|
| 1197 |
The layout may look more coherent if the last lines is moved to the right margin, too. |
| 1198 |
|
| 1199 |
\begin{exemplary} |
| 1200 |
\flushright |
| 1201 |
\caption[Justified -- flushright] |
| 1202 |
{\begin{typoginspectpar}{justified-flushright}Typeset a justified paragraph flushright and let |
| 1203 |
macro~\code{\string\lastlineraggedleft} shift the last line |
| 1204 |
over to the right-hand side.\label{ex:lastlineraggedleftpar}\end{typoginspectpar}} |
| 1205 |
|
| 1206 |
\setlength{\examplewidth}{220pt} |
| 1207 |
\exampleparbox[lastlineraggedleftpar]{\lastlineraggedleftpar\texbookparfillskipsample} |
| 1208 |
|
| 1209 |
\centering |
| 1210 |
\texbookparfillskipsamplecredits |
| 1211 |
|
| 1212 |
\examplefontinformation |
| 1213 |
\end{exemplary} |
| 1214 |
|
| 1215 |
\subsection{Last Line Centered} |
| 1216 |
|
| 1217 |
The situation shown in \cref{ex:lastlinecenteredpar} is |
| 1218 |
more widespread than \cref{ex:lastlineraggedleftpar} |
| 1219 |
because centered tables and figures are quite common. |
| 1220 |
Their caption parboxes are centered too, |
| 1221 |
which is where a centered last line might fortify the layout. |
| 1222 |
|
| 1223 |
Another possible use of environment~\code{lastlinecenteredpar} are the final lines of chapters~-- |
| 1224 |
in particular if the chapters' ends are marked with centered dingbats. |
| 1225 |
|
| 1226 |
\begin{exemplary} |
| 1227 |
\centering |
| 1228 |
\caption[Typeset a justified paragraph that is centered.] |
| 1229 |
{\lastlinecenteredpar |
| 1230 |
Typeset a justified paragraph that is centered. |
| 1231 |
This very caption uses \code{lastlinecenteredpar} |
| 1232 |
to have its last line centered as well. |
| 1233 |
Moreover, we put a nifty asterisk centered at the bottom of the sample text. |
| 1234 |
\label{ex:lastlinecenteredpar}} |
| 1235 |
|
| 1236 |
\setlength{\examplewidth}{220pt} |
| 1237 |
\exampleparbox[lastlinecenteredpar]{\lastlinecenteredpar\texbookparfillskipsample} |
| 1238 |
|
| 1239 |
\medskip\(\ast\) |
| 1240 |
|
| 1241 |
\texbookparfillskipsamplecredits |
| 1242 |
|
| 1243 |
\examplefontinformation |
| 1244 |
\end{exemplary} |
| 1245 |
|
| 1246 |
\clearpage |
| 1247 |
\section{Fill Last Line} |
| 1248 |
|
| 1249 |
\newcommand*{\abcsample}{abcd efgh ijkl mnop qrst uvwx yz12 3456} |
| 1250 |
|
| 1251 |
\begin{exemplary} |
| 1252 |
\def\sness{2} |
| 1253 |
\def\exparindent{25pt} |
| 1254 |
\setlength{\examplewidth}{235pt} |
| 1255 |
|
| 1256 |
\centering |
| 1257 |
\caption[Plain paragraph vs.~\code{covernextindentpar}] |
| 1258 |
{Top example: Typeset a paragraph without correction of the last line. |
| 1259 |
Middle example: Paragraph corrected with \code{covernextindentpar}. |
| 1260 |
We set a \code{\string\parindent} of~\exparindent{} in both parboxes |
| 1261 |
and we \emph{must} increase the amount of glue in the paragraph |
| 1262 |
to reduce the penalty of stretching the last line under a \code{\string\fussy}~setting. |
| 1263 |
For the samples below, we have chosen \code{\string\slightlysloppy[\sness]}. |
| 1264 |
The \singlequotes{Alternative}, the bottom example, |
| 1265 |
shows the effect of \code{tightspacing}; |
| 1266 |
no extra sloppiness is required there.} |
| 1267 |
|
| 1268 |
\exampleparbox[covernextindentpar-reference]{% |
| 1269 |
\setlength{\parindent}{\exparindent}% |
| 1270 |
\slightlysloppy[\sness] |
| 1271 |
\texbookparfillskipsample{} \abcsample} |
| 1272 |
|
| 1273 |
\medskip |
| 1274 |
|
| 1275 |
\exampleparbox[covernextindentpar]{% |
| 1276 |
\setlength{\parindent}{\exparindent}% |
| 1277 |
\slightlysloppy[\sness] |
| 1278 |
\covernextindentpar |
| 1279 |
\texbookparfillskipsample{} \abcsample} |
| 1280 |
|
| 1281 |
\medskip |
| 1282 |
|
| 1283 |
Alternative\dots\hfill\smallskip |
| 1284 |
|
| 1285 |
\exampleparbox[covernextindentpar-tightspacing]{% |
| 1286 |
\setlength{\parindent}{\exparindent}% |
| 1287 |
\begin{tightspacing} |
| 1288 |
\texbookparfillskipsample{} \abcsample |
| 1289 |
\end{tightspacing}} |
| 1290 |
|
| 1291 |
\texbookparfillskipsamplecredits |
| 1292 |
|
| 1293 |
\examplefontinformation |
| 1294 |
\end{exemplary} |
| 1295 |
|
| 1296 |
\begin{exemplary} |
| 1297 |
\def\sness{2} |
| 1298 |
\def\exparindent{0pt} |
| 1299 |
\setlength{\examplewidth}{155pt} |
| 1300 |
|
| 1301 |
\centering |
| 1302 |
\caption[Plain paragraph vs.~\code{covernextindentpar} (narrow)] |
| 1303 |
{Same comparison as the previous example, |
| 1304 |
but for a small linewidth and zippo~\code{\string\parindent}. |
| 1305 |
The left-hand side sample is uncorrected, |
| 1306 |
the right-hand side features \code{\string\covernextindentpar}. |
| 1307 |
The sloppiness level is~\sness{} for both samples.} |
| 1308 |
|
| 1309 |
\exampleparbox[narrow-covernextindentpar-reference]{% |
| 1310 |
\setlength{\parindent}{\exparindent}% |
| 1311 |
\slightlysloppy[\sness] |
| 1312 |
\texbookparfillskipsample{} \abcsample} |
| 1313 |
\qquad |
| 1314 |
\exampleparbox[narrow-covernextindentpar]{% |
| 1315 |
\setlength{\parindent}{\exparindent}% |
| 1316 |
\slightlysloppy[\sness] |
| 1317 |
\covernextindentpar[30pt] |
| 1318 |
\texbookparfillskipsample{} \abcsample} |
| 1319 |
|
| 1320 |
\texbookparfillskipsamplecredits |
| 1321 |
|
| 1322 |
\examplefontinformation |
| 1323 |
\end{exemplary} |
| 1324 |
|
| 1325 |
\begin{exemplary} |
| 1326 |
\def\exparindent{10pt} |
| 1327 |
\setlength{\examplewidth}{233pt} |
| 1328 |
|
| 1329 |
\centering |
| 1330 |
\caption[Prevent full last line] |
| 1331 |
{Sample~1: Typeset a paragraph without correction of the last line. |
| 1332 |
Sample~2: Paragraph corrected with \code{\string\openlastlinepar}.~-- Disappointing! |
| 1333 |
Sample~3: Same using macro~\code{\string\prolongpar}. |
| 1334 |
Sample~4: Alternative solution that simply increases the tracking by |
| 1335 |
\generictextfraction{2}{1000}\,em with~\code{setfonttracking}. |
| 1336 |
Sample~5: Alternative solution that increases the spacing with |
| 1337 |
\code{loosespacing}.} |
| 1338 |
|
| 1339 |
\exampleparbox[openline-reference]{% |
| 1340 |
\setlength{\parindent}{\exparindent} |
| 1341 |
\texbookparfillskipsample{} \abcsample} |
| 1342 |
|
| 1343 |
\medskip |
| 1344 |
|
| 1345 |
\exampleparbox[openlastlinepar]{% |
| 1346 |
\setlength{\parindent}{\exparindent} |
| 1347 |
\openlastlinepar |
| 1348 |
\texbookparfillskipsample{} \abcsample} |
| 1349 |
|
| 1350 |
\medskip |
| 1351 |
|
| 1352 |
\exampleparbox[prolongpar]{% |
| 1353 |
\setlength{\parindent}{\exparindent} |
| 1354 |
\prolongpar |
| 1355 |
\texbookparfillskipsample{} \abcsample} |
| 1356 |
|
| 1357 |
\medskip |
| 1358 |
|
| 1359 |
Alternatives\dots\hfill\smallskip |
| 1360 |
|
| 1361 |
\exampleparbox[openline-tracking]{% |
| 1362 |
\setlength{\parindent}{\exparindent}% |
| 1363 |
\setfonttracking{2} |
| 1364 |
\texbookparfillskipsample{} \abcsample} |
| 1365 |
|
| 1366 |
\medskip |
| 1367 |
|
| 1368 |
\exampleparbox[openline-spacing]{% |
| 1369 |
\setlength{\parindent}{\exparindent}% |
| 1370 |
\begin{loosespacing} |
| 1371 |
\texbookparfillskipsample{} \abcsample |
| 1372 |
\end{loosespacing}} |
| 1373 |
|
| 1374 |
\texbookparfillskipsamplecredits |
| 1375 |
|
| 1376 |
\examplefontinformation |
| 1377 |
\end{exemplary} |
| 1378 |
|
| 1379 |
\begin{typoginspect}{lastlinefitpar} |
| 1380 |
\lastlinefit=\defaultlastlinefit |
| 1381 |
\begin{nofontexpansion} |
| 1382 |
\begin{lastlinefitpar} |
| 1383 |
In this paragraph the value of \code{\string\lastlinefit} was increased to |
| 1384 |
\the\lastlinefit. Thus, the spacing of its last line is equal to that of the next-to-last |
| 1385 |
line. The effect can be double-checked with log-file, \textit{\jobname.log,} as this text |
| 1386 |
was wrapped in a \code{typoginspect}~environment with id~\code{lastlinefitpar}. |
| 1387 |
\end{lastlinefitpar} |
| 1388 |
|
| 1389 |
The value of \code{\string\lastlinefit} is reset to~\the\lastlinefit{} in the following |
| 1390 |
paragraph. |
| 1391 |
\end{nofontexpansion} |
| 1392 |
\end{typoginspect} |
| 1393 |
|
| 1394 |
\clearpage |
| 1395 |
\section{Spacing} |
| 1396 |
|
| 1397 |
\subsection{Narrow\kernedslash Wide Space} |
| 1398 |
|
| 1399 |
The current font's parameters are shown in \cref{tab:fontdim}.\!\footnote{For a concise and |
| 1400 |
understandable explanation of the plethora of font parameters consult \propername{David |
| 1401 |
Carlisle's} excellent post on \propername{StackExchange}: |
| 1402 |
\href{https://tex.stackexchange.com/questions/88991/what-do-different-fontdimennum-mean}% |
| 1403 |
{What Do Different Fontdimennum Mean}.} |
| 1404 |
|
| 1405 |
\begin{table}[htp] |
| 1406 |
\centering |
| 1407 |
\caption{Important \code{\string\fontdimen} values of the current text font. |
| 1408 |
The middle column~(\#) states the number of the fontdimen.\bottomstrut} |
| 1409 |
\label{tab:fontdim} |
| 1410 |
|
| 1411 |
\begin{tabular}{@{}lll@{}} |
| 1412 |
\hline |
| 1413 |
\multicolumn{1}{@{}l|}{Name} & \multicolumn{1}{l|}{\#} & Value \\ |
| 1414 |
\hline |
| 1415 |
Interword space & 2 & \the\fontdimen2\font\topstrut \\ |
| 1416 |
Interword stretch & 3 & \the\fontdimen3\font \\ |
| 1417 |
Interword shrink & 4 & \the\fontdimen4\font \\ |
| 1418 |
Extra space & 7 & \the\fontdimen7\font |
| 1419 |
\end{tabular} |
| 1420 |
\end{table} |
| 1421 |
|
| 1422 |
\begin{center} |
| 1423 |
\setlength{\overfullrule}{0pt} |
| 1424 |
\newcommand*{\spacesampletext}[1]{some#1text#1with#1spaces\rule{.1pt}{1em}} |
| 1425 |
\newsavebox{\narrowspacesample} |
| 1426 |
\sbox{\narrowspacesample}{\spacesampletext{\narrowspace}} |
| 1427 |
\newsavebox{\widespacesample} |
| 1428 |
\sbox{\widespacesample}{\spacesampletext{\widespace}} |
| 1429 |
|
| 1430 |
\begin{tabular}{@{}ll@{\qquad}l@{}} |
| 1431 |
Compare & \spacesampletext{\space} & default space, natural glue \\ |
| 1432 |
with & \usebox{\narrowspacesample} & \code{\string\narrowspace}, natural glue \\ |
| 1433 |
{} & \makebox[\wd\narrowspacesample][l]{\hbox to 0pt{\spacesampletext{\narrowspace}}} & |
| 1434 |
\code{\string\narrowspace}, tight box \\ |
| 1435 |
{} & \makebox[\wd\narrowspacesample][l]{\hbox spread 5pt{\spacesampletext{\narrowspace}}} & |
| 1436 |
\code{\string\narrowspace}, spread 5pt \\ |
| 1437 |
and again & \spacesampletext{\space} & default space, natural glue \\ |
| 1438 |
with & \usebox{\widespacesample} & \code{\string\widespace}, natural glue \\ |
| 1439 |
{} & \makebox[\wd\widespacesample][l]{\hbox to 0pt{\spacesampletext{\widespace}}} & |
| 1440 |
\code{\string\widespace}, tight box \\ |
| 1441 |
{} & \makebox[\wd\widespacesample][l]{\hbox spread 5pt{\spacesampletext{\widespace}}} & |
| 1442 |
\code{\string\widespace}, spread 5pt |
| 1443 |
\end{tabular} |
| 1444 |
\end{center} |
| 1445 |
|
| 1446 |
\noindent Starred form eats spaces? Narrow\narrowspace* Space. Wide\widespace* Space. |
| 1447 |
|
| 1448 |
\subsection{Looser\kernedslash*Tighter} |
| 1449 |
|
| 1450 |
\Cref{ex:spacing-i,ex:spacing-ii} show \code{tightspacing} and \code{loosespacing} at work. |
| 1451 |
|
| 1452 |
\begin{exemplary} |
| 1453 |
\newcommand*{\sness}{3} |
| 1454 |
\newcommand*{\tlevel}{1} |
| 1455 |
\centering |
| 1456 |
|
| 1457 |
\caption[Looser or tighter spacing -- sloppy] |
| 1458 |
{Both parboxes are typeset with \code{\string\slightlysloppy[\sness]}, |
| 1459 |
the left one with default spacing, |
| 1460 |
the right one with \code{tightspacing[\tlevel]}.\label{ex:spacing-i}} |
| 1461 |
|
| 1462 |
\exampleparbox[tightspacing-reference]{\slightlysloppy[\sness]\texbooktolerancesample} |
| 1463 |
\qquad |
| 1464 |
\exampleparbox[tightspacing]{\slightlysloppy[\sness]\tightspacing[\tlevel]\texbooktolerancesample} |
| 1465 |
|
| 1466 |
\texbooktolerancesamplecredits |
| 1467 |
|
| 1468 |
\examplefontinformation |
| 1469 |
\end{exemplary} |
| 1470 |
|
| 1471 |
\begin{exemplary} |
| 1472 |
\newcommand*{\sness}{3} |
| 1473 |
\newcommand*{\llevel}{2} |
| 1474 |
\centering |
| 1475 |
|
| 1476 |
\caption[Looser or tighter spacing -- sloppy] |
| 1477 |
{Both parboxes are typeset with \code{\string\slightlysloppy[\sness]}, |
| 1478 |
the left one with default spacing, |
| 1479 |
the right one with \code{loosespacing[\llevel]}.\label{ex:spacing-ii}} |
| 1480 |
|
| 1481 |
\exampleparbox[loosespacing-reference]{\slightlysloppy[\sness]\texbooktolerancesample} |
| 1482 |
\qquad |
| 1483 |
\exampleparbox[loosespacing]{\slightlysloppy[\sness]\loosespacing[\llevel]\texbooktolerancesample} |
| 1484 |
|
| 1485 |
\texbooktolerancesamplecredits |
| 1486 |
|
| 1487 |
\examplefontinformation |
| 1488 |
\end{exemplary} |
| 1489 |
|
| 1490 |
\clearpage |
| 1491 |
\section{Microtype Front\capitalhyphen End} |
| 1492 |
|
| 1493 |
\subsection{Tracking} |
| 1494 |
|
| 1495 |
\newcommand*{\trackingsampletext}{% |
| 1496 |
This sentence contains an explicit call to \code{\string\textls} |
| 1497 |
with an optional argument of \((+200)\) to \textls[200]{DEMONSTRATE} |
| 1498 |
that this macro still works inside of \code{setfonttracking}. |
| 1499 |
Apart from that it is just some more text to exercise the macro. |
| 1500 |
Well, the explicit letterspacing example is particularly ugly.} |
| 1501 |
|
| 1502 |
\begin{exemplary} |
| 1503 |
\renewcommand*{\examplepreset}{\microtypesetup{activate=true}} |
| 1504 |
\def\extratracking{7} |
| 1505 |
\centering |
| 1506 |
|
| 1507 |
\caption[Microtype: tracking] |
| 1508 |
{Use \packagename{microtype} to change the font tracking. |
| 1509 |
The sample on the left-hand side shows neutral tracking. |
| 1510 |
The one on the right-hand side received an extra tracking of |
| 1511 |
\generictextfraction{\extratracking}{1000}\,em.} |
| 1512 |
|
| 1513 |
\exampleparbox[microtype-tracking-reference]{% |
| 1514 |
\fussy |
| 1515 |
\noindent |
| 1516 |
\trackingsampletext} |
| 1517 |
\qquad |
| 1518 |
\exampleparbox[microtype-tracking-stretch]{% |
| 1519 |
\begin{setfonttracking}{\extratracking} |
| 1520 |
\fussy |
| 1521 |
\noindent |
| 1522 |
\trackingsampletext |
| 1523 |
\end{setfonttracking}} |
| 1524 |
|
| 1525 |
\examplefontinformation |
| 1526 |
\end{exemplary} |
| 1527 |
|
| 1528 |
\newcommand*{\trackingsamplefontchangetext}{% |
| 1529 |
{\rm RM} {\sf SF} {\rm RM} {\tt TT} {\rm RM}; |
| 1530 |
{\rm RM} {\it IT\/} {\rm RM}; |
| 1531 |
{\rm RM} {\sc SC} {\rm RM}. |
| 1532 |
{\rm Rm} {\sf Sf} {\rm Rm} {\tt Tt} {\rm Rm}; |
| 1533 |
{\rm Rm} {\it It\/} {\rm Rm}; |
| 1534 |
{\rm Rm} {\sc Sc} {\rm Rm}. |
| 1535 |
{\rm rm} {\sf sf} {\rm rm} {\tt tt} {\rm rm}; |
| 1536 |
{\rm rm} {\it it\/} {\rm rm}; |
| 1537 |
{\rm rm} {\sc sc} {\rm rm}.} |
| 1538 |
|
| 1539 |
\begin{exemplary} |
| 1540 |
\renewcommand*{\examplepreset}{\microtypesetup{activate=true}} |
| 1541 |
\def\extratracking{1} |
| 1542 |
\centering |
| 1543 |
|
| 1544 |
\caption[Microtype: tracking -- font changes] |
| 1545 |
{Check how font changes (serif, serif~italic, small-caps, sans~serif, typewriter) |
| 1546 |
interfere with the interword spacing. |
| 1547 |
The left sample has no tracking changes applied and serves as a reference, |
| 1548 |
whereas the right sample got an extra tracking of |
| 1549 |
\generictextfraction{\extratracking}{1000}\,em.\visualpar |
| 1550 |
The switch from and to typewriter, i.\,e., constant-width fonts |
| 1551 |
commonly is a source of spacing problems.} |
| 1552 |
|
| 1553 |
\exampleparbox[microtype-tracking-font-changes-reference]{\trackingsamplefontchangetext} |
| 1554 |
\qquad |
| 1555 |
\exampleparbox[microtype-tracking-font-changes-stretch]{% |
| 1556 |
\begin{setfonttracking}{\extratracking} |
| 1557 |
\trackingsamplefontchangetext |
| 1558 |
\end{setfonttracking}} |
| 1559 |
\end{exemplary} |
| 1560 |
|
| 1561 |
\noindent |
| 1562 |
No contents: \leftmarker |
| 1563 |
\begin{setfonttracking}{0} |
| 1564 |
\end{setfonttracking}\rightmarker. |
| 1565 |
|
| 1566 |
\subsection{Font Expansion} |
| 1567 |
|
| 1568 |
\newcommand*{\expansionsample} |
| 1569 |
{By default, all characters of a font are allowed to be stretched or |
| 1570 |
shrunk by the same amount. However, it is also possible to limit |
| 1571 |
the expansion of certain characters if they are more sensitive to |
| 1572 |
deformation. |
| 1573 |
This is the purpose of the \code{\string\SetExpansion}~macro.} |
| 1574 |
|
| 1575 |
\begin{exemplary} |
| 1576 |
\setlength{\examplewidth}{250pt} |
| 1577 |
\renewcommand*{\examplepreset}{\microtypesetup{activate=true}} |
| 1578 |
\renewcommand*{\examplesetup}{\frenchspacing\small\fussy} |
| 1579 |
|
| 1580 |
\centering |
| 1581 |
|
| 1582 |
\caption[Microtype: font expansion] |
| 1583 |
{Use \packagename{microtype} to stretch or shrink a font. |
| 1584 |
The top sample uses \code{\string\setfontshrink} at level~3, |
| 1585 |
the middle sample is the unchanged reference |
| 1586 |
(which is allowed to shrink and expand), |
| 1587 |
and the bottom sample utilizes \code{\string\setfontstretch} at level~2.} |
| 1588 |
|
| 1589 |
\exampleparbox[microtype-expansion-shrink]{% |
| 1590 |
\begin{setfontshrink}[3] |
| 1591 |
\noindent\expansionsample |
| 1592 |
\end{setfontshrink}} |
| 1593 |
|
| 1594 |
\medskip |
| 1595 |
|
| 1596 |
\exampleparbox[microtype-expansion-neutral]{% |
| 1597 |
\begin{setfontexpand}[0] |
| 1598 |
\noindent\expansionsample |
| 1599 |
\end{setfontexpand}} |
| 1600 |
|
| 1601 |
\medskip |
| 1602 |
|
| 1603 |
\exampleparbox[microtype-expansion-stretch]{% |
| 1604 |
\begin{setfontstretch}[2] |
| 1605 |
\noindent\expansionsample |
| 1606 |
\end{setfontstretch}} |
| 1607 |
|
| 1608 |
\examplefontinformation |
| 1609 |
\end{exemplary} |
| 1610 |
|
| 1611 |
\noindent |
| 1612 |
No contents -- \code{setfontshrink}: \leftmarker |
| 1613 |
\begin{setfontshrink} |
| 1614 |
\end{setfontshrink}\rightmarker. |
| 1615 |
|
| 1616 |
\noindent |
| 1617 |
No contents -- \code{setfontstretch}: \leftmarker |
| 1618 |
\begin{setfontstretch} |
| 1619 |
\end{setfontstretch}\rightmarker. |
| 1620 |
|
| 1621 |
\noindent |
| 1622 |
No contents -- \code{setfontexpand}: \leftmarker |
| 1623 |
\begin{setfontexpand} |
| 1624 |
\end{setfontexpand}\rightmarker. |
| 1625 |
|
| 1626 |
\noindent |
| 1627 |
No contents -- \code{nofontexpansion}: \leftmarker |
| 1628 |
\begin{nofontexpansion} |
| 1629 |
\end{nofontexpansion}\rightmarker. |
| 1630 |
|
| 1631 |
\subsection{Character Protrusion} |
| 1632 |
|
| 1633 |
\newcommand*{\zerodepthrule} |
| 1634 |
{\raisebox{0pt}[0pt][0pt]{\rule[-4.5\baselineskip]{.1pt}{4.25\baselineskip}}} |
| 1635 |
|
| 1636 |
\newcommand*{\protrusionsampletext}{% |
| 1637 |
\noindent |
| 1638 |
\zerodepthrule\hfill\zerodepthrule \\ |
| 1639 |
1\hfill 1 \\ |
| 1640 |
.2\hfill 2. \\ |
| 1641 |
--3\hfill 3-- \\ |
| 1642 |
---4\hfill 4---} |
| 1643 |
|
| 1644 |
\begin{exemplary} |
| 1645 |
\renewcommand*{\examplepreset}{\microtypesetup{activate=true}} |
| 1646 |
\renewcommand*{\examplesetup}{\frenchspacing\small\fussy} |
| 1647 |
|
| 1648 |
\centering |
| 1649 |
|
| 1650 |
\caption[Microtype: protrusion] |
| 1651 |
{Comparison of the \packagename{microtype} feature ``protrusion'' (left-hand side) |
| 1652 |
and \code{nocharprotrusion} (right-hand side).} |
| 1653 |
|
| 1654 |
\exampleparbox[microtype-protrusion-reference]{% |
| 1655 |
\microtypesetup{protrusion=true} |
| 1656 |
\protrusionsampletext} |
| 1657 |
\qquad |
| 1658 |
\exampleparbox[microtype-protrusion-off]{% |
| 1659 |
\microtypesetup{protrusion=true} |
| 1660 |
\nocharprotrusion |
| 1661 |
\protrusionsampletext} |
| 1662 |
|
| 1663 |
\medskip |
| 1664 |
\end{exemplary} |
| 1665 |
|
| 1666 |
\noindent |
| 1667 |
No contents -- \code{nocharprotrusion}: \leftmarker |
| 1668 |
\begin{nocharprotrusion} |
| 1669 |
\end{nocharprotrusion}\rightmarker. |
| 1670 |
|
| 1671 |
\clearpage |
| 1672 |
\section{Sloppy Paragraphs} |
| 1673 |
|
| 1674 |
\Cref{ex:slightlysloppy-1,ex:slightlysloppy-2} put different amounts of ``sloppiness'' face to face. |
| 1675 |
|
| 1676 |
\begin{exemplary} |
| 1677 |
\setlength{\examplewidth}{180pt} |
| 1678 |
\def\sness{1} |
| 1679 |
\centering |
| 1680 |
\caption[Paragraphs typeset slightly sloppy~1] |
| 1681 |
{Paragraphs typeset slightly sloppy: \code{\string\slightlysloppy} vs.~\code{\string\fussy}. |
| 1682 |
The left parbox is typeset with \code{\string\slightlysloppy} |
| 1683 |
and \(\metavar{sloppiness} = \sness\), whereas the right sample |
| 1684 |
features the well known \code{\string\fussy} setting. |
| 1685 |
Both parboxes have a width of \the\examplewidth.\label{ex:slightlysloppy-1}} |
| 1686 |
|
| 1687 |
\exampleparbox[fussy-vs-slightlysloppy]{\slightlysloppy[\sness]\texbooktolerancesample} |
| 1688 |
\qquad |
| 1689 |
\exampleparbox[fussy-vs-slightlysloppy-reference]{\fussy\texbooktolerancesample} |
| 1690 |
|
| 1691 |
\texbooktolerancesamplecredits |
| 1692 |
|
| 1693 |
\examplefontinformation |
| 1694 |
\end{exemplary} |
| 1695 |
|
| 1696 |
\begin{exemplary} |
| 1697 |
\setlength{\examplewidth}{150pt} |
| 1698 |
\def\sness{2} |
| 1699 |
\centering |
| 1700 |
\caption[Paragraphs typeset slightly sloppy~2] |
| 1701 |
{Paragraphs typeset slightly sloppy: \code{\string\slightlysloppy} vs.~\code{\string\sloppy}. |
| 1702 |
The left sample is features \code{\string\slightlysloppy} with \(\metavar{sloppiness} = \sness\), |
| 1703 |
the right sample is typeset with \code{\string\sloppy}. |
| 1704 |
Both parboxes have a width of \the\examplewidth.\label{ex:slightlysloppy-2}} |
| 1705 |
|
| 1706 |
\exampleparbox[sloppy-vs-slightlysloppy]{\slightlysloppy[\sness]\texbooktolerancesample} |
| 1707 |
\qquad |
| 1708 |
\exampleparbox[sloppy-vs-slightlysloppy-reference]{\sloppy\texbooktolerancesample} |
| 1709 |
|
| 1710 |
\texbooktolerancesamplecredits |
| 1711 |
|
| 1712 |
\examplefontinformation |
| 1713 |
\end{exemplary} |
| 1714 |
|
| 1715 |
In conclusion all renderings of the text in |
| 1716 |
\cref{ex:slightlysloppy-1} and \cref{ex:slightlysloppy-2} |
| 1717 |
have their merits and their own flaws. |
| 1718 |
|
| 1719 |
\clearpage |
| 1720 |
\section{Vertically Partially-Tied Paragraphs} |
| 1721 |
|
| 1722 |
\paragraph{\code{vtietoppar}}\leavevmode\par |
| 1723 |
|
| 1724 |
\begin{typoginspect}{vtietoppar} |
| 1725 |
\clubpenalty=150 |
| 1726 |
\begin{vtietoppar}[2] |
| 1727 |
After breaking a paragraph into lines, \TeX{} computes the interline |
| 1728 |
penalties by adding the values of: \code{\string\clubpenalty} after |
| 1729 |
the first line of a paragraph.\!\footnote{Footnote of \code{vtietoppar}.} |
| 1730 |
\eTeX{} generalizes the concept of interline, club, widow, and display widow penalty |
| 1731 |
by allowing their replacement by arrays of penalty values. |
| 1732 |
\end{vtietoppar} |
| 1733 |
\end{typoginspect} |
| 1734 |
|
| 1735 |
\paragraph{\code{vtiebotpar}}\leavevmode\par |
| 1736 |
|
| 1737 |
\begin{typoginspect}{vtiebotpar} |
| 1738 |
\widowpenalty=150 |
| 1739 |
\begin{vtiebotpar}[2] |
| 1740 |
After breaking a paragraph into lines, \TeX{} computes the interline |
| 1741 |
penalties by adding the values of: \code{\string\widowpenalty} |
| 1742 |
before the last line of the paragraph.\marginpar{A float!} |
| 1743 |
\eTeX{} generalizes the concept of interline, club, widow, and display widow penalty |
| 1744 |
by allowing their replacement by arrays of penalty values. |
| 1745 |
\end{vtiebotpar} |
| 1746 |
\end{typoginspect} |
| 1747 |
|
| 1748 |
\paragraph{\code{vtiebotdisp}}\leavevmode\par |
| 1749 |
|
| 1750 |
\begin{typoginspect}[tracingboxes]{vtiebotdisp} |
| 1751 |
\displaywidowpenalty=150 |
| 1752 |
\begin{vtiebotdisp}[2] |
| 1753 |
After breaking a paragraph into lines, \TeX{} computes the interline |
| 1754 |
penalties by adding the values of: \code{\string\displaywidowpenalty} |
| 1755 |
before the line immediately preceding a displayed equation. |
| 1756 |
\eTeX{} generalizes the concept of interline, club, widow, and display widow penalty |
| 1757 |
by allowing their replacement by arrays of penalty values. |
| 1758 |
\[g H = H g \quad \text{for all} \enspace g \in G.\] |
| 1759 |
\end{vtiebotdisp} |
| 1760 |
|
| 1761 |
Follow-up paragraph after and outside of the \code{vtiebotdisp}-environment. |
| 1762 |
\end{typoginspect} |
| 1763 |
|
| 1764 |
\paragraph{\code{vtiebotdisptoppar}}\leavevmode\par |
| 1765 |
|
| 1766 |
\begin{typoginspect}{vtiebotdisptoppar} |
| 1767 |
\displaywidowpenalty=150 |
| 1768 |
\begin{vtiebotdisptoppar}[2] |
| 1769 |
After breaking a paragraph into lines, \TeX{} computes the interline |
| 1770 |
penalties by adding the values of: \code{\string\displaywidowpenalty} |
| 1771 |
before the line immediately preceding a displayed equation. |
| 1772 |
\eTeX{} generalizes the concept of interline, club, widow, and display widow penalty |
| 1773 |
by allowing their replacement by arrays of penalty values. |
| 1774 |
\begin{breakabledisplay} |
| 1775 |
\begin{displaymath} |
| 1776 |
g H = H g \quad \text{for all} \enspace g \in G. |
| 1777 |
\end{displaymath} |
| 1778 |
\end{breakabledisplay} |
| 1779 |
|
| 1780 |
In this example we need a paragraph that follows the displayed math. |
| 1781 |
So, we have to type some more text here |
| 1782 |
to be able to demonstrate the action of the environment. |
| 1783 |
\end{vtiebotdisptoppar} |
| 1784 |
\end{typoginspect} |
| 1785 |
|
| 1786 |
\clearpage |
| 1787 |
\section{Breakable Displayed Equations} |
| 1788 |
|
| 1789 |
\newcommand*{\binaryminus}{\mathbin{-}} |
| 1790 |
\newcommand*{\diracadj}[1]{\overline{#1}} |
| 1791 |
\newcommand*{\unaryminus}{{-}} |
| 1792 |
|
| 1793 |
\begin{typoginspect}{breakabledisplay} |
| 1794 |
\begin{breakabledisplay} |
| 1795 |
\begin{align*} |
| 1796 |
\diracadj{\psi}(x) \mathop{\partial_\mu} \psi(x) |
| 1797 |
\mapsto \diracadj{\psi'}(x) \mathop{\partial_\mu} \psi'(x) |
| 1798 |
&= e^{i \alpha(x)} \diracadj{\psi}(x) \mathop{\partial_\mu} \bigl( e^{\unaryminus i \alpha(x)} \psi(x) \bigr) \\ |
| 1799 |
&= \underbrace{\diracadj{\psi}(x) \mathop{\partial_\mu} \psi(x)}_{\text{free particle}} |
| 1800 |
\mskip\medmuskip \binaryminus \mskip\medmuskip i \, \diracadj{\psi}(x) |
| 1801 |
\underbrace{\mathop{\partial_\mu} \bigl( \alpha(x) \bigr)}_{\mathclap{\text{vector field}}} \psi(x). |
| 1802 |
\end{align*} |
| 1803 |
\end{breakabledisplay} |
| 1804 |
\end{typoginspect} |
| 1805 |
|
| 1806 |
\clearpage |
| 1807 |
\section{\packagename{Setspace} Front End} |
| 1808 |
|
| 1809 |
\fontsizeinfo{defaultsize} |
| 1810 |
Current settings are \defaultsize{} |
| 1811 |
and \code{\string\typogfontsize} is \the\typogfontsize. |
| 1812 |
|
| 1813 |
\newcommand*{\absbls}{12pt plus 1pt minus .5pt} |
| 1814 |
\paragraph{\code{\string\setbaselineskip\{\absbls\}}} |
| 1815 |
\resetbaselineskip |
| 1816 |
\setbaselineskip{10pt + 2.75pt}% addition |
| 1817 |
\setbaselineskip{10.5pt * 100 / 105}% scaling |
| 1818 |
\setbaselineskip{11.8pt * 85 / 100}% scaling |
| 1819 |
\setbaselineskip{\absbls} |
| 1820 |
\fontsizeinfo{baselinesetsize} |
| 1821 |
New settings: \baselinesetsize. |
| 1822 |
|
| 1823 |
\texbookbaselineskipsample |
| 1824 |
|
| 1825 |
\newcommand*{\relbls}{130} |
| 1826 |
\paragraph{\code{\string\setbaselineskippercentage\{\relbls\}}} |
| 1827 |
\setbaselineskippercentage{1 + 2 + .3333 * 100 + 100 * .6667}% float expression |
| 1828 |
\setbaselineskippercentage{\relbls} |
| 1829 |
\fontsizeinfo{baselinesetsize} |
| 1830 |
New settings: \baselinesetsize. |
| 1831 |
|
| 1832 |
\texbookbaselineskipsample |
| 1833 |
|
| 1834 |
\newcommand*{\absled}{1.5pt} |
| 1835 |
\paragraph{\code{\string\setleading\{\absled\}}} |
| 1836 |
\setleading{1pt / -2}% negative leading |
| 1837 |
\setleading{\absled} |
| 1838 |
\fontsizeinfo{baselinesetsize} |
| 1839 |
New settings: \baselinesetsize. |
| 1840 |
|
| 1841 |
\texbookbaselineskipsample |
| 1842 |
|
| 1843 |
\newcommand*{\relled}{30} |
| 1844 |
\paragraph{\code{\string\setleadingpercentage\{\relled\}}} |
| 1845 |
\setleadingpercentage{10 - 25 / 2}% negative leading |
| 1846 |
\setleadingpercentage{\relled} |
| 1847 |
\fontsizeinfo{baselinesetsize} |
| 1848 |
New settings: \baselinesetsize. |
| 1849 |
|
| 1850 |
\texbookbaselineskipsample |
| 1851 |
|
| 1852 |
\medskip |
| 1853 |
|
| 1854 |
\setstretch{1} |
| 1855 |
\texbookbaselineskipsamplecredits |
| 1856 |
|
| 1857 |
\clearpage |
| 1858 |
\section{Smooth Ragged} |
| 1859 |
|
| 1860 |
\begin{exemplary} |
| 1861 |
\newcommand*{\ragwidth}{10pt} |
| 1862 |
\centering |
| 1863 |
\caption[Comparison of ragged right typesetting] |
| 1864 |
{Comparison of ragged right typesetting. |
| 1865 |
The first example uses \code{RaggedRight} of \packagename{ragged2e} |
| 1866 |
the second \code{smoothraggedrightpar} of \packagename{typog}. |
| 1867 |
Both examples share a \code{\string\fussy}~setting and |
| 1868 |
a \ragwidth~wide ragged right margin.\label{ex:smoothraggedright}} |
| 1869 |
|
| 1870 |
\setlength{\RaggedRightRightskip}{0pt plus \ragwidth} |
| 1871 |
|
| 1872 |
%\def\smoothraggedrightgenerator{triplet} |
| 1873 |
%\def\smoothraggedrightgenerator{quintuplet} |
| 1874 |
%\def\smoothraggedrightgenerator{septuplet} |
| 1875 |
\setlength{\smoothraggedrightragwidth}{\ragwidth} |
| 1876 |
%\def\smoothraggedrightfuzzfactor{.667} |
| 1877 |
|
| 1878 |
\iffalse |
| 1879 |
\begin{quote} |
| 1880 |
\begin{RaggedRight}\examplesetup |
| 1881 |
\texbookparshapeskipsample |
| 1882 |
\end{RaggedRight} |
| 1883 |
\end{quote} |
| 1884 |
|
| 1885 |
\begin{quote} |
| 1886 |
\begin{smoothraggedrightpar}\examplesetup |
| 1887 |
\texbookparshapeskipsample |
| 1888 |
\end{smoothraggedrightpar} |
| 1889 |
\end{quote} |
| 1890 |
\else |
| 1891 |
\exampleparbox[RaggedRight-reference]{\RaggedRight\texbooktolerancesample} |
| 1892 |
\qquad |
| 1893 |
\exampleparbox[smoothraggedrightpar]{\smoothraggedrightpar\texbooktolerancesample} |
| 1894 |
\fi |
| 1895 |
|
| 1896 |
\texbookparshapeskipsamplecredits |
| 1897 |
|
| 1898 |
\examplefontinformation |
| 1899 |
\end{exemplary} |
| 1900 |
|
| 1901 |
%--\setlength{\smoothraggedrightparindent}{25pt} |
| 1902 |
%--\setlength{\parindent}{0pt} |
| 1903 |
|
| 1904 |
\noindent |
| 1905 |
\code{\string\parindent}=\the\parindent, |
| 1906 |
visually: \rule{.1pt}{.8em}\kern\parindent\rule{.1pt}{.8em}; |
| 1907 |
|
| 1908 |
\noindent |
| 1909 |
\code{\string\smoothraggedrightleftskip}=\the\smoothraggedrightleftskip. |
| 1910 |
\code{\string\smoothraggedrightparindent}=\the\smoothraggedrightparindent. |
| 1911 |
\smallskip |
| 1912 |
|
| 1913 |
{ |
| 1914 |
%--\setlength{\smoothraggedrightragwidth}{8pt} |
| 1915 |
\begin{smoothraggedright} |
| 1916 |
\texbooktolerancesample |
| 1917 |
|
| 1918 |
\texbooktolerancesample |
| 1919 |
\end{smoothraggedright} |
| 1920 |
} |
| 1921 |
|
| 1922 |
\medskip |
| 1923 |
|
| 1924 |
{ |
| 1925 |
\setlength{\smoothraggedrightragwidth}{15pt} |
| 1926 |
|
| 1927 |
\newcommand*{\definitionnilpotent}{% |
| 1928 |
Eine Abbildung oder ein Operator~\(A\) |
| 1929 |
heißen nilpotent vom Grad~\(k\), falls \(k \in N\) |
| 1930 |
die kleinste Zahl ist, für die gilt: \(A^k = 0\).} |
| 1931 |
|
| 1932 |
\begin{otherlanguage}{german} |
| 1933 |
\parbox[t]{60pt}{\fussy\RaggedRight\definitionnilpotent} |
| 1934 |
\hspace{40pt} |
| 1935 |
\parbox[t]{60pt}{\fussy\smoothraggedright\definitionnilpotent} |
| 1936 |
\end{otherlanguage} |
| 1937 |
} |
| 1938 |
|
| 1939 |
\clearpage |
| 1940 |
\begin{RaggedRight} |
| 1941 |
\begin{thebibliography}{0} |
| 1942 |
\bibitem{knuth:1986} |
| 1943 |
\bibauthor{Knuth, D.~E.}, |
| 1944 |
\bibtitle{The \TeX{}book}, |
| 1945 |
Vol.~A of Computers\&Typesetting, |
| 1946 |
Addison Wesley, Reading\kernedslash*MA, |
| 1947 |
1986. |
| 1948 |
\end{thebibliography} |
| 1949 |
\end{RaggedRight} |
| 1950 |
\end{document} |
| 1951 |
\endinput |
| 1952 |
%% |
| 1953 |
%% End of file `typog-example.tex'. |