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
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
|
% interface=en
\startcomponent co-pagedesign
\setupexternalfigures[directory={./arranging}]
\startbuffer[fig-layo]
\unprotect
\setuplinewidth[\v!small]
\setupframed[\c!offset=0pt,\c!framecolor=PlusColor]
\framed
[\c!strut=\v!no,
\c!background=\v!screen,
\c!backgroundscreen=1]
{\hbox
{\framed
[\c!height=15cm,\c!width=1.25cm]
{\translate[nl=rugwit,en=backspace]}%
\vbox
{\offinterlineskip
\setupframed[\c!width=7.5cm]
\framed
[\c!height=1.25cm]
{\translate[nl=kopwit,en=topspace]}
\framed
[\c!height=1.00cm,\c!background=\v!screen,\c!backgroundscreen=.85]
{\translate[nl=hoofd,en=header]}
\framed
[\c!height=10.50cm,\c!background=\v!screen,\c!backgroundscreen=.95]
{\translate[nl=tekst,en=text]}
\framed
[\c!height=1.00cm,\c!background=\v!screen,\c!backgroundscreen=.85]
{\translate[nl=hoofd,en=footer]}
\framed
[\c!height=1.25cm]
{}}%
\framed[\c!height=15cm,\c!width=1.75cm]{}}}
\vskip.25cm
\hbox to 10.5cm
{\hskip1.25cm
\llap{\hbox to 2cm
{\color[PlusColor]{\vl}\hss
\translate[nl=marge,en=margin]\hss
\color[PlusColor]{\vl}}}%
\hskip7.5cm
\hbox to 2.00cm
{\color[PlusColor]{\vl}\hss
\translate[nl=marge,en=margin]\hss
\color[PlusColor]{\vl}}%
\hss}
\protect
\stopbuffer
\startbuffer[pag-16]
\unprotect
\hbox
{\forgetall
\offinterlineskip
\setupframed
[\c!width=1cm,\c!height=1.5cm,
\c!background=\v!screen,\c!backgroundscreen=1]%
\vbox
{\hbox
{\framed{8}\framed{9}\framed{12}\framed{5}}
\rotate[\c!rotation=180]{\hbox
{\framed{4}\framed{13}\framed{16}\framed{1}}}}%
\hskip.25cm
\vbox
{\hbox
{\framed{6}\framed{11}\framed{10}\framed{7}}
\rotate[\c!rotation=180]{\hbox
{\framed{2}\framed{15}\framed{14}\framed{3}}}}}
\protect
\stopbuffer
\startbuffer[pag-8]
\unprotect
\hbox
{\forgetall
\offinterlineskip
\setupframed
[\c!width=1cm,\c!height=1.5cm,
\c!background=\v!screen,\c!backgroundscreen=1]%
\vbox
{\hbox
{\framed{4}\framed{5}}
\rotate[\c!rotation=180]{\hbox
{\framed{8}\framed{1}}}}%
\hskip.25cm
\vbox
{\hbox
{\framed{3}\framed{6}}
\rotate[\c!rotation=180]{\hbox
{\framed{2}\framed{7}}}}}
\protect
\stopbuffer
\startbuffer[pag-4]
\unprotect
\hbox
{\setupframed
[\c!width=1cm,\c!height=1.5cm,
\c!background=\v!screen,\c!backgroundscreen=1]%
\hbox{\framed{1}\framed{4}}%
\hskip.25cm
\hbox{\framed{3}\framed{2}}}
\protect
\stopbuffer
\startbuffer[pag-2up]
\unprotect
\hbox
{\setupframed
[\c!width=1cm,\c!height=1.5cm,
\c!background=\v!screen,\c!backgroundscreen=1]%
\hbox{\framed{1}\framed{8}}%
\hskip.25cm
\hbox{\framed{2}\framed{7}}%
\hskip.25cm
\hbox{\framed{3}\framed{6}}%
\hskip.25cm
\hbox{\framed{4}\framed{5}}}
\protect
\stopbuffer
\startbuffer[pag-2down]
\unprotect
\hbox
{\forgetall
\offinterlineskip
\setupframed
[\c!width=1.5cm,\c!height=1cm,
\c!background=\v!screen,\c!backgroundscreen=1]%
\vbox{\framed{8}\break\framed{1}}%
\hskip.25cm
\vbox{\framed{7}\break\framed{2}}%
\hskip.25cm
\vbox{\framed{6}\break\framed{3}}%
\hskip.25cm
\vbox{\framed{5}\break\framed{4}}}
\protect
\stopbuffer
\startbuffer[grid-1]
\advance\baselineskip by 0pt plus 1pt
\hsize.2\hsize
\def\Alpha{\translate[nl=alfa, en=alpha]}
\def\Beta {\translate[nl=beta, en=beta]}
\def\Gamma{\translate[nl=gamma,en=gamma]}
\startcombination[4]
{\ruledvbox to 5\baselineskip {\Alpha\par\Beta\par\Gamma\par}} {}
{\ruledvbox to 5\baselineskip {\Alpha\par\Beta\par\Gamma\par\kern-\prevdepth}} {}
{\ruledvbox to 5\baselineskip {\Alpha\par\Beta\par\Gamma\par\kern0pt}} {}
{\ruledvbox to 5\baselineskip {\Alpha\par\Beta\par\Gamma\par\vfill}} {}
\stopcombination
\stopbuffer
\startbuffer[grid-2]
\hsize.2\hsize
\def\Alpha{\translate[nl=alfa, en=alpha]}
\def\Beta {\translate[nl=beta, en=beta]}
\def\Gamma{\translate[nl=gamma,en=gamma]}
\def\Delta{\translate[nl=delta,en=delta]}
\startcombination[4]
{\ruledvbox to 5\baselineskip {\Alpha\par\Beta\blank\Gamma\par\Delta}} {}
{\ruledvbox to 5\baselineskip {\Alpha\par\Beta\par\Gamma\blank\Delta}} {}
{\ruledvbox to 5\baselineskip {\Alpha\blank\Beta\blank\Gamma}} {}
{\ruledvbox to 5\baselineskip {\Alpha\par\Beta\par\Gamma}} {}
\stopcombination
\stopbuffer
\startbuffer[print-1]
\unprotect
\startcombination[4*4]
{\showprint[][]}
{\strut}
{\showprint[][][\c!location=\v!middle]}
{\tttf\c!location=\v!middle}
{\showprint[][][\c!location=\v!middle,\c!marking=\v!on]}
{\tttf\c!marking=\v!on\break\c!location=\v!middle}
{\showprint[][][\c!location=\v!middle,\c!marking=\v!on,\c!nx=2]}
{\tttf\c!marking=\v!on\break\c!location=\v!middle\break\c!nx=2}
{\showprint[][][\c!location=\v!left]}
{\tttf\c!location=\v!left}
{\showprint[][][\c!location=\v!right]}
{\tttf\c!location=\v!right}
{\showprint[][][\c!location={\v!left,\v!bottom}]}
{\tttf\c!location={\v!left,\v!bottom}}
{\showprint[][][\c!location={\v!right,\v!bottom}]}
{\tttf\c!location={\v!right,\v!bottom}}
{\showprint[][][\c!nx=2,\c!ny=1]}
{\tttf\c!nx=2,\c!ny=1}
{\showprint[][][\c!nx=1,\c!ny=2]}
{\tttf\c!nx=1,\c!ny=2}
{\showprint[][][\c!nx=2,\c!ny=2]}
{\tttf\c!nx=2,\c!ny=2}
{\showprint[][][\c!nx=2,\c!ny=2,\c!location=\v!middle]}
{\tttf\c!nx=2,\c!ny=2\break\c!location=\v!middle}
% {\showprint[][][\c!horoffset=3pt]}
% {\tttf\c!horoffset=.5cm}
% {\showprint[][][\c!veroffset=3pt]}
% {\tttf\c!veroffset=.5cm}
{\showprint[][][\c!scale=1.5]}
{\tttf\c!scale=1.5}
{\showprint[][][\c!scale=0.8]}
{\tttf\c!scale=0.8}
\stopcombination
\protect
\stopbuffer
\startbuffer[print-2]
\unprotect
\startcombination[3*4]
{\showprint[\v!landscape][][\c!location=\v!middle]}
{\tttf\v!landscape}
{\showprint[][\v!landscape][\c!location=\v!middle]}
{\tttf\strut\break\v!landscape}
{\showprint[\v!landscape][\v!landscape][\c!location=\v!middle]}
{\tttf\v!landscape\break\v!landscape}
{\showprint[90][][\c!location=\v!middle]}
{\tttf90}
{\showprint[][90][\c!location=\v!middle]}
{\tttf\strut\break90}
{\showprint[90][90][\c!location=\v!middle]}
{\tttf90\break90}
{\showprint[180][][\c!location=\v!middle]}
{\tttf180}
{\showprint[][180][\c!location=\v!middle]}
{\tttf\strut\break180}
{\showprint[180][180][\c!location=\v!middle]}
{\tttf180\break180}
{\showprint[\v!mirrored][][\c!location=\v!middle]}
{\tttf\v!mirrored}
{\showprint[][\v!mirrored][\c!location=\v!middle]}
{\tttf\strut\break\v!mirrored}
{\showprint[\v!mirrored][\v!mirrored][\c!location=\v!middle]}
{\tttf\v!mirrored\break\v!mirrored}
\stopcombination
\protect
\stopbuffer
\unprotect
\def\ShowArrangementA#1#2%
{\page
\placefloat
[\v!figure]
{#2}
\startcombination
{\externalfigure[#1l]
[\c!width=.4\makeupwidth,
\c!framecolor=PlusColor,
\c!background=\v!screen,
\c!backgroundscreen=1,
\c!frame=\v!on]}
{\translate[nl=rechts,en=right]}
{\externalfigure[#1r]
[\c!width=.4\makeupwidth,
\c!framecolor=PlusColor,
\c!background=\v!screen,
\c!backgroundscreen=1,
\c!frame=\v!on]}
{\translate[nl=links,en=left]}
\stopcombination
\typefile{#1q}
\page}
\def\ShowArrangementB#1#2%
{\page
\dimen0=\textheight
\advance\dimen0 by -15\openlineheight
\edef\LeftOver{\the\dimen0}%
\placefloat
[\v!figure]
{#2}
{\externalfigure[#1]
[\c!height=\LeftOver,
\c!framecolor=PlusColor,
\c!background=\v!screen,
\c!backgroundscreen=1,
\c!frame=\v!on]}
\typefile{#1}
\page}
\protect
\environment contextref-env
\product contextref
\chapter[pagedesign]{Page design}
\section{Introduction}
While processing a text \TEX\ makes use of the actual \type
{\hsize} (width) and \type {\vsize} (height). As soon as
\type {\vsize} is exceeded \TEX's output routine is
launched. The output routine deals with the typeset part
--- most of the time this will be a page. It takes care of
typesetting the headers and footers, the page number, the
backgrounds and footnotes, tables and figures. This rather
complex process makes it obvious that the output routine
actually makes use of more dimensions than \type {\hsize}
and \type {\vsize}.
\section[paperdimension]{Paper dimensions}
\index{page design}
\index{paper dimension}
\macro{\tex{definepapersize}}
\macro{\tex{setuppapersize}}
With the command \type{\setuppapersize} the dimensions of
the paper being used are defined. There is a difference
between the dimensions for typesetting and printing.
\showsetup{setuppapersize}
The dimensions of \kap{DIN} formats are given in
\in{table}[tab:dindimensions].
\placetable
[here][tab:dindimensions]
{Default paper dimensions}
\startcombination[2]
{\starttable[|c|c|]
\HL
\VL \bf format \VL \bf size in mm \VL\SR
\HL
\VL {\type{A0}} \VL $841 \times 1189$ \VL\FR
\VL {\type{A1}} \VL $594 \times ~841$ \VL\MR
\VL {\type{A2}} \VL $420 \times ~594$ \VL\MR
\VL {\type{A3}} \VL $297 \times ~420$ \VL\MR
\VL {\type{A4}} \VL $210 \times ~297$ \VL\LR
\HL
\stoptable} {}
{\starttable[|c|c|]
\HL
\VL \bf format \VL \bf size in mm \VL\SR
\HL
\VL {\type{A5}} \VL $148 \times 210$ \VL\FR
\VL {\type{A6}} \VL $105 \times 148$ \VL\MR
\VL {\type{A7}} \VL $~74 \times 105$ \VL\MR
\VL {\type{A8}} \VL $~52 \times ~74$ \VL\MR
\VL {\type{A9}} \VL $~37 \times ~52$ \VL\LR
\HL
\stoptable} {}
\stopcombination
There are a great number of standardized formats like \type {B0}||\type {B9} and \type
{C0}||\type {C9}. These formats are predefined in\CONTEXT\ as well. You can also use:
\type {letter}, \type {legal}, \type {folio} and \type
{executive}, \type {envelope 9}||\type {14}, \type {monarch},
\type {check}, \type {DL} and \type {CD}.
Another series of predefined formats comprise the \type{RA} and \type{SRA} types of paper sizes.
A new format can be defined by:
\showsetup{definepapersize}
For example \type{CD} was defined as:
\startexample
\starttyping
\definepapersize[CD][width=12cm,height=12cm]
\stoptyping
\stopexample
After defining \type{CD} you can type:
\startexample
\starttyping
\setuppapersize[CD][A4]
\stoptyping
\stopexample
This means that for typesetting \CONTEXT\ will use the
newly defined size \type {CD}. The resulting, rather small
page, is positioned on an \type{A4} paper size. This second
argument is explained in detail later.
\CONTEXT\ can also be used to produce screen documents. For
that purpose a number of screen formats are available that
relate to the screen dimensions. You can use:
\type{S3}||\type{S6}. These generate screens with widths
varying from 300 to 600 pt and a height of $3/4$ of the
width.
When one chooses another paper format than \type{A4}, the
default settings are scaled to fit the new size.
All defined paper sizes can be used either in portrait or landscape orientation. You can tell \CONTEXT\ the orientation of the paper in the \type{\setupapersize} command:
\startexample
\starttyping
\setuppapersize[CD][A4,landscape]
\stoptyping
\stopexample
\section{Page texts}
\index{headers}
\index{footers}
\index{menus}
Page texts are texts that are placed in the headers,
footers, margins and edges of the so called pagebody. This
sentence is for instance typeset in the bodyfont in the
running text. The fonts of the page texts are set up by
means of different commands. The values of the parameters
may be something like \type {style=bold} but
\type {style=\ss\bf} is also allowed. Setups like
\type {style=\ssbf} are less obvious because commands like
\type {\cap} will not behave the way you expect.
Switching to a new font style (\type {\ss}) will cost some
time. Usually this is no problem but in interactive documents
where we may use interactive menus with dozens of
items and related font switches the effect can be
considerable. In that case a more efficient font switching
is:
\startexample
\starttyping
\setuplayout[style=\ss]
\stoptyping
\stopexample
Border texts are setup by its command and the related key.
For example footers may be set up with the key
\type {letter}:
\startexample
\starttyping
\setupfooter[style=bold]
\stoptyping
\stopexample
\section[margins]{Page composition}
\index{margins}
\index{layout}
\index{frames}
\index{set ups}
\index{layout}
\index{topspace}
\index{backspace}
\macro{\tex{setuplayout}}
\macro{\tex{adaptlayout}}
\macro{\tex{showframe}}
\macro{\tex{showsetups}}
\macro{\tex{showlayout}}
In page composition we distinguish the main text area,
headers and footers, and the margins (top, bottom, right and
left). The main text flows inside the main text area. When
defining a layout, one should realize that the header, text
and footer areas are treated as a whole. Their position on
the page is determined by the topspace and backspace
dimensions (see \in {picture} [fig:typesetting area]).
\startpostponing
\placefigure
[here]
[fig:typesetting area]
{The A4 typesetting area and margins
($\hbox{height} = \hbox{header} +
\hbox{text} + \hbox{footer}$).}
{\getbuffer[fig-layo]}
\stoppostponing
\startbuffer
\inleft {\inframed[background=color,backgroundcolor=GrayColor,framecolor=FrameColor]{left}}%
\inright {\inframed[background=color,backgroundcolor=GrayColor,framecolor=FrameColor]{right}}%
\stopbuffer
The header is located on top and the
footer below of the main text area. Normally, in the header and footer
page numbers and running titles are placed. The left
and|/|or right margins are often used for structural
components like marginal notes and|/|or chapter and section
numbers. The margins are located in the backspace (along the spine) and in the white space to the right|/|left of the main text area. Their {\getbuffer} width has {\em no} influence on the location
of the typesetting area on the page.
On the contrary, the height of the header and footer
influences the height of the text area. When talking about
the height, we think of the sum of the header, text and footer
areas. This approach enables you to occasionally hide the header and|/|or footer,
without introducing inconsistency in the layout.
The dimensions and location of all those areas are set up
with \type{\setuplayout}.
\startpostponing
\showsetup{setuplayout}
\stoppostponing
Setting up the left or right margin has no influence on the
typesetting area. In paper documents this parameter is only
of use when keywords or other text are placed in the margin
(hyphenation).
For paper documents it is sufficient to set up the height,
header, footer, top space and back space. For electronic
and screen documents however we need some extra space for
navigational tools (see \in{chapter}[interaction]). In
screen documents it is common practice to use backgrounds.
Therefore it is also possible to set up the space between
the text area and the header and footer on a page, and
thereby visually separating those areas.
\starttabulate[|lw(3.5cm)|p(5cm)|p|]
\NC \bf Parameter \NC \bf Value \NC Comment \NC\NR
\NC width \NC dimension
\NC Determines the width of the typesetting area. \type{Middle} sets the white space right to the typesetting area to the value of the backspace. type{Fit} takes values set for margins, edges and margin and edge distances into account. \NC\NR
\NC height \NC dimension
\NC The \type{height} is the sum of the text height, header, footer, headerdistance, footerdistance. Middle sets the bottom white space to the value of the topspace. \type{Fit} calculates the text height based on the other vertical height-elements. \NC\NR
\NC backspace \NC dimension
\NC \type{Backspace} determines the left boundary of the typesetting area. \NC\NR
\NC topspace \NC dimension
\NC \type{Topspace} determines the top boundary of the typesetting area. Together \type{backspace} and \type{topspace} determine the left top corner of the typesetting area. \NC\NR
\NC margin \NC dimension
\NC Setting this parameters makes left and right margin equally large. \NC\NR
\NC leftmargin \NC dimension
\NC For documents with different size of the left and right margin, the left margin size is determined. \NC\NR
\NC rightmargin \NC dimension
\NC For documents with different size of the left and right margin, the right margin size is determined. \NC\NR
\NC header \NC dimension
\NC Determines the height of a running header. The header height is part of the \type{height} parameter. \NC\NR
\NC footer \NC dimension
\NC Determines the height of the footer. The footer height is part of the \type{height} parameter. \NC\NR
\NC top \NC dimension
\NC Makes space available in the \type{topspace} area. This parameter is not part of the text height. \NC\NR
\NC bottom \NC dimension
\NC Makes space available underneath the typesetting area. This parameter is not part of the text height. \NC\NR
\NC leftedge \NC dimension
\NC This space located left to the left margin is for screen documents only. \NC\NR
\NC rightedge \NC dimension
\NC This space located right to the right margin is for screen documents only. \NC\NR
\NC headerdistance \NC dimension
\NC All parameters ending on \dots\type{distance} create white space between adjacent elements. \NC\NR
\NC footerdistance \NC dimension \NC \NC\NR
\NC leftmargindistance \NC dimension \NC \NC\NR
\NC rightmargindistance \NC dimension \NC \NC\NR
\NC leftedgedistance \NC dimension \NC \NC\NR
\NC rightedgedistance \NC dimension \NC \NC\NR
\NC topdistance \NC dimension \NC \NC\NR
\NC bottomdistance \NC dimension \NC \NC\NR
\NC horoffset \NC dimension
\NC A horizontal offset moves the complete layout horizontally, starting from the place indicated by the parameter \type{location}. \NC\NR
\NC veroffset \NC dimension
\NC A vertical offset moves the complete layout vertically, starting from the place indicated by the parameter \type{location}. \NC\NR
\NC style \NC normal bold slanted boldslanted type cap small... COMMAND
\NC With the style parameter one can setup the general style of the font(s) used in the document.\NC\NR
\NC marking \NC on off color screen TEXT
\NC When this parameter is set to \type{on}, then crop marks are placed around the page. \type{Color} displays a color bar, whereas \type{screen} shows a gray-values bar.\NC\NR %TEXT geeft nog in MKII nog in MKIV resultaat.
\NC location \NC left middle right bottom top singlesided doublesided duplex %duplex ontbreekt in de paramter lijst
\NC \type{location} determines where the page is placed on the paper. It allows to typeset single and double sided documents and documents for duplex printing (\in{see:}[printing]). \NC\NR
\NC scale \NC number
\NC With \type{scale} it is possible to scale a page before placing it on the defined paper. \NC\NR
\NC nx \NC number
\NC In case that a given text should be placed multiple times on a defined paper, \type{nx} gives the number of pages on the x-axis and \type{ny} the number of pages on the y-axis. \NC\NR
\NC ny \NC number \NC \NC\NR
\NC dx \NC dimension
\NC With \type{dx} and \type{dy} the distances of the pages indicated in \type{nx} and \type{ny} can be manipulated. \NC\NR
\NC dy \NC dimension \NC \NC\NR
\NC lines \NC number
\NC Determines the textheight in terms of the number of lines-heights. \NC\NR
\NC columns \NC number \NC \NC\NR % Geen effect nog in MKII nog in MKIV
\NC columndistance \NC dimension \NC \NC\NR % Geen effect nog in MKII nog in MKIV
\NC grid \NC yes no
\NC Typsetting on the grid is activated with grid=on. \NC\NR
\NC bottomspace \NC dimension
\NC \type{Bottomspace} increases the white space at the bottom of the page without altering the page-layout. \NC\NR
\NC cutspace \NC dimension
\NC \type{Cutspace} increases the white space at the right side of the page without altering the page-layout. \NC\NR
\NC textdistance \NC dimension \NC \NC\NR
\NC textwidth \NC dimension \NC \NC\NR
\NC textmargin \NC dimension \NC \NC\NR
\NC clipoffset \NC dimension \NC \NC\NR
\NC page \NC identifier \NC \NC\NR
\NC paper \NC identifier \NC \NC\NR
\stoptabulate
In order to get information on the current settings the following
commands can be issued:
\showsetup{showframe}
The dimensions can be displayed by:
\showsetup{showsetups}
A multi||page combination of both is generated with:
\showsetup{showlayout}
The width of a text is available as \type{\hsize} and the
height as \type{\vsize}. To be on the safe side one can
better use \CONTEXT 's \type{\dimen}||registers \type{\textwidth}
and \type{\textheight}, \type{\makeupwidth} and
\type{\makeupheight}.
When we are typesetting in one column of text
\type{\textwidth} and \type{\makeupwidth} are identical. In
case of a two columned text the \type{\textwidth} is
somewhat less than half the \type{makeupwidth}. The
\type{\textheight} is the \type{\makeupheight} minus the
height of the header and footer.
\placetable{Some \type{\dimen} variables}
\starttable[|l|l|]
\HL
\VL \bf variable \VL \bf meaning \VL\SR
\HL
\VL \type{\makeupwidth} \VL width of a text \VL\FR
\VL \type{\makeupheight} \VL height of a text \VL\MR
\VL \type{\textwidth} \VL width of a column \VL\MR
\VL \type{\textheight} \VL height $-$ header $-$ footer \VL\LR
\HL
\stoptable
There are also other dimensions available like \type
{\leftmarginwidth} and \type {\footerheight}, but be aware
of the fact that you can only use these variables, you can
not set them up. The width of a figure could for instance be
specified as \type {width=.9\leftmarginwidth}.
Basically documents are typeset automatically. However,
in some cases the output would become much better if a line
would be moved to another page. For these situations you can
adjust the layout temporarily (just for that page) by
typing:
\showsetup{adaptlayout}
The use of this command should be avoided inside a text, because after
altering your document the adjustment could possibly not be necessary
anymore. So, if you use this command, use it at the top of
your document. For example:
\startexample
\starttyping
\adaptlayout[21,38][height=+.5cm]
\stoptyping
\stopexample
The layout of page~21 and~38 will temporarily be 0.5~cm
higher though the footer will be maintained at the same
height. The numbers to be specified are the page numbers in the
output file.
If the layout is disturbed you can reset the layout by:
\startexample
\starttyping
\setuplayout[reset]
\stoptyping
\stopexample
In some commands you can set up the parameters \type{width}
and \type{height} with the value \type{fit}. In that case
the width and height are calculated automatically.
On the next pages we will show a number of \cap{A5} page
layouts centered on an \cap{A4}. The default setups
(dimensions) are adequate for standard documents like
manuals and papers. The setup adjusts automatically to the
paper size. Note the use of \type{middle} while setting up
the parameters width and height.
%\ShowArrangementA {co-en-1} {The default text||on||page (single sided).}
%\ShowArrangementA {co-en-2} {The default text||on||page (double sided).}
%\ShowArrangementA {co-en-3} {The default text||on||page (single--double sided).}
%\ShowArrangementA {co-en-4} {Automatically centered text||on||page.}
%\ShowArrangementA {co-en-5} {A non symmetric text||on||page.}
%\ShowArrangementA {co-en-6} {A text without \type{footerheight}.}
%\ShowArrangementA {co-en-7} {A text placed on a grid.}
\page
\bgroup
\setuplayout
[grid=yes]
\showgrid
\setupwhitespace
[line]
\setupfootnotes
[location=columns,
rule=off,
background=screen,
frame=off,
framecolor=blue]
\section[grids]{Grids}
\index{grid}
\index{linespace}
\index{footnotes}
\index{columns}
\index{align}
\macro{\tex{placeongrid}}
\doifmode{mkii}{\macro{\tex{moveongrid}}}
\macro{\tex{showgrid}}
There are many ways to align text on a page. Look at the
example below and notice the vertical alignment of the words
and the white space between the words on the mini pages.
\placefigure{none}{\getbuffer[grid-1]}
The first three alternatives result in an undesired output.
The fourth alternative will lead to pages with unequal length.
So we rather make the white space between the lines a little
stretchable.\footnote{Hey, watch this. A footnote!}
\placefigure{none}{\getbuffer[grid-2]}
\startcolumns
A stretchable line spacing has the disadvantage that lines of
two pages or two columns that are displayed close to
each other, will seldom align. This is very disturbing for a
reader.\footnote{Here! Another footnote.}
In those situations we prefer to typeset on a grid. The
means to do this in \TEX\ are very limited but \CONTEXT\ has
some features to support grid typesetting.\footnote{Finally,
the last footnote!}
\stopcolumns
During typesetting on a grid the heads, figures, formulas
and the running text are set on a fixed line spacing. If a
typographical component for any reason is not placed on the
grid one can snap this component to the grid with:
\startbuffer
\placeongrid{\framed{This is like a snapshot.}}
\stopbuffer
\startexample
\typebuffer
\stopexample
This will result in:
\startreality
\color[blue]{\getbuffer}
\stopreality
This mechanism can be influenced with an argument:
\startbuffer
\placeongrid[bottom]{\framed{Do you like the snapshot?}}
\stopbuffer
\startexample
\typebuffer
\stopexample
Now an empty line will appear below the framed text.
Other parameters are: \type{top} and \type{both}.
The last parameter divides the linespace between over and
below the framed text.
\startbuffer
\placeongrid[both]{\framed{Now the snapshot looks better.}}
\stopbuffer
\startreality
\color[blue]{\getbuffer}
\stopreality
These examples don't show pretty typesetting. The reason is
that \type{\framed} has no depth because \TEX\ handles
spacing before and after a line in a different way than
text. \CONTEXT\ has a solution to this:
\startbuffer
\startlinecorrection
\framed{This is something for hotshots.}
\stoplinecorrection
\stopbuffer
\startexample
\typebuffer
\stopexample
The command \type{\startlinecorrection} tries to typeset
the lines as good as possible and takes the use of grid in
account.
\startreality
\color[blue]{\getbuffer}
\stopreality
Because line correction takes care of the grid we have to use
yet another command to stretch the framed text:
\startnotmode[mkiv]
\startbuffer
\moveongrid[both]
\startlinecorrection
\framed{Anyhow it is good to know how this works.}
\stoplinecorrection
\stopbuffer
\stopnotmode
\startmode[mkiv]
\startbuffer
\startlinecorrection
\framed{Anyhow it is good to know how this works.}
\stoplinecorrection
\stopbuffer
\stopmode
\startexample
\typebuffer
\stopexample
As you can see this results in somewhat more space:
\startreality
\color[blue]{\getbuffer}
\stopreality
For test purposes one can display the grid with the command
\type{\showgrid}. So grid related commands are:
\showsetup{placeongrid}
\doifmode{mkii}{\showsetup{moveongrid}}
\showsetup{showgrid}
\page
\setuplayout[grid=no]
\egroup
\section[printing]{Printing}
\index{printing}
\doifmode{mkii}{\macro{\tex{showprint}}}
In an earlier section we used page and paper dimensions. In
this section we will discuss how these two can be manipulated
to yield a good output on paper.
% \startnotmode[mkiv]
\startpostponing
\placefigure
[here][fig:page composition 1]
{Manipulating the page composition with \type{\setuplayout}.}
{\switchtobodyfont[7pt]\getbuffer[print-1]}
\placefigure
[here][fig:page composition 2]
{Manipulating the page composition with \type{\setuppapersize}.}
{\switchtobodyfont[7pt]\getbuffer[print-2]}
\stoppostponing
% \stopnotmode
In \in{figure}[fig:page composition 1] \in{and}[fig:page
composition 2] we see some alternatives to manipulate the
page composition by means of \type {\setuppapersize}
and\type {\setuplayout}. So it is possible to put a page in
a corner or in the middle of the paper, to copy a page and
to use cutting marks.
When the parameter paper size is set to \type{landscape}
width and height are interchanged. This is not the same as
rotation! Rotation is done by typing \type{90}, \type{180}
and \type{270} in the first argument of
\type{\setuppapersize}.
\startexample
\starttyping
\setuppapersize[A5,landscape][A4]
\stoptyping
\stopexample
These examples don't show that we can correct for duplex
printing. For example when we type:
\startexample
\starttyping
\setuppapersize[A5][A4]
\setuplayout[location=middle,marking=on]
\stoptyping
\stopexample
the front and back side will be placed in the middle of the
paper. The markings enable you to cut the paper at the
correct size. If we only want to cut twice, we type:
\starttyping
\setupppapersize[A5][A4]
\setuplayout[location=duplex]
\stoptyping
This has the same meaning as \type{{duplex,left}}. At this
setup \CONTEXT\ will automatically move front and back side
to the correct corner. In \in{figure}[fig:cut paper] we show
both alternatives.
\startbuffer
\startcombination[4]
{\framed[width=2cm,height=3cm,offset=overlay]
{\hbox to \hsize
{\framed[width=1.5cm,height=2cm,background=screen]{}\hss}\vfill}}
{right}
{\framed[width=2cm,height=3cm,offset=overlay]
{\hbox to \hsize
{\hss\framed[width=1.5cm,height=2cm,background=screen]{}}\vfill}}
{left}
{\framed[width=2cm,height=3cm]
{\framed[width=1.5cm,height=2cm,background=screen]{}}}
{right}
{\framed[width=2cm,height=3cm]
{\framed[width=1.5cm,height=2cm,background=screen]{}}}
{left}
\stopcombination
\stopbuffer
\placefigure
[here]
[fig:cut paper]
{Positioning the page on paper for cutting.}
{\getbuffer}
Rotating, mirroring, scaling, duplicating and placing pages
on paper are independent operations. By combining these
operations the desired effects can be reached. Rotating and
mirroring and page and paper size are set up at the same
time. The other operations are set up with
\type{\setuplayout}.
\startmode[mkii]
\showsetup{showprint}
You can use \type{\showprint} to get an idea of how your
print will look. However, it is just a representation of the
real page as is shown in the examples above.
\startexample
\starttyping
\showprint[mirrored][90][location=middle]
\stoptyping
\stopexample
\stopmode
\section{Arranging pages}
\index{arranging}
% \doifmode{mkii}{\macro{\tex{setuparranging}}}
%
% By means of \type{\setuplayout} one can arrange pages on a
% sheet of paper. A special arrangement for example is that
% for booklets.
%
% \doifmode{mkii}{\showsetup{setuparranging}}
%
% We will show some page arrangements on the next pages. If you
% want to understand how it really works you should try this
% yourself one day.
%
% \startpostponing
%
% \placefigure {The \type{2*8} arrangement.} {\getbuffer[pag-16]}
% \placefigure {The \type{2*4} arrangement.} {\getbuffer[pag-8]}
% \placefigure {The \type{2*2} arrangement.} {\getbuffer[pag-4]}
% \placefigure {The \type{2UP} arrangement.} {\getbuffer[pag-2up]}
% \placefigure {The \type{2DOWN} arrangement.} {\getbuffer[pag-2down]}
% \stoppostponing
Simplified we can say that \TEX\ typesets pages. If the typeset material should become a book, then there are two options. Firstly the book will be produced on multiple sheets carrying only one page either on one or on both sides of the sheet. Second option is to produce arrangements of multiple pages per sheet of paper which will be folded into sections, using imposition schemes.
\CONTEXT\ offers tools to achieve both options.
In the following table an overview is given about all currently available arranging schemes.
\starttabulate[|l|p|]
\NC Key for \type{\setuparranging} \NC Meaning \NC\NR
\HL
\NC \type{[2SIDE]} \NC 2 pages next to each other single sided only! \NC\NR
\NC \type{[2TOP]} \NC 2 pages above each other, single sided only! \NC\NR
\NC \type{[1*8]} \NC 1 sheet 1 x 8 pages = 8 pages single sided! \NC\NR
\NC \type{[1*4]} \NC 1 sheet 1 x 4 pages = 4 pages single sided! \NC\NR
\NC \type{[1*2*Conference]} \NC 2 pages on top of each other, 1 page rotated \NC\NR
\NC \type{[1*4*Conference]} \NC 2 odd pages next to each other, even page rotated on top \NC\NR
\NC \type{[XY]} \NC Arrangement in nx columns and ny rows, uses the setup \type{\setuppaper[dx=,dy=,nx=,ny=]} \NC\NR
\NC \type{[2UP]} \NC 2 pages next to each other, n sheets arranged for a single booklet! \NC\NR
\NC \type{[2DOWN]} \NC 2 pages above each other, n sheets arranged for a single booklet! \NC\NR
\NC \type{[2TOPSIDE]} \NC 2 odd pages on one side, 2 even pages verso, above each other \NC\NR
\NC \type{[2*16]} \NC Section: one sheet 2 x 16 pages = 32 pages \NC\NR
\NC \type{[2*8]} \NC Section: one sheet 2 x 8 pages = 16 pages \NC\NR
\NC \type{[2*8*Z]} \NC Section: one sheet 2 x 8 pages = 16 pages, special folding: zig-zag \NC\NR
\NC \type{[2*6*Z]} \NC Section: one sheet 2 x 6 pages = 12 pages, special folding: zig-zag \NC\NR
\NC \type{[2*4]} \NC Section: one sheet 2 x 4 pages = 8 pages \NC\NR
\NC \type{[2*2]} \NC Section: one sheet 2 x 2 pages = 4 pages \NC\NR
\NC \type{[2**2]} \NC Section: one sheet 2 x 2 pages = 4 pages \NC\NR
\NC \type{[2*4*2]} \NC Section of 16 pages: 2 sheets, 4 pages front and backside \NC\NR
\NC \type{[2*2*4]} \NC Section of 16 pages: 4 sheets, 2 pages front and backside \NC\NR
\NC \type{[3SIDE]} \NC 3 odd pages recto, 3 even pages verso \NC\NR
\NC \type{[2*2*2]} \NC Section: two sheets 2 x 2 pages = 8 pages \NC\NR
\NC \type{[2*2*3]} \NC Section: three sheets 2 x 2 pages = 12 pages \NC\NR
\NC \type{[TRYPTICHON]} \NC Leaflet: one sheet 2 x 3 pages = 6 pages \NC\NR
\NC \type{[DOUBLEWINDOW]} \NC Leaflet: one sheet 2 x 4 pages = 8 pages \NC\NR
\NC \type{[ZFLYER-8]} \NC Leaflet: one sheet 2 x 4 pages = 8 pages \NC\NR
\NC \type{[ZFLYER-10]} \NC Leaflet: one sheet 2 x 5 pages = 10 pages \NC\NR
\NC \type{[ZFLYER-12]} \NC Leaflet: one sheet 2 x 6 pages = 12 pages \NC\NR
\NC \type{[MAPFLYER-12]} \NC Leaflet: one sheet 2 x 6 pages = 12 pages \NC\NR
\stoptabulate
When talking about book-printing the industry produces different kinds of sections, consisting commonly out of 32 or 16 pages. Consider, that sections of 32 pages may be quite thick. At binding if the sections are sewn and the spine is rounded the fore edge can become stepped. This is aesthetically less satisfying. Best results are normally obtained with sections of 16 pages.
For special purposes or in case of special papers also less than 16 pages per section are arranged.
The command to arrange pages with \CONTEXT\ is
\macro{\tex{setuparranging}}
For (standard) sections the following list of schemes is available:
\setuptabulate[EQ={=}]
\starttabulate[|l|p|p|]
\NC \bf Arrangement \NC \bf Result \NC \bf Number of pages \NC\NR
\NC \type{\setuparranging[2*16] } \NC section: one sheet $2 \times 16$ pages \EQ 32 pages \NC\NR
\NC \type{\setuparranging[2*8] } \NC section: one sheet $2 \times 8$ pages \EQ 16 pages \NC\NR
\NC \type{\setuparranging[2*4] } \NC section: one sheet $2 \times 4$ pages \EQ 8 pages \NC\NR
\NC \type{\setuparranging[2*2] } \NC section: one sheet $2 \times 2$ pages \EQ 4 pages \NC\NR
\NC \type{\setuparranging[2**2] } \NC section: one sheet $2 \times 2$ pages \EQ 4 pages \NC\NR
\NC \type{\setuparranging[2*8*Z]} \NC section: one sheet $2 \times 8$ pages \EQ 16 pages, special folding: zig-zag \NC\NR
\NC \type{\setuparranging[2*6*Z]} \NC section: one sheet $2 \times 6$ pages \EQ 12 pages, special folding: zig-zag \NC\NR
\NC \type{\setuparranging[2*4*2]} \NC section: 2 sheets, 4 pages front and backside \EQ 16 pages\NC\NR
\NC \type{\setuparranging[2*2*4]} \NC section: 4 sheets, 2 pages front and backside \EQ 16 pages \NC\NR
\NC \type{\setuparranging[2*2*2]} \NC section: 2 sheets $2 \times 2$ pages \EQ 8 pages \NC\NR
\NC \type{\setuparranging[2*2*3]} \NC section: 3 sheets $2 \times 2$ pages \EQ 12 pages \NC\NR
\stoptabulate
On the following pages we show pictures of arranged pages for the mentioned imposition schemes.
\startpostponing
\placefigure
[middle]
[]
{32 pages} %\type{\setuparranging[2*16]}}
{\startcombination[2*1]
{\externalfigure[2x16][page=1,width=.45\textwidth]}{recto}
{\externalfigure[2x16][page=2,width=.45\textwidth]}{verso}
\stopcombination}
\placefigure
[middle]
[]
{16 pages} % \type{\setuparranging[2*8]}}
{\startcombination[2*1]
{\externalfigure[2x8][page=1,width=.45\textwidth]}{recto}
{\externalfigure[2x8][page=2,width=.45\textwidth]}{verso}
\stopcombination}
\stoppostponing
The above mentioned imposition schemes are meant for the professional printing industry.
But also with an office printer one can produce sections. Sections with less than 16 pages can be produced with the following folding schemes:
\placefigure
[middle]
[]
{8 pages} % \type{\setuparranging[2*4]}}
{\startcombination[2*1]
{\externalfigure[2x4][page=1,width=.45\textwidth]}{recto}
{\externalfigure[2x4][page=2,width=.45\textwidth]}{verso}
\stopcombination}
\placefigure
[middle]
[fig:2x2]
{4 pages} % \type{\setuparranging[2*2]}}
{\startcombination[2*1]
{\externalfigure[2x2][page=1,width=.45\textwidth]}{recto}
{\externalfigure[2x2][page=2,width=.45\textwidth]}{verso}
\stopcombination}
\placefigure
[middle]
[fig:2xx2]
{4 pages} % \type{\setuparranging[2**2]}}
{\startcombination[2*1]
{\externalfigure[2xx2][page=1,width=.45\textwidth]}{recto}
{\externalfigure[2xx2][page=2,width=.45\textwidth]}{verso}
\stopcombination}
The last two examples (\in{Figure}[fig:2x2] and \in{}[fig:2xx2]) differ only in the fact, that the verso side carries the two pages in reversed order.
The simplest version of a section is booklet-printing. In this case all pages are arranged in such a way, that with a single fold a booklet is formed.
\starttabulate[|l|p|]
\NC \bf Arrangement \NC \bf Result \NC \bf Number of pages \NC\NR
\NC \type{\setuparranging[2UP]} \NC 2 pages next to each other, n sheets arranged for a single booklet \NC\NR
\NC \type{\setuparranging[2DOWN]} \NC 2 pages above each other, n sheets arranged for a single booklet \NC\NR
\stoptabulate
\quote{2UP} results in a booklet with the fold on the long egde of the page. \quote{2DOWN} gives a booklet with a short-edge binding of the pages.
\startpostponing
\placefigure
[middle]
[]
{2 UP booklet: long edge binding} % \type{\setuparranging[2UP]}}
{\startcombination[2*1]
{\externalfigure[2UP][page=1,width=.45\textwidth]}{recto}
{\externalfigure[2UP][page=2,width=.45\textwidth]}{verso}
\stopcombination}
\placefigure
[middle]
[]
{2 DOWN booklet: short edge binding} % \type{\setuparranging[2DOWN]}}
{\startcombination[2*1]
{\externalfigure[2DOWN][page=1,width=.45\textwidth]}{recto}
{\externalfigure[2DOWN][page=2,width=.45\textwidth]}{verso}
\stopcombination}
\stoppostponing
For those who want to print their own book with sections on the office printer \CONTEXT\ offers four schemes which use 2, 3 and 4 sheets of paper respectively to form a section.
\starttabulate[|l|l|r|]
\NC \bf Arrangement \NC \bf Result \NC \bf Number of pages \NC\NR
\NC \type{\setuparranging[2*4*2]} \NC section: 2 sheets, 4 pages front and backside \EQ 16 pages\NC\NR
\NC \type{\setuparranging[2*2*4]} \NC section: 4 sheets, 2 pages front and backside \EQ 16 pages \NC\NR
\NC \type{\setuparranging[2*2*2]} \NC section: 2 sheets $2 \times 2$ pages \EQ 8 pages \NC\NR
\NC \type{\setuparranging[2*2*3]} \NC section: 3 sheets $2 \times 2$ pages \EQ 12 pages \NC\NR
\stoptabulate
\startpostponing
\placefigure
[middle]
[]
{16 pages, 2 sheets} % \type{\setuparranging[2*4*2]}}
{\startcombination[2*2]
{\externalfigure[2x4x2][page=1,width=.45\textwidth]}{1\high{st} sheet recto}
{\externalfigure[2x4x2][page=2,width=.45\textwidth]}{1\high{st} sheet verso}
{\externalfigure[2x4x2][page=3,width=.45\textwidth]}{2\high{nd} sheet recto}
{\externalfigure[2x4x2][page=4,width=.45\textwidth]}{2\high{nd} sheet verso}
\stopcombination}
\placefigure
[middle]
[]
{16 pages, 4 sheets} % \type{\setuparranging[2*2*4]}}
{\startcombination[2*4]
{\externalfigure[2x2x4][page=1,height=.2\textheight]}{1\high{st} sheet recto}
{\externalfigure[2x2x4][page=2,height=.2\textheight]}{1\high{st} sheet verso}
{\externalfigure[2x2x4][page=3,height=.2\textheight]}{2\high{nd} sheet recto}
{\externalfigure[2x2x4][page=4,height=.2\textheight]}{2\high{nd} sheet verso}
{\externalfigure[2x2x4][page=5,height=.2\textheight]}{3\high{rd} sheet recto}
{\externalfigure[2x2x4][page=6,height=.2\textheight]}{3\high{rd} sheet verso}
{\externalfigure[2x2x4][page=7,height=.2\textheight]}{4\high{th} sheet recto}
{\externalfigure[2x2x4][page=8,height=.2\textheight]}{4\high{th} sheet verso}
\stopcombination}
\placefigure
[middle]
[]
{8 pages, 2 sheets} % \type{\setuparranging[2*2*2]}}
{\startcombination[2*2]
{\externalfigure[2x2x2][page=1,height=.2\textheight]}{1\high{st} sheet recto}
{\externalfigure[2x2x2][page=2,height=.2\textheight]}{1\high{st} sheet verso}
{\externalfigure[2x2x2][page=3,height=.2\textheight]}{2\high{nd} sheet recto}
{\externalfigure[2x2x2][page=4,height=.2\textheight]}{2\high{nd} sheet verso}
\stopcombination}
\placefigure
[middle]
[]
{12 pages, 3 sheets} % \type{\setuparranging[2*2*3]}}
{\startcombination[2*3]
{\externalfigure[2x2x3][page=1,height=.2\textheight]}{1\high{st} sheet recto}
{\externalfigure[2x2x3][page=2,height=.2\textheight]}{1\high{st} sheet verso}
{\externalfigure[2x2x3][page=3,height=.2\textheight]}{2\high{nd} sheet recto}
{\externalfigure[2x2x3][page=4,height=.2\textheight]}{2\high{nd} sheet verso}
{\externalfigure[2x2x3][page=5,height=.2\textheight]}{3\high{rd} sheet recto}
{\externalfigure[2x2x3][page=6,height=.2\textheight]}{3\high{rd} sheet verso}
\stopcombination}
\stoppostponing
Yet another way to print sections is to use z-folding, which is a zig-zag folding combined with a single fold in the spine. \CONTEXT\ comes with two types of sections, one with 12 pages and one with 16 pages.
\startpostponing
\placefigure
[middle]
[]
{12 pages z-folding} % \type{\setuparranging[2*6*Z]}}
{\startcombination[2*1]
{\externalfigure[2x6xZ][page=1,width=.45\textwidth]}{recto}
{\externalfigure[2x6xZ][page=2,width=.45\textwidth]}{verso}
\stopcombination}
\placefigure
[middle]
[]
{16 pages z-folding} % \type{\setuparranging[2*6*Z]}}
{\startcombination[2*1]
{\externalfigure[2x8xZ][page=1,width=.45\textwidth]}{recto}
{\externalfigure[2x8xZ][page=2,width=.45\textwidth]}{verso}
\stopcombination}
\stoppostponing
Next to the imposition schemes involving folding \CONTEXT\ offers possibilities to arrange pages in such a way, that after cutting the pile of sheets book blocks can be assembled. The resulting book block consists of loose sheets of paper and will be glued along the spine to prepare e.g. a paperback.
\CONTEXT\ has an arranging scheme for two odd pages above each other and two even pages on the backside of the sheet. In order to build the book block the sheets need to be cut and the the two piles must be merged.
\starttabulate[|l|p|r|]
\NC \bf Arrangement \NC \bf Result \NC \bf Number of pages \NC\NR
\NC \type{\setuparranging[2TOPSIDE] } \NC recto 2 odd pages, verso 2 even pages per sheet \EQ 4 pages \NC\NR
\stoptabulate
\startpostponing
\placefigure
[middle]
[]
{4 pages, 1 sheet} %\type{\setuparranging[2TOPSIDE]}}
{\startcombination[2*1]
{\externalfigure[2TOPSIDE][page=1,width=.45\textwidth]}{recto}
{\externalfigure[2TOPSIDE][page=2,width=.45\textwidth]}{verso}
\stopcombination}
\stoppostponing
The following schemes can be used for the preparation of handouts from presentations. They also can be used to assemble book blocks after cutting and merging the piles.
The first scheme arranges 4 pages on the front side of the sheet.
The second scheme puts two pages on the front side of a sheet next to each other.
The third scheme works like the previous one but instead of putting the pages next to each other the pages are placed on top of each other.
\starttabulate[|l|l|r|]
\NC \bf Arrangement \NC \bf Result \NC \bf Number of pages \NC\NR
\NC \type{\setuparranging[1*4] } \NC one sheet recto $4$ pages \EQ 4 pages \NC\NR
\NC \type{\setuparranging[2SIDE]} \NC one sheet recto $2$ pages \EQ 2 pages \NC\NR
\NC \type{\setuparranging[2TOP] } \NC one sheet recto $2$ pages \EQ 2 pages \NC\NR
\stoptabulate
\startpostponing
\placefigure
[middle]
[]
{4 pages, singlesided, 1 sheet} % \type{\setuparranging[1*4]
{\externalfigure[1x4][page=1,width=.45\textwidth]}
\placefigure
[middle]
[]
{2 pages, single sided, 1 sheet} % \type{\setuparranging[2Side]} and \type{\setuparranging[2TOP]}
{\startcombination[2*1]
{\externalfigure[2SIDE][page=1,width=.45\textwidth]}{\type{\setuparranging[2SIDE]}}
{\externalfigure[2TOP][page=1,width=.45\textwidth]}{\type{\setuparranging[2TOP]}}
\stopcombination}
\stoppostponing
There are a couple of arranging schemes for special purposes. The first one places 8 pages on the recto side of the
paper. It is intentioned for single sided prints only. The arrangement is made in such a way, that it is possible to fold the paper into a booklet, where while turning the pages now empty pages are shown.
\starttabulate[|l|l|r|]
\NC \bf Arrangement \NC \bf Result \NC \bf Number of pages \NC\NR
\NC \type{\setuparranging[1*8]} \NC \quotation{section}: one sheet $1 \times 8$ pages \EQ 8 pages \NC\NR
\stoptabulate
\startpostponing
\placefigure
[middle]
[]
{8 pages, single sided, 1 sheet} % \type{\setuparranging[1*8]}
{\externalfigure[1x8][page=1,width=.45\textwidth]}
\stoppostponing
For those who will have to produce name-card displays for e.g. conferences or for the preparation of menue-displays in a restaurant the following schemes might be of use.
\starttabulate[|l|p|]
\NC \bf Arrangement \NC \bf Result \NC\NR
\NC \type{\setuparranging[1*2*Conference]} \NC one sheet 2 pages on top of each other, 1 page rotated \NC\NR
\NC \type{\setuparranging[1*4*Conference]} \NC one sheet 2 odd pages next to each other, even page rotated on top \NC\NR
\stoptabulate
\startpostponing
\placefigure
[middle]
[]
{Display cards} % \type{\setuparranging[1*2*Conference]} and \type{\setuparranging[1*4*Conference]}
{\startcombination[2*1]
{\externalfigure[1x2xConference][page=1,width=.45\textwidth]}{1 card with 2 pages}
{\externalfigure[1x4xConference][page=1,width=.45\textwidth]}{1 card with 4 pages}
\stopcombination}
\stoppostponing
There are diary systems, where three pages are place next to each other. The following scheme provides this arranging scheme:
\starttabulate[|l|l|r|]
\NC \bf Arrangement \NC \bf Result \NC \bf Number of pages \NC\NR
\NC \type{\setuparranging[3SIDE]} \NC 3 odd pages recto, 3 even pages verso \EQ 6 pages \NC\NR
\stoptabulate
\startpostponing
\placefigure
[middle]
[]
{3 pages per side} % \type{\setuparranging[3SIDE]}
{\startcombination[2*1]
{\externalfigure[3SIDE][page=1,width=.45\textwidth]}{3 pages recto}
{\externalfigure[3SIDE][page=1,width=.45\textwidth]}{3 pages verso}
\stopcombination}
\stoppostponing
\CONTEXT\ can also arrange pages for the production of flyers. There is a great variety of such flyers. \CONTEXT\ supports flyers with 6, 8, 10 and 12 pages. It is also possible to make a flyer with 12 pages which is folded like a map.
\starttabulate[|l|l|r|]
\NC \bf Arrangement \NC \bf Result \NC \bf Number of pages \NC\NR
\NC \type{\setuparranging[TRYPTICHON]} \NC Leaflet: one sheet $2 \times 3$ pages \EQ 6 pages \NC\NR
\NC \type{\setuparranging[DOUBLEWINDOW]}\NC Leaflet: one sheet $2 \times 4$ pages \EQ 8 pages \NC\NR
\NC \type{\setuparranging[ZFLYER-8]} \NC Leaflet: one sheet $2 \times 4$ pages \EQ 8 pages \NC\NR
\NC \type{\setuparranging[ZFLYER-10]} \NC Leaflet: one sheet $2 \times 5$ pages \EQ 10 pages \NC\NR
\NC \type{\setuparranging[ZFLYER-12]} \NC Leaflet: one sheet $2 \times 6$ pages \EQ 12 pages \NC\NR
\NC \type{\setuparranging[MAPFLYER-12]} \NC Leaflet: one sheet $2 \times 6$ pages \EQ 12 pages \NC\NR
\stoptabulate
\startpostponing
\placefigure
[middle]
[]
{Tryptichon type of flyer} % \type{\setuparranging[TRYPTICHON]}
{\startcombination[1*2]
{\externalfigure[Tryptichon][page=1,width=.45\textwidth]}{3 pages recto}
{\externalfigure[Tryptichon][page=1,width=.45\textwidth]}{3 pages verso}
\stopcombination}
\placefigure
[middle]
[]
{Double window type of flyer} % \type{\setuparranging[DOUBLEWINDOW]}
{\startcombination[1*2]
{\externalfigure[Doublewindow][page=1,width=.45\textwidth]}{4 pages recto}
{\externalfigure[Doublewindow][page=1,width=.45\textwidth]}{4 pages verso}
\stopcombination}
\stoppostponing
As a representative of the Z-folded flyers the flyer with 8 pages is shown.
\startpostponing
\placefigure
[middle]
[]
{Z-folded type of flyer} % \type{\setuparranging[ZFLYER-8]}
{\startcombination[1*2]
{\externalfigure[Zflyer-8][page=1,width=.45\textwidth]}{4 pages recto}
{\externalfigure[Zflyer-8][page=1,width=.45\textwidth]}{4 pages verso}
\stopcombination}
\placefigure
[middle]
[]
{Map type of flyer} % \type{\setuparranging[3SIDE]}
{\startcombination[1*2]
{\externalfigure[Mapflyer-12][page=1,width=.45\textwidth]}{6 pages recto}
{\externalfigure[Mapflyer-12][page=1,width=.45\textwidth]}{6 pages verso}
\stopcombination}
\stoppostponing
Last but not least is the X-Y-arrangement of pages.
This scheme is intended for the placement of a number of pages in sequence on a single sided sheet of paper e.g. on sheets carrying labels or for the placement of other information which must return several times on a sheet.
Before issuing the command \type{\setuparranging[XY]} the xy-arrangement must be setup. For this purpose the command
\type{\setuppaper[...]} is used.
\showsetup{setuppaper}
\quote{nx} denominates the number of pages in the x-direction and \quote{ny} determines the number of pages in the y-direction. With \quote{dx} and \quote{dy} the whitespace between the pages in x and y direction can be set.
\starttabulate[|p|l|r|]
\NC \bf Arrangement \NC \bf Result \NC \bf Number of pages \NC\NR
\NC \type{\setuparranging[XY]} + \par \type{\setuppaper[dx=,dy=,nx=,ny=]} \NC $nx \times ny$ pages, single sided \EQ n $\times$ m pages \NC\NR
\stoptabulate
\startpostponing
\placefigure
[middle]
[]
{8 pages, singlesided, 1 sheet, XY-arrangement}
{\externalfigure[XY][page=1,width=.4\textwidth]}
\stoppostponing
There is culprit in arranging pages. If multiple layers of paper are folded, the outermost paper will require more width because it has to turn around the inner paper layers. This effect occurs as well in the spine folds as also in the head folds. How much width is required depends on the number of folds and the thickness of the paper. In professional book printing this effect is accounted for by displacing the pages depending on their position in horizontal and vertical direction. The result is that there will be a perfect look-through registering of all pages. There are no simple rules to indicate the required amount of displacement. Mostly it is a matter of experience to set up the page shift information.
\CONTEXT\ is equipped with a mechanism, which allows to move pages on a sheet apart from each other in horizontal as well as in vertical direction. The mechanism is build on two shift-lists, one for horizontal and one for vertical page shifting. The mechanism works through cycling over the lists which contain a shift amount for each page in a section. For filling in such a shift-list knowledge and understanding the position of a page on the printed sheet is necessary.
In order to use a horizontal shift list this list must be defined and setup.
For a section of 16 pages a horizontal shift list is filled in where for each page the amount of displacement is given. Such a list could look as follows:
\starttyping
\definepageshift[Hor][horizontal]
[0.25mm, %1
-0.25mm, %2
0.15mm, %3
-0.15mm, %4
0.05mm, %5
-0.05mm, %6
0mm, %7
0mm, %8
0mm, %9
0mm, %10
0.05mm, %11
-0.05mm, %12
0.15mm, %13
-0.15mm, %14
0.25mm, %15
-0.25mm] %16
\stoptyping
For illustration purposes the following list for horizontal page-shift with exaggerated values is used in a Z-folding with 12 pages.
\starttyping
\definepageshift[Hor][horizontal]
[1mm, %1
-1mm, %2
0.5mm, %3
-0.5mm, %4
0mm, %5
0mm, %6
0mm, %7
0mm, %8
0.5mm, %9
-0.5mm, %10
1mm, %11
-1mm] %12
\stoptyping
\startpostponing
\placefigure
[middle]
[]
{Horizontal page-shift} % \type{\setuparranging[2*6*Z]}}
{\startcombination[2*1]
{\externalfigure[2x6xZ-HOR][page=1,width=.45\textwidth]}{recto}
{\externalfigure[2x6xZ-HOR][page=2,width=.45\textwidth]}{verso}
\stopcombination}
\stoppostponing
In a similar fashion also vertical shift lists can be defined.
\starttyping
\definepageshift[Vert][vertical]
[1.5mm, %1
1.25mm, %2
0.75mm, %3
1.0mm, %4
1.0mm, %5
0.75mm, %6
1.25mm, %7
1.5mm, %8
1.5mm, %9
1.25mm, %10
0.75mm, %11
1.0mm, %12
1.0mm, %13
0.75mm, %14
1.25mm, %15
1.5mm] %16
\stoptyping
For each page in a section the shift amount must be indicated. The above presented list has exaggerated values just for making clear what happens:
\startpostponing
\placefigure
[middle]
[]
{Vertical page-shift} %\type{\setuparranging[2*8]}}
{\startcombination[2*1]
{\externalfigure[2x8-VER][page=1,width=.45\textwidth]}{recto}
{\externalfigure[2x8-VER][page=2,width=.45\textwidth]}{verso}
\stopcombination}
\stoppostponing
While arranging these lists can be used in the following way:
Only one list is used:
\startexample
\starttyping
\setuppageshift[paper][Hor]
\stoptyping
\stopexample
or
\startexample
\starttyping
\setuppageshift[paper][Vert]
\stoptyping
\stopexample
Both lists are used:
% \startpostponing
\startexample
\starttyping
\setuppageshift[paper][Hor][Vert]
\stoptyping
\stopexample
% \stoppostponing
The next examples show the cooperation of the commands
\type{\setuppapersize}, \type{\setuplayout} and
\type{\setuparranging}.
\startexample
\starttyping
\setuppapersize [A7][A3,mirrored] %negative creates an out of memory error in Acrobat 8.2.2. on the MAc OSX 10.6.3
\setuparranging [2*8,rotated,doublesided]
\setuppagenumbering [alternative=doublesided]
\stoptyping
\stopexample
With the above shown preamble you get sections of 16 pages of the size of A7, where both sides of the A3 paper carry 8 pages \type{[2*8]}. For two reasons the A7 pages must be rotated on the paper. First in this imposition scheme there will be 4 A7 pages next to each other so they need to be aligned along the long edge of the A3. Secondly and this is important for book-printing, the grain direction of the paper must be in the direction of the spine i.e. in the height of the A7. Since A3 has its grain direction normally along the short edge it is correct to rotate the A7 pages. Further more there is the \quote{doublesided} directive in the \type{\setuparranging} command. This is to rotate the whole content of the verso side of the A3 paper by 180\Degrees in order to enable automatic double sided printing on the printing machine. \type{\setuppagenumbering} tells \CONTEXT\ to use a doublesided lay-out, resulting in left and right pages.
Yet there is inside the \type{\setuppapersize} command the directive \quote{mirrored}. Using this directive, the content of the A3 paper is mirrored along the long edge of the paper, this results in mirrored typeset text.
\startexample
\starttyping
\setuppapersize [A5][A3]
\setuparranging [2UP,rotated,doublesided]
\setuppagenumbering [alternative=doublesided]
\stoptyping
\stopexample
What this does is placing two A5 pages side by side on a A3 sheet of paper. Both the page and the paper are in portrait orientation. Because A5 fits better on a A3 when the page is rotated the \type{\setuparranging} command carries the \quote{rotated} directive. The resulting sheet of paper will be printed on an automatic double-sided printing machine. Often these machines require, that the verso side of the paper is printed reversed, this is achieved with \quote{doublesided} in the \type{\setuparranging} command.
Instead of using the \quote{rotated} directive in \type{\setuparanging} you can also say:
\startexample
\starttyping
\setuppapersize [A7][A3,landscape]
\setuparranging [2*8,doublesided]
\setuppagenumbering [alternative=doublesided]
\stoptyping
\stopexample
You rotate the A3 paper by means of the \quote{rotated} directive in \type{\setuppapersize}.
%\ShowArrangementB {co-en-1p} {Arranging: 16.}
%\ShowArrangementB {co-en-2p} {Arranging: negative mirrored 16.}
%\ShowArrangementB {co-en-3p} {Arranging: 8.}
%\ShowArrangementB {co-en-4p} {Arranging: 4.}
%\ShowArrangementB {co-en-5p} {Arranging: 2UP (1).}
%\ShowArrangementB {co-en-6p} {Arranging: 2UP (2).}
%\ShowArrangementB {co-en-7p} {Arranging: 2DOWN.}
There is one thing which should be kept in mind when using \type{\setuparranging}: \TEX\ compilations with \CONTEXT\ are most of the time multi-pass runs. If there is a table of content or other lists, this information is stored in auxiliary files or tables in \LUATEX. In order not to loose the content of those lists it is important to run the file first without the \type{\setuparranging} command enabled. If all went well, run the file a single time with the \type{\setuparranging} command enabled.
\section[logo types]{Logo types}
\index{logo types}
\index{letter heads}
\doifmode{mkii}{\macro{\tex{definelogo}}}
\macro{\tex{placelogos}}
\doifmode{mkiv}{Logos were removed in mkiv.}
\startnotmode[mkiv]
It is possible to place for example company logos at the top
or the bottom of a page. We show some examples on the next
pages. It is advisable to define a command for typesetting a
logo type.
The location of a logo type is defined by:
\start \showframe
\showsetup{definelogo}
All logo types with \type{state=start} are automatically
typeset on the page. A logo can also be recalled by:
\showsetup{placelogos}
In that case only the listed logos are typeset.
\startbuffer
\definelogo
[logo a] [bottom] [left]
[command=left bottom]
\definelogo
[logo d] [top] [left]
[command=left top]
\definelogo
[logo g] [footer] [left]
[command=left footer]
\definelogo
[logo j] [header] [left]
[command=left header]
\placelogos[logo a,logo b,logo c,logo d]
\stopbuffer
\getbuffer
\definelogo
[logo b] [bottom] [middle]
[command=middle bottom]
\definelogo
[logo e] [top] [middle]
[command=middle top]
\definelogo
[logo h] [footer] [middle]
[command=middle footer]
\definelogo
[logo k] [header] [middle]
[command=middle header]
\definelogo
[logo c] [bottom] [right]
[command=right bottom]
\definelogo
[logo f] [top] [right]
[command=right top]
\definelogo
[logo i] [footer] [right]
[command=right footer]
\definelogo
[logo l] [header] [right]
[command=right header]
\placelogos
[logo a,logo b,logo c,logo d,logo e,logo f,
logo g,logo h,logo i,logo j,logo k,logo l]
\setuppagenumbering
[location=inmargin,
state=stop]
\setupfootertexts
\setupheadertexts
On this page a few potential locations of logos are shown.
Temporarily headers and footers of this manual are
suppressed. For example the left logo types are defined by
means of:
\startexample
\typebuffer
\stopexample
Instead of \type{command} we could have chosen \type{text}.
We define the logo with \type{command} because it is evident
that we will use the logo more than once. The example is
discussed below.
First we define a command that generates a small logo.
\startbuffer[a]
\def\ContextLogo%
{\externalfigure[mp-cont.502][height=24pt,method=mps]}
\stopbuffer
\startbuffer[b]
\definelogo
[small logo] [bottom] [middle]
[command=\ContextLogo,state=start]
\stopbuffer
\getbuffer[a]
\getbuffer[b]
\startexample
\typebuffer[a]
\stopexample
If we want to set this logo at the bottom of every page
we type:
\startexample
\typebuffer[b]
\stopexample
This logo is placed at the bottom of every page. In letters
however the logos are located on different positions on the
paper. Again, we define the bigger logo including all
address information. Watch the use of \type{\framed}.
\startbuffer
\def\ContextLetterhead%
{\hbox
{\definefont[ContextFont][RegularBold sa 1.5]%
\ContextFont \setupinterlinespace
\setupframed
[align=middle,top=\vfill,bottom=\vfill,
height=10\bodyfontsize,offset=overlay,frame=off]%
\framed
{The\\Con\TeX t\\Chronicle}%
\externalfigure
[mp-cont.502][height=10\bodyfontsize]%
\framed
{Ridderstraat 27\\8061GH Hasselt NL\\pragma@wxs.nl}}}
\stopbuffer
\getbuffer
\startexample
\typebuffer
\stopexample
We also define the position on the paper:
\startbuffer
\definelogo
[big logo] [header] [right]
[command=\ContextLetterhead]
\stopbuffer
\getbuffer
\startexample
\typebuffer
\stopexample
This letterhead logo should appear only on the first page. So
we simply say:
\startbuffer
\placelogos[big logo]
\stopbuffer
\startexample
\typebuffer
\stopexample
% \page \writestatus{CHECK}{TOP OF PAGE \the \realpageno}
\getbuffer
\dorecurse{8}{\line{\strut}} % en of andere interferentie
You will notice that the smaller logo is not placed at the
bottom of the page because the command \type {\placelogos}
typesets only the listed logos and suppresses all other
logos.
The big logo needs some space on this page so the content of
the letter should be moved to a somewhat lower location. We
do this with the command:
\startexample
\starttyping
\blank[force,8\bodyfontsize]
\stoptyping
\stopexample
\page
\stop
\setuplayout
\placefigure
{The location of header, footer, bottom and top logos on a page.}
{\externalfigure[cont-yy][factor=broad,background=raster,
backgroundraster=1,frame=on,framecolor=PlusColor]}
\chardef\logostatus=0 % make logos go away again
\stopnotmode
\stopcomponent
|