diff options
author | Karl Berry <karl@freefriends.org> | 2024-05-07 20:11:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-05-07 20:11:51 +0000 |
commit | ab60ca3774663a7c219641b4a47296cdd2b28149 (patch) | |
tree | ffe26f05768770125971090cd4f7ea204886ce0d /Master/texmf-dist/doc/latex/typog | |
parent | a82447a1b9056aeb9499e8452dd8aa4f1e1c4b6b (diff) |
typog (7may24)
git-svn-id: svn://tug.org/texlive/trunk@71202 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/typog')
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/README.md | 79 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/RELEASE-HOWTO.md | 51 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/crooked-paragraphs.mp | 119 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/index.md | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/slant-angle.mp | 87 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/smooth-parshapes.mp | 140 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/teximan2latex.sed | 55 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/title.mp | 92 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/typog-example.pdf | bin | 0 -> 392419 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/typog-example.tex | 1616 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/typog-grep.1.pdf | bin | 0 -> 511632 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/typog-grep.pod | 345 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/typog-nomt.tex | 73 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/typog.ist | 41 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/typog/typog.pdf | bin | 0 -> 902362 bytes |
15 files changed, 2703 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/typog/README.md b/Master/texmf-dist/doc/latex/typog/README.md new file mode 100644 index 00000000000..fb55ccb1e12 --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/README.md @@ -0,0 +1,79 @@ +# TypoG – Typographic Fine-Tuning for LaTeX + +LaTeX package `typog` provides macros for (micro-)typographic enhancements; +it covers a variety of topics: + +* Precise hyphenation control +* Disable/break ligatures +* Manual italic correction +* Extra kerning for slash and hyphen +* Raising selected characters (e.g. hyphen, en-dash, and em-dash) +* Aligning of the last line of a paragraph +* Filling of the last line last line of a paragraph +* Word spacing control +* [Microtype](https://github.com/schlcht/microtype) front-end +* Slightly sloppy paragraphs +* Vertically partially-tied paragraphs +* Breakable displayed equations +* Setspace front-end +* Smooth ragged-right paragraphs + +Moreover `typog` provides an environment to flag interesting parts of +the information deluge typically accumulating in a LaTeX *log*-file +and an associated tool, **typog-grep**, that selectively retrieves +these parts. + + +## Installation + +The minimally necessary files to install typog are *typog.ins* and *typog.dtx*. Running LaTeX +on *typog.ins* in particular produces *typog.sty*: + + latex typog.ins + +After extraction from *typog.dtx* place *typog.sty* in a directory mentioned in your TEXINPUTS +paths or copy it into one of the directories for your LaTeX installation's *sty*-files and run +**mktexlsr** or equivalent. + +To build the documentation it is easier to use the GNU *Makefile*: + + make + +To construct the manual *typog.pdf* or the usage example *typog-example.pdf* a working +[MetaPost](https://tug.org/metapost.html) installation and some +[POD](https://perldoc.perl.org/perlpod) utilities of a [Perl](https://www.perl.org/) +distribution are required. Cautious users can run + + make tool-check + +ahead to verify that the required utilities are installed and working. +For an overview over the most important *Makefile* targets use + + make help + + +## Usage + +Load the package with the usual incantation + + \usepackage{typog} + +See Section 2 of the package documentation for available options. + + +## Documentation + +The package documentation can be found +[online](https://cspiel.github.io/typog/). + + +## Credits + +Typog is written by Ch. L. Spiel <cspiel@users.sourceforge.org>. + + +## License + +Released under the +[LaTeX Project Public License v1.3c](https://www.latex-project.org/lppl.txt) +or later. diff --git a/Master/texmf-dist/doc/latex/typog/RELEASE-HOWTO.md b/Master/texmf-dist/doc/latex/typog/RELEASE-HOWTO.md new file mode 100644 index 00000000000..13435ef66d5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/RELEASE-HOWTO.md @@ -0,0 +1,51 @@ +# How to prepare a new release + +... and not make too many mistakes. + + +1. Check that the work-area is clean with respect to **git**-tracked + files. + + ``` git status ``` + +1. Update the date stamp of `\ProvidesPackage`. + +1. (Temporarily) Zero the `\overfullrule`s of the documentation and + the example files. + +1. Thoroughly clean the work-area: + + ```make maintainer-clean``` + +1. Rebuild: + + ```make``` + +1. Check that all _*.sty_ and _*.pdf_ files are in good shape. + +1. Push the documentation files created in the previous step down into + the *docs* directory: + + ```make update-docs``` + +1. Undo the `\overfullrule` change. + +1. Commit the changes: + + ``` + git add . + ``` + + and finally + + ``` + git commit + ``` + +1. Tag the commit with the version string of `\ProvidesPackage`: + + ```git tag v1.23``` + +1. Push the changes to the public repository: + + ```git push origin master --tags``` diff --git a/Master/texmf-dist/doc/latex/typog/crooked-paragraphs.mp b/Master/texmf-dist/doc/latex/typog/crooked-paragraphs.mp new file mode 100644 index 00000000000..778a3bc3846 --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/crooked-paragraphs.mp @@ -0,0 +1,119 @@ +%% +%% This is file `crooked-paragraphs.mp', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% typog.dtx (with options: `crookedparagraphs') +%% +%% This is a generated file. +%% +%% Copyright (C) 2024 by Ch. L. Spiel +%% +%% This work may be distributed and/or modified under the conditions +%% of the LaTeX Project Public License, either version 1.3 of this +%% license or (at your option) any later version. The latest version +%% of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Ch. L. Spiel. +%% +%% This work consists of the files typog.dtx and typog.ins +%% and the derived files typog.sty, slant-angle.mp, +%% crooked-paragraphs.mp, smooth-parshapes.mp, title.mp, +%% typog-example.tex, typog-nomt.tex, typog-grep.pl, +%% typog-grep.pod, and teximan2latex.sed. +%% +%% +prologues := 3; + +def draw_filled_rectangle(expr lower_left, upper_right, color) = + fill lower_left -- (xpart upper_right, ypart lower_left) -- + upper_right -- (xpart lower_left, ypart upper_right) -- + cycle + withcolor color; +enddef; + +u := 100; + +em := 10; +linelength := 2u; +baselineskip := 1.2em; +parskip := 3; +parindent := 2.5em; + +cmykcolor line_color; +line_color := (.08, 0, 0, .18); % cold silver + +color customred[]; +customred[1] := (.890, .282, .282); +customred[2] := (.831, .110, .110); +customred[3] := (.686, .043, .043); +customred[4] := (.569, .000, .000); +customred[5] := (.420, .000, .000); + +color margin_color; +margin_color := customred[2]; + +beginfig(1); % short line -- gap + y := 0; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); + y := y - baselineskip; + draw_filled_rectangle((0, y), (1.1em, y + 1em), line_color); + y := y - baselineskip; + draw_filled_rectangle((parindent, y), (linelength, y + 1em), line_color); + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); + + draw_filled_rectangle((-.667em, 1em), (-.333em, -3baselineskip), margin_color); + draw_filled_rectangle((linelength + .333em, 1em), (linelength + .667em, -3baselineskip), margin_color); +endfig; + +beginfig(2); % short line -- covered + y := 0; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); + y := y - baselineskip; + draw_filled_rectangle((0, y), (2parindent, y + 1em), line_color); + y := y - baselineskip; + draw_filled_rectangle((parindent, y), (linelength, y + 1em), line_color); + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); + + draw_filled_rectangle((-.667em, 1em), (-.333em, -3baselineskip), margin_color); + draw_filled_rectangle((linelength + .333em, 1em), (linelength + .667em, -3baselineskip), margin_color); +endfig; + +beginfig(3); % completely filled line -- no clear paragraph break + y := 0; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); + y := y - baselineskip - parskip; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); + + draw_filled_rectangle((-.667em, 1em), (-.333em, -3baselineskip - parskip), margin_color); + draw_filled_rectangle((linelength + .333em, 1em), (linelength + .667em, -3baselineskip - parskip), + margin_color); +endfig; + +beginfig(4); % completely filled line -- opened right margin + y := 0; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - parindent, y + 1em), line_color); + y := y - baselineskip - parskip; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); + + draw_filled_rectangle((-.667em, 1em), (-.333em, -3baselineskip - parskip), margin_color); + draw_filled_rectangle((linelength + .333em, 1em), (linelength + .667em, -3baselineskip - parskip), + margin_color); +endfig; +end diff --git a/Master/texmf-dist/doc/latex/typog/index.md b/Master/texmf-dist/doc/latex/typog/index.md new file mode 100644 index 00000000000..f4dc2e8bd9a --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/index.md @@ -0,0 +1,5 @@ +### Package Documentation + +- Comprehensive `typog` documentation: [typog.pdf](https://cspiel.github.io/typog/typog.pdf) +- `typog` examples and tests: [typog-example.pdf](https://cspiel.github.io/typog/typog-example.pdf) +- **typog-grep** manual page: [typog-grep.1](https://cspiel.github.io/typog/typog-grep.1) and as PDF: [typog-grep.1.pdf](https://cspiel.github.io/typog/typog-grep.1.pdf) diff --git a/Master/texmf-dist/doc/latex/typog/slant-angle.mp b/Master/texmf-dist/doc/latex/typog/slant-angle.mp new file mode 100644 index 00000000000..f25f790ea6f --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/slant-angle.mp @@ -0,0 +1,87 @@ +%% +%% This is file `slant-angle.mp', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% typog.dtx (with options: `slantangle') +%% +%% This is a generated file. +%% +%% Copyright (C) 2024 by Ch. L. Spiel +%% +%% This work may be distributed and/or modified under the conditions +%% of the LaTeX Project Public License, either version 1.3 of this +%% license or (at your option) any later version. The latest version +%% of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Ch. L. Spiel. +%% +%% This work consists of the files typog.dtx and typog.ins +%% and the derived files typog.sty, slant-angle.mp, +%% crooked-paragraphs.mp, smooth-parshapes.mp, title.mp, +%% typog-example.tex, typog-nomt.tex, typog-grep.pl, +%% typog-grep.pod, and teximan2latex.sed. +%% +%% +prologues := 3; +truecorners := 1; +linecap := butt; + +input TEX; +TEXPRE("%&latex" & char(10) & "\documentclass{article}\begin{document}"); +TEXPOST("\end{document}"); + +string roman_font; +roman_font := "pplr8r"; % URW Palladio L - Roman + +string italics_font; +italics_font := "pplri8r"; % URW Palladio L - Italic + +u := 360; + +font_scale := 10; + +pair loc[]; +loc[1] := .2[origin, (u, 0)]; +loc[2] := .5[origin, (u, 0)]; +loc[3] := .8[origin, (u, 0)]; + +picture letter_H; +letter_H := thelabel.top("H" infont italics_font scaled font_scale, loc[1]); + +picture letter_L; +letter_L := thelabel.top("L" infont italics_font scaled font_scale, loc[2]); + +picture letter_a; +letter_a := thelabel.top("a" infont italics_font scaled font_scale, loc[3]); + +path slant_angle; +slant_angle := lrcorner letter_H + (14, 0) -- lrcorner letter_H + (-6, 0) -- urcorner letter_H + (3.5, 0); + +pair base_point; +base_point := (xpart point 2 of slant_angle, ypart point 0 of slant_angle) ; + +pair angle_label; +angle_label := point 2 of slant_angle + (0, -12); + +beginfig(1); + draw letter_H; + draw slant_angle; + draw point 2 of slant_angle -- base_point dashed evenly; + draw point 1 of slant_angle -- base_point withpen pencircle scaled 2pt; + + label.rt(TEX("$\alpha$"), angle_label); + + draw letter_L; + draw slant_angle shifted (xpart lrcorner letter_L - xpart lrcorner letter_H + 2, 0); + + draw letter_a; + draw slant_angle shifted (xpart lrcorner letter_a - xpart lrcorner letter_H - 3, 0); +endfig; +end diff --git a/Master/texmf-dist/doc/latex/typog/smooth-parshapes.mp b/Master/texmf-dist/doc/latex/typog/smooth-parshapes.mp new file mode 100644 index 00000000000..ce47135a56e --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/smooth-parshapes.mp @@ -0,0 +1,140 @@ +%% +%% This is file `smooth-parshapes.mp', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% typog.dtx (with options: `smoothparshapes') +%% +%% This is a generated file. +%% +%% Copyright (C) 2024 by Ch. L. Spiel +%% +%% This work may be distributed and/or modified under the conditions +%% of the LaTeX Project Public License, either version 1.3 of this +%% license or (at your option) any later version. The latest version +%% of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Ch. L. Spiel. +%% +%% This work consists of the files typog.dtx and typog.ins +%% and the derived files typog.sty, slant-angle.mp, +%% crooked-paragraphs.mp, smooth-parshapes.mp, title.mp, +%% typog-example.tex, typog-nomt.tex, typog-grep.pl, +%% typog-grep.pod, and teximan2latex.sed. +%% +%% +prologues := 3; + +def draw_filled_rectangle(expr lower_left, upper_right, color) = + fill lower_left -- (xpart upper_right, ypart lower_left) -- + upper_right -- (xpart lower_left, ypart upper_right) -- + cycle + withcolor color; +enddef; + +u := 100; + +em := 10; +linelength := 2u; +baselineskip := 1.2em; +parskip := 3; +parindent := 2.5em; +ragwidth := 2em; + +cmykcolor line_color; +line_color := (.08, 0, 0, .18); % cold silver + +color customred[]; +customred[1] := (.890, .282, .282); +customred[2] := (.831, .110, .110); +customred[3] := (.686, .043, .043); +customred[4] := (.569, .000, .000); +customred[5] := (.420, .000, .000); + +color margin_color; +margin_color := customred[2]; + +beginfig(1); % triplet + y := 0; + draw_filled_rectangle((0, y), (linelength - ragwidth, y + 1em), line_color); % (1) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); % (3) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - ragwidth/2, y + 1em), line_color); % (2) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - ragwidth, y + 1em), line_color); % (1) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); % (3) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - ragwidth/2, y + 1em), line_color); % (2) + + draw_filled_rectangle((-.667em, 1em), (-.333em, -5baselineskip), margin_color); + draw_filled_rectangle((linelength + .333em, 1em), (linelength + .667em, -5baselineskip), margin_color); +endfig; + +beginfig(2); % quintuplet + y := 0; + draw_filled_rectangle((0, y), (linelength - .75ragwidth, y + 1em), line_color); % (2) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); % (5) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .5ragwidth, y + 1em), line_color); % (3) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .25ragwidth, y + 1em), line_color); % (4) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - ragwidth, y + 1em), line_color); % (1) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .75ragwidth, y + 1em), line_color); % (2) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); % (5) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .5ragwidth, y + 1em), line_color); % (3) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .25ragwidth, y + 1em), line_color); % (4) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - ragwidth, y + 1em), line_color); % (1) + + draw_filled_rectangle((-.667em, 1em), (-.333em, -9baselineskip), margin_color); + draw_filled_rectangle((linelength + .333em, 1em), (linelength + .667em, -9baselineskip), margin_color); +endfig; + +beginfig(3); % septuplet + y := 0; + draw_filled_rectangle((0, y), (linelength - .6667ragwidth, y + 1em), line_color); % (3) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .1667ragwidth, y + 1em), line_color); % (6) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - ragwidth, y + 1em), line_color); % (1) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .3333ragwidth, y + 1em), line_color); % (5) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .8333ragwidth, y + 1em), line_color); % (2) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); % (7) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .5ragwidth, y + 1em), line_color); % (4) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .6667ragwidth, y + 1em), line_color); % (3) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .1667ragwidth, y + 1em), line_color); % (6) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - ragwidth, y + 1em), line_color); % (1) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .3333ragwidth, y + 1em), line_color); % (5) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .8333ragwidth, y + 1em), line_color); % (2) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); % (7) + y := y - baselineskip; + draw_filled_rectangle((0, y), (linelength - .5ragwidth, y + 1em), line_color); % (4) + + draw_filled_rectangle((-.667em, 1em), (-.333em, -13baselineskip), margin_color); + draw_filled_rectangle((linelength + .333em, 1em), (linelength + .667em, -13baselineskip), margin_color); +endfig; +end diff --git a/Master/texmf-dist/doc/latex/typog/teximan2latex.sed b/Master/texmf-dist/doc/latex/typog/teximan2latex.sed new file mode 100644 index 00000000000..b329ac3845f --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/teximan2latex.sed @@ -0,0 +1,55 @@ +## Remove all lines we neither need nor want. +/^\\input /d +/^@anchor/d +/^@bye/d +/^@documentencoding/d +/^@node/d +/^@setfilename/d +/^@settitle/d +/^@top/d +/@menu/,/@end menu/d + +## Convert sectioning macros to our own hierarchy. +s/^@chapter \(.*\)$/\\subsection*{\\textls[40]{\1}}/ +s/^@section \(.*\)$/\\subsubsection*{\1}/ + +## Make `@asis' list resemble the Texinfo format. +s/@table @asis/\\begin{list}{}{\\itemindent=-20pt\\leftmargin=20pt}/ +s/@end table/\\end{list}/ + +## Indenting by four spaces generates a `verbatim' environment. +s/@verbatim/\\begin{verbatim}/ +s/@end verbatim/\\end{verbatim}/ + +## We substitute @display for our maxipage environment. +s/@display/\\begin{maxipage}/ +s/@end display/\\end{maxipage}/ + +## The argument format of the URL macro is different. +s/@url{\([^,]*\), \([^}]*\)}/\\href{\1}{\2}/g + +## Use our own markup. +s/\.\.\./\\dots{}/g +s/LaTeX/\\LaTeX{}/g +s/@file/\\textit/g +s/@strong/\\textbf/g +s/[w]{/mbox{/g + +## Quote some special characters. +s/%/\\%/g +s/_/\\_/g + +## Adapt to how a man-page is typeset. +## En-dashes in front of long options really suck! +s/--/-\\nolig*-/g + +## Converting the at-signs to backslashes is a bit tricky. +s/^@item/\\item/ +s/@\([A-Za-z][A-Za-z]*\){/\\\1{/g +s/@@/@/g + +## Convert selected macro names. +s/\\jobname/\\textbackslash jobname/g + +## Make qualified Perl names breakable. +s/::/::\\discretionary{}{}{}/g diff --git a/Master/texmf-dist/doc/latex/typog/title.mp b/Master/texmf-dist/doc/latex/typog/title.mp new file mode 100644 index 00000000000..2fd74e91f9d --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/title.mp @@ -0,0 +1,92 @@ +%% +%% This is file `title.mp', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% typog.dtx (with options: `title') +%% +%% This is a generated file. +%% +%% Copyright (C) 2024 by Ch. L. Spiel +%% +%% This work may be distributed and/or modified under the conditions +%% of the LaTeX Project Public License, either version 1.3 of this +%% license or (at your option) any later version. The latest version +%% of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Ch. L. Spiel. +%% +%% This work consists of the files typog.dtx and typog.ins +%% and the derived files typog.sty, slant-angle.mp, +%% crooked-paragraphs.mp, smooth-parshapes.mp, title.mp, +%% typog-example.tex, typog-nomt.tex, typog-grep.pl, +%% typog-grep.pod, and teximan2latex.sed. +%% +%% +prologues := 3; +truecorners := 1; +linecap := butt; + +string roman_font; +roman_font := "pplr8r"; % URW Palladio L - Roman + +string italics_font; +italics_font := "pplri8r"; % URW Palladio L - Italic + +picture dash_dotted; +dash_dotted := dashpattern(on 3 off 3 on 0 off 3); + +u := 280; + +font_scale := 20; + +pair loc[]; +loc[1] := .2[origin, (u, 0)]; +loc[2] := .5[origin, (u, 0)]; +loc[3] := .8[origin, (u, 0)]; + +pair slant_vector; +slant_vector := (63, 150); + +pair raise_vector[]; +raise_vector[0] := (0, 44); +raise_vector[1] := (0, 61); +raise_vector[2] := (0, 54); +raise_vector[3] := (0, 71); + +picture letter_V; +letter_V := thelabel.top("V" infont roman_font scaled font_scale, loc[1]); + +picture normal_hyphen; +normal_hyphen := thelabel.top("-" infont roman_font scaled font_scale, loc[2] + raise_vector[0]); + +picture raised_hyphen; +raised_hyphen := thelabel.top("-" infont roman_font scaled font_scale, loc[2] + raise_vector[1]); + +picture letter_A; +letter_A := thelabel.top("A" infont roman_font scaled font_scale, loc[3]); + +beginfig(1); + draw letter_V; + draw normal_hyphen withcolor .9 white; + draw raised_hyphen; + draw letter_A; + + pickup pencircle scaled .4pt; + draw (loc[1] -- loc[1] + slant_vector) shifted (7, 0) dashed evenly; + draw (loc[1] -- loc[1] + slant_vector) shifted (27, 0) dashed evenly; + draw (loc[1] -- loc[1] + slant_vector) shifted (80, 0) dashed evenly; + draw (loc[3] -- loc[3] + slant_vector) shifted (-68, 0) dashed evenly; + + draw .35[origin, (u, 0)] + raise_vector[2] -- .8[origin, (u, 0)] + raise_vector[2] + dashed dash_dotted withcolor .6white; + draw .35[origin, (u, 0)] + raise_vector[3] -- .8[origin, (u, 0)] + raise_vector[3] + dashed dash_dotted; +endfig; +end diff --git a/Master/texmf-dist/doc/latex/typog/typog-example.pdf b/Master/texmf-dist/doc/latex/typog/typog-example.pdf Binary files differnew file mode 100644 index 00000000000..621ac319d20 --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/typog-example.pdf diff --git a/Master/texmf-dist/doc/latex/typog/typog-example.tex b/Master/texmf-dist/doc/latex/typog/typog-example.tex new file mode 100644 index 00000000000..af04d490094 --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/typog-example.tex @@ -0,0 +1,1616 @@ +%% +%% This is file `typog-example.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% typog.dtx (with options: `example') +%% +%% This is a generated file. +%% +%% Copyright (C) 2024 by Ch. L. Spiel +%% +%% This work may be distributed and/or modified under the conditions +%% of the LaTeX Project Public License, either version 1.3 of this +%% license or (at your option) any later version. The latest version +%% of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Ch. L. Spiel. +%% +%% This work consists of the files typog.dtx and typog.ins +%% and the derived files typog.sty, slant-angle.mp, +%% crooked-paragraphs.mp, smooth-parshapes.mp, title.mp, +%% typog-example.tex, typog-nomt.tex, typog-grep.pl, +%% typog-grep.pod, and teximan2latex.sed. +%% +%% +\documentclass[a4paper]{article} + +\tracingonline=0 + +\PassOptionsToPackage{dvipsnames}{xcolor} + +\usepackage{amsmath} +\usepackage[main=USenglish, german]{babel} +\usepackage{float} +\usepackage[T1]{fontenc} +\usepackage{fullwidth} +\usepackage{hyphenat} +\usepackage{mathtools} +\usepackage[activate=true, verbose=true]{microtype} +\usepackage{ragged2e} +\usepackage[nobottomtitles*]{titlesec}\renewcommand*{\bottomtitlespace}{.2\textheight} +\usepackage[debug, trackingttspacing]{typog} +\usepackage{xcolor} + +\usepackage[loosest, proportional, scaled=1.064]{erewhon} +\usepackage[erewhon]{newtxmath} +\usepackage[scaled=.95]{cabin} +\usepackage{inconsolata} +\usepackage{setspace}\setstretch{1.08333} + +\def\xsfdefault{\relax} +{ + \def\examplefont{6} + + \ifcase\examplefont % 0 -- document's default sans-serif font (e.g., ecrm1000) + \gdef\examplefontname{default} + \global\let\xsf=\sf + \global\let\xsfdefault=\sfdefault + \or % 1 -- Nunito + \gdef\examplefontname{Nunito} + \usepackage{nunito} + \xdef\xsfdefault{\rmdefault} + \gdef\xsf{\let\sfdefault=\xsfdefault\sf} + \or % 2 -- OpenSans + \gdef\examplefontname{OpenSans} + \usepackage[defaultsans]{opensans} + \xdef\xsfdefault{\sfdefault} + \gdef\xsf{\let\sfdefault=\xsfdefault\sf} + \or % 3 -- Noto Sans + \gdef\examplefontname{OpenSans} + \usepackage[sfdefault]{noto} + \xdef\xsfdefault{\sfdefault} + \gdef\xsf{\let\sfdefault=\xsfdefault\sf} + \or % 4 -- Roboto + \gdef\examplefontname{Roboto} + \usepackage[sfdefault]{roboto} + \xdef\xsfdefault{\sfdefault} + \gdef\xsf{\let\sfdefault=\xsfdefault\sf} + \or % 5 -- Montserrat + \gdef\examplefontname{Montserrat Alternate} + \usepackage[alternates]{montserrat} + \xdef\xsfdefault{\sfdefault} + \gdef\xsf{\let\sfdefault=\xsfdefault\sf} + \or % 6 -- Inter + \gdef\examplefontname{Inter} + \usepackage[sfdefault]{inter} + \xdef\xsfdefault{\sfdefault} + \gdef\xsf{\let\sfdefault=\xsfdefault\sf} + \else + \SelectedUnknownExampleFont + \fi + + \typeout{typog-example: font for examples: `\xsfdefault'}% +} + +\usepackage{hyperref} +\usepackage{cleveref} + +\hypersetup{ + citecolor = CadetBlue, + colorlinks = true, + linkcolor = Blue, + linktocpage = true, + pdfauthor={Dr. Christoph L. Spiel}, + pdfkeywords={Examples, + LaTeX, typography, ligature, italic-correction, paragraph justification, sloppy, ragged}, + pdfsubject={Examples for typographic fine-tuning of LaTeX}, + pdftitle={Examples for LaTeX package typog}, + raiselinks = false, + urlcolor = Mulberry +} + +\makeatletter +\newcommand{\fs@myruled}{% + \fs@ruled + \def\@fs@capt##1##2{\floatc@ruled{##1\space\capitaldash*\space}{\fussy ##2}}% + \def\@fs@pre{\hrule height.8pt depth0pt \kern4pt}% + \def\@fs@mid{\kern3pt\hrule\kern3pt}% + \def\@fs@post{\kern4pt\hrule\relax}% +} +\makeatother + +\floatstyle{myruled} +\newfloat{exemplary}{htbp}{loe}[section] +\floatname{exemplary}{Example} +\Crefname{exemplary}{Example}{Examples} +\crefname{exemplary}{Ex.}{Ex.} + +\newcommand*{\acronym}[1]{\mbox{\letterspacecapitals{\MakeUppercase{#1}}}} +\newcommand*{\bibauthor}[1]{\textsc{#1}} +\newcommand*{\bibtitle}[1]{\textit{#1}} +\newcommand*{\bottomstrut}{\rule[-.5em]{0pt}{0pt}} +\newcommand*{\code}[1]{{\ttfamily\hyphenchar\font=`\-\relax #1}} +\newcommand*{\doublequotes}[1]{\doubleguillemetright#1\doubleguillemetleft} +\newcommand*{\eTeX}{\mbox{\(\epsilon\)-\TeX}} +\newcommand*{\letterspacecapitals}[1]{\textls[30]{#1}} +\newcommand*{\metavar}[1]{\textit{#1}} +\newcommand*{\packagename}[1]{\mbox{\textsf{#1}}} +\newcommand*{\propername}[1]{\mbox{\textsc{\textls[25]{#1}}}} +\newcommand*{\sample}[1]{\mbox{`\texttt{#1}'}} +\newcommand*{\singlequotes}[1]{\singleguillemetright#1\singleguillemetleft} +\newcommand*{\topstrut}{\rule{0pt}{1.25em}} +\newcommand*{\visualpar}{\,\P\quad} + +\newlength{\emreference} +\AtBeginDocument{\setlength{\emreference}{\fontdimen6\font}} +\newrobustcmd*{\milliem}[1] + {\ifdim #1=0pt + #1% + \else + \generictextfraction{\the\numexpr\dimexpr (#1) * 1000 / \emreference}{1000}\:em% + \fi} + +\newcommand*{\generictextfraction}[2] + {\raisebox{.4em}[0pt]{\scriptsize #1}% + \kern-.05em\textfractionsolidus\kern-.05em + \raisebox{-.15em}[0pt][0pt]{\scriptsize #2}} + +\newcommand*{\leftmarker}{\rule{.2em}{.1pt}\rule{.1pt}{.667em}} +\newcommand*{\rightmarker}{\rule{.1pt}{.667em}\rule{.2em}{.1pt}} +\newcommand*{\indicatewidth}[1]{\mbox{\leftmarker #1\rightmarker}} + +\newcommand*{\maxipagerule}{\medskip\hrule\medskip} +\newenvironment*{maxipage*} + {\par + \noindent + \fullwidthsetup{leftmargin=-\marginparsep - \marginparwidth, + width=\textwidth + 2\marginparsep + 2\marginparwidth} + \begin{fullwidth}% + \vspace*{1pt}% Why is some vspace necessary? + \parskip=.5\baselineskip} + {\par + \end{fullwidth}% + \par} +\newenvironment*{maxipage} + {\par + \noindent + \fullwidthsetup{leftmargin=-\marginparsep - \marginparwidth, + width=\textwidth + 2\marginparsep + 2\marginparwidth} + \begin{fullwidth}% + \maxipagerule + \parskip=.5\baselineskip} + {\par + \vskip\parskip + \maxipagerule + \end{fullwidth}% + \par} + +\newlength{\examplewidth} +\setlength{\examplewidth}{160pt} + +\newcommand*{\texbooktolerancesample} + {If you want to avoid overfull boxes at all costs without trying to fix them manually, + you might be tempt\-ed to set \texttt{tol\-er\-ance=\allowbreak10000}; this allows + arbitrarily bad lines to be acceptable in tough situations. But infinite tolerance + is a bad idea, because \TeX{} doesn't distinguish between terribly bad and + preposterously horrible lines. Indeed, a tolerance of 10000 encourages \TeX{} to + concentrate all the badness in one place, making one truly unsightly line instead of + two moderately bad ones, because a single ``write-off'' produces fewest total + demerits according to the rules.} + %There is a much better way to get the desired effect:~[\dots] +\newcommand*{\texbooktolerancesamplecredits} + {\medskip\noindent + \textsl{The sample text was taken from The~\TeX{}book~\cite[p.~107]{knuth:1986}.}} + +\newcommand*{\texbookparfillskipsample} + {We still haven't discussed the special trick that allows the final line of a paragraph + to be shorter than the others. Just before \TeX{} begins to choose breakpoints, + it does two important things: [\dots]} +\newcommand*{\texbooklongparfillskipsample} + {We still haven't discussed the special trick that allows the final line of a paragraph + to be shorter than the others. Just before \TeX{} begins to choose breakpoints, + it does two important things: (1)~If the final item of the current horizontal list is glue, + that glue is discarded. (The reason is that a blank space often gets into a token list just + before \code{\char92par} or just before \code{\char36\char36}, and this blank space should not be + part of the paragraph.) (2)~Three or more items are put at the end of the + current horizontal list~[\dots]} +\newcommand*{\texbookparfillskipsamplecredits} + {\medskip\noindent + \textsl{The sample text was taken from The~\TeX{}book~\cite[p.~99n]{knuth:1986}.}} + +\newcommand*{\texbookparshapeskipsample} + {It's possible to control the length of lines in a much more general way, if simple + changes to \code{\string\leftskip} and \code{\string\rightskip} aren't flexible enough for your + purposes. For example, a semicircular hole has been cut out of the present paragraph, + in order to make room for a circular illustration that contains some of + Galileo's immortal words about circles; all of the line breaks in this + paragraph and in the circular quotation were found by \TeX's line-breaking algorithm. + You can specify a essentially arbitrary paragraph shape, by saying + \code{parshape}=\metavar{number}, where the \metavar{number} is a positive integer~\(n\), + followed by \(2n\)~\metavar{dimen} specifications.} +\newcommand*{\texbookparshapeskipsamplecredits} + {\medskip\noindent + \textsl{The sample text was taken from The~\TeX{}book~\cite[p.~101]{knuth:1986}.}} + +\newcommand*{\texbookbaselineskipsample} + {When you are typsetting a document that spans several pages, it's generally best to + define \code{\string\baselineskip} so that it cannot stretch or shrink, because + this will give more uniformity to the pages. A small variation in the distance + between the baselines---say only half a point---can make a substantial difference + in the appearance of the type, since it significantly affects the proportion of + white to black. On the other hand, if you are preparing a one-page document, you + might want to give the baselineskip some stretchability, so that \TeX{} will help + you fit the copy on the page.} +\newcommand*{\texbookbaselineskipsamplecredits} + {\medskip\noindent + \textsl{The sample text was taken from The~\TeX{}book~\cite[p.~78]{knuth:1986}.}} + +\newcommand*{\examplepreset}{\microtypesetup{activate=false}} +\newcommand*{\examplesetup}{\frenchspacing\xsf\small\fussy} +\newcommand*{\exampleparbox}[2][n/a] + {\begin{typoginspect}{#1} + \examplepreset + \parbox[t]{\examplewidth}{\examplesetup #2}% + \end{typoginspect}} +\newcommand*{\examplesep}{\hspace*{20pt}} +\def\fontnameandweightinfo#1{% + {\def\projectoutfontname##1-##2-##3\relax{##1~\lowercase{##2}}% + \global\expandafter\edef\csname#1\endcsname{\expandafter\projectoutfontname\fontname\font\relax}}} +\newcommand*{\examplefontinformation} + {\smallskip + \examplesetup + \fontnameandweightinfo{exfontnameinfo}% + \fontsizeinfo{exfontsizeinfo}% + The font used in this example is \exfontnameinfo, \exfontsizeinfo*.} + +\setcounter{tocdepth}{1} +\setlength{\overfullrule}{3pt} +\hbadness=-1 + +\input{ushyphex} + +\hyphenation{ + Double-guillemet-left + Double-guillemet-right + Double-quotes + Single-guillemet-left + Single-guillemet-right + Single-quotes + adj-demerits + allow-display-breaks + babel-hyphenation + base-line-skip + break-penalty + breakable-display + capital-hyphen + capital-times + cite-dash + club-penalties + cref-range-conjunction + display-break + display-widow-penalties + double-guillemet-right + double-hyphen-demerits + double-quotes + final-hyphen-demerits + inter-display-line-penalty + inter-text + kerned-hyphen + last-line-ragged-left + last-line-ragged-left-par + line-width + loose-ness + loose-spacing + make-at-letter + make-at-other + mar-gin-al + math-italics-correction + micro-type + number-dash + par-box + par-indent + parfillskip + pdf-string-def-Disable-Commands + post-display-penalty + pre-display-penalty + raise-capital-guillemets + raise-capital-times + raise-number-dash + set-font-expand + set-font-shrink + set-font-stretch + short-inter-text + single-guillemet-left + single-guillemet-right + single-quotes + slash-kern + slightly-sloppy-par + sloppy-par + smooth-ragged-right-fuzz-factor + smooth-ragged-right-par + smooth-ragged-right-shape-quintuplet + smooth-ragged-right-shape-septuplet + smooth-ragged-right-shape-triplet + space-skip + text-italics-correction + tight-spacing + tracing-boxes + tracing-para-graphs + vtie-bot + vtie-bot-disp + vtie-bot-disp-par + vtie-bot-disp-top-par + vtie-bot-par + vtie-top + vtie-top-par + widow-penalties +} + +\SetExpansion[context=sloppy, stretch=30, shrink=60, step=5]{encoding={OT1, T1, TS1}}{}% p15 +\SetTracking{encoding=*, shape=sc}{20} + +\begin{document} +\fussy +\lastlinefit=1000 +\nonfrenchspacing + +\begin{center} + \Huge\bf\sf + TypoG Examples +\end{center} + +\bigskip + +\noindent +The section numbers correspond to the subsections of section~3 +in the official documentation of package~\packagename{typog}. + +\bigskip + +\tableofcontents + +\clearpage +\listof{exemplary}{Examples} + +\clearpage +\noindent +Unless otherwise noted the font used in the examples is \singlequotes{\examplefontname}. + +\bigskip + +\section{Information} + +\code{\string\fontsizeinfo} --\fontsizeinfo{docsizeinfo} +At this point of the document, the font~size +and the line~spacing are \docsizeinfo*~(w/o~units). +For footnotes however, the current sizes are% +\footnote{This is the footnote where we get the sizes from.\fontsizeinfo{footsizeinfo}} +\footsizeinfo. + +Next we show a comparison of different font sizes and line spacings +decorated with the results of \code{\string\fontsizeinfo}. + +\medskip + +\begin{maxipage} + \setstretch{1} + \newcommand*{\baselineskipdoc}% + {Macro \code{\string\baselineskip} is a length command which + specifies the minimum space between the bottom of two + successive lines in a paragraph. Its value may be + automatically reset by \LaTeX, for example, by font + changes in the text.} + \renewcommand*{\examplefontname}{Merriweather} + Different font sizes and line spacings exemplified with the \examplefontname~font. + + \smallskip + + \begingroup + \fontfamily{Merriwthr-TLF}\selectfont + \noindent + \parbox[t]{.31\linewidth}% + {\fontsize{8.5}{12}\selectfont + \baselineskipdoc + \fontsizeinfo{examplesizeinfotight}} + \hfill + \parbox[t]{.31\linewidth}% + {\fontsize{10}{12}\selectfont + \baselineskipdoc + \fontsizeinfo{examplesizeinfo}} + \hfill + \parbox[t]{.31\linewidth}% + {\fontsize{10}{13.5}\selectfont + \baselineskipdoc + \fontsizeinfo{examplesizeinfoloose}} + \endgroup + + \medskip + + \noindent + \parbox[t]{.31\linewidth}{\examplefontname~\examplesizeinfotight*} + \hfill + \parbox[t]{.31\linewidth}{\examplefontname~\examplesizeinfo*} + \hfill + \parbox[t]{.31\linewidth}{\examplefontname~\examplesizeinfoloose*} +\end{maxipage} + +\noindent Starred form eats spaces? \examplesizeinfo* . + +\section{Hyphenation} + +\noindent Line-break behavior + +\begin{quote} + \setlength{\overfullrule}{0pt} + \parbox[t]{0pt}{% + \code{\string\mbox+\string\breakpoint*} \\ + \mbox{(pre-)}\breakpoint*Hilbert space} + \hspace{100pt} + \parbox[t]{0pt}{% + \code{\string\breakpoint*} \\ + (pre-)\breakpoint*Hilbert space} + \hspace{100pt} + \parbox[t]{0pt}{% + \code{\string\breakpoint} \\ + (pre-)\breakpoint Hilbert space} +\end{quote} + +\noindent Starred form eats spaces? a\breakpoint* b. Unstarred: a\breakpoint b. + +\medskip + +\begin{quote} + \setlength{\overfullrule}{0pt} + \parbox[t]{0pt}{% + \begin{hyphenmin}{6} + Set minimum hyphenation values for both \code{\string\lefthyphenmin} and + \code{\string\righthyphenmin}: \the\lefthyphenmin{} and \the\righthyphenmin. + \end{hyphenmin}} + \hspace{100pt} + \parbox[t]{0pt}{% + \begin{hyphenmin}[4]{5} + Set minimum hyphenation values for \code{\string\lefthyphenmin} and + \code{\string\righthyphenmin} separately: \the\lefthyphenmin{} and \the\righthyphenmin. + \end{hyphenmin}} + \hspace{100pt} + \parbox[t]{0pt}{% + Returned to the default values for \code{\string\lefthyphenmin} and + \code{\string\righthyphenmin}: \the\lefthyphenmin{} and \the\righthyphenmin.} +\end{quote} + +\section{Disable\kernedslash*Break Ligatures} + +\begin{center} + \begin{tabular}{@{}ll@{}} + \hline + \multicolumn{1}{@{}l|}{Macro} & Result \\ + \hline + n/a & + fine affirmation of baffling flavors \\ + \code{\string\nolig*} & + f\nolig*ine af\nolig*f\nolig*irmation of baf\nolig*f\nolig*ling f\nolig*lavors \\ + \code{\string\nolig} & + f\nolig{}ine af\nolig{}f\nolig{}irmation of baf\nolig{}f\nolig{}ling f\nolig{}lavors \\ + \code{\string\nolig*[75]} & of\nolig*[75]f\nolig*[75]ice + \end{tabular} +\end{center} + +\noindent Line-break behavior + +\begin{quote} + \setlength{\overfullrule}{0pt} + \parbox[t]{0pt}{% + \code{\string\nolig*} \\ + bi\nolig*{}jection} + \hspace{60pt} + \parbox[t]{0pt}{% + \code{\string\nolig} \\ + bi\nolig{}jection} +\end{quote} + +\noindent Starred form eats spaces? f\nolig* i, f\nolig*[0] i. + +\section{Manual Italic Correction} + +\paragraph{Text Mode.} + +The italic correction of the current font is \the\fontdimen1\font/pt. + +We demonstrate the effect of \code{\string\itcorr} with a pair of bookends: +uncorrected italics: \indicatewidth{\it X}, +\TeX-corrected (\code{\string\/}): \indicatewidth{\it X\/}, +and \code{\string\itcorr\{7\}}: \indicatewidth{\it X\itcorr{7}}. + +Correction~0: \indicatewidth{\itcorr*{0}}; +corr.~3: \indicatewidth{\itcorr{3}}, \indicatewidth{\itcorr*{3}} (starred); +corr.~\textminus6: \indicatewidth{\itcorr{-6}}. + +\paragraph{Mathematical Mode.} + +Uncorrected: \([f]\), +corrected: \([\itcorr{1} f\itcorr{1}]\) + +Correction~0: \indicatewidth{\(\itcorr{0}\)}; +corr.~3: \indicatewidth{\(\itcorr{3}\)}; +corr.~\textminus6: \indicatewidth{\(\itcorr{-6}\)}. + +\section{Apply Extra Kerning} + +\subsection{Slash} + +The slash with some extra space around it can be helpful for certain pairs, +as for example years or names. + +\begin{center} + \begin{tabular}{@{}ll@{}} + \hline + \multicolumn{1}{@{}l|}{Macro} & Result \\ + \hline + n/a & 1991/1992, + New~York/NY, Korringa/Kohn/Rostoker \\ + \code{\string\kernedslash} & + 1991\kernedslash1992, New~York\kernedslash{}NY, Korringa\kernedslash{}Kohn\kernedslash{}Rostoker \\ + \end{tabular} +\end{center} + +\noindent Line-break behavior + +\begin{quote} + \setlength{\overfullrule}{0pt} + \parbox[t]{0pt}{% + \code{\string\kernedslash*} \\ + 1991\kernedslash*1992, + New~York\kernedslash*NY, + Korringa\kernedslash*Kohn\kernedslash*Rostoker} + \hspace{120pt} + \parbox[t]{0pt}{% + \code{\string\kernedslash} \\ + 1991\kernedslash{}1992, + New~York\kernedslash{}NY, + Korringa\kernedslash{}Kohn\kernedslash{}Rostoker} +\end{quote} + +\begin{quote} + \setlength{\overfullrule}{0pt} + \parbox[t]{0pt}{% + \code{\string\kernedslash*}\code{\string\nobreak} \\ + 1991\kernedslash*\nobreak{}1992, + New~York\kernedslash*\nobreak{}NY, + Korringa\kernedslash*Kohn\kernedslash*\nobreak{}Rostoker} + \hspace{140pt} + \parbox[t]{0pt}{% + \code{\string\allowhyphenation\string\kernedslash} \\ + 1991\kernedslash{}1992, + New~York\kernedslash{}NY, + Korringa\allowhyphenation\kernedslash{}Kohn\kernedslash{}Rostoker} +\end{quote} + +\noindent Starred form eats spaces? p\kernedslash* q. + +\subsection{Hyphen} + +Uncorrected + +\begin{quote} + \(K\)-vector space, \(g\)-factor, \(f\)-function +\end{quote} + +\noindent Corrected + +\begin{quote} + \typogsetup{raisecapitalhyphen=.075em, raiseguillemets=.05em} + \(K\)\leftkernedhyphen{-75}vector space, + \(g\)\leftkernedhyphen{-25}factor, + \(f\)\leftkernedhyphen{-100}function + %% \(G\)\kernedhyphen[*]{50}{-50}Wirkung, + %% \(G\)\leftkernedhyphen{50}äquivalent, + %% \(K\)\kernedhyphen[*]{-50}{-50}Vektorraum, + %% \(K\)\kernedhyphen{-50}{-25}bilinear, + %% \propername{Young}\rightkernedhyphen{-50}Tableaux, + %% \singlequotes{Bra}\kernedhyphen[50]{50}{-50}Vektor, + %% \singlequotes{Ket}\kernedhyphen[50]{50}{-50}Vektor, + %% halbzahlige~\(l\)\kernedhyphen{50}{-50}Werte. +\end{quote} + +\noindent Line-break behavior + +\begin{quote} + \setlength{\overfullrule}{0pt} + + \parbox[t]{0pt}{hyphen~\mbox{`\code{-}'} \\ self-energy} + \hspace{80pt} + \parbox[t]{0pt}{\code{\string\hyp} \\ self\hyp{}energy} + \hspace{60pt} + \parbox[t]{0pt}{\code{\string\kernedhyphen*} \\ self\kernedhyphen*{5}{-5}energy} + \hspace{80pt} + \parbox[t]{0pt}{\code{\string\kernedhyphen} \\ self\kernedhyphen{5}{-5}energy} +\end{quote} + +\noindent If a \code{\string\kernedhyphen} goes astray in a math environment, +it decays to an ordinary minus with appropriate kerning: +\(G \kernedhyphen{-30}{-50} V\)\!. + +\section{Raise Selected Characters} + +\subsection{Capital Hyphen} + +\newlength{\exemplaryraisecapitalhyphen} +\setlength{\exemplaryraisecapitalhyphen}{.6667pt} +With the standard hyphen we get + +\begin{quote} + \begin{otherlanguage}{german} + \acronym{NMR}-Spektroskopie, + \acronym{SI}-Einheit, + \(G\)-Modul, and + \(K\)-Vektorraum, + \end{otherlanguage} +\end{quote} + +\noindent whereas with raising the hyphen by \the\exemplaryraisecapitalhyphen{} +when calling \code{\string\capitalhyphen}, we arrive at + +\begin{quote} + \begin{otherlanguage}{german} + \typogsetup{raisecapitalhyphen=.075em} + + \acronym{NMR}\capitalhyphen{}Spektroskopie, + \acronym{SI}\capitalhyphen{}Einheit, + \(G\)\capitalhyphen{}Modul, and + \(K\)\capitalhyphen{}Vektorraum + (even better with \code{\string\kernedhyphen} + and the star-option for the correct raise-amount: + \(K\)\leftkernedhyphen[*]{-100}Vektorraum). + \end{otherlanguage} +\end{quote} + +\noindent Line-break behavior + +\begin{quote} + \setlength{\overfullrule}{0pt} + \begin{otherlanguage}{german} + \parbox[t]{0pt}{% + \code{\string\capitalhyphen*} \\ + \acronym{NMR}\capitalhyphen*{}Spektroskopie + } + \hspace{120pt} + \parbox[t]{0pt}{% + \code{\string\capitalhyphen} \\ + \acronym{NMR}\capitalhyphen{}Spektroskopie + } + \end{otherlanguage} +\end{quote} + +\noindent Starred form eats spaces? +{\typogsetup{raisecapitalhyphen=.075em} + V\capitalhyphen* W.} + +\subsection{Capital Dash} + +\newlength{\exemplaryraisecapitaldash} +\setlength{\exemplaryraisecapitaldash}{.075em} + +Compare the result of plain~\code{\string\textendash} + +\begin{quote} + A\textendash M, N\textendash Z, C1\,\textendash\,C4, LEED\:\textendash\:STM +\end{quote} + +\noindent with \code{\string\capitaldash}: + +\begin{quote} + \typogsetup{raisecapitaldash=\exemplaryraisecapitaldash} + + A\capitaldash{}M, N\capitaldash{}Z, C1\,\capitaldash\,C4, LEED\:\capitaldash\:STM +\end{quote} + +\noindent where the en-dash has been raised by \milliem{\exemplaryraisecapitaldash}. + +Starred form eats spaces? V\capitaldash* W. + +\subsection{Number Dash} + +\newlength{\exemplaryraisefiguredash} +\setlength{\exemplaryraisefiguredash}{.6667pt} +Compare the result of plain~\code{\string\textendash} + +\begin{quote} + 3--5, 81--82, 485--491 +\end{quote} + +\noindent with \code{\string\figuredash}: + +\begin{quote} + \typogsetup{raisefiguredash=\exemplaryraisefiguredash} + 3\figuredash 5, 81\figuredash 82, 485\figuredash 491 +\end{quote} + +\noindent where the en-dash has been raised by \the\exemplaryraisefiguredash. + +\noindent Line-break behavior + +\begin{quote} + \setlength{\overfullrule}{0pt} + \typogsetup{raisefiguredash=\exemplaryraisefiguredash} + \parbox[t]{0pt}{% + \code{\string\figuredash*} \\ + 3\figuredash*5, 81\figuredash*82, 485\figuredash*491 + } + \hspace{80pt} + \parbox[t]{0pt}{% + \code{\string\figuredash} \\ + 3\figuredash 5, 81\figuredash 82, 485\figuredash 491 + } +\end{quote} + +\noindent Starred form eats spaces? 44\figuredash* 55. + +\subsection{Multiplication Sign \capitaldash{} Times~``\texttimes''} + +\newlength{\exemplaryraisetimes} +\setlength{\exemplaryraisetimes}{.6667pt} +The problem with a too-low multiplication sign arises +for example with matrices of a given, specific size. + +\noindent Uncorrected + +\begin{quote} + \acronym{LR}-mode: 2\texttimes2-matrix, \(N\)\texttimes\(M\)-matrix \\ + Math-mode: \(2\times2\)-matrix, \(N\times M\)-matrix +\end{quote} + +\noindent and corrected + +\begin{quote} + \typogsetup{raisecapitalhyphen=\exemplaryraisecapitalhyphen, + raisecapitaltimes=\exemplaryraisetimes} + \acronym{LR}-mode: 2\capitaltimes2-matrix, \(N\)\capitaltimes\(M\)-matrix \\ + Math-mode: \(2\capitaltimes2\)-matrix, \(N\capitaltimes M\)-matrix. +\end{quote} + +\subsection{Guillemets} + +\newcommand*{\tschicholdi} + {Use single quotes for a first quotation.} +\newcommand*{\tschicholdii} + {Use double quotes for quotations within quotations.} + +\newcommand*{\frenchsinglequotes}[1]{\singleguillemetright #1\singleguillemetleft} +\newcommand*{\Frenchsinglequotes}[1]{\Singleguillemetright #1\Singleguillemetleft} +\newcommand*{\frenchdoublequotes}[1]{\doubleguillemetright #1\doubleguillemetleft} +\newcommand*{\Frenchdoublequotes}[1]{\Doubleguillemetright #1\Doubleguillemetleft} + +\newcommand*{\frenchsinglequotesFR}[1]{\singleguillemetleft\,\allowhyphenation#1\,\singleguillemetright} +\newcommand*{\FrenchsinglequotesFR}[1]{\Singleguillemetleft\,\allowhyphenation#1\,\Singleguillemetright} +\newcommand*{\frenchdoublequotesFR}[1]{\doubleguillemetleft\,\allowhyphenation#1\,\doubleguillemetright} +\newcommand*{\FrenchdoublequotesFR}[1]{\Doubleguillemetleft\,\allowhyphenation#1\,\Doubleguillemetright} + +\newlength{\exemplaryraiseguillemets} +\setlength{\exemplaryraiseguillemets}{.05em} +\newlength{\exemplaryraisecapitalguillemets} +\setlength{\exemplaryraisecapitalguillemets}{.1em} + +We again compare the default implementation with the adjusted one. + +\begin{quote} + \frenchsinglequotes{\tschicholdi} \\ + \frenchdoublequotes{\tschicholdii} \\ + \Frenchsinglequotes{1}, \Frenchsinglequotes{2}, \Frenchsinglequotes{3}. \\ + \Frenchdoublequotes{\letterspacecapitals{ABC}}, + \Frenchdoublequotes{\letterspacecapitals{MN}}, + \Frenchdoublequotes{\letterspacecapitals{XYZ}}. +\end{quote} + +\noindent Corrected by raising the glyphs by +\milliem{\exemplaryraiseguillemets} and +\milliem{\exemplaryraisecapitalguillemets}, respectively: + +\begin{quote} + \typogsetup{raiseguillemets=\exemplaryraiseguillemets, + raisecapitalguillemets=\exemplaryraisecapitalguillemets} + \frenchsinglequotes{\tschicholdi} \\ + \frenchdoublequotes{\tschicholdii} \\ + \Frenchsinglequotes{1}, \Frenchsinglequotes{2}, \Frenchsinglequotes{3}. \\ + \Frenchdoublequotes{\letterspacecapitals{ABC}}, + \Frenchdoublequotes{\letterspacecapitals{MN}}, + \Frenchdoublequotes{\letterspacecapitals{XYZ}}. +\end{quote} + +\noindent And the same using French typographic conventions: + +\begin{quote} + \typogsetup{raiseguillemets=\exemplaryraiseguillemets, + raisecapitalguillemets=\exemplaryraisecapitalguillemets} + \frenchsinglequotesFR{\tschicholdi} \\ + \frenchdoublequotesFR{\tschicholdii} \\ + \FrenchsinglequotesFR{1}, \FrenchsinglequotesFR{2}, \FrenchsinglequotesFR{3}. \\ + \FrenchdoublequotesFR{\letterspacecapitals{ABC}}, + \FrenchdoublequotesFR{\letterspacecapitals{MN}}, + \FrenchdoublequotesFR{\letterspacecapitals{XYZ}}. +\end{quote} + +\noindent Line-break behavior + +\begin{quote} + \setlength{\overfullrule}{0pt} + \typogsetup{raiseguillemets=\exemplaryraiseguillemets, + raisecapitalguillemets=\exemplaryraisecapitalguillemets} + + \newcommand*{\samplestring}{relation} + + \parbox[t]{0pt}{\frenchsinglequotes{\samplestring}} + \hspace{30pt} + \parbox[t]{0pt}{\Frenchsinglequotes{\samplestring}} + \hspace{30pt} + \parbox[t]{0pt}{\frenchdoublequotes{\samplestring}} + \hspace{30pt} + \parbox[t]{0pt}{\Frenchdoublequotes{\samplestring}} + + \smallskip + + \parbox[t]{0pt}{\frenchsinglequotesFR{\samplestring}} + \hspace{30pt} + \parbox[t]{0pt}{\FrenchsinglequotesFR{\samplestring}} + \hspace{30pt} + \parbox[t]{0pt}{\frenchdoublequotesFR{\samplestring}} + \hspace{30pt} + \parbox[t]{0pt}{\FrenchdoublequotesFR{\samplestring}} +\end{quote} + +\clearpage +\section{Align Last Line} + +\subsection{Last Line Ragged Left/Flush Right} + +\Cref{ex:lastlineraggedleftpar} is a typical use of environment~\code{lastlineraggedleftpar}: +A narrow paragraph gets typeset with full justification +and put \code{\string\flushright} against the right margin as a whole. + +The layout may look more coherent if the last lines is moved to the right margin, too. + +\begin{exemplary} + \flushright + \caption[Justified -- flushright] + {\begin{typoginspectpar}{justified-flushright}Typeset a justified paragraph flushright and let + macro~\code{\string\lastlineraggedleft} shift the last line + over to the right-hand side.\label{ex:lastlineraggedleftpar}\end{typoginspectpar}} + + \setlength{\examplewidth}{220pt} + \exampleparbox[lastlineraggedleftpar]{\lastlineraggedleftpar\texbookparfillskipsample} + + \centering + \texbookparfillskipsamplecredits + + \examplefontinformation +\end{exemplary} + +\subsection{Last Line Centered} + +The situation shown in \cref{ex:lastlinecenteredpar} is +more widespread than \cref{ex:lastlineraggedleftpar} +because centered tables and figures are quite common. +Their caption parboxes are centered too, +which is where a centered last line might fortify the layout. + +Another possible use of environment~\code{lastlinecenteredpar} are the final lines of chapters~-- +in particular if the chapters' ends are marked with centered dingbats. + +\begin{exemplary} + \centering + \caption[Typeset a justified paragraph that is centered.] + {\lastlinecenteredpar + Typeset a justified paragraph that is centered. + This very caption uses \code{lastlinecenteredpar} + to have its last line centered as well. + Moreover, we put a nifty asterisk centered at the bottom of the sample text. + \label{ex:lastlinecenteredpar}} + + \setlength{\examplewidth}{220pt} + \exampleparbox[lastlinecenteredpar]{\lastlinecenteredpar\texbookparfillskipsample} + + \medskip\(\ast\) + + \texbookparfillskipsamplecredits + + \examplefontinformation +\end{exemplary} + +\clearpage +\section{Fill Last Line} + +\newcommand*{\abcsample}{abcd efgh ijkl mnop qrst uvwx yz12 3456} + +\begin{exemplary} + \def\sness{2} + \def\exparindent{25pt} + \setlength{\examplewidth}{235pt} + + \centering + \caption[Plain paragraph vs.~\code{covernextindentpar}] + {Top example: Typeset a paragraph without correction of the last line. + Middle example: Paragraph corrected with \code{covernextindentpar}. + We set a \code{\string\parindent} of~\exparindent{} in both parboxes + and we \emph{must} increase the amount of glue in the paragraph + to reduce the penalty of stretching the last line under a \code{\string\fussy}~setting. + For the samples below, we have chosen \code{\string\slightlysloppy[\sness]}. + The \singlequotes{Alternative}, the bottom example, + shows the effect of \code{tightspacing}; + no extra sloppyness is required there.} + + \exampleparbox[covernextindentpar-reference]{% + \setlength{\parindent}{\exparindent}% + \slightlysloppy[\sness] + \texbookparfillskipsample{} \abcsample} + + \medskip + + \exampleparbox[covernextindentpar]{% + \setlength{\parindent}{\exparindent}% + \slightlysloppy[\sness] + \covernextindentpar + \texbookparfillskipsample{} \abcsample} + + \medskip + + Alternative\dots\hfill\smallskip + + \exampleparbox[covernextindentpar-tightspacing]{% + \setlength{\parindent}{\exparindent}% + \begin{tightspacing} + \texbookparfillskipsample{} \abcsample + \end{tightspacing}} + + \texbookparfillskipsamplecredits + + \examplefontinformation +\end{exemplary} + +\begin{exemplary} + \def\sness{2} + \def\exparindent{0pt} + \setlength{\examplewidth}{155pt} + + \centering + \caption[Plain paragraph vs.~\code{covernextindentpar} (narrow)] + {Same comparison as the previous example, + but for a small linewidth and zippo~\code{\string\parindent}. + The left-hand side sample is uncorrected, + the right-hand side features \code{\string\covernextindentpar}. + The sloppyness level is~\sness{} for both samples.} + + \exampleparbox[narrow-covernextindentpar-reference]{% + \setlength{\parindent}{\exparindent}% + \slightlysloppy[\sness] + \texbookparfillskipsample{} \abcsample} + \qquad + \exampleparbox[narrow-covernextindentpar]{% + \setlength{\parindent}{\exparindent}% + \slightlysloppy[\sness] + \covernextindentpar[30pt] + \texbookparfillskipsample{} \abcsample} + + \texbookparfillskipsamplecredits + + \examplefontinformation +\end{exemplary} + +\begin{exemplary} + \def\exparindent{10pt} + \setlength{\examplewidth}{233pt} + + \centering + \caption[Prevent full last line] + {Sample~1: Typeset a paragraph without correction of the last line. + Sample~2: Paragraph corrected with \code{\string\openlastlinepar}.~-- Disappointing! + Sample~3: Same using macro~\code{\string\prolongpar}. + Sample~4: Alternative solution that simply increases the tracking by + \generictextfraction{2}{1000}\,em with~\code{setfonttracking}. + Sample~5: Alternative solution that increases the spacing with + \code{loosespacing}.} + + \exampleparbox[openline-reference]{% + \setlength{\parindent}{\exparindent} + \texbookparfillskipsample{} \abcsample} + + \medskip + + \exampleparbox[openlastlinepar]{% + \setlength{\parindent}{\exparindent} + \openlastlinepar + \texbookparfillskipsample{} \abcsample} + + \medskip + + \exampleparbox[prolongpar]{% + \setlength{\parindent}{\exparindent} + \prolongpar + \texbookparfillskipsample{} \abcsample} + + \medskip + + Alternatives\dots\hfill\smallskip + + \exampleparbox[openline-tracking]{% + \setlength{\parindent}{\exparindent}% + \setfonttracking{2} + \texbookparfillskipsample{} \abcsample} + + \medskip + + \exampleparbox[openline-spacing]{% + \setlength{\parindent}{\exparindent}% + \begin{loosespacing} + \texbookparfillskipsample{} \abcsample + \end{loosespacing}} + + \texbookparfillskipsamplecredits + + \examplefontinformation +\end{exemplary} + +\clearpage +\section{Spacing} + +\subsection{Narrow\kernedslash Wide Space} + +The current font's parameters are shown in \cref{tab:fontdim}.\footnote{For a concise and +understandable explanation of the plethora of font parameters +consult \propername{David Carlisle's} excellent post on \propername{StackExchange}: +\href{https://tex.stackexchange.com/questions/88991/what-do-different-fontdimennum-mean}% + {What Do Different Fontdimennum Mean}.} + +\begin{table}[htp] + \centering + \caption{Important \code{\string\fontdimen} values of the current text font. + The middle column~(\#) states the number of the fontdimen.\bottomstrut} + \label{tab:fontdim} + + \begin{tabular}{@{}lll@{}} + \hline + \multicolumn{1}{@{}l|}{Name} & \multicolumn{1}{l|}{\#} & Value \\ + \hline + Interword space & 2 & \the\fontdimen2\font\topstrut \\ + Interword stretch & 3 & \the\fontdimen3\font \\ + Interword shrink & 4 & \the\fontdimen4\font \\ + Extra space & 7 & \the\fontdimen7\font + \end{tabular} +\end{table} + +\begin{center} + \setlength{\overfullrule}{0pt} + \newcommand*{\spacesampletext}[1]{some#1text#1with#1spaces\rule{0.1pt}{1em}} + \newsavebox{\narrowspacesample} + \sbox{\narrowspacesample}{\spacesampletext{\narrowspace}} + \newsavebox{\widespacesample} + \sbox{\widespacesample}{\spacesampletext{\widespace}} + + \begin{tabular}{@{}ll@{\qquad}l@{}} + Compare & \spacesampletext{\space} & default space, natural glue \\ + with & \usebox{\narrowspacesample} & \code{\string\narrowspace}, natural glue \\ + {} & \makebox[\wd\narrowspacesample][l]{\hbox to 0pt{\spacesampletext{\narrowspace}}} & + \code{\string\narrowspace}, tight box \\ + {} & \makebox[\wd\narrowspacesample][l]{\hbox spread 5pt{\spacesampletext{\narrowspace}}} & + \code{\string\narrowspace}, spread 5pt \\ + and again & \spacesampletext{\space} & default space, natural glue \\ + with & \usebox{\widespacesample} & \code{\string\widespace}, natural glue \\ + {} & \makebox[\wd\widespacesample][l]{\hbox to 0pt{\spacesampletext{\widespace}}} & + \code{\string\widespace}, tight box \\ + {} & \makebox[\wd\widespacesample][l]{\hbox spread 5pt{\spacesampletext{\widespace}}} & + \code{\string\widespace}, spread 5pt + \end{tabular} +\end{center} + +\noindent Starred form eats spaces? Narrow\narrowspace* Space. Wide\widespace* Space. + +\subsection{Looser\kernedslash*Tighter} + +\Cref{ex:spacing-i,ex:spacing-ii} show \code{tightspacing} and \code{loosespacing} at work. + +\begin{exemplary} + \newcommand*{\sness}{3} + \newcommand*{\tlevel}{1} + \centering + + \caption[Looser or tighter spacing -- sloppy] + {Both parboxes are typeset with \code{\string\slightlysloppy[\sness]}, + the left one with default spacing, + the right one with \code{tightspacing[\tlevel]}.\label{ex:spacing-i}} + + \exampleparbox[tightspacing-reference]{\slightlysloppy[\sness]\texbooktolerancesample} + \qquad + \exampleparbox[tightspacing]{\slightlysloppy[\sness]\tightspacing[\tlevel]\texbooktolerancesample} + + \texbooktolerancesamplecredits + + \examplefontinformation +\end{exemplary} + +\begin{exemplary} + \newcommand*{\sness}{3} + \newcommand*{\llevel}{2} + \centering + + \caption[Looser or tighter spacing -- sloppy] + {Both parboxes are typeset with \code{\string\slightlysloppy[\sness]}, + the left one with default spacing, + the right one with \code{loosespacing[\llevel]}.\label{ex:spacing-ii}} + + \exampleparbox[loosespacing-reference]{\slightlysloppy[\sness]\texbooktolerancesample} + \qquad + \exampleparbox[loosespacing]{\slightlysloppy[\sness]\loosespacing[\llevel]\texbooktolerancesample} + + \texbooktolerancesamplecredits + + \examplefontinformation +\end{exemplary} + +\clearpage +\section{Microtype Front\capitalhyphen End} + +\subsection{Tracking} + +\newcommand*{\trackingsampletext}{% + This sentence contains an explicit call to \code{\string\textls} + with an optional argument of \((+200)\) to \textls[200]{DEMONSTRATE} + that this macro still works inside of \code{setfonttracking}. + Apart from that it is just some more text to exercise the macro. + Well, the explicit letterspacing example is particularly ugly.} + +\begin{exemplary} + \renewcommand*{\examplepreset}{\microtypesetup{activate=true}} + \def\extratracking{7} + \centering + + \caption[Microtype: tracking] + {Use \packagename{microtype} to change the font tracking. + The sample on the left-hand side shows neutral tracking. + The one on the right-hand side received an extra tracking of + \generictextfraction{\extratracking}{1000}\,em.} + + \exampleparbox[microtype-tracking-reference]{% + \fussy + \noindent + \trackingsampletext} + \qquad + \exampleparbox[microtype-tracking-stretch]{% + \begin{setfonttracking}{\extratracking} + \fussy + \noindent + \trackingsampletext + \end{setfonttracking}} + + \examplefontinformation +\end{exemplary} + +\newcommand*{\trackingsamplefontchangetext}{% + {\rm RM} {\sf SF} {\rm RM} {\tt TT} {\rm RM}; + {\rm RM} {\it IT\/} {\rm RM}; + {\rm RM} {\sc SC} {\rm RM}. + {\rm Rm} {\sf Sf} {\rm Rm} {\tt Tt} {\rm Rm}; + {\rm Rm} {\it It\/} {\rm Rm}; + {\rm Rm} {\sc Sc} {\rm Rm}. + {\rm rm} {\sf sf} {\rm rm} {\tt tt} {\rm rm}; + {\rm rm} {\it it\/} {\rm rm}; + {\rm rm} {\sc sc} {\rm rm}.} + +\begin{exemplary} + \renewcommand*{\examplepreset}{\microtypesetup{activate=true}} + \def\extratracking{1} + \centering + + \caption[Microtype: tracking -- font changes] + {Check how font changes (serif, serif~italics, small-caps, sans~serif, typewriter) + interfere with the interword spacing. + The left sample has no tracking changes applied and serves as a reference, + whereas the right sample got an extra tracking of + \generictextfraction{\extratracking}{1000}\,em.\visualpar + The switch from and to typewriter, i.\,e., constant-width fonts + commonly is a source of spacing problems.} + + \exampleparbox[microtype-tracking-font-changes-reference]{\trackingsamplefontchangetext} + \qquad + \exampleparbox[microtype-tracking-font-changes-stretch]{% + \begin{setfonttracking}{\extratracking} + \trackingsamplefontchangetext + \end{setfonttracking}} +\end{exemplary} + +\noindent +No contents: \leftmarker +\begin{setfonttracking}{0} +\end{setfonttracking}\rightmarker. + +\subsection{Font Expansion} + +\newcommand*{\expansionsample} + {By default, all characters of a font are allowed to be stretched or + shrunk by the same amount. However, it is also possible to limit + the expansion of certain characters if they are more sensitive to + deformation. + This is the purpose of the \code{\string\SetExpansion}~command.} + +\begin{exemplary} + \setlength{\examplewidth}{250pt} + \renewcommand*{\examplepreset}{\microtypesetup{activate=true}} + \renewcommand*{\examplesetup}{\frenchspacing\small\fussy} + + \centering + + \caption[Microtype: font expansion] + {Use \packagename{microtype} to stretch or shrink a font. + The top sample uses \code{\string\setfontshrink} at level~3, + the middle sample is the unchanged reference + (which is allowed to shrink and expand), + and the bottom sample utilizes \code{\string\setfontstretch} at level~2.} + + \exampleparbox[microtype-expansion-shrink]{% + \begin{setfontshrink}[3] + \noindent\expansionsample + \end{setfontshrink}} + + \medskip + + \exampleparbox[microtype-expansion-neutral]{% + \begin{setfontexpand}[0] + \noindent\expansionsample + \end{setfontexpand}} + + \medskip + + \exampleparbox[microtype-expansion-stretch]{% + \begin{setfontstretch}[2] + \noindent\expansionsample + \end{setfontstretch}} + + \examplefontinformation +\end{exemplary} + +\noindent +No contents -- \code{setfontshrink}: \leftmarker +\begin{setfontshrink} +\end{setfontshrink}\rightmarker. + +\noindent +No contents -- \code{setfontstretch}: \leftmarker +\begin{setfontstretch} +\end{setfontstretch}\rightmarker. + +\noindent +No contents -- \code{setfontexpand}: \leftmarker +\begin{setfontexpand} +\end{setfontexpand}\rightmarker. + +\noindent +No contents -- \code{nofontexpansion}: \leftmarker +\begin{nofontexpansion} +\end{nofontexpansion}\rightmarker. + +\subsection{Character Protrusion} + +\newcommand*{\zerodepthrule} + {\raisebox{0pt}[0pt][0pt]{\rule[-4.5\baselineskip]{.1pt}{4.25\baselineskip}}} + +\newcommand*{\protrusionsampletext}{% + \noindent + \zerodepthrule\hfill\zerodepthrule \\ + 1\hfill 1 \\ + .2\hfill 2. \\ + --3\hfill 3-- \\ + ---4\hfill 4---} + +\begin{exemplary} + \renewcommand*{\examplepreset}{\microtypesetup{activate=true}} + \renewcommand*{\examplesetup}{\frenchspacing\small\fussy} + + \centering + + \caption[Microtype: protrusion] + {Comparison of the \packagename{microtype} feature ``protrusion'' (left-hand side) + and \code{nocharprotrusion} (right-hand side).} + + \exampleparbox[microtype-protrusion-reference]{% + \microtypesetup{protrusion=true} + \protrusionsampletext} + \qquad + \exampleparbox[microtype-protrusion-off]{% + \microtypesetup{protrusion=true} + \nocharprotrusion + \protrusionsampletext} + + \medskip +\end{exemplary} + +\noindent +No contents -- \code{nocharprotrusion}: \leftmarker +\begin{nocharprotrusion} +\end{nocharprotrusion}\rightmarker. + +\clearpage +\section{Sloppy Paragraphs} + +\Cref{ex:slightlysloppy-1,ex:slightlysloppy-2} put different amounts of ``sloppiness'' face to face. + +\begin{exemplary} + \setlength{\examplewidth}{180pt} + \def\sness{1} + \centering + \caption[Paragraphs typeset slightly sloppy~1] + {Paragraphs typeset slightly sloppy: \code{\string\slightlysloppy} vs.~\code{\string\fussy}. + The left parbox is typeset with \code{\string\slightlysloppy} + and \(\metavar{sloppiness} = \sness\), whereas the right sample + features the well known \code{\string\fussy} setting. + Both parboxes have a width of \the\examplewidth.\label{ex:slightlysloppy-1}} + + \exampleparbox[fussy-vs-slightlysloppy]{\slightlysloppy[\sness]\texbooktolerancesample} + \qquad + \exampleparbox[fussy-vs-slightlysloppy-reference]{\fussy\texbooktolerancesample} + + \texbooktolerancesamplecredits + + \examplefontinformation +\end{exemplary} + +\begin{exemplary} + \setlength{\examplewidth}{150pt} + \def\sness{2} + \centering + \caption[Paragraphs typeset slightly sloppy~2] + {Paragraphs typeset slightly sloppy: \code{\string\slightlysloppy} vs.~\code{\string\sloppy}. + The left sample is features \code{\string\slightlysloppy} with \(\metavar{sloppiness} = \sness\), + the right sample is typeset with \code{\string\sloppy}. + Both parboxes have a width of \the\examplewidth.\label{ex:slightlysloppy-2}} + + \exampleparbox[sloppy-vs-slightlysloppy]{\slightlysloppy[\sness]\texbooktolerancesample} + \qquad + \exampleparbox[sloppy-vs-slightlysloppy-reference]{\sloppy\texbooktolerancesample} + + \texbooktolerancesamplecredits + + \examplefontinformation +\end{exemplary} + +In conclusion all renderings of the text in +\cref{ex:slightlysloppy-1} and \cref{ex:slightlysloppy-2} +have their merits and their own flaws. + +\clearpage +\section{Vertically Partially-Tied Paragraphs} + +\paragraph{\code{vtietoppar}}\leavevmode\par + +\begin{typoginspect}{vtietoppar} + \clubpenalty=150 + \begin{vtietoppar}[2] + After breaking a paragraph into lines, \TeX{} computes the interline + penalties by adding the values of: \code{\string\clubpenalty} after + the first line of a paragraph.\footnote{Footnote of \code{vtietoppar}.} + \eTeX{} generalizes the concept of interline, club, widow, and display widow penalty + by allowing their replacement by arrays of penalty values. + \end{vtietoppar} +\end{typoginspect} + +\paragraph{\code{vtiebotpar}}\leavevmode\par + +\begin{typoginspect}{vtiebotpar} + \widowpenalty=150 + \begin{vtiebotpar}[2] + After breaking a paragraph into lines, \TeX{} computes the interline + penalties by adding the values of: \code{\string\widowpenalty} + before the last line of the paragraph.\marginpar{A float!} + \eTeX{} generalizes the concept of interline, club, widow, and display widow penalty + by allowing their replacement by arrays of penalty values. + \end{vtiebotpar} +\end{typoginspect} + +\paragraph{\code{vtiebotdisp}}\leavevmode\par + +\begin{typoginspect}[tracingboxes]{vtiebotdisp} + \displaywidowpenalty=150 + \begin{vtiebotdisp}[2] + After breaking a paragraph into lines, \TeX{} computes the interline + penalties by adding the values of: \code{\string\displaywidowpenalty} + before the line immediately preceding a displayed equation. + \eTeX{} generalizes the concept of interline, club, widow, and display widow penalty + by allowing their replacement by arrays of penalty values. + \[g H = H g \quad \text{for all} \enspace g \in G.\] + \end{vtiebotdisp} + + Follow-up paragraph after and outside of the \code{vtiebotdisp}-environment. +\end{typoginspect} + +\paragraph{\code{vtiebotdisptoppar}}\leavevmode\par + +\begin{typoginspect}{vtiebotdisptoppar} + \displaywidowpenalty=150 + \begin{vtiebotdisptoppar}[2] + After breaking a paragraph into lines, \TeX{} computes the interline + penalties by adding the values of: \code{\string\displaywidowpenalty} + before the line immediately preceding a displayed equation. + \eTeX{} generalizes the concept of interline, club, widow, and display widow penalty + by allowing their replacement by arrays of penalty values. + \begin{breakabledisplay} + \begin{displaymath} + g H = H g \quad \text{for all} \enspace g \in G. + \end{displaymath} + \end{breakabledisplay} + + In this example we need a paragraph that follows the displayed math. + So, we have to type some more text here + to be able to demonstrate the action of the environment. + \end{vtiebotdisptoppar} +\end{typoginspect} + +\clearpage +\section{Breakable Displayed Equations} + +\newcommand*{\binaryminus}{\mathbin{-}} +\newcommand*{\diracadj}[1]{\overline{#1}} +\newcommand*{\unaryminus}{{-}} + +\begin{typoginspect}{breakabledisplay} + \begin{breakabledisplay} + \begin{align*} + \diracadj{\psi}(x) \mathop{\partial_\mu} \psi(x) + \mapsto \diracadj{\psi'}(x) \mathop{\partial_\mu} \psi'(x) + &= e^{i \alpha(x)} \diracadj{\psi}(x) \mathop{\partial_\mu} \bigl( e^{\unaryminus i \alpha(x)} \psi(x) \bigr) \\ + &= \underbrace{\diracadj{\psi}(x) \mathop{\partial_\mu} \psi(x)}_{\text{free particle}} + \mskip\medmuskip \binaryminus \mskip\medmuskip i \, \diracadj{\psi}(x) + \underbrace{\mathop{\partial_\mu} \bigl( \alpha(x) \bigr)}_{\mathclap{\text{vector field}}} \psi(x). + \end{align*} + \end{breakabledisplay} +\end{typoginspect} + +\clearpage +\section{\packagename{Setspace} Front-End} + +\fontsizeinfo{defaultsize} +Current settings are \defaultsize{} +and \code{\string\typogfontsize} is \the\typogfontsize. + +\newcommand*{\absbls}{12pt plus 1pt minus .5pt} +\paragraph{\code{\string\setbaselineskip\{\absbls\}}} +\resetbaselineskip +\setbaselineskip{10pt + 2.75pt}% addition +\setbaselineskip{10.5pt * 100 / 105}% scaling +\setbaselineskip{11.8pt * 85 / 100}% scaling +\setbaselineskip{\absbls} +\fontsizeinfo{baselinesetsize} +New settings: \baselinesetsize. + +\texbookbaselineskipsample + +\newcommand*{\relbls}{130} +\paragraph{\code{\string\setbaselineskippercentage\{\relbls\}}} +\setbaselineskippercentage{1 + 2 + .3333 * 100 + 100 * 0.6667}% float expression +\setbaselineskippercentage{\relbls} +\fontsizeinfo{baselinesetsize} +New settings: \baselinesetsize. + +\texbookbaselineskipsample + +\newcommand*{\absled}{1.5pt} +\paragraph{\code{\string\setleading\{\absled\}}} +\setleading{1pt / -2.0}% negative leading +\setleading{\absled} +\fontsizeinfo{baselinesetsize} +New settings: \baselinesetsize. + +\texbookbaselineskipsample + +\newcommand*{\relled}{30} +\paragraph{\code{\string\setleadingpercentage\{\relled\}}} +\setleadingpercentage{10 - 25 / 2}% negative leading +\setleadingpercentage{\relled} +\fontsizeinfo{baselinesetsize} +New settings: \baselinesetsize. + +\texbookbaselineskipsample + +\medskip + +\setstretch{1} +\texbookbaselineskipsamplecredits + +\clearpage +\section{Smooth Ragged} + +\begin{exemplary} + \newcommand*{\ragwidth}{10pt} + \centering + \caption[Comparison of ragged right typesetting] + {Comparison of ragged right typesetting. + The first example uses \code{RaggedRight} of \packagename{ragged2e} + the second \code{smoothraggedrightpar} of \packagename{typog}. + Both examples share a \code{\string\fussy}~setting and + a \ragwidth~wide ragged right margin.\label{ex:smoothraggedright}} + + \setlength{\RaggedRightRightskip}{0pt plus \ragwidth} + + %\def\smoothraggedrightgenerator{quintuplet} + %\def\smoothraggedrightgenerator{septuplet} + \setlength{\smoothraggedrightragwidth}{\ragwidth} + %\def\smoothraggedrightfuzzfactor{.667} + + \iffalse + \begin{quote} + \begin{RaggedRight}\examplesetup + \texbookparshapeskipsample + \end{RaggedRight} + \end{quote} + + \begin{quote} + \begin{smoothraggedrightpar}\examplesetup + \texbookparshapeskipsample + \end{smoothraggedrightpar} + \end{quote} + \else + \exampleparbox[RaggedRight-reference]{\RaggedRight\texbooktolerancesample} + \qquad + \exampleparbox[smoothraggedrightpar]{\smoothraggedrightpar\texbooktolerancesample} + \fi + + \texbookparshapeskipsamplecredits + + \examplefontinformation +\end{exemplary} + + %--\setlength{\smoothraggedrightparindent}{25pt} + %--\setlength{\parindent}{0pt} + +\noindent +\code{\string\parindent}=\the\parindent, +visually: \rule{.1pt}{.8em}\kern\parindent\rule{.1pt}{.8em}; + +\noindent +\code{\string\smoothraggedrightleftskip}=\the\smoothraggedrightleftskip. +\code{\string\smoothraggedrightparindent}=\the\smoothraggedrightparindent. +\smallskip + +{ + %--\setlength{\smoothraggedrightragwidth}{8pt} + \begin{smoothraggedright} + \texbooktolerancesample + + \texbooktolerancesample + \end{smoothraggedright} +} + +\medskip + +{ + \setlength{\smoothraggedrightragwidth}{15pt} + + \newcommand*{\definitionnilpotent}{% + Eine Abbildung oder ein Operator~\(A\) + heißen nilpotent vom Grad~\(k\), falls \(k \in N\) + die kleinste Zahl ist, für die gilt: \(A^k = 0\).} + + \begin{otherlanguage}{german} + \parbox[t]{60pt}{\fussy\RaggedRight\definitionnilpotent} + \hspace{40pt} + \parbox[t]{60pt}{\fussy\smoothraggedright\definitionnilpotent} + \end{otherlanguage} +} + +\clearpage +\begin{RaggedRight} + \begin{thebibliography}{0} + \bibitem{knuth:1986} + \bibauthor{Knuth, D.~E.}, + \bibtitle{The \TeX{}book}, + Vol.~A of Computers\&Typesetting, + Addison Wesley, Reading\kernedslash*MA, + 1986. + \end{thebibliography} +\end{RaggedRight} +\end{document} +\endinput +%% +%% End of file `typog-example.tex'. diff --git a/Master/texmf-dist/doc/latex/typog/typog-grep.1.pdf b/Master/texmf-dist/doc/latex/typog/typog-grep.1.pdf Binary files differnew file mode 100644 index 00000000000..09647860d5d --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/typog-grep.1.pdf diff --git a/Master/texmf-dist/doc/latex/typog/typog-grep.pod b/Master/texmf-dist/doc/latex/typog/typog-grep.pod new file mode 100644 index 00000000000..83f4f11f474 --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/typog-grep.pod @@ -0,0 +1,345 @@ +=begin man + +.\" Turn off justification. +.na + +=end man + +=head1 NAME + +typog-grep - grep for typog-inspect elements in LaTeX log files + +=head1 SYNOPSIS + +=over + +=item B<typog-grep> -a|--all|--any [I<OPTION>...] F<LOG-FILE>... + +=item B<typog-grep> [I<OPTION>...] I<REGEXP> F<LOG-FILE>... + +=back + +The first form shows all C<E<lt>typog-inspect id="I<ID>" ...E<gt>> elements in F<LOG-FILE>. + +The second form shows the contents of C<E<lt>typog-inspect id="I<ID>" ...E<gt>> elements +whose I<ID>s match I<REGEXP> in F<LOG-FILE>. + +If no F<LOG-FILE> is given read from F<stdin>. +The S<filename C<->> is synonymous to F<stdin>. + +=head1 DESCRIPTION + +B<typog-grep> is a tailored post-processor for LaTeX log files +and the C<typoginspect> environment as provided by S<package typog>. +It shares more with the venerable +L<B<sgrep>|https://www.cs.helsinki.fi/u/jjaakkol/sgrep.html> +than with S<POSIX L<B<grep>|https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html>>. + +The LaTeX user brackets her text in + + \begin{typoginspect}{ID} + Text and code to investigate + \end{typoginspect} + +where I<ID> is used to identify one or more bracketed snippets. +I<ID> does not have to be unique. +The I<REGEXP> mechanism makes it easy to select groups of related I<ID>s +if they are named accordingly. + +In F<LOG-FILE> the environment shows up, packed with tracing information, as + +=begin texinfo + +@display +@relax + +=end texinfo + + <typog-inspect id="ID" job="JOB-NAME" line="LINE-NUMBER" page="PAGE-NUMBER"> + Trace Data + </typog-inspect> + +=begin texinfo + +@end display +@relax + +=end texinfo + +where all the capital-letter sequences are meta-variables +and in particular +I<JOB-NAME> is the expansion of C<\jobname>, +I<LINE-NUMBER> is the LaTeX source file line number +of the beginning of the C<typoginspect> environment, +and I<PAGE-NUMBER> is the page where +the output of S<C<Text and code to investigate>> occurs. + +B<typog-grep> reveals the contents of F<LOG-FILE> +between C<E<lt>typog-inspect id="I<ID>" ...E<gt>> +and C<E<lt>/typog-inspectE<gt>> excluding the XML-tags. +Access the I<JOB-NAME>, I<LINE-NUMBER>, and I<PAGE-NUMBER> +with the commandline options +B<--job-name>, B<--line-number>, and B<--page-number>, respectively. +Use B<--id> to show the name of the IDs that matched I<REGEXP>. + +C<typoginspect> environments can be nested. +B<typog-grep> respects the nesting, +i.e., if the I<ID> of the nested environment does not match I<REGEXP> +it will not be included in the program's output. + +=head1 OPTIONS + +The list of options is sorted by the names of the long options. + +=over 4 + +=item B<-a>, B<--all>, B<--any> + +ID-discovery mode: +Show all C<typog-inspect> elements independent of any matching patterns. + +=item B<--color>, B<colour> I<WHEN> + +Colorize specific log contents for the matching ids. +The S<argument I<WHEN>> determines when to apply color: +C<always>, C<never>, S<or C<auto>>. +The setting C<auto> checks whether standard output has been redirected. +This is the default. + +=item B<-C>, B<--config> I<KEY>=I<VALUE>[:I<KEY>=I<VALUE>[:...]] + +Set one or more configuration I<KEY> to I<VALUE> pairs. +See S<Sec. CONFIGURATION> below for a description of all available configuration items. +Use option B<--show-config> to display the default configuration. + +=item B<--debug> + +Turn on debug output on F<stderr>. + +=item B<-h>, B<--help> + +Display brief help then exit. + +=item B<-i>, B<--[no-]id> + +Print the actual id name that matched I<REGEXP>. +Control the appearance of the matching id with configuration S<item C<id-heading>>. + +=item B<-y>, B<--[no-]ignore-case> + +Match ids while ignoring case distinctions in patterns and data. + +=item B<-j>, B<--[no-]job-name> + +Print the C<\jobname> that B<tex> associated with the input file. + +=item B<-n>, B<--[no-]line-number> + +Print the line number where the S<C<typoginspect> environment> +was encountered in the LaTeX source file. + +=item B<-N>, B<--[no-]log-line-number> + +Print the line number of the F<log>-file where the current line was encountered. + +=item B<-p>, B<--[no-]page-number> + +Print page number where the contents of the S<C<typoginspect> environment> +starts in the typeset document. + +=item B<-P>, B<--[no-]pager> + +Redirect output from F<stdout> to the configured pager. + +=item B<--show-config> + +Show the default configuration and exit. + +=item B<-V>, B<--version> + +Show version information and exit. + +=item B<-w>, B<--[no-]word-regexp> + +Match only whole words. + +=back + +=head1 CONFIGURATION + +=over 4 + +=item C<id-format>=I<FORMAT> + +Control the I<FORMAT> for printing matching ids in inline-mode, +where I<FORMAT> is passed to Perl's C<printf>. +S<Default: C<%s:>.> + +=item C<id-heading>=C<0>E<verbar>C<1> + +Choose between printing the matching ids with S<option B<--id>>: +S<Inline (C<0>)> or heading before the matching data (C<1>). +S<Default: C<0>.> + +=item C<id-heading-format>=I<FORMAT> + +Control the I<FORMAT> for printing matching ids in heading-mode, +where I<FORMAT> is passed to Perl's C<printf>. +S<Default: C<--E<gt> %s E<lt>-->.> + +=item C<id-indent>=I<INDENT> + +Indentation of nested typog-inspect tags. +Only used in ``discovery'' mode (first form), i.e., if B<--all> is active. +S<Default: 8.> + +=item C<id-max-length>=I<MAXIMUM-LENGTH> + +Set the maximum length of a matching id for printing. +It a matching id exceeds this length it will be truncated +and the last three characters (short of I<MAXIMUM-LENGTH>) will be replaced by dots. +S<Default: 40.> + +=item C<line-number-format>=I<FORMAT> + +Control the I<FORMAT> for printing TeX source line numbers, +where I<FORMAT> is passed to Perl's C<printf>. +S<Default: C<%5d>.> + +=item C<log-line-number-format>=I<FORMAT> + +Control the I<FORMAT> for printing log line numbers, +where I<FORMAT> is passed to Perl's C<printf>. +S<Default: C<%6d>.> + +=item C<page-number-format>=I<FORMAT> + +Control the I<FORMAT> for printing page numbers, +where I<FORMAT> is passed to Perl's C<printf>. +S<Default: C<[%3d]>.> + +=item C<pager>=I<PAGER> + +Name of pager application to pipe output into +if run with S<option B<--pager>>. +S<Default: C<less>>. + +=item C<pager-flags>=I<FLAGS> + +Pass I<FLAGS> to I<PAGER>. +S<Default: C<--quit-if-one-screen>>. + +=item Color Configuration + +For the syntax of the color specifications consult +the manual page of Term::ANSIColor(pm). + +=over 4 + +=item C<file-header-color> + +Color of the filename header. + +=item C<fill-state-color> + +Color of the messages that report ``Underfull hbox'' or ``Overfull hbox''. + +=item C<first-vbox-color> + +Color of the first vbox on a page. + +=item C<font-spec-color> + +Color of font specifications. + +=item C<horizontal-break-candidate-color> + +Color of lines with horizontal-breakpoint S<candidates C<@>>. + +=item C<horizontal-breakpoint-color> + +Color of lines with horizontal S<breakpoints C<@@>>. + +=item C<id-color> + +Color of matching ids when printed inline. + +=item C<id-heading-color> + +Color of matching ids when printed in heading form. + +=item C<line-break-pass-color> + +Color of the lines showing which pass (e.g., C<@firstpass>) +of the line-breaking algorithm is active. + +=item C<line-number-color> + +Color of TeX-source-file line numbers. + +=item C<log-line-number-color> + +Color of log-file line numbers. + +=item C<math-color> + +Color used for math expressions including their font specs. + +=item C<page-number-color> + +Color of page numbers of the final output. + +=item C<tightness-color> + +Color of lines with Tight/Loose hbox reports. + +=item C<vertical-breakpoint-color> + +Color of possible vertical breakpoints. + +=back + +=back + +=head2 Brief summary of colors and attributes + +=over 4 + +=item Foreground Color + +C<black>, C<red>, C<green>, C<yellow>, +C<blue>, C<magenta>, C<cyan>, C<white>, + +Prefix with C<bright_> for high-intensity or bold foreground. + +=item Foreground Grey + +C<grey0>, ..., C<grey23> + +=item Background Color + +C<on_black>, C<on_red>, C<on_green>, C<on_yellow>, +S<C<on_blue>>, S<C<on_magenta>>, S<C<on_cyan>>, S<C<on_white>> + +Replace C<on_> with C<on_bright_> for high-intensity or bold background. + +=item Background Grey + +C<on_grey0>, ..., C<on_grey23> + +=item Text Attribute + +C<bold>, C<dark>, C<italic>, C<underline>, C<reverse> + +=back + +=head1 EXIT STATUS + +The exit status is 0 if at least one I<ID> matched I<REGEXP>, +1 if no I<ID> matched I<REGEXP>, and 2 if an error occurred. + +=head1 SEE ALSO + +B<grep>(1), B<printf>(3), B<Term::ANSIColor>(pm) + +=cut diff --git a/Master/texmf-dist/doc/latex/typog/typog-nomt.tex b/Master/texmf-dist/doc/latex/typog/typog-nomt.tex new file mode 100644 index 00000000000..ebac4efd1f7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/typog-nomt.tex @@ -0,0 +1,73 @@ +%% +%% This is file `typog-nomt.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% typog.dtx (with options: `nomicrotype') +%% +%% This is a generated file. +%% +%% Copyright (C) 2024 by Ch. L. Spiel +%% +%% This work may be distributed and/or modified under the conditions +%% of the LaTeX Project Public License, either version 1.3 of this +%% license or (at your option) any later version. The latest version +%% of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Ch. L. Spiel. +%% +%% This work consists of the files typog.dtx and typog.ins +%% and the derived files typog.sty, slant-angle.mp, +%% crooked-paragraphs.mp, smooth-parshapes.mp, title.mp, +%% typog-example.tex, typog-nomt.tex, typog-grep.pl, +%% typog-grep.pod, and teximan2latex.sed. +%% +%% +\documentclass[]{article} + +\usepackage[english]{babel} + +\usepackage{csquotes} +\DeclareQuoteStyle{typog-guillemets} + {\doubleguillemetright} + {\doubleguillemetleft} + {\singleguillemetright} + {\singleguillemetleft} + +\usepackage[]{typog} + +\newcommand*{\packagename}[1]{\mbox{\textsf{#1}}} + +\begin{document} +\begin{center} + \Huge\bf\sf + TypoG Examples \\ + without Package~\packagename{microtype} +\end{center} + +\bigskip + +\noindent +This example \LaTeX-document uses package~\packagename{typog} +\emph{without} package~\packagename{microtype}. + +We want \packagename{typog} to be as usable as possible even without +the nice features that \packagename{microtype} offers. +After all \packagename{typog} is just a front-end for it. + +As we are testing a special configuration here anyhow, +we hook up our quotes with package~csquotes +to check whether they interact ok. +{\setquotestyle{typog-guillemets}% + \enquote{This is the outer part of the phrase + which contains the \enquote{inner part}.}} +\end{document} +\endinput +%% +%% End of file `typog-nomt.tex'. diff --git a/Master/texmf-dist/doc/latex/typog/typog.ist b/Master/texmf-dist/doc/latex/typog/typog.ist new file mode 100644 index 00000000000..9b8104b16c0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/typog.ist @@ -0,0 +1,41 @@ +%% +%% This is file `typog.ist', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% typog.dtx (with options: `index-style') +%% +%% This is a generated file. +%% +%% Copyright (C) 2024 by Ch. L. Spiel +%% +%% This work may be distributed and/or modified under the conditions +%% of the LaTeX Project Public License, either version 1.3 of this +%% license or (at your option) any later version. The latest version +%% of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Ch. L. Spiel. +%% +%% This work consists of the files typog.dtx and typog.ins +%% and the derived files typog.sty, slant-angle.mp, +%% crooked-paragraphs.mp, smooth-parshapes.mp, title.mp, +%% typog-example.tex, typog-nomt.tex, typog-grep.pl, +%% typog-grep.pod, and teximan2latex.sed. +%% +%% +actual '=' +delim_r "\\figuredash*" +heading_prefix "\\pagebreak[3]\\smallskip\n\n{\\sffamily\\bfseries\\large " +heading_suffix "}\\nopagebreak\n" +headings_flag 1 +level '>' +quote '!' +\endinput +%% +%% End of file `typog.ist'. diff --git a/Master/texmf-dist/doc/latex/typog/typog.pdf b/Master/texmf-dist/doc/latex/typog/typog.pdf Binary files differnew file mode 100644 index 00000000000..9d00685045a --- /dev/null +++ b/Master/texmf-dist/doc/latex/typog/typog.pdf |