diff --git a/config b/config index 52562f0..41a9016 100755 --- a/config +++ b/config @@ -1,7 +1,25 @@ #!/bin/bash +# Main LaTeX file (without .tex extension) e.g. '2022_My_Course') mainfile='' + +# Name of course. THis will be the title of the document course='' + +# Lecturer, also shown in title +lecturer='' + +# Name of the stylefile where the header will be located (without .sty) extension stylefile='' + +# Name of GitLab instance you will host this repository at +gitlab='gitlab.com' + +# Namespace of repository. This will be either your username or the top level group of the repository. +namespace='' + +# Rest of the repostiory path. In case of user-repositories, this will just be the repository name. In case of a repository in a (sub)group, this will be the subgroups + the repository name (without the toplvl group) repo='' + +# term when the lecture is held (shown in README) term='' diff --git a/init.sh b/init.sh index 4547d2c..312aaf2 100755 --- a/init.sh +++ b/init.sh @@ -55,7 +55,11 @@ find -type f | xargs sed -i "s/\$mainfile/$(printf '%s\n' "$mainfile" | sed -e ' find -type f | xargs sed -i "s/\$course/$(printf '%s\n' "$course" | sed -e 's/[\/&]/\\&/g')/g" find -type f | xargs sed -i "s/\$stylefile/$(printf '%s\n' "$stylefile" | sed -e 's/[\/&]/\\&/g')/g" find -type f | xargs sed -i "s/\$repo/$(printf '%s\n' "$repo" | sed -e 's/[\/&]/\\&/g')/g" +find -type f | xargs sed -i "s/\$namespace/$(printf '%s\n' "$namespace" | sed -e 's/[\/&]/\\&/g')/g" find -type f | xargs sed -i "s/\$term/$(printf '%s\n' "$term" | sed -e 's/[\/&]/\\&/g')/g" +find -type f | xargs sed -i "s/\$lecturer/$(printf '%s\n' "$lecturer" | sed -e 's/[\/&]/\\&/g')/g" +find -type f | xargs sed -i "s/\$assistant/$(printf '%s\n' "$assistant" | sed -e 's/[\/&]/\\&/g')/g" +find -type f | xargs sed -i "s/\$author/$(printf '%s\n' "$author" | sed -e 's/[\/&]/\\&/g')/g" # init new repo git init diff --git a/template/README.md b/template/README.md index 349458c..f32f3a1 100644 --- a/template/README.md +++ b/template/README.md @@ -6,6 +6,6 @@ The [latest version][1] is availabe as a pdf download via GitLab runner. You can also have a look at the generated [log files][2] or visit the [gl pages][3] index directly. -[1]: $repo/$mainfile.pdf -[2]: $repo/$mainfile.log -[3]: $repo/ +[1]: https://$namespace.$gitlab/$repo/$mainfile.pdf +[2]: https://$namespace.$gitlab/$repo/$mainfile.log +[3]: https://$namespace.$gitlab/$repo/ diff --git a/template/bibliography/images.bib b/template/bibliography/images.bib new file mode 100644 index 0000000..e69de29 diff --git a/template/bibliography/references.bib b/template/bibliography/references.bib new file mode 100644 index 0000000..e69de29 diff --git a/template/mainfile.tex b/template/mainfile.tex index 2de11f0..c66a346 100644 --- a/template/mainfile.tex +++ b/template/mainfile.tex @@ -1,18 +1,37 @@ \documentclass[10pt,ngerman,a4paper, fancyfoot, git]{mkessler-script} \course{$course} -\lecturer{} -\author{} +\lecturer{$lecturer} +\assistant{$assistant} +\author{$author} -\usepackage{$stylefile} +\usepackage{stylefile} +\setuptodonotes{disable} \begin{document} \maketitle +\vfill +\doclicenseThis +Visit the +\href{https://$gitlab/$namespace/$repo}{GitLab page} +for the source code of this document. + +\cleardoublepage +\tableofcontents + +\cleardoublepage +\listoflecture + \cleardoublepage -\tableofcontents +% \start lectures +% end lectures + +\appendix + \cleardoublepage +\printbibliography \end{document} diff --git a/template/master.tex b/template/master.tex new file mode 100644 index 0000000..6b07a1f --- /dev/null +++ b/template/master.tex @@ -0,0 +1,23 @@ +\documentclass[10pt,ngerman,a4paper, fancyfoot, git]{mkessler-script} + +\course{$course} +\lecturer{$lecturer} +\assistant{$assistant} +\author{$author} + +\usepackage{stylefile} + +\begin{document} + +\maketitle + +\cleardoublepage +\tableofcontents + +\cleardoublepage + +% \start lectures +% end lectures + + +\end{document} diff --git a/template/stylefile.sty b/template/stylefile.sty index 8b8a33d..897bdf3 100644 --- a/template/stylefile.sty +++ b/template/stylefile.sty @@ -1 +1,45 @@ \ProvidesPackage{$stylefile}[2022/02/10 - Style file for notes of $course] + +%%% Custom packages from https://gitlab.com/latexci/packages/latex-packages +% see the corresponding documentation there for details + +% Basic math package including lots of utility definitions and operators +\usepackage{mkessler-math} + +% Fancy theorem environments +\usepackage[number in = section]{fanycthm} + +% Set up of different types of todonotes +\usepackage{mkessler-todo} + +% Set up hyperref and useful colors +\usepackage{mkessler-hypersetup} + +% \vocab command to highlight + index definitions +\usepackage[index]{mkessler-vocab} + +% \lecture command for margin notes indicating the current lecture +% as well as summary of lectures in table of content +\usepackage[fancyhead]{mkessler-lectures} + +% Inclusion of inkscape figures in Gilles Castel style +\usepackage{mkessler-incfig} + +% Dumping of theorem counters to aux file, to be parsed and compile parts of the document +\usepackage{mkessler-counters} + +% Custom enumeration options in {enumerate} environment +\usepackage{mkessler-enumerate} + + +%%% General useful packages +\usepackage{csquotes} +\usepackage{import} + +\usepackage[bibfile=bibliography/references.bib]{mkessler-bibliography} + +\usepackage[ + type={CC}, + modifier={by-sa}, + version={4.0}, +]{doclicense}