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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
|
% \CheckSum{0}
% \iffalse
% ======================================================================
% plength.dtx
% Copyright (c) Markus Kohm, 2005-2009
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, version 1.3b of the license.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3b or later is part of all distributions of LaTeX
% version 2005/12/01 or later and of this work.
%
% This work has the LPPL maintenance status "author-maintained".
%
% The Current Maintainer and author of this work is Markus Kohm.
%
% This work consists of all files listed in manifest.txt.
% ----------------------------------------------------------------------
% plength.dtx
% Copyright (c) Markus Kohm, 2005-2009
%
% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
% Version 1.3b, verteilt und/oder veraendert werden.
% Die neuste Version dieser Lizenz ist
% http://www.latex-project.org/lppl.txt
% und Version 1.3b ist Teil aller Verteilungen von LaTeX
% Version 2005/12/01 oder spaeter und dieses Werks.
%
% Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained"
% (allein durch den Autor verwaltet).
%
% Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm.
%
% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
% ======================================================================
%
% Generation of plength figures at scrlttr2 chapter of the KOMA-Script guide
% Maintained by Markus Kohm
% Original source by Stephan Hennig
%
% ---------------------------------------------------------------------------
%
% Erzeugung der plength Abbildungen im scrlttr2-Kapitel der
% KOMA-Script-Anleitung
% Verwaltet von Markus Kohm
% Originalquellen von Stephan Hennig
%
% ============================================================================
%<*ins>
\def\batchfile{plength.dtx}
\input docstrip.tex
\ifx\askonceonly\undefined\else\askonceonly\fi
\preamble
\endpreamble
\postamble
\endpostamble
\keepsilent
\askforoverwritefalse
\generate{%
\file{plength.drv}{\from{plength.dtx}{driver}}%
\file{plenDIN.mp}{\from{plength.dtx}{main,DIN,length,terms,\languagename}}%
\file{varDIN.mp}{\from{plength.dtx}{main,DIN,variables,\languagename}}%
% Ebenfalls enthalten, derzeit aber nicht verwendet:
% \file{plenSN.mp}{\from{plength.dtx}{main,SN,length,\languagename}}%
% \file{varSN.mp}{\from{plength.dtx}{main,SN,variables,\languagename}}%
\file{plinc.mp}{\from{plength.dtx}{include}}%
\file{pltex-vars.mp}{\from{plength.dtx}{tex}}%
\file{pltex-terms.mp}{\from{plength.dtx}{tex,terms}}%
\file{pllcoDIN.mp}{\from{plength.dtx}{DIN,values}}%
% Ebenfalls enthalten, derzeit aber nicht verwendet:
% \file{pllcoSN.mp}{\from{plength.dtx}{SN,values}}%
}
\csname endinput\endcsname
%</ins>
%
%<*driver>
% \begin{macrocode}
\ProvidesFile{plength.drv}[2007/09/02 plength MetaPost graphics]
\documentclass{ltxdoc}
\usepackage{ngerman}
\usepackage[latin1]{inputenc}
\begin{document}
\DocInput{plength.dtx}
\end{document}
% \end{macrocode}
%</driver>
% \fi
%
% \title{MetaPost-Grafiken für das Briefkapitel}
% \author{Stephan Henig}
% \date{2005-08-30}
% \maketitle
%
% Es werden diverse Dateien erzeugt: \texttt{plenDINde.mp},
% \texttt{varDINde.mp}, \texttt{plenSNde.mp}, \texttt{varSNde.mp}, \dots Diese
% mit
% \begin{flushleft}
% \texttt{mpost --tex=latex} \meta{mp-file}
% \end{flushleft}
% bearbeitet ergibt \texttt{1}-Dateien. Diese können als EPS-Dateien
% geladen werden. Es kann aber auch mit
% \begin{flushleft}
% \texttt{mptopdf} \meta{1-Datei}
% \end{flushleft}
% eine PDF-Datei erzeugt werden.
%
% Anpassungen werden ausschließlich in der \texttt{dtx}-Datei vorgenommen!
% Wesentlich ist dabei der Abschnitt \texttt{main}.
%
%<*main>
% \section{Der Abschnitt \texttt{main}}
% Diese Abschnitt erzeugt die Haupttreiberdateien, die dann mit \texttt{mpost}
% bearbeitet werden.
%
% Hinweise zu den Variablen:
% \begin{itemize}
% \item \texttt{input pllcoDIN} oder \texttt{input pllcoSN}\hfill\\
% legt fest, ob die Maße für Briefe nach DIN oder SN
% geladen werden. Damit kann gewählt werden, welches Layout
% verdeutlicht werden soll. Sollen die Längen eingezeichnet werden,
% ist pllcoDIN zu verwenden.
% \item \texttt{grafikhoehe}\hfill\\
% legt die Höhe der Ausgabedatei fest.
% \item \texttt{strichstaerke}\hfill\\
% bestimmt die Stiftbreite, die zum Zeichnen des
% Briefbogens, der Faltmarken und der From-Rule benutzt wird.
% \item \texttt{framestrichstaerke}\hfill\\
% bestimmt die Stiftbreite zum Zeichnen der
% Element-Rahmen (nicht der Hilfsrahmen).
% \item \texttt{hilfsstrichstaerke}\hfill\\
% bestimmt die Stiftbreite zum Zeichnen der
% Bemaßung und der Hilfsrahmen.
% \item \texttt{tickhoehe}\hfill\\
% legt die Höhe der vertikalen Linien horizontaler
% Bemaßung fest (Makro hmeasure). Die Maßlinie wird auf halber Höhe
% von tickhoehe gezeichnet. Für die Makros vmeasure und dmeasure gilt
% ähnliches. In dmeasure wird jedoch ein Vielfaches von tickhoehe
% verwendet.
% \item \texttt{framed} und \texttt{filled}\hfill\\
% legen fest, ob die Elemente mit einem Rahmen
% versehen bzw. gefüllt werden sollen.
% \item \texttt{drawcolor}\hfill\\
% legt die Farbe von Linien und Text fest.
% \item \texttt{fillcolor}\hfill\\
% legt die Füllfarbe fest, falls filled=true ist.
% \item \texttt{latexlengths}\hfill\\
% legt fest, ob die unveränderlichen LaTeX-Längen
% angezeigt werden sollen.
% \item \texttt{latexlengthcolor}\hfill\\
% legt die Farbe fest, mit der LaTeX-Längen
% gezeichnet werden.
% \item \texttt{language}\hfill\\
% legt die Sprache der Beschreibung fest.
% \item \texttt{ahlength}\hfill\\
% Da foldmarkhpos sehr klein ist, können sich bei kleinen Grafiken
% die Pfeilspitzen der Bemaßung berühren. Um das zu verhindern, kann
% mit der MetaPost-internen Variablen ahlength die Pfeillänge
% verringert werden.
% \end{itemize}
%
% \begin{macrocode}
prologues:=1;
%<DIN>input pllcoDIN
%<SN>input pllcoSN
input plinc
%<!terms>input pltex-vars
%<terms>input pltex-terms
beginfig(1);
numeric grafikhoehe;
numeric tickhoehe;
numeric strichstaerke, framestrichstaerke, hilfsstrichstaerke;
boolean framed, filled, latexlengths;
color drawcolor, fillcolor, latexlengthcolor;
string language;
grafikhoehe := 167mm;
strichstaerke := 0.6pt;
framestrichstaerke := 0.2pt;
hilfsstrichstaerke := 0.2pt;
tickhoehe := 10pt;
framed := true;
filled := true;
drawcolor := black;
fillcolor := .8white;
latexlengths := true;
latexlengthcolor := .4white;
%<ngerman> language := "de";
%<english> language := "en";
ahlength := 0.7mm;
picture description[], plength[], latexlength[];
transform T;
T = identity reflectedabout ((0pt,.5*paperheight),
(paperwidth,.5*paperheight)) scaled (grafikhoehe/paperheight);
%<length> lengths; writedescription(language);
%<variables> describe(language);
endfig
end
% \end{macrocode}
%</main>
%
%<*tex>
% \section{Der Abschnitt \texttt{tex}}
%
% Dieser Abschnitt enthält sozusagen den \TeX{}-Part der Grafiken.
% Hier werden beispielsweise die Fonts festgelegt.
%
% \begin{macrocode}
verbatimtex
\documentclass[8pt]{scrartcl}
\usepackage[latin1]{inputenc}
\usepackage{ngerman}
\usepackage[T1]{fontenc}
\IfFileExists{scrnonfree.tex}{%
\usepackage{charter}%
\usepackage[scaled=0.87]{luximono}%
\usepackage[scaled=0.92]{frutiger}%
}{%
\usepackage{lmodern}%
}
\newcommand*{\plength}{\fontsize{7}{8}\sffamily}
\newcommand*{\descr}{\fontsize{7}{8}\itshape}
\newcommand*{\latexlength}{\fontsize{7}{8}\ttfamily}
\newcommand*{\Macro}[1]{{\fontsize{7}{8}\ttfamily
\expandafter\string\csname #1\endcsname}}
\newcommand*{\Parameter}[1]{{\fontsize{7}{8}\ttfamily\itshape\{#1\}}}
\newcommand*{\PParameter}[1]{{\fontsize{7}{8}\ttfamily\{#1\}}}
\newcommand*{\Variable}[1]{{\fontsize{7}{8}\ttfamily\bfseries #1}}
\newcommand*{\Multi}[1]{%
{\def\and{, }%
\begin{tabular}{@{}l@{}}
#1
\end{tabular}
}%
}
\begin{document}
etex
def deflengths =
begingroup
plength[1]=btex \plength{}backaddrheight etex;
plength[2]=btex \plength{}bfoldmarkvpos etex;
plength[3]=btex \plength{}firstfootvpos etex;
plength[4]=btex \plength{}firstfootwidth etex;
plength[5]=btex \plength{}firstheadvpos etex;
plength[6]=btex \plength{}firstheadwidth etex;
plength[7]=btex \plength{}foldmarkhpos etex;
plength[8]=btex \plength{}locwidth\strut etex;
plength[9]=btex \plength{}refaftervskip etex;
plength[10]=btex \plength{}refvpos etex;
plength[11]=btex \plength{}refwidth etex;
plength[12]=btex \plength{}sigbeforevskip etex;
plength[13]=btex \plength{}sigindent etex;
plength[14]=btex \plength{}specialmailindent etex;
plength[15]=btex \plength{}specialmailrightindent etex;
plength[16]=btex \plength{}tfoldmarkvpos etex;
plength[17]=btex \plength{}toaddrhpos\strut etex;
plength[18]=btex \plength{}toaddrindent\strut etex;
plength[19]=btex \plength{}toaddrvpos etex;
plength[20]=btex \plength{}toaddrwidth\strut etex;
plength[21]=btex \plength{}toaddrheight etex;
plength[22]=btex \plength{}refhpos etex;
plength[23]=btex \plength{}fromrulewidth etex;
plength[24]=btex \plength{}-toaddrhpos\strut etex;
plength[25]=btex \plength{}lochpos etex;
plength[26]=btex \plength{}-lochpos etex;
plength[27]=btex \plength{}locvpos etex;
plength[28]=btex \plength{}locheight etex;
plength[29]=btex \plength{}subjectaftervskip etex;
plength[30]=btex \plength{}+subjectbeforevskip etex;
endgroup
enddef;
def deflatexlengths =
begingroup
latexlength[1] = btex \latexlength{}\string\baselineskip etex;
latexlength[2] = btex \latexlength{}2\string\baselineskip etex;
latexlength[3] = btex \latexlength{}\string\textwidth etex;
latexlength[4] = btex \latexlength{}$\geq$\string\footskip etex;
endgroup
enddef;
def defdescriptionde =
begingroup
%<*terms>
description[1]=btex \descr{}Briefkopf etex;
description[2]=btex \descr{}Brief"|fuß{} etex;
description[3]=btex \descr{}Rücksendeadresse etex;
description[4]=btex \descr{}Versandart etex;
description[5]=btex \descr{}Empfängeradresse etex;
description[6]=btex \descr{}Geschäftszeile etex;
description[7]=btex \descr{}Titel etex;
description[8]=btex \descr{}Betreff etex;
description[9]=btex \descr{}Anrede etex;
description[10]=btex \descr{}Brieftext etex;
description[11]=btex \descr{}Grußfloskel etex;
description[12]=btex \descr{}Signatur etex;
description[13]=btex \descr{}\begin{tabular}{@{}c@{}}Absender-\\ergänzung\end{tabular} etex;
%</terms>
%<*!terms>
description[1]=btex \Multi{\Macro{firsthead}\Parameter{Definition}\\
\Variable{fromname}\and
\Variable{fromaddress}\and
\Variable{fromphone}\and
\Variable{fromfax}\and
\Variable{fromemail}\and
\Variable{fromurl}} etex;
description[2]=btex \Macro{firstfoot}\Parameter{Definition} etex;
description[3]=btex \Variable{backaddress} etex;
description[4]=btex \Variable{specialmail} etex;
description[5]=btex \Macro{begin}\PParameter{letter}\Parameter{Name und Adresse} etex;
description[6]=btex \Multi{\Variable{yourref}\and
\Variable{yourmail}\and
\Variable{myref}\and
\Variable{customer}\and
\Variable{invoice}\and
\Variable{place}\and
\Variable{date}} etex;
description[7]=btex \Variable{title} etex;
description[8]=btex \Variable{subject} etex;
description[9]=btex \Macro{opening}\Parameter{Anrede} etex;
description[10]=btex \descr{}Brieftext etex;
description[11]=btex \Macro{closing}\Parameter{Floskel} etex;
description[12]=btex \Variable{signature} etex;
description[13]=btex \Variable{location} etex;
%</!terms>
endgroup
enddef;
def defdescriptionen =
begingroup
%<*terms>
description[1]=btex \descr{}letterhead etex;
description[2]=btex \descr{}letter footer etex;
description[3]=btex \descr{}return address etex;
description[4]=btex \descr{}mode of dispatch etex;
description[5]=btex \descr{}addressee etex;
description[6]=btex \descr{}reference fields line etex;
description[7]=btex \descr{}title etex;
description[8]=btex \descr{}subject etex;
description[9]=btex \descr{}opening etex;
description[10]=btex \descr{}letter body etex;
description[11]=btex \descr{}closing etex;
description[12]=btex \descr{}signature etex;
description[13]=btex \descr{}\begin{tabular}{@{}c@{}}supplemental\\data\end{tabular} etex;
%</terms>
%<*!terms>
description[1]=btex \Multi{\Macro{firsthead}\Parameter{definition}\\
\Variable{fromname}\and
\Variable{fromaddress}\and
\Variable{fromphone}\and
\Variable{fromfax}\and
\Variable{fromemail}\and
\Variable{fromurl}} etex;
description[2]=btex \Macro{firstfoot}\Parameter{definition} etex;
description[3]=btex \Variable{backaddress} etex;
description[4]=btex \Variable{specialmail} etex;
description[5]=btex \Macro{begin}\PParameter{letter}\Parameter{addressee} etex;
description[6]=btex \Multi{\Variable{yourref}\and
\Variable{yourmail}\and
\Variable{myref}\and
\Variable{customer}\and
\Variable{invoice}\and
\Variable{place}\and
\Variable{date}} etex;
description[7]=btex \Variable{title} etex;
description[8]=btex \Variable{subject} etex;
description[9]=btex \Macro{opening}\Parameter{opening term} etex;
description[10]=btex \descr{}letter body etex;
description[11]=btex \Macro{closing}\Parameter{closing term} etex;
description[12]=btex \Variable{signature} etex;
description[13]=btex \Variable{location} etex;
%</!terms>
endgroup
enddef;
% \end{macrocode}
%</tex>
%
%<*values>
% \section{Der Abschnitt \texttt{values}}
% In diesem Abschnitt finden sich Maße für die unterschiedlichen Briefe
% ausgehend von \texttt{11pt}, \texttt{a4paper}.
%
%<*DIN>
% \section{Maße für DIN-Briefe}
%
%\begin{macrocode}
numeric paperwidth;
numeric paperheight;
numeric textwidth;
numeric textheight;
numeric evensidemargin;
numeric oddsidemargin;
numeric topmargin;
numeric headheight;
numeric headsep;
numeric topskip;
numeric footskip;
numeric baselineskip;
paperwidth = 597.50793pt;
paperheight = 845.04694pt;
textwidth = 418.25555pt;
textheight = 595.80026pt;
evensidemargin = 17.3562pt;
oddsidemargin = 17.3562pt;
topmargin = -25.16531pt;
headheight = 17.0pt;
headsep = 20.40001pt;
topskip = 11.0pt;
footskip = 47.60002pt;
baselineskip = 13.6pt;
numeric foldmarkhpos;
numeric tfoldmarkvpos;
numeric bfoldmarkvpos;
numeric tfoldmarklength;
numeric pfoldmarklength;
numeric bfoldmarklength;
numeric toaddrvpos;
numeric refvpos;
numeric refaftervskip;
numeric toaddrhpos;
numeric toaddrwidth;
numeric toaddrheight;
numeric toaddrindent;
numeric specialmailindent;
numeric specialmailrightindent;
numeric locwidth;
numeric backaddrheight;
numeric firstheadvpos;
numeric firstheadwidth;
numeric firstfootwidth;
numeric firstfootvpos;
numeric refwidth;
numeric sigindent;
numeric sigbeforevskip;
foldmarkhpos = 3.5mm;
tfoldmarkvpos = 105mm;
bfoldmarkvpos = 210mm;
tfoldmarklength = 2mm;
pfoldmarklength = 4mm;
bfoldmarklength = 2mm;
toaddrvpos = 45mm;
refvpos = 98.5mm;
refaftervskip = baselineskip;
toaddrhpos = 20mm;
toaddrwidth = 85mm;
toaddrheight = 40mm;
toaddrindent = 0mm;
%specialmailindent = \fill;
specialmailrightindent = 11pt;
locwidth = 3.75cm;
backaddrheight = 5mm;
firstheadvpos = 8mm;
firstheadwidth = paperwidth - 2*abs(toaddrhpos);
firstfootwidth = firstheadwidth;
firstfootvpos = 1in + topmargin + headheight + headsep + textheight + footskip;
refwidth = 0pt;
sigindent = 0mm;
sigbeforevskip = 2*baselineskip;
% \end{macrocode}
% weitere Hilfsvariablen
% \begin{macrocode}
numeric firstheadhpos;
numeric firstheadheight;
numeric firstfoothpos;
numeric firstfootheight;
numeric fromrulewidth;
numeric fromrulehpos;
numeric specialmailwidth;
numeric specialmailheight;
numeric lochpos;
numeric refhpos;
numeric refheight;
numeric titlevpos;
numeric titlewidth;
numeric titleheight;
numeric subjectvpos;
numeric subjectwidth;
numeric subjectheight;
numeric openingvpos;
numeric openingwidth;
numeric openingheight;
numeric bodyvpos;
numeric bodywidth;
numeric bodyheight;
numeric typeareabottom;
numeric sigvpos;
numeric sigwidth;
numeric sigheight;
firstheadhpos = 0.5*(paperwidth-firstheadwidth);
firstheadheight = 5*baselineskip;
firstfoothpos = 0.5*(paperwidth-firstfootwidth);
firstfootheight = 3*baselineskip;
fromrulewidth = 0.5*firstheadwidth;
fromrulehpos = firstheadhpos+0.5*(firstheadwidth-fromrulewidth);
specialmailwidth = 5cm;
specialmailheight = baselineskip;
specialmailindent = toaddrwidth-specialmailrightindent-specialmailwidth;
lochpos = paperwidth-toaddrhpos-locwidth;
refhpos = 1in+oddsidemargin;
refheight = 2*baselineskip;
refwidth := textwidth;
titlevpos = refvpos+refheight+refaftervskip;
titlewidth = 9cm;
titleheight = 1.2*baselineskip;
subjectvpos = titlevpos+titleheight+1*baselineskip;
subjectwidth = 8cm;
subjectheight = baselineskip;
openingvpos = subjectvpos+subjectheight+2*baselineskip;
openingwidth = 6cm;
openingheight = baselineskip;
bodyvpos = openingvpos+openingheight+baselineskip;
bodywidth = textwidth;
bodyheight = 8*baselineskip;
typeareabottom = firstfootvpos-footskip;
sigvpos = bodyvpos+bodyheight+baselineskip;
sigwidth = 5cm;
sigheight = baselineskip;
% \end{macrocode}
%</DIN>
%
%<*SN>
% \section{Maße für SN-Briefe}
% \begin{macrocode}
numeric paperwidth;
numeric paperheight;
numeric textwidth;
numeric textheight;
numeric evensidemargin;
numeric oddsidemargin;
numeric topmargin;
numeric headheight;
numeric headsep;
numeric topskip;
numeric footskip;
numeric baselineskip;
paperwidth = 597.50793pt;
paperheight = 845.04694pt;
textwidth = 418.25555pt;
textheight = 595.80026pt;
evensidemargin = 17.3562pt;
oddsidemargin = 17.3562pt;
topmargin = -25.16531pt;
headheight = 17.0pt;
headsep = 20.40001pt;
topskip = 11.0pt;
footskip = 47.60002pt;
baselineskip = 13.6pt;
numeric foldmarkhpos;
numeric tfoldmarkvpos;
numeric bfoldmarkvpos;
numeric tfoldmarklength;
numeric pfoldmarklength;
numeric bfoldmarklength;
numeric toaddrvpos;
numeric refvpos;
numeric refaftervskip;
numeric toaddrhpos;
numeric toaddrwidth;
numeric toaddrheight;
numeric toaddrindent;
numeric specialmailindent;
numeric specialmailrightindent;
numeric locwidth;
numeric backaddrheight;
numeric firstheadvpos;
numeric firstheadwidth;
numeric firstfootwidth;
numeric firstfootvpos;
numeric refwidth;
numeric sigindent;
numeric sigbeforevskip;
foldmarkhpos = 3.5mm;
tfoldmarkvpos = 105mm;
bfoldmarkvpos = 210mm;
tfoldmarklength = 2mm;
pfoldmarklength = 4mm;
bfoldmarklength = 2mm;
toaddrvpos = 45mm;
refvpos = 98.5mm;
refaftervskip = baselineskip;
toaddrhpos = -8mm;
toaddrwidth = 90mm;
toaddrheight = 40mm;
toaddrindent = 0mm;
%specialmailindent = \fill;
specialmailrightindent = 11pt;
locwidth = (paperwidth-2*abs(toaddrhpos)-toaddrwidth)/2;
backaddrheight = 5mm;
firstheadvpos = 8mm;
firstheadwidth = paperwidth - 2*abs(toaddrhpos);
firstfootwidth = firstheadwidth;
firstfootvpos = 1in + topmargin + headheight + headsep + textheight + footskip;
show firstfootvpos;
refwidth = 0pt;
sigindent = 0mm;
sigbeforevskip = 2*baselineskip;
% \end{macrocode}
% weitere Hilfsvariablen
% \begin{macrocode}
numeric firstheadhpos;
numeric firstheadheight;
numeric firstfoothpos;
numeric firstfootheight;
numeric fromrulewidth;
numeric fromrulehpos;
numeric specialmailwidth;
numeric specialmailheight;
numeric lochpos;
numeric refhpos;
numeric refheight;
numeric titlevpos;
numeric titlewidth;
numeric titleheight;
numeric subjectvpos;
numeric subjectwidth;
numeric subjectheight;
numeric openingvpos;
numeric openingwidth;
numeric openingheight;
numeric bodyvpos;
numeric bodywidth;
numeric bodyheight;
numeric typeareabottom;
numeric sigvpos;
numeric sigwidth;
numeric sigheight;
firstheadhpos = 0.5*(paperwidth-firstheadwidth);
firstheadheight = 4*baselineskip;
firstfoothpos = 0.5*(paperwidth-firstfootwidth);
firstfootheight = 3*baselineskip;
fromrulewidth = 0.5*firstheadwidth;
fromrulehpos = firstheadhpos+0.5*(firstheadwidth-fromrulewidth);
specialmailwidth = 5cm;
specialmailheight = baselineskip;
specialmailindent = toaddrwidth-specialmailrightindent-specialmailwidth;
lochpos = -toaddrhpos;
refhpos = 1in+oddsidemargin;
refheight = 2*baselineskip;
refwidth := textwidth;
titlevpos = refvpos+refheight+refaftervskip;
titlewidth = 9cm;
titleheight = 1.2*baselineskip;
subjectvpos = titlevpos+titleheight+1*baselineskip;
subjectwidth = 8cm;
subjectheight = baselineskip;
openingvpos = subjectvpos+subjectheight+2*baselineskip;
openingwidth = 6cm;
openingheight = baselineskip;
bodyvpos = openingvpos+openingheight+baselineskip;
bodywidth = textwidth;
bodyheight = 8*baselineskip;
typeareabottom = firstfootvpos-footskip;
sigvpos = bodyvpos+bodyheight+baselineskip;
sigwidth = 5cm;
sigheight = baselineskip;
% \end{macrocode}
%</SN>
%</values>
%
%<*include>
% \section{Der Abschnitt \texttt{include}}
% \changes{}{2005-08-30}{Korrektur der Stiftstärken}
%
% Dieser Abschnitt erzeugt die Datei \texttt{plinc.mp} mit den wesentlichen
% Definitionen für die Erzeugung eines Elements. Eine Element ist
% beispielsweise eine Pseudolänge, eine Beschreibung (Variable), ein Feld,
% \dots).
%
% \begin{macrocode}
def lengths =
toaddrindent := 0.7cm;
% \end{macrocode}
% Die Breite des \texttt{location}-Feldes wird später berechnet und deshalb
% hier nicht mehr mit
% \begin{verbatim}
% locwidth := 3.7cm;
% \end{verbatim}
% gesetzt.
% \begin{macrocode}
firstheadheight := firstheadheight-3pt;
firstheadvpos := firstheadvpos+3pt;
sigindent := 1cm;
if (latexlengths=true):
writelatexlengths;
fi
if (filled=true):
drawfilledelements;
fi
if (framed=true):
drawframedelements;
fi
drawpaperandfoldmarks;
drawboxes;
% \end{macrocode}
% From-Rule:
% \begin{macrocode}
draw ((fromrulehpos,firstheadvpos+firstheadheight-strichstaerke)--
(fromrulehpos+fromrulewidth,firstheadvpos+firstheadheight-strichstaerke))
transformed T withpen pencircle scaled strichstaerke;
writelengths;
enddef;
def describe(expr lang) =
drawpaperandfoldmarks;
if (filled=true):
drawfilledelements;
fi
if (framed=true):
drawframedelements;
fi
writedescription(lang);
enddef;
def drawframedelements =
if toaddrhpos < 0 :
istoaddrhpos := paperwidth-abs(toaddrhpos)-toaddrwidth;
else :
istoaddrhpos := toaddrhpos;
fi
pickup pencircle scaled framestrichstaerke;
drawoptions(withcolor drawcolor);
% \end{macrocode}
% Kopf und Fuß
% \begin{macrocode}
draw unitsquare xscaled firstheadwidth yscaled firstheadheight
shifted (firstheadhpos, firstheadvpos) transformed T;
draw unitsquare xscaled firstfootwidth yscaled firstfootheight
shifted (firstfoothpos, firstfootvpos) transformed T;
% \end{macrocode}
% Adressfeld
% \begin{macrocode}
draw unitsquare xscaled toaddrwidth yscaled backaddrheight
shifted (istoaddrhpos, toaddrvpos) transformed T;
draw unitsquare xscaled specialmailwidth yscaled specialmailheight
shifted (istoaddrhpos+toaddrwidth-specialmailwidth-specialmailrightindent,
toaddrvpos+backaddrheight) transformed T;
draw unitsquare xscaled (toaddrwidth-2*toaddrindent)
yscaled (toaddrheight-backaddrheight-specialmailheight)
shifted (istoaddrhpos+toaddrindent,
toaddrvpos+backaddrheight+specialmailheight) transformed T;
% \end{macrocode}
% Absenderergänzung:
% \begin{macrocode}
draw unitsquare xscaled locwidth yscaled toaddrheight
shifted (lochpos, toaddrvpos) transformed T;
% \end{macrocode}
% Geschäftszeile:
% \begin{macrocode}
draw unitsquare xscaled refwidth yscaled refheight
shifted (1in+oddsidemargin, refvpos) transformed T;
% \end{macrocode}
% Titel:
% \begin{macrocode}
draw unitsquare xscaled titlewidth yscaled titleheight
shifted (1in+oddsidemargin+0.5(textwidth-titlewidth), titlevpos)
transformed T;
% \end{macrocode}
% Betreff:
% \begin{macrocode}
draw unitsquare xscaled subjectwidth yscaled subjectheight
shifted (1in+oddsidemargin, subjectvpos) transformed T;
% \end{macrocode}
% Anrede:
% \begin{macrocode}
draw unitsquare xscaled openingwidth yscaled openingheight
shifted (1in+oddsidemargin, openingvpos) transformed T;
% \end{macrocode}
% Brieftext:
% \begin{macrocode}
draw unitsquare xscaled bodywidth yscaled bodyheight
shifted (1in+oddsidemargin, bodyvpos) transformed T;
% \end{macrocode}
% Signatur:
% \begin{macrocode}
draw unitsquare xscaled sigwidth yscaled sigheight
shifted (1in+oddsidemargin+sigindent, sigvpos) transformed T;
draw unitsquare xscaled (0.8*sigwidth) yscaled sigheight
shifted (1in+oddsidemargin+sigindent+.1*sigwidth,
sigvpos+sigheight+sigbeforevskip) transformed T;
enddef;
def drawfilledelements =
if toaddrhpos < 0 :
istoaddrhpos := paperwidth-abs(toaddrhpos)-toaddrwidth;
else :
istoaddrhpos := toaddrhpos;
fi
drawoptions (withcolor fillcolor);
% \end{macrocode}
% Kopf und Fuß:
% \begin{macrocode}
fill unitsquare xscaled firstheadwidth yscaled firstheadheight
shifted (firstheadhpos, firstheadvpos) transformed T;
fill unitsquare xscaled firstfootwidth yscaled firstfootheight
shifted (firstfoothpos, firstfootvpos) transformed T;
% \end{macrocode}
% Adressfeld:
% \begin{macrocode}
fill unitsquare xscaled toaddrwidth yscaled backaddrheight
shifted (istoaddrhpos, toaddrvpos) transformed T;
fill unitsquare xscaled specialmailwidth yscaled specialmailheight
shifted (istoaddrhpos+toaddrwidth-specialmailwidth-specialmailrightindent,
toaddrvpos+backaddrheight) transformed T;
fill unitsquare xscaled (toaddrwidth-2*toaddrindent)
yscaled (toaddrheight-backaddrheight-specialmailheight)
shifted (istoaddrhpos+toaddrindent,
toaddrvpos+backaddrheight+specialmailheight) transformed T;
% \end{macrocode}
% Absenderergänzung:
% \begin{macrocode}
fill unitsquare xscaled locwidth yscaled toaddrheight
shifted (lochpos, toaddrvpos) transformed T;
% \end{macrocode}
% Geschäftszeile:
% \begin{macrocode}
fill unitsquare xscaled refwidth yscaled refheight
shifted (refhpos, refvpos) transformed T;
% \end{macrocode}
% Titel:
% \begin{macrocode}
fill unitsquare xscaled titlewidth yscaled titleheight
shifted (1in+oddsidemargin+0.5(textwidth-titlewidth), titlevpos)
transformed T;
% \end{macrocode}
% Betreff:
% \begin{macrocode}
fill unitsquare xscaled subjectwidth yscaled subjectheight
shifted (1in+oddsidemargin, subjectvpos) transformed T;
% \end{macrocode}
% Anrede:
% \begin{macrocode}
fill unitsquare xscaled openingwidth yscaled openingheight
shifted (1in+oddsidemargin, openingvpos) transformed T;
% \end{macrocode}
% Brieftext:
% \begin{macrocode}
fill unitsquare xscaled bodywidth yscaled bodyheight
shifted (1in+oddsidemargin, bodyvpos) transformed T;
% \end{macrocode}
% Signatur:
% \begin{macrocode}
fill unitsquare xscaled sigwidth yscaled sigheight
shifted (1in+oddsidemargin+sigindent, sigvpos) transformed T;
fill unitsquare xscaled (0.8*sigwidth) yscaled sigheight
shifted (1in+oddsidemargin+sigindent+.1*sigwidth,
sigvpos+sigheight+sigbeforevskip) transformed T;
enddef;
def drawpaperandfoldmarks =
pickup pencircle scaled strichstaerke;
drawoptions(withcolor drawcolor);
% \end{macrocode}
% Briefbogen:
% \begin{macrocode}
draw unitsquare xscaled paperwidth yscaled paperheight transformed T;
% \end{macrocode}
% Falzmarken:
% \begin{macrocode}
draw ((foldmarkhpos,tfoldmarkvpos)--
(foldmarkhpos+tfoldmarklength,tfoldmarkvpos)) transformed T;
draw ((foldmarkhpos,0.5*paperheight)--
(foldmarkhpos+pfoldmarklength,0.5*paperheight)) transformed T;
draw ((foldmarkhpos,bfoldmarkvpos)--
(foldmarkhpos+bfoldmarklength,bfoldmarkvpos)) transformed T;
enddef;
def drawboxes =
if toaddrhpos < 0 :
istoaddrhpos := paperwidth-abs(toaddrhpos)-toaddrwidth;
else :
istoaddrhpos := toaddrhpos;
fi
pickup pencircle scaled hilfsstrichstaerke;
drawoptions(withcolor drawcolor);
% \end{macrocode}
% Kasten Adressfeld:
% \begin{macrocode}
draw unitsquare xscaled toaddrwidth yscaled toaddrheight
shifted (istoaddrhpos, toaddrvpos) transformed T;
% \end{macrocode}
% ^^A auskommentiert:
% ^^A Kasten Adresszeile
% ^^A draw unitsquare xscaled (paperwidth-2*toaddrhpos)
% ^^A yscaled toaddrheight shifted (toaddrhpos, toaddrvpos) transformed T;
% Kasten Signatur:
% \begin{macrocode}
draw unitsquare xscaled sigwidth yscaled (2*sigheight+sigbeforevskip)
shifted (1in+oddsidemargin+sigindent,sigvpos) transformed T;
% \end{macrocode}
% Kasten Satzspiegel:
% \begin{macrocode}
draw unitsquare xscaled textwidth yscaled (typeareabottom-titlevpos)
shifted (1in+oddsidemargin,titlevpos) transformed T;
enddef;
def writelengths =
begingroup
if toaddrhpos < 0 :
istoaddrhpos := paperwidth-abs(toaddrhpos)-toaddrwidth;
else :
istoaddrhpos := toaddrhpos;
fi
deflengths;
pickup pencircle scaled hilfsstrichstaerke;
drawoptions(withcolor drawcolor);
% \end{macrocode}
% \texttt{firstheadwidth}:
% \begin{macrocode}
hmeasure((firstheadhpos,firstheadvpos), firstheadwidth, plength[6], origin,
top);
% \end{macrocode}
% \texttt{fromrulewidth}:
% \begin{macrocode}
hmeasure((fromrulehpos,firstheadvpos+firstheadheight-strichstaerke),
fromrulewidth, plength[23], origin, top);
% \end{macrocode}
% \texttt{toaddrwidth}:
% \begin{macrocode}
hmeasure((istoaddrhpos,toaddrvpos), toaddrwidth, plength[20], origin, top);
% \end{macrocode}
% \texttt{locwidth}:
% \begin{macrocode}
hmeasure((lochpos,toaddrvpos), locwidth, plength[8], origin, top);
% \end{macrocode}
% \texttt{specialmailindent}:
% \begin{macrocode}
hmeasure((istoaddrhpos,
toaddrvpos+backaddrheight+0.5*(specialmailheight+tickhoehe)),
specialmailindent, plength[14], (-0.5*specialmailindent+toaddrindent,+14pt), rt);
% \end{macrocode}
% \texttt{specialmailrightindent}:
% \begin{macrocode}
hmeasure((istoaddrhpos+toaddrwidth-specialmailrightindent,
toaddrvpos+backaddrheight+0.5*(specialmailheight+tickhoehe)),
specialmailrightindent, plength[15],
(0.5*specialmailrightindent-3pt,0pt), rt);
% \end{macrocode}
% \texttt{toaddrhpos}:
% \begin{macrocode}
if toaddrhpos > 0 :
hmeasure((0,toaddrvpos), toaddrhpos, plength[17], (6pt,0pt), top);
else :
hmeasure((0,toaddrvpos), -toaddrhpos, plength[24], (6pt,0pt), top);
fi
% \end{macrocode}
% \texttt{lochpos}:
% \begin{macrocode}
if toaddrhpos > 0 :
hmeasure((lochpos+locwidth,toaddrvpos), toaddrhpos, plength[25], (-6pt,0pt),
top);
else :
hmeasure((paperwidth+toaddrhpos,toaddrvpos), -toaddrhpos, plength[26],
(-6pt,0pt), top);
fi
% \end{macrocode}
% \texttt{toaddrindent}:
% \begin{macrocode}
hmeasure((istoaddrhpos,
toaddrvpos+0.75*(toaddrheight+backaddrheight+specialmailheight+tickhoehe)),
toaddrindent, plength[18], (0.5*toaddrindent,0pt), rt);
hmeasure((istoaddrhpos+toaddrwidth-toaddrindent,
toaddrvpos+0.75*(toaddrheight+backaddrheight+specialmailheight+tickhoehe)),
toaddrindent, plength[18], (-0.5*toaddrindent,0pt), lft);
% \end{macrocode}
% \texttt{refwidth}:
% \begin{macrocode}
hmeasure((1in+oddsidemargin,refvpos), refwidth, plength[11], origin, top);
% \end{macrocode}
% \texttt{refhpos}:
% \begin{macrocode}
hmeasure((0,refvpos), refhpos, plength[22], origin, top);
% \end{macrocode}
% \texttt{foldmarkhpos}:
% \begin{macrocode}
hmeasure((0,bfoldmarkvpos+tickhoehe), foldmarkhpos, plength[7],
(-6pt,0.5*tickhoehe), lrt);
% \end{macrocode}
% \texttt{sigindent}:
% \begin{macrocode}
hmeasure((1in+oddsidemargin,sigvpos+0.5*(sigheight+tickhoehe)), sigindent,
plength[13], (-0.5*sigindent,0pt), lft);
% \end{macrocode}
% \texttt{firstfootwidth}:
% \begin{macrocode}
hmeasure((firstfoothpos,firstfootvpos), firstfootwidth, plength[4], origin,
top);
% \end{macrocode}
% \texttt{toaddrheight}:
% \begin{macrocode}
vmeasure((istoaddrhpos-tickhoehe,toaddrvpos), toaddrheight,
plength[21] rotated 90, origin, lft);
% \end{macrocode}
% \texttt{locheight}:
% \begin{macrocode}
vmeasure((lochpos+locwidth,toaddrvpos), toaddrheight,
plength[28] rotated 90, origin, rt);
% \end{macrocode}
% \texttt{subjectbeforevskip}
% \begin{macrocode}
label(plength[30],
(1in+oddsidemargin+openingwidth+152pt, subjectvpos-.5*baselineskip)
transformed T);
% \end{macrocode}
% \texttt{subjectaftervskip}
% \begin{macrocode}
vmeasure((1in+oddsidemargin+openingwidth,subjectvpos+baselineskip),
2*baselineskip, plength[29], origin, rt);
% \end{macrocode}
% \texttt{backaddrheight}:
% \begin{macrocode}
vmeasure((istoaddrhpos+toaddrwidth,toaddrvpos), backaddrheight, plength[1],
origin, rt);
% \end{macrocode}
% \texttt{refaftervskip}:
% ^^A auskommentiert:
% ^^A vmeasure((1in+oddsidemargin+0.5*(textwidth+titlewidth),
% ^^A refvpos+refheight), refaftervskip, plength[9], origin, rt);
% \begin{macrocode}
vmeasure((1in+oddsidemargin+textwidth,refvpos+refheight), refaftervskip,
plength[9], origin, rt);
% \end{macrocode}
% \texttt{sigbeforvskip}:
% \begin{macrocode}
vmeasure((1in+oddsidemargin+sigindent+0.1*sigwidth-tickhoehe,
sigvpos+sigheight), sigbeforevskip, plength[12], origin, rt);
% \end{macrocode}
% \texttt{firstheadvpos}:
% \begin{macrocode}
dmeasure((firstheadhpos-2*tickhoehe,firstheadvpos), plength[5], origin, rt);
% \end{macrocode}
% \texttt{toaddrvpos}:
% \begin{macrocode}
if toaddrhpos > 0 :
dmeasure((istoaddrhpos+toaddrwidth,toaddrvpos), plength[19], origin, top);
else :
dmeasure((istoaddrhpos-2*tickhoehe,toaddrvpos), plength[19], origin, top);
fi
% \end{macrocode}
% \texttt{locvpos}:
% \begin{macrocode}
if toaddrhpos > 0 :
dmeasure((lochpos-2*tickhoehe,toaddrvpos), plength[27], origin, top);
else :
dmeasure((lochpos+locwidth,toaddrvpos), plength[27], origin, top);
fi
% \end{macrocode}
% \texttt{refvpos}:
% \begin{macrocode}
dmeasure((refhpos+refwidth,refvpos), plength[10], (0pt,0pt), top);
% \end{macrocode}
% \texttt{tfoldmarkvpos}:
% \begin{macrocode}
dmeasure((foldmarkhpos+tfoldmarklength,tfoldmarkvpos), plength[16],
(18pt,1.5*tickhoehe), bot);
% \end{macrocode}
% \texttt{bfoldmarkvpos}:
% \begin{macrocode}
dmeasure((foldmarkhpos+bfoldmarklength,bfoldmarkvpos), plength[2],
(18pt,0pt), top);
% \end{macrocode}
% \texttt{firstfootvpos}:
% \begin{macrocode}
dmeasure((firstfoothpos-2*tickhoehe,firstfootvpos), plength[3], origin, top);
endgroup
enddef;
def writelatexlengths =
begingroup
color temp;
deflatexlengths;
temp := drawcolor;
drawcolor := latexlengthcolor;
pickup pencircle scaled hilfsstrichstaerke;
% \end{macrocode}
% \LaTeX-Längen:
% \begin{macrocode}
vmeasure((1in+oddsidemargin+openingwidth,subjectvpos-baselineskip),
baselineskip, latexlength[1], origin, rt);
vmeasure((1in+oddsidemargin+openingwidth,openingvpos+baselineskip),
baselineskip, latexlength[1], origin, rt);
vmeasure((1in+oddsidemargin+sigindent+sigwidth,sigvpos-baselineskip),
baselineskip, latexlength[1], origin, rt);
hmeasure((1in+oddsidemargin,typeareabottom+tickhoehe),
textwidth, latexlength[3], (0pt,-3pt), bot);
draw ((1in+oddsidemargin+textwidth,typeareabottom)--
(firstfoothpos+firstfootwidth,typeareabottom)) transformed T;
vmeasure((firstfoothpos+firstfootwidth,typeareabottom),
firstfootvpos-typeareabottom, latexlength[4] rotated 90, origin,
rt);
drawcolor := temp;
endgroup
enddef;
% \end{macrocode}
% Anker ist links unten.
% \begin{macrocode}
def hmeasure(expr p, breite, pic, s)(suffix alig) =
begingroup
save pleft, pright;
pair pleft, pright;
drawoptions(withcolor drawcolor);
% \end{macrocode}
% linker Tick:
% \begin{macrocode}
draw (p--p shifted (0,-tickhoehe)) transformed T;
% \end{macrocode}
% rechter Tick:
% \begin{macrocode}
draw (p--p shifted (0,-tickhoehe)) shifted (breite,0) transformed T;
% \end{macrocode}
% Messlinie;
% die Korrektur der Stiftstärke muss nach der Transformation
% in Zeichenkoordinaten erfolgen:
% \begin{macrocode}
pleft = p shifted (0,-0.5*tickhoehe)
transformed T shifted (hilfsstrichstaerke,0);
pright = p shifted (0,-0.5*tickhoehe) shifted (breite,0)
transformed T shifted (-hilfsstrichstaerke,0);
drawdblarrow pleft--pright;
label.alig(pic, (p shifted (0.5*breite, -0.5*tickhoehe) shifted s)
transformed T);
endgroup
enddef;
% \end{macrocode}
% Anker ist links oben.
% \begin{macrocode}
def vmeasure(expr p, breite, pic, s)(suffix alig) =
begingroup
save ptop, pbottom;
pair ptop, pbottom;
drawoptions(withcolor drawcolor);
% \end{macrocode}
% oberer Tick:
% \begin{macrocode}
draw (p--p shifted (tickhoehe,0)) transformed T;
% \end{macrocode}
% unterer Tick:
% \begin{macrocode}
draw (p--p shifted (tickhoehe,0)) shifted (0,breite) transformed T;
% \end{macrocode}
% Messlinie;
% die Korrektur der Stiftstärke muss nach der Transformation
% in Zeichenkoordinaten erfolgen:
% \begin{macrocode}
ptop = p shifted (0.5*tickhoehe,0)
transformed T shifted (0,-hilfsstrichstaerke);
pbottom = p shifted (0.5*tickhoehe,0) shifted (0,breite)
transformed T shifted (0,hilfsstrichstaerke);
drawdblarrow ptop--pbottom;
label.alig(pic, (p shifted (0.5*tickhoehe, 0.5*breite) shifted s)
transformed T);
endgroup
enddef;
% \end{macrocode}
% Anker ist links unten.
% \begin{macrocode}
def dmeasure(expr p, pic, s)(suffix alig) =
begingroup
save ptop, pbottom;
pair ptop, pbottom;
drawoptions(withcolor drawcolor);
% \end{macrocode}
% horizontale Linie:
% \begin{macrocode}
draw (p--p shifted (2*tickhoehe,0)) transformed T;
% \end{macrocode}
% Messlinie:
% \begin{macrocode}
ptop = p shifted (0,-1.5*tickhoehe) shifted (tickhoehe,0)
transformed T;
% \end{macrocode}
% Die Korrektur der Stiftstärke muss nach der Transformation
% in Zeichenkoordinaten erfolgen.
% \begin{macrocode}
pbottom = p shifted (tickhoehe,0)
transformed T shifted (0,hilfsstrichstaerke);
drawarrow ptop--pbottom;
label.alig(pic, (p shifted (tickhoehe, -1.5*tickhoehe) shifted s)
transformed T);
endgroup
enddef;
def writedescription(expr lang) =
if toaddrhpos < 0 :
istoaddrhpos := paperwidth-abs(toaddrhpos)-toaddrwidth;
else :
istoaddrhpos := toaddrhpos;
fi
if (lang="de"): defdescriptionde;
else: defdescriptionen;
fi
drawoptions(withcolor drawcolor);
% \end{macrocode}
% Kopf und Fuß:
% \begin{macrocode}
label(description[1],
(firstheadhpos+0.5*firstheadwidth, firstheadvpos+0.5*firstheadheight)
transformed T);
label(description[2],
(firstfoothpos+0.5*firstfootwidth, firstfootvpos+0.5*firstfootheight)
transformed T);
% \end{macrocode}
% Adressfeld:
% \begin{macrocode}
label(description[3],
(istoaddrhpos+0.5*toaddrwidth, toaddrvpos+0.5*backaddrheight)
transformed T);
label(description[4],
(istoaddrhpos+toaddrwidth-specialmailrightindent-0.5*specialmailwidth,
toaddrvpos+backaddrheight+0.5*specialmailheight) transformed T);
label(description[5],
(istoaddrhpos+0.5*toaddrwidth,
toaddrvpos+backaddrheight+specialmailheight+0.5*(toaddrheight-backaddrheight-specialmailheight))
transformed T);
% \end{macrocode}
% Absenderergänzung:
% \begin{macrocode}
label(description[13], (lochpos+0.5*locwidth, toaddrvpos+0.5*toaddrheight)
transformed T);
% \end{macrocode}
% Geschäftszeile:
% \begin{macrocode}
label(description[6], (1in+oddsidemargin+0.5*refwidth,
refvpos+0.5*refheight)
transformed T);
% \end{macrocode}
% Titel:
% \begin{macrocode}
label(description[7],
(1in+oddsidemargin+0.5textwidth, titlevpos+0.5*titleheight)
transformed T);
% \end{macrocode}
% Betreff:
% \begin{macrocode}
label(description[8],
(1in+oddsidemargin+0.5*subjectwidth, subjectvpos+0.5*subjectheight)
transformed T);
% \end{macrocode}
% Anrede:
% \begin{macrocode}
label(description[9],
(1in+oddsidemargin+0.5*openingwidth, openingvpos+0.5*openingheight)
transformed T);
% \end{macrocode}
% Brieftext:
% \begin{macrocode}
label(description[10],
(1in+oddsidemargin+0.5*bodywidth, bodyvpos+0.5*bodyheight)
transformed T);
% \end{macrocode}
% Signatur:
% \begin{macrocode}
label(description[11],
(1in+oddsidemargin+sigindent+0.5*sigwidth, sigvpos+0.5*sigheight)
transformed T);
label(description[12],
(1in+oddsidemargin+sigindent+0.5*sigwidth,
sigvpos+sigheight+sigbeforevskip+0.5*sigheight) transformed T);
enddef;
% \end{macrocode}
%</include>
%
% \iffalse
\endinput
%%% Local Variables:
%%% mode: doctex
%%% coding: iso-latin-1
%%% TeX-master: t
%%% End:
% \fi
|