diff --git a/Makefile b/Makefile index 1f3ae3dd5120198f947c9c71e28d9a6c8b083bca..8b8d799a6fc9fcd65b222a9ceb8736c0794659a0 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ all: explode: fithesis3.cls $(PDFFILES) # This pseudo-target performs the unit tests -test: +test: all cd test; make # This pseudo-target creates the distribution archives. diff --git a/fithesis.dtx b/fithesis.dtx index 22d8418c48c1da082dbf2ee564c34031996b9135..0c7988b4aa7587e55930910f75c2dbe36f54f92d 100644 --- a/fithesis.dtx +++ b/fithesis.dtx @@ -1231,3 +1231,5 @@ % \input{style/mu/fi.dtx} % \subsubsection{The style files of the Faculty of Science} % \input{style/mu/sci.dtx} +% \subsubsection{The style files of the Faculty of Arts} +% \input{style/mu/phil.dtx} diff --git a/locale/czech.dtx b/locale/czech.dtx index ac7dfa41c156b05e0d02b8b6dae0eee8b7b7353e..f96a131ef16fcf201443e335b92ab0047d8bc753 100644 --- a/locale/czech.dtx +++ b/locale/czech.dtx @@ -174,12 +174,39 @@ % This is the Czech locale file specific to the Faculty of % Arts at the Masaryk University in Brno. % It replaces the \texttt{facultyName} placeholder with the -% correct value. +% correct value. It also defines the \texttt{declaration} string +% and redefines the \texttt{typeName} and +% \texttt{typeName@akuzativ} strings in accordance with the +% requirements of the faculty. % \iffalse %<*mu/phil> % \fi\begin{macrocode} -\ProvidesFile{fithesis3/locale/mu/phil/czech.def}[2015/04/18] +\ProvidesFile{fithesis3/locale/mu/phil/czech.def}[2015/04/26] \def\thesis@czech@facultyName{Filozofická fakulta} +\def\thesis@czech@typeName{% + \ifx\thesis@type\thesis@bachelors% + Bakalářská diplomová práce% + \else\ifx\thesis@type\thesis@masters% + Magisterská diplomová práce% + \else\ifx\thesis@type\thesis@doctoral% + DisertaÄŤnĂ práce% + \else% + <<NeznámĂ˝ typ práce (\thesis@type)>>% + \fi\fi\fi} +\def\thesis@czech@typeName@akuzativ{% + \ifx\thesis@type\thesis@bachelors% + Diplomovou práci% + \else\ifx\thesis@type\thesis@masters% + Diplomovou práci% + \else\ifx\thesis@type\thesis@doctoral% + DisertaÄŤnĂ práci% + \else% + <<NeznámĂ˝ typ práce (\thesis@type)>>% + \fi\fi\fi} +\def\thesis@czech@declaration{% + Prohlašuji, Ĺľe jsem \thesis@@lower{typeName@akuzativ} + vypracoval\thesis@czech@gender@koncovka\ samostatnÄ›~s vyuĹľitĂm + uvedenĂ© literatury.} % \end{macrocode}\iffalse %</mu/phil> % \fi\file{locale/mu/ped/czech.def} diff --git a/locale/slovak.dtx b/locale/slovak.dtx index 5b37ae2fc68f8cbbe6b5b33ab45a389ae28bd3c2..1d8f0e05170baf5f732c8109684062a32dd7543a 100644 --- a/locale/slovak.dtx +++ b/locale/slovak.dtx @@ -172,12 +172,40 @@ % This is the Slovak locale file specific to the Faculty of % Arts at the Masaryk University in Brno. % It replaces the \texttt{facultyName} placeholder with the -% correct value. +% correct value. It also defines the \texttt{declaration} string +% and redefines the \texttt{typeName} and +% \texttt{typeName@akuzativ} strings in accordance with the +% requirements of the faculty. % \iffalse %<*mu/phil> % \fi\begin{macrocode} \ProvidesFile{fithesis3/locale/mu/phil/slovak.def}[2015/04/18] \def\thesis@slovak@facultyName{Filozofická fakulta} +\def\thesis@slovak@typeName{% + \ifx\thesis@type\thesis@bachelors% + Bakalárska diplomová práca% + \else\ifx\thesis@type\thesis@masters% + Magisterská diplomová práca% + \else\ifx\thesis@type\thesis@doctoral% + DizertaÄŤná práca% + \else% + <<Neznámy typ práce (\thesis@type)>>% + \fi\fi\fi} +\def\thesis@slovak@typeName@akuzativ{% + \ifx\thesis@type\thesis@bachelors% + DiplomovĂş prácu% + \else\ifx\thesis@type\thesis@masters% + DiplomovĂş prácu% + \else\ifx\thesis@type\thesis@doctoral% + DizertaÄŤnĂş prácu% + \else% + <<NeznámĂ˝ typ práce (\thesis@type)>>% + \fi\fi\fi} +\def\thesis@slovak@declaration{% + Prehlašujem, Ĺľe som predloĹľenĂş \thesis@@lower{% + typeName@akuzativ} vypracoval\thesis@slovak@gender@koncovka\ + samostatne na základe vlastnĂ˝ch zistenĂ a len s~pouĹľitĂm + uvedenej literatĂşry a prameĹov.} % \end{macrocode}\iffalse %</mu/phil> % \fi\file{locale/mu/ped/slovak.def} diff --git a/style/mu/Makefile b/style/mu/Makefile index c034bfece162b6a6ded387282ddca0160e626699..d8d14c0d959c63c052d73cb551df7f88750b3d79 100644 --- a/style/mu/Makefile +++ b/style/mu/Makefile @@ -1,5 +1,5 @@ -LOGS=base.log fi.log sci.log -OUTPUT=fithesis3-base.sty fithesis3-1[012].clo fithesis3-fi.sty fithesis3-sci.sty +LOGS=base.log fi.log sci.log phil.log +OUTPUT=fithesis3-base.sty fithesis3-1[012].clo fithesis3-fi.sty fithesis3-sci.sty fithesis3-phil.sty .PHONY: explode implode all all: explode diff --git a/style/mu/base.dtx b/style/mu/base.dtx index 920951682f9074bd1ed4e7eb2a70e7495547961e..6854fc82ee298d47380dbb38c057cc67b314995f 100644 --- a/style/mu/base.dtx +++ b/style/mu/base.dtx @@ -5,7 +5,7 @@ % University in Brno. % If inheritance is enabled for style files, then this file is % always the second style file to be loaded right after -% \texttt{style/base.tex}, regardless of the +% \texttt{style/base.sty}, regardless of the % value of the |\thesis@style| macro. % \begin{macrocode} \ProvidesPackage{fithesis3/style/mu/fithesis3-base}[2015/04/12] @@ -73,8 +73,8 @@ \DeclareOption{nolof}{\def\thesis@blocks@lof{}} \DeclareOption{lof}{\let\thesis@blocks@lof\listoffigures} \newif\ifthesis@cover -\DeclareOption{nocover}{\thesis@covertrue} -\DeclareOption{cover}{\thesis@coverfalse} +\DeclareOption{nocover}{\thesis@coverfalse} +\DeclareOption{cover}{\thesis@covertrue} % Options executed by default \ExecuteOptions{12pt,oneside,final,monochrome,lot,lof,nocover} @@ -142,31 +142,88 @@ % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@cover} % The |\thesis@blocks@cover| private macro typesets the thesis -% cover. +% cover. It is composed of three private macros: +% \begin{itemize} +% \item\DescribeMacro{\thesis@blocks@cover@header}^^A +% |\thesis@blocks@cover@header| -- The header of the cover +% page +% \item\DescribeMacro{\thesis@blocks@cover@content}^^A +% |\thesis@blocks@cover@content| -- The content of the cover +% page +% \item\DescribeMacro{\thesis@blocks@cover@footer}^^A +% |\thesis@blocks@cover@footer| -- The footer of the cover +% page +% \end{itemize} +% This allows the subsequently loaded style files to only redefine +% certain parts of the cover page. % \begin{macrocode} \def\thesis@blocks@cover{% - \thesis@blocks@clear - \ifthesis@cover\else + \ifthesis@cover% + \thesis@blocks@clear% \ifthesis@twoside\@twosidefalse\fi % Temporarily disable twoside - \begin{alwayssingle} - \thispagestyle{empty} - \begin{center} - {\sc\thesis@@{universityName}\\\thesis@@{facultyName}} - \vskip 1.4em - \includegraphics[width=40mm]{% - \thesis@logopath\thesis@facultyLogo}\\[0.4in] - \let\footnotesize\small - \let\footnoterule\relax{} - {\thesis@titlePage@Huge\bf\thesis@TeXtitle\par\vfil}% - \vskip 0.8in - {\sc \thesis@@{typeName}}\\[0.3in] - {\thesis@titlePage@Large\bf\thesis@author} - \par\vfill - {\thesis@titlePage@large\thesis@place, \thesis@@{semester}} - \end{center} - \end{alwayssingle} + \begin{alwayssingle}% + \thispagestyle{empty}% + \begin{center}% + \thesis@blocks@cover@header% + \includegraphics[width=40mm]{% + \thesis@logopath\thesis@facultyLogo}\\[0.4in]% + \let\footnotesize\small% + \let\footnoterule\relax{}% + \thesis@blocks@cover@content% + \par\vfill% + \thesis@blocks@cover@footer% + \end{center}% + \end{alwayssingle}% \ifthesis@twoside\@twosidetrue\fi % Re-enable twoside \fi} +\def\thesis@blocks@cover@header{% + {\sc\thesis@@{universityName}\\\thesis@@{facultyName}}\\[1.4em]} +\def\thesis@blocks@cover@content{% + {\thesis@titlePage@Huge\bf\thesis@TeXtitle\par\vfil}% + \vskip 0.8in% + {\sc \thesis@@{typeName}}\\[0.3in]% + {\thesis@titlePage@Large\bf\thesis@author}} +\def\thesis@blocks@cover@footer{% + {\thesis@titlePage@large\thesis@place, \thesis@@{semester}}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\thesis@blocks@titlePage} +% The |\thesis@blocks@titlePage| private macro typesets the thesis +% title page. It is composed of three private macros: +% \begin{itemize} +% \item\DescribeMacro{\thesis@blocks@titlePage@header}^^A +% |\thesis@blocks@titlePage@header| -- The header of the +% cover page +% \item\DescribeMacro{\thesis@blocks@titlePage@content}^^A +% |\thesis@blocks@titlePage@content| -- The content of the +% cover page +% \item\DescribeMacro{\thesis@blocks@titlePage@footer}^^A +% |\thesis@blocks@titlePage@footer| -- The footer of the +% cover page +% \end{itemize} +% This allows the subsequently loaded style files to only redefine +% certain parts of the title page. +% \begin{macrocode} +\def\thesis@blocks@titlePage{% + \thesis@blocks@clear% + \begin{alwayssingle}% + \thispagestyle{empty}% + \begin{center}% + \thesis@blocks@titlePage@header% + {\edef\thesis@logopath@color{% + \thesis@logopath\ifthesis@color color/\fi} + \includegraphics[width=40mm]{% + \thesis@logopath@color\thesis@facultyLogo}\\[0.4in]}% + \let\footnotesize\small% + \let\footnoterule\relax{}% + \thesis@blocks@titlePage@content% + \par\vfill% + \thesis@blocks@titlePage@footer% + \end{center}% + \end{alwayssingle}} +\let\thesis@blocks@titlePage@header=\thesis@blocks@cover@header +\let\thesis@blocks@titlePage@content=\thesis@blocks@cover@content +\let\thesis@blocks@titlePage@footer=\thesis@blocks@cover@footer % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@tables} % The |\thesis@blocks@tables| private macro typesets the table of @@ -191,10 +248,8 @@ \thesis@@{declaration}% \vskip 2cm% \hfill\thesis@author% - \par\vfill% - \textbf{\thesis@@{advisorTitle}:} \thesis@advisor% - \par\vfil% - \end{alwayssingle}} + \end{alwayssingle} + \thesis@blocks@clear} % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@thanks} % The |\thesis@blocks@thanks| private macro typesets the diff --git a/style/mu/fi.dtx b/style/mu/fi.dtx index 1ab39f2830deea5a59c441288259f51a48c67810..599ae6b98e7966fcc31911cf44579ce1a06fdc7d 100644 --- a/style/mu/fi.dtx +++ b/style/mu/fi.dtx @@ -9,8 +9,9 @@ \ProvidesPackage{fithesis3/style/mu/fithesis3-fi}[2015/04/12] % \end{macrocode} % \begin{macro}{\thesis@blocks@titlePage} -% The |\thesis@blocks@titlePage| private macro typesets the thesis -% title page. Along with the macros required by the +% The style file redefines the cover and title page footers to +% include the thesis advisor's name and signature in case of a +% rigorous thesis. Along with the macros required by the % locale file interface, the locale files need to define the % following private macros: % \begin{itemize} @@ -19,19 +20,7 @@ % signature field typeset in the case of a rigorous thesis % \end{itemize} % \begin{macrocode} -\def\thesis@blocks@titlePage{% - \thesis@blocks@clear - \begin{alwayssingle} - \thispagestyle{empty} - \begin{center} - {\thesis@titlePage@normalsize\sc\thesis@@{universityName}\\% - \thesis@@{facultyName}} - \vskip 1.4em - \edef\thesis@logopath@color{\thesis@logopath\ifthesis@color color/\fi} - \includegraphics[width=40mm]{% - \thesis@logopath@color\thesis@facultyLogo}\\[0.4in] - \let\footnotesize\small - \let\footnoterule\relax{} +\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\bf\thesis@author} @@ -40,30 +29,47 @@ \ifx\thesis@type\thesis@rigorous% {\thesis@titlePage@large\\[0.3in] {\bf\thesis@@{advisorTitle}:} \thesis@advisor} - \fi% - \par\vfill - {\thesis@titlePage@large\thesis@place, \thesis@@{semester} - % If this is a rigorous thesis, create space for the advisor's - % signature - \ifx\thesis@type\thesis@rigorous% - \let\@A\relax\newlength{\@A} - \settowidth{\@A}{\thesis@@{advisorSignature}} - \setlength{\@A}{\@A+1cm} - \hfill\raisebox{-0.5em}{\parbox{\@A}{ - \centering - \rule{\@A}{1pt}\\ - \thesis@@{advisorSignature} - }} - \fi} - \end{center} + \fi}% +\def\thesis@blocks@titlePage@footer{% + {\thesis@titlePage@large\thesis@place, \thesis@@{semester} + % If this is a rigorous thesis, create space for the advisor's + % signature + \ifx\thesis@type\thesis@rigorous% + \let\@A\relax\newlength{\@A} + \settowidth{\@A}{\thesis@@{advisorSignature}} + \setlength{\@A}{\@A+1cm} + \hfill\raisebox{-0.5em}{\parbox{\@A}{ + \centering + \rule{\@A}{1pt}\\ + \thesis@@{advisorSignature} + }} + \fi}} +% \end{macrocode} +% \end{macro}\begin{macro}{\thesis@blocks@declaration} +% The |\thesis@blocks@declaration| private macro typesets the +% declaration text. Compared to the definition within the +% \texttt{style/mu/base.sty} file, this private macro also +% typesets the advisor's name at the bottom of the page. +% \begin{macrocode} +\def\thesis@blocks@declaration{% + \thesis@blocks@clear% + \begin{alwayssingle}% + \chapter*{\thesis@@{declarationTitle}}% + \thesis@@{declaration}% + \vskip 2cm% + \hfill\thesis@author% + \par\vfill% + \textbf{\thesis@@{advisorTitle}:} \thesis@advisor% + \par\vfil% \end{alwayssingle}} % \end{macrocode} % \end{macro} % The style file defines the autolayout preamble as the cover and % the title page followed by the assignment, declaration, % acknowledgement, abstract, keywords, table of contents and list -% of tables and figures as a part of the front matter. All of the -% blocks are defined in the \texttt{style/mu/base.tex} file. +% of tables and figures as a part of the front matter. All blocks +% beside |\thesis@titlePage| are defined in the +% \texttt{style/mu/base.sty} file. % \begin{macrocode} \def\thesis@preamble{% \thesis@blocks@cover% @@ -75,6 +81,5 @@ \thesis@blocks@abstract% \thesis@blocks@keywords% \thesis@blocks@tables% - \thesis@blocks@mainMatter% -} + \thesis@blocks@mainMatter} % \end{macrocode} diff --git a/style/mu/phil.dtx b/style/mu/phil.dtx new file mode 100644 index 0000000000000000000000000000000000000000..150737fbe8c9738640861ac11c7650861f933dda --- /dev/null +++ b/style/mu/phil.dtx @@ -0,0 +1,38 @@ +% \file{style/mu/fithesis3-phil.sty} +% This is the style file for the theses written at the Faculty of +% Arts 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/auth/do/^^A +% 1421/4581421/Vzor_bakalarske_prace.pdf}}. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{fithesis3/style/mu/fithesis3-phil}[2015/04/26] +% \end{macrocode} +% The style file redefines the cover and title page headers to +% include the department and the field name. +% \begin{macrocode} +\def\thesis@blocks@cover@header{% + {\sc\thesis@titlePage@LARGE\thesis@@{universityName}\\% + \thesis@titlePage@Large\thesis@@{facultyName}\\[0.3em]% + \thesis@titlePage@large\thesis@department}\\[2em]} +\def\thesis@blocks@titlePage@header{% + {\sc\thesis@titlePage@LARGE\thesis@@{universityName}\\% + \thesis@titlePage@Large\thesis@@{facultyName}\\[0.3em]% + \thesis@titlePage@large\thesis@department\\[0.2em]} + {\thesis@titlePage@large\thesis@field\\[2em]}} +% \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 +% \texttt{style/mu/base.sty} file. +% \begin{macrocode} +\def\thesis@preamble{% + \thesis@blocks@cover% + \thesis@blocks@titlePage% + \thesis@blocks@frontMatter% + \thesis@blocks@declaration% + \thesis@blocks@thanks% + \thesis@blocks@tables% + \thesis@blocks@mainMatter} +% \end{macrocode} diff --git a/style/mu/phil.ins b/style/mu/phil.ins new file mode 100644 index 0000000000000000000000000000000000000000..333ce99399d6c9c059682252ac92213e7cd59896 --- /dev/null +++ b/style/mu/phil.ins @@ -0,0 +1,3 @@ +\input ../../docstrip.cfg +\generate{\file{fithesis3-phil.sty}{\from{phil.dtx}{}}} +\endbatchfile diff --git a/style/mu/sci.dtx b/style/mu/sci.dtx index 5e2496c55914887ccf7934655c4ed342472b4554..53108e4602986de7e2d3757ad46a79c59ea217cb 100644 --- a/style/mu/sci.dtx +++ b/style/mu/sci.dtx @@ -237,8 +237,8 @@ % cover. % \begin{macrocode} \def\thesis@blocks@cover{% - \thesis@blocks@clear - \ifthesis@cover\else + \ifthesis@cover + \thesis@blocks@clear \ifthesis@twoside\@twosidefalse\fi % Temporarily disable twoside \begin{alwayssingle} \thispagestyle{empty} @@ -302,28 +302,14 @@ \end{alwayssingle} \ifthesis@twoside\@twosidetrue\fi}} % Re-enable twoside % \end{macrocode} -% \end{macro}\begin{macro}{\thesis@blocks@declaration} -% The |\thesis@blocks@declaration| private macro typesets the -% declaration text. -% \begin{macrocode} -\def\thesis@blocks@declaration{% - \thesis@blocks@clear% - \begin{alwayssingle}% - \chapter*{\thesis@czech@declarationTitle}% - \thesis@czech@declaration% - \vskip 2cm% - \hfill\thesis@author% - \end{alwayssingle} - \thesis@blocks@clear} -% \end{macrocode} % \end{macro} % The style file defines the autolayout preamble as the cover and % the title page followed by the bibliographic entry, the abstract % assignment, acknowledgement, table of contents and list of tables -% and figures as a part of the front matter. All of the blocks +% and figures as a part of the front matter. All the blocks % beside |\thesis@blocks@bibEntry| and |\thesis@blocks@bibEntryEn| -% are defined in the \texttt{style/mu/base.tex} file. The entire -% front matter is typeset as though the locale were chech in +% are defined in the \texttt{style/mu/base.sty} file. The entire +% front matter is typeset as though the locale were Czech in % accordance with the formal requirements of the faculty. % \begin{macrocode} \def\thesis@preamble{% diff --git a/test/phil-czech.tex b/test/phil-czech.tex new file mode 100644 index 0000000000000000000000000000000000000000..fea31d8bf6dcb6de890d1a2022228ab3ba4bcfe4 --- /dev/null +++ b/test/phil-czech.tex @@ -0,0 +1,9 @@ +\documentclass[monochrome]{../fithesis3} +\usepackage[czech]{babel} +\thesissetup{ + basepath=.., + faculty=phil +} +\begin{document} + foo bar +\end{document} \ No newline at end of file diff --git a/test/phil-english.tex b/test/phil-english.tex new file mode 100644 index 0000000000000000000000000000000000000000..1a84a8361a8deb2f6536145d96c13d6fa6b66e9e --- /dev/null +++ b/test/phil-english.tex @@ -0,0 +1,9 @@ +\documentclass[monochrome]{../fithesis3} +\usepackage[english]{babel} +\thesissetup{ + basepath=.., + faculty=phil +} +\begin{document} + foo bar +\end{document} \ No newline at end of file diff --git a/test/phil-slovak.tex b/test/phil-slovak.tex new file mode 100644 index 0000000000000000000000000000000000000000..822fecc5b06b872e9ddccae72127e79120aa10f5 --- /dev/null +++ b/test/phil-slovak.tex @@ -0,0 +1,9 @@ +\documentclass[monochrome]{../fithesis3} +\usepackage[slovak]{babel} +\thesissetup{ + basepath=.., + faculty=phil +} +\begin{document} + foo bar +\end{document} \ No newline at end of file