From 0c2d3d4464ed26135a8ff7818a7019cd889e2090 Mon Sep 17 00:00:00 2001 From: witiko <witiko@gmail.com> Date: Mon, 27 Apr 2015 23:29:49 +0200 Subject: [PATCH] Added the style of the Faculty of Medicine. --- fithesis.dtx | 4 +- locale/czech.dtx | 21 +++++- locale/english.dtx | 21 +++++- locale/slovak.dtx | 20 +++++- style/mu/Makefile | 4 +- style/mu/base.dtx | 10 +-- style/mu/econ.dtx | 50 ++++++++++----- style/mu/fi.dtx | 2 +- style/mu/med.dtx | 148 +++++++++++++++++++++++++++++++++++++++++++ style/mu/med.ins | 3 + style/mu/ped.dtx | 2 +- style/mu/phil.dtx | 4 +- style/mu/sci.dtx | 4 +- test/med-czech.tex | 9 +++ test/med-english.tex | 9 +++ test/med-slovak.tex | 9 +++ 16 files changed, 284 insertions(+), 36 deletions(-) create mode 100644 style/mu/med.dtx create mode 100644 style/mu/med.ins create mode 100644 test/med-czech.tex create mode 100644 test/med-english.tex create mode 100644 test/med-slovak.tex diff --git a/fithesis.dtx b/fithesis.dtx index 7bdb792..f67d37f 100644 --- a/fithesis.dtx +++ b/fithesis.dtx @@ -1112,7 +1112,7 @@ \ifx\relax#2% \expandafter\@gobbletwo% \else% - #1 + #1% \fi% \thesis@head#2}% \def\thesis@tail#1 #2{% @@ -1292,3 +1292,5 @@ % \subsubsection{The style files of the Faculty of Economics and % Administration} % \input{style/mu/econ.dtx} +% \subsubsection{The style files of the Faculty of Medicine} +% \input{style/mu/med.dtx} diff --git a/locale/czech.dtx b/locale/czech.dtx index 77f3dd1..2e3ed4f 100644 --- a/locale/czech.dtx +++ b/locale/czech.dtx @@ -103,7 +103,7 @@ % \fi\begin{macrocode} \ProvidesFile{fithesis3/locale/mu/law/czech.def}[2015/04/26] -% Různe +% Různé \def\thesis@czech@abstractTitle{Abstrakt} % Zástupné texty @@ -158,12 +158,27 @@ % This is the Czech locale file specific to the Faculty of % Medicine at the Masaryk University in Brno. % It replaces the \texttt{facultyName} placeholder with the -% correct value. +% correct value and redefines the \texttt{abstractTitle}, +% and \texttt{placeholders@abstract} strings in accordance with +% strings customary at the faculty. The file also defines the +% \texttt{bib@title} and \texttt{bib@pages} strings required by the +% |\thesis@blocks@bibEntry| block defined within the +% \texttt{style/mu/fithesis3-med.sty} style file. % \iffalse %<*mu/med> % \fi\begin{macrocode} -\ProvidesFile{fithesis3/locale/mu/med/czech.def}[2015/04/18] +\ProvidesFile{fithesis3/locale/mu/med/czech.def}[2015/04/26] + +% Různé +\def\thesis@czech@abstractTitle{Anotace} + +% Zástupné texty +\def\thesis@czech@placeholders@abstract{Text abstraktu} \def\thesis@czech@facultyName{Lékařská fakulta} + +% Bibliografický záznam +\def\thesis@czech@bib@title{Bibliografický záznam} +\def\thesis@czech@bib@pages{str} % \end{macrocode}\iffalse %</mu/med> % \fi\file{locale/mu/fi/czech.def} diff --git a/locale/english.dtx b/locale/english.dtx index 72c487b..5c43217 100644 --- a/locale/english.dtx +++ b/locale/english.dtx @@ -126,12 +126,26 @@ % This is the English locale file specific to the Faculty of % Medicine at the Masaryk University in Brno. % It replaces the \texttt{facultyName} placeholder with the -% correct value. +% correct value and redefines the \texttt{abstractTitle} string +% in accordance with strings customary at the faculty. +% The file also defines the \texttt{bib@title} and +% \texttt{bib@pages} strings required by the +% |\thesis@blocks@bibEntry| block defined within the +% \texttt{style/mu/fithesis3-med.sty} style file. % \iffalse %<*mu/med> % \fi\begin{macrocode} \ProvidesFile{fithesis3/locale/mu/med/english.def}[2015/04/18] + +% Miscellaneous +\def\thesis@english@abstractTitle{Annotation} + +% Placeholders \def\thesis@english@facultyName{Faculty of Medicine} + +% Bibliographic entry +\def\thesis@english@bib@title{Bibliographic record} +\def\thesis@english@bib@pages{p} % \end{macrocode}\iffalse %</mu/med> % \fi\file{locale/mu/fi/english.def} @@ -175,7 +189,10 @@ % This is the Slovak locale file specific to the Faculty of % Education at the Masaryk University in Brno. % It replaces the \texttt{facultyName} placeholder with the -% correct value. +% correct value. The file also defines the +% \texttt{bib@title} and \texttt{bib@pages} strings required by the +% |\thesis@blocks@bibEntry| block defined within the +% \texttt{style/mu/fithesis3-ped.sty} style file. % \iffalse %<*mu/ped> % \fi\begin{macrocode} diff --git a/locale/slovak.dtx b/locale/slovak.dtx index 78dd388..b5bb923 100644 --- a/locale/slovak.dtx +++ b/locale/slovak.dtx @@ -156,12 +156,28 @@ % This is the Slovak locale file specific to the Faculty of % Medicine at the Masaryk University in Brno. % It replaces the \texttt{facultyName} placeholder with the -% correct value. +% correct value and redefines the \texttt{abstractTitle}, +% and \texttt{placeholders@abstract} strings in accordance +% with strings customary at the faculty. The file also defines the +% \texttt{bib@title} and \texttt{bib@pages} strings required by the +% |\thesis@blocks@bibEntry| block defined within the +% \texttt{style/mu/fithesis3-med.sty} style file. + % \iffalse %<*mu/med> % \fi\begin{macrocode} -\ProvidesFile{fithesis3/locale/mu/med/slovak.def}[2015/04/18] +\ProvidesFile{fithesis3/locale/mu/med/slovak.def}[2015/04/26] + +% Rôzne +\def\thesis@slovak@abstractTitle{Anotácie} + +% Zástupné texty +\def\thesis@slovak@placeholders@abstract{Text abstraktu} \def\thesis@slovak@facultyName{Lekárska fakulta} + +% Bibliografický zoznam +\def\thesis@slovak@bib@title{Bibliografický záznam} +\def\thesis@slovak@bib@pages{str} % \end{macrocode}\iffalse %</mu/med> % \fi\file{locale/mu/fi/slovak.def} diff --git a/style/mu/Makefile b/style/mu/Makefile index 5c51d9e..4f673a6 100644 --- a/style/mu/Makefile +++ b/style/mu/Makefile @@ -1,5 +1,5 @@ -LOGS=base.log fi.log sci.log phil.log ped.log fss.log law.log econ.log -OUTPUT=fithesis3-base.sty fithesis3-1[012].clo fithesis3-fi.sty fithesis3-sci.sty fithesis3-phil.sty fithesis3-ped.sty fithesis3-fss.sty fithesis3-law.sty fithesis3-econ.sty +LOGS=base.log fi.log sci.log phil.log ped.log fss.log law.log econ.log med.log +OUTPUT=fithesis3-base.sty fithesis3-1[012].clo fithesis3-fi.sty fithesis3-sci.sty fithesis3-phil.sty fithesis3-ped.sty fithesis3-fss.sty fithesis3-law.sty fithesis3-econ.sty fithesis3-med.sty .PHONY: explode implode all all: explode diff --git a/style/mu/base.dtx b/style/mu/base.dtx index ac53c05..4d0f0d9 100644 --- a/style/mu/base.dtx +++ b/style/mu/base.dtx @@ -238,13 +238,13 @@ \thesis@titlePage@large\thesis@department\\% \fi} \ifthesis@blocks@cover@field@% - {\thesis@titlePage@large\vskip 2em% + {\thesis@titlePage@large\vskip 1em% {\bf\thesis@@{fieldTitle}:} \thesis@field}% \fi\vskip 2em} \def\thesis@blocks@cover@content{% {\thesis@titlePage@Huge\bf\thesis@TeXtitle\par\vfil}% \vskip 0.8in% - {\sc \thesis@@{typeName}}\\[0.3in]% + {\thesis@titlePage@large\sc\thesis@@{typeName}}\\[0.3in]% {\thesis@titlePage@Large\bf\thesis@author}} \def\thesis@blocks@cover@footer{% {\thesis@titlePage@large\thesis@place, \thesis@@{semester}}} @@ -329,7 +329,7 @@ \thesis@titlePage@large\thesis@department\\% \fi} \ifthesis@blocks@titlePage@field@% - {\thesis@titlePage@large\vskip 2em% + {\thesis@titlePage@large\vskip 1em% {\bf\thesis@@{fieldTitle}:} \thesis@field}% \fi\vskip 2em} \let\thesis@blocks@titlePage@content=\thesis@blocks@cover@content @@ -385,7 +385,7 @@ \thesis@blocks@clearRight {\def\cleardoublepage{} \chapter*{\thesis@@{abstractTitle}}}% - \thesis@abstract% + \noindent\thesis@abstract% \par\vfil\null% \end{alwayssingle}} % \end{macrocode} @@ -418,7 +418,7 @@ \thesis@blocks@clearRight {\def\cleardoublepage{}% \chapter*{\thesis@@{keywordsTitle}}% - \thesis@keywords}% + \noindent\thesis@keywords}% \par\vfill% \end{alwayssingle}} % \end{macrocode} diff --git a/style/mu/econ.dtx b/style/mu/econ.dtx index 4eead98..b128d91 100644 --- a/style/mu/econ.dtx +++ b/style/mu/econ.dtx @@ -14,11 +14,18 @@ % \begin{macrocode} \thesis@requireLocale{english} % \end{macrocode} -% The file loads the \textsf{geometry} package to set the type -% area according to the formal requirements of the faculty. This -% leads to overfull lines and is against the good conscience of the -% author of the style. +% 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. +% \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} \geometry{top=25mm,bottom=20mm,left=25mm,right=25mm,includeheadfoot} % \end{macrocode} @@ -46,22 +53,35 @@ % \end{macro} % The style file configures the title page header to include the % name of the field of study and redefines the title page content -% to include the author and advisor name and the title page footer -% to only include year and place as per the requirements of the +% not to include the author's name and the title page footer +% to include both the author's and advisor's name, the year and +% place of the thesis defense as per the requirements of the % faculty. % \begin{macrocode} \thesis@blocks@titlePage@field@true \def\thesis@blocks@titlePage@content{% - {\thesis@titlePage@Huge\bf\thesis@upper{TeXtitle}\\[0.1in]% - \thesis@TeXtitleEn\\[0.3in]}% - {\thesis@titlePage@normalsize{\sc\thesis@@{typeName}}\\} - % Typeset the thesis author and advisor - {\thesis@titlePage@large\vfill\begin{tabular}{l@{\hskip 0.5in}l} - {\bf\thesis@@{advisorTitle}:} & {\bf\thesis@@{authorTitle}:}\\ - \thesis@advisor & \thesis@author - \end{tabular}}} + {\thesis@titlePage@Huge\bf\thesis@upper{TeXtitle}\\[0.1in]% + \thesis@TeXtitleEn\\[0.3in]}% + {\thesis@titlePage@large{\sc\thesis@@{typeName}}\\}} \def\thesis@blocks@titlePage@footer{% - {\thesis@titlePage@large\thesis@place, \thesis@year}} + {\thesis@titlePage@large + {% Calculate the width of the thesis author and advisor boxes + \let\@A\relax\newlength{\@A}\settowidth{\@A}{{% + \bf\thesis@@{advisorTitle}:}} + \let\@B\relax\newlength{\@B}\settowidth{\@B}{\thesis@advisor} + \let\@C\relax\newlength{\@C}\settowidth{\@C}{{% + \bf\thesis@@{authorTitle}:}} + \let\@D\relax\newlength{\@D}\settowidth{\@D}{\thesis@author} + \let\@left\relax\newlength{\@left}\pgfmathsetlength{\@left}{% + max(\@A,\@B)} + \let\@right\relax\newlength{\@right}\pgfmathsetlength{\@right}{% + max(\@C,\@D)} + % Typeset the thesis author and advisor boxes + \vskip 2in\begin{minipage}[t]{\@left} + {\bf\thesis@@{advisorTitle}:}\\\thesis@advisor + \end{minipage}\hfill\begin{minipage}[t]{\@right} + {\bf\thesis@@{authorTitle}:}\\\thesis@author + \end{minipage}}\\[1em]\thesis@place, \thesis@year}} % \end{macrocode} % \begin{macro}{\thesis@blocks@frontMatter} % The |\thesis@blocks@frontMatter| private macro sets up the style diff --git a/style/mu/fi.dtx b/style/mu/fi.dtx index 599ae6b..1cacb84 100644 --- a/style/mu/fi.dtx +++ b/style/mu/fi.dtx @@ -22,7 +22,7 @@ % \begin{macrocode} \def\thesis@blocks@titlePage@content{% {\thesis@titlePage@Huge\bf\thesis@TeXtitle\par\vfil}\vskip 0.8in - {\thesis@titlePage@normalsize\sc\thesis@@{typeName}\\[0.3in]} + {\thesis@titlePage@large\sc\thesis@@{typeName}\\[0.3in]} {\thesis@titlePage@Large\bf\thesis@author} % If this is a rigorous thesis, typeset the name of the % thesis advisor. diff --git a/style/mu/med.dtx b/style/mu/med.dtx new file mode 100644 index 0000000..4e60bad --- /dev/null +++ b/style/mu/med.dtx @@ -0,0 +1,148 @@ +% \file{style/mu/fithesis3-med.sty} +% 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 Department of Optometry and Orthoptics\footnote^^A +% {See \url{https://is.muni.cz/do/med/zpravyprac/Optometrie/NALE^^A +% ZITOSTI_ZAVERECNE_PRACE.doc}}. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{fithesis3/style/mu/fithesis3-med}[2015/04/27] +% \end{macrocode} +% In addition to the main locale, the file also requires the +% English locale. +% \begin{macrocode} +\thesis@requireLocale{english} +% \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} +% \begin{macro}{\thesis@blocks@cover} +% The |\thesis@blocks@cover| private macro typesets the thesis +% cover. +% \begin{macrocode} +\def\thesis@blocks@cover{% + \ifthesis@cover + \thesis@blocks@clear + \begin{alwayssingle} + \thispagestyle{empty} + \begin{center} + {\sc\thesis@titlePage@LARGE\thesis@@{universityName}\\% + \thesis@titlePage@Large\thesis@@{facultyName}\\} + \vfill + {\bf\thesis@titlePage@Huge\thesis@@{typeName}} + \vfill + {\thesis@titlePage@large\thesis@place + \ \thesis@year\hfill\thesis@author} + \end{center} + \end{alwayssingle} + \fi} +% \end{macro} +% The style file redefines the title page content +% not to include the author's name and the title page footer +% to include both the author's and advisor's name, the field of +% study and the semester and place of the thesis defense as per +% the requirements of the department. +% \begin{macrocode} +\def\thesis@blocks@titlePage@content{% + {\thesis@titlePage@Huge\bf\thesis@TeXtitle\\[0.3in]}% + {\thesis@titlePage@large{\sc\thesis@@{typeName}}\\}} +\def\thesis@blocks@titlePage@footer{% + {\thesis@titlePage@large + {% Calculate the width of the thesis author and advisor boxes + \let\@A\relax\newlength{\@A}\settowidth{\@A}{{% + \bf\thesis@@{advisorTitle}:}} + \let\@B\relax\newlength{\@B}\settowidth{\@B}{\thesis@advisor} + \let\@C\relax\newlength{\@C}\settowidth{\@C}{{% + \bf\thesis@@{authorTitle}:}} + \let\@D\relax\newlength{\@D}\settowidth{\@D}{\thesis@author} + \let\@E\relax\newlength{\@E}\settowidth{\@E}{{% + \bf\thesis@@{field}:}} + \let\@F\relax\newlength{\@F}\settowidth{\@F}{\thesis@field} + \let\@left\relax\newlength{\@left}\pgfmathsetlength{\@left}{% + max(\@A,\@B)} + \let\@right\relax\newlength{\@right}\pgfmathsetlength{\@right}{% + max(\@C,\@D,\@E,\@F)} + % Typeset the thesis author and advisor boxes + \vskip 3in\begin{minipage}[t]{\@left} + {\bf\thesis@@{advisorTitle}:}\\\thesis@advisor + \end{minipage}\hfill\begin{minipage}[t]{\@right} + {\bf\thesis@@{authorTitle}:}\\\thesis@author + \\[1em]{\bf\thesis@@{fieldTitle}:}\\\thesis@field + \end{minipage}}\\[1em]\thesis@place, \thesis@@{semester}}} +% \end{macrocode} +% \end{macro}\begin{macro}{\thesis@blocks@frontMatter} +% The |\thesis@blocks@frontMatter| private macro sets up the style +% of the front matter of the thesis. The page numbering is arabic +% as per 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 + % In case of double-sided typesetting, change the geometry + \ifthesis@twoside + \geometry{top=25mm,bottom=20mm,left=35mm, + right=15mm, includeheadfoot} + \fi\pagestyle{empty} + \parindent 1.5em + \setcounter{page}{1} + \pagenumbering{arabic}} +% \end{macrocode} +% \end{macro}\begin{macro}{\thesis@blocks@bibEntry} +% The |\thesis@blocks@bibEntry| private macro typesets a +% bibliographical entry. Along with the macros required by the +% locale file interface, the \textit{locale} files need to define +% the following private macros: +% \begin{itemize} +% \item|\thesis@|\emph{locale}|@bib@title| -- The title of the +% |\thesis@blocks@bib@title| block +% \item|\thesis@|\emph{locale}|@bib@pages| -- The abbreviation of +% pages used in the bibliographical entry +% \end{itemize} +% \begin{macrocode} +\def\thesis@blocks@bibEntry{% + \chapter*{\thesis@@{bib@title}} + \noindent\thesis@upper{author@tail}, \thesis@author@head. + \emph{\thesis@title}. \thesis@place: \thesis@@{universityName}, + \thesis@@{facultyName}, \thesis@department, \thesis@year. + \thesis@pages\ \thesis@@{bib@pages}. + \thesis@@{advisorTitle}: \thesis@advisor.} +% \end{macrocode} +% \end{macro} +% The style file defines the autolayout preamble as the cover and +% the title page followed by the annotation, bibliographical entry, +% declaration, acknowledgement table of contents and the optional list +% of tables and figures as a part of the front matter. All blocks are +% defined in the \texttt{style/mu/base.sty} file, although some are +% redefined in this file. +% \begin{macrocode} +\def\thesis@preamble{% + \thesis@blocks@cover% + \thesis@blocks@frontMatter% + \thesis@blocks@titlePage% + \onehalfspacing% + \thesis@blocks@abstract% + \thesis@blocks@abstractEn% + \thesis@blocks@keywords% + \thesis@blocks@keywordsEn% + \thesis@blocks@bibEntry% + \thesis@blocks@declaration% + \thesis@blocks@thanks% + \thesis@blocks@tables% + \thesis@blocks@mainMatter} +% \end{macrocode} diff --git a/style/mu/med.ins b/style/mu/med.ins new file mode 100644 index 0000000..8d9ab13 --- /dev/null +++ b/style/mu/med.ins @@ -0,0 +1,3 @@ +\input ../../docstrip.cfg +\generate{\file{fithesis3-med.sty}{\from{med.dtx}{}}} +\endbatchfile diff --git a/style/mu/ped.dtx b/style/mu/ped.dtx index f683065..330acb2 100644 --- a/style/mu/ped.dtx +++ b/style/mu/ped.dtx @@ -20,7 +20,7 @@ \thesis@blocks@titlePage@department@true \def\thesis@blocks@titlePage@content{% {\thesis@titlePage@Huge\bf\thesis@TeXtitle\par\vfil}\vskip 0.8in - {\thesis@titlePage@normalsize\sc\thesis@@{typeName}\\[0.3in]} + {\thesis@titlePage@large\sc\thesis@@{typeName}\\[0.3in]} {\thesis@titlePage@Large\bf\thesis@author} % Typeset the name of the thesis advisor. {\thesis@titlePage@large\\[0.3in] diff --git a/style/mu/phil.dtx b/style/mu/phil.dtx index e2aba75..a0fcf0d 100644 --- a/style/mu/phil.dtx +++ b/style/mu/phil.dtx @@ -16,8 +16,8 @@ % \end{macrocode} % The style file defines the autolayout preamble as the cover and % the title page followed by the declaration, acknowledgement -% table of contents and list of tables and figures as a part of the -% front matter. All blocks are defined in the +% table of contents and the optional list of tables and figures as +% a part of the front matter. All blocks are defined in the % \texttt{style/mu/base.sty} file. % \begin{macrocode} \def\thesis@preamble{% diff --git a/style/mu/sci.dtx b/style/mu/sci.dtx index 018fda3..d492718 100644 --- a/style/mu/sci.dtx +++ b/style/mu/sci.dtx @@ -17,8 +17,8 @@ % The file loads the following packages: % \begin{itemize} % \item\textsf{tikz} -- Used for dimension arithmetic. -% \item\textsf{changepage} -- Used for altering the geometry of -% the page. +% \item\textsf{geometry} -- Used for the modifications of the type +% area dimensions. % \end{itemize} % \begin{macrocode} \thesis@require{tikz} diff --git a/test/med-czech.tex b/test/med-czech.tex new file mode 100644 index 0000000..4fa2957 --- /dev/null +++ b/test/med-czech.tex @@ -0,0 +1,9 @@ +\documentclass[monochrome]{../fithesis3} +\usepackage[czech]{babel} +\thesissetup{ + basepath=.., + faculty=med +} +\begin{document} + foo bar +\end{document} \ No newline at end of file diff --git a/test/med-english.tex b/test/med-english.tex new file mode 100644 index 0000000..547e348 --- /dev/null +++ b/test/med-english.tex @@ -0,0 +1,9 @@ +\documentclass[monochrome]{../fithesis3} +\usepackage[english]{babel} +\thesissetup{ + basepath=.., + faculty=med +} +\begin{document} + foo bar +\end{document} \ No newline at end of file diff --git a/test/med-slovak.tex b/test/med-slovak.tex new file mode 100644 index 0000000..1e7ba97 --- /dev/null +++ b/test/med-slovak.tex @@ -0,0 +1,9 @@ +\documentclass[monochrome]{../fithesis3} +\usepackage[slovak]{babel} +\thesissetup{ + basepath=.., + faculty=med +} +\begin{document} + foo bar +\end{document} \ No newline at end of file -- GitLab