| 1 |
%% |
| 2 |
%% This is file `smooth-parshapes.mp', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% typog.dtx (with options: `smoothparshapes') |
| 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 |
prologues := 3; |
| 35 |
|
| 36 |
def draw_filled_rectangle(expr lower_left, upper_right, color) = |
| 37 |
fill lower_left -- (xpart upper_right, ypart lower_left) -- |
| 38 |
upper_right -- (xpart lower_left, ypart upper_right) -- |
| 39 |
cycle |
| 40 |
withcolor color; |
| 41 |
enddef; |
| 42 |
|
| 43 |
u := 100; |
| 44 |
|
| 45 |
em := 10; |
| 46 |
linelength := 2u; |
| 47 |
baselineskip := 1.2em; |
| 48 |
parskip := 3; |
| 49 |
parindent := 2.5em; |
| 50 |
ragwidth := 2em; |
| 51 |
|
| 52 |
cmykcolor line_color; |
| 53 |
line_color := (.08, 0, 0, .18); % cold silver |
| 54 |
|
| 55 |
color customred[]; |
| 56 |
customred[1] := (.890, .282, .282); |
| 57 |
customred[2] := (.831, .110, .110); |
| 58 |
customred[3] := (.686, .043, .043); |
| 59 |
customred[4] := (.569, .000, .000); |
| 60 |
customred[5] := (.420, .000, .000); |
| 61 |
|
| 62 |
color margin_color; |
| 63 |
margin_color := customred[2]; |
| 64 |
|
| 65 |
beginfig(1); % triplet |
| 66 |
y := 0; |
| 67 |
draw_filled_rectangle((0, y), (linelength - ragwidth, y + 1em), line_color); % (1) |
| 68 |
y := y - baselineskip; |
| 69 |
draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); % (3) |
| 70 |
y := y - baselineskip; |
| 71 |
draw_filled_rectangle((0, y), (linelength - ragwidth/2, y + 1em), line_color); % (2) |
| 72 |
y := y - baselineskip; |
| 73 |
draw_filled_rectangle((0, y), (linelength - ragwidth, y + 1em), line_color); % (1) |
| 74 |
y := y - baselineskip; |
| 75 |
draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); % (3) |
| 76 |
y := y - baselineskip; |
| 77 |
draw_filled_rectangle((0, y), (linelength - ragwidth/2, y + 1em), line_color); % (2) |
| 78 |
|
| 79 |
draw_filled_rectangle((-.667em, 1em), (-.333em, -5baselineskip), margin_color); |
| 80 |
draw_filled_rectangle((linelength + .333em, 1em), (linelength + .667em, -5baselineskip), margin_color); |
| 81 |
endfig; |
| 82 |
|
| 83 |
beginfig(2); % quintuplet |
| 84 |
y := 0; |
| 85 |
draw_filled_rectangle((0, y), (linelength - .75ragwidth, y + 1em), line_color); % (2) |
| 86 |
y := y - baselineskip; |
| 87 |
draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); % (5) |
| 88 |
y := y - baselineskip; |
| 89 |
draw_filled_rectangle((0, y), (linelength - .5ragwidth, y + 1em), line_color); % (3) |
| 90 |
y := y - baselineskip; |
| 91 |
draw_filled_rectangle((0, y), (linelength - .25ragwidth, y + 1em), line_color); % (4) |
| 92 |
y := y - baselineskip; |
| 93 |
draw_filled_rectangle((0, y), (linelength - ragwidth, y + 1em), line_color); % (1) |
| 94 |
y := y - baselineskip; |
| 95 |
draw_filled_rectangle((0, y), (linelength - .75ragwidth, y + 1em), line_color); % (2) |
| 96 |
y := y - baselineskip; |
| 97 |
draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); % (5) |
| 98 |
y := y - baselineskip; |
| 99 |
draw_filled_rectangle((0, y), (linelength - .5ragwidth, y + 1em), line_color); % (3) |
| 100 |
y := y - baselineskip; |
| 101 |
draw_filled_rectangle((0, y), (linelength - .25ragwidth, y + 1em), line_color); % (4) |
| 102 |
y := y - baselineskip; |
| 103 |
draw_filled_rectangle((0, y), (linelength - ragwidth, y + 1em), line_color); % (1) |
| 104 |
|
| 105 |
draw_filled_rectangle((-.667em, 1em), (-.333em, -9baselineskip), margin_color); |
| 106 |
draw_filled_rectangle((linelength + .333em, 1em), (linelength + .667em, -9baselineskip), margin_color); |
| 107 |
endfig; |
| 108 |
|
| 109 |
beginfig(3); % septuplet |
| 110 |
y := 0; |
| 111 |
draw_filled_rectangle((0, y), (linelength - .6667ragwidth, y + 1em), line_color); % (3) |
| 112 |
y := y - baselineskip; |
| 113 |
draw_filled_rectangle((0, y), (linelength - .1667ragwidth, y + 1em), line_color); % (6) |
| 114 |
y := y - baselineskip; |
| 115 |
draw_filled_rectangle((0, y), (linelength - ragwidth, y + 1em), line_color); % (1) |
| 116 |
y := y - baselineskip; |
| 117 |
draw_filled_rectangle((0, y), (linelength - .3333ragwidth, y + 1em), line_color); % (5) |
| 118 |
y := y - baselineskip; |
| 119 |
draw_filled_rectangle((0, y), (linelength - .8333ragwidth, y + 1em), line_color); % (2) |
| 120 |
y := y - baselineskip; |
| 121 |
draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); % (7) |
| 122 |
y := y - baselineskip; |
| 123 |
draw_filled_rectangle((0, y), (linelength - .5ragwidth, y + 1em), line_color); % (4) |
| 124 |
y := y - baselineskip; |
| 125 |
draw_filled_rectangle((0, y), (linelength - .6667ragwidth, y + 1em), line_color); % (3) |
| 126 |
y := y - baselineskip; |
| 127 |
draw_filled_rectangle((0, y), (linelength - .1667ragwidth, y + 1em), line_color); % (6) |
| 128 |
y := y - baselineskip; |
| 129 |
draw_filled_rectangle((0, y), (linelength - ragwidth, y + 1em), line_color); % (1) |
| 130 |
y := y - baselineskip; |
| 131 |
draw_filled_rectangle((0, y), (linelength - .3333ragwidth, y + 1em), line_color); % (5) |
| 132 |
y := y - baselineskip; |
| 133 |
draw_filled_rectangle((0, y), (linelength - .8333ragwidth, y + 1em), line_color); % (2) |
| 134 |
y := y - baselineskip; |
| 135 |
draw_filled_rectangle((0, y), (linelength, y + 1em), line_color); % (7) |
| 136 |
y := y - baselineskip; |
| 137 |
draw_filled_rectangle((0, y), (linelength - .5ragwidth, y + 1em), line_color); % (4) |
| 138 |
|
| 139 |
draw_filled_rectangle((-.667em, 1em), (-.333em, -13baselineskip), margin_color); |
| 140 |
draw_filled_rectangle((linelength + .333em, 1em), (linelength + .667em, -13baselineskip), margin_color); |
| 141 |
endfig; |
| 142 |
end |