aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2024-10-15 16:08:16 +0200
committerRasmus Dahlberg <rasmus@rgdd.se>2024-10-15 16:08:16 +0200
commit385cc92bc91e1a6c3724085c060e76bf40c13ed3 (patch)
tree26d0a8f81f2caa472830fd40a51844bb202c1355 /template
Import PhD thesis
Diffstat (limited to 'template')
-rw-r--r--template/GNUmakefile45
-rwxr-xr-xtemplate/INSTALL99
-rwxr-xr-xtemplate/INSTALL-garamond65
-rw-r--r--template/LICENSE416
-rw-r--r--template/Makefile3
-rw-r--r--template/README34
-rw-r--r--template/README.local11
-rw-r--r--template/kauguide.pdfbin0 -> 265615 bytes
-rw-r--r--template/kauguide.tex346
-rw-r--r--template/kauprotocol.dtx395
-rw-r--r--template/kauthesis.dtx604
-rw-r--r--template/kauthesis.ins101
-rw-r--r--template/kautools.dtx949
-rw-r--r--template/manifest.txt40
14 files changed, 3108 insertions, 0 deletions
diff --git a/template/GNUmakefile b/template/GNUmakefile
new file mode 100644
index 0000000..1e6853b
--- /dev/null
+++ b/template/GNUmakefile
@@ -0,0 +1,45 @@
+
+
+SOURCE_FILES := $(wildcard *.dtx)
+DEST_FILES := $(shell grep '\\file' kauthesis.ins | sed 's/.*\\file{\([^}]*\)}.*/\1/')
+DOC_FILES := $(foreach f, $(SOURCE_FILES), $(basename $(f)).pdf) kauguide.pdf
+
+PACKAGE :=kau
+TEXMF :=$(shell kpsexpand -n latex '$$TEXMFHOME')
+LATEXDIR :=$(TEXMF)/tex/latex/$(PACKAGE)
+LATEXDOC :=$(TEXMF)/doc/latex/$(PACKAGE)
+EXTENSIONS := aux glo gls idx ilg ind log out toc
+
+all: $(DEST_FILES)
+doc: $(DOC_FILES)
+
+install: $(DEST_FILES)
+ install -d $(LATEXDIR)
+ install -m 0644 $(DEST_FILES) $(LATEXDIR)
+
+install_doc: $(DOC_FILES)
+ install -d $(LATEXDOC)
+ install -m 0644 $(DOC_FILES) $(LATEXDOC)
+
+clean:
+ rm -f $(DOC_FILES) $(DEST_FILES)
+
+$(DEST_FILES): kauthesis.ins $(SOURCE_FILES)
+ latex kauthesis.ins
+ rm -f kauthesis.log
+
+%.pdf: %.dtx
+ pdflatex $<
+ makeindex -s gglo.ist -o $(basename $<).gls $(basename $<).glo
+ makeindex -s gind.ist -o $(basename $<).ind $(basename $<).idx
+ pdflatex $<
+ $(foreach e, $(EXTENSIONS), rm -f $(basename $<).$(e))
+
+kauguide.pdf: kauguide.tex
+ pdflatex $<
+ makeindex -o $(basename $<).ind $(basename $<).idx
+ pdflatex $<
+ pdflatex $<
+ $(foreach e, $(EXTENSIONS), rm -f $(basename $<).$(e))
+
+
diff --git a/template/INSTALL b/template/INSTALL
new file mode 100755
index 0000000..472feba
--- /dev/null
+++ b/template/INSTALL
@@ -0,0 +1,99 @@
+#!/usr/bin/env bash
+
+# INSTALL
+#
+# 1. Run the file kau.ins through LaTeX.
+# 2. Run the files *.dtx through LaTeX.
+# 3. Create the index by calling for each DTX file
+# $ makeindex -s gind.ist -o <FILE>.ind <FILE>.idx
+# 4. Create the change history by calling for each DTX file
+# $ makeindex -s gglo.ist -o <FILE>.gls <FILE>.glo
+# 5. Run the files *.dtx through LaTeX again.
+# 6. Move the *.sty and *.pdf files to your local $TEXMF
+#
+# -OR-
+#
+# Run this INSTALL file through /bin/bash.
+#
+# -OR-
+#
+# Use the Makefile:
+#
+# To build the .sty and .cls files:
+# make
+#
+# To install those same files:
+# make install
+#
+# To build the PDF documentation:
+# make doc
+#
+# To install the docs:
+# make install_doc
+#
+# To do everything at once:
+# make install install_doc
+
+# For Linux, garamondx needs system-wide installation:
+# $ wget https://www.tug.org/fonts/getnonfreefonts/install-getnonfreefonts
+# $ texlua install-getnonfreefonts
+# $ getnonfreefonts –-sys -l (should list the fonts with ‘uninstalled’ status)
+# $ getnonfreefonts –-sys -a (install all fonts)
+# $ getnonfreefonts –-sys -l (should show changed status – installed)
+# $ mktexlsr
+# $ updmap-sys
+
+latex kauthesis.ins || exit 1
+rm -f kauthesis.log
+
+for FILE in *.dtx
+do
+ BASENAME=`basename $FILE .dtx`
+ pdflatex $FILE || exit 1
+ makeindex -s gglo.ist -o $BASENAME.gls $BASENAME.glo || exit 1
+ makeindex -s gind.ist -o $BASENAME.ind $BASENAME.idx || exit 1
+ pdflatex $FILE || exit 1
+ rm -f $BASENAME.aux \
+ $BASENAME.glo \
+ $BASENAME.gls \
+ $BASENAME.idx \
+ $BASENAME.ilg \
+ $BASENAME.ind \
+ $BASENAME.log || exit 1
+done
+
+for FILE in kauguide
+do
+ pdflatex $FILE.tex || exit 1
+ if [[ -f $FILE.idx ]]
+ then makeindex -o $FILE.ind $FILE.idx || exit 1
+ fi
+ pdflatex $FILE.tex || exit 1
+ pdflatex $FILE.tex || exit 1
+ rm -f $FILE.aux $FILE.ind $FILE.idx $FILE.ilg $FILE.log $FILE.out $FILE.toc
+done
+
+PACKAGE=kau
+TEXMF=`kpsexpand -n latex '$TEXMFHOME'`
+LATEXDIR=$TEXMF/tex/latex/$PACKAGE
+LATEXDOC=$TEXMF/doc/latex/$PACKAGE
+
+if [[ -e $LATEXDIR ]]
+then
+ echo Warning: Moving the class and style files to $LATEXDIR failed, since the directory already exists. Move the files to another location in your TEXMF path.
+ exit 1
+else
+ if [[ -e $LATEXDOC ]]
+ then
+ echo Warning: Moving the documentation to $LATEXDOC failed, since the directory already exists. Move the files to another location in your TEXMF path.
+ exit 1
+ fi
+fi
+
+mkdir -p $LATEXDIR || exit 1
+mkdir -p $LATEXDOC || exit 1
+
+mv *.sty *.cls $LATEXDIR || exit 1
+mv *.pdf $LATEXDOC || exit 1
+
+# vim: sw=2:sts=2:et:nu
diff --git a/template/INSTALL-garamond b/template/INSTALL-garamond
new file mode 100755
index 0000000..268619c
--- /dev/null
+++ b/template/INSTALL-garamond
@@ -0,0 +1,65 @@
+#!/usr/bin/env bash
+
+TEXMF=`kpsexpand -n latex '$TEXMFHOME'`
+CURRENT=$PWD
+
+GARAMONDX=YES
+URWGARAMOND=YES
+kpsewhich garamondx.sty || GARAMONDX=NO
+kpsewhich ugmm8a.pfb || URWGARAMOND=NO
+
+FETCH=`which wget`
+if [[ $? != 0 ]]
+then FETCH=`which fetch`
+ if [[ $? != 0 ]]
+ then FETCH="`which curl` -O -L"
+ if [[ $? != 0 ]]
+ then exit 1
+ fi
+ fi
+fi
+
+if [[ $GARAMONDX = "NO" ]]
+then
+ TMP=`mktemp -d`
+ cd $TMP || exit 1
+ $FETCH http://mirrors.ctan.org/fonts/garamondx.zip || exit 1
+ unzip garamondx.zip || exit 1
+ cd garamondx || exit 1
+ mkdir -p $TEXMF/fonts/afm/garamondx || exit 1
+ mv afm/* $TEXMF/fonts/afm/garamondx || exit 1
+ mkdir -p $TEXMF/doc/latex/garamondx || exit 1
+ mv doc/* $TEXMF/doc/latex/garamondx || exit 1
+ mkdir -p $TEXMF/fonts/enc/garamondx || exit 1
+ mv enc/* $TEXMF/fonts/enc/garamondx || exit 1
+ mkdir -p $TEXMF/fonts/map || exit 1
+ mv map/zgm.map $TEXMF/fonts/map/ || exit 1
+ mkdir -p $TEXMF/tex/latex/garamondx || exit 1
+ mv tex/* $TEXMF/tex/latex/garamondx || exit 1
+ mkdir -p $TEXMF/fonts/tfm/garamondx || exit 1
+ mv tfm/* $TEXMF/fonts/tfm/garamondx || exit 1
+ mkdir -p $TEXMF/fonts/type1/garamondx || exit 1
+ mv type1/* $TEXMF/fonts/type1/garamondx || exit 1
+ mkdir -p $TEXMF/fonts/vf/garamondx || exit 1
+ mv vf/* $TEXMF/fonts/vf/garamondx || exit 1
+ updmap --enable zgm.map || exit 1
+ cd $CURRENT || exit 1
+ rm -r $TMP || exit 1
+fi
+
+if [[ $URWGARAMOND = "NO" ]]
+then
+ TMP=`mktemp -d`
+ cd $TMP || exit 1
+ $FETCH http://mirrors.ctan.org/fonts/urw/garamond.zip || exit 1
+ unzip garamond.zip || exit 1
+ cd garamond || exit 1
+ mkdir -p $TEXMF/fonts/afm/urw-garamond || exit 1
+ mv *.afm $TEXMF/fonts/afm/urw-garamond || exit 1
+ mkdir -p $TEXMF/fonts/type1/urw-garamond || exit 1
+ mv *.pfb $TEXMF/fonts/type1/urw-garamond || exit 1
+ cd $CURRENT || exit 1
+ rm -r $TMP || exit 1
+fi
+
+# vim: sw=2:sts=2:et:nu
diff --git a/template/LICENSE b/template/LICENSE
new file mode 100644
index 0000000..2244313
--- /dev/null
+++ b/template/LICENSE
@@ -0,0 +1,416 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c 2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute. This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but
+it is written in such a way that you can use it even if your work is
+unrelated to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+ `Work'
+ Any work being distributed under this License.
+
+ `Derived Work'
+ Any work that under any applicable law is derived from the Work.
+
+ `Modification'
+ Any procedure that produces a Derived Work under any applicable
+ law -- for example, the production of a file containing an
+ original file associated with the Work or a significant portion of
+ such a file, either verbatim or with modifications and/or
+ translated into another language.
+
+ `Modify'
+ To apply any procedure that produces a Derived Work under any
+ applicable law.
+
+ `Distribution'
+ Making copies of the Work available from one person to another, in
+ whole or in part. Distribution includes (but is not limited to)
+ making any electronic components of the Work accessible by
+ file transfer protocols such as FTP or HTTP or by shared file
+ systems such as Sun's Network File System (NFS).
+
+ `Compiled Work'
+ A version of the Work that has been processed into a form where it
+ is directly usable on a computer system. This processing may
+ include using installation facilities provided by the Work,
+ transformations of the Work, copying of components of the Work, or
+ other activities. Note that modification of any installation
+ facilities provided by the Work constitutes modification of the Work.
+
+ `Current Maintainer'
+ A person or persons nominated as such within the Work. If there is
+ no such explicit nomination then it is the `Copyright Holder' under
+ any applicable law.
+
+ `Base Interpreter'
+ A program or process that is normally needed for running or
+ interpreting a part or the whole of the Work.
+
+ A Base Interpreter may depend on external components but these
+ are not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ `LaTeX-Format' or in the case of files belonging to the
+ `LaTeX-format' a program implementing the `TeX language'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1. Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope. In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2. You may distribute a complete, unmodified copy of the Work as you
+received it. Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3. You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4. If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work. You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work. Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5. If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6. If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition. Only
+the Current Maintainer is allowed to add such statements of exemption
+to a component of the Work.
+
+ a. If a component of this Derived Work can be a direct replacement
+ for a component of the Work when that component is used with the
+ Base Interpreter, then, wherever this component of the Work
+ identifies itself to the user when used interactively with that
+ Base Interpreter, the replacement component of this Derived Work
+ clearly and unambiguously identifies itself as a modified version
+ of this component to the user when used interactively with that
+ Base Interpreter.
+
+ b. Every component of the Derived Work contains prominent notices
+ detailing the nature of the changes to that component, or a
+ prominent reference to another file that is distributed as part
+ of the Derived Work and that contains a complete and accurate log
+ of the changes.
+
+ c. No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original version
+ of the Work, provide any support, including (but not limited to)
+ the reporting and handling of errors, to recipients of the
+ Derived Work unless those persons have stated explicitly that
+ they do provide such support for the Derived Work.
+
+ d. You distribute at least one of the following with the Derived Work:
+
+ 1. A complete, unmodified copy of the Work;
+ if your distribution of a modified component is made by
+ offering access to copy the modified component from a
+ designated place, then offering equivalent access to copy
+ the Work from the same or some similar place meets this
+ condition, even though third parties are not compelled to
+ copy the Work along with the modified component;
+
+ 2. Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+
+7. If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8. The conditions above are not intended to prohibit, and hence do not
+apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9. Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+
+10. a. A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause 6 above, in regard to the Work, though it does not have
+ to honor the rest of the conditions in this license.
+
+ b. If a Derived Work is distributed under a different license, that
+ Derived Work must provide sufficient documentation as part of
+ itself to allow each recipient of that Derived Work to honor the
+ restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12. Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work. Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for a
+particular purpose. The entire risk as to the quality and performance
+of the Work is with you. Should the Work prove defective, you assume
+the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of the
+Work, or any other party who may distribute and/or modify the Work as
+permitted above, be liable to you for damages, including any general,
+special, incidental or consequential damages arising out of any use of
+the Work or out of inability to use the Work (including, but not limited
+to, loss of data, data being rendered inaccurate, or losses sustained by
+anyone as a result of any failure of the Work to operate with any other
+programs), even if the Copyright Holder or said author or said other
+party has been advised of the possibility of such damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that it is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1. Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of
+ an Internet or similar search.
+
+ 2. If this search is successful, then enquire whether the Work
+ is still maintained.
+
+ a. If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ b. If the search is unsuccessful or no action to resume active
+ maintenance is taken by the Current Maintainer, then announce
+ within the pertinent community your intention to take over
+ maintenance. (If the Work is a LaTeX work, this could be
+ done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ b. If the Current Maintainer is not reachable and the Copyright
+ Holder agrees that maintenance of the Work be passed to you,
+ then this takes effect immediately upon announcement.
+
+ 4. If you make an `intention announcement' as described in 2b. above
+ and after three months your intention is challenged neither by
+ the Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as
+ to name you as the (new) Current Maintainer.
+
+ 5. If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of 3b) or 4), then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided
+ they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer. You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license. These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license. You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component. While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community. It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one. Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified. Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2005 M. Y. Name
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.3 or later is part of all distributions of LaTeX
+ % version 2005/12/01 or later.
+ %
+ % This work has the LPPL maintenance status `maintained'.
+ %
+ % The Current Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any `LaTeX-Format', and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change `maintained' above into `author-maintained'.
+However, we recommend that you use `maintained', as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+Several clauses of the LPPL specify means to provide reliability and
+stability for the user community. They therefore concern themselves
+with the case that a Derived Work is intended to be used as a
+(compatible or incompatible) replacement of the original Work. If
+this is not the case (e.g., if a few lines of code are reused for a
+completely different task), then clauses 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+ The LPPL requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a
+ way for the licensee to determine which files constitute the Work.
+ This could, for example, be achieved by explicitly listing all the
+ files of the Work near the copyright notice of each file or by
+ using a line such as:
+
+ % This work consists of all files listed in manifest.txt.
+
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work.
+
diff --git a/template/Makefile b/template/Makefile
new file mode 100644
index 0000000..b35d767
--- /dev/null
+++ b/template/Makefile
@@ -0,0 +1,3 @@
+default:
+ @echo "This requires GNU make, run gmake instead"
+ exit 70
diff --git a/template/README b/template/README
new file mode 100644
index 0000000..0f9e7ee
--- /dev/null
+++ b/template/README
@@ -0,0 +1,34 @@
+----------------------------------------------------------------------
+
+kauthesis bundle 2015/03/05 v1.17
+Copyright (c) 2011-2015 Stefan Berthold <stefan.berthold@kau.se>
+
+----------------------------------------------------------------------
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer and author of this work is Stefan Berthold.
+
+This work consists of all files listed in manifest.txt.
+
+----------------------------------------------------------------------
+
+kauthesis is a bundle of LaTeX classes and packages. It aims to
+provide a LaTeX template for writing collection theses and reports at
+Karlstad University. The report class can also be used to write
+monographs. kauthesis implements the layout guidelines of Karlstad
+University Studies.
+
+----------------------------------------------------------------------
+
+For installation instructions, see INSTALL.
+
+----------------------------------------------------------------------
diff --git a/template/README.local b/template/README.local
new file mode 100644
index 0000000..c838f39
--- /dev/null
+++ b/template/README.local
@@ -0,0 +1,11 @@
+The upstream version can be found on GitHub:
+
+ https://github.com/ZjMNZHgG5jMXw/kauthesis.git
+
++-----------------------------------------------+
+|** The project needs a new maintainer. **|
+|** Please adopt the project and let me know! **|
++-----------------------------------------------+
+
+--
+Stefan Berthold <stefan.berthold@kau.se>
diff --git a/template/kauguide.pdf b/template/kauguide.pdf
new file mode 100644
index 0000000..0f09917
--- /dev/null
+++ b/template/kauguide.pdf
Binary files differ
diff --git a/template/kauguide.tex b/template/kauguide.tex
new file mode 100644
index 0000000..4c8c0fb
--- /dev/null
+++ b/template/kauguide.tex
@@ -0,0 +1,346 @@
+%% kauguide.tex
+%% Copyright (c) 2011-2012 Stefan Berthold <stefan.berthold@kau.se>
+%
+% This file is part of the kauthesis bundle.
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `author-maintained'.
+%
+% The Current Maintainer and author of this work is Stefan Berthold.
+%
+% This work consists of all files listed in manifest.txt.
+\documentclass[a4paper]{ltxguide}
+
+\usepackage{varioref}
+\usepackage{makeidx}
+\usepackage{alltt}
+\usepackage{flafter}
+\IfFileExists{tocbibind.sty}{\usepackage{tocbibind}}{}
+\IfFileExists{hyperref.sty}{\usepackage[bookmarksopen]{hyperref}}{}
+
+\usepackage[UKenglish]{babel}
+
+\title{How to Typeset Your Collection Thesis\\with the \textsf{kaucollection} Class}
+\author{Stefan Berthold\\\texttt{<stefan.berthold@kau.se>}}
+\date{\today}
+
+% Define some macros to help automate indexing.
+\makeindex
+{\catcode`\|=0 \catcode`\\=12
+ |gdef|bslash{\}}
+\newcommand{\defmacro}[1]{% % Define a macro.
+ \texttt{\bslash#1}%
+ \index{#1@\texttt{\string\bslash{}#1}}%
+}
+\newcommand{\usemacro}[1]{% % Use a macro.
+ \texttt{\bslash#1}%
+ \index{#1@\texttt{\string\bslash{}#1}}%
+}
+\newcommand{\indexmacro}[1]{% % Index a macro (no display).
+ \index{#1@\texttt{\string\bslash{}#1}}%
+}
+{\catcode`\|=12 % Same as \indexmacro, but
+ \gdef\indexmacroBegin#1{% % for ranges of text
+ \index{#1@\texttt{\string\bslash{}#1}|(}%
+ }
+ \gdef\indexmacroEnd#1{%
+ \index{#1@\texttt{\string\bslash{}#1}|)}%
+ }
+}
+\newcommand{\defthing}[1]{% % Define a non-macro thing.
+ \texttt{#1}%
+ \index{#1@\texttt{#1}}%
+}
+\newcommand{\usething}[1]{% % Use a non-macro thing.
+ \texttt{#1}%
+ \index{#1@\texttt{#1}}%
+}
+\newcommand{\indexthing}[1]{% % Index a non-macro thing.
+ \index{#1@\texttt{#1}}%
+}
+{\catcode`\|=12 % Same as \indexthing, but
+ \gdef\indexthingBegin#1{% % for ranges of text
+ \index{#1@\texttt{#1}|(}%
+ }
+ \gdef\indexthingEnd#1{%
+ \index{#1@\texttt{#1}|)}%
+ }
+}
+
+\begin{document}
+%\sloppy
+\maketitle
+
+\begin{abstract}
+ The class \textsf{kaucollection} defines \LaTeX{} defaults and macros which I found useful when I wrote my licentiate thesis. In addition, this documentation may serve you as a guide for fixing the logical structure and the final polishing of your thesis.
+\end{abstract}
+
+\tableofcontents
+
+\section{Introduction}
+
+%\subsection{Logical Structure}
+
+Your thesis will consist of a front matter containing general information such as the abstract and the list of appended papers, and a main matter starting with the first part, `introductory summary', and followed by additional parts for each appended paper. The front matter starts on page~iii, since the first two pages are reserved for bibliometric information of the publisher. The main matter starts with the cover page of the introductory summary on page~1.
+
+The text in the front matter should not refer to literature or references. This is not so much a technical limitation, but rather bad style to skip explanations and refer the reader of an abstract to literature instead. The introductory summary and each appended paper should have its own literature list.
+
+You can freely choose which contents will appear in your front matter and which in the main matter, but your supervisor will most likely propose a structure like that:
+\begin{itemize}
+ \item front matter
+ \begin{itemize}
+ \item abstract
+ \item acknowledgements
+ \item list of appended papers (with comments on your participation)
+ \item list of other publications
+ \item table of contents
+ \end{itemize}
+ \item main matter / introductory summary
+ \begin{itemize}
+ \item introduction
+ \item background and related work
+ \item research questions
+ \item research methods
+ \item contributions
+ \item summary of appended papers
+ \item conclusions and future work
+ \item references
+ \end{itemize}
+ \item main matter / appended papers
+\end{itemize}
+Most parts of the front matter and the introductory summary can be rather short. The introductory summary does not need to exceed 20 pages.
+
+\section{Usage}
+
+Load the class \textsf{kaucollection} without optional arguments.
+\begin{quote}\begin{verbatim}\documentclass{kaucollection}\end{verbatim}\end{quote}
+
+The class defines a number of useful defaults, e.\,g., the logical page size, margins, etc. Several packages are loaded along with the class, however, these defaults and thus the packages which are loaded automatically are limited to a minimum. You are yourself responsible for loading packages, e.\,g., for using \LaTeX's hyphenation algorithms, typeseting page headings and math material, etc.
+
+\subsection{Preamble \& Meta Data}
+
+\begin{decl}
+ \defmacro{title}\arg{title}\\
+ \defmacro{author}\arg{author}\\
+ \defmacro{institute}\oarg{short}\arg{institute}\\
+ \defmacro{subject}\arg{subject}\\
+ \defmacro{place}\arg{place}\\
+ \defmacro{date}\arg{month year}
+\end{decl}
+Most meta data can be set like in the standard \LaTeX{} classes. It is used throughout the thesis, e.\,g., for typesetting the title and abstract page and the acknowledgements. The short version of the institute \m{short} is used on the optional title page while the long version is used on the abstract page. If there is no short version of the institute, the long version is used on both pages.
+\begin{quote}\begin{verbatim}\institute{Department of Computer Science, Karlstad University}\end{verbatim}\end{quote}
+
+The \m{subject} is just used on the optional title page. It should be \emph{licentiate thesis} or \emph{dissertation}, respectively.
+\begin{quote}\begin{verbatim}\subject{licentiate thesis}\end{verbatim}\end{quote}
+
+The \m{place} and date \m{month year} are used at the end of the acknowledgements page and should only contain the name of the city and month and year, respectively.
+\begin{quote}\begin{verbatim}\place{Karlstad}
+\date{April 2011}\end{verbatim}\end{quote}
+
+\subsection{Page Headings}
+
+\begin{decl}
+ \defmacro{thepaper}\\
+ \defmacro{thepapertitle}
+\end{decl}
+
+The macro \usemacro{thepaper} contains the number of the current typeset paper. In the introductory summary, it contains the string ``Introductory Summary''. It should appear on the right side of even pages.
+
+The macro \usemacro{thepapertitle} contains the title of the currently typeset paper. In the introductory summary, it contains the title of your thesis. It should appear on the left side of odd pages.
+
+In combination with \textsf{scrpage2}, you can use the macros (in the preamble) as follows:
+\begin{quote}\begin{verbatim}\usepackage{scrpage2}
+\rehead{\thepaper}
+\lohead{\thepapertitle}\end{verbatim}\end{quote}
+
+\subsection{Title Page \& Front Matter}
+
+\begin{decl}
+ \defmacro{maketitle}
+\end{decl}
+
+Use this macro only in combination with the \textsl{kautitle} package. Title, author, and institute are repeated when you use the |abstract| environment. It is therefore recommended to skip \usemacro{maketitle} entirely.
+
+\begin{decl}
+ \defmacro{frontmatter}
+\end{decl}
+
+This macro adjusts the page number so that it begins with ``iii''. Use this macro after the optional \usemacro{maketitle} and before adding the \usething{abstract} environment.
+
+\begin{decl}
+ \defthing{abstract}\\
+ \defmacro{keywords}
+\end{decl}
+
+Use |\begin{abstract}| and |\end{abstract}| to place your abstract in between them. Within the \usething{abstract} environment, the macro \usemacro{keywords} is defined and can be used to add keywords to the end of your abstract, for instance:
+\begin{quote}\begin{verbatim}\begin{abstract}
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+ \keywords latin, dummy, text.
+\end{abstract}\end{verbatim}\end{quote}
+
+\begin{decl}
+ \defthing{acknowledgements}
+\end{decl}
+
+Use |\begin{acknowledgements}| and |\end{acknowledgements}| to typeset your acknowledgements. At the end of the acknowledgements, some space is left and a line with place, time, and your name is added automatically:
+\begin{quote}\begin{verbatim}\begin{acknowledgements}
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+\end{acknowledgements}\end{verbatim}\end{quote}
+
+\begin{decl}
+ \defmacro{listofpapers}\oarg{options}
+\end{decl}
+
+Use \usemacro{listofpapers} to add the list of appended papers. The content will
+automatically be created when you append papers by means of the
+\usething{kaupaper} environment. The macro takes two optional arguments,
+|tocline| and |printparticipation| which both default to yes, but can be used
+prevent the macro from adding itself to the global table of contents, and to
+turn off the collected participation information from the defined papers, respectively.
+
+The list should be followed by a (self-written) list of other publications, for
+instance:
+
+\begin{quote}\begin{verbatim}\listofpapers
+\subsection*{Other Publications}
+\begin{itemize}
+ \item \textbf{<your name>}. <type of publication, date>.
+\end{itemize}\end{verbatim}\end{quote}
+
+\begin{decl}
+ \defmacro{tableofcontents}
+\end{decl}
+
+Use \usemacro{tableofcontents} to add the table of contents after the list of papers. The list of papers will appear in the table of contents. Other front matter sections, e.\,g., the abstract and acknowledgements, are not included.
+
+\subsection{Introductory Summary}
+
+\begin{decl}
+ \defmacro{mainmatter}\oarg{aux material}
+\end{decl}
+
+Use \usemacro{mainmatter} for resetting the page counter and creating the cover page for the introductory summary. The optional argument \m{aux material} can be used to add auxiliary material to the cover page, e.\,g., a quote (see \usemacro{vanityquote}).
+
+\begin{decl}
+ \defmacro{vanityquote}\arg{poem}\arg{reference}
+\end{decl}
+
+Use \usemacro{vanityquote} to place \m{poem} and \m{reference} in the lower right corner of the page. This macro makes most sense in the optional argument of \usemacro{mainmatter} and in the \usething{kaupaper} environment, for instance:
+\begin{quote}\begin{verbatim}\mainmatter[\vanityquote{%
+ Mit Worten l\"a\ss t sich trefflich streiten.}{%
+ Mephistopheles\\--- Faust. Der Trag\"odie erster Teil. (1808)\\
+ Johann Wolfgang von Goethe}%
+]%\end{verbatim}\end{quote}
+Paradoxically, you have to switch off the package \textsf{microtype} in order to let \usemacro{vanityquote} do its job and create accurate typographic results. Fortunately, \textsf{microtype} allows switching off its functionality within user-defined scopes. You should do that in \usemacro{vanityquote}.
+
+\begin{decl}
+ \defthing{researchquestions}\\
+ \defthing{contributions}
+\end{decl}
+
+Use |\begin{researchquestions}| and |\end{researchquestions}| to enumerate your research questions. Within the environment, the macro \usemacro{item}\oarg{question} is redefined so that \m{question} can be used to formulate the question, followed by a brief explanation after the argument, e.\,g.:
+\begin{quote}\begin{verbatim}\section{Research Questions}
+\begin{researchquestions}
+ \item[Why?] A good reason for ``why?'' being important.
+\end{researchquestions}\end{verbatim}\end{quote}
+
+The \usething{contributions} environment is quite similar to the \usething{researchquestions} environment.
+\begin{quote}\begin{verbatim}\section{Contributions}
+\begin{contributions}
+ \item[Brief description.] What makes this contribution novel?
+\end{contributions}\end{verbatim}\end{quote}
+
+\begin{decl}
+ \defmacro{listofsummaries}
+\end{decl}
+
+Use \usemacro{listofsummaries} to create a list of summaries of your appended papers. The content will automatically be created when you append papers by means of the \usething{kaupaper} environment. Note that \usemacro{listofsummaries} does not create a section headline, you have to do that yourself, e.\,g.:
+\begin{quote}\begin{verbatim}\section{Summary of Appended Papers}
+\listofsummaries\end{verbatim}\end{quote}
+
+\subsection{Append Papers}
+
+\begin{decl}
+ \defthing{kaupaper}\\
+ \defthing{abstract}
+\end{decl}
+
+Use |\begin{kaupaper}|\oarg{meta data} and |\end{kaupaper}| to add a paper to your collection thesis. The environment accepts an optional argument \m{meta data} which helps you typesetting the meta data of the paper such as author, title, etc. The data is later also used, e.\,g., for typesetting the list of appended papers.
+
+All values in \m{meta data} have to be strings and can be used in the form
+|[key1=value1, key2=value2]|. If the values contain any kind of special
+characters, enclose them in brackets (e.g., |author={My name}}|). The keys are
+summarised in the following list:
+
+\begin{description}
+ \item[author] The authors' names.
+ \item[title] The paper's title.
+ \item[reference] The reference string including type, place, and year.
+ \item[email] The authors' e-mail addresses.
+ \item[summary] Summary of the paper, used for |\listofsummaries|.
+ \item[limitations] Second paragraph in |\listofsummaries|.%TODO
+ \item[participation] Comments on your participation, used for |\listofsummaries|.
+ \item[label] The paper's label, just like in |\label|.
+ \item[vanity] Auxiliary material on the cover page. Use it, for instance, in combination with |\vanityquote|.
+\end{description}
+
+Use |\begin{abstract}| and |\end{abstract}| to typeset the abstract of the appended paper. This should be the first thing after |\begin{kaupaper}|, since the cover page and the title page of the paper are already typeset by then.
+
+\section{Customization}
+
+Some common layout tasks are intentionally not dealt with in the \textsf{kaucollection} class. It is up to you to decide which option suits your thesis best and to load additional packages appropriately.
+
+\subsection{Page Headings}
+
+The class \textsf{kaucollection} does not determine the way you typeset your page headings, including page numbers and running titles, so you have to create them yourself. Your options include the \textsf{fancyhdr} package or \textsf{scrpage2}, I prefer the latter. Common heading styles can be generated with either package, but keep in mind that less is often more when you play with fancy typeface switches and magnificent rulers under your headings.
+
+\subsection{Multiple Bibliographies}
+
+You will need independent bibliographies for your introductory summary and for each paper you append. Options for this task include the packages \textsf{chapterbib} and \textsf{datatool}. In both cases, a separate AUX file will be created for each bibliography that is needed. When using the package \textsf{chapterbib}, it is necessary to distribute your \LaTeX{} source code over several input files, accordingly. The package \textsf{datatool}, on the other hand, allows to keep all \LaTeX{} source code in one file.
+
+\subsection{Hyphenation}
+
+The package \textsf{babel} provides hyphenation patterns for many languages, use them! When part of your text is written in a different language than the rest, make sure that you switch the language accordingly, e.\,g., by using the macro |\foreignlanguage| of \textsf{babel}.
+
+\subsection{Hyperlinks}
+
+If you're using the \textsf{hyperref} package to get interactive links in the PDF
+version of your thesis, you will need to pass the option |hypertexnames=false|
+to the package. Otherwise, hyperlink targets will repeat between subsequent
+papers, causing links to break.
+
+\section{Polishing the Thesis}
+
+Use the modifications proposed in this section for improving the electronic and the printout appearance of your thesis.
+
+%\usepackage{cite} % TODO
+\subsection{Micro Typography}
+
+There is a lot of typographic advice which is hard to repeat here. Fortunately, the package \textsf{microtype} solves most of the faux pas that are to avoid. Use this package with care, in most cases it will improve the quality of your thesis, e.\,g., by reducing the number of overfull and underfull boxes. However, the compilation of your thesis will take considerably more time and, in some cases, the package might even create new error messages. Fortunately, you can ignore these errors quite often without consequences affecting the quality of the thesis. Use the package option |[activate=false]| when you just need a preview of your thesis.
+
+\subsection{Alpha Channel in the Acrobat Reader}
+
+If you plan an electronic publication, consider adding the line
+\begin{quote}\begin{verbatim}\pdfpageattr{/Group <</S /Transparency /I true /CS /DeviceRGB>>}\end{verbatim}\end{quote}
+to the preamble of your thesis. This will deal with a bug in the Adobe Acrobat Reader which affects the representation of the alpha channel (transparency layer), e.\,g., in font anti-aliasing. Neither the bug nor the fix affect the thesis' print out quality.
+
+\subsection{Crop Marks}
+
+The class adjusts the logical paper dimensions so that they correspond to the S5 book format of Karlstad University Studies. You can use the result for electronic publishing and preview printouts. However, the final printing process includes centering your logical S5 pages on a physical paper format which is slightly bigger, e.\,g., A4, and cut off the margins.
+
+Finding the correct crop frame for the cutting not always easy, since printing and cutting is not necessarily done in the same machine. A way to make sure that the final print corresponds to the electronic version in each detail is to enlarge the PDF pages to A4 and add crop marks as support for readjusting the machines.
+
+Use the package \textsf{pgfcropmarks} to change the paper format and add the crop marks.
+However, here is a word of warning about \textsf{pgfcropmarks}: \LaTeX{} will not write any files when this package is loaded. As a consequence, the table of contents will not be updated and neither are all the other lists and indexes updated. Thus, you should \emph{only} use this package when creating the \emph{camera-ready} version and comment it out otherwise!
+
+\printindex
+
+\end{document}
+% vim: ft=tex:sts=2:sw=2:et:nu:linebreak
diff --git a/template/kauprotocol.dtx b/template/kauprotocol.dtx
new file mode 100644
index 0000000..d5aa592
--- /dev/null
+++ b/template/kauprotocol.dtx
@@ -0,0 +1,395 @@
+% \iffalse meta-comment
+%% kauprotocol.dtx
+%% Copyright (c) 2011-2015 Stefan Berthold <stefan.berthold@kau.se>
+%
+% This file is part of the kauthesis bundle.
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer and author of this work is Stefan Berthold.
+%
+% This work consists of all files listed in manifest.txt.
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{\jobname.dtx}
+%</driver>
+%<head|note|meeting>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<head>\ProvidesPackage{kauhead}
+%<note>\ProvidesClass{kaunote}
+%<meeting>\ProvidesClass{kaumeeting}
+%<*head|note|meeting>
+ [2013/09/11 v1.11 Karlstad University protocol bundle]
+%</head|note|meeting>
+%
+%<*driver>
+\documentclass[a4paper]{ltxdoc}
+\usepackage{url}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{140}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{v1.0}{2012/12/14}{Initial public release}
+% \changes{v1.10}{2013/05/28}{Integration in the kauthesis bundle as protocol bundle with classes kaunote and kaumeeting}
+% \changes{v1.11}{2013/07/17}{Version bump without changes}
+%
+% \GetFileInfo{\jobname.dtx}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \StopEventually{\PrintChanges\PrintIndex}
+%
+% \title{The \textsf{\jobname} bundle\thanks{This document
+% corresponds to \textsf{\jobname}~\fileversion, dated \filedate.}}
+% \author{Stefan Berthold \\ \texttt{stefan.berthold@kau.se}}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% The \textsf{kauhead} package, the \textsf{kaunote} class, and the \textsf{kaumeeting} class are part of the kauthesis package. The classes provide macros for writing notes and meeting records. The latest version can be obtained from
+% \begin{quote}
+% \texttt{http://github.com/ZjMNZHgG5jMXw/kauthesis}\quad.
+% \end{quote}
+%
+% \noindent
+% This package and the classes require the {\small URW}~Garamond font. The latest version can be obtained from
+% \begin{quote}
+% \texttt{http://www.ctan.org/pkg/urw-garamond}\quad.
+% \end{quote}
+%
+% \noindent
+% This package and the classes also require the logo of Karlstad Univerity. The latest version can be obtained from
+% \begin{quote}
+% \texttt{http://www.kau.se/om-universitetet/pressinformation/ladda-hem\-logotyp}\quad.
+% \end{quote}
+%
+% \section{Usage}
+%
+% The following example can be found in \texttt{kaumeetingtemplate.tex}.
+%
+% \noindent
+% After loading the class, complete the meta data with |\metadata|\marg{data}.
+% \begin{macrocode}
+%<*meetingtemplate>
+\documentclass{kaumeeting}
+\metadata%
+% \end{macrocode}
+% The subject of the meeting, e.\,g., a course name.
+% \begin{macrocode}
+ { meeting={}
+% \end{macrocode}
+% The person who is writing the protocol.
+% \begin{macrocode}
+ , protocol={}
+% \end{macrocode}
+% The place of the meeting.
+% \begin{macrocode}
+ , place={}
+% \end{macrocode}
+% The calendar date of the meeting.
+% \begin{macrocode}
+ , date={}
+% \end{macrocode}
+% The time when the meeting began.
+% \begin{macrocode}
+ , start={}
+% \end{macrocode}
+% The time when the meeting was over.
+% \begin{macrocode}
+ , end={}
+% \end{macrocode}
+% The persons who attended the meeting.
+% \begin{macrocode}
+ , participants={}
+% \end{macrocode}
+% Persons excused from the meeting.
+% \begin{macrocode}
+ , excused=none
+% \end{macrocode}
+% Persons missing from the meeting without excuse.
+% \begin{macrocode}
+ , missing={}
+% \end{macrocode}
+% The distribution list of the meeting records.
+% \begin{macrocode}
+ , distribution={}
+% \end{macrocode}
+% The faculty and department names.
+% \begin{macrocode}
+ , faculty={Faculty of Health, Science and Technology}%
+ , department={Department of Mathematics and Computer Science}%
+% \end{macrocode}
+% The name (or location) of Karlstad University's logo.
+% \begin{macrocode}
+ , logofile={kau_2012_cmyk_eps_14679}
+ }
+% \end{macrocode}
+% The macro |\maketitle| creates the record header from the meta data.
+% \begin{macrocode}
+\begin{document}
+\maketitle
+% \end{macrocode}
+% After |\maketitle|, content can be added like in a \LaTeX{} \textsf{article}.
+% \begin{macrocode}
+\end{document}
+%</meetingtemplate>
+% \end{macrocode}
+%
+% \section{\textsf{kauhead} package}
+% \setcounter{CodelineNo}{0}
+%
+% \subsection{Package options and dependencies}
+%
+% Package options are neither parsed nor passed to the underlying \textsf{article} class.
+% \begin{macrocode}
+%<*head>
+\ProcessOptions\relax
+% \end{macrocode}
+%
+% \noindent Garamond is chosen as default font.
+% \begin{macrocode}
+\RequirePackage[urw-garamond]{mathdesign}
+% \end{macrocode}
+% \noindent A4 is set as the default page layout.
+% \begin{macrocode}
+\RequirePackage[paper=a4,pagesize]{typearea}
+% \end{macrocode}
+% \begin{macrocode}
+\RequirePackage{xkeyval}
+\RequirePackage{graphicx}
+\RequirePackage{tikz}
+\RequirePackage{ragged2e}
+% \end{macrocode}
+%
+% \subsection{Meta data}
+%
+% \begin{macro}{\headdata}
+% \begin{macrocode}
+\define@cmdkeys[kauhed]{general}[kauhed@]%
+ { title, date%
+ , faculty, department%
+ , logofile%
+ }
+\newcommand\headdata[1]{\setkeys[kauhed]{general}{#1}}
+\setkeys[kauhed]{general}%
+ { title=, date=\today%
+ , faculty={Faculty of Health, Science and Technology}%
+ , department={Department of Mathematics and Computer Science}%
+ , logofile={kau_2012_cmyk_eps_14679}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Title page}
+%
+% \begin{macro}{\kauhed@maketitle}
+% \textsf{kauhead} redefines the macro and preserves the original definition in |\kauhed@maketitle|.
+% \begin{macrocode}
+\let\kauhed@maketitle\maketitle
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\maketitle}
+% \begin{macrocode}
+\renewcommand\maketitle{
+ \thispagestyle{empty}
+ \begin{tikzpicture}[overlay,remember picture]
+ \path (current page.north)
+ node[below=5mm, text centered, text width=\textwidth] (top)
+ {\includegraphics[width=33mm]{\kauhed@logofile}\\[3mm]%
+ \kauhed@faculty\\%
+ \kauhed@department}
+ ;
+ \end{tikzpicture}
+ \vspace{1.5cm}\\
+ \mbox{}\hfill\kauhed@date\\
+ \centering\Large\scshape\kauhed@title\\
+ \justifying\normalfont\bigskip\normalsize
+}
+%</head>
+% \end{macrocode}
+% \end{macro}
+%
+% \section{\textsf{kaunote} class}
+% \setcounter{CodelineNo}{0}
+%
+% \subsection{Class options and dependencies}
+%
+% Class options are neither parsed nor passed to the underlying \textsf{article} class.
+% \begin{macrocode}
+%<*note>
+\ProcessOptions\relax
+% \end{macrocode}
+%
+% \noindent \textsf{kaunote} derives all macros from the standard \textsf{article} class.
+% \begin{macrocode}
+\LoadClass{article}
+% \end{macrocode}
+%
+% \noindent \textsf{kauhead} package is loaded.
+% \begin{macrocode}
+\RequirePackage{kauhead}
+% \end{macrocode}
+%
+% \subsection{Meta data}
+%
+% \begin{macro}{\metadata}
+% \begin{macrocode}
+\newcommand\metadata[1]{\setkeys[kauhed]{general}{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Title page}
+%
+% \begin{macro}{\kaunot@title}
+% \textsf{kaunote} redefines the macro |\title| and preserves the original definition in |\kaunot@title|.
+% \begin{macrocode}
+\let\kaunot@title\title
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\title}
+% \begin{macrocode}
+\renewcommand\title[1]{\setkeys[kauhed]{general}{title={#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\kaunot@maketitle}
+% \textsf{kaunote} redefines the macro |\maketitle| and preserves the original definition in |\kaunot@maketitle|.
+% \begin{macrocode}
+\let\kaunot@maketitle\maketitle
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\maketitle}
+% \begin{macrocode}
+\renewcommand\maketitle{%
+ \kaunot@maketitle\par\medskip\@afterindentfalse\@afterheading%
+}
+%</note>
+% \end{macrocode}
+% \end{macro}
+%
+% \section{\textsf{kaumeeting} class}
+% \setcounter{CodelineNo}{0}
+%
+% \subsection{Class options and dependencies}
+%
+% Class options are neither parsed nor passed to the underlying \textsf{article} class.
+% \begin{macrocode}
+%<*meeting>
+\ProcessOptions\relax
+% \end{macrocode}
+%
+% \noindent \textsf{kaumeeting} derives all macros from the standard \textsf{article} class.
+% \begin{macrocode}
+\LoadClass{article}
+% \end{macrocode}
+%
+% \noindent \textsf{kauhead} package is loaded.
+% \begin{macrocode}
+\RequirePackage{kauhead}
+% \end{macrocode}
+% \begin{macrocode}
+\RequirePackage{tabularx}
+% \end{macrocode}
+%
+% \subsection{Meta data}
+%
+% \begin{macro}{\metadata}
+% \begin{macrocode}
+\define@cmdkeys[kaumet]{general}[kaumet@]%
+ { meeting, protocol, place%
+ , start, end%
+ , participants, excused, missing%
+ , distribution%
+ }
+\define@cmdkey[kaumet]{general}[kaumet@]{date}%
+ {\setkeys[kauhed]{general}{date={#1}}}
+\define@cmdkey[kaumet]{general}[kaumet@]{faculty}%
+ {\setkeys[kauhed]{general}{faculty={#1}}}
+\define@cmdkey[kaumet]{general}[kaumet@]{department}%
+ {\setkeys[kauhed]{general}{department={#1}}}
+\define@cmdkey[kaumet]{general}[kaumet@]{logofile}%
+ {\setkeys[kauhed]{general}{logofile={#1}}}
+\newcommand\metadata[1]{\setkeys[kaumet]{general}{#1}}
+\setkeys[kauhed]{general}{title=Meeting record}%
+\setkeys[kaumet]{general}%
+ { meeting=, protocol=, place=%
+ , date=\today, start=, end=%
+ , participants=, excused=, missing=%
+ , distribution=%
+ , faculty={Faculty of Health, Science and Technology}%
+ , department={Department of Mathematics and Computer Science}%
+ , logofile={kau_2012_cmyk_eps_14679}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Title page}
+%
+% \begin{macro}{\kaumet@maketitle}
+% \textsf{kaumeeting} redefines the macro and preserves the original definition in |\kaumet@maketitle|.
+% \begin{macrocode}
+\let\kaumet@maketitle\maketitle
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\maketitle}
+% \begin{macrocode}
+\renewcommand\maketitle{
+ \kaumet@maketitle%
+ \noindent\small%
+ \begin{tabularx}{\textwidth}{@{}>{\bfseries\vphantom{Xy}}rX}
+ subject & \kaumet@meeting\\
+ place & \kaumet@place\\
+ start & \kaumet@start\\
+ end & \kaumet@end\\
+ participants & \kaumet@participants\\
+ recording & \kaumet@protocol\\
+ excused & \kaumet@excused\\
+ missing & \kaumet@missing\\
+ distribution & \kaumet@distribution
+ \end{tabularx}\smallskip
+ \justifying\normalfont\normalsize
+}
+%</meeting>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+\endinput
diff --git a/template/kauthesis.dtx b/template/kauthesis.dtx
new file mode 100644
index 0000000..866e7a7
--- /dev/null
+++ b/template/kauthesis.dtx
@@ -0,0 +1,604 @@
+% \iffalse meta-comment
+%% kauthesis.dtx
+%% Copyright (c) 2011-2015 Stefan Berthold <stefan.berthold@kau.se>
+%
+% This file is part of the kauthesis bundle.
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer and author of this work is Stefan Berthold.
+%
+% This work consists of all files listed in manifest.txt.
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{\jobname.dtx}
+%</driver>
+%<collection|report|masters>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<collection>\ProvidesClass{kaucollection}
+%<report>\ProvidesClass{kaureport}
+%<masters>\ProvidesClass{kaumasters}
+%<*collection|report|masters>
+ [2014/12/04 v1.16 Karlstad University thesis layout]
+%</collection|report|masters>
+%
+%<*driver>
+\documentclass[a4paper]{ltxdoc}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{266}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{v1.0}{2011/02/01}{SBe's licentiate version}
+% \changes{v1.1}{2011/05/06}{Initial public release}
+% \changes{v1.2}{2012/12/14}{Support for babel.sty,\\Documentation added}
+% \changes{v1.3}{2012/12/15}{Merged the classes' dtx files}
+% \changes{v1.4}{2012/12/20}{Fixed babel.sty support}
+% \changes{v1.5}{2012/12/20}{Added templates for kaucollection and kaureport}
+% \changes{v1.6}{2012/12/22}{Merged the styles' dtx files}
+% \changes{v1.7}{2013/04/12}{Added approval page to kaumasters}
+% \changes{v1.8}{2013/04/18}{Improved author's signatures on the approval page of kaumasters}
+% \changes{v1.9}{2013/05/03}{Added keywords to kaumasters, added an environment for English abstracts}
+% \changes{v1.10}{2013/05/28}{Version bump without changes}
+% \changes{v1.11}{2013/09/17}{Fixed missing file in babel support}
+% \changes{v1.16}{2014/12/04}{Added font option to kaumasters}
+%
+% \GetFileInfo{\jobname.dtx}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \StopEventually{\PrintChanges\PrintIndex}
+%
+% \title{The \textsf{\jobname} package\thanks{This document
+% corresponds to \textsf{\jobname}~\fileversion, dated \filedate.}}
+% \author{Stefan Berthold \\ \texttt{stefan.berthold@kau.se}}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% The \textsf{\jobname} package provides \LaTeX{} classes for master's theses (\textsf{kaumasters} class), collection theses (\textsf{kaucollection} class), and monographs (\textsf{kaureport} class). The latest version can be obtained from
+% \begin{quote}
+% \texttt{http://github.com/ZjMNZHgG5jMXw/kauthesis}\quad.
+% \end{quote}
+% The user's manual is found in \texttt{kauguide.pdf}. This file provides the source code documentation to all three classes.
+%
+% \section{Usage}
+%
+% \subsection{Master's thesis}
+%
+% This template can be found in \texttt{kaumasterstemplate.tex}.
+% The \textsf{kaumasters} class is quite similar to \LaTeX's \textsf{article} class. After loading the class, title, author, and institute have to be declared. Different authors in author lists can be separated by commata (``,''). The formatting will be done by \LaTeX.
+% \begin{macrocode}
+%<*masterstemplate>
+\documentclass{kaumasters} % available class options: garamond
+\title{Title}
+\author{Author}
+\supervisor{Super}
+\examiner{Exam}
+\institute{Department of Mathematics and Computer Science}
+\place{Place}
+% \end{macrocode}
+% The thesis starts with the front matter |\frontmatter|. It will (re)print the title. The macro |\maketitle| does not exist, since the title will be created by Karlstad University Studies.
+% \begin{macrocode}
+\begin{document}
+\frontmatter
+% \end{macrocode}
+% The two mandatory inhabitants of the front matter are the abstract (|abstract| environment) and the |\tableofcontents|. If you like to write acknowledgements, put it between the abstract and the table of contents.
+% \begin{macrocode}
+\begin{abstract}
+ Abstract.
+ \keywords keywords
+\end{abstract}
+\approvalpage%
+\begin{acknowledgements}
+ Thanks.
+\end{acknowledgements}
+\tableofcontents
+% \end{macrocode}
+% The main matter starts with |\mainmatter| for adjusting the page numbering. The content in the main matter is your work. Any macro or environment known from \LaTeX's \textsf{article} class can be used here.
+% \begin{macrocode}
+\mainmatter
+\section{Introduction}
+\end{document}
+%</masterstemplate>
+% \end{macrocode}
+%
+% \subsection{Report}
+%
+% This template can be found in \texttt{kaureporttemplate.tex}.
+% Like the master's thesis class, the report class is derived from the \LaTeX{} \textsf{article} class.
+%
+% \begin{macrocode}
+%<*reporttemplate>
+\documentclass{kaureport}
+% \end{macrocode}
+% After loading the class, title, author, and institute have to be declared. Different authors in author lists can be separated by commata (``,''). The formatting will be done by \LaTeX.
+% \begin{macrocode}
+\title{Title}
+\author{Author}
+\institute{Department of Mathematics and Computer Science}
+\place{Place}
+\begin{document}
+% \end{macrocode}
+% The two mandatory inhabitants of the front matter are the abstract (|abstract| environment) and the |\tableofcontents|. If you like to write acknowledgements, put it between the abstract and the table of contents.
+% \begin{macrocode}
+\frontmatter
+\begin{abstract}
+ Brief abstract.
+ \keywords keywords
+\end{abstract}
+\begin{acknowledgements}
+ Thanks.
+\end{acknowledgements}
+\tableofcontents
+% \end{macrocode}
+% The main matter starts with |\mainmatter| for adjusting the page numbering. The content in the main matter is your work. Any macro or environment known from \LaTeX's \textsf{article} class can be used here.
+% \begin{macrocode}
+\mainmatter
+\part{Introduction}
+\section{Related work}
+\part{Conclusions and Future Work}
+\end{document}
+%</reporttemplate>
+% \end{macrocode}
+%
+% \subsection{Collection thesis}
+%
+% This template can be found in \texttt{kaucollectiontemplate.tex}.
+% Like the master's thesis class, the report class is derived from the \LaTeX{} \textsf{article} class.
+%
+% \begin{macrocode}
+%<*collectiontemplate>
+\documentclass{kaucollection}
+% \end{macrocode}
+% Page headings and can be created using the \textsf{scrheadings} packages.
+% \begin{macrocode}
+\usepackage{scrpage2}
+\pagestyle{scrheadings}
+\renewcommand*\headfont{\normalfont\small}
+\rehead{\thepaper}
+\lohead{\thepapertitle}
+% \end{macrocode}
+% After loading the class, title, author, and institute have to be declared. Different authors in author lists can be separated by commata (``,''). The formatting will be done by \LaTeX.
+% \begin{macrocode}
+\title{Title}
+\author{Author}
+\institute{Department of Mathematics and Computer Science}
+\place{Place}
+\begin{document}
+% \end{macrocode}
+% The two mandatory inhabitants of the front matter are the abstract (|abstract| environment) and the |\tableofcontents|. If you like to write acknowledgements, put it between the abstract and the table of contents.
+% \begin{macrocode}
+\frontmatter
+\begin{abstract}
+ Brief abstract.
+ \keywords keywords
+\end{abstract}
+\begin{acknowledgements}
+ Thanks.
+\end{acknowledgements}
+\tableofcontents
+% \end{macrocode}
+% The table of contents is followed by the list of papers.
+% \begin{macrocode}
+\listofpapers
+% \end{macrocode}
+% The main matter starts with |\mainmatter| for adjusting the page numbering.
+% \begin{macrocode}
+\mainmatter
+\section{Introduction}
+% \end{macrocode}
+% Create a list of summaries of all appended papers with |\listofsummaries|.
+% \begin{macrocode}
+\section{Summary of Appended Papers}
+\listofsummaries
+\section{Conclusions and Future Work}
+% \end{macrocode}
+% Append papers, each in an own |kaupaper| environment.
+% \begin{macrocode}
+\begin{kaupaper}[ author=Author
+ , title=Paper Title
+ , reference=reference text.
+ , email=author@kau.se
+ , summary=Abstract in the intro.
+ , participation=I am the main author.
+ , label=paper:shorttitle
+ ]
+% \end{macrocode}
+% Appended papers may have their own titles and abstracts.
+% \begin{macrocode}
+ \maketitle
+ \begin{abstract}
+ Paper abstract.
+ \end{abstract}
+ Paper content.
+\end{kaupaper}
+\end{document}
+%</collectiontemplate>
+% \end{macrocode}
+%
+% \section{Implementation}
+%
+% \subsection{Class options and dependencies}
+%
+% Class options are neither parsed nor passed to the underlying \textsf{article} class. All macros are derived from the standard \textsf{article} class.
+% \begin{macrocode}
+%<*collection|report|masters>
+\LoadClass{article}
+% \end{macrocode}
+%
+% \noindent \textsf{kauclear} provides page style switches in |\cleardoublepage|,
+% \textsf{kaumeta} defines the macros relevant for creating title information, e.\,g., |\institute|.
+% \begin{macrocode}
+\RequirePackage{kauclear}
+\RequirePackage{kaumeta}
+\RequirePackage{kaulist}
+\RequirePackage{kaulanguage}
+% \end{macrocode}
+% \textsf{kaustudies} sets the page dimension to the format required by Karlstad University Studies,
+% \textsf{kauenvironments} defines environments such as |researchquestions| and |contributions|,
+% \textsf{tikz} allows to place content material with absolute coordinates (required by |\vanityquote|).
+% \begin{macrocode}
+%<*collection|report>
+\RequirePackage{kaustudies}
+\RequirePackage{kauenvironments}
+\RequirePackage{tikz}
+%</collection|report>
+% \end{macrocode}
+% \textsf{kaupaper} defines the macros for appending papers to the collection thesis.
+% \begin{macrocode}
+%<*collection>
+\RequirePackage{kaupaper}
+%</collection>
+% \end{macrocode}
+% \textsf{kauparts} defines |\kaupart|, a replacement for |\part|.
+% \begin{macrocode}
+%<*report>
+\RequirePackage{kauparts}
+%</report>
+% \end{macrocode}
+% Garamond becomes the default font on A4 page layout, if the |nofont| option was not given.
+% \begin{macrocode}
+%<*masters>
+\newif\if@kaufont\@kaufontfalse
+\DeclareOption{garamond}{\@kaufonttrue}
+%</masters>
+\ProcessOptions\relax
+%<*masters>
+\if@kaufont
+\RequirePackage{garamondx}
+\RequirePackage[garamondx,cmbraces]{newtxmath}
+\fi
+\RequirePackage[paper=a4,pagesize,twoside=semi]{typearea}
+%</masters>
+% \end{macrocode}
+%
+% \subsection{Language support}
+%
+% \begin{macro}{\acknowledgementname}
+% By default, the |acknowledgements| environment will create an unnumbered section with the title ``Acknowledgements'' (or ``Tacks\"agelser'', if Swedish is chosen as default language). The section headline can be changed to any other language by redefining the macro |\acknowledgementname|.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \setname{acknowledgementname}{Acknowledgements}{Tacks\"agelser}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\keywordname}
+% The abstract is followed by the list of keywords. By default, the list is introduced by the word ``Keywords'' (and ``Nyckelord'' if the default language is set to Swedish). The list introduction can be changed to any other language by redefining the macro |\keywordname|.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \setname{keywordname}{Keywords}{Nyckelord}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\introname}
+% In collection thesis, the main matter starts automatically with an Introductory Summary. The name of the Introductory Summary (``Inledande sammanfattning'' in Swedish) can be changed to any other language by redefining the macro |\introname|.
+% \begin{macrocode}
+%<*collection>
+\AtBeginDocument{%
+ \setname{introname}{Introductory Summary}{Inledande sammanfattning}%
+}
+%</collection>
+% \end{macrocode}
+% \end{macro}
+%
+% \medskip
+% \noindent A master's thesis needs to be approved by the supervisor and the examiner.
+% \begin{macrocode}
+%<*masters>
+% \end{macrocode}
+% \begin{macro}{\approvalname}
+% This macro contains the word ``approved''.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \setname{approvalname}{Approved}{Godk\"and}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\examinationname}
+% This macro contains the name of the examination.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \setname{examinationname}{Master's degree}{magisterexamen}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\approvaltext}
+% The approval text.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \setname{approvaltext}%
+ {This thesis is submitted in partial fulfillment of the %
+ requirements for the \examinationname{} in Computer Science. %
+ All material in this thesis which is not my own work has been %
+ identified and no material is included for which a degree has %
+ previously been conferred.}%
+ {Denna uppsats \"ar skriven som en del av det arbete som kr\"avs %
+ f\"or att erh\aa lla en \examinationname{} i datavetenskap. Allt %
+ material i denna rapport, vilket inte \"ar mitt eget, har blivit %
+ tydligt identifierat och inget material \"ar inkluderat som %
+ tidigare anv\"ants f\"or erh\aa llande av annan examen.}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\supervisorname}
+% This macro contains the word ``supervisor''.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \setname{supervisorname}{Supervisor}{Handledare}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\examinername}
+% This macro contains the word ``examiner''.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \setname{examinername}{Examiner}{Examinator}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%</masters>
+% \end{macrocode}
+%
+% \subsection{Title page}
+%
+% Karlstad University Studies will create the title page for the thesis, thus, creating an own title page is not necessary.
+%
+% \begin{macro}{\kauths@maketitle}
+% The definition of |\maketitle| in the \textsf{article} class creates a title without creating a separate page. The original definition is preserved in |\kauths@maketitle|.
+% \begin{macrocode}
+\let\kauths@maketitle\maketitle
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\maketitle}
+% |\maketitle| does not serve any purpose. When invoked, it produces a warning, refering the user to the |abstract| environment.
+% \begin{macrocode}
+\renewcommand\maketitle{%
+ \PackageWarning{maketitle does not serve any purpose in this class.
+ The abstract environment reproduces the title instead.}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Front matter}
+%
+% The front matter starts after the title on page~iii. It contains the abstract of the thesis, followed by an optional acknowledgements section and the table of contents. In collection theses and reports, the keywords are defined in the front matter.
+%
+% \begin{macro}{\kauths@abstract}
+% The |abstract| environment of the \textsf{article} class provides a perfect layout for article abstracts in collection theses. It will be used for the abstracts of appended papers and preserved in the macro |\kauths@abstract|.
+% \begin{macrocode}
+\let\kauths@abstract\abstract%
+\let\kauths@endabstract\endabstract%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\frontmatter}
+% The front matter is started with |\frontmatter|. It is assumed that this macro directly runs after the optional |\maketitle|.
+% \begin{macrocode}
+\newcommand*\frontmatter{%
+ \clearpage%
+% \end{macrocode}
+% The front matter starts on page~iii, i.\,e., two pages are reserved for the title.
+% \begin{macrocode}
+ \setcounter{page}{3}%
+ \renewcommand\thepage{\roman{page}}%
+% \end{macrocode}
+% \begin{environment}{abstract}
+% The |abstract| environment in the front matter creates a title and an unnumbered abstract section.
+% \begin{macrocode}
+ \renewenvironment{abstract}{%
+% \end{macrocode}
+% \begin{macro}{\keywords}
+% The abstract's last line in collection theses and reports is supposed to be a list of keywords preceeded by |\keywords|.
+% \begin{macrocode}
+ \newcommand\keywords{\paragraph{\keywordname:}}%
+% \end{macrocode}
+% \end{macro}
+% \begin{environment}{english}
+% It is common to append an English translation of the abstract, if the thesis or report is not written in English.
+% \begin{macrocode}
+ \newenvironment{english}{%
+ \renewcommand\keywords{\paragraph{Keywords:}}%
+ \section*{Abstract}%
+ }{%
+ }
+% \end{macrocode}
+% \end{environment}
+% The abstract starts by repeating the title, author, and the institue.
+% \begin{macrocode}
+ \cleardoublepage%
+ \section*{\@title}%
+ \textsc{\prettylist{\@author}}\par%
+ \noindent\textit{\@institute}%
+ \section*{\abstractname}%
+ }{%
+% \end{macrocode}
+% The thesis continues after the abstract on an odd page.
+% \begin{macrocode}
+ \cleardoublepage%
+ }%
+}
+% \end{macrocode}
+% \end{environment}
+% \end{macro}
+%
+% \begin{macro}{\approvalpage}
+% The macro |\approvalpage| creates an approval page for Master's theses.
+% \begin{macrocode}
+%<*masters>
+\newcommand\approvalpage{%
+ \cleardoublepage%
+ \newcommand\sig{\makebox[7cm]{\hrulefill}\\}%
+ \newcommand\signer[1]{\begin{quote}\sig ##1\end{quote}\mbox{}}%
+ \noindent\approvaltext\\\mbox{}\bigskip%
+ \foreach \x in \@author {\signer{\x}}%
+ \\\mbox{}\bigskip\\\mbox{}\bigskip%
+ \approvalname,\\\mbox{}\bigskip%
+ \begin{quote}%
+ \sig\supervisorname: \@supervisor\\\mbox{}\bigskip\\%
+ \sig\examinername: \@examiner
+ \end{quote}%
+}
+%</masters>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{acknowledgements}
+% The environment |acknowledgements| creates an unnumbered section.
+% \begin{macrocode}
+\newenvironment{acknowledgements}{%
+ \cleardoublepage%
+ \section*{\acknowledgementname}%
+}{%
+% \end{macrocode}
+% The author's name is reused to create an attribution line at the end of the acknowledgements section.
+% \begin{macrocode}
+ \par\bigskip\bigskip\bigskip\noindent\@place, \@date\hfill \prettylist{\@author}%
+ \cleardoublepage%
+}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\kauths@tableofcontents}
+% The |\tableofcontents| definition from the \textsf{article} class is preserved. It is not reused in this class.
+% \begin{macrocode}
+\let\kauths@tableofcontents\tableofcontents
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tableofcontents}
+% The redefined macro makes the table of contents start on an odd page.
+% \begin{macrocode}
+\renewcommand\tableofcontents{%
+ \cleardoublepage%
+ \kauths@tableofcontents%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Main matter}
+%
+% The main matter is started with |\mainmatter|. The macro resets the page counter to page~1 and, for collection theses, it immediately creates the part Introductory Summary.
+%
+% \begin{macro}{\mainmatter}
+% The optional argument of |\mainmatter|\oarg{body material} can be used to get access to the part's title page, e.\,g., for adding a quote with |\vanityquote|.
+% \begin{macrocode}
+\newcommand\mainmatter[1][]{%
+ \cleardoublepage%
+% \end{macrocode}
+% The original definition of the |abstract| environment is restored.
+% \begin{macrocode}
+ \renewenvironment{abstract}{\kauths@abstract}{\kauths@endabstract}%
+% \end{macrocode}
+% The page counter is set to page~1.
+% \begin{macrocode}
+ \setcounter{page}{1}%
+ \pagenumbering{arabic}%
+% \end{macrocode}
+% The Introductory Summary title page is created with |\introname| and \meta{body material}.
+% \begin{macrocode}
+%<*collection>
+ \kaupart*[body={#1}]{\introname}%
+%</collection>
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\vanityquote}
+% The macro |\vanityquote|\marg{quote}\marg{reference} can be used in collection theses and reports to add quotes to the cover pages of parts, e.\,g., in \meta{body material} of |\mainmatter|.
+% The first argument, \meta{quote}, is the quote and the second, \meta{reference}, is the reference to the person which is quoted.
+% \begin{macrocode}
+%<*collection|report>
+\newcommand\vanityquote[2]{%
+% \end{macrocode}
+% The quote is placed relative to the borders of the page. TikZ is doing the actual placing.
+% \begin{macrocode}
+ \begin{tikzpicture}[remember picture,overlay]%
+% \end{macrocode}
+% The placing reference is the lower right corner of the page.
+% \begin{macrocode}
+ \path (current page.south east) +(-3,3.5)%
+ node%
+ [ anchor=south east%
+ , font=\large%
+ , text width=28em%
+% \end{macrocode}
+% The closing quotation marks are placed outside the quote's right margin.
+% \begin{macrocode}
+ ] {\raggedleft``#1\rlap{''}%
+ \normalfont\par\medskip\itshape #2\par};%
+ \end{tikzpicture}%
+}
+%</collection|report>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\part}
+% In the \textsf{kaureport} class, the |\part|\marg{headline} is replaced by |\kaupart|.
+% \begin{macrocode}
+%<*report>
+\let\part\kaupart
+%</report>
+%</collection|report|masters>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+\endinput
diff --git a/template/kauthesis.ins b/template/kauthesis.ins
new file mode 100644
index 0000000..2d7af0d
--- /dev/null
+++ b/template/kauthesis.ins
@@ -0,0 +1,101 @@
+%% kau.ins
+%% Copyright (c) 2011-2014 Stefan Berthold <stefan.berthold@kau.se>
+%
+% This file is part of the kauthesis bundle.
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `author-maintained'.
+%
+% The Current Maintainer and author of this work is Stefan Berthold.
+%
+% This work consists of all files listed in manifest.txt.
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/kau}
+
+\preamble
+
+This is a generated file.
+
+Copyright (c) 2011-2014 Stefan Berthold <stefan.berthold@kau.se>
+
+This file is part of the kauthesis bundle.
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This work has the LPPL maintenance status `author-maintained'.
+
+The Current Maintainer and author of this work is Stefan Berthold.
+
+This work consists of all files listed in manifest.txt.
+
+\endpreamble
+
+\askforoverwritefalse
+
+\generate{\file{kaucollection.cls}{\from{kauthesis.dtx}{collection}}
+ \file{kaureport.cls}{\from{kauthesis.dtx}{report}}
+ \file{kaumasters.cls}{\from{kauthesis.dtx}{masters}}
+ \file{kaumasterstemplate.tex}{\from{kauthesis.dtx}{masterstemplate}}
+ \file{kaureporttemplate.tex}{\from{kauthesis.dtx}{reporttemplate}}
+ \file{kaucollectiontemplate.tex}{\from{kauthesis.dtx}{collectiontemplate}}
+ \file{kaunote.cls}{\from{kauprotocol.dtx}{note}}
+ \file{kaumeeting.cls}{\from{kauprotocol.dtx}{meeting}}
+ \file{kaumeetingtemplate.tex}{\from{kauprotocol.dtx}{meetingtemplate}}
+ \file{kauhead.sty}{\from{kauprotocol.dtx}{head}}
+ \file{kauclear.sty}{\from{kautools.dtx}{clear}}
+ \file{kauenvironments.sty}{\from{kautools.dtx}{environments}}
+ \file{kaumeta.sty}{\from{kautools.dtx}{meta}}
+ \file{kaulist.sty}{\from{kautools.dtx}{list}}
+ \file{kaupaper.sty}{\from{kautools.dtx}{paper}}
+ \file{kauparts.sty}{\from{kautools.dtx}{parts}}
+ \file{kaustudies.sty}{\from{kautools.dtx}{studies}}
+ \file{kaulanguage.sty}{\from{kautools.dtx}{language}}
+ \file{kautitle.sty}{\from{kautools.dtx}{title}}
+ \file{pgfcropmarks.sty}{\from{kautools.dtx}{crop}}
+}
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* kaucollection.cls *}
+\Msg{* kaureport.cls *}
+\Msg{* kaumasters.cls *}
+\Msg{* kaumeeting.cls *}
+\Msg{* kauclear.sty *}
+\Msg{* kauenvironments.sty *}
+\Msg{* kaumeta.sty *}
+\Msg{* kaulist.sty *}
+\Msg{* kaupaper.sty *}
+\Msg{* kauparts.sty *}
+\Msg{* kaustudies.sty *}
+\Msg{* kaulanguage.sty *}
+\Msg{* kautitle.sty *}
+\Msg{* pgfcropmarks.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the files *.dtx *}
+\Msg{* through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*************************************************************}
+
+\endbatchfile
diff --git a/template/kautools.dtx b/template/kautools.dtx
new file mode 100644
index 0000000..307b643
--- /dev/null
+++ b/template/kautools.dtx
@@ -0,0 +1,949 @@
+% \iffalse meta-comment
+%% kautools.dtx
+%% Copyright (c) 2011-2015 Stefan Berthold <stefan.berthold@kau.se>
+%
+% This file is part of the kauthesis bundle.
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer and author of this work is Stefan Berthold.
+%
+% This work consists of all files listed in manifest.txt.
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{\jobname.dtx}
+%</driver>
+%<title|meta|list|clear|environments|parts|paper|studies|crop>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<title>\ProvidesPackage{kautitle}
+%<meta>\ProvidesPackage{kaumeta}
+%<list>\ProvidesPackage{kaulist}
+%<clear>\ProvidesPackage{kauclear}
+%<environments>\ProvidesPackage{kauenvironments}
+%<parts>\ProvidesPackage{kauparts}
+%<paper>\ProvidesPackage{kaupaper}
+%<studies>\ProvidesPackage{kaustudies}
+%<language>\ProvidesPackage{kaulanguage}
+%<crop>\ProvidesPackage{pgfcropmarks}
+%<*title|meta|list|clear|environments|parts|paper|studies|language|crop>
+ [2014/10/22 v1.15 Karlstad University kautools bundle]
+%</title|meta|list|clear|environments|parts|paper|studies|language|crop>
+%
+%<*driver>
+\documentclass[a4paper]{ltxdoc}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{\jobname.dtx}
+ \PrintChanges
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{707}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{v1.0}{2011/02/01}{SBe's licentiate version}
+% \changes{v1.1}{2011/05/06}{Initial public release}
+% \changes{v1.2}{2012/12/14}{Support for babel.sty,\\Documentation added}
+% \changes{v1.3}{2012/12/15}{Merged the classes' dtx files}
+% \changes{v1.4}{2012/12/20}{Fixed babel.sty support}
+% \changes{v1.5}{2012/12/20}{Added templates for kaucollection and kaureport}
+% \changes{v1.6}{2012/12/22}{Merged the styles' dtx files}
+% \changes{v1.7}{2013/04/16}{Added macros for supervisor and examiner in kaumeta}
+% \changes{v1.8}{2013/04/18}{Added macros pretty printing lists in kaulist}
+% \changes{v1.9}{2013/05/03}{Version bump without changes}
+% \changes{v1.10}{2013/05/28}{Version bump without changes}
+% \changes{v1.11}{2013/09/17}{Fixed missing file in babel support}
+% \changes{v1.14}{2014/10/20}{Added refnote}
+% \changes{v1.15}{2014/10/22}{Added refprefix}
+%
+% \GetFileInfo{\jobname.dtx}
+%
+% \DoNotIndex{\newcommand,\renewcommand,\newenvironment,\let}
+%
+% \StopEventually{}
+%
+% \title{The \textsf{\jobname} bundle\thanks{This document
+% corresponds to \textsf{\jobname}~\fileversion, dated \filedate.}}
+% \author{Stefan Berthold \\ \texttt{stefan.berthold@kau.se}}
+%
+% \maketitle
+% \begin{abstract}
+% The \textsf{\jobname} bundle provides tools (\LaTeX{} style files) for the \textsf{kauthesis} bundle.
+% \end{abstract}
+% \tableofcontents
+%
+% \section{Introduction}
+%
+% \subsection{The \textsf{kautitle} package}
+%
+% The \textsf{kautitle} package defines an alternative title page using the logo of Karlstad University. Note that this is not an implementation of the Karlstad University Studies title page, i.\,e., this alternative title page won't be used for your thesis.
+% The logo is available from
+% \begin{quote}
+% http://www.kau.se/sites/default/files/image/press/kau-logo-tryck.pdf
+% \end{quote}
+% and must be available in \LaTeX's search path before using this package.
+%
+% At the moment, this package uses a manually installed font called \textsf{aun} and it's bold version \textsf{aub}. It might not be available on your system, though, and since the font is licensed, I may not distribute it. If you do not possess the font, you have to switch to another one.
+%
+% Load the package without options. The title page can be created using \DescribeMacro{\maketitle}|\maketitle|. Note that the previous definition of |\maketitle| is not destroyed, but preserved in the macro \DescribeMacro{\kut@maketitle}|\kut@maketitle|. You can use it in your document as follows:
+% \begin{quote}\begin{verbatim}\makeatletter
+%\kut@maketitle
+%\makeatother\end{verbatim}\end{quote}
+%
+% Two fonts are used on the title page and can be changed using the macro \DescribeMacro{\setkautitlefont}|\setkautitlefont|\marg{font}. The argument \meta{font} accepts key-value pairs where keys are |normalfont| and |titlefont| and values are any sequence of \LaTeX's font commands. For switching to your standard sans-serif font, you should add these lines to your preamble:
+% \begin{quote}\begin{verbatim}\setkautitle%
+% { normalfont=\sffamily\LARGE
+% , titlefont=\sffamily\bfseries\Huge }\end{verbatim}\end{quote}
+%
+% \subsection{The \textsf{kaumeta} package}
+%
+% The \textsf{kaumeta} package defines three macros, |\subject|, |\institute|, and |\place|, for providing additional meta data about the document and it's author. This meta data can be used, e.\,g., on the title page of the document.
+%
+% \subsection{The \textsf{kaulist} package}
+%
+% The \textsf{kaulist} package defines pretty printing macros for lists. For instance, a list ``1,2,3'' is transformed to ``1, 2, and 3''.
+%
+% \subsection{The \textsf{kauclear} package}
+%
+% This package replaces the macro |\cleardoublepage|. Empty pages with odd page numbers will not print the page number. Also, the macro |\pagestyle| is redefined. The new behaviour is to stores the page style for being able to restore it later on.
+%
+% \subsection{The \textsf{kauenvironments} package}
+%
+% This package defines the environments |researchquestions| and |contributions|.
+%
+% \subsection{The \textsf{kauparts} package}
+%
+% This packages defines a new |\part| macro, |\kaupart|. It is independend of |\part|, but you should decide yourself for one alternative only. The |\kaupart| macro adds a cover page for the new part.
+%
+% Use the package options |vshift| and |vstep| to adjust the placement of the thumb indices on the cover pages.
+%
+% \DescribeMacro{\kaupart}
+% Use |\kaupart|\oarg{meta}\marg{title} to create a numbered part with the given \meta{title}. You may use the optional argument \meta{arg} for adding meta data. This includes |body| for typing additional material on the cover page and |label| for creating a label such as usually created by |\label|. In addition, the switch |tocentry| may be set to false, if the macro should not add an entry to the table of contents.
+%
+% \DescribeMacro{\kaupart*}
+% The starred version of |\kaupart| works exactly like the unstarred version, but creates an unnumbered part.
+%
+% \subsection{The \textsf{kaupaper} package}
+%
+% \emph{Yet no description.}
+%
+% \subsection{The \textsf{kaustudies} package}
+%
+% This package sets the page dimensions so that your document does not need to be scaled for printing. It also chooses Garamond as the standard font.
+%
+% You can use the package option |tinyfontswitch=false| in order to avoid the switch to sans-serif fonts when using |\tiny|. The switch is recommended by Karlstad University Studies, though, it is rather debatable whether this is necessary when using \LaTeX{} and the correct page dimensions.
+%
+% \subsection{The \textsf{kaulanguage} package}
+%
+% This packages defines a macro for supporting names in English and Swedish depending on the chosen language in \textsf{babel}.
+%
+% \subsection{The \textsf{pgfcropmarks} package}
+%
+% The package \textsf{pgfcropmarks} draws crop marks on A4~paper. This is supposed to be the last step after creating all tables, indices, and glosseries. When the package is loaded, \LaTeX{} will not create or update any auxiliary files.
+%
+% \section{Implementation}
+%
+% \subsection{The \textsf{kautitle} package}
+%
+% No package options are accepted.
+% \begin{macrocode}
+%<*title>
+\ProcessOptions\relax
+% \end{macrocode}
+%
+% \noindent Load dependencies.
+% \begin{macrocode}
+\RequirePackage{xkeyval}
+\RequirePackage{tikz}
+\RequirePackage{hyphenat}
+\RequirePackage{kaumeta}
+% \end{macrocode}
+%
+% \begin{macro}{\setkautitlefont}
+% The macro |\setkautitlefont| allows to choose another than the default font for the title page. The title page has only two different font settings, |titlefont| which is used for the title text and |normalfont| which is used otherwise.
+% \begin{macrocode}
+\define@cmdkeys[kut]{pkg}[kut@]{normalfont,titlefont}
+\setkeys[kut]{pkg}%
+ { normalfont=\fontfamily{aun}\fontsize{18}{21.6}\selectfont\bfseries
+ , titlefont=\fontfamily{aub}\fontsize{28}{33.6}\selectfont }
+\newcommand\setkautitlefont[1]{\setkeys[kut]{pkg}{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\kut@maketitle}
+% Preserve the previous version of |\maketitle|.
+% \begin{macrocode}
+\let\kut@maketitle\maketitle
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\maketitle}
+% The title page will consist of two background images (the Karlstad University logo), title, subject, author, and author's institute. Everything will be shaded except the title.
+% \begin{macrocode}
+\renewcommand\maketitle{%
+ \thispagestyle{empty}
+ \begin{tikzpicture}[remember picture, overlay]%
+% \end{macrocode}
+% Clipping the title page to the dimensions of the logical page. This is interesting when the physical and the logical page do not have the same dimensions.
+% \begin{macrocode}
+ \path (current page.north west) +(-4pt,4pt) node (NW) {};
+ \path (current page.south east) +(4pt,-4pt) node (SE) {};
+ \path (current page.north west) +(-3pt,3pt) node (NWC) {};
+ \path (current page.south east) +(3pt,-3pt) node (SEC) {};
+ \path[clip] (NWC) rectangle (SEC);
+% \end{macrocode}
+% Background images.
+% \begin{macrocode}
+ \path (current page.south west) node[rotate=243.5] {\pgfimage{kau-logo-tryck}};%
+ \path (current page.north east) node[rotate=175] {\pgfimage{kau-logo-tryck}};%
+% \end{macrocode}
+% Subject in the upper left corner of the page.
+% \begin{macrocode}
+ \path (current page.north west) node
+ [shift={(10pt,-12pt)},anchor=south west,rotate=270
+ ,font=\kut@normalfont\vphantom{Xy}]
+ {\@subject};
+% \end{macrocode}
+% Institute in the lower right corner of the page.
+% \begin{macrocode}
+ \path (current page.south east) node
+ [shift={(-8pt,6pt)},anchor=north east,rotate=270
+ ,rounded corners,fill=black,text=white,inner sep=8pt
+ ,font=\kut@normalfont\vphantom{Xy}]
+ {\@shortinstitute};
+% \end{macrocode}
+% Title bar on vertically centered on the left side of the page.
+% \begin{macrocode}
+ \path
+ (current page.east) node[shift={(-10,0)}] (A) {}
+ (current page.east) node[shift={(0,-2.5)}] (B) {}
+ [shading=axis,left color=white,right color=black] (A) rectangle (B.south east)
+ ;
+% \end{macrocode}
+% Author below the title bar.
+% \begin{macrocode}
+ \path (B) node
+ [anchor=north east
+ ,inner sep=8pt
+ ,text=black
+ ,font=\kut@normalfont\vphantom{Xy}
+ ,text width=14cm,text ragged left]
+ {\@author};
+% \end{macrocode}
+% Shading over the entire page (slightly bigger than the clipping).
+% \begin{macrocode}
+ \path[fill=white,opacity=0.90,transparency group] (NW) rectangle (SE);
+% \end{macrocode}
+% Title text on the title bar. No hyphens are allowed in the title text.
+% \begin{macrocode}
+ \path (B) node
+ [anchor=south east,shift={(-3pt,0)}
+ ,text=yellow!75!red
+ ,font=\kut@titlefont\vphantom{Xy}
+ ,text width=14cm,text ragged left]
+ {\nohyphens{\@title}};
+ \end{tikzpicture}%
+ \clearpage%
+}
+%</title>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The \textsf{kaumeta} package}
+%
+% No package options are parsed.
+% \begin{macrocode}
+%<*meta>
+\ProcessOptions\relax
+% \end{macrocode}
+%
+% \noindent Dependencies are loaded.
+% \begin{macrocode}
+\usepackage{ifthen}
+% \end{macrocode}
+%
+% \begin{macro}{\subject}
+% The macro |\subject|\marg{subject} can be used to set the subject of the document. The last \meta{subject} set will be available in the macro \DescribeMacro{\@subject}|\@subject|.
+% \begin{macrocode}
+\newcommand*\@subject{}
+\newcommand\subject[1]{\renewcommand*\@subject{#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\institute}
+% The macro |\institute|\oarg{short}\marg{institute} can be used to set the institute of the document's author. It is possible to provide a shorter version of the institue in the optional argument \meta{short}. If not explicitly set, the short version is the same as the long version \meta{institute}. The values are available in the macros \DescribeMacro{\@institute}|\@institute| and \DescribeMacro{\@shortinstitute}|\@shortinstitute|.
+% \begin{macrocode}
+\newcommand*\@institute{}
+\newcommand*\@shortinstitute{}
+\newcommand\institute[2][]{%
+ \renewcommand*\@institute{#2}%
+ \ifthenelse{\equal{#1}{}}{%
+ \renewcommand*\@shortinstitute{#2}%
+ }{%
+ \renewcommand*\@shortinstitute{#1}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\place}
+% The macro |\place|\marg{place} can be used to set the place of the document's author. The last \meta{place} set will be available in the macro \DescribeMacro{\@place}|\@place|.
+% \begin{macrocode}
+\newcommand*\@place{}
+\newcommand\place[1]{\renewcommand*\@place{#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\supervisor}
+% \marg{name} sets the supervisor's name for the \textsf{kaumasters} class.
+% \begin{macrocode}
+\newcommand\@supervisor{}
+\newcommand\supervisor[1]{\renewcommand*\@supervisor{#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\examiner}
+% \marg{name} sets the examiner's name for the \textsf{kaumasters} class.
+% \begin{macrocode}
+\newcommand\@examiner{}
+\newcommand\examiner[1]{\renewcommand*\@examiner{#1}}
+%</meta>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The \textsf{kaulist} package}
+%
+% No options are parsed.
+%
+% \begin{macrocode}
+%<*list>
+\ProcessOptions\relax
+\RequirePackage{kaulanguage}
+% \end{macrocode}
+%
+% For |\prettylist|, the packages \textsf{pgffor}, \textsf{pgfmath}, and \textsf{pgfkeys} are required.
+%
+% \begin{macrocode}
+\RequirePackage{tikz}
+% \end{macrocode}
+%
+% \begin{macro}{\commasign}
+% defines a comma (``,''), if one is to be used before ``and''.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \setname{commasign}{}{,}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\andname}
+% definses the word used as ``and''.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \setname{andname}{and}{och}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\prettylist}
+% \marg{list} transformes a comma separated list into a list in natural language.
+% \begin{macrocode}
+\newcommand\prettylist[1]{%
+% \end{macrocode}
+% The number of list elements is stored in |\num|.
+% \begin{macrocode}
+ \foreach[count=\xi] \x in #1 {}%
+ \let\num=\xi%
+% \end{macrocode}
+% The first element is just printed without any changes.
+% \begin{macrocode}
+ \foreach[count=\xi] \x in #1 {%
+ \ifnum \xi=1%
+ \x%
+% \end{macrocode}
+% The last element is printed with preceding |\commasign|, if there are more than two elements in the list, and otherwise without.
+% \begin{macrocode}
+ \else%
+ \ifnum \xi=\num%
+ \ifnum \num=2%
+ {} \andname{} \x%
+ \else%
+ \commasign{} \andname{} \x%
+ \fi%
+% \end{macrocode}
+% Elements in between the first and the last one are printed with a preceding hard-coded comma sign (not |\commasign|).
+% \begin{macrocode}
+ \else%
+ , \x%
+ \fi%
+ \fi%
+ }%
+}%
+%</list>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The \textsf{kauclear} package}
+%
+% No options are parsed.
+%
+% \begin{macrocode}
+%<*clear>
+\ProcessOptions\relax
+% \end{macrocode}
+%
+% \begin{macro}{\kuc@currentpagestyle}
+% The page style is stored in |\kuc@currentpagestyle|. Default: |plain|
+% \begin{macrocode}
+\newcommand\kuc@currentpagestyle{plain}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pagestyle}
+% The macro |\pagestyle| is redefined to update the page style in |\kuc@currentpagestyle|.
+% \begin{macrocode}
+\let\pagestyle@orig\pagestyle
+\renewcommand\pagestyle[1]{%
+ \renewcommand\kuc@currentpagestyle{#1}%
+ \pagestyle@orig{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\kuc@restorepagestyle}
+% The page style can be restored with |\kuc@restorepagestyle| after (temporarily) switching to another one using |\pagestyle@orig|.
+% \begin{macrocode}
+\newcommand\kuc@restorepagestyle{%
+ \pagestyle@orig{\kuc@currentpagestyle}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cleardoubpage@orig}
+% The previous definition of |\cleardoublepage| is preserved in |\cleardoublepage@orig|.
+% \begin{macrocode}
+\let\cleardoubpage@orig\cleardoublepage
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cleardoublepage}
+% The macro |\cleardoublepage| is redefined. The new definition switches temporarily to the page style |empty|.
+% \begin{macrocode}
+\renewcommand\cleardoublepage{%
+ \clearpage%
+ \pagestyle@orig{empty}%
+ \cleardoubpage@orig%
+ \kuc@restorepagestyle%
+}
+%</clear>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The \textsf{kauenvironments} package}
+%
+% No package options are parsed.
+%
+% \begin{macrocode}
+%<*environments>
+\ProcessOptions\relax
+% \end{macrocode}
+%
+% \noindent Load dependencies.
+% \begin{macrocode}
+\RequirePackage{xspace}
+\RequirePackage{xcolor}
+% \end{macrocode}
+%
+% \begin{environment}{researchquestions}
+% The environment is an enumeration derived from |enumerate|. The argument of |\item|\oarg{question} is used to formulate the research question.
+% \begin{macrocode}
+\newenvironment{researchquestions}%
+ {\begin{enumerate}%
+ \let\kue@item\item%
+ \renewcommand\item[1][Research question]%
+ {\kue@item\emph{##1}\nopagebreak\par}%
+ }%
+ {\end{enumerate}}%
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{contributions}
+% The environment is an enumeration derived from |enumerate|. The argument of |\item|\oarg{contrib} is used to formulate the contribution.
+% \begin{macrocode}
+\newenvironment{contributions}%
+ {\begin{enumerate}%
+ \let\kue@item\item%
+ \renewcommand\item[1][%
+ \textcolor{red}{\emph{write your contribution between brackets
+ as optional argument of \texttt{\string\item}.}}]%
+ {\kue@item\emph{##1}\xspace}%
+ }%
+ {\end{enumerate}}%
+%</environments>
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{The \textsf{kauparts} package}
+%
+% \begin{macrocode}
+%<*parts>
+\RequirePackage{xkeyval}
+
+\define@cmdkeys[kup]{pkg}[kup@]{vshift,vstep}
+\setkeys[kup]{pkg}{vshift=2,vstep=0.8}
+
+\ProcessOptionsX[kup]<pkg>
+
+\RequirePackage{calc}
+\RequirePackage{ifthen}
+\RequirePackage{suffix}
+\RequirePackage{tikz}
+\usetikzlibrary{positioning}
+
+\define@cmdkeys[kup]{part}[kup@]{body,label}
+\define@boolkeys[kup]{part}[kup@]{tocentry}
+
+\newcounter{kup@part}
+\newcounter{kup@vertical}
+\setcounter{kup@vertical}{0}
+
+\newcommand*\@titlepagestyle{empty}
+\newcommand\titlepagestyle[1]{\renewcommand*\@titlepagestyle{#1}}
+
+\newcommand\kup@partheadline[2]{%
+ \path[node distance=1ex] (current page.north east) +(3pt,\kup@vshift+\kup@vstep*\arabic{kup@vertical}) %
+ node%
+ [ anchor=north east%
+ , minimum width=2cm+3pt%
+ %, minimum height=7mm%
+ %, draw=black%
+ %, fill=black%
+ , left color=white%
+ , right color=black%
+ , text=white%
+ , font=\LARGE\bfseries%
+ ] (bar) {#1}%
+ node[base left=of bar,font=\LARGE\bfseries] {#2};%
+}
+% \end{macrocode}
+% \begin{macro}{\kaupart}
+% \begin{macrocode}
+\newcommand\kaupart[2][]{%
+ \cleardoublepage%
+ \thispagestyle{\@titlepagestyle}%
+ \stepcounter{kup@part}%
+ \setkeys[kup]{part}{body=\relax,label=,tocentry=true,#1}%
+ \providecommand\phantomsection{}%
+ \phantomsection%
+ \ifkup@tocentry%
+ \addcontentsline{toc}{part}{\numberline{\Roman{kup@part}}\textsc{#2}}%
+ \fi%
+ \renewcommand\@currentlabel{\Roman{kup@part}}%
+ \ifthenelse{\equal{\kup@label}{}}{}{\label{\kup@label}}%
+ \begin{tikzpicture}[remember picture,overlay,yscale=-1]%
+ \kup@partheadline{\Roman{kup@part}}{#2}%
+ \end{tikzpicture}%
+ \kup@body
+ \stepcounter{kup@vertical}%
+ \cleardoublepage%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\kaupart*}
+% \begin{macrocode}
+\WithSuffix\newcommand\kaupart*[2][]{%
+ \cleardoublepage%
+ \thispagestyle{\@titlepagestyle}%
+ \setkeys[kup]{part}{body=\relax,tocentry=true,#1}%
+ \providecommand\phantomsection{}%
+ \phantomsection%
+ \ifkup@tocentry%
+ \addcontentsline{toc}{part}{\textsc{#2}}%
+ \fi%
+ \begin{tikzpicture}[remember picture,overlay,yscale=-1]%
+ \kup@partheadline{\vphantom{X}}{#2}%
+ \end{tikzpicture}%
+ \kup@body
+ \stepcounter{kup@vertical}%
+ \cleardoublepage%
+}
+%</parts>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The \textsf{kaupaper} package}
+%
+% \begin{macrocode}
+%<*paper>
+\RequirePackage{xkeyval}
+\PassOptionsToPackage{hypertexnames=false}{hyperref}
+
+\define@cmdkeys[kua]{paper}[kua@]{author,title,subtitle,refprefix,reference,refnote,email,refstr,vanity,subdelimiter,label,summary,limitations,participation}
+\define@cmdkeys[kua]{paperlist}[kua@]{printparticipation,tocline}
+\setkeys[kua]{paper}{refstr=\reprintedname}
+
+\ProcessOptionsX[kua]<paper>
+
+\RequirePackage{kauparts}
+\RequirePackage{ifthen}
+\RequirePackage{tikz}
+
+\RequirePackage{ragged2e}
+\RequirePackage{hyphenat}
+
+\RequirePackage{kaulanguage}
+
+\AtBeginDocument{%
+ \setname{reprintedname}{Reprinted from}{Ursprungligen publicertad i}%
+ \setname{appendedpapersname}{List of Appended Papers}{Bifogade publiceringar}%
+ \setname{participationname}{Comments on my Participation}{Kommentarer p\aa{} min medverka}%
+ \setname{papername}{Paper}{Publicering}%
+}
+
+\newcounter{kua@section}
+\newcounter{kua@equation}
+\newcounter{kua@figure}
+\newcounter{kua@table}
+
+\newcounter{kua@paper}
+
+\providecommand\thepaper{}
+\providecommand\thepapertitle{}
+
+\newcommand\kua@warning\relax
+\newcommand\kua@dowarn{\gdef\kua@warning{\@latex@warning@no@line{List data created from the kaupaper environment was outdated. Rerun to get the lists right}}}
+\AtEndDocument{\kua@warning}
+
+\newcommand\kua@listof[4]{%
+ \IfFileExists{\jobname.#1}%
+ {% check whether empty file
+ \newread\reader%
+ \openin\reader\jobname.#1%
+ \read\reader to \readmacro%
+ \ifeof\reader%
+ \textcolor{red}{\ldots{} will be available after the next \LaTeX{} run.}%
+ \@starttoc{#1}%
+ %\AtEndDocument{\@latex@warning@no@line{Rerun to get the list of #2 right}}%
+ \kua@dowarn%
+ \else% file not empty -> create list
+ #3\@starttoc{#1}#4%
+ \fi%
+ }%
+ {% file does not exist
+ \textcolor{red}{\ldots{} will be available after the next \LaTeX{} run.}%
+ \@starttoc{#1}%
+ %\AtEndDocument{\@latex@warning@no@line{Rerun to get the list of #2 right}}%
+ \kua@dowarn%
+ }%
+}
+% \end{macrocode}
+% \begin{macro}{\listofpapers}
+% \begin{macrocode}
+\newcommand\listofpapers[1][]{%
+ \setkeys[kua]{paperlist}{printparticipation=yes,tocline=yes,#1}
+ \section*{\appendedpapersname}%
+ \ifthenelse{\equal{\kua@tocline}{yes}}{%
+ \addcontentsline{toc}{section}{\appendedpapersname}%
+ }{}%
+ \kua@listof{pap}{appended papers}{%
+ \begin{enumerate}%
+ \renewcommand\theenumi{\textbf{\Roman{enumi}}}%
+ }{\end{enumerate}}%
+ \ifthenelse{\equal{\kua@printparticipation}{yes}}{%
+ \subsection*{\participationname}%
+ \kua@listof{pcp}{participation in appended papers}{}{}%
+ }{}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+
+\newcommand\l@paper[2]{%
+ \item #1%
+}
+
+\newcommand\listofsummaries{%
+ \kua@listof{sum}{paper summaries}{}{}%
+}
+
+\newcommand\l@summary[2]{%
+ #1%
+}
+
+\newcommand\l@limit[2]{%
+ %\paragraph{Limitations.}
+ #1%
+}
+
+\newcommand\l@participation[2]{%
+ #1%
+}
+
+\newcommand\papercover{%
+ \begin{tikzpicture}[remember picture,overlay]%
+ \path (current page.center)%
+ node%
+ [ node distance=\baselineskip%
+ , text width=\textwidth%
+ , text centered%
+ ] (refstr) {\kua@refstr};%
+ \ifthenelse{\equal{\kua@subtitle}{}}{%
+ \node%
+ [ node distance=1.5\baselineskip%
+ , above=of refstr%
+ , text width=\textwidth%
+ , text centered%
+ , font=\LARGE\bfseries%
+ ] {\nohyphens{\kua@title}};%
+ }{%
+ \node%
+ [ node distance=1.5\baselineskip%
+ , above=of refstr%
+ , text width=\textwidth%
+ , text centered%
+ , font=\large\bfseries%
+ ] (sub) {\nohyphens{\kua@subtitle}};%
+ \node%
+ [ node distance=1pt%
+ , above=of sub%
+ , text width=\textwidth%
+ , text centered%
+ , font=\LARGE\bfseries%
+ ] {\nohyphens{\kua@title}};%
+ }%
+ \node%
+ [ node distance=\baselineskip%
+ , below=of refstr%
+ , text width=\textwidth%
+ , text centered%
+ , font=\large%
+ ] {\nohyphens{\kua@reference}\ifthenelse{\equal{\kua@refnote}{}}{}{\mbox{}\\\medskip\nohyphens{\kua@refnote}}}%
+ ;%
+ \end{tikzpicture}%
+}
+
+\newenvironment{kaupaper}[1][]{%
+ \setcounter{kua@section}{\value{section}}%
+ \setcounter{kua@equation}{\value{equation}}%
+ \setcounter{kua@figure}{\value{figure}}%
+ \setcounter{kua@table}{\value{table}}%
+ \setcounter{section}{0}%
+ \setcounter{equation}{0}%
+ \setcounter{figure}{0}%
+ \setcounter{table}{0}%
+ \setkeys[kua]{paper}{subtitle=,vanity=,subdelimiter={---},refprefix=,refnote=,label=,summary={\string\textcolor{red}{Use the \string\texttt{summary} key in the \string\texttt{kaupaper} environment to add a summary.}},participation={\string\textcolor{red}{Use the \string\texttt{participation} key in the \string\texttt{kaupaper} environment to add a comment.}},limitations={},#1}%
+ \setcounter{kua@paper}{\value{kup@part}}\stepcounter{kua@paper}%
+ \kaupart[tocentry=false,label=\kua@label,body=\papercover\kua@vanity]{\papername}%
+ \ifthenelse{\equal{\kua@subtitle}{}}%
+ {\ifthenelse{\equal{\kua@refnote}{}}%
+ {\addcontentsline{pap}{paper}{\kua@author. \kua@title. \kua@refprefix\kua@reference.}}%
+ {\addcontentsline{pap}{paper}{\kua@author. \kua@title. \kua@refprefix\kua@reference.\smallskip\\\kua@refnote}}%
+ \addcontentsline{toc}{part}{\textsc{\papername} \Roman{kua@paper}: \\\kua@title}}%
+ {\ifthenelse{\equal{\kua@refnote}{}}%
+ {\addcontentsline{pap}{paper}{\kua@author. \kua@title\kua@subdelimiter\kua@subtitle. \kua@refprefix\kua@reference.}}%
+ {\addcontentsline{pap}{paper}{\kua@author. \kua@title\kua@subdelimiter\kua@subtitle. \kua@refprefix\kua@reference.\smallskip\\\kua@refnote}}%
+ \addcontentsline{toc}{part}{\textsc{\papername} \Roman{kua@paper}: \\\kua@title\kua@subdelimiter\kua@subtitle}}%
+ \addcontentsline{sum}{summary}{\string\subsubsection*{\papername~\Roman{kua@paper} -- \kua@title}\kua@summary}%
+ \ifthenelse{\equal{\kua@limitations}{}}{}{%
+ \addcontentsline{sum}{limit}{\kua@limitations}}%
+ \addcontentsline{pcp}{participation}{\string\paragraph{\papername~\Roman{kua@paper}}\kua@participation}%
+ \renewcommand*\thepaper{\papername~\Roman{kua@paper}}%
+ \renewcommand*\thepapertitle{\kua@title}%
+ \renewcommand\maketitle{%
+ \thispagestyle{plain}%
+ \centering%
+ \Large\bfseries%
+ \vspace*{0.15\textheight}%
+ \kua@title\par%
+ \addvspace{1ex}%
+ \ifthenelse{\equal{\kua@subtitle}{}}{}{\large\kua@subtitle}%
+ \par\addvspace{\baselineskip}%
+ \normalsize%
+ \kua@author\\[0.25\baselineskip]%
+ \normalfont%
+ \kua@email%
+ \par\addvspace{2\baselineskip}\justifying%
+ }%
+}{%
+ \setcounter{section}{\value{kua@section}}%
+ \setcounter{equation}{\value{kua@equation}}%
+ \setcounter{figure}{\value{kua@figure}}%
+ \setcounter{table}{\value{kua@table}}%
+ \clearpage%
+}
+%</paper>
+% \end{macrocode}
+%
+% \subsection{The \textsf{kaustudies} package}
+%
+% \begin{macrocode}
+%<*studies>
+\RequirePackage{xkeyval}
+
+\define@boolkey[kus]{pkg}[kus@]{tinyfontswitch}[true]{}
+
+\presetkeys[kus]{pkg}{tinyfontswitch}{}
+\ProcessOptionsX[kus]<pkg>
+
+\RequirePackage[twoside]{geometry}
+\RequirePackage{garamondx}
+\RequirePackage[garamondx,cmbraces]{newtxmath}
+
+\geometry
+ { paperwidth=165mm
+ , paperheight=242mm
+ , inner=27mm
+ , outer=27mm
+ , top=24mm
+ , bottom=22mm
+ }
+
+\ifkus@tinyfontswitch
+ \let\kus@tiny@orig\tiny
+ \renewcommand*\tiny{\sffamily\kus@tiny@orig}
+\fi
+%</studies>
+% \end{macrocode}
+%
+% \subsection{The \textsf{kaulanguage} package}
+%
+% \begin{macrocode}
+%<*language>
+\ProcessOptions\relax
+\newif\ifbabel
+\babelfalse
+\AtBeginDocument{%
+ \@ifpackageloaded{babel}%
+ {\babeltrue}%
+ {\babelfalse}%
+}
+% \end{macrocode}
+% \begin{macro}{\setname}\marg{macro name}\marg{english}\marg{swedish}
+% \begin{macrocode}
+\newcommand\setname[3]{%
+ \IfFileExists{swedish.ldf}{%
+ \ifbabel%
+ \expandafter\edef\csname #1\endcsname{\noexpand\iflanguage{swedish}{#3}{#2}}%
+ \else%
+ \expandafter\edef\csname #1\endcsname{#2}%
+ \fi%
+ }%
+ {\expandafter\edef\csname #1\endcsname{#2}}%
+}
+%</language>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The \textsf{pgfcropmarks} package}
+%
+% No options are parsed.
+%
+% \begin{macrocode}
+%<*crop>
+\ProcessOptions\relax
+\RequirePackage{pgfpages}%
+% \end{macrocode}
+%
+% \noindent No files are created or updated.
+% \begin{macrocode}
+\nofiles%
+% \end{macrocode}
+%
+% \noindent Boolean, true on odd pages.
+% \begin{macrocode}
+\newif\if@kus@isodd%
+\@kus@isoddtrue%
+% \end{macrocode}
+%
+% \begin{macro}{\cropmarklen}
+% The length of the crop mark lines.
+% \begin{macrocode}
+\newlength{\cropmarklen}\setlength{\cropmarklen}{40pt}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cropmarksep}
+% The space between cropmark and paper edge.
+% \begin{macrocode}
+\newlength{\cropmarksep}\setlength{\cropmarksep}{15pt}%
+% \end{macrocode}
+% \end{macro}
+%
+% \noindent The cropmark page layout.
+% \begin{macrocode}
+\pgfpagesdeclarelayout{cropmarks}%
+{%
+}%
+{%
+ \pgfpagesphysicalpageoptions%
+ {%
+ logical pages=1,%
+ physical height=297mm,%
+ physical width=210mm%
+ }%
+ \pgfpageslogicalpageoptions{1}%
+ {%
+ border code=%
+ \if@kus@isodd
+ \global\@kus@isoddfalse
+ \pgfsetlinewidth{0.6pt}%
+ \pgfusepath{discard}%
+ \pgfmoveto{\pgfpoint{-\cropmarksep}{0pt}}%
+ \pgflineto{\pgfpoint{-\cropmarklen}{0pt}}%
+ \pgfmoveto{\pgfpoint{0pt}{-\cropmarksep}}%
+ \pgflineto{\pgfpoint{0pt}{-\cropmarklen}}%
+ \pgfmoveto{\pgfpoint{\paperwidth+\cropmarksep}{0pt}}%
+ \pgflineto{\pgfpoint{\paperwidth+\cropmarklen}{0pt}}%
+ \pgfmoveto{\pgfpoint{\paperwidth}{-\cropmarksep}}%
+ \pgflineto{\pgfpoint{\paperwidth}{-\cropmarklen}}%
+ \pgfmoveto{\pgfpoint{-\cropmarksep}{\paperheight}}%
+ \pgflineto{\pgfpoint{-\cropmarklen}{\paperheight}}%
+ \pgfmoveto{\pgfpoint{0pt}{\paperheight+\cropmarksep}}%
+ \pgflineto{\pgfpoint{0pt}{\paperheight+\cropmarklen}}%
+ \pgfmoveto{\pgfpoint{\paperwidth}{\paperheight+\cropmarksep}}%
+ \pgflineto{\pgfpoint{\paperwidth}{\paperheight+\cropmarklen}}%
+ \pgfmoveto{\pgfpoint{\paperwidth+\cropmarksep}{\paperheight}}%
+ \pgflineto{\pgfpoint{\paperwidth+\cropmarklen}{\paperheight}}%
+ \pgfusepath{stroke}%
+ \else
+ \global\@kus@isoddtrue
+ \fi,%
+ center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight}%
+ }%
+}%
+% \end{macrocode}
+%
+% \noindent Activate the cropmark page layout.
+% \begin{macrocode}
+\pgfpagesuselayout{cropmarks}%
+%</crop>
+% \end{macrocode}
+%
+% \Finale
+\endinput
+% vim: ft=tex:sw=2:sts=2:et:nu:ai
diff --git a/template/manifest.txt b/template/manifest.txt
new file mode 100644
index 0000000..e64d4e8
--- /dev/null
+++ b/template/manifest.txt
@@ -0,0 +1,40 @@
+README
+LICENSE
+INSTALL
+INSTALL-garamond
+manifest.txt
+
+kauthesis.ins
+
+kauprotocol.dtx
+kauthesis.dtx
+kautools.dtx
+
+kaucollection.cls
+kaumasters.cls
+kaumeeting.cls
+kaunote.cls
+kaureport.cls
+
+kauclear.sty
+kauenvironments.sty
+kauhead.sty
+kaulanguage.sty
+kaulist.sty
+kaumeta.sty
+kaupaper.sty
+kauparts.sty
+kaustudies.sty
+kautitle.sty
+pgfcropmarks.sty
+
+kaucollectiontemplate.tex
+kauguide.tex
+kaumasterstemplate.tex
+kaumeetingtemplate.tex
+kaureporttemplate.tex
+
+kauguide.pdf
+kauprotocol.pdf
+kauthesis.pdf
+kautools.pdf