summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/typog/smooth-parshapes.mp
blob: dcf66fd052744873bbe181aa6c6def115a7136cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
%%
%% 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.3c of this
%% license or (at your option) any later version.  The latest version
%% of this license is in
%%     https://www.latex-project.org/lppl.txt
%% and version 1.3c 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-minimal-test.tex,
%% typog-without-microtype-test.tex
%% typog-grep.pl.in, 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