Skip to content
Snippets Groups Projects
Commit 604b7f6a authored by witiko's avatar witiko
Browse files

Exploding the whole class into a structure containing locale files,

style files and a minimal class file serving as a glue. Not yet
functional for any faculty but fi. Not yet documented.
parent 09ca65fa
No related branches found
No related tags found
No related merge requests found
.svn
*.swp
*.vim
fithesis.dtx
*.aux
*.log
*.out
*.idx
*.toc
test.sh
example.*
.PHONY: all clean clean-all install
CLASSFILES=fit1[012].clo fithesis.cls fithesis[23].cls
AUXFILES=example.aux example.log example.out example.toc example.lot example.lof fithesis.aux fithesis.log fithesis.toc fithesis.ind fithesis.idx fithesis.out fithesis.ilg fithesis.gls fithesis.glo
PDFFILES=fithesis.pdf example.pdf
LOGOFILES=loga/phil-logo.eps loga/med-logo.pdf loga/fi-logo.pdf loga/ped-logo.pdf loga/med-logo.eps loga/sci-logo.eps loga/fsps-logo.pdf loga/fss-logo.pdf loga/color/phil-logo.eps loga/color/examples.pdf loga/color/med-logo.pdf loga/color/fi-logo.pdf loga/color/ped-logo.pdf loga/color/med-logo.eps loga/color/sci-logo.eps loga/color/fsps-logo.pdf loga/color/fss-logo.pdf loga/color/fsps-logo.eps loga/color/law-logo.eps loga/color/ped-logo.eps loga/color/sci-logo.pdf loga/color/law-logo.pdf loga/color/fi-logo.eps loga/color/fss-logo.eps loga/color/econ-logo.eps loga/color/econ-logo.pdf loga/color/phil-logo.pdf loga/fsps-logo.eps loga/law-logo.eps loga/ped-logo.eps loga/sci-logo.pdf loga/law-logo.pdf loga/fi-logo.eps loga/fss-logo.eps loga/econ-logo.eps loga/econ-logo.pdf loga/phil-logo.pdf
SOURCEFILE=fithesis.dtx
OTHERFILES=csquot.sty example.tex fithesis.ins Makefile
INSTALLFILES=$(CLASSFILES) $(LOGOFILES) $(PDFFILES) $(SOURCEFILE) $(OTHERFILES)
TEXLIVEFILES=$(CLASSFILES) $(LOGOFILES)
# This pseudo-target creates the class files, typesets both
# the example file and the technical documentation and
# removes any auxiliary files.
all: fithesis3.cls $(PDFFILES) clean
@if ! kpsewhich scrreprt.cls > /dev/null; then echo "The scrreprt document class isn't installed."; exit 1; fi
@if ! kpsewhich tex-gyre/qplr.pfb > /dev/null; then echo "The TeX Gyre Pagella font isn't installed."; exit 1; fi
cd loga && make all
# This target preprocesses the `fithesis.raw.dtx` file into
# the `fithesis.dtx` source file.
$(SOURCEFILE): fithesis.raw.dtx
./fithesis.raw.sh $< $@
# This target creates the class files.
fithesis3.cls: fithesis.ins fithesis.dtx
yes | tex $<
# This target typesets the technical documentation.
fithesis.pdf: fithesis.dtx
pdflatex $<
makeindex -s gind.ist fithesis
makeindex -s gglo.ist -o fithesis.gls fithesis.glo
pdflatex $<
# This target typesets the example.
example.pdf: example.tex fithesis3.cls
pdflatex $<
pdflatex $<
# This pseudo-target installs any non-auxiliary files
# into the directory provided within the "to" argument.
install:
@if [ -z "$(to)" ]; then echo "Usage: make to=DIRECTORY install"; exit 1; fi
mkdir --parents "$(to)/fithesis3"
cp --parents --verbose $(INSTALLFILES) "$(to)/fithesis3"
# This pseudo-target installs the class files and
# the technical documentation into the folder structure
# of the TeXLive package, whose root directory is
# specified within the "to" argument.
install-texlive:
@if [ -z "$(to)" ]; then echo "Usage: make to=DIRECTORY install-texlive"; exit 1; fi
mkdir --parents "$(to)/texmf-local/tex/latex/fithesis3"
cp --parents --verbose $(TEXLIVEFILES) "$(to)/texmf-local/tex/latex/fithesis2"
mkdir --parents "$(to)/texmf-local/doc/latex/fithesis3"
cp fithesis.pdf "$(to)/texmf-local/doc/latex/fithesis3/manual.pdf"
texhash
# This pseudo-target removes any existing auxiliary files.
clean:
rm -f $(AUXFILES)
# This pseudo-target removes any non-makeable files.
clean-all: clean
rm -f $(PDFFILES) $(CLASSFILES) $(SOURCEFILE)
\chardef\cslq="12
\chardef\csrq="10
\catcode`\"=13
\def\csslq{\cslq\global\let"=\cssrq}
\def\cssrq{\csrq\global\let"=\csslq}
\let"=\csslq
%\foo
No preview for this file type
\documentclass[12pt,oneside]{fithesis3}
\usepackage[english]{babel} % Multilingual support
\usepackage[utf8]{inputenc} % UTF-8 encoding
\usepackage[T1]{fontenc} % T1 font encoding
\usepackage[ % A sans serif font that blends
scaled=0.86 % well with Palatino
]{berasans}
\usepackage[ % A tt font if you do not like LM's tt
scaled=1.03
]{inconsolata}
\usepackage{blindtext} % Lorem ipsum generator
\usepackage[toc,page]{appendix} % Appendices
\thesislang{en} % The language of the thesis
\thesistitle{Sample thesis} % The title of the thesis
\thesissubtitle{Bachelor's thesis} % The type of the thesis
\thesisstudent{Jane Doe} % Your name
\thesisgender{female} % Your gender
\thesisfaculty{fi} % Your faculty
\thesisyear{spring \the\year} % The academic term of your thesis defense
\thesisadvisor{John Foo, Ph.D.} % Your advisor
\documentclass[color]{fithesis3}
\usepackage[utf8]{inputenc}
\usepackage[slovak]{babel}
\begin{document}
\FrontMatter % The front matter
\ThesisTitlePage % The title page
\begin{ThesisDeclaration} % The declaration
\DeclarationText
\AdvisorName
\end{ThesisDeclaration}
\begin{ThesisThanks} % The acknowledgements (optional)
I would like to thank my supervisor\,\dots
\end{ThesisThanks}
\begin{ThesisAbstract} % The abstract
The aim of the bachelor work is to provide\,\dots
\end{ThesisAbstract}
\begin{ThesisKeyWords} % The keywords
keyword1, keyword2\,\dots
\end{ThesisKeyWords}
\tableofcontents % The table of contents
\MainMatter % The main matter
\chapter{Introduction} % Chapters
\Blindtext
\chapter{Another chapter}
\blindtext
This chapter also contains a table \ref{table:example}.
\begin{table}
\centering
\begin{tabular}{ccc}
\textbf{Column 1} & \textbf{Column 2} & \textbf{Column 3} \\
\hline
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{tabular}
\caption{A table full of depth and meaning}
\label{table:example}
\end{table}
% Bibliography
\listoftables % The list of tables (optional)
\listoffigures % The list of figures (optional)
% Index (optional)
\begin{appendices} % Appendices
\chapter{First appendix}
\Blindtext
\chapter{Another appendix}
\Blindtext
\end{appendices}
\end{document}
Ahoj světe!
\end{document}
%%
%% This is file `fithesis.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% fithesis.dtx (with options: `oldclass1')
%%
%%
%% Copyright 1993 1994 1995 The LaTeX3 Project and any individual
%% authors listed elsewhere in this file.
%%
%% For further copyright information, and conditions for modification
%% and distribution, see the file legal.txt, and any other copyright
%% notices in this file.
%%
%% This file is part of the LaTeX2e system.
%% ----------------------------------------
%% This system is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%%
%% IMPORTANT COPYRIGHT NOTICE:
%%
%% You are NOT ALLOWED to distribute this file alone.
%%
%% If you receive only some of these files from someone, complain!
%%
%% However, NO PERMISSION is granted to generate or to distribute a
%% modified version of this file under its original name.
%%
%% You are NOT ALLOWED to change this file.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{oldfithesis1}[2015/03/04 old fithesis will load fithesis3 version 0.3.08 MU thesis class]
\errmessage{%
You are using the fithesis class, which has been deprecated.
The fithesis3 class will be used instead.
For more information, see <https://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml>%
}
\ifx\clsclass\undefined
\def\clsclass{fithesis3}
\fi
\LoadClass{\clsclass}
\endinput
%%
%% End of file `fithesis.cls'.
%%
%% This file will generate fast loadable files and documentation
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
%% Copyright 1993 1994 1995 The LaTeX3 Project and any individual
%% authors listed elsewhere in this file.
%%
%% This file is part of the LaTeX2e system.
%% ----------------------------------------
%% This system is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%%
%% IMPORTANT COPYRIGHT NOTICE:
%%
%% You are NOT ALLOWED to distribute this file alone.
%%
%% If you receive only some of these files from someone, complain!
%%
%%
%% No other permissions to distribute this file in any form are
%% granted and in particular NO PERMISSION to modify its contents.
%%
%% You are NOT ALLOWED to change this file.
%%
\def\batchfile{fithesis.ins}
\input docstrip.tex
\preamble
Copyright 1993 1994 1995 The LaTeX3 Project and any individual
authors listed elsewhere in this file.
For further copyright information, and conditions for modification
and distribution, see the file legal.txt, and any other copyright
notices in this file.
This file is part of the LaTeX2e system.
----------------------------------------
This system is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
IMPORTANT COPYRIGHT NOTICE:
You are NOT ALLOWED to distribute this file alone.
If you receive only some of these files from someone, complain!
However, NO PERMISSION is granted to generate or to distribute a
modified version of this file under its original name.
You are NOT ALLOWED to change this file.
MODIFICATION ADVICE:
If you want to customize this file, it is best to make a copy of
the source file(s) from which it was produced. Use a different
name for your copy(ies) and modify the copy(ies); this will ensure
that your modifications do not get overwritten when you install a
new release of the standard system. You should also ensure that
your modified source file does not generate any modified file with
the same name as a standard file.
You will also need to produce your own, suitably named, .ins file to
control the generation of files from your source file; this file
should contain your own preambles for the files it generates, not
those in the standard .ins files.
The names of the source files used are shown above.
\endpreamble
\def\batchfile{fithesis.dst} % ignored in distribution
\input docstrip.tex % ignored in distribution
\keepsilent
\Msg{*** Generating the files ***}
\generateFile{fithesis.cls}{t}{\from{fithesis.dtx}{oldclass1}}
\generateFile{fithesis2.cls}{t}{\from{fithesis.dtx}{oldclass2}}
\generateFile{fithesis3.cls}{t}{\from{fithesis.dtx}{class}}
\generateFile{fit10.clo}{t}{\from{fithesis.dtx}{opt,10pt}}
\generateFile{fit11.clo}{t}{\from{fithesis.dtx}{opt,11pt}}
\generateFile{fit12.clo}{t}{\from{fithesis.dtx}{opt,12pt}}
\Msg{***********************************************************}
\Msg{*}
\Msg{* To finish the installation you have to move the following}
\Msg{* files into a directory searched by TeX:}
\Msg{*}
\Msg{* \space\space fithesis.cls}
\Msg{* \space\space fithesis2.cls}
\Msg{* \space\space fithesis3.cls}
\Msg{* \space\space fit10.clo}
\Msg{* \space\space fit11.clo}
\Msg{* \space\space fit12.clo}
\Msg{*}
\Msg{* To produce the documentation run the files ending with}
\Msg{* `.dtx' through LaTeX.}
\Msg{*}
\Msg{* Happy TeXing}
\Msg{***********************************************************}
\endinput
File deleted
This diff is collapsed.
#!/bin/sh
# This script finds the latest occurance of a \changes command (sorted by
# the version number) in "$1" and parses the VERSION and DATE out of it:
#
# \changes{vVERSION}{YYYY/MM/DD} (important: must be on the same line)
#
# It then takes $1, replaces every occurance of %%%date%%% with YYYY/MM/DD,
# every occurance of %%%version%%% with VERSION and every occurance of
# %%%year%%% with YYYY and stores the result in $2.
REGEX='.*\(\\changes\s*{v\([^}]*\)}\s*{\([^}]*\)}\).*'
LINE="$(grep "$REGEX" "$1" | sed s/"$REGEX"/\\1/ | sort -Vr | head -n 1)"
VERS="$(printf '%s' "$LINE" | sed s/"$REGEX"/\\2/)"
DATE="$(printf '%s' "$LINE" | sed s/"$REGEX"/\\3/)"
YEAR="$(printf '%s' "$DATE" | head -c 4)"
echo "Generating file $2 for [$DATE fithesis3 version $VERS MU thesis class]"
< "$1" sed s#%%%date%%%#$DATE#g\;s/%%%year%%%/$YEAR/g\;s/%%%version%%%/$VERS/g > "$2"
%%
%% This is file `fithesis2.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% fithesis.dtx (with options: `oldclass2')
%%
%%
%% Copyright 1993 1994 1995 The LaTeX3 Project and any individual
%% authors listed elsewhere in this file.
%%
%% For further copyright information, and conditions for modification
%% and distribution, see the file legal.txt, and any other copyright
%% notices in this file.
%%
%% This file is part of the LaTeX2e system.
%% ----------------------------------------
%% This system is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%%
%% IMPORTANT COPYRIGHT NOTICE:
%%
%% You are NOT ALLOWED to distribute this file alone.
%%
%% If you receive only some of these files from someone, complain!
%%
%% However, NO PERMISSION is granted to generate or to distribute a
%% modified version of this file under its original name.
%%
%% You are NOT ALLOWED to change this file.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced. Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system. You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%%
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%%
%% The names of the source files used are shown above.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{oldfithesis2}[2015/03/04 old fithesis2 will load fithesis3 version 0.3.08 MU thesis class]
\errmessage{%
You are using the fithesis2 class, which has been deprecated.
The fithesis3 class will be used instead.
For more information, see <https://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml>%
}
\ifx\clsclass\undefined
\def\clsclass{fithesis3}
\fi
\LoadClass{\clsclass}
\endinput
%%
%% End of file `fithesis2.cls'.
This diff is collapsed.
% A symbolic link to the English locale
\input{\thesis@localepath english}
\def\thesis@abstractEnTitle{Abstract}
\def\thesis@keywordsEnTitle{Keywords}
\ No newline at end of file
% Pomocná makra
\def\thesis@gender@koncovka{%
\ifthesis@woman a\fi}
% Zástupné texty
\def\thesis@titlePlaceholder{Název práce}
\def\thesis@keywordsPlaceholder{klíčové slovo 1, klíčové slovo 2, ...}
\def\thesis@abstractPlaceholder{Text shrnutí}
\def\thesis@authorPlaceholder{Jméno autora}
\def\thesis@universityName{Název univerzity}
\def\thesis@facultyName{Název fakulty}
\def\thesis@advisorPlaceholder{Jméno vedoucího}
\def\thesis@departmentPlaceholder{Název katedry}
\def\thesis@programmePlaceholder{Název studijního programu}
\def\thesis@thanksPlaceholder{Text poděkování ...}
\def\thesis@declaration{Text prohlášení ...}
% Různé
\def\thesis@advisorTitle{Vedoucí práce}
\def\thesis@abstractTitle{Shrnutí}
\def\thesis@keywordsTitle{Klíčová slova}
\def\thesis@thanksTitle{Poděkování}
\def\thesis@declarationTitle{Prohlášení}
\def\thesis@typeName{%
\ifx\thesis@type\thesis@bachelors%
Bakalářská práce%
\else\ifx\thesis@type\thesis@masters%
Diplomová práce%
\else\ifx\thesis@type\thesis@doctoral%
Disertační práce%
\else\ifx\thesis@type\thesis@rigorous%
Rigorózní práce%
\else%
Neznámý typ práce%
\fi\fi\fi\fi}
% Placeholders
\def\thesis@titlePlaceholder{Thesis Title}
\def\thesis@keywordsPlaceholder{keyword1, keyword2, ...}
\def\thesis@abstractPlaceholder{Abstract text}
\def\thesis@authorPlaceholder{Author's name}
\def\thesis@universityName{University name}
\def\thesis@facultyName{Faculty name}
\def\thesis@advisorPlaceholder{Advisor's name}
\def\thesis@departmentPlaceholder{Department name}
\def\thesis@programmePlaceholder{Study programme name}
\def\thesis@thanksPlaceholder{Acknowledgement text ...}
\def\thesis@declaration{Declaration text ...}
% Miscellaneous
\def\thesis@advisorTitle{Advisor}
\def\thesis@abstractTitle{Abstract}
\def\thesis@keywordsTitle{Keywords}
\def\thesis@thanksTitle{Acknowledgement}
\def\thesis@declarationTitle{Declaration}
\def\thesis@typeName{%
\ifx\thesis@type\thesis@bachelors%
Bachelor's Thesis%
\else\ifx\thesis@type\thesis@masters%
Master's Thesis%
\else\ifx\thesis@type\thesis@doctoral%
Doctoral Thesis%
\else\ifx\thesis@type\thesis@rigorous%
Rigorous Thesis%
\else%
Unknown thesis type%
\fi\fi\fi\fi}
\def\thesis@universityName{Masarykova Univerzita}
% TODO: Opravit taby a nahradit \cs{} za \cs\
\def\thesis@declaration{%
Prohlašuji, že tato \thesis@lower{typeName} je mým původním
autorským dílem, které jsem vypracoval\thesis@gender@koncovka\
samostatně. Všechny zdroje, prameny a literaturu, které jsem
při vypracování používal\thesis@gender@koncovka\ nebo z~nich
čerpal\thesis@gender@koncovka, v~práci řádně cituji s~uvedením
úplného odkazu na příslušný zdroj.}
\def\thesis@facultyName{Ekonomicko-správní fakulta}
\def\thesis@facultyName{Faculty of Economics and Administration}
\def\thesis@facultyName{Ekonomicko-správna fakulta}
\def\thesis@universityName{Masaryk University}
\def\thesis@declaration{%
Hereby I declare that this paper is my original authorial work,
which I have worked out by my own. All sources, references and
literature used or excerpted during elaboration of this work are
properly cited and listed in complete reference to the due source.}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment