From 51bfb23fd1efd6f083c9f56f136a11d3f9350585 Mon Sep 17 00:00:00 2001 From: witiko <witiko@gmail.com> Date: Mon, 27 Apr 2015 18:18:47 +0200 Subject: [PATCH] Added the style file of the Faculty of Economics & Administration. The `\thesis@declaration` macro was added. --- fithesis.dtx | 19 ++++++ locale/czech.dtx | 11 ++-- locale/english.dtx | 7 ++- locale/slovak.dtx | 1 + style/mu/Makefile | 4 +- style/mu/base.dtx | 36 ++++++++--- style/mu/econ.dtx | 139 ++++++++++++++++++++++++++++++++++++++++++ style/mu/econ.ins | 3 + style/mu/sci.dtx | 13 ++-- test/Makefile | 8 ++- test/econ-czech.tex | 9 +++ test/econ-english.tex | 9 +++ test/econ-slovak.tex | 9 +++ 13 files changed, 241 insertions(+), 27 deletions(-) create mode 100644 style/mu/econ.dtx create mode 100644 style/mu/econ.ins create mode 100644 test/econ-czech.tex create mode 100644 test/econ-english.tex create mode 100644 test/econ-slovak.tex diff --git a/fithesis.dtx b/fithesis.dtx index 98cd505..7bdb792 100644 --- a/fithesis.dtx +++ b/fithesis.dtx @@ -271,6 +271,19 @@ \def\thesis@stylepath{\thesis@subdir{#1}}} % \end{macrocode} % \end{macro} +% \begin{macro}{\thesis@declaration} +% \subsubsection{The \texttt{declaration} key} +% The \marg{\texttt{declaration}=text} pair sets the +% declaration \textit{text} to be included into the document. +% \cmd{/thesis@basepath} followed by \textit{path}. The +% \textit{text} is stored within the private |\thesis@declaration| +% macro, whose implicit value is |\thesis@@{declaration}|. +% \begin{macrocode} +\def\thesis@declaration{\thesis@@{declaration}} +\long\def\KV@thesis@declaration#1{% + \long\def\thesis@declaration{#1}} +% \end{macrocode} +% \end{macro} % \begin{macro}{\thesis@localepath} % \subsubsection{The \texttt{localepath} key} % The \marg{\texttt{localepath}=path} pair sets the \textit{path} @@ -866,6 +879,7 @@ % \item\texttt{abstract} % \item\texttt{abstractEn} % \item\texttt{thanks} +% \item\texttt{declaration} % \end{itemize} % \begin{macrocode} \long\def\thesislong#1#2{% @@ -1195,6 +1209,8 @@ % the field of study entry % \item|\thesis@|\textit{locale}|@advisorTitle| -- The title of % the advisor +% \item|\thesis@|\textit{locale}|@authorTitle| -- The title of +% the author % \item|\thesis@|\textit{locale}|@abstractTitle| -- The title of % the abstract section % \item|\thesis@|\textit{locale}|@keywordsTitle| -- The title of @@ -1273,3 +1289,6 @@ % \input{style/mu/fss.dtx} % \subsubsection{The style files of the Faculty of Law} % \input{style/mu/law.dtx} +% \subsubsection{The style files of the Faculty of Economics and +% Administration} +% \input{style/mu/econ.dtx} diff --git a/locale/czech.dtx b/locale/czech.dtx index 1bbe019..77f3dd1 100644 --- a/locale/czech.dtx +++ b/locale/czech.dtx @@ -38,6 +38,7 @@ % RĹŻznĂ© \def\thesis@czech@fieldTitle{Obor} \def\thesis@czech@advisorTitle{VedoucĂ práce} +\def\thesis@czech@authorTitle{Autor} \def\thesis@czech@abstractTitle{ShrnutĂ} \def\thesis@czech@keywordsTitle{KlĂÄŤová slova} \def\thesis@czech@thanksTitle{PodÄ›kovánĂ} @@ -293,14 +294,14 @@ % BibliografickĂ˝ záznam \def\thesis@czech@bib@title{BibliografickĂ˝ záznam} -\def\thesis@czech@bib@author{Autor} -\def\thesis@czech@bib@title{Název práce} +\let\thesis@czech@bib@author\thesis@czech@authorTitle +\def\thesis@czech@bib@thesisTitle{Název práce} \def\thesis@czech@bib@programme{StudijnĂ program} -\def\thesis@czech@bib@field{StudijnĂ obor} -\def\thesis@czech@bib@advisor{\thesis@czech@advisorTitle} +\let\thesis@czech@bib@field\thesis@czech@fieldTitle +\let\thesis@czech@bib@advisor\thesis@czech@advisorTitle \def\thesis@czech@bib@academicYear{AkademickĂ˝ rok} \def\thesis@czech@bib@pages{PoÄŤet stran} -\def\thesis@czech@bib@keywords{\thesis@czech@keywordsTitle} +\let\thesis@czech@bib@keywords\thesis@czech@keywordsTitle % \end{macrocode}\iffalse %</mu/sci> % \fi diff --git a/locale/english.dtx b/locale/english.dtx index 1a9f63c..72c487b 100644 --- a/locale/english.dtx +++ b/locale/english.dtx @@ -28,6 +28,7 @@ % Miscellaneous \def\thesis@english@fieldTitle{Field of study} \def\thesis@english@advisorTitle{Advisor} +\def\thesis@english@authorTitle{Author} \def\thesis@english@abstractTitle{Abstract} \def\thesis@english@keywordsTitle{Keywords} \def\thesis@english@thanksTitle{Acknowledgement} @@ -210,10 +211,10 @@ % Bibliographic entry \def\thesis@english@bib@title{Bibliographic entry} -\def\thesis@english@bib@author{Author} -\def\thesis@english@bib@title{Title of Thesis} +\let\thesis@english@bib@author\thesis@english@authorTitle +\def\thesis@english@bib@thesisTitle{Title of Thesis} \def\thesis@english@bib@programme{Degree Programme} -\def\thesis@english@bib@field{Field of Study} +\let\thesis@english@bib@field\thesis@english@fieldTitle \def\thesis@english@bib@advisor{Supervisor} \def\thesis@english@bib@academicYear{Academic Year} \def\thesis@english@bib@pages{Number of Pages} diff --git a/locale/slovak.dtx b/locale/slovak.dtx index e056a43..78dd388 100644 --- a/locale/slovak.dtx +++ b/locale/slovak.dtx @@ -36,6 +36,7 @@ % RĂ´zne \def\thesis@slovak@fieldTitle{Odbor} \def\thesis@slovak@advisorTitle{VedĂşci práce} +\def\thesis@slovak@authorTitle{Autor} \def\thesis@slovak@abstractTitle{Zhrnutie} \def\thesis@slovak@keywordsTitle{KľúčovĂ© slová} \def\thesis@slovak@thanksTitle{PoÄŹakovanie} diff --git a/style/mu/Makefile b/style/mu/Makefile index 3bae949..5c51d9e 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 -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 +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 .PHONY: explode implode all all: explode diff --git a/style/mu/base.dtx b/style/mu/base.dtx index 8c7a6e0..ac53c05 100644 --- a/style/mu/base.dtx +++ b/style/mu/base.dtx @@ -49,7 +49,7 @@ % \DescribeMacro{\thesis@blocks@cover}|\thesis@blocks@cover| % is or isn't going to expand to the thesis cover. % \end{itemize} -% The defaults are \texttt{12pt}, \texttt{oneside}, \texttt{final}, +% The defaults are \texttt{12pt}, \texttt{twoside}, \texttt{final}, % \texttt{monochrome}, \texttt{nolof}, \texttt{nolot} and % \texttt{nocover}. % \begin{macrocode} @@ -77,7 +77,7 @@ \DeclareOption{cover}{\thesis@covertrue} % Options executed by default -\ExecuteOptions{12pt,oneside,final,monochrome,lot,lof,nocover} +\ExecuteOptions{12pt,twoside,final,monochrome,lot,lof,nocover} \ProcessOptions % \end{macrocode} % The file loads the following packages: \begin{itemize} @@ -141,6 +141,23 @@ \newpage% \fi} % \end{macrocode} +% \end{macro}\begin{macro}{\thesis@blocks@leftPage} +% The |\thesis@blocks@leftPage| private macro clears the current +% page along with the next right-handed (odd-numbered) page, when +% double-sided typesetting is enabled. +% \begin{macrocode} +\def\thesis@blocks@clearRight{% + \ifthesis@twoside% + \clearpage% + \ifodd\value{page}% + \thispagestyle{empty}% + \hbox{}% + \newpage% + \fi% + \else% + \newpage% + \fi} +% \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@cover} % The |\thesis@blocks@cover| private macro typesets the thesis % cover. It is composed of three private macros: @@ -327,8 +344,7 @@ \thesis@blocks@clear% \tableofcontents% \thesis@blocks@lot% - \thesis@blocks@lof% - \thesis@blocks@clear} + \thesis@blocks@lof} % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@declaration} % The |\thesis@blocks@declaration| private macro typesets the @@ -338,7 +354,7 @@ \thesis@blocks@clear% \begin{alwayssingle}% \chapter*{\thesis@@{declarationTitle}}% - \thesis@@{declaration}% + \thesis@declaration% \vskip 2cm% \hfill\thesis@author% \end{alwayssingle} @@ -364,7 +380,11 @@ % \begin{macrocode} \def\thesis@blocks@abstract{% \begin{alwayssingle}% - \chapter*{\thesis@@{abstractTitle}}% + % Typeset the abstract on the right-hand side, if at all + % possible + \thesis@blocks@clearRight + {\def\cleardoublepage{} + \chapter*{\thesis@@{abstractTitle}}}% \thesis@abstract% \par\vfil\null% \end{alwayssingle}} @@ -393,7 +413,9 @@ % \begin{macrocode} \def\thesis@blocks@keywords{% \begin{alwayssingle}% - % Start the new chapter without clearing the right page + % Typeset the keywords on the right-hand side, if at all + % possible + \thesis@blocks@clearRight {\def\cleardoublepage{}% \chapter*{\thesis@@{keywordsTitle}}% \thesis@keywords}% diff --git a/style/mu/econ.dtx b/style/mu/econ.dtx new file mode 100644 index 0000000..4eead98 --- /dev/null +++ b/style/mu/econ.dtx @@ -0,0 +1,139 @@ +% \file{style/mu/fithesis3-econ.sty} +% This is the style file for the theses written at the Faculty of +% Economics and Administration 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{ht^^A +% tps://is.muni.cz/auth/do/econ/predpisy/smernice/prehled/4593^^A +% 1363/Smernice2014-9.pdf}}. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{fithesis3/style/mu/fithesis3-econ}[2015/04/26] +% \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 \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. +% \begin{macrocode} +\thesis@require{geometry} +\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{macrocode} +% \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 +% 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}}} +\def\thesis@blocks@titlePage@footer{% + {\thesis@titlePage@large\thesis@place, \thesis@year}} +% \end{macrocode} +% \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@mainMatter} +% The |\thesis@blocks@mainMatter| private macro sets up the style +% of the main matter of the thesis. The page numbering doesn't +% reset at the beginning of the main thesis as per the formal +% requirements. +% \begin{macrocode} +\def\thesis@blocks@mainMatter{% + \thesis@blocks@clear + \pagestyle{thesisheadings} + \parindent 1.5em\relax} +% \end{macrocode} +% \end{macro}\begin{macro}{\thesis@blocks@toc} +% The |\thesis@blocks@toc| private macro typesets the table of +% contents. +% \begin{macrocode} +\def\thesis@blocks@toc{% + \thesis@blocks@clear% + \tableofcontents} +% \end{macro}\begin{macro}{\thesis@blocks@tables} +% The |\thesis@blocks@tables| private macro optionally typesets the +% |\listoftables| and |\listoffigures|. +% \begin{macrocode} +\def\thesis@blocks@tables{% + \thesis@blocks@clear% + \thesis@blocks@lot% + \thesis@blocks@lof} +% \end{macrocode} +% \end{macro} +% The style file defines the autolayout preamble as the cover and +% the title page followed by the abstracts, keywords, declaration, +% acknowledgement and table of contents. 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% + \thesis@blocks@assignment% + \thesis@blocks@abstract% + \thesis@blocks@abstractEn% + \thesis@blocks@keywords% + \thesis@blocks@keywordsEn% + \thesis@blocks@declaration% + \thesis@blocks@thanks% + \thesis@blocks@toc% + \thesis@blocks@mainMatter} +% \end{macrocode} +% The style file defines the autolayout postamble as the list of +% tables and the list of figures. All blocks are defined in the +% \texttt{style/mu/base.sty} file, although some are redefined in +% this file. +% \begin{macrocode} +\def\thesis@postamble{% + \thesis@blocks@tables} +% \end{macrocode} diff --git a/style/mu/econ.ins b/style/mu/econ.ins new file mode 100644 index 0000000..8c62f1b --- /dev/null +++ b/style/mu/econ.ins @@ -0,0 +1,3 @@ +\input ../../docstrip.cfg +\generate{\file{fithesis3-econ.sty}{\from{econ.dtx}{}}} +\endbatchfile diff --git a/style/mu/sci.dtx b/style/mu/sci.dtx index 88daaa1..018fda3 100644 --- a/style/mu/sci.dtx +++ b/style/mu/sci.dtx @@ -66,7 +66,7 @@ \let\@A\relax\newlength{\@A}\settowidth{\@A}{{% \bf\thesis@czech@bib@author:}} \let\@B\relax\newlength{\@B}\settowidth{\@B}{{% - \bf\thesis@czech@bib@title:}} + \bf\thesis@czech@bib@thesisTitle:}} \let\@C\relax\newlength{\@C}\settowidth{\@C}{{% \bf\thesis@czech@bib@programme:}} \let\@D\relax\newlength{\@D}\settowidth{\@D}{{% @@ -90,15 +90,15 @@ max(\@A,\@B,\@C,\@D,\@E,\@F,\@G,\@H)} \let\@right\relax\newlength{\@right}\setlength{\@right}{% \textwidth-\@left-\@skip} - % Typeset the table \renewcommand{\arraystretch}{2} \begin{tabular}{@{}p{\@left}@{\hskip\@skip}p{\@right}@{}} \textbf{\thesis@czech@bib@author:} & \vtop{% \hbox{\strut\thesis@author}% - \hbox{\strut\thesis@czech@facultyName, \thesis@czech@universityName}% + \hbox{\strut\thesis@czech@facultyName, + \thesis@czech@universityName}% \hbox{\strut\thesis@department}} \\ - \textbf{\thesis@czech@bib@title:} + \textbf{\thesis@czech@bib@thesisTitle:} & \thesis@title \\ \textbf{\thesis@czech@bib@programme:} & \thesis@programme \\ @@ -166,7 +166,7 @@ \let\@A\relax\newlength{\@A}\settowidth{\@A}{{% \bf\thesis@english@bib@author:}} \let\@B\relax\newlength{\@B}\settowidth{\@B}{{% - \bf\thesis@english@bib@title:}} + \bf\thesis@english@bib@thesisTitle:}} \let\@C\relax\newlength{\@C}\settowidth{\@C}{{% \bf\thesis@english@bib@programme:}} \let\@D\relax\newlength{\@D}\settowidth{\@D}{{% @@ -190,7 +190,6 @@ max(\@A,\@B,\@C,\@D,\@E,\@F,\@G,\@H)} \let\@right\relax\newlength{\@right}\setlength{\@right}{% \textwidth-\@left-\@skip} - % Typeset the table \renewcommand{\arraystretch}{2} \begin{tabular}{@{}p{\@left}@{\hskip\@skip}p{\@right}@{}} @@ -199,7 +198,7 @@ \hbox{\strut\thesis@english@facultyName, \thesis@english@universityName}% \hbox{\strut\thesis@departmentEn}} \\ - \textbf{\thesis@english@bib@title:} + \textbf{\thesis@english@bib@thesisTitle:} & \thesis@titleEn \\ \textbf{\thesis@english@bib@programme:} & \thesis@programmeEn \\ diff --git a/test/Makefile b/test/Makefile index 6e315fb..10d6007 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,9 +1,11 @@ -.PHONY: all -all: - rm -f current.tex +.PHONY: all clear +all: clear for file in *.tex; do \ ln -s "$$file" current.tex && \ pdflatex current && \ pdflatex current && \ rm current.*; \ done + +clear: + rm -f current.* diff --git a/test/econ-czech.tex b/test/econ-czech.tex new file mode 100644 index 0000000..b23559c --- /dev/null +++ b/test/econ-czech.tex @@ -0,0 +1,9 @@ +\documentclass[monochrome]{../fithesis3} +\usepackage[czech]{babel} +\thesissetup{ + basepath=.., + faculty=econ +} +\begin{document} + foo bar +\end{document} \ No newline at end of file diff --git a/test/econ-english.tex b/test/econ-english.tex new file mode 100644 index 0000000..527bb5f --- /dev/null +++ b/test/econ-english.tex @@ -0,0 +1,9 @@ +\documentclass[monochrome]{../fithesis3} +\usepackage[english]{babel} +\thesissetup{ + basepath=.., + faculty=econ +} +\begin{document} + foo bar +\end{document} \ No newline at end of file diff --git a/test/econ-slovak.tex b/test/econ-slovak.tex new file mode 100644 index 0000000..4dd4fa2 --- /dev/null +++ b/test/econ-slovak.tex @@ -0,0 +1,9 @@ +\documentclass[monochrome]{../fithesis3} +\usepackage[slovak]{babel} +\thesissetup{ + basepath=.., + faculty=econ +} +\begin{document} + foo bar +\end{document} \ No newline at end of file -- GitLab