summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/fithesis/style/mu/med.dtx
blob: aa514412e52812d86c1bd4bc095b1634748e65f2 (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
% \file{style/mu/fithesis-med.sty}
% \changes{v1.0.0}{2021/02/21}{Files were renamed after
%   breaking changes in package loading after PR 438 in \LaTeXe. [VN]}
% \changes{v1.0.0}{2021/03/19}{Updated urls to show the most recent
%   requirements and recommendations used in preparation of the
%   template. [TV]}
% This is the style file for the theses written at the Faculty of
% Medicine at the Masaryk University in Brno. It has been prepared
% in accordance with the formal requirements published at the
% website of the faculty \footnote {See \url{https://is.muni.cz/do/^^A
% med/uredni_deska/pravni_normy/smernice_dekana/2020/smernice_lf_mu^^A
% _2_2020_-_pokyny_k_formalnim_nalezitostem_zaverecnych_bakalarskyc^^A
% h/Smernice_LF_MU_2-2020_-_Pokyny_k_formalnim_nalezitostem_zaverec^^A
% nych_bakalarskych_a_diplomovych_praci_vypracovanych_na_Lekarske_f^^A
% akulte_MU.pdf}}.
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fithesis/style/mu/fithesis-mu-med}[2021/04/24]
%    \end{macrocode}
% The file defines the color scheme of the respective faculty. Note
% the the color definitions are in RGB, which makes the resulting
% files generally unsuitable for printing.
%    \begin{macrocode}
\thesis@color@setup{
  links={HTML}{F58E76},
  tableEmph={HTML}{FF9D85},
  tableOdd={HTML}{FFF5F6},
  tableEven={HTML}{FFDEDF}}
%    \end{macrocode}
% The bibliography support is enabled. The |authortitle| citations
% are used and the bibliography is sorted by year, name, and title.
%    \begin{macrocode}
\thesis@bibliography@setup{%
  style=authortitle,
  sorting=ynt}
\thesis@bibliography@load
%    \end{macrocode}
% The AMA citation style is defined using |authortitle| as the basis.
% The following code has been adapted from
% \url{https://tex.stackexchange.com/a/233423/70941}.
% \changes{v1.0.0}{2021/03/26}{^^A
%   The Faculty of Medicine at the Masaryk University in Brno uses the
%   AMA citation and reference style. [VN]}
%    \begin{macrocode}
\ifthesis@bibliography@loaded@
  \DeclareNameAlias{sortname}{last-first}
  \renewcommand*{\revsdnamepunct}{}
  \DeclareFieldFormat[%
    article,inbook,incollection,inproceedings,patent,thesis,unpublished]%
    {title}{{#1\isdot}}
  \renewbibmacro{in:}{}
  \DeclareFieldFormat{pages}{#1}
  \renewcommand*{\bibpagespunct}{\addcolon}
  \DeclareFieldFormat{journaltitle}{#1\addperiod}
  \DeclareFieldFormat{booktitle}{{#1}}
  \DeclareFieldFormat{title}{{#1}}
  \renewbibmacro*{journal+issuetitle}{%
    \usebibmacro{journal}%
    \setunit*{\addspace}%
    \iffieldundef{series}
    {}
    {\newunit
      \printfield{series}%
      \setunit{\addspace}}%
    \usebibmacro{issue+date}%
    \setunit{\addsemicolon\addspace}%
    \usebibmacro{volume+number+eid}%
    \setunit{\addcolon\space}%
    \usebibmacro{issue}%
    \newunit%
  }
  \renewbibmacro*{issue+date}{\printfield{year}}
  \renewcommand*{\finalnamedelim}{\multinamedelim}
\fi
%    \end{macrocode}
% The file loads the following packages:
% \begin{itemize}
%   \item\textsf{tikz} -- Used for dimension arithmetic.
%   \item\textsf{geometry} -- Allows for modifications of the type
%     area dimensions.
%   \item\textsf{setspace} -- Allows for line height modifications.
% \end{itemize}
% In addition to this, the type area width is set to
% 16\,cm in accordance with the formal requirements of the faculty.
% This leads to overfull lines and is against the good conscience
% of the author of this style.
%    \begin{macrocode}
\thesis@require{tikz}
\thesis@require{geometry}
\thesis@require{setspace}
\geometry{top=25mm,bottom=20mm,left=25mm,right=25mm,includeheadfoot}
%    \end{macrocode}
% The style file configures the upper part of the title page headers
% to include the the name of the department and the study programme
% which are by default in the bottom part of the title page. Upon failure
% of the \textit{xpatchcmd}, \cs{thesis@xpatchError} is called.
% \changes{v0.3.49}{2018/02/11}{Removed an extraneous \cs{vskip} in
%   the style files for the Masaryk University in Brno. [VN]}
% \changes{v1.0.0}{2021/02/26}{^^A
%   The style files for the Faculty of Medicine
%   at the Masaryk University in Brno
%   no longer redefine the \cs{thesis@blocks@titlePage@footer}
%   and \cs{thesis@blocks@titlePage@content} macros, which are no
%   longer defined. [VN]}
% \changes{v1.0.0}{2021/03/22}{Added redefinition of the titlePage
%   layout as per the faculty requirements. Department name and
%   programme are in the upper part of the titlePage. [TV]}
% \changes{v1.0.0}{2021/04/23}{^^A
%   The style files of the Faculty of Medicine at the Masary University
%   in Brno no longer redefine the \cs{thesis@blocks@cover} macro.
%   [TV]}
% \changes{v1.0.0}{2021/05/06}{Added conditional redefinition for the
%   study field. [TV]}
%    \begin{macrocode}
\thesis@blocks@titlePage@field@false

\thesis@xpatch\thesis@blocks@titlePage{%
  {\sf\thesis@titlePage@large\thesis@@{advisorTitle}: \thesis@advisor\par}%
   \vspace{0.75cm}%
   \ifthesis@blocks@titlePage@department@
     {\sf\thesis@titlePage@large\thesis@department@name\par}%
   \fi
   \ifthesis@blocks@titlePage@programme@
     \vspace{0.25cm}%
     {\sf\thesis@titlePage@large\thesis@@{bib@programme}:
      \thesis@programme\par}%
   \fi
   \ifthesis@blocks@titlePage@field@
     \vspace{0.25cm}%
     {\sf\thesis@titlePage@large\thesis@@{fieldTitle}: 
      \thesis@field@name\par}%
   \fi
   \vfill
}{}

\thesis@xpatch\thesis@blocks@titlePage{%
  {\sf\thesis@titlePage@large\thesis@@upper{facultyName}\par}%
  \vfill
}{%
  {\sf\thesis@titlePage@large\thesis@@upper{facultyName}\par}%
  \vspace{0.5cm}%
  {\sf\thesis@titlePage@large\thesis@programme\par}%
  \vspace{0.25cm}%
  {\sf\thesis@titlePage@large\thesis@department@name\par}%
  \vspace{1cm}%
}
%    \end{macrocode}
% \begin{macro}{\thesis@blocks@frontMatter}
% The |\thesis@blocks@frontMatter| macro sets up the style of the
% front matter of the thesis. The page numbering is arabic in
% accordance with the formal requirements and it is hidden. In case
% of double-sided typesetting, the geometry is altered according to
% the requirements of the faculty.
% \begin{macrocode}
\def\thesis@blocks@frontMatter{%
  \thesis@blocks@clear
  \newgeometry{top=25mm,bottom=20mm,left=35mm,
    right=15mm, includeheadfoot}
  \pagestyle{empty}
  \parindent 1.5em
  \setcounter{page}{1}
  \pagenumbering{roman}}
%    \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@mainMatter}
% The |\thesis@blocks@mainMatter| macro sets up the style
% of the main matter of the thesis. The leading is adjusted in
% accordance with the requirements of the faculty.
% \begin{macrocode}
\def\thesis@blocks@mainMatter{%
  \thesis@blocks@clear
  \newgeometry{top=25mm,bottom=20mm,left=35mm,
    right=15mm, includeheadfoot}
  \setcounter{page}{1}
  \pagenumbering{arabic}
  \pagestyle{thesisheadings}
  \parindent 1.5em
  \onehalfspacing}
%    \end{macrocode}
% \end{macro}
% Note that there is no direct support for the seminar paper and
% thesis proposal types.  If you would like to change the contents
% of the preamble and the postamble, you should modify the
% |\thesis@blocks@preamble| and |\thesis@blocks@postamble| macros.
%
% All blocks within the autolayout preamble and postamble that are
% not defined within this file are defined in the
% \texttt{style/mu/fithesis-base.sty} file.
% \changes{v1.0.0}{2021/03/22}{Reorganised the blocks to fit the
%   faculty's requirements. [TV]}
% \changes{v1.0.0}{2021/04/24}{^^A
%   Change \cs{thesis@facultyLogo},
%   \cs{thesis@blocks@facultyLogo@monochrome}, and
%   \cs{thesis@blocks@facultyLogo@color} to use the new logotype
%   of the Masaryk University in Brno in the correct size and
%   localization. Add \cs{thesis@blocks@seal}. [VN]}
%    \begin{macrocode}
\def\thesis@blocks@preamble{%
  \thesis@blocks@coverMatter
    \thesis@blocks@cover
  \thesis@blocks@frontMatter
    \thesis@blocks@titlePage
    \thesis@blocks@seal
    \thesis@blocks@declaration
    \thesis@blocks@clear
      \thesis@blocks@abstract
      \thesis@blocks@keywords
    \thesis@blocks@clear
      \thesis@blocks@abstractEn
      \thesis@blocks@keywordsEn
    \thesis@blocks@thanks
    \thesis@blocks@tables}
\def\thesis@blocks@postamble{%
  \thesis@blocks@bibliography}
%    \end{macrocode}