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

Documenting the first batch of macros.

parent 73641dec
No related branches found
No related tags found
No related merge requests found
example.* example.*
*.swp
Makefile 0 → 100644
.PHONY: all clean clean-all install
CLASSFILES=fithesis.cls fithesis[23].cls
STYLEFILES=style/*.sty style/*/*.sty style/*/*.clo
AUXFILES=example.aux example.log example.out example.toc example.lot example.lof example.bib fithesis.aux fithesis.log fithesis.toc fithesis.ind fithesis.idx fithesis.out fithesis.ilg fithesis.gls fithesis.glo
PDFFILES=fithesis.pdf example.pdf
LOGOFILES=logo/*/*.eps logo/*/color/*.eps logo/*/*.pdf logo/*/color/*.pdf
SOURCEFILE=fithesis.dtx
OTHERFILES=csquot.sty example.tex fithesis.ins Makefile
INSTALLFILES=$(CLASSFILES) $(STYLEFILES) $(LOGOFILES) $(PDFFILES) $(SOURCEFILE) $(OTHERFILES)
TEXLIVEFILES=$(CLASSFILES) $(STYLEFILES) $(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 logo/mu; make all
cd logo/mu/color; make all
# This target creates the class files.
fithesis3.cls: fithesis.ins fithesis.dtx
yes | tex $< # TODO: Remove the `yes`
# 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)/tex/latex/fithesis3"
cp --parents --verbose $(TEXLIVEFILES) "$(to)/texmf-local/tex/latex/fithesis2"
mkdir --parents "$(to)/doc/latex/fithesis3"
cp fithesis.pdf "$(to)/doc/latex/fithesis3/manual.pdf"
texhash
# This pseudo-target removes any existing auxiliary files.
clean:
rm -f $(AUXFILES)
# This pseudo-target removes any makeable files.
clean-all: clean
rm -f $(PDFFILES) $(CLASSFILES)
No preview for this file type
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
\usepackage[slovak]{babel} \usepackage[slovak]{babel}
\begin{document} \begin{document}
Ahoj světe! Ahoj všetci!
\end{document} \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 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>%
}\LoadClass{fithesis3}
\endinput
%%
%% End of file `fithesis.cls'.
This diff is collapsed.
%%
%% 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}}
\Msg{***********************************************************}
\Msg{*}
\Msg{* To finish the installation, use either the}
\Msg{* `install` or `install-texive` make targets.}
\Msg{*}
\Msg{* Happy TeXing}
\Msg{***********************************************************}
\endinput
File added
%%
%% 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 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>%
}\LoadClass{fithesis3}
\endinput
%%
%% End of file `fithesis2.cls'.
%%
%% This is file `fithesis3.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% fithesis.dtx (with options: `class')
%%
%%
%% 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} \NeedsTeXFormat{LaTeX2e}
\def\thesis@version{2015/03/21 fithesis3 version 0.3.09 MU thesis class} \def\thesis@version{2015/03/21 fithesis3 version 0.3.09 MU thesis class}
\ProvidesClass{fithesis3}[\thesis@version] \ProvidesClass{fithesis3}[\thesis@version]
% The base class and packages
\LoadClass[a4paper]{rapport3} \LoadClass[a4paper]{rapport3}
\RequirePackage{xstring} \RequirePackage{xstring}
\RequirePackage{keyval} \RequirePackage{keyval}
\RequirePackage{newfile} \RequirePackage{newfile}
\RequirePackage{etoolbox} \RequirePackage{etoolbox}
% Interface
\def\thesissetup#1{% \def\thesissetup#1{%
\setkeys{thesis}{#1}% \setkeys{thesis}{#1}%
\thesis@load} \thesis@load}
\def\thesis@basepath{} \def\thesis@basepath{}
\define@key{thesis}{basepath}{% \define@key{thesis}{basepath}{%
\ifx\@empty#1\@empty% \ifx\@empty#1\@empty%
...@@ -21,19 +72,10 @@ ...@@ -21,19 +72,10 @@
\else% \else%
\def\thesis@basepath{#1/}% \def\thesis@basepath{#1/}%
\fi} \fi}
\def\thesis@logopath{\thesis@basepath logo/\thesis@university/}
\def\thesis@logopath{\thesis@basepath logo/\thesis@university/}
\define@key{thesis}{logopath}{% \define@key{thesis}{logopath}{%
\def\thesis@logopath{\thesis@subdir{#1}}} \def\thesis@logopath{\thesis@subdir{#1}}}
\def\thesis@stylepath{\thesis@basepath style/}
\define@key{thesis}{stylepath}{%
\def\thesis@stylepath{\thesis@subdir{#1}}}
\def\thesis@localepath{\thesis@basepath locale/}
\define@key{thesis}{localepath}{%
\def\thesis@localepath{\thesis@subdir{#1}}}
\def\thesis@subdir#1{% \def\thesis@subdir#1{%
\ifx\@empty#1\@empty% \ifx\@empty#1\@empty%
\thesis@basepath% \thesis@basepath%
...@@ -46,7 +88,12 @@ ...@@ -46,7 +88,12 @@
\thesis@basepath#1/% \thesis@basepath#1/%
\fi% \fi%
\fi} \fi}
\def\thesis@stylepath{\thesis@basepath style/}
\define@key{thesis}{stylepath}{%
\def\thesis@stylepath{\thesis@subdir{#1}}}
\def\thesis@localepath{\thesis@basepath locale/}
\define@key{thesis}{localepath}{%
\def\thesis@localepath{\thesis@subdir{#1}}}
\newif\ifthesis@woman\thesis@womanfalse \newif\ifthesis@woman\thesis@womanfalse
\define@key{thesis}{gender}{% \define@key{thesis}{gender}{%
\def\thesis@male{m}% \def\thesis@male{m}%
...@@ -56,11 +103,9 @@ ...@@ -56,11 +103,9 @@
\else% \else%
\thesis@womantrue% \thesis@womantrue%
\fi} \fi}
\def\thesis@author{\thesis@authorPlaceholder} \def\thesis@author{\thesis@authorPlaceholder}
\define@key{thesis}{author}{% \define@key{thesis}{author}{%
\def\thesis@author{#1}} \def\thesis@author{#1}}
\def\thesis@bachelors{bc} \def\thesis@bachelors{bc}
\def\thesis@masters{mgr} \def\thesis@masters{mgr}
\def\thesis@doctoral{d} \def\thesis@doctoral{d}
...@@ -68,11 +113,9 @@ ...@@ -68,11 +113,9 @@
\let\thesis@type\thesis@bachelors \let\thesis@type\thesis@bachelors
\define@key{thesis}{type}{% \define@key{thesis}{type}{%
\def\thesis@type{#1}} \def\thesis@type{#1}}
\def\thesis@university{mu} \def\thesis@university{mu}
\define@key{thesis}{university}{% \define@key{thesis}{university}{%
\def\thesis@university{#1}} \def\thesis@university{#1}}
\def\thesis@faculty{fi} \def\thesis@faculty{fi}
\define@key{thesis}{faculty}{% \define@key{thesis}{faculty}{%
\def\thesis@faculty{#1}} \def\thesis@faculty{#1}}
...@@ -84,7 +127,7 @@ ...@@ -84,7 +127,7 @@
\def\thesis@programme{\thesis@programmePlaceholder} \def\thesis@programme{\thesis@programmePlaceholder}
\define@key{thesis}{programme}{% \define@key{thesis}{programme}{%
\def\thesis@Programme{#1}} \def\thesis@Programme{#1}}
\def\thesis@logo{\thesis@faculty} \def\thesis@logo{\thesis@faculty}
\define@key{thesis}{logo}{% \define@key{thesis}{logo}{%
\def\thesis@logo{#1}} \def\thesis@logo{#1}}
...@@ -173,12 +216,10 @@ ...@@ -173,12 +216,10 @@
\def\thesis@documentStart{} \def\thesis@documentStart{}
\def\thesis@documentEnd{} \def\thesis@documentEnd{}
% Utility functions
\def\thesis@lower#1{% \def\thesis@lower#1{%
\edef\thesis@expanded{\csname thesis@#1\endcsname}% \edef\thesis@expanded{\csname thesis@#1\endcsname}%
\expandafter\lowercase\expandafter{\thesis@expanded}} \expandafter\lowercase\expandafter{\thesis@expanded}}
% The loading routine
\def\thesis@exists#1#2{% \def\thesis@exists#1#2{%
\IfFileExists{#1}{#2}{% \IfFileExists{#1}{#2}{%
\typeout{File #1 doesn't exist.}}} \typeout{File #1 doesn't exist.}}}
...@@ -186,7 +227,6 @@ ...@@ -186,7 +227,6 @@
\def\thesis@input#1{% \def\thesis@input#1{%
\thesis@exists{#1}{\input{#1}}} \thesis@exists{#1}{\input{#1}}}
% The BibTeX file generator
%% Temporarily swap the meaning of {} and <> %% Temporarily swap the meaning of {} and <>
{\catcode`\<=1 {\catcode`\<=1
\catcode`\>=2 \catcode`\>=2
...@@ -252,7 +292,7 @@ ...@@ -252,7 +292,7 @@
\thesis@input{\thesis@localepath\thesis@locale}% \thesis@input{\thesis@localepath\thesis@locale}%
\ifthesis@locale@inheritance \ifthesis@locale@inheritance
\thesis@input{\thesis@localepath\thesis@university/% \thesis@input{\thesis@localepath\thesis@university/%
\thesis@locale}% \thesis@locale}%
\thesis@input{\thesis@localepath\thesis@university/% \thesis@input{\thesis@localepath\thesis@university/%
\thesis@faculty/\thesis@locale}% \thesis@faculty/\thesis@locale}%
\fi \fi
...@@ -297,3 +337,7 @@ ...@@ -297,3 +337,7 @@
\fi% \fi%
\makeatother% \makeatother%
\fi} \fi}
\endinput
%%
%% End of file `fithesis3.cls'.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment