summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/frontespizio/frontespizio.dtx
blob: 5cbf5f71d860a13092f172c3d2c4f67b52bc58cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
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
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
% \iffalse meta-comment
%
% Copyright (C) 2008-2011 by Enrico Gregorio 
% <Enrico dot Gregorio at univr dot it>
% -------------------------------------------------------
% 
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work consists of all files listed in README
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{frontespizio.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<package>\ProvidesPackage{frontespizio}
%<*package>
  [2011/09/21 1.4a (Enrico Gregorio)]
%</package>
%<*driver>
\PassOptionsToClass{a4paper}{article} % we need a4paper
\documentclass{ltxdoc}
\usepackage[T1]{fontenc}
\usepackage[english,italian]{babel}
\usepackage{graphicx,array,booktabs,microtype}
\usepackage{frontespizio}

\newcommand{\pack}[1]{\mbox{\sffamily#1}}
\newcommand{\env}{\texttt}
\newcommand{\file}{\texttt}
\newcommand{\opt}[1]{``\texttt{#1}''}
\newcommand{\frontcommand}[3][f]{%
  \subsection*{\cs{#2}#3%
  \ifx#1o%
    ~(*)%
  \else
  \ifx#1s%
    ~(\textdagger)%
  \fi\fi}%
}
\newcommand{\frontenvironment}[2]{%
  \subsection*{\cs{begin}\ttchar\{\texttt{#1}\ttchar\}\\
    #2\\
    \cs{end}\ttchar\{\texttt{#1}\ttchar\}}}
\makeatletter
\def\meta@font@select{\normalfont\itshape} % I dislike tt italic
\makeatother
\newcommand{\ttchar}[1]{{\normalfont\ttfamily\char`#1}}
\newcommand{\frontoption}[1]{\subsection*{\texttt{#1}}}
\newcommand{\includeex}[1]{\par\vfill\begin{center}
  \setlength{\fboxsep}{0pt}\fbox{\includegraphics[scale=.3]{#1}}
  \end{center}}

\DeclareRobustCommand\Xe{%
  \leavevmode X\lower0.5ex
   \hbox{\kern-0.15em\reflectbox{E}}\kern-0.15em}

\EnableCrossrefs         
\CodelineIndex
\RecordChanges
\begin{document}
  \DocInput{frontespizio.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{1331}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
% \changes{v1.0}{2008/03/04}{First public release}
% \changes{v1.2}{2010/06/25}{Added `noinputenc' and `nouppercase'
%   options; added `Preambolo*' environment; various implementation changes}
% \changes{v1.3}{2011/03/08}{Added support for memoir}
% \changes{v1.3a}{2011/03/08}{Added info message in the \file{frn} file}
% \changes{v1.4}{2011/07/18}{Added option `suftesi'; updated the documentation}
% \changes{v1.4a}{2011/09/21}{Maintenance release, no changes}
% \GetFileInfo{frontespizio.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment,\def,\begin,\vskip,\ }
% \DoNotIndex{\DeclareOption,\ExecuteOptions,\RequirePackage}
% \DoNotIndex{\@@end,\@empty,\@ifclassloaded,\@nameuse,\@nil}
% \DoNotIndex{\@undefined,\\,\`,\addtocounter,\advance,\bfseries}
% \DoNotIndex{\centering,\closeout,\define@key,\documentclass}
% \DoNotIndex{\edef,\else,\end,\endinput,\endtitlepage,\expandafter}
% \DoNotIndex{\extracolsep,\fi,\fill,\fontsize,\g@addto@macro,\toks}
% \DoNotIndex{\hrule,\hspace,\if,\if@twoside,\ifcase,\ifdefined}
% \DoNotIndex{\iffalse,\IfFileExists,\ifnum,\ifx,\immediate,\setcounter}
% \DoNotIndex{\jobname,\let,\long,\MakeUppercase,\MessageBreak}
% \DoNotIndex{\newcount,\newif,\newpage,\newtoks,\newwrite,\next}
% \DoNotIndex{\noexpand,\nofiles,\normalfont,\normalsize,\null}
% \DoNotIndex{\openout,\or,\Package,\PackageError,\PackageWarning}
% \DoNotIndex{\PackageWarningNoLine,\paperheight,\paperwidth,\par}
% \DoNotIndex{\parbox,\parindent,\relax,\scshape,\selectfont,\setkeys}
% \DoNotIndex{\sffamily,\space,\stretch,\string,\textheight,\textwidth}
% \DoNotIndex{\the,\thispagestyle,\unexpanded,\unless,\unskip,\upshape}
% \DoNotIndex{\usepackage,\vbox,\vfill,\vspace,\write,\z@}
% \DoNotIndex{\CurrentOption,\AtEndDocument,\@ne,\c@page,\m@ne}
% \DoNotIndex{\@firstofone,\@gobble,\@makeother,\begingroup,\endgroup}
% \DoNotIndex{\eTeXversion,\hbox,\hsize,\includegraphics,\newlinechar}
% \DoNotIndex{\titlepage,\vss,\vtop,\xdef,\@gobbletwo,\color,\dimexpr}
% \DoNotIndex{\huge,\large,\makebox,\ProcessOptions,\renewcommand}
% 
% \begin{frontespizio}
% \Universita{Pietrascambio}
% \Facolta{Scienze Matematiche, Fisiche e Naturali}
% \Corso[Laurea]{Tipografia elettronica}
% \Titoletto{Tesi di perfezionamento}
% \Titolo{Come comporre un frontespizio\\e vivere felici}
% \Rientro{2cm}
% \NCandidato{Autore}
% \Candidato{Enrico Gregorio}
% \Relatore{Ch.mo Prof.\ Basilio Nodari}
% \Correlatore{Dott.\ R. J. Drofnats}
% \Annoaccademico{2007-2011}
% \end{frontespizio}
% 
% 
% \title{Il pacchetto \textsf{frontespizio}\thanks{Questa
%   documentazione corrisponde alla versione~\fileversion{}
%   del~\filedate}}
% \author{Enrico Gregorio \\
%   \texttt{Enrico dot Gregorio at univr dot it}}
% \date{\filedate}
% \maketitle
% 
% \begin{otherlanguage*}{english}
% \section*{Introduction in English}
% 
% This package is meant for Italian users who want to print a
% frontispiece to their thesis, be it for graduation or for their
% Ph.D\@.; actually the package can be tweaked also for other
% purposes, provided the overall structure of the desired frontispiece
% is compatible with the standard one.
% 
% It's usually difficult to get a first page which has very different
% layout than the internal pages; use of the \pack{chngpage} package
% is cumbersome for this purpose and it's difficult to adapt the
% settings to all classes.  I tried an approach with this package, but
% it was difficult to maintain and extend.
% 
% The idea of this package is similar to that of \pack{pdfpages}: we 
% produce a page and include it as a graphic object. The difference 
% from \pack{pdfpages} is that the markup necessary to define the 
% elements of the frontispiece is given in the user's document.
% 
% Since traditions for frontispieces are different in the various
% countries, I decided to prepare this package with Italian customs in
% mind.  Therefore the structure of the frontispiece is somewhat rigid
% and might not be apt to be used abroad.  Consequently, I decided to
% write the documentation in Italian and on \textsc{a}4 paper, but the
% comments to the code will be in English.
% \end{otherlanguage*}
% 
% \section{Introduzione}
% 
% Molti, scrivendo la propria tesi di laurea o di dottorato, hanno il 
% problema di produrre un frontespizio adeguato che sia ben centrato 
% sulla prima pagina. Questo \`e piuttosto difficile, anche usando 
% l'ambiente \env{titlepage} che eredita il formato di pagina imposto 
% dalla classe o modificato dall'utente con \pack{geometry}.
% 
% Come si vede, il frontespizio di questo documento \`e del tutto
% indipendente dai parametri di impaginazione successivi.  Ovviamente
% il nome dell'universit\`a e quello del relatore sono di fantasia.  O
% no?
% 
% Una prima soluzione che impiegava il pacchetto \pack{chngpage} aveva
% vari difetti, pur se funzionava con le classi standard.  Questo
% nuovo pacchetto cerca di risolvere la questione producendo un
% documento separato che va compilato a parte e che verr\`a poi
% incluso direttamente nel documento principale senza altri
% interventi.  Il vantaggio di usare questo pacchetto \`e che i
% comandi necessari per definire i vari elementi del frontespizio
% (titolo, candidato, relatore e cos\`i via) sono contenuti nello
% stesso documento.  Se il documento principale si chiama
% \file{tesi.tex}, il documento da compilare sar\`a
% \file{tesi-frn.tex} e si trover\`a nella stessa cartella che
% contiene quello principale.  La sequenza di comandi \`e, dunque,
%\begin{verbatim}
%pdflatex tesi
%pdflatex tesi-frn
%pdflatex tesi
%\end{verbatim}
% e, alla fine, il frontespizio sar\`a al suo posto. Nel seguito, il 
% documento che contiene i dati per comporre il frontespizio sar\`a 
% chiamato \file{frn}. Nel caso si usi \file{latex} e non 
% \file{pdflatex}, la sequenza di comandi \`e
%\begin{verbatim}
%latex tesi
%latex tesi-frn
%dvips -o tesi-frn.eps tesi-frn
%latex tesi
%\end{verbatim}
% Non occorre certo dare ogni volta questi comandi: basta farlo quando
% abbiamo modificato il contenuto dell'ambiente \env{frontespizio}.
%
% Se la classe \`e chiamata con l'opzione \opt{oneside}, il frontespizio
% occupa correttamente solo la prima; nel caso di \opt{twoside}, viene
% prodotta una pagina bianca.  \`E meglio con \opt{twoside}, naturalmente:
% scrivere solo fronte \`e uno spreco di carta, cos\`i come con interlinea
% maggiorata.
% 
% \`E possibile usare il pacchetto anche per includere un frontespizio 
% creato con altri sistemi, si veda pi\`u avanti la descrizione 
% dell'opzione \opt{onlyinclude}.
%
% Sono a conoscenza del fatto che il pacchetto è stato usato per
% comporre frontespizi anche di documenti diversi da tesi e
% simili. Naturalmente qui si tratta di frontespizi `formali', senza
% alcuna pretesa di essere artistici.
% 
% \section{Uso}
% 
% Il documento va impostato con l'opzione \opt{titlepage} e va caricato
% il pacchetto \pack{frontespizio}: per esempio
%\begin{verbatim}
%\documentclass[a4paper,titlepage]{book}
%\usepackage[italian]{babel}
%\usepackage[<opzioni>]{frontespizio}
%\end{verbatim}
% L'opzione \opt{titlepage} \`e normalmente attiva per la classe 
% \pack{book}, ma non lo \`e per la classe \pack{report}. L'opzione
% non esiste per la classe \pack{memoir} e quindi non va data.
% 
% Sono previste due opzioni principali: \opt{sans} e \opt{nowrite}.  La
% prima compone il frontespizio in caratteri senza grazie, la seconda
% serve a evitare la scrittura o riscrittura del documento \file{frn},
% ovviamente solo quando esso \`e definitivo o quando non ci interessa
% riscriverlo ogni volta che compiliamo.
% 
% Vediamo un tipico frontespizio nella tabella~\ref{tab:example}. I
% comandi vanno dati dopo |\begin{document}|.  Si possono dare quanti
% relatori e correlatori si vuole; basta scriverli uno dopo l'altro
% come argomenti di comandi \cs{Relatore} o
% \cs{Correlatore}.\footnote{Aggiungere i titoli onorifici o
% professionali, mi raccomando!  Altrimenti i chiarissimi professori
% potrebbero offendersi.~\texttt{;-)}} Il correlatore \`e colui che
% collabora alla direzione del lavoro di tesi, non quello che fa le
% pulci alla tesi stessa prima dell'esame finale, propriamente
% \emph{controrelatore}, il cui nome \emph{non} va nel frontespizio.
%
% \begin{table}[tp]
% \caption{Esempio di comandi per il frontespizio}\label{tab:example}
% \centering
% \bigskip
% \begin{lrbox}{0}
% \begin{minipage}{.75\textwidth}
%\begin{verbatim}
%\begin{frontespizio}
%\Universita{Paperopoli}
%\Logo{duck}
%\Facolta{Pennutologia}
%\Corso{Belle Lettere}
%\Annoaccademico{2030--2031}
%\Titoletto{Tesi di laurea magistrale}
%\Titolo{La mia tesi:\\ una lunga serie di risultati\\
%        difficilissimi e complicatissimi}
%\Sottotitolo{Alcune considerazioni mutevoli}
%\Candidato[PP999999]{Paperon de' Paperoni}
%\Relatore{Giovanni Episcopo}
%\Relatore{Pippo Cluvio}
%\Correlatore{Ugo Frogio}
%\Correlatore{Ubaldo Kutuzu}
%\end{frontespizio}
%\end{verbatim}
% \end{minipage}
% \end{lrbox}\fboxsep=1em \fbox{\usebox{0}}
% \end{table}
% 
% Si pu\`o anche non indicare il nome del relatore; questo pu\`o capitare 
% probabilmente per le tesi di dottorato. Basta allora dare l'opzione 
% \opt{noadvisor} al pacchetto.
% 
% Descriveremo pi\`u avanti, in dettaglio, i vari comandi disponibili.
% Notiamo subito che l'ordine in cui sono dati all'interno
% dell'ambiente \env{frontespizio} \`e irrilevante.
% 
% Con l'opzione \opt{onlyinclude}, nessuno dei comandi descritti pi\`u
% avanti \`e disponibile.  Si pu\`o usare solo il comando
% \cs{includefront} che prende come argomento il nome del documento
% che contiene il frontespizio.  Questo deve essere in formato
% \textsc{iso}~A4.  Il comando ha anche un argomento opzionale per
% rimettere in ordine i numeri di pagina, che deve essere un numero
% piccolo (fra $0$ e $9$).
% 
% Un'altra opzione \`e \opt{signatures}, che lascia fra i nomi dei
% relatori lo spazio per le loro firme.  Questa opzione pu\`o essere
% aggiunta direttamente al documento~\file{frn}: il mio consiglio \`e di
% duplicarlo, aggiungere l'opzione, compilarlo e usarne la stampa solo
% per la copia da far firmare al relatore.
% 
% Con l'opzione \opt{norules} si eliminano i filetti dal frontespizio 
% che normalmente vengono disegnati fra il nome dell'ateneo e quello 
% della facolt\`a e sopra l'indicazione dell'anno accademico.
%
% Con l'opzione \opt{swapnames} viene scambiata la posizione dei nomi
% di relatori e candidato; la posizione normale \`e con il nome del
% candidato a sinistra e quello del relatore a destra.
%
% 
% \section{Le opzioni}
% 
% Raccolgo qui le opzioni gi\`a descritte, per un pi\`u facile
% riferimento.  Quando due opzioni sono separate da~`$\mid$', la prima
% \`e quella valida normalmente.
% 
% \frontoption{write${}\mid{}$nowrite}%
% Mutuamente esclusive.  Con la seconda si inibisce la scrittura del
% documento~\file{frn}: quando sappiamo che \`e definitivo non vale la
% pena riscrivere il file ogni volta.
% 
% \frontoption{standard${}\mid{}$suftesi}
% Mutuamente esclusive. Con la seconda si usa la forma del
% frontespizio adatta alla classe \pack{suftesi}, si veda la
% sezione~\ref{suftesi}.
%
% \frontoption{signatures}%
% Nel campo dedicato a relatori e correlatori vengono lasciati gli spazi
% per le firme.
% 
% \frontoption{noadvisor}%
% Non viene stampato il campo dedicato a relatori e correlatori.
%
% \frontoption{swapnames}%
% Dando questa opzione il campo dedicato a relatori e correlatori
% sar\`a stampato a sinistra e quello dedicato ai candidati a destra,
% contrariamente al comportamento usuale.
% 
% \frontoption{normal${}\mid{}$sans}%
% Mutuamente esclusive. Con la seconda si sceglie per il frontespizio 
% un carattere senza grazie; questo carattere pu\`o essere determinato 
% usando un comando del tipo
%\begin{verbatim}
%\Preambolo{\usepackage{helvet}}
%\end{verbatim}
% 
% \frontoption{norules}%
% Non vengono inseriti filetti nel frontespizio; senza questa opzione 
% un filetto separa il nome dell'ateneo da quello della facolt\`a e un 
% altro viene disegnato sopra l'indicazione dell'anno accademico.
%
% \frontoption{nouppercase}%
% Senza questa opzione il nome della facolt\`a di riferimento \`e in
% tutto maiuscolo; specificandola, verr\`a rispettato il maiuscolo e
% il minuscolo come indicato nel documento.
%
% \frontoption{noinputenc}%
% Il pacchetto ora trascrive automaticamente la chiamata al pacchetto
% \pack{inputenc} del documento principale, se c'\`e, con la stessa
% opzione. In casi estremi pu\`o essere necessario evitarlo per
% specificare direttamente, con il comando \cs{Preambolo} o
% l'ambiente \env{Preambolo*}, la chiamata a \pack{inputenc}
% 
% \frontoption{onlyinclude}%
% Definisce il comando \cs{includefront} e disabilita l'ambiente 
% \env{frontespizio}. Serve per includere un frontespizio preparato con 
% altri metodi; deve essere un file grafico che sia fra quelli
% gestibili con \cs{includegraphics} e deve avere formato 
% \textsc{iso}~A4.
% 
% \frontoption{driver=$\langle\mathit{driver}\rangle$}%
% Imposta la chiamata di \pack{graphicx} nel documento~\file{frn} per
% l'uso di un driver diverso da \texttt{dvips} o \texttt{pdftex}, per 
% esempio |driver=dvipdfm| oppure |driver=textures|.
% \emph{Attenzione}: ogni altra opzione data a \pack{frontespizio} produrr\`a
% il messaggio di errore
%\begin{verbatim}
%! Package frontespizio Error: Key <...> undefined.
%\end{verbatim}
% 
% \section{I comandi}
% 
% Alcuni comandi sono obbligatori: \`e necessario specificare
% l'istituzione e la sua divisione (facolt\`a o dipartimento) presso la
% quale si discute la tesi; ovviamente occorrono anche il titolo e
% l'autore, cio\`e il candidato, e l'anno accademico. Per tener conto di 
% possibili variazioni sul tema, i comandi obbligatori hanno varianti 
% che possono essere usate al loro posto.
% 
% Indicheremo con un asterisco~(*) i comandi obbligatori, con una
% spada~(\textdagger) quelli sostitutivi, cio\`e le varianti di cui si
% diceva, senza niente quelli facoltativi.
% 
% \frontcommand[o]{Universita}{\marg{nome breve}}
% L'istituzione in cui si discute la tesi, cio\`e quella che rilascia il 
% titolo di studio; va dato il nome abbreviato:
%\begin{verbatim}
%\Universita{Verona}
%\Universita{Napoli `Federico II'}
%\end{verbatim}
% Il comando aggiunge da s\'e ``Universit\`a degli Studi di''.
% 
% \frontcommand[s]{Istituzione}{\marg{nome completo}}
% Quando l'istituzione ha un nome particolare, occorre specificarlo per 
% intero con questo comando:
%\begin{verbatim}
%\Istituzione{Politecnico di Torino}
%\Istituzione{Universit\`a `Bocconi' di Milano}
%\Istituzione{Sapienza -- Universit\`a di Roma}
%\end{verbatim}
% 
% \frontcommand{Logo}{\oarg{dimen}\marg{file}}
% L'argomento di questo comando \`e il nome (senza estensione) di un
% documento grafico che contenga il simbolo dell'istituzione.  Ha un
% argomento opzionale, la dimensione in altezza del logo (normalmente
% 1.5\,cm):
%\begin{verbatim}
%\Logo[1.5cm]{logo}
%\end{verbatim}
% 
% \frontcommand{Filigrana}{\oarg{parametri}\marg{file}}
% L'argomento \`e il nome (senza estensione) di un documento che contenga 
% il simbolo dell'istituzione, con opportuna retinatura in modo che 
% appaia come in filigrana. Ha un argomento opzionale, che permette di 
% impostare alcuni parametri:
%\begin{verbatim}
%\Filigrana[height=10cm,before=1,after=1]{logoretinato}
%\end{verbatim}
% Con la chiave \texttt{height} si imposta l'altezza del simbolo, con le
% chiavi \texttt{before} e \texttt{after} si imposta la proporzione in
% cui \`e diviso lo spazio rimanente; i valori usuali sono quelli mostrati
% nell'esempio. Si pu\`o usare questo comando, dando opportuni valori,
% per inserire il logo in un posto diverso da quello che si ottiene
% con \cs{Logo}.
% 
% \frontcommand[o]{Facolta}{\marg{nome breve}}
% La facolt\`a in cui si sono svolti gli studi.  Per le tesi di laurea
% triennale o magistrale, sono le facolt\`a gli enti responsabili
% dell'esame finale.
% 
% \frontcommand[s]{Dipartimento}{\marg{nome breve}}
% Per le tesi di dottorato, la responsabilit\`a \`e di un dipartimento.
% 
% \frontcommand[s]{Divisione}{\marg{nome completo}}
% Se la facolt\`a o dipartimento ha un nome non usuale, si pu\`o inserirlo
% con questo comando:
%\begin{verbatim}
%\Divisione{Istituto di Cultura Generale}
%\end{verbatim}
% 
% \frontcommand[s]{Interfacolta}{\marg{nomi completi}}
% Se il corso di laurea \`e diviso fra pi\`u facolt\`a, si usi questo 
% comando; si noti che, a differenza di \cs{Facolta} e 
% \cs{Divisione}, il risultato non \`e messo automaticamente in 
% maiuscolo. Quindi si scriva, per esempio,
%\begin{verbatim}
%FACOLT\`A DI TUTTOLOGIA\\
%FACOLT\`A DI SCIENZE FUMETTISTICHE
%\end{verbatim}
% Si pu\`o usare la doppia barra rovescia per indicare dove spezzare le 
% righe.
% 
% \frontcommand[o]{Corso}{\oarg{tipo}\marg{nome}}
% Il corso di studi seguito, di cui la tesi \`e il compimento. Ha un 
% argomento opzionale che, non espresso, equivale a `Laurea Magistrale':
%\begin{verbatim}
%\Corso{Pennutistica}
%\Corso[Dottorato di Ricerca]{Pennutistica}
%\end{verbatim}
% 
% \frontcommand[s]{Scuola}{\marg{nome completo}}
% Se il corso di studi ha un nome speciale, si usi questo comando che 
% produce esattamente il suo argomento:
%\begin{verbatim}
%\Scuola{Scuola di specializzazione in Volo Planato}
%\end{verbatim}
% 
% \frontcommand{Titoletto}{\marg{tipo}}
% \`E possibile, con questo comando, specificare il tipo di tesi:
%\begin{verbatim}
%\Titoletto{Tesi di Laurea}
%\Titoletto{Tesi di Laurea Magistrale}
%\Titoletto{Tesi di Dottorato di Ricerca}
%\end{verbatim}
% 
% \frontcommand[o]{Titolo}{\marg{titolo}}
% Il titolo della tesi, con eventuali punti dove andare a capo espressi 
% con |\\|.
% 
% \frontcommand{Sottotitolo}{\marg{sottotitolo}}
% Un sottotitolo. Accade talvolta che due studenti preparino la loro 
% tesi in collaborazione e che ciascuno ne presenti una parte: il 
% sottotitolo \`e per questi casi, o altri che si possano pensare.
% 
% \frontcommand[o]{Candidato}{\oarg{matricola}\marg{nome}}

% Il nome e cognome del candidato.  Notare che, in italiano, il nome
% va \emph{prima} del cognome, qualsiasi cosa affermino i burocrati.
% Il comando prende come argomento opzionale il numero di matricola,
% che potrebbe essere richiesto dalle regole locali.  \`E possibile
% ripetere il comando, nel caso ci siano pi\`u candidati che
% presentano insieme il lavoro. Non c'\`e un comando per eliminare o
% modificare la scritta `Matricola'; nel caso lo si desiderasse si pu\`o
% usare uno fra i seguenti biechi trucchi:
%\begin{verbatim}
%\Preambolo{\renewcommand{\frontsmallfont}[1]{\small}}
%\Preambolo{\renewcommand{\frontsmallfont}[1]{\small Matr.}}
%\end{verbatim}
% Con il primo non viene stampato niente, con il secondo si avr\`a
% l'abbreviazione.
% 
% \frontcommand[o]{Relatore}{\marg{nome}}
% Il nome e cognome (se si preferisce preceduto dall'appellativo 
% accademico) del relatore. Pu\`o capitare che i relatori siano pi\`u 
% d'uno: basta specificarli successivamente, si veda l'esempio di prima.
% Il comando \`e obbligatorio se non si \`e data l'opzione \opt{noadvisor}.
% 
% \frontcommand{Correlatore}{\marg{nome}}
% Il nome e cognome del correlatore, di solito un esterno 
% all'istituzione che ha collaborato alla guida del lavoro che ha 
% portato alla tesi. Anche qui se ne pu\`o specificare pi\`u d'uno.
% 
% \frontcommand[o]{Annoaccademico}{\marg{anno}}
% L'anno accademico nel quale si discute la tesi.
% 
% \frontcommand[s]{Piede}{\marg{testo}}
% Se al piede non si vuole la scritta ``Anno Accademico'' ma 
% qualcos'altro, lo si specifichi nell'argomento a questo comando.
% 
% 
% \section{Modifiche all'aspetto del frontespizio}
% Alcuni aspetti del frontespizio possono essere variati.  Per esempio,
% \`e possibile caricare gli stessi caratteri usati nel corpo della tesi o
% cambiare i margini.
% 
% \frontcommand{NCandidato}{\marg{nome}}
% Il nome del candidato \`e preceduto dalla parola ``Candidato''. Se si 
% preferisce ``Laureando'', si usi
%\begin{verbatim}
%\NCandidato{Laureando}
%\end{verbatim}
% 
% \frontcommand{NCandidati}{\marg{nome}}
% Se ci sono pi\`u candidati, i nomi sono preceduti dalla parola
% ``Candidati''.  Se si preferisce ``Laureandi'', si usi
%\begin{verbatim}
%\NCandidati{Laureandi}
%\end{verbatim}
% 
% \frontcommand{NRelatore}{\marg{singolare}\marg{plurale}}
% Analogamente, il nome del relatore \`e preceduto da ``Relatore''. Se si 
% fosse esterofili, si potrebbe modificarlo con
%\begin{verbatim}
%\NRelatore{Advisor}{Advisors}
%\end{verbatim}
% \`E necessario scrivere sia la forma singolare che quella plurale, anche
% se ci sar\`a un solo relatore (ma si pu\`o lasciare l'argomento vuoto).
% 
% \frontcommand{NCorrelatore}{\marg{singolare}\marg{plurale}}
% Stesso discorso fatto per l'appellativo del relatore.
% 
% \frontcommand{Punteggiatura}{\marg{carattere}}
% Gli appellativi ``Candidato'' e ``Relatore'' sono seguiti da due 
% punti; se non lo si desidera, si scriva
%\begin{verbatim}
%\Punteggiatura{}
%\end{verbatim}
% 
% \frontcommand{Preambolo}{\marg{comandi}}
% Supponiamo che la tesi sia stata scritta con il carattere Utopia, 
% fornito dal pacchetto \pack{fourier}. Occorre specificarlo anche per 
% il frontespizio con
%\begin{verbatim}
%\Preambolo{\usepackage{fourier}}
%\end{verbatim}
% Nessuno dei pacchetti caricati dal documento principale passa
% automaticamente al frontespizio: ripetendo questo comando, che ha
% effetto cumulativo, si possono risolvere altri problemi particolari.
% Infatti l'argomento del comando viene trascritto cos\`i com'\`e nel
% preambolo del documento~\file{frn}.\footnote{In una versione
% precedente il comando era chiamato \cs{Package}; questo \`e ancora
% definito come equivalente di \cs{Preambolo}, ma il suo uso \`e
% deprecato.} Vedremo in seguito altri usi del comando; si consiglia di
% usarne uno per ciascuna riga da aggiungere al preambolo.
% 
% \frontenvironment{Preambolo*}{\meta{comandi}}
% Usare molti comandi \cs{Preambolo} pu\`o essere fastidioso.
% Perci\`o \`e stato introdotto questo ambiente dove possono essere
% dati vari comandi tutti insieme. Per esempio,
%\begin{verbatim}
%\begin{Preambolo*}
%\usepackage{kpfonts}
%\renewcommand{\fronttitlefont}{\fontsize{17}{21}\scshape}
%\renewcommand{\frontfootfont}{\fontsize{12}{14}\itshape}
%\end{Preambolo*}
%\end{verbatim}
% evita di dover specificare lunghi argomenti a \cs{Preambolo} o
% di usare questo comando pi\`u volte. In uno degli esempi della
% documentazione si vede come in questo ambiente possa andare
% qualsiasi cosa sia sensata nel preambolo di un documento \LaTeX.
%
% \frontcommand{Rientro}{\marg{dimen}}
% Il nome del candidato e quello del relatore sono a filo dei margini 
% sinistro e destro (che si possono ricavare dalle dimensioni dei due 
% filetti). Se si desidera averli pi\`u rientrati si pu\`o usare questo 
% comando:
%\begin{verbatim}
%\Rientro{1cm}
%\end{verbatim}
% 
% \frontcommand{Margini}{\marg{dimen}\marg{dimen}\marg{dimen}\marg{dimen}}
% Se i margini scelti dal pacchetto non sono di gradimento, si possono 
% specificarne di diversi con questo comando:
%\begin{verbatim}
%\Margini{1cm}{1.5cm}{1cm}{1cm}
%\end{verbatim}
% \`e l'equivalente della scelta del pacchetto.  Le dimensioni si
% riferiscono, nell'ordine, al margine sinistro, in basso, destro e in
% alto.\footnote{In versioni precedenti, questo comando e il
% precedente si chiamavano, rispettivamente, \cs{Margins} e
% \cs{MoreMargin}.}
% 
% 
% \section{Scelta dei caratteri: forma e misura}
% 
% Se non si fosse soddisfatti della scelta dei caratteri proposta
% dall'autore, si pu\`o usare il comando \cs{Preambolo} (o
% l'ambiente \env{Preambolo*}) per modificarla.  I comandi disponibili
% compaiono nella tabella~\ref{fonts}, con il loro valore usuale e la
% posizione in cui vengono usati.  Per esempio, per avere il titolo in
% maiuscoletto~16/20 (cio\`e corpo~16 con distanza fra le linee di
% base di 20 punti), si scriver\`a 
%\begin{verbatim}
%\Preambolo{\renewcommand{\fronttitlefont}{%
%    \fontsize{16}{20}\scshape}}
%\end{verbatim}
% La sintassi non \`e comoda, per scelta precisa.  Si ricordi che
% con l'opzione \texttt{sans} non \`e disponibile il maiuscoletto.
% Un'altra cosa da ricordare \`e che per scegliere un carattere,
% occorre specificare non solo le sue dimensioni (e questo va fatto
% per prima cosa), ma anche le sue altre caratteristiche.  Il comando
% \cs{fontsize} prende due argomenti: il corpo e l'avanzamento di
% riga; se non si specifica l'unit\`a di misura, viene assunta quella
% di punti tipografici~(pt).  Se si cambia uno dei caratteri
% predefiniti, occorre specificare ogni aspetto del nuovo, se non si
% vogliono avere sorprese. Una dichiarazione finale come
% \cs{scshape} o \cs{bfseries} rende disponibile il font; se
% manca occorre dare \cs{selectfont}.
% 
% \begin{table}[ht]
% \centering
% \caption{Comandi per la scelta dei caratteri}\label{fonts}
% \medskip\footnotesize
% \begin{tabular}{lll}
% \toprule
% Comando & Valore usuale & Impiego\\
% \midrule
% \cs{frontinstitutionfont} &
% Neretto, 14/17 &
% Nome dell'universit\`a o istituzione\\[3pt]
% \cs{frontdivisionfont} &
% Tondo, 12/16 &
% Nome della facolt\`a o divisione\\[3pt]
% \cs{frontpretitlefont} &
% Maiuscoletto, 10/12 &
% Per il titoletto\\[3pt]
% \cs{fronttitlefont} &
% Neretto, 17/21 &
% Per il titolo della tesi\\[3pt]
% \cs{frontsubtitlefont} &
% Tondo, 12/14 &
% Per il sottotitolo\\[3pt]
% \cs{frontfixednamesfont} &
% Tondo, 12/14 &
% Per scrivere le parole chiave\\
% && `Candidato', `Relatore' e `Correlatore'\\[3pt]
% \cs{frontnamesfont} &
% Neretto, 12/14 &
% Per i nomi di candidato e relatore\\[3pt]
% \cs{frontsmallfont} &
% Neretto, 9/11 &
% Per il numero di matricola\\
% && (eredita attributi dal precedente)\\[3pt]
% \cs{frontfootfont} &
% Neretto, 12/14 &
% Per scrivere l'anno accademico\\
% \midrule
% \cs{fronttitlecolor} &
% Maroon &
% Il colore del titolo con l'opzione\\
% && \texttt{suftesi}\\
% \bottomrule
% \end{tabular}
% \end{table}
% 
% 
% \section{Parametri di spaziatura}
% 
% \`E possibile cambiare la spaziatura fra il campo `relatori' e quello
% `correlatori' (il valore normale \`e 1\unit{ex}):
%\begin{verbatim}
%\Preambolo{\renewcommand{\frontrelcorrelsep}{2ex}}
%\end{verbatim}
% 
% Analogamente si pu\`o aggiustare la composizione nel caso si usi
% l'opzione \opt{signatures} modificando il comando
% \cs{frontadjustforsignatures} per esempio con
%\begin{verbatim}
%\Preambolo{\renewcommand{\frontadjustforsignatures}{1cm}}
%\end{verbatim}
% Si definisce cos\`i una spaziatura verticale aggiuntiva fra la zona
% ``candidato-relatori'', in modo che non si arrivi troppo vicino al
% filetto in basso.  Il comando non ha effetto se non dando l'opzione
% \opt{signatures}.
% 
% Un terzo parametro dimensionale \`e \cs{frontlogosep}, il cui
% valore normale \`e 6\unit{pt}; se il logo dovesse essere troppo vicino o
% lontano dal nome dell'universit\`a, si pu\`o modificare con un comando
% come
%\begin{verbatim}
%\Preambolo{\renewcommand{\frontlogosep}{4pt}}
%\end{verbatim}
% dove la dimensione pu\`o anche essere negativa.
% 
% Nel caso di pi\`u candidati, la spaziatura fra i nomi \`e regolata
% dal parametro \cs{frontcandidatesep}, il cui valore usuale \`e
% 3\unit{ex}; la si pu\`o modificare con un comando come
%\begin{verbatim}
%\Preambolo{\renewcommand{\frontcandidatesep}{1cm}}
%\end{verbatim}
% 
% \section{L'opzione \texttt{suftesi}}\label{suftesi}
%
% Ivan Valbusa ha creato la classe \pack{suftesi} e ha impostato una
% forma di frontespizio che usa questo pacchetto. Per migliorare la
% compatibilità, si è deciso di inserire nel pacchetto il codice della
% classe \pack{suftesi} relativo al frontespizio. Questa forma può
% essere usata indipendentemente dalla classe; non occorre altro che
% specificare l'opzione alla chiamata del pacchetto.
%
% Va però notato che questa forma di frontespizio è più rigida di
% quella standard, nel senso che non permette cambiamenti ai font
% usati, riguardo a grandezza e forma: prendere o lasciare. Il resto
% funziona (quasi) allo stesso modo. Si veda l'ultimo degli esempi.
% 
% Per questa forma di frontespizio è consigliata la presenza del logo,
% che però non è obbligatoria. Si noti che non ha alcuna rilevanza
% l'argomento opzionale dato a |\Logo|, che verrà sempre stampato con
% una dimensione fissa. Non si usi il comando |\Filigrana|, sebbene
% non sia vietato e si eviti l'uso di |\Margini|.  Con questa forma di
% frontespizio è possibile modificare il colore del titolo, che è
% usualmente un marroncino, agendo sul comando |\fronttitlecolor|
% esattamente come si farebbe per i font. Sono disponibili tutti i
% colori predefiniti con l'opzione \texttt{svgnames} di \pack{xcolor},
% meglio però non essere troppo fantasiosi: l'unica vera alternativa è
% scrivere
%\begin{verbatim}
%\Preambolo{\renewcommand{\fronttitlecolor}{black}}
%\end{verbatim}
%
%
%
% \section{\Xe\LaTeX}
% 
% \`E possibile usare \Xe\TeX{}, ovviamente nella forma \Xe\LaTeX, per 
% produrre il frontespizio. Ovviamente dovr\`a essere usato il comando 
% \cs{Preambolo} per impostare anche il documento~\file{frn} per 
% l'uso di questo motore \TeX. Per esempio, se il documento principale 
% \`e composto in ``Adobe Caslon~Pro'', si potr\`a scrivere
%\begin{verbatim}
%\begin{Preambolo*}
%\usepackage{fontspec}
%\setmainfont{Adobe Caslon Pro}
%\end{Preambolo*}
%\end{verbatim}
% Naturalmente \`e possibile compilare il \file{frn} anche usando
% \textsc{pdf}\LaTeX{} oppure \LaTeX{} e \textsc{dvips}.  Tuttavia si
% consiglia l'uniformit\`a fra il carattere usato nel testo e quello usato
% nel frontespizio, se non ci sono disposizioni particolari che
% richiedano diversamente.
% 
% Si ricordi che \Xe\TeX{} legge correttamente solo documenti scritti
% nelle codifiche \textsc{utf}-8 (oppure \textsc{utf}-16). Quindi se
% il documento principale \`e da compilare con \textsc{pdf}\LaTeX{} si
% dovr\`a caricare \pack{inputenc} con l'opzione \opt{utf8}, e questo
% \`e proprio un caso in cui potrebbe essere necessario passare al
% pacchetto \pack{frontespizio} l'opzione \pack{noinputenc}.
% 
% 
% \section{\LaTeX{}mk}
%
% È possibile automatizzare la creazione del frontespizio mediante lo
% \emph{script} \texttt{latexmk} (si ringrazia l'autore John Collins
% per i preziosi suggerimenti); si rimanda alla documentazione per
% capire come funziona lo script, qui si presuppone che lo si conosca
% già. Vediamo i vari casi: (1)~il~frontespizio è composto con
% \texttt{pdflatex}; (2)~il~frontespizio è composto con \texttt{latex}
% per ottenere in seguito un \textsc{eps}; (3)~il~frontespizio è
% composto con \texttt{xelatex}. In tutti i casi la compilazione va
% lanciata con
%\begin{flushleft}
%\texttt{latexmk} \meta{opzioni} \texttt{tesi}
%\end{flushleft}
% dove \meta{opzioni} sono le usuali che vengono date a
% \texttt{latexmk} e \file{tesi.tex} sta per il nome del nostro
% documento.
% 
% \subsection{\texttt{pdflatex}}
% Si crei il file \file{latexmkrc} che contenga il seguente codice:
%\begin{verbatim}
%add_cus_dep( "tex", "pdf", 0, "frn2pdf" );
%  sub frn2pdf { return system( "latexmk -pdf $_[0]" ); }
%\end{verbatim}
% Se già si usa un \file{latexmkrc} si aggiungano quelle due righe
% alla fine.
%
% \subsection{\texttt{latex} e \texttt{dvips}}
% Si crei il file \file{latexmkrc} che contenga il seguente codice:
%\begin{verbatim}
%add_cus_dep( "tex", "eps", 0, "frn2eps" );
%  sub frn2eps {
%    system( "latexmk -dvi -ps- -pdf- $_[0]" );
%    return system( "dvips -o $_[0].eps $_[0].dvi" );
%  }
%\end{verbatim}
% Se già si usa un \file{latexmkrc} si aggiungano quelle due righe
% alla fine.
%
% \subsection{\texttt{xelatex}}
% Si crei il file \file{latexmkrc} che contenga il seguente codice:
%\begin{verbatim}
%add_cus_dep( "tex", "pdf", 0, "frn2pdf" );
%  sub frn2pdf { return system( "xelatex $_[0]" ); }
%\end{verbatim}
% Se già si usa un \file{latexmkrc} si aggiungano quelle due righe
% alla fine.
%
%
% \section{Limitazioni e incompatibilit\`a}
% 
% Gli altri pacchetti caricati sono \pack{ifpdf}, \pack{graphicx},
% \pack{afterpage}, \pack{atbegshi} e \pack{ifxetex} che non hanno
% incompatibilit\`a note. Se si dovesse usare \pack{graphicx} con
% opzioni, per esempio con un \emph{driver} diverso da \texttt{dvips}
% o \texttt{pdftex}, va caricato \emph{prima} di \pack{frontespizio};
% ricordiamo che i due \emph{driver} menzionati non vanno dichiarati
% come opzione a \pack{graphicx}, perch\'e in mancanza di altre
% opzioni vengono scelti automaticamente dal compilatore.  Attenzione:
% usando \emph{Textures}, per esempio, va inserita anche l'opzione
% \opt{driver=textures} a \pack{frontespizio}.  Cambiare il nome del
% driver, se necessario.  Ovviamente si dovr\`a consultare il manuale
% della propria distribuzione per sapere come produrre il file eps in
% modo corretto.
%
% Il documento \file{frn} usa il pacchetto \pack{xcolor} con l'opzione
% \texttt{svgnames}. Non si carichi anche \pack{color} con |\Preambolo|.
%
% Si noti che il pacchetto non \`e compatibile con \pack{vmargin}; se
% si desidera modificare l'impostazione tipografica del documento, si
% usi \pack{geometry}, pi\`u potente e facile.
% 
% Il pacchetto è compatibile con le classi pi\`u diffuse:
% \pack{article}, \pack{report}, \pack{book}, \pack{amsart},
% \pack{amsbook} e, dalla versione 1.3, anche con
% \pack{memoir}. Funziona anche con \pack{scrbook} e \pack{scrreprt}.
%
% 
% \section{Novità nelle versioni successive alla prima}
%
% \paragraph{Versione 1.1}
% È stata introdotta l'opzione \opt{swapnames} per invertire l'ordine
% di relatori e candidato.
%
% \paragraph{Versione 1.2}
% Nella versione 1.2 sono state aggiunte le opzioni \opt{nouppercase}
% e \opt{noinputenc}; la prima serve per non trasformare in maiuscolo
% il nome della facolt\`a, la seconda per uno scopo un po' recondito
% che vedremo pi\`u avanti, legato al fatto che ora il pacchetto
% rispetta la codifica di input del documento principale anche nel
% documento~\file{frn}. È stato aggiunto anche l'ambiente
% \texttt{Preambolo*} per rendere più comoda la scrittura di comandi
% nel preambolo del documento~\file{frn}.
%
% \paragraph{Versione 1.3}
% Le sole modifiche sono la compatibilità con la classe \pack{memoir}
% e la scrittura di un messaggio informativo che rende possibile la
% cooperazione con \pack{latexmk}.
%
% \paragraph{Versione 1.4}
% Viene introdotta la nozione di \emph{forma} del frontespizio, con la
% possibilità di scegliere tra le opzioni \opt{standard} e
% \opt{suftesi}. Questo apre la possibilità di altri stili che
% potranno essere disponibili in versioni successive.
%
%
% \section{Soluzione del giochino}
% 
% L'etimologia di `Stanford' \`e `stan$+$ford'; l'antico inglese
% `stan' \`e ora `stone', cio\`e `pietra', mentre il toponimo `ford'
% indica un luogo di mercato.  Il cognome `Knuth' \`e di origine
% norvegese, affine a `Knudsen', e significa `nodo'.  Il nome `Donald'
% \`e di origine gaelica e vuol dire `reggitore del mondo', mentre
% `Basilio' viene dalla parola greca che significa~`re'.  Revinu Jitis
% Drofnats non ha bisogno di presentazioni nel mondo~\TeX.
% 
% 
% \section{Esempi}
% 
% Nelle pagine seguenti vedremo alcuni esempi con il sorgente.  I titoli
% delle tesi sono veri, manca solo l'indicazione dell'anno accademico,
% per evidenti motivi di \emph{privacy}.  Non sono stati messi `logo' di
% universit\`a per evitare problemi legali.
% 
% \clearpage
% 
% \iffalse
%<*examplea>
% \fi
% \begin{verbatim}
\documentclass[a4paper,titlepage]{book}
\usepackage{frontespizio}

\begin{document}
\begin{frontespizio}
\Universita{Padova}
\Facolta{Scienze Matematiche, Fisiche e Naturali}
\Corso[Laurea]{Matematica}
\Titoletto{Tesi di laurea}
\Titolo{Equivalenze fra categorie di moduli\\
e applicazioni}
\Candidato[145822]{Enrico Gregorio}
\Relatore{Ch.mo Prof.~Adalberto Orsatti}
\Annoaccademico{19??-19??}
\end{frontespizio}
\end{document}
% \end{verbatim}
% \iffalse
%</examplea>
% \fi
% 
% \vspace{4ex}
% 
% \includeex{examplea-frn}
% 
% \clearpage
% 
% \iffalse
%<*exampleb>
% \fi
% \begin{verbatim}
\documentclass[a4paper,titlepage]{book}
\usepackage[sans,nouppercase]{frontespizio}

\begin{document}
\begin{frontespizio}
\Universita{Padova}
\Facolta{Scienze Matematiche, Fisiche e Naturali}
\Corso[Laurea]{Matematica}
\Titoletto{Tesi di laurea}
\Titolo{Equivalenze fra categorie di moduli\\
e applicazioni}
\Candidato{Enrico Gregorio}
\Relatore{Ch.mo Prof.~Adalberto Orsatti}
\Annoaccademico{19??-19??}
\Rientro{1.5cm}
\NCandidato{Laureando}
\Punteggiatura{}
\end{frontespizio}
\end{document}
% \end{verbatim}
% \iffalse
%</exampleb>
% \fi
% 
% \vspace{4ex}
% 
% \includeex{exampleb-frn}
% 
% \clearpage
% 
% \iffalse
%<*examplec>
% \fi
% \begin{verbatim}
\documentclass[a4paper,titlepage]{book}
\usepackage[swapnames]{frontespizio}

\begin{document}
\begin{frontespizio}
\begin{Preambolo*}
  \usepackage{fourier}
  \newcommand{\compring}{anelli compatti}
\end{Preambolo*}
\Universita{Bologna}
\Dipartimento{Matematica}
\Corso[Dottorato di Ricerca]{Matematica}
\Titolo{Equivalenza di Morita generalizzata\\
  e applicazioni alla teoria degli\\
  \compring}
\Candidato{Enrico Gregorio}
\Relatore{Ch.mo Prof.~Ermanno Lanconelli}
\NRelatore{Coordinatore}{}
\Correlatore{Ch.mo Prof.~Adalberto Orsatti}
\NCorrelatore{Supervisore della ricerca}{}
\Annoaccademico{19??-19??}
\end{frontespizio}
\end{document}
% \end{verbatim}
% \iffalse
%</examplec>
% \fi
% 
% \vspace{4ex}
% 
% \includeex{examplec-frn}
% \newpage
% 
% \iffalse
%<*exampled>
% \fi
% \begin{verbatim}
\documentclass[a4paper,titlepage]{book}
\usepackage[nouppercase]{frontespizio}

\begin{document}
\begin{frontespizio}
\Istituzione{University of St.\ Anford}
\Divisione{Department of Typography}
\Scuola{Ph.D. degree in \TeX{} and \LaTeX{}}
\Titolo{How to prepare a\\
  formal frontispiece}
\Sottotitolo{Theory and practice}
\NCandidato{Candidate}
\Candidato{Enrico Gregorio}
\NRelatore{Thesis advisor}{}
\Relatore{Prof. R. J. Drofnats}
\NCorrelatore{Research supervisor}{Research supervisors}
\Correlatore{J. H. Quick}
\Correlatore{B. L. User}
\Piede{Thesis submitted in 2010}
\end{frontespizio}
\end{document}
% \end{verbatim}
% \iffalse
%</exampled>
% \fi
% 
% \vspace{4ex}
% 
% \includeex{exampled-frn}
% \newpage
%
% \iffalse
%<*fakelogo>
prologues:=3;
outputtemplate:="%j.mps";
input boxes;
beginfig(1);
draw fullcircle scaled (2.5cm + 1pt) withcolor white;
draw fullcircle scaled 2.5cm;
draw fullcircle scaled 2.3cm;
draw thelabel(btex \vbox{\sevenrm\halign{\hfil#\hfil\cr University of\cr
      St. Anford\cr Seal\cr}} etex, origin);
endfig;
end
%</fakelogo>
% \fi
% 
% \iffalse
%<*examplee>
% \fi
% \begin{verbatim}
\documentclass[a4paper,titlepage]{book}
\usepackage[suftesi]{frontespizio}

\begin{document}
\begin{frontespizio}
\Logo{fakelogo}
\Istituzione{University of St.\ Anford}
\Divisione{Department of Typography}
\Scuola{Ph.D. degree in \TeX{} and \LaTeX{}}
\Titolo{How to prepare a\\
  formal frontispiece}
\Sottotitolo{Theory and practice}
\NCandidato{Candidate}
\Candidato{Enrico Gregorio}
\NRelatore{Thesis advisor}{}
\Relatore{Prof. R. J. Drofnats}
\NCorrelatore{Research supervisor}{Research supervisors}
\Correlatore{J. H. Quick}
\Correlatore{B. L. User}
\Piede{Thesis submitted in 2010}
\end{frontespizio}
\end{document}
% \end{verbatim}
% \iffalse
%</examplee>
% \fi
% 
% \vspace{4ex}
% 
% \includeex{examplee-frn}
% \newpage
%
% \section{A shell script to compile the documentation}
% Running \texttt{latex} on \file{frontespizio.ins} produces also 
% \file{makedoc.sh} which can be run, on Unix systems, by one of the 
% following command from a shell:
% \begin{flushleft}\ttfamily
% sh makedoc.sh
% \end{flushleft}
% The shell script code is as follows.
% 
% \iffalse
%<*thedoc>
% \fi
% \begin{verbatim}
#!/bin/sh
pdflatex examplea.tex
pdflatex examplea-frn.tex
pdflatex exampleb.tex
pdflatex exampleb-frn.tex
pdflatex examplec.tex
pdflatex examplec-frn.tex
pdflatex exampled.tex
pdflatex exampled-frn.tex
mpost fakelogo.mp
epstopdf --hires fakelogo.mps
pdflatex examplee.tex
pdflatex examplee-frn.tex
pdflatex frontespizio.dtx
pdflatex frontespizio-frn.tex
makeindex -s gind frontespizio
makeindex -s gglo -o frontespizio.gls frontespizio.glo
pdflatex frontespizio.dtx
pdflatex frontespizio.dtx
exit
% \end{verbatim}
% \iffalse
%</thedoc>
% \fi
%
% \StopEventually{\PrintChanges\PrintIndex}
% \changes{v1.1}{2009/04/03}{Added swapnames option}
% \changes{v1.2}{2010/06/25}{Added noinputenc option}
% \changes{v1.2}{2010/06/25}{Added nouppercase option}
% \changes{v1.2}{2010/06/25}{Added `Preambolo*' environment}
% \changes{v1.2}{2010/06/25}{Various implementation changes}
% \changes{v1.3}{2011/03/08}{Added support for memoir}
% \selectlanguage{english}
% \section{The implementation}
% After the usual stuff of package presentation, here are the actual
% macros.  We use the $\varepsilon$-\TeX{} extensions, so we check
% that they are present.
% \iffalse
%<*package>
% \fi
%    \begin{macrocode}
\def\@not@eTeX{%
  \PackageError{frontespizio}
  {This package requires e-TeX, I'll stop right now}
  {This package is built on the e-TeX extensions which are not present.%
   \MessageBreak
   The best thing you can do is to upgrade your TeX system or try%
   \MessageBreak
   using `elatex' or `pdfelatex'.}%
    \expandafter\@@end}
\ifx\eTeXversion\@undefined
  \@not@eTeX
\else
  \let\@not@eTeX\@undefined
\fi
%    \end{macrocode}
% \subsection{Package options}
% Now we declare options and a conditional which is true when we write
% to the \file{frn} file: this is the file which will be compiled
% later in order to produce the pdf page that will be included as the
% frontispiece.  The option `infront' is a private one, which is set
% only in the \file{frn} file where the nowrite option is set, so we
% need a correction.  It's easier to use \cs{ifdefined} than to
% define many new conditionals. Actually, the package doesn't use 
% $\varepsilon$-\TeX{} features other than \cs{ifdefined} and
% \cs{unless}, but I wanted to try and encourage to upgrade from 
% old \TeX{} systems.
% 
% \begin{macro}{\iffront@write}
% The conditional \cs{iffront@write} is false when we don't want 
% to write the \file{frn} file.
% \end{macro}
% \begin{macro}{\front@infront}
% \cs{front@infront} is defined only if we are typesetting the
% \file{frn} file.
% \end{macro}
% \begin{macro}{\front@signatures}
% \cs{front@signatures} is defined if we need to leave space for 
% the advisor's signature.
% \end{macro}
% \begin{macro}{\front@noadvisor}
% \cs{front@noadvisor} is defined if we don't want an advisor's 
% name.
% \end{macro}
% \begin{macro}{\front@swapnames}
% \changes{v1.1}{2009/04/03}{Added macro \cs{front@swapnames} and
%                            option \texttt{swapnames}}
% \cs{front@swapnames} is defined if we want to swap the advisor's
% and candidate's fields.
% \end{macro}
% \begin{macro}{\front@thefont}
% \begin{macro}{\fontoptionnormal}
% \begin{macro}{\fontoptionsans}
% The options `normal' and `sans' are an elementary way to control 
% the font choice for the frontispiece.
% \end{macro}
% \end{macro}
% \end{macro}
% \begin{macro}{\front@norules}
% \cs{front@norules} is defined if we don't want rules in the 
% frontispiece.
% \end{macro}
% \begin{macro}{\front@nouppercase}
% \changes{v1.2}{2010/06/25}{Added macro \cs{front@nouppercase} and
%                            option \texttt{nouppercase}}
% \cs{front@nouppercase} is defined if we don't want to capitalize
% the faculty line.
% \end{macro}
% \begin{macro}{\front@noinputenc}
% \changes{v1.2}{2010/06/25}{Added macro \cs{front@noinputenc} and
%                            option \texttt{noinputenc}}
% \cs{front@nouppercase} is defined if we don't want to export the
% option to \pack{inputenc} to the \file{frn}~file.
% \end{macro}
% \begin{macro}{\iffront@include}
% \cs{iffront@include} controls whether we use the package only in 
% order to include an external file (similarly to pdfpages).
% \end{macro}
% \begin{macro}{\front@otheroptions}
% \changes{v1.4}{2011/07/18}{Added options \texttt{standard} and
%   \texttt{suftesi}}
% \changes{v1.4}{2011/07/18}{Added command \cs{fronttitlecolor} for suftesi}
% \changes{v1.2}{2010/06/25}{Added macro \cs{front@otheroptions}}
% \changes{v1.2}{2010/06/25}{Deleted macro \cs{front@grfdriver}}
% In \cs{front@otheroptions} we load the all other options, to be
% processed by \pack{keyval}.
% \end{macro}
%    \begin{macrocode}
\newif\iffront@write
\DeclareOption{write}{\front@writetrue}
\DeclareOption{nowrite}{\front@writefalse}
\DeclareOption{infront}{\let\front@infront=T}
\DeclareOption{signatures}{\let\front@signatures=T}
\DeclareOption{noadvisor}{\let\front@noadvisor=T}
\DeclareOption{swapnames}{\let\front@swapnames=T}
\DeclareOption{normal}{\def\front@thefont{\fontoptionnormal}}
\DeclareOption{sans}{\def\front@thefont{\fontoptionsans}}
\DeclareOption{norules}{\let\front@norules=T}
\DeclareOption{nouppercase}{\let\front@nouppercase=T}
\DeclareOption{noinputenc}{\let\front@noinputenc=T}
\DeclareOption{standard}{\def\front@shape{standard}}
\DeclareOption{suftesi}{\def\front@shape{suftesi}\def\fronttitlecolor{Maroon}}
%
\newif\iffront@include
\DeclareOption{onlyinclude}{\front@includetrue\ExecuteOptions{nowrite}}
\let\front@otheroptions\@empty
\DeclareOption*{\expandafter\g@addto@macro\expandafter\front@otheroptions
  \expandafter{\CurrentOption,}}
%    \end{macrocode}
% Now we choose the default options; we want to write the \file{frn} file
% and roman fonts.
%    \begin{macrocode}
\ExecuteOptions{write,normal,standard}
\ProcessOptions\relax
%    \end{macrocode}
% \subsection{Required packages and service macros}
% We load the needed packages.  Of course \pack{graphicx} and
% \pack{atbegshi} for graphic inclusion; we need also \pack{afterpage} 
% for adjustments when using some classes.
% \changes{v1.2}{2010/06/25}{Changed from \pack{eso-pic} to \pack{atbegshi}}
% \changes{v1.2}{2010/06/25}{We load also \pack{environ}}
%    \begin{macrocode}
\RequirePackage{afterpage}
\RequirePackage{graphicx}
\RequirePackage{atbegshi}
\RequirePackage{environ}
%    \end{macrocode}
% \begin{macro}{\includefront}
% We manage first the onlyinclude option.  If we are only including an
% external file, we load it and prepare for an empty verso page; the
% optional argument is there in order to correct the page number, if
% necessary; after that we stop reading the package. If a
% \env{frontespizio} environment is present, it's ignored after
% raising a warning, via \pack{environ}'s \cs{Collect@Body}.
% \changes{v1.2}{2010/06/25}{\cs{includefront} now depends on \pack{atbegshi}}
%    \begin{macrocode}
\iffront@include
\newcommand{\includefront}[2][0]{%
  \titlepage\null
    \AtBeginShipoutNext{\AtBeginShipoutUpperLeft{% 
      \vbox to\z@{\hbox{\includegraphics{#2}}\vss}}}
    \afterpage{\thispagestyle{empty}}%
  \endtitlepage
  \ifx0#1\else
    \null\thispagestyle{empty}\newpage\addtocounter{page}{-#1}%
  \fi}
  \newenvironment{frontespizio}{%
    \PackageWarningNoLine{frontespizio}
    {Using the `frontespizio' environment along with%
     \MessageBreak
     the `onlyinclude' option is meaningless. The%
     \MessageBreak
     environment's content will be ignored}
     \Collect@Body\@gobble}{}
\expandafter\endinput
\else
%    \end{macrocode}
% \end{macro}
% If the `onlyinclude' option is not given we can be in different 
% situations: first of all we load support for distinguishing whether 
% the user is typesetting with \texttt{latex}, \texttt{pdflatex} or 
% \texttt{xelatex}.
%    \begin{macrocode}
\RequirePackage{ifpdf}
%    \end{macrocode}
% We want to support also \Xe\LaTeX{}.
% \changes{v1.2}{2010/06/25}{Package \pack{ifxetex} is required}
%    \begin{macrocode}
\RequirePackage{ifxetex}
\fi
%    \end{macrocode}
% \begin{macro}{\front@write}
% \begin{macro}{\front@expwrite}
% If we are writing the \file{frn} file, we allocate an output stream,
% otherwise we let \cs{front@write} and \cs{front@expwrite} to
% gobble their argument; \cs{front@write} is used to write things
% without expansion while \cs{front@expwrite} expands tokens in the
% argument. We now use, if available, the \cs{pdfmdfivesum} facility
% of \textsc{pdf}\TeX, in order to tell the user if the \file{frn}
% file has changed.
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\iffront@write
  \ifdefined\pdfmdfivesum
    \IfFileExists{\jobname-frn.tex}{%
      \xdef\front@mdfiveold{\pdfmdfivesum file{\jobname-frn.tex}}}{}%
  \fi
  \newwrite\front@out
  \immediate\openout\front@out=\jobname-frn.tex
  \long\def\front@write#1{\immediate\write\front@out{\unexpanded{#1}}}
  \long\def\front@expwrite{\immediate\write\front@out}
\else
  \long\def\front@write#1{}
  \let\front@expwrite\front@write
\fi
%    \end{macrocode}
% \subsection{Initialization of the \file{frn} file}
% Now we initialize the \file{frn} file by setting the class and the
% margins.  If a driver option has been given we want to load
% \pack{graphicx} in the \file{frn} file with the right driver; we have to do
% this before loading the present package, which always requires
% \pack{graphicx}. Meanwhile, we load also the \pack{inputenc}
% package with the same options given in the main document; this can
% be overrided with the \opt{noinputenc} package option. Nothing is
% done if \pack{inputenc} is not loaded in the document.
% \changes{v1.3a}{2011/03/08}{Added info message in the \file{frn} file}
%    \begin{macrocode}
\front@expwrite{\@percentchar\@percentchar\space This file has been
  automatically generated by `frontespizio'.}
\front@expwrite{\@percentchar\@percentchar\space Don't use it as a model for a
  new frontispiece, use the}
\front@expwrite{\@percentchar\@percentchar\space `frontespizio'
  environment in you document instead.}
\front@write{\documentclass[titlepage]{article}}
\ifdefined\front@noinputenc\else
  \ifdefined\inputencodingname
    \front@expwrite{\string\usepackage[\inputencodingname]{inputenc}}
  \fi
\fi
%    \end{macrocode}
% Now we define the standard margins for the two shapes; in case we
% add other shapes, something should be done here.
% \changes{v1.4}{2011/07/18}{Adapted the writing of parameters for
%   geometry for the new shape options}
%    \begin{macrocode}
\def\front@geometry@standard{%
  \front@write{\usepackage[a4paper,left=1cm,bottom=1.5cm,%
    right=1cm,top=1cm]{geometry}}}
\def\front@geometry@suftesi{%
  \front@write{\usepackage[a4paper,textwidth=312pt,includehead,%
    textheight=624pt,right=90pt,vmarginratio=1:2]{geometry}}}
\@nameuse{front@geometry@\front@shape}
%    \end{macrocode}
% \begin{macro}{\front@processkeys}
% If the user has specified an unusual driver for \pack{graphicx}, we
% manage it with \pack{keyval}; otherwise we load the package without
% options, in a group because we redefine locally \cs{KV@errx} to be more
% informative; also the key(s) will be defined only locally, as well
% as \cs{front@processkeys}.
%    \begin{macrocode}
\ifx\front@otheroptions\@empty
  \front@write{\usepackage{graphicx}}
  \front@write{\usepackage[svgnames]{xcolor}}
\else
  \begingroup
 \def\KV@errx#1{%
    \PackageError{frontespizio}{Key #1}
      {The only allowed key is `driver'; the given key will be ignored.%
       \MessageBreak Type \space<return> \space to proceed.}}
  \define@key{front}{driver}{\front@write{\usepackage[#1]{graphicx}}%
                             \front@write{\usepackage[#1,svgnames]{xcolor}}}
  \edef\front@processkeys{\noexpand\setkeys{front}{\front@otheroptions}}
  \front@processkeys
  \endgroup
\fi
%    \end{macrocode}
% \end{macro}
% Set the options in the \file{frn} file: there we don't want to be
% writing the \file{frn} file, of course, nor we need aux files, but
% we add the private option.
% \changes{v1.4}{2011/07/18}{We write also the shape option to the \file{frn} file}
%    \begin{macrocode}
\edef\front@theoptions{nowrite,infront,\front@shape}
\ifdefined\front@signatures
  \g@addto@macro\front@theoptions{,signatures}
\fi
\ifdefined\front@noadvisor
  \g@addto@macro\front@theoptions{,noadvisor}
\fi
\ifdefined\front@swapnames
  \g@addto@macro\front@theoptions{,swapnames}
\fi
\ifdefined\front@norules
  \g@addto@macro\front@theoptions{,norules}
\fi
\ifdefined\front@nouppercase
  \g@addto@macro\front@theoptions{,nouppercase}
\fi
\front@expwrite{\string\usepackage[\front@theoptions]{frontespizio}}
\front@write{\nofiles}
%    \end{macrocode}
% Write in the \file{frn} file the font choosing command; here we need only 
% a one level expansion.
%    \begin{macrocode}
\expandafter\front@write\expandafter{\front@thefont}
%    \end{macrocode}
% \subsection{Commands, conditionals and registers}
% The following commands are necessary only when we are compiling 
% the frontispiece, when the \cs{front@infront} command is defined.
%    \begin{macrocode}
\ifdefined\front@infront
\def\fontoptionnormal{%
  \let\front@font\normalfont \let\front@scfont\scshape}
\def\fontoptionsans{%
  \let\front@font\sffamily \let\front@scfont\upshape}
\def\front@push{}
\def\front@thecandidate{Candidato}
\def\front@thecandidates{Candidati}
\def\front@theadvisor{Relatore}
\def\front@theadvisors{Relatori}
\def\front@thecoadvisor{Correlatore}
\def\front@thecoadvisors{Correlatori}
\def\front@punct{:}
\newif\iffront@titoletto
\newif\iffront@matr
\newif\iffront@onecand
\newif\iffront@morecand
\newif\iffront@correl
\newif\iffront@logo
\newif\iffront@inst
\newif\iffront@sottotit
\newif\iffront@multiple
\newif\iffront@division
\newif\iffront@school
\newif\iffront@foot
\newtoks\front@candtoks
\newcount\front@candcount
\newtoks\front@reltoks
\newcount\front@relcount
\newtoks\front@correltoks
\newcount\front@correlcount
\fi
%    \end{macrocode}
% We need a macro to hide the conditionals, which we load and define
% only when making the front page; the \cs{if} conditional will
% always expand to nothing or be skipped altogether up to the matching
% \cs{fi} when writing the \file{frn} file; if expanded, however,
% it will put in the correct conditional when making the front page.
%    \begin{macrocode}
\def\@front@#1{TT\fi\@nameuse{iffront@#1}}
%    \end{macrocode}
% Now we define the markup commands. We do this three times, because 
% they will behave differently in different conditions.
%    \begin{macrocode}
\iffront@write
%    \end{macrocode}
% \changes{v1.2}{2010/06/25}{Added the \texttt{Preambolo*} environment}
% If we are writing the \file{frn} file, then we simply copy the
% commands to it.  An exception is \cs{Preambolo}: in this case we
% copy only its argument. The same is with the |Preambolo*|
% environment, using \cs{Collect@Body}; the category code changes are
% made because we want to preserve newlines in the input.  Since there
% can be several candidate names, the \cs{Candidato} macro is treated
% differently, because it can have an optional argument.
%    \begin{macrocode}
\newcommand{\Preambolo}[1]{\front@write{#1}}
\newenvironment{Preambolo*}
  {\@makeother\%\@makeother\^^M\newlinechar=`\^^M
   \Collect@Body\front@write}{}
\newcommand{\Rientro}[1]{\front@write{\Rientro{#1}}}
\newcommand{\Margini}[4]{\front@write{\Margini{#1}{#2}{#3}{#4}}}
\newcommand{\Logo}[2][1.5cm]{\front@write{\Logo[#1]{#2}}}
\newcommand{\Filigrana}[2][height=10cm]{%
  \front@write{\Filigrana[#1]{#2}}}
\newcommand{\Universita}[1]{\front@write{\Universita{#1}}}
\newcommand{\Istituzione}[1]{\front@write{\Istituzione{#1}}}
\newcommand{\Facolta}[1]{\front@write{\Facolta{#1}}}
\newcommand{\Dipartimento}[1]{\front@write{\Dipartimento{#1}}}
\newcommand{\Divisione}[1]{\front@write{\Divisione{#1}}}
\newcommand{\Interfacolta}[1]{\front@write{\Interfacolta{#1}}}
\newcommand{\Corso}[2][Laurea Magistrale]{\front@write{\Corso[#1]{#2}}}
\newcommand{\Scuola}[1]{\front@write{\Scuola{#1}}}
\newcommand{\Titolo}[1]{\front@write{\Titolo{#1}}}
\newcommand{\Sottotitolo}[1]{\front@write{\Sottotitolo{#1}}}
\newcommand{\Annoaccademico}[1]{\front@write{\Annoaccademico{#1}}}
\newcommand{\Piede}[1]{\front@write{\Piede{#1}}}
\newcommand{\Titoletto}[1]{\front@write{\Titoletto{#1}}}
\newcommand{\Candidato}[2][]{%
  \def\next{#1}%
  \ifx\next\@empty
    \front@write{\Candidato{#2}}%
  \else
    \front@write{\Candidato[#1]{#2}}%
  \fi}
\newcommand{\Relatore}[1]{\front@write{\Relatore{#1}}}
\newcommand{\Correlatore}[1]{\front@write{\Correlatore{#1}}}
\newcommand{\NCandidato}[1]{\front@write{\NCandidato{#1}}}
\newcommand{\NCandidati}[1]{\front@write{\NCandidati{#1}}}
\newcommand{\NRelatore}[2]{\front@write{\NRelatore{#1}{#2}}}
\newcommand{\NCorrelatore}[2]{\front@write{\NCorrelatore{#1}{#2}}}
\newcommand{\Punteggiatura}[1]{\front@write{\Punteggiatura{#1}}}
%    \end{macrocode}
% Now some equivalent commands for backwards compatibility with the
% preproduction version called \pack{front-th}. Unfortunately, the old 
% command \cs{Matricola} cannot be made compatible.
%    \begin{macrocode}
\def\front@oldcommand#1#2{\def#1{\PackageWarning{frontespizio}
  {Old command \string#1 found; use \string#2}#2}}
\front@oldcommand\IlCandidato\Candidato
\front@oldcommand\Package\Preambolo
\front@oldcommand\MoreMargin\Rientro
\front@oldcommand\Margins\Margini
% Sorry, \Matricola cannot be used any more
\def\Matricola#1{\PackageError{frontespizio}
  {Old command \noexpand\Matricola found}
  {The command \noexpand\Matricola cannot be used with this package.%
   \MessageBreak Use the optional argument to \string\Candidato}}
%
\else\ifdefined\front@infront
%    \end{macrocode}
% If we are typesetting the front page, then we give the commands 
% their real meaning, i.e., we define macros which will be used in 
% \cs{preparefrontpage...}.
%    \begin{macrocode}
\newcommand{\Rientro}[1]{\def\front@push{\hspace{#1}}}
\newcommand{\Margini}[4]{\geometry{left=#1,bottom=#2,right=#3,top=#4}}
\newcommand{\Logo}[2][1.5cm]{\def\front@logo{#2}%
  \def\front@logosize{#1}\front@logotrue}
%    \end{macrocode}
% We support a centered logo in the background, using xkeyval.
% \changes{v1.2}{2010/06/25}{Changed \cs{Filigrana} definition}
%    \begin{macrocode}
\def\front@logobefore{1}\def\front@logoafter{1} % default values
\define@key{filigrana}{height}[10cm]{\def\front@logoheight{#1}}
\define@key{filigrana}{before}[1]{\def\front@logobefore{#1}}
\define@key{filigrana}{after}[1]{\def\front@logoafter{#1}}
\newcommand{\Filigrana}[2][height=10cm]{%
  \setkeys{filigrana}{#1}%
    \AtBeginShipoutNext{\AtBeginShipoutUpperLeft{% 
      \vtop to\paperheight{\hsize=\paperwidth
        \vspace*{\stretch{\front@logobefore}}
        \centering
        \includegraphics[height=\front@logoheight]{#2}
        \vspace{\stretch{\front@logoafter}}
}}}}
%    \end{macrocode}
% Now we continue the definition of the markup commands, mostly 
% passing their arguments to the internal macros; in some cases we 
% need more work, using token lists.
%    \begin{macrocode}
\newcommand{\Universita}[1]{\def\front@univ{#1}}
\newcommand{\Istituzione}[1]{\def\front@instit{#1}\front@insttrue}
\newcommand{\Facolta}[1]{\def\front@facoldip{#1}%
  \def\front@thefacoldip{Facolt\`a}}
\newcommand{\Dipartimento}[1]{\def\front@facoldip{#1}%
  \def\front@thefacoldip{Dipartimento}}
\newcommand{\Interfacolta}[1]{%
  \def\front@multiple{#1}\front@multipletrue}
\newcommand{\Divisione}[1]{\def\front@division{#1}\front@divisiontrue}
\newcommand{\Corso}[2][Laurea Magistrale]{%
  \def\front@cl{#1\unskip\space in #2}}
\newcommand{\Scuola}[1]{\def\front@school{#1}\front@schooltrue}
\newcommand{\Titolo}[1]{\def\front@title{#1}}
\newcommand{\Sottotitolo}[1]{\def\front@subtitle{#1}\front@sottotittrue}
\newcommand{\Annoaccademico}[1]{\def\front@anno{#1}}
\newcommand{\Piede}[1]{\def\front@foot{#1}\front@foottrue}
\newcommand{\Titoletto}[1]{\def\front@titoletto{#1}\front@titolettotrue}
\newcommand{\Candidato}[2][]{\advance\front@candcount\@ne
  \front@candtoks=\expandafter{\the\front@candtoks
    \front@docand{#1}{#2}}%
  \def\front@cand{#2}%
  \def\next{#1}%
  \ifx\next\@empty\else\def\front@matr{#1}\front@matrtrue\fi
}
\newcommand{\Relatore}[1]{\advance\front@relcount\@ne 
  \front@reltoks=\expandafter{\the\front@reltoks\\#1%
   \ifdefined\front@signatures\\[1cm]\fi}}
\newcommand{\Correlatore}[1]{%
  \front@correltrue\advance\front@correlcount\@ne
  \front@correltoks=\expandafter{\the\front@correltoks\\#1}}
\newcommand{\NCandidato}[1]{\def\front@thecandidate{#1}}
\newcommand{\NCandidati}[1]{\def\front@thecandidates{#1}}
\newcommand{\NRelatore}[2]{\def\front@theadvisor{#1}%
  \def\front@theadvisors{#2}}
\newcommand{\NCorrelatore}[2]{\def\front@thecoadvisor{#1}%
  \def\front@thecoadvisors{#2}}
\newcommand{\Punteggiatura}[1]{\def\front@punct{#1}}
%    \end{macrocode}
% Now we set the default fonts for the various parts of the 
% frontispiece.
% \begin{macro}{\frontinstitutionfont}
% \begin{macro}{\frontdivisionfont}
% \begin{macro}{\frontpretitlefont}
% \begin{macro}{\fronttitlefont}
% \begin{macro}{\frontsubtitlefont}
% \begin{macro}{\frontnamesfont}
% \begin{macro}{\frontsmallfont}
% \begin{macro}{\frontfootfont}
% \begin{macro}{\frontfixednamesfont}
%    \begin{macrocode}
\def\frontinstitutionfont{\fontsize{14}{17}\bfseries}
\def\frontdivisionfont{\fontsize{12}{16}\selectfont}
\def\frontpretitlefont{\fontsize{10}{12}\front@scfont}
\def\fronttitlefont{\fontsize{17}{21}\bfseries}
\def\frontsubtitlefont{\fontsize{12}{14}\selectfont}
\def\frontnamesfont{\fontsize{12}{14}\bfseries}
\def\frontsmallfont{\fontsize{9}{11}\selectfont}
\def\frontfootfont{\fontsize{12}{14}\bfseries}
\def\frontfixednamesfont{\normalfont\normalsize\front@font}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \begin{macro}{\frontcandidatesep}
% \begin{macro}{\frontrelcorrelsep}
% \begin{macro}{\frontlogosep}
% \begin{macro}{\frontadjustforsignatures}
% Some pseudo-parameters: the first is to separate candidates' names;
% the second to separate `Relatore' and `Correlatore' fields; the
% third to separate the logo from the University name; the fourth to
% adjust the `candidate-advisor' field in case there are many advisors
% and coadvisors and the "signature" option is in force.
%    \begin{macrocode}
\def\frontcandidatesep{3ex}
\def\frontrelcorrelsep{1ex}
\def\frontlogosep{6pt}
\def\frontadjustforsignatures{0pt}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% The command to typeset more than one candidate.
%    \begin{macrocode}
\def\front@docand#1#2{%
  #2\\% the candidate's name
  \def\next{#1}%
  \unless\ifx\next\@empty
    \frontsmallfont {Matricola }#1\\[\frontcandidatesep]
  \fi}
%    \end{macrocode}
% \begin{macro}{\front@MakeUppercase}
% \changes{v1.2}{2010/06/25}{Added option \opt{nouppercase}}
% We define \cs{front@MakeUppercase} to be \cs{MakeUppercase} unless
% \opt{nouppercase} has been specified, otherwise it does nothing.
%    \begin{macrocode}
\ifdefined\front@nouppercase
  \let\front@MakeUppercase\@firstofone
\else
  \let\front@MakeUppercase\MakeUppercase
  \fi
%    \end{macrocode}
% \end{macro}
% 
% \subsection{The typesetting}
% \changes{v1.4}{2011/07/18}{The command written in the \file{frn} file
%   depends now on the shape option}
% \begin{macro}{\preparefrontpagestandard}
% \changes{v1.4}{2011/07/18}{Added `standard' shape}
% Here is where the typesetting is defined.
%    \begin{macrocode}
\def\preparefrontpagestandard{%
\titlepage\front@font
\centering
\par
%    \end{macrocode}
% \end{macro}
% First block: the institution's logo.
%    \begin{macrocode}
\if\@front@{logo}
\includegraphics[height=\front@logosize]{\front@logo}\par
\vspace{\frontlogosep}
\fi
\par
%    \end{macrocode}
% Second block: the institution's name.
%    \begin{macrocode}
{\frontinstitutionfont
\if\@front@{inst}
  \front@instit
\else
  Universit\`a degli Studi di \front@univ
\fi\par}
\vspace{1.5ex}
\unless\ifdefined\front@norules\hrule\fi
\vspace{1.5ex}
%    \end{macrocode}
% Third block: the department's name; in Italy graduation theses are
% responsibility of Faculties, only Ph.D. theses are responsibility of
% Departments.
% \changes{v1.2}{2010/06/25}{Use \cs{front@MakeUppercase}}
%    \begin{macrocode}
{\frontdivisionfont
\if\@front@{multiple}
  \front@multiple
\else
  \if\@front@{division}
    \front@MakeUppercase{\front@division}
  \else
    \front@MakeUppercase{\front@thefacoldip\space di \front@facoldip}
  \fi
\fi\\
\if\@front@{school}
  \front@school
\else
  Corso di \front@cl
\fi
\par}
%    \end{macrocode}
% Fourth block: the specification of the thesis' kind.
%    \begin{macrocode}
\if\@front@{titoletto}
\vspace{2cm}
{\frontpretitlefont\front@titoletto\par}
\fi
\vspace{\fill}
%    \end{macrocode}
% Fifth block: the thesis' title.
%    \begin{macrocode}
{\fronttitlefont\front@title\par}
%    \end{macrocode}
% Sixth block: the thesis' subtitle, if present.
%    \begin{macrocode}
\if\@front@{sottotit}
\vspace{4ex}
{\frontsubtitlefont\front@subtitle\par}
\fi
\vspace{\fill}
%    \end{macrocode}

% Seventh block: the candidate's name and the advisor's name.  A
% \texttt{tabular*} spanning all the text width has two columns; on
% the left we put the candidate's name, on the right the advisor's
% name (possibly more than one) and, if present, the coadvisor's name.
% It the option `swapnames' has been given, the two columns are exchanged.
% \changes{v1.1}{2009/04/03}{Added \cs{front@makecandidates}}
% \changes{v1.1}{2009/04/03}{Added \cs{front@@makeadvisors}}
%    \begin{macrocode}
\def\front@makecandidates{%
  \begin{tabular}[t]{@{}l@{}}
  \relax\ifnum\front@candcount<1
    \PackageWarningNoLine{frontespizio}{Missing candidate name}%
  \else
    \frontfixednamesfont
    \ifnum\front@candcount=1
      \front@thecandidate
    \else
      \front@thecandidates
    \fi
    \front@punct\\
    \the\front@candtoks
  \fi
  \end{tabular}}
\def\front@makeadvisors{%
  \unless\ifdefined\front@noadvisor
    \begin{tabular}[t]{@{}l@{}}
    \relax
    \ifcase\front@relcount
      \PackageWarningNoLine{frontespizio}{Missing advisor name}%
    \or
      \frontfixednamesfont\front@theadvisor\front@punct
    \else
      \frontfixednamesfont\front@theadvisors\front@punct
    \fi
    \the\front@reltoks
    \if\@front@{correl}
      \\[\frontrelcorrelsep]
      \ifcase\front@correlcount\or
        \frontfixednamesfont\front@thecoadvisor\front@punct
      \else
        \frontfixednamesfont\front@thecoadvisors\front@punct
      \fi
    \the\front@correltoks
    \fi
    \end{tabular}
  \fi}
\vbox to .3\textheight{\parindent\z@
\frontnamesfont
\ifdefined\front@swapnames
  \begin{tabular*}{\textwidth}
    {@{\front@push}l@{\extracolsep{\fill}}l@{\front@push}}
  \front@makeadvisors&\front@makecandidates
  \end{tabular*}
\else
  \begin{tabular*}{\textwidth}
    {@{\front@push}l@{\extracolsep{\fill}}l@{\front@push}}
  \front@makecandidates&\front@makeadvisors
  \end{tabular*}
\fi
\par
\vfill}
%    \end{macrocode}
% Eighth block: the foot. Before setting it we do, if necessary, a 
% vertical negative skip.
%    \begin{macrocode}
\ifdefined\front@signatures\vskip\frontadjustforsignatures\fi
\unless\ifdefined\front@norules\hrule\fi
\vspace{1.5ex}
{\frontfootfont
 \if\@front@{foot}
   \front@foot
 \else
   Anno Accademico \front@anno
 \fi
 \par}
\endtitlepage}
%    \end{macrocode}
% \begin{macro}{\preparefrontpagesuftesi}
% \changes{v1.4}{2011/07/18}{Added suftesi shape}
% This shape is due to Ivan Valbusa, who created it for his class
% \pack{suftesi}. First of all we do some initialization, this
% shape is more rigid than the standard one.
%    \begin{macrocode}
\def\preparefrontpagesuftesi{%
  \titlepage\front@font
  \renewcommand{\frontinstitutionfont}{\normalfont}
  \renewcommand{\frontdivisionfont}{\large}
  \renewcommand{\frontpretitlefont}{\normalsize\sffamily}
  \renewcommand{\fronttitlefont}{\huge\sffamily}
  \renewcommand{\frontsubtitlefont}{\normalsize\sffamily}
  \renewcommand{\frontnamesfont}{\normalfont}
  \renewcommand{\frontfixednamesfont}{\normalsize\sffamily}
  \renewcommand{\frontfootfont}{\normalfont}
%    \end{macrocode}
% The paragraph indentation is zero.
%    \begin{macrocode}
  \parindent\z@
%    \end{macrocode}
% First block: logo and institutions
%    \begin{macrocode}
  \makebox[\textwidth][r]{%
  \begin{minipage}{6pc}
    \if\@front@{logo}
      {\includegraphics[height=\textwidth]{\front@logo}}
    \else
      \hspace*{\textwidth}
    \fi
  \end{minipage}%
  \hspace{2.5pc}%
  \begin{minipage}{\dimexpr\textwidth-4pc\relax}
  \frontinstitutionfont
  \if\@front@{inst}
    \front@instit
  \else
    Universit\`a degli Studi di \front@univ
  \fi\par
  \frontdivisionfont
  \if\@front@{multiple}
    \front@multiple
  \else
    \if\@front@{division}
      \front@division
    \else
      \front@thefacoldip\ di \front@facoldip
    \fi
  \fi\par
  \frontinstitutionfont
  \vskip1ex\hrule\vskip1.2ex
  \if\@front@{school}
    \front@school
  \else
    Corso di \front@cl
  \fi\par
  \end{minipage}\hspace*{4pc}}\par
  \vspace{\stretch{5}}
%    \end{macrocode}
% Second block: the specification of the thesis' kind.
%    \begin{macrocode}
  \if\@front@{titoletto}
    {\frontpretitlefont\front@titoletto\par}
  \fi
  \vspace{\stretch{2}}
%    \end{macrocode}
% Third block: the title and subtitle.
%    \begin{macrocode}
  {\fronttitlefont\color{\fronttitlecolor}\front@title\par}
  \if\@front@{sottotit}
    \vspace{4ex}
    {\frontsubtitlefont\front@subtitle\par}
  \fi
  \vspace{\stretch{3}}
%    \end{macrocode}
% We set up the block for the candidate's name (or candidates' names).
%    \begin{macrocode}
  \def\front@makecandidates{%
    \begin{tabular}[t]{@{}l}
    \relax\ifnum\front@candcount<1
      \PackageWarningNoLine{frontespizio}{Missing candidate name}%
    \else
      \frontfixednamesfont
      \ifnum\front@candcount=1
        \front@thecandidate
      \else
        \front@thecandidates
      \fi
      \front@punct\\
      \the\front@candtoks
    \fi
    \end{tabular}
  }
%    \end{macrocode}
% We set up the block for advisors and coadvisors.
%    \begin{macrocode}
  \def\front@makeadvisors{%
    \unless\ifdefined\front@noadvisor
      \begin{tabular}[t]{@{}l}
      \relax
      \ifcase\front@relcount
        \PackageWarningNoLine{frontespizio}{Missing advisor name}%
      \or
        \frontfixednamesfont\front@theadvisor\front@punct
      \else
        \frontfixednamesfont\front@theadvisors\front@punct
      \fi
      \the\front@reltoks
      \if\@front@{correl}
        \\[\frontrelcorrelsep]
        \ifcase\front@correlcount\or
          \frontfixednamesfont\front@thecoadvisor\front@punct
        \else
          \frontfixednamesfont\front@thecoadvisors\front@punct
        \fi
        \the\front@correltoks
      \fi
      \end{tabular}
    \fi}
  \vspace{\stretch{1}}
%    \end{macrocode}
% Third block: candidate and advisors.
%    \begin{macrocode}
  \frontnamesfont
  \ifdefined\front@swapnames% relatori candidati
    \front@makeadvisors\par
    \vspace{3ex}
    \front@makecandidates\par
  \else% candidati relatori
    \front@makecandidates\par
    \vspace{3ex}
    \front@makeadvisors\par
  \fi
  \vfill
  \ifdefined\front@signatures\vskip\frontadjustforsignatures\fi
  \unless\ifdefined\front@norules\fi
  \vspace{\stretch{5}}
%    \end{macrocode}
% Fourth block: academic year
%    \begin{macrocode}
  \frontfootfont
  \if\@front@{foot}
    \front@foot
  \else
    Anno Accademico \front@anno
  \fi
  \par
%    \end{macrocode}
% Now we close the title page.
%    \begin{macrocode}
\endtitlepage}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\preparefrontpage}
% \changes{v1.4}{2011/07/18}{Old macro \cs{preparefrontpage} is kept
%   for compatibility}
% For compatibility with old \file{frn} files, we define also the old macro
%    \begin{macrocode}
\let\preparefrontpage\preparefrontpagestandard
%    \end{macrocode}
% \end{macro}
%
% The following \cs{else} matches the |\ifdefined\front@infront|
% several lines ahead
%    \begin{macrocode}
\else
%    \end{macrocode}
% If we get here, we are neither compiling the frontispiece, nor
% writing to the \file{frn} file, so we provide dummy definitions for
% all the user level commands.
% \changes{v1.4}{2011/07/18}{Added missing definition for \texttt{Preambolo*}}
%    \begin{macrocode}
\newenvironment{Preambolo*}{\Collect@Body\@gobble}{}
\newcommand{\Preambolo}[1]{}
\newcommand{\Rientro}[1]{}
\newcommand{\Margini}[4]{}
\newcommand{\Logo}[2][]{}
\newcommand{\Filigrana}[2][]{}
\newcommand{\Universita}[1]{}
\newcommand{\Istituzione}[1]{}
\newcommand{\Facolta}[1]{}
\newcommand{\Dipartimento}[1]{}
\newcommand{\Interfacolta}[1]{}
\newcommand{\Divisione}[1]{}
\newcommand{\Corso}[2][]{}
\newcommand{\Scuola}[1]{}
\newcommand{\Titolo}[1]{}
\newcommand{\Sottotitolo}[1]{}
\newcommand{\Annoaccademico}[1]{}
\newcommand{\Piede}[1]{}
\newcommand{\Titoletto}[1]{}
\newcommand{\Candidato}[2][]{}
\newcommand{\Relatore}[1]{}
\newcommand{\Correlatore}[1]{}
\newcommand{\NCandidato}[1]{}
\newcommand{\NCandidati}[1]{}
\newcommand{\NRelatore}[2]{}
\newcommand{\NCorrelatore}[2]{}
\newcommand{\Punteggiatura}[1]{}
%    \end{macrocode}
% The following two \cs{fi} match |\ifdefined\front@infront|
% and \cs{iffront@write} several lines ahead
%    \begin{macrocode}
\fi
\fi
%    \end{macrocode}
% \subsection{The external file inclusion}
% We define a command to hold the requested file name extension.
%    \begin{macrocode}
\ifpdf
  \def\front@ext{pdf}
\else
  \ifxetex
    \def\front@ext{pdf}
  \else
    \def\front@ext{eps}
  \fi
\fi
%    \end{macrocode}
% If we use \pack{amsbook}, then the titlepage environment doesn't
% generate the verso page, while book does. If we use \pack{memoir} we
% have to exploit its \texttt{titlingpage} environment.
% \changes{v1.3}{2011/03/08}{Support for memoir}
%    \begin{macrocode}
\@ifclassloaded{amsbook}
  {\def\front@cp{\null\thispagestyle{empty}\newpage
    \advance\c@page\m@ne}}
  {\let\front@cp\relax}
\@ifclassloaded{memoir}
  {\let\titlepage\titlingpage 
   \toks0={\let\setcounter\@gobbletwo}%
   \toks2=\expandafter{\endtitlingpage}%
   \edef\endtitlepage{\the\toks0 \the\toks2 }}
  {\let\front@cp\relax}
%    \end{macrocode}
% \begin{macro}{\front@message}
% \changes{v1.2}{2010/06/25}{Added infrastructure for the final message}
% Here we define the infrastructure for the final message.
%    \begin{macrocode}
\newif\if@front@message
\def\front@message{%
  \PackageWarningNoLine{frontespizio}
    {Remember to compile \jobname-frn with\MessageBreak
    \ifpdf
      pdflatex \jobname-frn%
    \else
      \ifxetex
        xelatex \jobname-frn
      \else
        latex \jobname-frn\MessageBreak
        dvips -o \jobname-frn.eps \jobname-frn%
      \fi
    \fi\MessageBreak
    and then rerun \ifpdf pdf\fi \ifxetex xe\fi latex}}
%    \end{macrocode}
% \end{macro}
% \begin{environment}{frontespizio}
% \changes{v1.2}{2010/06/25}{Changed the definition to use \pack{atbegshi}}
% \changes{v1.2}{2010/06/25}{Excised the final message stuff}
% \changes{v1.2}{2010/06/25}{Modified \cs{endfrontespizio} for the
% final message}
% The environment \env{frontespizio} goes in the main file and is
% responsible for ending the writing of the \file{frn} file (in its final
% part; in the initial part it typesets the front page by including
% the pdf file if already typeset.
% 
% The front page commands must go before the end of this environment;
% the best choice is, of course, to put them inside it.  Maybe a
% key-value syntax would be preferable.
% 
% Now we define the environment; its purpose is to initialize the
% mechanism and finalize it.
%    \begin{macrocode}
\def\frontespizio{%
  \titlepage\null
  \IfFileExists{\jobname-frn.\front@ext}
    {\AtBeginShipoutNext{\AtBeginShipoutUpperLeft{% 
     \vbox to\z@{\hbox{\includegraphics{\jobname-frn}}\vss}}}}
    {\PackageWarningNoLine{frontespizio}
       {Missing file \jobname-frn.\front@ext}%
     \@front@messagetrue}%
  \afterpage{\thispagestyle{empty}}%
  \endtitlepage
  \if@twoside\front@cp\fi
}
\def\endfrontespizio{%
  \front@write{\begin{document}}
  \front@expwrite{\string\preparefrontpage\front@shape}
  \front@write{\end{document}}
  \iffront@write\immediate\closeout\front@out\fi
  \ifdefined\front@mdfiveold
    \xdef\front@mdfivenew{\pdfmdfivesum file{\jobname-frn.tex}}%
    \ifx\front@mdfiveold\front@mdfivenew\else
      \@front@messagetrue
    \fi
  \fi
  \if@front@message
    \AtEndDocument{\front@message}
  \fi
}
%    \end{macrocode}
% \iffalse
%</package>
% \fi
% \end{environment}
% The end.
% \Finale