summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/toptesi/trieste.sty
blob: 7878394d462c1e42bc74444c8077be3792d257e5 (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
%%
%% This is file `trieste.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% toptesi.dtx  (with options: `toptrst')
%%   ______________________________________________________
%%   The TOPtesi package
%%   Copyright (C) 2010 Claudio Beccari
%%   All rights reserved
%% 
%%   License information appended
%% 
%% \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         \~}

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{trieste}%
    [2008/12/15 v.5.00 specific options for classical thesis typesetting]
\def\StileTrieste{classica}
\newif\if@utoretitolo \@utoretitolofalse
\newif\if@ldstyle \@ldstylefalse
\DeclareOption{autoretitolo}{\@utoretitolotrue}
\DeclareOption{oldstyle}{\@ldstyletrue}
\ProcessOptions
\def\Candidato{Laureando}
\def\Candidata{Laureanda}
\def\Candidati{Laureandi}
\def\Candidate{Laureande}
\newcounter{tomo}
\newcommand*{\tomo}{\clearpage\stepcounter{tomo}\frontespizio}
\renewcommand*{\lapagina}{%
    \ifnumeriromani
        \thepage
    \else
        \if@ldstyle
            \expandafter\oldstylenums\expandafter{\thepage}%
        \else
            \thepage
        \fi
    \fi
    }
\if@utoretitolo
   \if@twoside
       \renewcommand*{\ps@headings}{\let\@mkboth\markboth%
       \def\@oddfoot{\null \hfill \textbf{\lapagina} \hfill \null}%
       \let\@evenfoot\@oddfoot
       \def\@evenhead{%
           \setbox\@intesta\hbox{\latintext
           \footnotesize\strut\textsc{%
           \@author\ifx\@secondauthor\empty\else\ et al.\fi: \@stitle}%
           }%
       \ifdim\wd\@intesta>\textwidth\headwrn{\titolo}\fi
       \underline{\makebox[\textwidth]{\box\@intesta}}}%
       \def\@oddhead{\latintext
           \setbox\@intesta\hbox{%
               \footnotesize\strut\textsl{\rightmark}}%
       \ifdim\wd\@intesta>\textwidth \headWarn{\section}\fi%
       \underline{\makebox[\textwidth]{\box\@intesta}}}%
       \def\chaptermark##1{\markright{\thechapter\ -- ##1}{}}%
       \def\sectionmark##1{}}%
   \else
       \renewcommand*{\ps@headings}{\let\@mkboth\markboth
           \def\@oddfoot{\null \hfill \textbf{\lapagina}\hfill \null}%
           \let\@evenfoot\empty\let\@evenhead\empty
           \def\@oddhead{{\setbox\z@\hbox{\latintext\footnotesize
           \textsc{%
           \@author\ifx\@secondauthor\empty\else\ et al.\fi: \@stitle}}%
           \setbox\tw@\hbox{\latintext\footnotesize\textsl{\rightmark}}%
           \dimen@=2em\advance\dimen@\wd\z@\advance\dimen@\wd\tw@
           \ifdim\dimen@<\textwidth \relax
           \else
             \setbox\z@\vbox{\hsize.48\textwidth\parindent\z@\raggedright
             \latintext\footnotesize\textsc{%
             \@author\ifx\@secondauthor\empty\else\ et al.\fi: \@stitle
             }}%
             \setbox\tw@\vbox{\hsize.48\textwidth\parindent\z@\raggedleft
                 \latintext\footnotesize\textsl{\rightmark}}%
           \fi
           \setbox\@intesta\vbox to\z@{%
                \vss\hbox to\textwidth{\strut\box\z@\hfill\box\tw@}}%
           \underline{\box\@intesta}}}%
           \def\chaptermark##1{\markright{\thechapter\ -- ##1}}}
   \fi
\fi
\newcommand*\NomeAnnoAccademico[1]{\gdef\AnnoAccademico{#1}}
\@ifundefined{AnnoAccademico}{\gdef\AnnoAccademico{Anno accademico}}{}
\def\annoaccademico#1{%
  \def\@submitdate{{\large\textsc{\AnnoAccademico}} {\Large\s@tanno#1!}}}
\def\s@tanno#1-#2!{\oldstylenums{#1\EnDash#2}}

\def\EnDash{{\settowidth{\dimen@}{\large\sc I}%
\setbox\tw@\hbox{2}\dimen\tw@.5\ht\tw@\advance\dimen\tw@-.5\dp\tw@
\dimen4\dimen\tw@\advance\dimen4by.0385ex\relax
\advance\dimen\tw@-.0385ex\relax
\makebox[1.5\dimen@]{%
    \vrule\@width\dimen@\@height\dimen4\@depth-\dimen\tw@}}}
\renewcommand\footnoterule{%
  \kern-6\p@
  \hrule\@width.4\columnwidth
  \kern5.6\p@}
\setlength\footnotesep{12\p@}
\setlength{\skip\footins}{24\p@ \@plus 4\p@ \@minus 2\p@}
\DeclareMathSymbol{*}{\mathalpha}{symbols}{"03}
\newcommand*\nota[1][*]{%
    \xdef\@thefnmark{\ensuremath{\m@th#1}}\@footnotemark\@footnotetext
}
\newcommand*{\NoteWhiteLine}{\par\vspace*{-.3\baselineskip}}
\newcommand*\paginavuota{\clearpage\thispagestyle{empty}\null\clearpage}
\newenvironment{dedica}{\clearpage
    \if@twoside
        \ifodd\c@page\else\thispagestyle{empty}\clearpage\fi
    \fi
    \thispagestyle{empty}%
    \list{}{\labelwidth\z@
    \leftmargin.5\textwidth
    \parindent\z@
    \raggedright\LARGE\itshape}\item[]
}{%
    \endlist\clearpage
}
\newenvironment{citazioni}{%
    \clearpage\thispagestyle{empty}
    \list{}{\labelwidth\z@
    \leftmargin.5\textwidth
    \parindent\z@
    \raggedright}\item[]
}{%
    \endlist\clearpage
}
%% 
%% Copyright 2005-2010 Claudio Beccari
%% 
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%% 
%% This work is "author-maintained"
%% 
%% This work consists of this file toptesi.dtx, a README file
%% and the derived files:
%% 
%% toptesi.cls, toptesi.sty, topfront.sty, topcommand.sty, topsize14,
%% trieste.sty, toptesi.cfg, and the English documentation toptesi.pdf;
%% 
%% Furthermore the bundle contains the documentation source file toptesi-doc.tex
%% and the derived file toptesi-doc.pdf.
%% 
%% The toptesi-example.tex source file is just an example that shows how
%% to use the various commands; by commenting or decommenting certain
%% source lines it is possible to typeset different kind of theses and their
%% frontpages.
%% 
%% The toptesi.cfg file is a sample of a local configuration file that can be
%% freely edited and modified.
%% 
%% By running pdflatex on toptesi.dtx the user gets the class, sty and cfg files
%% and the English documentation file in pdf format.
%% 
%% The documentation file toptesi-doc.pdf is in Italian; its source file is
%% another example of how to use toptesi.
%%
%% End of file `trieste.sty'.