diff --git a/fithesis.dtx b/fithesis.dtx index 527ef0042938aa68c029b0bf852b063a91ce96d0..fb1c22f82cecb950b7de98daf267e1cda76280ee 100644 --- a/fithesis.dtx +++ b/fithesis.dtx @@ -504,10 +504,11 @@ % The \marg{\texttt{style}=filename} pair sets the filename of the % style file to be used to \textit{filename}. The \textit{filename} % is stored within the private |\thesis@style| macro, whose -% implicit value is |\thesis@university/\thesis@faculty|. The style -% file is loaded from the |\thesis@stylepath\thesis@style| path. +% implicit value is |\thesis@university/fithesis3-\thesis@faculty|. +% The style file is loaded from the +% |\thesis@stylepath\thesis@style| path. % \begin{macrocode} -\def\thesis@style{\thesis@university/\thesis@faculty} +\def\thesis@style{\thesis@university/fithesis3-\thesis@faculty} \define@key{thesis}{style}{% \def\thesis@style{#1}} % \end{macrocode} @@ -907,9 +908,9 @@ % \end{macrocode} % With the placeholder strings loaded from the locale files, we % can now inject metadata into the resulting PDF file. To this -% end, the \textsf{hyperref} package is conditionally included. -% Consequently, the following values are assigned to the PDF -% headers:\begin{itemize} +% end, the \textsf{hyperref} package is conditionally included with +% the \texttt{unicode} option. Consequently, the following values +% are assigned to the PDF headers:\begin{itemize} % \item\texttt{Title} is set to either |\thesis@titleEn|, if % defined, or to |\thesis@title|. % \item\texttt{Author} is set to |\thesis@author|. @@ -921,39 +922,40 @@ \thesis@require{hyperref}% {\def\@titleEnPlaceholder{\thesis@placeholders@titleEn} \def\@keywordsEnPlaceholder{\thesis@placeholders@keywordsEn} - \hypersetup{% - pdftitle={\ifx\thesis@titleEn\@titleEnPlaceholder% - \thesis@title% - \else% - \thesis@titleEn% - \fi}, pdfauthor={\thesis@author},% - pdfkeywords={\ifx\thesis@keywordsEn\@keywordsEnPlaceholder% - \thesis@keywords% - \else% - \thesis@keywordsEn% - \fi}, pdfcreator={\thesis@version},% + \hypersetup{unicode, + pdftitle={\ifx\thesis@titleEn\@titleEnPlaceholder% + \thesis@title% + \else% + \thesis@titleEn% + \fi}, pdfauthor={\thesis@author},% + pdfkeywords={\ifx\thesis@keywordsEn\@keywordsEnPlaceholder% + \thesis@keywords% + \else% + \thesis@keywordsEn% + \fi}, pdfcreator={\thesis@version},% }}% % \end{macrocode} % Consequently, the style files are loaded with the class % options passed onto them. If inheritance is enabled for % style files, then each of the following files is % loaded in sequence, provided they exist:\begin{enumerate} -% \item|\thesis@stylepath base.sty| -% \item|\thesis@stylepath\thesis@university/base.sty| +% \item|\thesis@stylepath fithesis3-base.sty| +% \item|\thesis@stylepath\thesis@university/fithesis3-base.sty| % \item|\thesis@stylepath\thesis@style.sty| % \end{enumerate}If inheritance is disabled for style files, % then only the |\thesis@stylepath\thesis@|^^A -% \discretionary{}{}{}|style.sty| file is loaded. +% \discretionary{}{}{}|style.sty| file is loaded. The +% \texttt{fithesis3-} prefix serves to prevent package clashes +% with other similarly named package files within the \TeX\ +% directory structure. % \begin{macrocode} \ifthesis@style@inheritance - \thesis@exists{\thesis@stylepath base.sty}{% - \RequirePackageWithOptions{\thesis@stylepath base}}% - \thesis@exists{\thesis@stylepath\thesis@university/% - base.sty}{\RequirePackageWithOptions{\thesis@stylepath% - \thesis@university/base}}% + \thesis@requireWithOptions{\thesis@stylepath% + fithesis3-base} + \thesis@requireWithOptions{\thesis@stylepath% + \thesis@university/fithesis3-base} \fi - \thesis@exists{\thesis@stylepath\thesis@style.sty}{% - \RequirePackageWithOptions{\thesis@stylepath\thesis@style}}% + \thesis@requireWithOptions{\thesis@stylepath\thesis@style} % \end{macrocode} % If autolayout is enabled, the |\thesis@preamble| and % |\thesis@postamble| macros are scheduled for expansion at the @@ -1005,6 +1007,14 @@ \def\thesis@require#1{% \@ifpackageloaded{#1}{}{\RequirePackage{#1}}} % \end{macrocode} +% The \DescribeMacro{\thesis@requireWithOptions} +% |\thesis@requireWithOptions|\marg{package} expands to +% |\RequirePackageWithOptions|\marg{package}, if the specified +% \textit{package} exists. This serves to load style files. +% \begin{macrocode} +\def\thesis@requireWithOptions#1{\thesis@exists{#1.sty}{% + \RequirePackageWithOptions{#1}}} +% \end{macrocode} % The \DescribeMacro{\thesis@bibgen}|\thesis@bibgen| macro % generates the contents of a \BibTeX\ file containing a % bibliographical entry for the thesis. diff --git a/style/Makefile b/style/Makefile index 378e2d4eec58a230506fefffcb7d45258f192bdd..1122fc6c6ac341c1c1837d1cce1aef20c64bc4ea 100644 --- a/style/Makefile +++ b/style/Makefile @@ -1,5 +1,5 @@ LOGS=base.log -OUTPUT=base.sty +OUTPUT=fithesis3-base.sty .PHONY: explode implode all all: explode diff --git a/style/base.dtx b/style/base.dtx index bc8cf17bc9802ca688ef013007b83a3fa63a1601..61353e81a787284418192934d8bbc67dba0886a2 100644 --- a/style/base.dtx +++ b/style/base.dtx @@ -1,9 +1,9 @@ -% \file{style/base.sty} +% \file{style/fithesis3-base.sty} % If inheritance is enabled for style files, then this file is % always the first style file to be loaded, regardless of the % value of the |\thesis@style| macro. This style file is % currently a dummy file. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fithesis3/style/base}[2015/04/08] +\ProvidesPackage{fithesis3/style/fithesis3-base}[2015/04/08] % \end{macrocode} diff --git a/style/base.ins b/style/base.ins index 9e3d9da00a9e58962419db7e7fe8073665b4af9a..648866add5d904f69e51a3df5ec52182a62bd260 100644 --- a/style/base.ins +++ b/style/base.ins @@ -1,3 +1,3 @@ \input ../docstrip.cfg -\generate{\file{base.sty}{\from{base.dtx}{}}} +\generate{\file{fithesis3-base.sty}{\from{base.dtx}{}}} \endbatchfile diff --git a/style/mu/Makefile b/style/mu/Makefile index 8d12c08ce6e56d338945a50ac14c6d2a7d7ad80e..c034bfece162b6a6ded387282ddca0160e626699 100644 --- a/style/mu/Makefile +++ b/style/mu/Makefile @@ -1,5 +1,5 @@ LOGS=base.log fi.log sci.log -OUTPUT=base.sty fit1[012].clo fi.sty sci.sty +OUTPUT=fithesis3-base.sty fithesis3-1[012].clo fithesis3-fi.sty fithesis3-sci.sty .PHONY: explode implode all all: explode diff --git a/style/mu/base.dtx b/style/mu/base.dtx index dc39e512ae6e1c4ebe456f179d94a51ebae4e9e2..77acdda1d4f7833ec5403f13bf0ce935acac1214 100644 --- a/style/mu/base.dtx +++ b/style/mu/base.dtx @@ -1,6 +1,6 @@ % \iffalse %<*base> -% \fi\file{style/mu/base.sty} +% \fi\file{style/mu/fithesis3-base.sty} % This is the base style file for theses written at the Masaryk % University in Brno. % If inheritance is enabled for style files, then this file is @@ -8,7 +8,7 @@ % \texttt{style/base.tex}, regardless of the % value of the |\thesis@style| macro. % \begin{macrocode} -\ProvidesPackage{fithesis3/style/mu/base}[2015/04/12] +\ProvidesPackage{fithesis3/style/mu/fithesis3-base}[2015/04/12] \NeedsTeXFormat{LaTeX2e} % \end{macrocode} % The file recognizes the following options: \begin{itemize} @@ -45,7 +45,8 @@ % isn't going to be included in the % \DescribeMacro{\thesis@blocks@tables}|\thesis@blocks@tables| % block, respectively. -% \item\texttt{lof}, \texttt{nolof} -- The |\thesis@blocks@cover| +% \item\texttt{cover}, \texttt{nocover} -- The +% \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}, @@ -81,9 +82,10 @@ % \end{macrocode} % The file loads the following packages: \begin{itemize} % \item\textsf{fontenc} -- The font encoding is set to Cork. -% \item\textsf{mathpazo} -- Changes the default roman font family -% to Adobe Palatino with real smallcaps, and the virtual -% \texttt{mathpazo} fonts will be used for math. +% \item\textsf{mathpazo} -- The virtual \texttt{mathpazo} fonts +% will be used for math. +% \item\textsf{tgpagella} -- Changes the default roman font family +% to \TeX\ Gyre Pagella. % \item\textsf{cmap} -- Places an an explicit \texttt{ToUnicode} % map in the resulting PDF file, allowing for extraction of % the text of the document. @@ -98,7 +100,8 @@ % \begin{macrocode} \RequirePackage[resetfonts]{cmap} \RequirePackage[T1]{fontenc} -\RequirePackage[sc]{mathpazo} +\RequirePackage{mathpazo} +\RequirePackage{tgpagella} \thesis@require{graphicx} \thesis@require{pdfpages} \hypersetup{ @@ -160,7 +163,6 @@ \end{center} \end{alwayssingle} \ifthesis@twoside\@twosidetrue\fi % Re-enable twoside - \thesis@blocks@clear \fi} % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@tables} @@ -190,8 +192,7 @@ \par\vfill% \textbf{\thesis@advisorTitle:} \thesis@advisor% \par\vfil% - \end{alwayssingle} - \thesis@blocks@clear} + \end{alwayssingle}} % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@thanks} % The |\thesis@blocks@thanks| private macro typesets the @@ -206,7 +207,6 @@ \thesis@thanks% \par\vfill% \end{alwayssingle}% - \thesis@blocks@clear \fi} % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@abstract} @@ -214,13 +214,11 @@ % abstract. % \begin{macrocode} \def\thesis@blocks@abstract{% - \thesis@blocks@clear% \begin{alwayssingle}% \chapter*{\thesis@abstractTitle}% \thesis@abstract% \par\vfil\null% - \end{alwayssingle}% - \thesis@blocks@clear} + \end{alwayssingle}} % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@abstractEn} % The |\thesis@blocks@abstractEn| private macro typesets the @@ -229,13 +227,14 @@ % \begin{macrocode} \def\thesis@blocks@abstractEn{% \ifthesis@english\else% - \thesis@blocks@clear% + \newpage% \begin{alwayssingle}% + % Start the new chapter without clearing the right page + {\def\cleardoublepage{}% \chapter*{\thesis@abstractTitleEn}% - \thesis@abstractEn% + \thesis@abstractEn}% \par\vfil\null% \end{alwayssingle}% - \thesis@blocks@clear% \fi} % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@keywords} @@ -243,13 +242,11 @@ % keywords. % \begin{macrocode} \def\thesis@blocks@keywords{% - \thesis@blocks@clear% \begin{alwayssingle}% \chapter*{\thesis@keywordsTitle}% \thesis@keywords% \par\vfill% - \end{alwayssingle}% - \thesis@blocks@clear} + \end{alwayssingle}} % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@keywordsEn} % The |\thesis@blocks@keywordsEn| private macro typesets the @@ -258,13 +255,14 @@ % \begin{macrocode} \def\thesis@blocks@keywordsEn{% \ifthesis@english\else% - \thesis@blocks@clear% \begin{alwayssingle}% + \newpage + % Start the new chapter without clearing the right page + {\def\cleardoublepage{}% \chapter*{\thesis@keywordsTitleEn}% - \thesis@keywords% + \thesis@keywordsEn}% \par\vfill% \end{alwayssingle}% - \thesis@blocks@clear% \fi} % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@assignment} @@ -309,16 +307,16 @@ % The rest of the file comprises redefinitions of \LaTeX\ commands % and private \texttt{rapport3} class macros altering the layout of % the resulting document. Depending on the type size of 10, 11 or -% 12 points, either the \texttt{fit10.clo}, \texttt{fit11.clo} or -% \texttt{fit12.clo} file is loaded from the |\thesis@stylepath mu| -% directory, respectively. +% 12 points, either the \texttt{fithesis3-10.clo}, +% \texttt{fithesis3-11.clo} or \texttt{fithesis3-12.clo} file is +% loaded from the |\thesis@stylepath mu| directory, respectively. % \begin{macrocode} % Table of contents will contain sectioning commands up to % \subsubsection \setcounter{tocdepth}{4} -% Load the `fit1*.clo` size option -\input\thesis@stylepath mu/fit1\thesis@ptsize.clo\relax +% Load the `fithesis3-1*.clo` size option +\input\thesis@stylepath mu/fithesis3-1\thesis@ptsize.clo\relax \def\ps@thesisheadings{% \def\chaptermark##1{% diff --git a/style/mu/base.ins b/style/mu/base.ins index 7e5e39e71450fb2f752c286d313ddab5989e4a07..5e61b809d90fe32e0eee06a5fe41502082c414e9 100644 --- a/style/mu/base.ins +++ b/style/mu/base.ins @@ -1,6 +1,7 @@ \input ../../docstrip.cfg -\generate{\file{base.sty}{\from{base.dtx}{base}} - \file{fit10.clo}{\from{base.dtx}{opt,10pt}} - \file{fit11.clo}{\from{base.dtx}{opt,11pt}} - \file{fit12.clo}{\from{base.dtx}{opt,12pt}}} +% Přejmenovat výstupy na `thesis@...` +\generate{\file{fithesis3-base.sty}{\from{base.dtx}{base}} + \file{fithesis3-10.clo}{\from{base.dtx}{opt,10pt}} + \file{fithesis3-11.clo}{\from{base.dtx}{opt,11pt}} + \file{fithesis3-12.clo}{\from{base.dtx}{opt,12pt}}} \endbatchfile diff --git a/style/mu/fi.dtx b/style/mu/fi.dtx index d602b5e5ff1383e6d8e42fa6d1f2336bc6cc566c..2ae589e41ea64084a84f3f18385c9c14b2bc2bbe 100644 --- a/style/mu/fi.dtx +++ b/style/mu/fi.dtx @@ -1,4 +1,4 @@ -% \file{style/mu/fi.sty} +% \file{style/mu/fithesis3-fi.sty} % This is the style file for the theses written at the Faculty of % Informatics at the Masaryk University in Brno. It has been % prepared in accordance with the formal requirements published at @@ -6,7 +6,7 @@ % \url{https://www.fi.muni.cz/docs/BP_DP_na_FI.pdf}}. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fithesis3/style/mu/fi}[2015/04/12] +\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 diff --git a/style/mu/fi.ins b/style/mu/fi.ins index 625989568da826ab8de6ef700cecc130ca4b1474..31890121ff30d5b1d559e8881cb93ce5525b3b29 100644 --- a/style/mu/fi.ins +++ b/style/mu/fi.ins @@ -1,3 +1,3 @@ \input ../../docstrip.cfg -\generate{\file{fi.sty}{\from{fi.dtx}{}}} +\generate{\file{fithesis3-fi.sty}{\from{fi.dtx}{}}} \endbatchfile diff --git a/style/mu/sci.dtx b/style/mu/sci.dtx index 5bdfd59517895242741839e597f6172199d9e213..aac67626c96f68bec01cfa8089f5687d02e71c18 100644 --- a/style/mu/sci.dtx +++ b/style/mu/sci.dtx @@ -1,4 +1,4 @@ -% \file{style/mu/sci.sty} +% \file{style/mu/fithesis3-sci.sty} % This is the style file for the theses written at the Faculty of % Science at the Masaryk University in Brno. It has been % prepared in accordance with the formal requirements published at @@ -6,7 +6,7 @@ % \url{http://www.sci.muni.cz/NW/predpisy/od/OD-2014-05.pdf}}. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fithesis3/style/mu/sci}[2015/04/12] +\ProvidesPackage{fithesis3/style/mu/fithesis3-sci}[2015/04/12] % \end{macrocode} % The file loads the following packages: % \begin{itemize} @@ -49,7 +49,6 @@ % \end{itemize} % \begin{macrocode} \def\thesis@blocks@bibEntry{% - \thesis@blocks@clear \begin{alwayssingle} \chapter*{\thesis@bibTitle} {% Calculate the width of the columns @@ -107,8 +106,7 @@ \textbf{\thesis@bib@keywords:} & \thesis@keywords \\ \end{tabular}} - \end{alwayssingle} - \thesis@blocks@clear} + \end{alwayssingle}} % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@bibEntryEn} % The |\thesis@blocks@bibEntryEn| private macro typesets a @@ -143,9 +141,10 @@ % \begin{macrocode} \def\thesis@blocks@bibEntryEn{% \ifthesis@english\else - \thesis@blocks@clear \begin{alwayssingle} - \chapter*{\thesis@bibTitleEn} + % Start the new chapter without clearing the right page + {\def\cleardoublepage{}% + \chapter*{\thesis@bibTitleEn}}% {% Calculate the width of the columns \let\@A\relax\newlength{\@A}\settowidth{\@A}{{% \bf\thesis@bib@authorEn:}} @@ -203,7 +202,6 @@ & \thesis@keywordsEn \\ \end{tabular}} \end{alwayssingle} - \thesis@blocks@clear \fi} % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@frontMatter} @@ -240,7 +238,6 @@ \end{center} \end{alwayssingle} \ifthesis@twoside\@twosidetrue\fi % Re-enable twoside - \thesis@blocks@clear \fi} % \end{macrocode} % \end{macro}\begin{macro}{\thesis@blocks@titlePage} @@ -287,8 +284,12 @@ \fi% \thesis@place\ \thesis@year} \end{alwayssingle} - \ifthesis@twoside\@twosidetrue\fi % Re-enable twoside - \thesis@blocks@clear} + \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}% diff --git a/style/mu/sci.ins b/style/mu/sci.ins index 65f5c983fb95ac38e5a06cb5b95285d492bdb860..a15a9f00f3eebe17cb94275d73cae0ba221e6b23 100644 --- a/style/mu/sci.ins +++ b/style/mu/sci.ins @@ -1,3 +1,3 @@ \input ../../docstrip.cfg -\generate{\file{sci.sty}{\from{sci.dtx}{}}} +\generate{\file{fithesis3-sci.sty}{\from{sci.dtx}{}}} \endbatchfile