├── .github
└── workflows
│ ├── latex.yml
│ └── release-pdf.yml
├── .gitignore
├── LICENSE
├── MANIFEST.md
├── README.md
├── cfg-backmatter.pdf
├── cfg-frontmatter.pdf
├── chapters
└── introduction.tex
├── compileall.sh
├── images
├── cfg-icons
│ ├── CFG_civic_tech.png
│ ├── CFG_civic_tech.svg
│ ├── CFG_civic_tech_wide.png
│ ├── CFG_code-for-climate_edit.png
│ ├── CFG_code_for_climate.png
│ ├── CFG_code_for_climate.svg
│ ├── CFG_code_for_climate_edit.png
│ ├── CFG_code_wide.png
│ ├── CFG_digitales_ehrenamt.png
│ ├── CFG_digitales_ehrenamt.svg
│ ├── CFG_ehrenamtliche.png
│ ├── CFG_ehrenamtliche.svg
│ ├── CFG_ehrenamtliche_edit.png
│ ├── CFG_ehrenamtliche_edit.png.svg
│ ├── CFG_free_and_open_source_software.png
│ ├── CFG_free_and_open_source_software.svg
│ ├── CFG_labs.png
│ ├── CFG_labs.svg
│ ├── CFG_labs_edit.png
│ ├── CFG_netzwerk.png
│ ├── CFG_netzwerk.svg
│ ├── CFG_netzwerk_edit.png
│ ├── CFG_okologische_nachhaltigkeit.png
│ ├── CFG_okologische_nachhaltigkeit.svg
│ ├── CFG_open_data.png
│ ├── CFG_open_data.svg
│ ├── CFG_open_data_edit.png
│ ├── CFG_open_goverment.png
│ ├── CFG_open_goverment.svg
│ ├── CFG_open_government_wide.png
│ ├── CFG_projekte.png
│ ├── CFG_projekte.svg
│ ├── CFG_projekte_edit.png
│ ├── icon-touch.png
│ └── icon-touch.svg
└── monalisa.png
├── kaobook.cls
├── main.tex
└── styles
├── environments.sty
├── kao.sty
├── kaobiblio.sty
├── kaorefs.sty
├── mdftheorems.sty
├── packages.sty
└── plaintheorems.sty
/.github/workflows/latex.yml:
--------------------------------------------------------------------------------
1 | name: latex
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 | pull_request:
7 | branches: [ main ]
8 |
9 | jobs:
10 | build:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: actions/checkout@v2
14 |
15 | - uses: xu-cheng/texlive-action/full@v1
16 | with:
17 | run: |
18 | export DOCUMENT_VERSION="prerelease-${GITHUB_REF##*/}-$(date -Iseconds)"
19 | ./compileall.sh
20 |
21 | - uses: actions/upload-artifact@v2
22 | with:
23 | name: rendered pdf
24 | path: main.pdf
25 |
--------------------------------------------------------------------------------
/.github/workflows/release-pdf.yml:
--------------------------------------------------------------------------------
1 | name: release pdf
2 |
3 | on:
4 | push:
5 | tags:
6 | - 'v[0-9]+.[0-9]+.[0-9]+' # Push events to matching semver with v prefix
7 |
8 | jobs:
9 | build:
10 | name: Upload built hackathon leitfaden pdf
11 | runs-on: ubuntu-latest
12 | steps:
13 | - name: Checkout code
14 | uses: actions/checkout@v2
15 |
16 | - name: Gather information
17 | id: info
18 | run: |
19 | tag_name="${GITHUB_REF##*/}"
20 | filename="hackathon-leitfaden-${tag_name}.pdf"
21 | echo "##[set-output name=tag_name;]${tag_name}"
22 | echo "##[set-output name=filename;]${filename}"
23 |
24 | - uses: xu-cheng/texlive-action/full@v1
25 | with:
26 | run: |
27 | export DOCUMENT_VERSION="${{ steps.info.outputs.tag_name }}"
28 | ./compileall.sh
29 | mv main.pdf "${{ steps.info.outputs.filename }}"
30 |
31 | - name: Create Release
32 | id: create_release
33 | uses: actions/create-release@v1
34 | env:
35 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 | with:
37 | tag_name: ${{ github.ref }}
38 | release_name: Hackathon Leitfaden ${{ steps.info.outputs.tag_name }}
39 | draft: false
40 | prerelease: false
41 |
42 | - name: Upload Release Asset
43 | id: upload-release-asset
44 | uses: actions/upload-release-asset@v1
45 | env:
46 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47 | with:
48 | upload_url: ${{ steps.create_release.outputs.upload_url }}
49 | asset_path: ./${{ steps.info.outputs.filename }}
50 | asset_name: ${{ steps.info.outputs.filename }}
51 | asset_content_type: application/pdf
52 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Project specific files
2 | version.tex
3 |
4 | ## Core latex/pdflatex auxiliary files:
5 | *.aux
6 | *.lof
7 | *.log
8 | *.lot
9 | *.fls
10 | *.out
11 | *.toc
12 | *.fmt
13 | *.fot
14 | *.cb
15 | *.cb2
16 | .*.lb
17 |
18 | ## Intermediate documents:
19 | *.dvi
20 | *.xdv
21 | *-converted-to.*
22 | # these rules might exclude image files for figures etc.
23 | # *.ps
24 | # *.eps
25 | # *.pdf
26 |
27 | ## Generated if empty string is given at "Please type another file name for output:"
28 | .pdf
29 |
30 | ## Bibliography auxiliary files (bibtex/biblatex/biber):
31 | *.bbl
32 | *.bcf
33 | *.blg
34 | *-blx.aux
35 | *-blx.bib
36 | *.run.xml
37 |
38 | ## Build tool auxiliary files:
39 | *.fdb_latexmk
40 | *.synctex
41 | *.synctex(busy)
42 | *.synctex.gz
43 | *.synctex.gz(busy)
44 | *.pdfsync
45 |
46 | ## Build tool directories for auxiliary files
47 | # latexrun
48 | latex.out/
49 |
50 | ## Auxiliary and intermediate files from other packages:
51 | # algorithms
52 | *.alg
53 | *.loa
54 |
55 | # achemso
56 | acs-*.bib
57 |
58 | # amsthm
59 | *.thm
60 |
61 | # beamer
62 | *.nav
63 | *.pre
64 | *.snm
65 | *.vrb
66 |
67 | # changes
68 | *.soc
69 |
70 | # comment
71 | *.cut
72 |
73 | # cprotect
74 | *.cpt
75 |
76 | # elsarticle (documentclass of Elsevier journals)
77 | *.spl
78 |
79 | # endnotes
80 | *.ent
81 |
82 | # fixme
83 | *.lox
84 |
85 | # feynmf/feynmp
86 | *.mf
87 | *.mp
88 | *.t[1-9]
89 | *.t[1-9][0-9]
90 | *.tfm
91 |
92 | #(r)(e)ledmac/(r)(e)ledpar
93 | *.end
94 | *.?end
95 | *.[1-9]
96 | *.[1-9][0-9]
97 | *.[1-9][0-9][0-9]
98 | *.[1-9]R
99 | *.[1-9][0-9]R
100 | *.[1-9][0-9][0-9]R
101 | *.eledsec[1-9]
102 | *.eledsec[1-9]R
103 | *.eledsec[1-9][0-9]
104 | *.eledsec[1-9][0-9]R
105 | *.eledsec[1-9][0-9][0-9]
106 | *.eledsec[1-9][0-9][0-9]R
107 |
108 | # glossaries
109 | *.acn
110 | *.acr
111 | *.glg
112 | *.glo
113 | *.gls
114 | *.glsdefs
115 | *.lzo
116 | *.lzs
117 |
118 | # uncomment this for glossaries-extra (will ignore makeindex's style files!)
119 | # *.ist
120 |
121 | # gnuplottex
122 | *-gnuplottex-*
123 |
124 | # gregoriotex
125 | *.gaux
126 | *.gtex
127 |
128 | # htlatex
129 | *.4ct
130 | *.4tc
131 | *.idv
132 | *.lg
133 | *.trc
134 | *.xref
135 |
136 | # hyperref
137 | *.brf
138 |
139 | # knitr
140 | *-concordance.tex
141 | # TODO Comment the next line if you want to keep your tikz graphics files
142 | *.tikz
143 | *-tikzDictionary
144 |
145 | # listings
146 | *.lol
147 |
148 | # luatexja-ruby
149 | *.ltjruby
150 |
151 | # makeidx
152 | *.idx
153 | *.ilg
154 | *.ind
155 |
156 | # minitoc
157 | *.maf
158 | *.mlf
159 | *.mlt
160 | *.mtc[0-9]*
161 | *.slf[0-9]*
162 | *.slt[0-9]*
163 | *.stc[0-9]*
164 |
165 | # minted
166 | _minted*
167 | *.pyg
168 |
169 | # morewrites
170 | *.mw
171 |
172 | # nomencl
173 | *.nlg
174 | *.nlo
175 | *.nls
176 |
177 | # pax
178 | *.pax
179 |
180 | # pdfpcnotes
181 | *.pdfpc
182 |
183 | # sagetex
184 | *.sagetex.sage
185 | *.sagetex.py
186 | *.sagetex.scmd
187 |
188 | # scrwfile
189 | *.wrt
190 |
191 | # sympy
192 | *.sout
193 | *.sympy
194 | sympy-plots-for-*.tex/
195 |
196 | # pdfcomment
197 | *.upa
198 | *.upb
199 |
200 | # pythontex
201 | *.pytxcode
202 | pythontex-files-*/
203 |
204 | # tcolorbox
205 | *.listing
206 |
207 | # thmtools
208 | *.loe
209 |
210 | # TikZ & PGF
211 | *.dpth
212 | *.md5
213 | *.auxlock
214 |
215 | # todonotes
216 | *.tdo
217 |
218 | # vhistory
219 | *.hst
220 | *.ver
221 |
222 | # easy-todo
223 | *.lod
224 |
225 | # xcolor
226 | *.xcp
227 |
228 | # xmpincl
229 | *.xmpi
230 |
231 | # xindy
232 | *.xdy
233 |
234 | # xypic precompiled matrices and outlines
235 | *.xyc
236 | *.xyd
237 |
238 | # endfloat
239 | *.ttt
240 | *.fff
241 |
242 | # Latexian
243 | TSWLatexianTemp*
244 |
245 | ## Editors:
246 | # WinEdt
247 | *.bak
248 | *.sav
249 |
250 | # Texpad
251 | .texpadtmp
252 |
253 | # LyX
254 | *.lyx~
255 |
256 | # Kile
257 | *.backup
258 |
259 | # gummi
260 | .*.swp
261 |
262 | # KBibTeX
263 | *~[0-9]*
264 |
265 | # TeXnicCenter
266 | *.tps
267 |
268 | # auto folder when using emacs and auctex
269 | ./auto/*
270 | *.el
271 |
272 | # expex forward references with \gathertags
273 | *-tags.tex
274 |
275 | # standalone packages
276 | *.sta
277 |
278 | # Makeindex log files
279 | *.lpz
280 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Creative Commons Legal Code
2 |
3 | CC0 1.0 Universal
4 |
5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12 | HEREUNDER.
13 |
14 | Statement of Purpose
15 |
16 | The laws of most jurisdictions throughout the world automatically confer
17 | exclusive Copyright and Related Rights (defined below) upon the creator
18 | and subsequent owner(s) (each and all, an "owner") of an original work of
19 | authorship and/or a database (each, a "Work").
20 |
21 | Certain owners wish to permanently relinquish those rights to a Work for
22 | the purpose of contributing to a commons of creative, cultural and
23 | scientific works ("Commons") that the public can reliably and without fear
24 | of later claims of infringement build upon, modify, incorporate in other
25 | works, reuse and redistribute as freely as possible in any form whatsoever
26 | and for any purposes, including without limitation commercial purposes.
27 | These owners may contribute to the Commons to promote the ideal of a free
28 | culture and the further production of creative, cultural and scientific
29 | works, or to gain reputation or greater distribution for their Work in
30 | part through the use and efforts of others.
31 |
32 | For these and/or other purposes and motivations, and without any
33 | expectation of additional consideration or compensation, the person
34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35 | is an owner of Copyright and Related Rights in the Work, voluntarily
36 | elects to apply CC0 to the Work and publicly distribute the Work under its
37 | terms, with knowledge of his or her Copyright and Related Rights in the
38 | Work and the meaning and intended legal effect of CC0 on those rights.
39 |
40 | 1. Copyright and Related Rights. A Work made available under CC0 may be
41 | protected by copyright and related or neighboring rights ("Copyright and
42 | Related Rights"). Copyright and Related Rights include, but are not
43 | limited to, the following:
44 |
45 | i. the right to reproduce, adapt, distribute, perform, display,
46 | communicate, and translate a Work;
47 | ii. moral rights retained by the original author(s) and/or performer(s);
48 | iii. publicity and privacy rights pertaining to a person's image or
49 | likeness depicted in a Work;
50 | iv. rights protecting against unfair competition in regards to a Work,
51 | subject to the limitations in paragraph 4(a), below;
52 | v. rights protecting the extraction, dissemination, use and reuse of data
53 | in a Work;
54 | vi. database rights (such as those arising under Directive 96/9/EC of the
55 | European Parliament and of the Council of 11 March 1996 on the legal
56 | protection of databases, and under any national implementation
57 | thereof, including any amended or successor version of such
58 | directive); and
59 | vii. other similar, equivalent or corresponding rights throughout the
60 | world based on applicable law or treaty, and any national
61 | implementations thereof.
62 |
63 | 2. Waiver. To the greatest extent permitted by, but not in contravention
64 | of, applicable law, Affirmer hereby overtly, fully, permanently,
65 | irrevocably and unconditionally waives, abandons, and surrenders all of
66 | Affirmer's Copyright and Related Rights and associated claims and causes
67 | of action, whether now known or unknown (including existing as well as
68 | future claims and causes of action), in the Work (i) in all territories
69 | worldwide, (ii) for the maximum duration provided by applicable law or
70 | treaty (including future time extensions), (iii) in any current or future
71 | medium and for any number of copies, and (iv) for any purpose whatsoever,
72 | including without limitation commercial, advertising or promotional
73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74 | member of the public at large and to the detriment of Affirmer's heirs and
75 | successors, fully intending that such Waiver shall not be subject to
76 | revocation, rescission, cancellation, termination, or any other legal or
77 | equitable action to disrupt the quiet enjoyment of the Work by the public
78 | as contemplated by Affirmer's express Statement of Purpose.
79 |
80 | 3. Public License Fallback. Should any part of the Waiver for any reason
81 | be judged legally invalid or ineffective under applicable law, then the
82 | Waiver shall be preserved to the maximum extent permitted taking into
83 | account Affirmer's express Statement of Purpose. In addition, to the
84 | extent the Waiver is so judged Affirmer hereby grants to each affected
85 | person a royalty-free, non transferable, non sublicensable, non exclusive,
86 | irrevocable and unconditional license to exercise Affirmer's Copyright and
87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the
88 | maximum duration provided by applicable law or treaty (including future
89 | time extensions), (iii) in any current or future medium and for any number
90 | of copies, and (iv) for any purpose whatsoever, including without
91 | limitation commercial, advertising or promotional purposes (the
92 | "License"). The License shall be deemed effective as of the date CC0 was
93 | applied by Affirmer to the Work. Should any part of the License for any
94 | reason be judged legally invalid or ineffective under applicable law, such
95 | partial invalidity or ineffectiveness shall not invalidate the remainder
96 | of the License, and in such case Affirmer hereby affirms that he or she
97 | will not (i) exercise any of his or her remaining Copyright and Related
98 | Rights in the Work or (ii) assert any associated claims and causes of
99 | action with respect to the Work, in either case contrary to Affirmer's
100 | express Statement of Purpose.
101 |
102 | 4. Limitations and Disclaimers.
103 |
104 | a. No trademark or patent rights held by Affirmer are waived, abandoned,
105 | surrendered, licensed or otherwise affected by this document.
106 | b. Affirmer offers the Work as-is and makes no representations or
107 | warranties of any kind concerning the Work, express, implied,
108 | statutory or otherwise, including without limitation warranties of
109 | title, merchantability, fitness for a particular purpose, non
110 | infringement, or the absence of latent or other defects, accuracy, or
111 | the present or absence of errors, whether or not discoverable, all to
112 | the greatest extent permissible under applicable law.
113 | c. Affirmer disclaims responsibility for clearing rights of other persons
114 | that may apply to the Work or any use thereof, including without
115 | limitation any person's Copyright and Related Rights in the Work.
116 | Further, Affirmer disclaims responsibility for obtaining any necessary
117 | consents, permissions or other rights required for any use of the
118 | Work.
119 | d. Affirmer understands and acknowledges that Creative Commons is not a
120 | party to this document and has no duty or obligation with respect to
121 | this CC0 or use of the Work.
122 |
--------------------------------------------------------------------------------
/MANIFEST.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | # First Work: The kaobook Class
4 |
5 | MANIFEST.md
6 | Copyright 2020 Federico Marotta
7 |
8 | This work may be distributed and/or modified under the
9 | conditions of the LaTeX Project Public License, either version 1.3
10 | of this license or (at your option) any later version.
11 | The latest version of this license is in
12 |
13 | http://www.latex-project.org/lppl.txt
14 |
15 | and version 1.3 or later is part of all distributions of LaTeX
16 | version 2005/12/01 or later.
17 |
18 | This work has the LPPL maintenance status `maintained'.
19 |
20 | The Current Maintainer of this work is Federico Marotta.
21 |
22 | This work consists of all files listed below.
23 |
24 | ---
25 |
26 | ```
27 | kaobook/
28 | |-- kaobook.cls - main class file
29 | |-- styles/
30 | |-- environments.sty - definitions for environments
31 | |-- mdftheorems.sty - colorful styling of theorems
32 | |-- packages.sty - useful packages
33 | |-- plaintheorems.sty - minimalistic styling of theorems
34 | |-- references.sty - commands for referencing
35 | |-- style.sty - page design
36 | ```
37 |
38 | ---
39 |
40 | # Second Work: Example and Documentation of the kaobook Class
41 |
42 | This work is released into the public domain using the CC0 code. To the
43 | extent possible under law, I waive all copyright and related or
44 | neighbouring rights to this work. To view a copy of the CC0 code, visit:
45 |
46 | http://creativecommons.org/publicdomain/zero/1.0
47 |
48 | This work consists of all files listed below.
49 |
50 | ---
51 |
52 | ```
53 | kaobook/
54 | |-- main.tex
55 | |-- main.bib
56 | |-- chapters/
57 | |-- appendix.tex
58 | |-- figsntabs.tex
59 | |-- introduction.tex
60 | |-- layout.tex
61 | |-- mathematics.tex
62 | |-- options.tex
63 | |-- preface.tex
64 | |-- references.tex
65 | |-- textnotes.tex
66 | ```
67 |
68 | As regards the files in the kaobook/images directory, they were
69 | downloaded from [Wikimedia
70 | Commons](https://commons.wikimedia.org/wiki/Main_Page) and are
71 | attributed inside the example book where they are used.
72 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # How to Hackathon. Wann und wie Hackathons kommunalen Verwaltungen helfen können.
2 |
3 | Während der Ausbreitung des Corona-Virus ab März 2020 hat das Hackathon-Format neue Aufmerksamkeit gewonnen. Tatsächlich gibt es die Idee, dass sich Entwickler:innen zusammensetzen und gemeinsam coden, schon seit mehr als 20 Jahren. In den letzten Jahren gewinnt das Format des Hackathons allerdings immer mehr Aufmerksamkeit, weil es die Hoffnung auf schnelle Lösungen für große Probleme weckt.
4 |
5 | Deshalb haben wir als Code-for-Germany-Netzwerk unsere Erfahrungen und Erkenntnisse zu Hackathons zusammengetragen und in diesem GitHub-Repo zusammengestellt.
6 |
7 | Die jeweils aktuellste Version kann [hier](https://github.com/okfde/hackathon-leitfaden/releases/latest) unter "Assets" heruntergeladen werden.
8 |
9 | ## Struktur
10 |
11 | Die Struktur des Quellcodes ist technisch noch etwas unsauber, basiert auf dem kaobook-Template für LaTeX. Der Text ist bisher in den beiden Dateien _main.tex_ und _chapters/introduction.tex_ zu finden. Langfristig soll das umgebaut werden in eine einfacher handhabbare Markdown-Datei, die dann durch Templates in jeweils ein PDF- und HTML-Dokument gerendert wird.
12 |
13 | Trotzdem freuen wir uns auch jetzt schon über Pull Requests oder Issues, um das Dokument stetig zu verbessern.
14 |
15 | ## Lizenz
16 |
17 | Der Text des Leitfadens ist unter der [Creative Commons Zero v1.0 Universal](https://github.com/okfde/hackathon-leitfaden/blob/main/LICENSE) lizensiert.
18 |
19 | ## Veröffentlichungen (Releases)
20 |
21 | Veröffentlichungen dieses Leitfadens werden automatisiert über GitHub Actions erstellt und sind hier verfügbar: [https://github.com/okfde/hackathon-leitfaden/releases](https://github.com/okfde/hackathon-leitfaden/releases).
22 |
23 | ### Neue Veröffentlichungen erstellen
24 |
25 | Veröffentlichungen sind nach dem [Semantic Versioning](https://semver.org/lang/de/) Schema versioniert. Um eine neue Version zu veröffentlichen, muss die vorherige Version erhöht werden.
26 |
27 | Dabei gilt grob (mehr Details in [Semantic Versioning](https://semver.org/lang/de/)):
28 |
29 | - Die erste Zahl (von links) bezeichnet die Hauptversion. Dies sind Veröffentlichungen mit großen inhaltlichen Änderungen
30 | - Die mittlere Zahl bezeichnet eine Nebenversion. Diese enthalten meist kleinere inhaltliche Änderungen
31 | - Die letzte Zahl bezeichnet Korrekturversionen. Diese enthalten meist Korrekturen von Schreib- oder Grafikfehlern.
32 |
33 | Versionen hier beginnen mit einem `v`.
34 |
35 | Im folgenden wird die neue Version mit `vX.Y.Z` bezeichnet.
36 |
37 | ```bash
38 | git tag vX.Y.Z
39 | git push origin vX.Y.Z
40 | ```
41 |
--------------------------------------------------------------------------------
/cfg-backmatter.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/cfg-backmatter.pdf
--------------------------------------------------------------------------------
/cfg-frontmatter.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/cfg-frontmatter.pdf
--------------------------------------------------------------------------------
/chapters/introduction.tex:
--------------------------------------------------------------------------------
1 | % \%setchapterpreamble[u]{\margintoc}
2 | %\chapter{Einleitung}
3 | %\labch{intro}
4 |
5 |
6 | % \setchapterimage[6cm]{donut.jpg}
7 | \setchapterpreamble[u]{\margintoc}
8 | \chapter{Einleitung}
9 | \labch{layout}
10 |
11 |
12 | Während der Ausbreitung des Corona-Virus ab März 2020 hat das Ha\-cka\-thon-Format neue Aufmerksamkeit gewonnen. Tatsächlich gibt es die Idee, dass sich Entwickler:innen zusammensetzen und gemeinsam coden, schon seit mehr als 20 Jahren.\footnote{https://www.openbsd.org/hackathons.html} In den letzten Jahren gewinnt das Format des Hackathons allerdings immer mehr Aufmerksamkeit, weil es die Hoffnung auf schnelle Lösungen für große Probleme weckt.
13 |
14 | Zum Teil versprechen hier auch kommerzielle Veranstaltungsfirmen ein „von der Stange“ ausrollbares Format und sorgten so für die Verbreitung eines angeblichen Standard-Vorgehens, das wenig zu den tatsächlich vorhandenen Problemen beitragen kann.
15 |
16 | \section*{Prozesse statt Produkte}
17 |
18 | In der Praxis zeigt sich allerdings immer wieder, dass es weniger um die Prototypen als viel mehr Erkenntnisse auf einer strukturellen Ebene geht: Welche Daten, aber auch welche Prozesse werden benötigt, um die vorgebrachten Ideen wirklich auch vorantreiben zu können?
19 |
20 | \begin{marginfigure}[-0.5cm]
21 | \includegraphics[width=60mm,scale=0.5]{cfg-icons/CFG_ehrenamtliche_edit.png}
22 | \labfig{ehrenamtliche}
23 | \end{marginfigure}
24 |
25 | Dieser Leitfaden richtet sich an Verwaltungen und ähnliche Einrichtungen, die selbst einen Hackathon organisieren möchten. Er fasst die Erfahrungen von Akteur:innen der Civic-Tech-Community zusammen und gibt Anregungen, was ein Hackathon leisten kann – und was nicht.
26 |
27 | Dieses Dokument soll einen ersten Überblick bieten für interessierte Kommunen. Für konkrete Tipps und Hinweise, wie ein Hackathon durchgeführt werden kann, verweisen wir an dieser Stelle auf das Handbuch von Jugend hackt.\footnote{https://handbuch.jugendhackt.de/} Auch hier ist noch ein Wettbewerb beschrieben, der seit 2017 nicht mehr Teil des Formats ist. Durch den den Wegfall des Konkurrenzdrucks wird mehr Austausch unter den Jugendlichen ermöglicht. Stattdessen gibt es jetzt eine öffentliche Abschlusspräsentation ohne Bewertung.
28 |
29 | Unser Ziel ist es, ein ähnliches Handbuch für Verwaltungen zu verfassen, sobald das im Rahmen unseres ehrenamtlichen Engagements zeitlich möglich ist.
30 |
31 | \newpage
32 |
33 | \chapter{Was ist ein Hackathon?}
34 | \labsec{does}
35 |
36 | Bei einem Hackathon kommen verschiedene Menschen für einen bestimmten Zeitraum – gegebenenfalls virtuell – zusammen, um sich intensiv mit einem Themenfeld auseinanderzusetzen. Das Format kommt aus der Softwareentwicklungsszene und im Kern geht es oft darum, sich in einem beschränkten Zeitraum (meist ein Wochenende) einem bestimmten Problem zu widmen.
37 |
38 | Im ursprünglichen Sinn kann es beispielsweise darum gehen, sich auf vielfältige Weise mit einer neuen Programmiersprache oder einer bestimmten Technologie zu beschäftigen. Genauso kann es aber möglich sein, Ideen zu einem bestimmten Themen- oder Problemfeld zu durchdenken und im gesetzten Zeitrahmen einen – meist technischen – Lösungsvorschlag für ein Problem als Konzeptprototypen zu finden und vorstellbar zu machen.
39 |
40 | % \marginnote[2mm]{The audacious users might feel tempted to edit some of these packages. I'd be immensely happy if they sent me examples of what they have been able to do!}
41 |
42 | \section*{Mehr als nur ein Prototyp}
43 |
44 | Tatsächlich hat sich in der Praxis allerdings herausgestellt, dass positive Ergebnisse eines solchen Formats häufig nicht unbedingt in der Entwicklung eines technischen Prototypen liegen, sondern viel weitreichendere Fortschritte erzielt werden können.
45 |
46 | Die Empfehlungen in diesem Leitfaden zielen auf kommunale und andere öffentliche Institutionen ab. Hackathons im wirtschaftlichen Zusammenhang haben in der Regel etwas andere Schwerpunkte.
47 |
48 | \begin{marginfigure}[-10.5cm]
49 | \includegraphics[width=60mm,scale=0.5]{cfg-icons/CFG_netzwerk_edit.png}
50 | \labfig{netzwerk}
51 | \end{marginfigure}
52 |
53 | Hackathons eignen sich hervorragend, um
54 |
55 | \begin{itemize}
56 | \item \textbf{persönliche Beziehungen aufzubauen}, \newline beispielsweise von der Verwaltung zur lokalen Gruppe von Aktiven im Civic-Tech-Bereich – und den verschiedenen Gruppen untereinander.
57 | \vspace{0.5cm}
58 | \item \textbf{interessierte Menschen zusammenzubringen} \newline und so nicht nur persönliche Vernetzung vor Ort, sondern auch Wissensaustausch zu ermöglichen. Hier ist insbesondere die Vernetzung von Verwaltungsbeschäftigten mit den Teilnehmenden zu nennen, aber auch untereinander. Nicht selten treffen in der Vorbereitung und Durchführung solch einer Veranstaltung erstmals Personen aufeinander, die jeweils gegenseitig einen Nutzen aus der freien Verfügbarkeit von Daten der jeweils anderen Partei ziehen könnten.
59 | \vspace{0.5cm}
60 | \item \textbf{Bestehende Ansatzpunkte und Systeme zu identifizieren}, \newline die lokal in der Verwaltung umgesetzt werden können. Häufig muss hierfür nichts Neues erfunden oder gebaut werden, sondern es geht um die Anpassung und den Betrieb bereits bestehender und gut funktionierender Systeme. Während der Corona-Pandemie haben beispielsweise die Berliner Bäder begonnen, ihre Schwimmzeiten über das Open-Source-Ti\-cket\-verkauf\-ssystem \textit{pretix} zu vergeben. Dieses System hatte sich Jahre zuvor insbesondere im Veranstaltungsbereich bewährt.
61 | \vspace{0.5cm}
62 | \item \textbf{Schwachstellen der kommunalen IT-Struktur erkennen}, \newline an denen die Umsetzung solcher Ideen bislang scheitert. Beim beschriebenen \textit{pretix}-System beispielsweise: Was hindert die lokale Verwaltung bislang, dieses System für eigene Zwecke zu installieren und zu betreiben? Ansatzpunkt kann aber auch sein, niederschwellig zugängliche Infrastruktur zu identifizieren – analog z.B. zu Bibliotheken – die es der Zivilgesellschaft ermöglichen würde, die vorgestellten Ideen auch außerhalb eines solchen Formats das ganze Jahr über voranzutreiben.
63 | \end{itemize}
64 |
65 |
66 | \section*{Ein Format – viele Möglichkeiten}
67 |
68 | In den meisten Fällen dauert ein Hackathon zwei oder drei Tage. In dieser Zeit wird häufig in festen Teams gearbeitet – mindestens genauso wichtig ist allerdings die Zeit am Buffet, in kurzen Input-Präsentationen zwischendurch oder in Workshops, bei den die Teilnehmenden neue Techniken erproben oder Fertigkeiten erlernen können.
69 |
70 | \begin{marginfigure}[-0.5cm]
71 | \includegraphics[width=60mm,scale=0.5]{cfg-icons/CFG_projekte_edit.png}
72 | \labfig{projekte}
73 | \end{marginfigure}
74 |
75 | Das Format kann aber auch über längere Zeiträume betrieben werden. Dies kann in bestimmten Fällen vorteilhaft sein, beispielsweise bei internationaler Zusammenarbeit, oder wenn eine Recherche- oder Einarbeitungsphase sinnvoll ist. Der Kulturhackathon \textit{Coding da Vinci} ist beispielsweise in zwei Veranstaltungsblöcke mit einer dazwischen liegenden, mehrere Wochen dauernden Umsetzungsphase aufgeteilt.
76 |
77 | Genauso gibt es Hackathons, die nur einen Tag dauern und wo sich überwiegend Menschen treffen, die sich bereits kennen, um gemeinsam fokussiert an einem Ziel zu arbeiten – beispielsweise an einem Leitfaden wie diesem.
78 |
79 | Während vor dem Ausbruch der Corona-Pandemie die meisten Hackathons vor Ort stattfanden, übertrugen immer mehr Organisator*innen ihre Konzepte in Online-Veranstaltungen. Auch Kombinationen aus beiden Formaten wurden erprobt.
80 |
81 | Gleichzeitig haben immer mehr Branchen das Hackathon-Format für sich entdeckt.
82 |
83 |
84 |
85 |
86 | \begin{kaobox}
87 | Grundsätzlich gilt: Ein Hackathon ist immer, was man daraus macht. \textit{\textbf{Den}} Hackathon gibt es nicht.
88 | \end{kaobox}
89 |
90 | Allerdings gibt es viele falsche Vorstellungen davon, welche Ergebnisse ein Hackathon liefern kann und sollte. Mit den gängigsten Vorurteilen räumt der nächste Abschnitt auf.
91 |
92 | \vspace{8cm}
93 | \begin{figure*}[h!]
94 | \includegraphics[width=16cm,scale=0.5]{cfg-icons/CFG_code_wide.png}
95 | \end{figure*}
96 |
97 | \chapter{Was ein Hackathon nicht leisten kann}
98 |
99 | Bei der Bewerbung von Hackathons wird häufig das Ziel propagiert, Prototypen oder noch besser fertige Produkte und lauffähige Softwaresysteme zu erstellen. Die Praxis zeigt jedoch: Für viele der vorgestellten Ideen gibt es bereits vorhandene Ansätze oder gar funktionierende Systeme – teilweise sogar in besseren Versionen, weil sie bereits seit längerem entwickelt werden.
100 |
101 | In der Kürze der Zeit ist es auch für eine ausgebildete Fachjury nur schwer möglich, die Qualität und vor allem die Wirksamkeit der präsentierten „Produkte“ angemessen abzuschätzen. Insbesondere wenn ein Preisgeld ausgelobt wird, können Teilnehmende motiviert sein, mehr an der abschließenden Präsentation für eine gute Jurybewertung zu arbeiten, statt inhaltlich aktiv zu werden. So können am Ende nicht nur die Teilnehmenden frustriert sein, sondern auch die Organisator:innen, wenn sie unter Zeitdruck Projekte bewerten müssen und erst im Nachhinein feststellen, dass sie eine bessere Wahl hätten treffen können.
102 |
103 | \section*{Wettbewerb als Innovationshemmnis}
104 |
105 | Außerdem motiviert ein Wettbewerbs-Charakter dazu, dass die Teilnehmenden in künstlich abgegrenzten Teams gegen- statt miteinander arbeiten.
106 |
107 | Manchmal bringen Teilnehmende bereits vorbereitete eigene Lösungen oder von ihnen kommerziell vertriebene Produkte zur Veranstaltung, um dafür oder für andere eigene Inhalte Werbung zu machen. Das ist nicht immer im Sinne der ausrichtenden Institution und führt zumindest in einer Wettbewerb-Konstellation durch die geleistete Vorarbeit zu Verzerrungen.
108 |
109 | An welcher Stelle ein Wettbewerb sinnvoll wäre, muss natürlich im Einzelfall enschieden werden. Auch wenn Konkurrenz bekanntlich „das Geschäft belebt“, können darunter wertvolle Kollaboration und der Beziehungsaufbau während des Hackathons, aber auch besonders die Offenheit und die Weiterverwendbarkeit der Ergebnisse leiden.
110 |
111 |
112 | \begin{marginfigure}[-16.5cm]
113 | \includegraphics[width=60mm,scale=0.5]{cfg-icons/CFG_labs_edit.png}
114 | \end{marginfigure}
115 |
116 |
117 | \section*{Lücken finden und schließen}
118 |
119 | Geht es also darum, ein ganz konkretes Problem zu lösen, sollten eine gründliche Recherche betrieben und mögliche bereits existierende Lösungsansätze auf anderen Wegen gesucht werden. Bei einem Hackathon können allerdings genausogut neue Impulse entstehen, oder eine Vorstellung, wo man nach weiteren Lösungen suchen könnte. Die Erwartung der fertig konzeptionierten, weltbewegenden neuen Idee wird jedenfalls sehr selten erfüllt.
120 |
121 | \begin{kaobox}
122 | Die größten Probleme lassen sich nicht durch Prototypen lösen. Prototypen können aber helfen, anschaulich zu machen, wie man von einer Erkenntnis zur Umsetzung kommt.
123 | \end{kaobox}
124 |
125 | Denn häufig liegt das Problem gar nicht in fehlenden Lösungen, sondern in der fehlenden Umsetzung durch die öffentliche Hand selbst – etwa, weil es an IT-Infrastruktur wie Administrator:innen, Servern oder Schnittstellen mangelt oder die nötige Datenbasis nicht vorhanden ist.
126 |
127 | Deshalb kann es sinnvoll sein, statt einem reinen Hackathon ein Barcamp zu veranstalten. Dort muss dann nicht zwangsläufig ein Prototyp entwickelt werden, sondern Vernetzung und Austausch stehen im Vordergrund. Auch hierbei bringen die Teilnehmenden Themen und Ideen ein und können Zeitslots gestalten, in denen sie ihr eigenes Wissen weitergeben oder zur Diskussion einladen.
128 |
129 | \begin{marginfigure}[-6.5cm]
130 | \includegraphics[width=60mm,scale=0.5]{cfg-icons/CFG_code_for_climate_edit.png}
131 | \labfig{codeforclimate}
132 | \end{marginfigure}
133 |
134 |
135 | \section*{Technische Lösungen für soziale Probleme}
136 |
137 | Viele Hackathons gehen davon aus, dass am Ende ein Prototyp für ein technisches Produkt steht. Vielfach übersehen wird dabei jedoch, wie sich dieses Produkt in ein komplexes soziales System einfügt und welche unerwarteten und unerwünschten Seiteneffekte damit einhergehen können.
138 |
139 | Ganz plakativ gesagt: Keine App wird Hunger beenden, Wohnungslosigkeit lösen, Rassismus beenden oder die Verkehrswende herbeiführen. Im Gegenteil kann die Annahme, dass komplexe soziale Probleme einfach durch technische Produkte gelöst werden können, zu weiteren Problemen führen.
140 |
141 | Die Teilnehmenden eines Hackathons sind häufig mehrheitlich mehrfach priviligiert. Sie sind in der Regel vorwiegend weiß und männlich, haben guten Zugang zu Bildung, finanziellen Mitteln und damit auch zu Technologie. Wer ein Wochenende bei einem Hackathon verbringen kann, muss nicht alleine ein Kind oder Angehörige pflegen, kann sich gegebenenfalls Reise und Unterkunft leisten und ist nicht darauf angewiesen, während des Veranstaltungszeitraums Lohnarbeit zu leisten.
142 |
143 | Lösungsvorschläge werden dementsprechend häufig aus Sicht dieser Gruppe konzipiert und formuliert. Seiteneffekte auf marginalisierte Gruppen oder auch spezifische Probleme marginalisierter Gruppen finden dabei häufig keinerlei Beachtung. Ein so entwickeltes Werkzeug kann somit bestehende Klüfte zwischen gesellschaftlichen Gruppen noch weiter verschärfen.
144 |
145 | \begin{kaobox}
146 | In der Civic-Tech-Entwicklung wird als Beispiel hier die Anwendung StreetBump genannt. Ziel der Smartphone-App war es, durch den eingebauten Beschleunigungssensor während der Autofahrt Schlaglöcher in Straßen zu erkennen und diese dem Bauhof zur baldigen Ausbesserung zu melden.
147 |
148 | Kritiker:innen merkten an, dass somit Schlaglöcher vor allem dort gemeldet wurden, wo die Bewohner:innen sowohl aktuelle Smartphones besaßen als auch mit einem eigenen PKW fuhren. Im Zweifel wurden so die bestehenden Kapazitäten zugunsten dieser Quartiere mit ohnehin privilegierten Bewohner:innen priorisiert.
149 |
150 | Typische weitere Beispiele aus dem Alltag sind automatische Seifen- oder Desinfektionsmittelspender, die nur helle Haut erkennen; Bilderkennungsalgorithmen, die bei nicht-weißen Gesichtern versagen; Eingabeverifizierungssysteme in Formularmasken, die nur das europäische Vor- und Nachnamenssystem verstehen. Dabei ist die Reihenfolge Vor- und Nachname nicht universell, und auch „Wu“ kann ein vollständiger Nachname sein.\footnote{Siehe auch folgender Artikel: \url{https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/}}
151 | \end{kaobox}
152 |
153 |
154 | \vspace{0cm}
155 | \begin{figure*}[h!]
156 | \includegraphics[width=16cm,scale=0.5]{cfg-icons/CFG_open_government_wide.png}
157 | \end{figure*}
158 |
159 | % \setchapterimage[6cm]{donut.jpg}
160 | % \setcounter{margintocdepth}{1}
161 | % \setchapterpreamble[u]{\margintoc}
162 | \chapter{Der Hackathon als erster Schritt}
163 |
164 | Ein Hackathon als einzelne Veranstaltung wird nur höchst selten konkrete Probleme mit einem technischen Produkt lösen können. Wertvoll wird die Veranstaltung vor allem auf einer anderen Ebene: Wenn sich Menschen aus unterschiedlichen Kontexten und mit unterschiedlichen Perspektiven zusammenfinden, dann findet auch viel informeller Wissensaustausch statt.
165 |
166 | \begin{kaobox}
167 | Welche Erfahrungen hat eine Entwicklerin in einem bestimmten Datenbank-Projekt bereits gemacht und welche Fehler könnte man vermeiden? Wer hat schon einmal eine ähnliche Lösung in einem anderen Kontext gesehen? Wer kennt jemanden, der in einem bestimmten Bereich besondere Expertise hat? Das sind Fragen, die häufig gar nicht vorher formuliert werden können, sondern sich in Gesprächen ergeben.
168 | \end{kaobox}
169 |
170 | Damit tauchen auch häufig neue Fragestellungen auf, Annahmen werden plötzlich noch einmal hinterfragt und es werden Schwachstellen in bestehenden Infrastrukturen sichtbar. Beispielsweise benötigt eine App Daten, die zwar in internen Systemen vorhanden, aber nicht frei verfügbar sind. Dieses Dilemma kann in den seltensten Fällen direkt auf dem Hackathon gelöst werden – hier müssen die Mitarbeitenden die Veranstaltung dann entsprechend nachbereiten und für zukünftige Projekte die Daten zugänglich machen.
171 |
172 | \begin{marginfigure}[-5.5cm]
173 | \includegraphics[width=60mm,scale=0.5]{cfg-icons/CFG_open_data_edit.png}
174 | \end{marginfigure}
175 |
176 |
177 | Genauso bleibt im eng gesteckten Rahmen eines Hackathons häufig offen, wer eine bereits bestehende, funktionierende Lösung langfristig betreiben kann.
178 |
179 | \section*{Der Beginn einer langen Reise}
180 |
181 | Ein Hackathon ist also weniger eine Produkt-Fabrik als vielmehr ein wirkmächtiger Ausgangspunkt für einen strukturellen Wandel – allerdings natürlich nur, wenn die Organisator:innen für diese Möglichkeiten sensibilisiert und darauf vorbereitet sind, die nötigen Veränderungen umzusetzen.
182 |
183 | Wer einen Hackathon organisiert, sollte daher von Anfang an ausreichende Kapazitäten in der eigenen Organisation für die Nachbereitung der Erkenntnisse in den Monaten nach der Veranstaltung einplanen. Wie kann der Kontakt zu den Teilnehmenden oder auch anderen interessanten Partner:innen aufrechterhalten und vertieft werden? Welche Kompetenzen und welche Prozesse müssen in der Organisation aufgebaut werden? Wo fehlt es gar derzeit an Personal?
184 |
185 | Wenn dies nicht passiert, wird der Großteil des Potenzials der Veranstaltung wirkungslos verpuffen. Ein leider nicht unübliches Muster ist, dass zwar Jahr für Jahr bei wiederkehrenden Veranstaltungen jeweils neue Einzeldatensätze bereitgestellt werden, sich aber keine der Anregungen für strukturelle Verbesserungen in der Organisation von Verwaltungsstrukturen verfangen. %Im schlimmsten Fall ist dies eine Offenlegung des Umstands, dass die Verwaltung zu nachhaltigem Wandel über reine Show hinaus nicht in der Lage ist.
186 | Bei Folgeveranstaltungen kann das Ausbleiben eines nachaltigen Wandels dazu führen, dass die Teilnehmenden ausbleiben, weil sie ihre Bemühungen nicht als sinnhaft erleben und sich schlimmstenfalls nicht gehört oder ernst genommen fühlen.
187 |
188 | Gelingt es den Organisator:innen allerdings, die Teilnehmenden für die eigenen Problemstellungen zu begeistern und eine Kommunikation auf Augenhöhe zu ermöglichen, kann ein Hackathon eine gute und bereichernde Möglichkeit sein, um die (digitale) Zivilgesellschaft in langfristige Wandlungsprozesse einzubeziehen.
189 |
190 |
191 | %\begin{marginfigure}[-5.5cm]
192 | % \includegraphics[width=35mm,scale=0.5]{cfg-icons/CFG_civic_tech.png}
193 | %\end{marginfigure}
194 |
195 | \vspace{6cm}
196 | \begin{figure*}[h!]
197 | \includegraphics[width=14cm,scale=0.5]{cfg-icons/CFG_civic_tech_wide.png}
198 | \end{figure*}
199 |
200 |
201 | % \marginnote[2mm]{The audacious users might feel tempted to edit some of these packages. I'd be immensely happy if they sent me examples of what they have been able to do!}
202 |
203 |
--------------------------------------------------------------------------------
/compileall.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # check for DOCUMENT_VERSION environment variable
4 | version=${DOCUMENT_VERSION:-}
5 | if [[ -z "$version" ]]; then
6 | echo "Couldn't find required \$DOCUMENT_VERSION environment variable"
7 | echo "exiting ..."
8 | exit 1
9 | fi
10 |
11 | # write $version to version.tex
12 | echo $version > version.tex
13 |
14 | # Compile document
15 | pdflatex -interaction=nonstopmode main.tex || true
16 |
17 | # Compile document a second time to include the table of contents
18 | pdflatex -interaction=nonstopmode main.tex || true
19 |
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_civic_tech.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_civic_tech.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_civic_tech.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_civic_tech_wide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_civic_tech_wide.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_code-for-climate_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_code-for-climate_edit.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_code_for_climate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_code_for_climate.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_code_for_climate.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_code_for_climate_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_code_for_climate_edit.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_code_wide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_code_wide.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_digitales_ehrenamt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_digitales_ehrenamt.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_digitales_ehrenamt.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_ehrenamtliche.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_ehrenamtliche.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_ehrenamtliche.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_ehrenamtliche_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_ehrenamtliche_edit.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_free_and_open_source_software.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_free_and_open_source_software.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_free_and_open_source_software.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_labs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_labs.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_labs.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_labs_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_labs_edit.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_netzwerk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_netzwerk.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_netzwerk.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_netzwerk_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_netzwerk_edit.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_okologische_nachhaltigkeit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_okologische_nachhaltigkeit.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_okologische_nachhaltigkeit.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_open_data.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_open_data.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_open_data.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_open_data_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_open_data_edit.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_open_goverment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_open_goverment.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_open_goverment.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_open_government_wide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_open_government_wide.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_projekte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_projekte.png
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_projekte.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/images/cfg-icons/CFG_projekte_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/CFG_projekte_edit.png
--------------------------------------------------------------------------------
/images/cfg-icons/icon-touch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/cfg-icons/icon-touch.png
--------------------------------------------------------------------------------
/images/cfg-icons/icon-touch.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/images/monalisa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/okfde/hackathon-leitfaden/ee58566c3dfacc73e7781c3da7f0f9c502694805/images/monalisa.png
--------------------------------------------------------------------------------
/kaobook.cls:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % kaobook
3 | % LaTeX Class
4 | % Version 1.2 (4/1/2020)
5 | %
6 | % This template originates from:
7 | % https://www.LaTeXTemplates.com
8 | %
9 | % For the latest template development version and to make contributions:
10 | % https://github.com/fmarotta/kaobook
11 | %
12 | % Authors:
13 | % Federico Marotta (federicomarotta@mail.com)
14 | % Based on the doctoral thesis of Ken Arroyo Ohori (https://3d.bk.tudelft.nl/ken/en)
15 | % and on the Tufte-LaTeX class.
16 | % Modified for LaTeX Templates by Vel (vel@latextemplates.com)
17 | %
18 | % License:
19 | % LPPL (see included MANIFEST.md file)
20 | %
21 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22 |
23 | %----------------------------------------------------------------------------------------
24 | % CLASS CONFIGURATION
25 | %----------------------------------------------------------------------------------------
26 |
27 | \NeedsTeXFormat{LaTeX2e}
28 | \ProvidesClass{kaobook}[2020/01/04 kaobook class v1.2]
29 |
30 | \newcommand{\@classname}{kaobook} % Class name
31 | \newcommand{\@baseclass}{scrbook} % Base class name
32 |
33 | % Set the default options
34 | \PassOptionsToClass{fontsize=9.5pt}{\@baseclass}
35 | \PassOptionsToClass{parskip=half}{\@baseclass}
36 | \PassOptionsToClass{headings=optiontoheadandtoc}{\@baseclass}
37 |
38 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{\@baseclass}} % Pass through any options to the base class
39 |
40 | \ProcessOptions\relax % Process the options
41 |
42 | \LoadClass{\@baseclass} % Load the base class
43 | \input{styles/kao.sty} % Load the code common to all classes
44 |
45 | %----------------------------------------------------------------------------------------
46 | % FRONT-, MAIN-, BACK- MATTERS BEHAVIOUR
47 | %----------------------------------------------------------------------------------------
48 |
49 | % Define a LaTeX length used in the page headers
50 | \newlength{\overflowingheadlen}
51 |
52 | % Front matter
53 | \let\oldfrontmatter\frontmatter % Store the old command
54 | \renewcommand{\frontmatter}{
55 | \oldfrontmatter % First of all, call the old command
56 |
57 | % Set some lengths used for the page headers
58 | \setlength{\overflowingheadlen}{\linewidth}
59 | \addtolength{\overflowingheadlen}{\marginparsep}
60 | \addtolength{\overflowingheadlen}{\marginparwidth}
61 |
62 | \pagestyle{plain.scrheadings} % Use a plain style for the header and the footer
63 | \pagelayout{wide} % Use a wide page layout
64 | % \sloppy % Uncomment to better break long lines
65 | }
66 |
67 | %------------------------------------------------
68 |
69 | % Main matter
70 | \let\oldmainmatter\mainmatter % Store the old command
71 | \renewcommand{\mainmatter}{
72 |
73 | % Add a blank page before the main matter if the front matter has an
74 | % odd number of pages
75 | \ifthispageodd{
76 | \afterpage{\blankpage}
77 | }{}
78 |
79 | \oldmainmatter % Call the old command
80 |
81 | % Set some lengths used for the page headers
82 | \setlength{\overflowingheadlen}{\linewidth}
83 | \addtolength{\overflowingheadlen}{\marginparsep}
84 | \addtolength{\overflowingheadlen}{\marginparwidth}
85 |
86 | \pagestyle{scrheadings} % Use a fancy style for the header and the footer
87 | \pagelayout{margin} % Use a 1.5 column layout
88 | }
89 |
90 | %------------------------------------------------
91 |
92 | % Appendix
93 | \let\oldappendix\appendix % Store the old command
94 | \renewcommand{\appendix}{
95 | \oldappendix % Call the old command
96 | \bookmarksetup{startatroot} % Reset the bookmark depth
97 | }
98 |
99 | %------------------------------------------------
100 |
101 | % Back matter
102 | \let\oldbackmatter\backmatter % Store the old command
103 | \renewcommand{\backmatter}{
104 | \oldbackmatter % Call the old command
105 |
106 | % Set some lengths used for the page headers
107 | \setlength{\overflowingheadlen}{\linewidth}
108 | \addtolength{\overflowingheadlen}{\marginparsep}
109 | \addtolength{\overflowingheadlen}{\marginparwidth}
110 |
111 | \bookmarksetup{startatroot} % Reset the bookmark depth
112 | \pagestyle{plain.scrheadings} % Use a plain style for the header and the footer
113 | \pagelayout{wide} % Use a wide page layout
114 | }
115 |
116 | %----------------------------------------------------------------------------------------
117 | % CHAPTER HEADING STYLES
118 | %----------------------------------------------------------------------------------------
119 |
120 | \DeclareDocumentCommand{\setchapterstyle}{m}{%
121 | \ifthenelse{\equal{plain}{#1}}{\chapterstyleplain}{}
122 | \ifthenelse{\equal{lines}{#1}}{\chapterstylelines}{}
123 | \ifthenelse{\equal{kao}{#1}}{\chapterstylekao}{}
124 | }
125 |
126 | % The default definition in KOMA script
127 | \DeclareDocumentCommand{\chapterstyleplain}{}{%
128 | \renewcommand{\chapterlinesformat}[3]{%
129 | \@hangfrom{##2}{##3}}
130 | \renewcommand*{\chapterformat}{%
131 | \mbox{\chapappifchapterprefix{\nobreakspace}\thechapter%
132 | \autodot\IfUsePrefixLine{}{\enskip}}}
133 |
134 | \RedeclareSectionCommand[beforeskip=0cm,afterskip=1cm]{chapter}
135 | \setlength{\mtocshift}{-3.2cm}
136 | }
137 |
138 | % The Kao style
139 | \DeclareDocumentCommand{\chapterstylekao}{}{%
140 | \renewcommand*{\chapterformat}{%
141 | \mbox{\chapappifchapterprefix{\nobreakspace}\scalebox{2.85}{\thechapter\autodot}}%
142 | }
143 | \renewcommand\chapterlinesformat[3]{%
144 | \vspace*{-4.5cm}%
145 | \makebox[\textwidth+\marginparsep+\marginparwidth]{%
146 | \parbox[b]{\textwidth}{\flushright{##3}}%
147 | \makebox[\marginparsep][c]{\rule[-.2cm]{1pt}{5.7cm}}%
148 | \parbox[b]{\marginparwidth}{##2}%
149 | }
150 | }
151 |
152 | \RedeclareSectionCommand[beforeskip=0cm,afterskip=1cm]{chapter}
153 | \setlength{\mtocshift}{0mm}
154 | }
155 |
156 | % Rules
157 | \renewcommand{\hrulefill}[1][0.4pt]{%
158 | \leavevmode\leaders\hrule height #1\hfill\kern\z@%
159 | }
160 | \DeclareDocumentCommand{\chapterstylelines}{}
161 | {
162 | \renewcommand*{\chapterformat}
163 | {
164 | \chapappifchapterprefix{\nobreakspace}\scalebox{3.5}{\thechapter\autodot}
165 | }
166 | \renewcommand\chapterlinesformat[3]
167 | {
168 | %\vspace*{-1cm}%
169 | \leavevmode
170 | \makebox[\textwidth+\marginparsep+\marginparwidth]{%
171 | \makebox[\textwidth][l]{\hrulefill[1pt]##2}%\hfill%\par%\bigskip
172 | \makebox[\marginparsep][l]{}%
173 | \makebox[\marginparwidth][l]{}%
174 | }\\
175 | %\vspace{.5cm}
176 | \makebox[\textwidth+\marginparsep+\marginparwidth]{%
177 | \makebox[\textwidth][l]{##3}%
178 | \makebox[\marginparsep][l]{}%
179 | \makebox[\marginparwidth][l]{}%
180 | }\\
181 | \makebox[\textwidth+\marginparsep+\marginparwidth]{%
182 | \hrulefill[1.1pt]%
183 | %\makebox[\textwidth][l]{\hrulefill}%
184 | %\makebox[\marginparsep][l]{\hrulefill}%
185 | %\makebox[\marginparwidth][l]{\hrulefill}%
186 | }
187 | }
188 |
189 | \RedeclareSectionCommand[beforeskip=0cm,afterskip=1cm]{chapter}
190 | \setlength{\mtocshift}{-2.5cm}
191 | }
192 |
193 | % Image (Used internally for \chapterimage; normal users should not need this command)
194 | \DeclareDocumentCommand{\chapterstyleimage}{}{%
195 | \renewcommand*{\chapterformat}{%
196 | \mbox{\chapappifchapterprefix{\nobreakspace}\thechapter%
197 | \autodot\IfUsePrefixLine{}{\enskip}}
198 | }
199 | \renewcommand{\chapterlinesformat}[3]{%
200 | \begin{tikzpicture}[remember picture, overlay]
201 | \node[
202 | anchor=west,
203 | xshift=-3cm,
204 | yshift=1.15cm,
205 | rectangle,
206 | fill=gray!20!white,
207 | fill opacity=0.8,
208 | inner ysep=14pt,
209 | inner xsep=3cm,
210 | text opacity=1,
211 | text width=\paperwidth+3cm, % Set text width in order to force left-alignment
212 | ]{\makebox[0pt][l]{\@hangfrom{##2}{##3}}};
213 | \node[
214 | anchor=west,
215 | xshift=-3cm,
216 | yshift=2mm,
217 | rectangle,
218 | fill=white,
219 | minimum height=.5cm,
220 | minimum width=\paperwidth+3cm,
221 | ]{};
222 | \end{tikzpicture}
223 | }
224 | }
225 |
226 | % Takes as input the image path and optionally the "beforeskip"
227 | \DeclareDocumentCommand{\setchapterimage}{O{5.5cm} m}{%
228 | \setchapterpreamble[o]{%
229 | \vspace*{-2.7cm}\hspace*{-2.5cm}%
230 | \includegraphics[width=\paperwidth,height=#1+2.7cm,keepaspectratio=false]{#2}%
231 | }%
232 | \chapterstyleimage%
233 | % beforeskip=-(figure_height-top_margin)
234 | \RedeclareSectionCommand[beforeskip=-#1, afterskip=.6cm]{chapter}%
235 | \setlength{\mtocshift}{0cm}%
236 | }
237 |
238 | % By default start with plain style
239 | \chapterstyleplain
240 |
241 | %----------------------------------------------------------------------------------------
242 | % FONTS AND STYLES
243 | %----------------------------------------------------------------------------------------
244 |
245 | % Set KOMA fonts for book-specific elements
246 | \addtokomafont{part}{\normalfont\scshape\bfseries}
247 | \addtokomafont{partentry}{\normalfont\scshape\bfseries}
248 | \addtokomafont{chapter}{\normalfont\bfseries}
249 | \addtokomafont{chapterentry}{\normalfont\bfseries}
250 |
251 | % Set KOMA fonts for elements common to all classes
252 | \addtokomafont{section}{\normalfont\bfseries}
253 | \addtokomafont{subsection}{\normalfont\bfseries}
254 | \addtokomafont{subsubsection}{\normalfont\bfseries}
255 | \addtokomafont{paragraph}{\normalfont\bfseries}
256 | \setkomafont{descriptionlabel}{\normalfont\bfseries}
257 |
258 | %----------------------------------------------------------------------------------------
259 | % TOC, LOF & LOT
260 | %----------------------------------------------------------------------------------------
261 |
262 | \PassOptionsToClass{toc=listof}{\@baseclass}
263 | \PassOptionsToClass{toc=index}{\@baseclass}
264 | \PassOptionsToClass{toc=bibliography}{\@baseclass}
265 |
266 | %----------------------------------------------------------------------------------------
267 | % NUMBERING
268 | %----------------------------------------------------------------------------------------
269 |
270 | \setcounter{secnumdepth}{1} % Number only up to sections
271 |
272 | \counterwithin*{sidenote}{chapter} % Uncomment to reset the sidenote counter at each chapter
273 | %\counterwithout{sidenote}{chapter} % Uncomment to have one sidenote counter for the whole document
274 |
--------------------------------------------------------------------------------
/main.tex:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % kaobook
3 | % LaTeX Template
4 | % Version 1.2 (4/1/2020)
5 | %
6 | % This template originates from:
7 | % https://www.LaTeXTemplates.com
8 | %
9 | % For the latest template development version and to make contributions:
10 | % https://github.com/fmarotta/kaobook
11 | %
12 | % Authors:
13 | % Federico Marotta (federicomarotta@mail.com)
14 | % Based on the doctoral thesis of Ken Arroyo Ohori (https://3d.bk.tudelft.nl/ken/en)
15 | % and on the Tufte-LaTeX class.
16 | % Modified for LaTeX Templates by Vel (vel@latextemplates.com)
17 | %
18 | % License:
19 | % CC0 1.0 Universal (see included MANIFEST.md file)
20 | %
21 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22 |
23 | %----------------------------------------------------------------------------------------
24 | % PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
25 | %----------------------------------------------------------------------------------------
26 |
27 | \documentclass[
28 | fontsize=11pt, % Base font size
29 | twoside=false, % Use different layouts for even and odd pages (ain particular, if twoside=true, the margin column will be always on the outside)
30 | %open=any, % If twoside=true, uncomment this to force new chapters to start on any page, not only on right (odd) pages
31 | %chapterprefix=true, % Uncomment to use the word "Chapter" before chapter numbers everywhere they appear
32 | %chapterentrydots=true, % Uncomment to output dots from the chapter name to the page number in the table of contents
33 | numbers=noenddot, % Comment to output dots after chapter numbers; the most common values for this option are: enddot, noenddot and auto (see the KOMAScript documentation for an in-depth explanation)
34 | %draft=true, % If uncommented, rulers will be added in the header and footer
35 | %overfullrule=true, % If uncommented, overly long lines will be marked by a black box; useful for correcting spacing problems
36 | ]{kaobook}
37 |
38 | \usepackage{xcolor}
39 | \urlstyle{same}
40 | \hypersetup{urlcolor=black} % Uncomment to set the colour of links in the ToC
41 | %
42 | % Source Sans Pro as the default font family
43 | % Source Code Pro for monospace text
44 | %
45 | % 'default' option sets the default
46 | % font family to Source Sans Pro, not \sfdefault.
47 | %
48 | \usepackage[default]{sourcesanspro}
49 | \usepackage{sourcecodepro}
50 |
51 | % Set the language
52 | \usepackage[ngerman]{babel} % Load characters and hyphenation
53 | \usepackage[german=quotes]{csquotes} % German quotes
54 |
55 | % Load packages for testing
56 | %\usepackage{blindtext}
57 | %\usepackage{showframe} % Uncomment to show boxes around the text area, margin, header and footer
58 | %\usepackage{showlabels} % Uncomment to output the content of \label commands to the document where they are used
59 |
60 | % Load the bibliography package
61 | % \usepackage{styles/kaobiblio}
62 | % \addbibresource{main.bib} % Bibliography file
63 |
64 | % Load mathematical packages for theorems and related environments. NOTE: choose only one between 'mdftheorems' and 'plaintheorems'.
65 | %\usepackage{styles/mdftheorems}
66 | %\usepackage{styles/plaintheorems}
67 |
68 | \graphicspath{{examples/documentation/images/}{images/}} % Paths in which to look for images
69 |
70 | \makeindex[columns=3, title=Alphabetical Index, intoc] % Make LaTeX produce the files required to compile the index
71 |
72 | \makeglossaries % Make LaTeX produce the files required to compile the glossary
73 |
74 | \makenomenclature % Make LaTeX produce the files required to compile the nomenclature
75 |
76 | % Reset sidenote counter at chapters
77 | %\counterwithin*{sidenote}{chapter}
78 |
79 | \newcommand{\leitfadenversion}{Version \input{version.tex}}
80 |
81 | %----------------------------------------------------------------------------------------
82 |
83 | \begin{document}
84 |
85 | %----------------------------------------------------------------------------------------
86 | % BOOK INFORMATION
87 | %----------------------------------------------------------------------------------------
88 |
89 | \titlehead{How to Hackathon? (\leitfadenversion)}
90 | \subject{Wann und wie Hackathons kommunalen Verwaltungen helfen können.}
91 |
92 | \title[How to Hackathon? (\leitfadenversion)]{How to Hackathon? (\leitfadenversion)}
93 | \subtitle{Wann und wie Hackathons kommunalen Verwaltungen helfen können.}
94 |
95 | \author[Code for Germany]{Code for Germany}
96 |
97 | \date{\today}
98 |
99 | \publishers{Open Knowledge Foundation Deutschland e.V.}
100 |
101 | %----------------------------------------------------------------------------------------
102 |
103 | \frontmatter % Denotes the start of the pre-document content, uses roman numerals
104 | \includepdf{cfg-frontmatter.pdf}
105 |
106 | \renewcommand{\thefootnote}{\arabic{footnote}}
107 |
108 | %----------------------------------------------------------------------------------------
109 | % OPENING PAGE
110 | %----------------------------------------------------------------------------------------
111 |
112 | %\makeatletter
113 | %\extratitle{
114 | % % In the title page, the title is vspaced by 9.5\baselineskip
115 | % \vspace*{9\baselineskip}
116 | % \vspace*{\parskip}
117 | % \begin{center}
118 | % % In the title page, \huge is set after the komafont for title
119 | % \usekomafont{title}\huge\@title
120 | % \end{center}
121 | %}
122 | %\makeatother
123 |
124 | %----------------------------------------------------------------------------------------
125 | % COPYRIGHT PAGE
126 | %----------------------------------------------------------------------------------------
127 |
128 | % \makeatletter
129 | % \uppertitleback{\@titlehead} % Header
130 |
131 | % \lowertitleback{
132 | \pagebreak
133 | \vspace*{13cm}
134 | \textbf{Über die Autor:innen}\\
135 | Dieser Leitfaden entstand aus den langjährigen Erfahrungen einer Civic-Tech-Community.
136 |
137 | \medskip
138 |
139 | \textbf{Lizenz}\\
140 | \cczero\ Dieser Leitfaden steht unter der Lizenz CC0. Die Lizenzbestimmungen sind hier nachzulesen: \\\url{http://creativecommons.org/publicdomain/zero/1.0/}.
141 |
142 | \medskip
143 |
144 | \textbf{Layout} \\
145 | Dieses Dokument wurde mit der Hilfe des \href{https://sourceforge.net/projects/koma-script/}{\KOMAScript} and \href{https://www.latex-project.org/}{\LaTeX} gesetzt, unter Verwendung der \href{https://github.com/fmarotta/kaobook/}{kaobook}-Klasse. Wir möchten uns an dieser Stelle herzlich bei den Entwickler*innen bedanken.
146 |
147 | \medskip
148 |
149 | \textbf{Herausgeber} \\
150 | \leitfadenversion veröffentlicht am \today\ von Code for Germany.
151 |
152 | Der Quellcode dieses Leitfadens ist online verfügbar unter:\\
153 | \url{https://github.com/okfde/hackathon-leitfaden} \\
154 |
155 | Wir freuen uns über Verbesserungsvorschläge und Pull Requests!
156 | % }
157 | % \makeatother
158 |
159 |
160 | %----------------------------------------------------------------------------------------
161 | % OUTPUT TITLE PAGE AND PREVIOUS
162 | %----------------------------------------------------------------------------------------
163 |
164 | % Note that \maketitle outputs the pages before here
165 |
166 | % If twoside=false, \uppertitleback and \lowertitleback are not printed
167 | % To overcome this issue, we set twoside=semi just before printing the title pages, and set it back to false just after the title pages
168 | \KOMAoptions{twoside=semi}
169 | % \maketitle
170 | %\KOMAoptions{twoside=false}
171 |
172 | %----------------------------------------------------------------------------------------
173 | % PREFACE
174 | %----------------------------------------------------------------------------------------
175 |
176 | %\input{chapters/preface.tex}
177 |
178 | %----------------------------------------------------------------------------------------
179 | % TABLE OF CONTENTS & LIST OF FIGURES/TABLES
180 | %----------------------------------------------------------------------------------------
181 |
182 | \begingroup % Local scope for the following commands
183 |
184 |
185 | % Define the style for the TOC, LOF, and LOT
186 | %\setstretch{1} % Uncomment to modify line spacing in the ToC
187 |
188 | \setlength{\textheight}{23cm} % Manually adjust the height of the ToC pages
189 |
190 | % Turn on compatibility mode for the etoc package
191 | \etocstandarddisplaystyle % "toc display" as if etoc was not loaded
192 | \etocstandardlines % toc lines as if etoc was not loaded
193 |
194 | \doublespacing
195 | \setcounter{tocdepth}{1}
196 | \tableofcontents % Output the table of contents
197 |
198 | % \listoffigures % Output the list of figures
199 |
200 | % Comment both of the following lines to have the LOF and the LOT on different pages
201 | \let\cleardoublepage\bigskip
202 | \let\clearpage\bigskip
203 |
204 | % \listoftables % Output the list of tables
205 |
206 | \endgroup
207 |
208 | %----------------------------------------------------------------------------------------
209 | % MAIN BODY
210 | %----------------------------------------------------------------------------------------
211 |
212 | \mainmatter % Denotes the start of the main document content, resets page numbering and uses arabic numbers
213 | \setchapterstyle{kao} % Choose the default chapter heading style
214 |
215 | \input{chapters/introduction.tex}
216 |
217 | %\pagelayout{wide} % No margins
218 | %\addpart{Class Options, Commands and Environments}
219 | %\pagelayout{margin} % Restore margins
220 |
221 | %\appendix % From here onwards, chapters are numbered with letters, as is the appendix convention
222 |
223 | %\pagelayout{wide} % No margins
224 | %\addpart{Checklisten}
225 | %\pagelayout{margin} % Restore margins
226 |
227 | % \input{chapters/appendix.tex}
228 |
229 | %----------------------------------------------------------------------------------------
230 |
231 | \backmatter % Denotes the end of the main document content
232 | \setchapterstyle{plain} % Output plain chapters from this point onwards
233 |
234 | %----------------------------------------------------------------------------------------
235 | % BIBLIOGRAPHY
236 | %----------------------------------------------------------------------------------------
237 |
238 | % The bibliography needs to be compiled with biber using your LaTeX editor, or on the command line with 'biber main' from the template directory
239 |
240 | % \defbibnote{bibnote}{Here are the references in citation order.\par\bigskip} % Prepend this text to the bibliography
241 | % \printbibliography[heading=bibintoc, title=Bibliography, prenote=bibnote] % Add the bibliography heading to the ToC, set the title of the bibliography and output the bibliography note
242 |
243 | %----------------------------------------------------------------------------------------
244 | % NOMENCLATURE
245 | %----------------------------------------------------------------------------------------
246 |
247 | % The nomenclature needs to be compiled on the command line with 'makeindex main.nlo -s nomencl.ist -o main.nls' from the template directory
248 |
249 | %\nomenclature{$c$}{Speed of light in a vacuum inertial frame}
250 | %\nomenclature{$h$}{Planck constant}
251 |
252 | %\renewcommand{\nomname}{Notation} % Rename the default 'Nomenclature'
253 | %\renewcommand{\nompreamble}{The next list describes several symbols that will be later used within the body of the document.} % Prepend this text to the nomenclature
254 |
255 | % \printnomenclature % Output the nomenclature
256 |
257 | %----------------------------------------------------------------------------------------
258 | % GLOSSARY
259 | %----------------------------------------------------------------------------------------
260 |
261 | % The glossary needs to be compiled on the command line with 'makeglossaries main' from the template directory
262 |
263 | % \newglossaryentry{computer}{
264 | % name=computer,
265 | % description={is a programmable machine that receives input, stores and manipulates data, and provides output in a useful format}
266 | %}
267 |
268 | % Glossary entries (used in text with e.g. \acrfull{fpsLabel} or \acrshort{fpsLabel})
269 | % \newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}
270 | % \newacronym[longplural={Tables of Contents}]{tocLabel}{TOC}{Table of Contents}
271 |
272 | % \setglossarystyle{listgroup} % Set the style of the glossary (see https://en.wikibooks.org/wiki/LaTeX/Glossary for a reference)
273 | % \printglossary[title=Special Terms, toctitle=List of Terms] % Output the glossary, 'title' is the chapter heading for the glossary, toctitle is the table of contents heading
274 |
275 | %----------------------------------------------------------------------------------------
276 | % INDEX
277 | %----------------------------------------------------------------------------------------
278 |
279 | % The index needs to be compiled on the command line with 'makeindex main' from the template directory
280 |
281 | \printindex % Output the index
282 |
283 | %----------------------------------------------------------------------------------------
284 | % BACK COVER
285 | %----------------------------------------------------------------------------------------
286 |
287 | % If you have a PDF/image file that you want to use as a back cover, uncomment the following lines
288 |
289 | \clearpage
290 | \thispagestyle{empty}
291 | \null%
292 | \clearpage
293 | \includepdf{cfg-backmatter.pdf}
294 |
295 | %----------------------------------------------------------------------------------------
296 |
297 | \end{document}
298 |
--------------------------------------------------------------------------------
/styles/environments.sty:
--------------------------------------------------------------------------------
1 | %% environments.sty
2 | %% Copyright 2020 Federico Marotta
3 | %
4 | % This work may be distributed and/or modified under the
5 | % conditions of the LaTeX Project Public License, either version 1.3
6 | % of this license or (at your option) any later version.
7 | % The latest version of this license is in
8 | % http://www.latex-project.org/lppl.txt
9 | % and version 1.3 or later is part of all distributions of LaTeX
10 | % version 2005/12/01 or later.
11 | %
12 | % This work has the LPPL maintenance status `maintained'.
13 | %
14 | % The Current Maintainer of this work is Federico Marotta
15 | %
16 | % This work consists of all the files listed in MANIFEST.md.
17 |
18 | \ProvidesPackage{styles/environments}
19 |
20 | %----------------------------------------------------------------------------------------
21 | % ITEMS
22 | %----------------------------------------------------------------------------------------
23 |
24 | \RequirePackage{amssymb}
25 | \renewcommand{\labelitemi}{\small$\blacktriangleright$}
26 | \renewcommand{\labelitemii}{\textbullet}
27 | \RequirePackage{enumitem}
28 | \setlist[itemize]{noitemsep}
29 | \setlist[enumerate]{noitemsep}
30 | \setlist[description]{noitemsep}
31 |
32 | %----------------------------------------------------------------------------------------
33 | % SIMPLE BOXED ENVIRONMENT
34 | %----------------------------------------------------------------------------------------
35 |
36 | % kaobox (while tcolorbox may be more rich, I find it too complicated so I prefer mdframed)
37 | \RequirePackage{tikz}
38 | \RequirePackage[framemethod=TikZ]{mdframed}
39 |
40 | %\mdfsetup{skipabove=\topskip,skipbelow=0pt}
41 | \mdfdefinestyle{kaoboxstyle}{
42 | skipabove=1.5\topskip,
43 | skipbelow=.5\topskip,
44 | rightmargin=0pt,
45 | leftmargin=0pt,
46 | %innertopmargin=3pt,
47 | %innerbottommargin=3pt,
48 | innerrightmargin=7pt,
49 | innerleftmargin=7pt,
50 | topline=false,
51 | bottomline=false,
52 | rightline=false,
53 | leftline=false,
54 | %linewidth=1pt,
55 | %roundcorner=0pt,
56 | %font={},
57 | %frametitlefont={},
58 | frametitlerule=true,
59 | linecolor=black,
60 | %backgroundcolor=LightBlue,
61 | fontcolor=black,
62 | %frametitlebackgroundcolor=LightBlue,
63 | }
64 |
65 | \newmdenv[
66 | style=kaoboxstyle,
67 | backgroundcolor=lightgray!25!White,
68 | frametitlebackgroundcolor=lightgray!25!White,
69 | ]{kaobox}
70 |
71 | %----------------------------------------------------------------------------------------
72 | % ENVIRONMENT WITH A COUNTER
73 | %----------------------------------------------------------------------------------------
74 |
75 | \newenvironment{kaocounter}{
76 | \refstepcounter{kaocounter}
77 | \begin{kaobox}[frametitle=Comment~\thekaocounter\autodot]
78 | }{
79 | \end{kaobox}
80 | }
81 |
82 | \newcounter{kaocounter}
83 | \numberwithin{kaocounter}{section}
84 | \newcommand*{\kaocounterformat}{% Format for the caption
85 | Comment~\thekaocounter\csname autodot\endcsname}
86 | \newcommand*{\fnum@kaocounter}{\kaocounterformat}
87 |
88 |
89 | %----------------------------------------------------------------------------------------
90 | % FLOATING ENVIRONMENT WITH TOC ENTRIES
91 | %----------------------------------------------------------------------------------------
92 |
93 | \newenvironment{kaofloating}{%
94 | \@float{kaofloating}%
95 | }{%
96 | \end@float%
97 | }
98 |
99 | \newcommand*{\fps@floatingbox}{tbph}
100 | \newcommand*{\ftype@floatingbox}{5}
101 | \newcommand*{\floatingboxformat}{%
102 | Insight~\thefloatingbox\csname autodot\endcsname}
103 | \newcommand*{\fnum@floatingbox}{\floatingboxformat}
104 | \newcommand*{\ext@floatingbox}{loi}
105 |
106 | \addtotoclist[float]{loi}
107 | \newcommand*{\listofloiname}{List of Insights}
108 | \newcommand*{\l@floatingbox}{\l@figure}
109 | \newcommand*{\listofinsights}{\listoftoc{loi}}
110 |
--------------------------------------------------------------------------------
/styles/kao.sty:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % kaobook
3 | % kao Styling Package
4 | % Version 1.2 (4/1/2020)
5 | %
6 | % This template originates from:
7 | % https://www.LaTeXTemplates.com
8 | %
9 | % For the latest template development version and to make contributions:
10 | % https://github.com/fmarotta/kaobook
11 | %
12 | % Authors:
13 | % Federico Marotta (federicomarotta@mail.com)
14 | % Based on the doctoral thesis of Ken Arroyo Ohori (https://3d.bk.tudelft.nl/ken/en)
15 | % and on the Tufte-LaTeX class.
16 | % Modified for LaTeX Templates by Vel (vel@latextemplates.com)
17 | %
18 | % License:
19 | % LPPL (see included MANIFEST.md file)
20 | %
21 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22 |
23 | \ProvidesPackage{styles/kao}[2020/01/02 Common code for the kao style]
24 |
25 | %----------------------------------------------------------------------------------------
26 | % USEFUL PACKAGES AND COMMANDS
27 | %----------------------------------------------------------------------------------------
28 |
29 | % \RequirePackage[l2tabu,orthodox]{nag} % turn on warnings because of bad style
30 | \RequirePackage{etoolbox} % Easy programming to modify TeX stuff
31 | \RequirePackage{calc} % Make calculations
32 | \RequirePackage{xifthen} % Easy conditionals
33 | \RequirePackage{xkeyval} % Manage class options
34 | \RequirePackage{xparse} % Parse arguments for macros
35 | \RequirePackage{xpatch} % Patch LaTeX code in external packages
36 | \RequirePackage{xstring} % Parse strings
37 | \RequirePackage{afterpage} % Run commands after specific pages
38 |
39 | %----------------------------------------------------------------------------------------
40 | % TITLE AND AUTHOR MACROS
41 | %----------------------------------------------------------------------------------------
42 |
43 | % Provide an optional argument to the \title command in which to store a plain text title, without any formatting
44 | % Usage: \title[Plain Title]{Actual Title}
45 | \newcommand{\@plaintitle}{}
46 | \renewcommand{\title}[2][]{
47 | \gdef\@title{#2} % Store the full title in @title
48 | \ifthenelse{\isempty{#1}}{ % If there is no plain title
49 | \renewcommand{\@plaintitle}{\title} % Use full title
50 | }{ % If there is a plain title
51 | \renewcommand{\@plaintitle}{#1} % Use provided plain-text title
52 | }
53 | \hypersetup{pdftitle={\@plaintitle}} % Set the PDF metadata title
54 | }
55 |
56 | % Provide an optional argument to the \author command in which to store a plain text author, without any formatting
57 | % Usage: \author[Plain Author]{Actual Author}
58 | \newcommand{\@plainauthor}{}
59 | \renewcommand{\author}[2][]{
60 | \gdef\@author{#2} % Store the full author in @author
61 | \ifthenelse{\isempty{#1}}{ % If there is no plain author
62 | \renewcommand{\@plainauthor}{\author}% Use full author
63 | }{ % If there is a plain author
64 | \renewcommand{\@plainauthor}{#1}% Use provided plain-text author
65 | }
66 | \hypersetup{pdfauthor={\@plainauthor}} % Set the PDF metadata author
67 | }
68 |
69 | % Make a bookmark to the title page
70 | \pretocmd{\maketitle}{\pdfbookmark[1]{\@plaintitle}{title}}{}{}
71 |
72 | %----------------------------------------------------------------------------------------
73 | % PARAGRAPH FORMATTING
74 | %----------------------------------------------------------------------------------------
75 |
76 | \RequirePackage{ragged2e} % Required to achieve better ragged paragraphs
77 | \RequirePackage{setspace} % Required to easily set the space between lines
78 | \RequirePackage{hyphenat} % Hyphenation for special fonts
79 | \RequirePackage{microtype} % Improves character and word spacing
80 | \RequirePackage{needspace} % Required to prevent page break right after a sectioning command
81 | \RequirePackage{xspace} % Better print trailing whitespace
82 | \RequirePackage[usenames,dvipsnames,table]{xcolor} % Colours
83 |
84 | % TODO: recognize space/indent justified/raggedright class options
85 |
86 | %------------------------------------------------
87 |
88 | % Settings for a normal paragraph
89 | \newcommand{\@body@par}{%
90 | \justifying% Justify text
91 | \singlespacing% Set the interline space to a single line
92 | \frenchspacing% No additional space after periods
93 | \normalfont% Use the default font
94 | \normalsize% Use the default size
95 | }
96 |
97 | %------------------------------------------------
98 |
99 | % Settings for a paragraph in the margins
100 | \newcommand{\@margin@par}{%
101 | \justifying% justify text
102 | \setlength{\RaggedRightParindent}{0em}% Suppress indentation
103 | \setlength{\parindent}{0em}% Suppress indentation
104 | \setlength{\parskip}{0.5pc}% Set the space between paragraphs
105 | %\singlespacing% Set the space between lines
106 | \frenchspacing% No additional space after periods
107 | \normalfont% Use the default font
108 | \footnotesize% Use a smaller size
109 | }
110 |
111 | %------------------------------------------------
112 |
113 | % By default, use @body@par settings
114 | \@body@par
115 |
116 | %----------------------------------------------------------------------------------------
117 | % FOOTNOTES, MARGINNOTES AND SIDENOTES
118 | %----------------------------------------------------------------------------------------
119 |
120 | \RequirePackage[section]{placeins} % Prevent floats to cross sections
121 |
122 | % Request more floats
123 | \extrafloats{100}
124 |
125 | %------------------------------------------------
126 |
127 | % TODO: see also page 440 of the KOMA-script guide
128 |
129 | \RequirePackage[
130 | bottom,
131 | symbol*,
132 | hang,
133 | flushmargin,
134 | % perpage,
135 | stable,
136 | ]{footmisc} % Required to set up the footnotes
137 | \RequirePackage{footnotebackref} % Creates back references from footnotes to text
138 |
139 | % Fix the color of the footnote marker when back-referenced
140 | \patchcmd{\footref}{\ref}{\hypersetup{colorlinks=black}\ref}{}{}
141 | % Workaround to fix back references
142 | \edef\BackrefFootnoteTag{bhfn:\theBackrefHyperFootnoteCounter}
143 |
144 | % FIXME: I am not able to choose the paragraph layout of footnotes, probably the footnotes package conflicts with scrbook.
145 | %\renewcommand{\footnotelayout}{\@margin@par}
146 |
147 | %------------------------------------------------
148 |
149 | \RequirePackage{marginnote} % Provides options for margin notes
150 | \RequirePackage{marginfix} % Make marginpars float freely
151 | \RequirePackage{sidenotes} % Use sidenotes
152 | \RequirePackage{chngcntr} % Reset counters at sections
153 |
154 | % Justify and format margin notes
155 | \renewcommand*{\raggedleftmarginnote}{} % Suppress left margin
156 | \renewcommand*{\raggedrightmarginnote}{} % Suppress right margin
157 | \renewcommand*{\marginfont}{\@margin@par} % Format marginnotes according to \@marginpar (see above)
158 | \renewcommand{\marginnotevadjust}{2pt} % Bring all marginnotes downward a bit
159 | %\RequirePackage[marginnote=true]{snotez} % Provides options for sidenotes
160 |
161 | \def\snotez@if@nblskip#1{%
162 | \expandafter\ifx\@car#1\@nil*%
163 | \expandafter\@firstoftwo
164 | \else
165 | \expandafter\@secondoftwo
166 | \fi
167 | }
168 |
169 | % Redefine the command to print marginnotes:
170 | % (a) the optional offset argument goes at the first position
171 | % (b) the offset can also be a multiple of baselineskip, like for snotez's \sidenote
172 | % Usage: \marginnote[]{Text of the note.}
173 | \let\oldmarginnote\marginnote
174 | \renewcommand{\marginnote}[2][0pt]{%
175 | \oldmarginnote{#2}[\snotez@if@nblskip{#1}{\@cdr#1\@nil\baselineskip}{#1}]%
176 | }
177 |
178 | % Redefine the following sidenotes' command to use the kao version of marginnote
179 | \RenewDocumentCommand \@sidenotes@placemarginal { m m }
180 | {
181 | \IfNoValueOrEmptyTF{#1}
182 | {\marginpar{#2}}
183 | {\marginnote[#1]{#2}}
184 | }
185 |
186 | % Initially set the counter to zero instead of 1, and update it before printing the sidenote.
187 | \setcounter{sidenote}{0}
188 | \RenewDocumentCommand\sidenote{ o o +m }{%
189 | \IfNoValueOrEmptyTF{#1}{%
190 | \refstepcounter{sidenote}% This command has been moved here
191 | }{%
192 | }%
193 | \sidenotemark[#1]%
194 | \sidenotetext[#1][#2]{#3}%
195 | \@sidenotes@multimarker%
196 | }
197 |
198 | % % Formatting sidenotes
199 | % \setsidenotes{
200 | % text-mark-format=\textsuperscript{\normalfont#1}, % Use a superscript for the marker in the text
201 | % note-mark-format=#1:, % Use a normal font for the marker in the margin; use a colon after the sidenote number
202 | % note-mark-sep=\enskip, % Set the space after the marker
203 | % }
204 |
205 | % Formatting sidenotes
206 | \RenewDocumentCommand \@sidenotes@thesidenotemark { m }%
207 | {%
208 | \leavevmode%
209 | \ifhmode%
210 | \edef\@x@sf{\the\spacefactor}%
211 | \nobreak%
212 | \fi%
213 | \hbox{\@textsuperscript{\normalfont#1}}%
214 | \ifhmode%
215 | \spacefactor\@x@sf%
216 | \fi%
217 | \relax%
218 | }%
219 |
220 | \RenewDocumentCommand\sidenotetext{ o o +m }% number, offset, text
221 | {%
222 | \IfNoValueOrEmptyTF{#1}%
223 | {%
224 | \@sidenotes@placemarginal{#2}{\@margin@par\thesidenote:\enskip#3}%
225 | }%
226 | {\@sidenotes@placemarginal{#2}{\@margin@par#1:\enskip#3}}%
227 | }
228 |
229 | %----------------------------------------------------------------------------------------
230 | % FIGURES, TABLES AND CAPTIONS
231 | %----------------------------------------------------------------------------------------
232 |
233 | \RequirePackage{graphicx} % Include figures
234 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} % Improves figure scaling
235 | \RequirePackage{tikz} % Allows to draw custom shapes
236 | \RequirePackage{booktabs} % Nicer tables
237 | \RequirePackage{multirow} % Cells occupying multiple rows in tables
238 | \RequirePackage{multicol} % Multiple columns in dictionary
239 | \RequirePackage[hypcap=true]{caption} % Correctly placed anchors for hyperlinks
240 | % \RequirePackage{atbegshi}
241 | % \RequirePackage{perpage}
242 | \let\c@abspage\relax
243 | % \newcommand{\pp@g@sidenote}{}
244 | %\RequirePackage[nomencl=false]{scrhack} % Force KOMA to like floatrow
245 | \RequirePackage{floatrow} % Set up captions of floats
246 | \RequirePackage{dblfloatfix} % Better positioning of wide figures and tables
247 |
248 | % Improve the figure placing (see https://www.overleaf.com/learn/latex/Tips)
249 | \def\topfraction{.9}
250 | \def\textfraction{0.35}
251 | \def\floatpagefraction{0.8}
252 |
253 | % Set the space between floats and main text
254 | \renewcommand\FBaskip{.4\topskip}
255 | \renewcommand\FBbskip{\FBaskip}
256 |
257 | % Tighten up space between displays (e.g., equations) and make symmetric (from tufte-latex)
258 | \setlength\abovedisplayskip{6pt plus 2pt minus 4pt}
259 | \setlength\belowdisplayskip{6pt plus 2pt minus 4pt}
260 | \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
261 | \abovedisplayshortskip \z@ \@plus3\p@
262 | \belowdisplayskip \abovedisplayskip
263 | \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
264 |
265 | \setlength\columnseprule{.4pt} % Set the width of vertical rules in tables
266 |
267 | % Environment to hold a margin figure (from the sidenotes package)
268 | % We redefine it here because we want to use our own caption formatting.
269 | \newsavebox{\@kao@marginfigurebox}
270 | \renewenvironment{marginfigure}[1][0pt]{ % The optional parameter is the vertical offset
271 | %\let\footnotemark\mpfootnotemark
272 | \FloatBarrier % Force LaTeX to place previous floats
273 | \mparshift{\snotez@if@nblskip{#1}{\@cdr#1\@nil\baselineskip}{#1}} % Move the figure up or down according to the offset argument
274 | \begin{lrbox}{\@sidenotes@marginfigurebox}
275 | \begin{minipage}{\marginparwidth}
276 | \captionsetup{type=figure}
277 | % \centering % Better not to center margin figures
278 | }{
279 | \end{minipage}
280 | \end{lrbox}
281 | \marginpar{\usebox{\@sidenotes@marginfigurebox}} % Place the figure box in the margin
282 | }
283 |
284 | % Environment to hold a margin table (from the sidenotes package)
285 | \newsavebox{\@kao@margintablebox}
286 | \renewenvironment{margintable}[1][0pt]{ % The optional parameter is the vertical offset
287 | \FloatBarrier % Force LaTeX to place previous floats
288 | \mparshift{\snotez@if@nblskip{#1}{\@cdr#1\@nil\baselineskip}{#1}} % Move the table up or down according to the offset argument
289 | \begin{lrbox}{\@sidenotes@margintablebox}
290 | \begin{minipage}{\marginparwidth}
291 | \captionsetup{type=table}
292 | }{
293 | \end{minipage}
294 | \end{lrbox}
295 | \marginpar{\usebox{\@sidenotes@margintablebox}} % Place the table box in the margin
296 | }
297 |
298 | % Environment to hold a margin listing
299 | \newsavebox{\@sidenotes@marginlistingbox}
300 | \newenvironment{marginlisting}[1][0pt]{ % The optional parameter is the vertical offset
301 | \FloatBarrier % Force LaTeX to place previous floats
302 | \mparshift{\snotez@if@nblskip{#1}{\@cdr#1\@nil\baselineskip}{#1}} % Move the listing up or down according to the offset argument
303 | \begin{lrbox}{\@sidenotes@marginlistingbox}
304 | \begin{minipage}{\marginparwidth}
305 | \captionsetup{type=lstlisting}
306 | }{
307 | \end{minipage}
308 | \end{lrbox}
309 | \marginpar{\usebox{\@sidenotes@marginlistingbox}} % Place the listing box in the margin
310 | }
311 |
312 | % Change the position of the captions
313 | \DeclareFloatSeparators{marginparsep}{\hskip\marginparsep}
314 | \if@twoside
315 | \floatsetup[figure]{ % Captions for figueres
316 | margins=hangoutside, % Put captions in the margins
317 | facing=yes,
318 | capposition=beside,
319 | capbesideposition={bottom,outside},
320 | capbesideframe=yes,
321 | capbesidewidth=\marginparwidth, % Width of the caption equal to the width of the margin
322 | capbesidesep=marginparsep,
323 | floatwidth=\textwidth, % Width of the figure equal to the width of the text
324 | }
325 | \floatsetup[widefigure]{ % Captions for wide figures
326 | margins=hangoutside, % Put captions below the figure
327 | facing=yes,
328 | capposition=bottom
329 | }
330 | \floatsetup[table]{ % Captions for tables
331 | margins=hangoutside, % Put captions in the margin
332 | facing=yes,
333 | capposition=beside,
334 | capbesideposition={top,outside},
335 | %capbesideposition=outside,
336 | capbesideframe=yes,
337 | capbesidewidth=\marginparwidth, % Width of the caption equal to the width of the margin
338 | capbesidesep=marginparsep,
339 | floatwidth=\textwidth, % Width of the figure equal to the width of the text
340 | }
341 | \floatsetup[widetable]{ % Captions for wide tables
342 | margins=hangoutside, % Put captions above the table
343 | facing=yes,
344 | capposition=above
345 | }
346 | \floatsetup[lstlisting]{ % Captions for lstlistings
347 | margins=hangoutside, % Put captions in the margin
348 | facing=yes,
349 | capposition=beside,
350 | capbesideposition={top,outside},
351 | %capbesideposition=outside,
352 | capbesideframe=yes,
353 | capbesidewidth=\marginparwidth, % Width of the caption equal to the width of the margin
354 | capbesidesep=marginparsep,
355 | floatwidth=\textwidth, % Width of the figure equal to the width of the text
356 | }
357 | \floatsetup[listing]{ % Captions for listings (minted package)
358 | margins=hangoutside, % Put captions in the margin
359 | facing=yes,
360 | capposition=beside,
361 | capbesideposition={top,outside},
362 | %capbesideposition=outside,
363 | capbesideframe=yes,
364 | capbesidewidth=\marginparwidth, % Width of the caption equal to the width of the margin
365 | capbesidesep=marginparsep,
366 | floatwidth=\textwidth, % Width of the figure equal to the width of the text
367 | }
368 | \else
369 | \floatsetup[figure]{ % Captions for figueres
370 | margins=hangright, % Put captions in the margins
371 | facing=yes,
372 | capposition=beside,
373 | capbesideposition={bottom,right},
374 | capbesideframe=yes,
375 | capbesidewidth=\marginparwidth, % Width of the caption equal to the width of the margin
376 | capbesidesep=marginparsep,
377 | floatwidth=\textwidth, % Width of the figure equal to the width of the text
378 | }
379 | \floatsetup[widefigure]{ % Captions for wide figures
380 | margins=hangright, % Put captions below the figure
381 | facing=no,
382 | capposition=bottom
383 | }
384 | \floatsetup[table]{ % Captions for tables
385 | margins=hangright, % Put captions in the margin
386 | facing=yes,
387 | capposition=beside,
388 | capbesideposition={top,right},
389 | %capbesideposition=outside,
390 | capbesideframe=yes,
391 | capbesidewidth=\marginparwidth, % Width of the caption equal to the width of the margin
392 | capbesidesep=marginparsep,
393 | floatwidth=\textwidth, % Width of the figure equal to the width of the text
394 | }
395 | \floatsetup[widetable]{ % Captions for wide tables
396 | margins=hangright, % Put captions above the table
397 | facing=no,
398 | capposition=above
399 | }
400 | \floatsetup[lstlisting]{ % Captions for lstlisting
401 | margins=hangright, % Put captions in the margin
402 | facing=yes,
403 | capposition=beside,
404 | capbesideposition={top,right},
405 | %capbesideposition=outside,
406 | capbesideframe=yes,
407 | capbesidewidth=\marginparwidth, % Width of the caption equal to the width of the margin
408 | capbesidesep=marginparsep,
409 | floatwidth=\textwidth, % Width of the figure equal to the width of the text
410 | }
411 | \floatsetup[listing]{ % Captions for listing (minted package)
412 | margins=hangright, % Put captions in the margin
413 | facing=yes,
414 | capposition=beside,
415 | capbesideposition={top,right},
416 | %capbesideposition=outside,
417 | capbesideframe=yes,
418 | capbesidewidth=\marginparwidth, % Width of the caption equal to the width of the margin
419 | capbesidesep=marginparsep,
420 | floatwidth=\textwidth, % Width of the figure equal to the width of the text
421 | }
422 | \fi
423 |
424 | % Change the formatting of the captions
425 | \addtokomafont{captionlabel}{\bfseries} % Bold font for the figure label
426 | \DeclareCaptionFormat{margin}{\@margin@par #1#2#3} % Declare a new style to format the caption according to \@margin@par (see above)
427 | \captionsetup{
428 | format=margin, % Use the style previously declared
429 | strut=no,
430 | %hypcap=true, % Links point to the top of the figure
431 | singlelinecheck=false,
432 | %width=\marginparwidth,
433 | indention=0pt, % Suppress indentation
434 | parindent=0pt, % Suppress space between paragraphs
435 | aboveskip=6pt, % Increase the space between the figure and the caption
436 | belowskip=6pt, % Increase the space between the caption and the table
437 | }
438 |
439 | % Needed to have continued figures and tables (https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Figures_in_multiple_parts)
440 | \DeclareCaptionLabelFormat{cont}{#1~#2\alph{ContinuedFloat}}
441 | \captionsetup[ContinuedFloat]{labelformat=cont}
442 |
443 | %----------------------------------------------------------------------------------------
444 | % TOC, LOF & LOT
445 | %----------------------------------------------------------------------------------------
446 |
447 | \RequirePackage{tocbasic}
448 |
449 | % Show an entry for the TOC in the TOC
450 | % \setuptoc{toc}{totoc}
451 |
452 | % Choose the levels in table of contents
453 | \setcounter{tocdepth}{\subsectiontocdepth}
454 |
455 | % Define the style for figure and table entries
456 | \DeclareTOCStyleEntry[level=1,indent=0em,numwidth=2em]{tocline}{figure}
457 | \DeclareTOCStyleEntry[level=1,indent=0em,numwidth=2em]{tocline}{table}
458 |
459 | % Define the names for the headings
460 | % \renewcaptionname{english}{\contentsname}{Detailed Contents}
461 | % \renewcaptionname{english}{\listfigurename}{Figures}
462 | % \renewcaptionname{english}{\listtablename}{Tables}
463 | % \newcaptionname{english}{\listtheoremname}{Theorems}
464 |
465 | %----------------------------------------------------------------------------------------
466 | % MARGIN TOC
467 | %----------------------------------------------------------------------------------------
468 |
469 | \RequirePackage{etoc} % Required to insert local tables of contents
470 |
471 | \newcounter{margintocdepth}
472 | \setcounter{margintocdepth}{\subsectiontocdepth}
473 |
474 | \newlength{\mtocshift} % Length of the vertical offset used for margin tocs
475 | \setlength{\mtocshift}{-5.2cm}
476 |
477 | % Command to print a table of contents in the margin
478 | \newcommand{\margintoc}[1][\mtocshift]{ % The first parameter is the vertical offset; by default it is \mtocshift
479 | \begingroup
480 | % Set the style for section entries
481 | \etocsetstyle{section}
482 | {\parindent -5pt \parskip 0pt}
483 | {\leftskip 0pt}
484 | {\makebox[.5cm]{\etocnumber\autodot}
485 | \etocname\nobreak\leaders\hbox{\hbox to 1.5ex {\hss.\hss}}\hfill\nobreak
486 | \etocpage\par}
487 | {}
488 | % Set the style for subsection entries
489 | \etocsetstyle{subsection}
490 | {\parindent -5pt \parskip 0pt}
491 | {\leftskip 0pt}
492 | {\makebox[.5cm]{}
493 | \etocname\nobreak\leaders\hbox{\hbox to 1.5ex {\hss.\hss}}\hfill\nobreak
494 | \etocpage\par}
495 | {}
496 | % Set the global style of the toc
497 | %\etocsettocstyle{}{}
498 | %\etocsettocstyle{\normalfont\sffamily\normalsize}{}
499 | \etocsettocstyle{\usekomafont{section}\small}{}
500 | \etocsetnexttocdepth{\themargintocdepth}
501 | % Print the table of contents in the margin
502 | \marginnote[#1]{\localtableofcontents}
503 | \endgroup
504 | }
505 |
506 | %----------------------------------------------------------------------------------------
507 | % PAGE LAYOUT
508 | %----------------------------------------------------------------------------------------
509 |
510 | % Set the default page layout
511 | \RequirePackage[
512 | a4paper,
513 | bottom=27.4mm,
514 | inner=24.8mm,
515 | textwidth=107mm,
516 | marginparsep=8.2mm,
517 | marginparwidth=49.4mm,
518 | includemp
519 | ]{geometry}
520 |
521 | % Command to print a blank page
522 | \newcommand\blankpage{%
523 | \null%
524 | \thispagestyle{empty}%
525 | \newpage%
526 | }
527 |
528 | % Command to choose among the three possible layouts
529 | \DeclareDocumentCommand{\pagelayout}{m}{%
530 | \ifthenelse{\equal{margin}{#1}}{\marginlayout}{}%
531 | \ifthenelse{\equal{wide}{#1}}{\widelayout}{}%
532 | \ifthenelse{\equal{fullwidth}{#1}}{\fullwidthlayout}{}%
533 | }
534 |
535 | % Layout #1: large margins
536 | \newcommand{\marginlayout}{%
537 | \newgeometry{
538 | a4paper,
539 | top=27.4mm,
540 | bottom=27.4mm,
541 | inner=24.8mm,
542 | textwidth=107mm,
543 | marginparsep=8.2mm,
544 | marginparwidth=49.4mm,
545 | includemp
546 | }%
547 | }
548 |
549 | % Layout #2: no margins at all
550 | \newcommand{\widelayout}{%
551 | \newgeometry{
552 | a4paper,
553 | top=27.4mm,
554 | bottom=27.4mm,
555 | inner=24.8mm,
556 | outer=24.8mm,
557 | marginparsep=0mm,
558 | marginparwidth=0mm,
559 | ignoremp,
560 | }%
561 | }
562 |
563 | % Layout #3: no margins and no space above or below the body
564 | \newcommand{\fullwidthpage}{%
565 | \newgeometry{
566 | a4paper,
567 | top=0cm,
568 | bottom=0cm,
569 | inner=0cm,
570 | outer=0cm,
571 | marginparwidth=0cm,
572 | marginparsep=0cm,
573 | ignoremp
574 | }%
575 | }
576 |
577 | % Set the default page layout
578 | \AtBeginDocument{\pagelayout{margin}}
579 |
580 | %----------------------------------------------------------------------------------------
581 | % HEADERS AND FOOTERS
582 | %----------------------------------------------------------------------------------------
583 |
584 | \RequirePackage{scrlayer-scrpage} % Customise head and foot regions
585 | \setlength{\headheight}{115pt} % Enlarge the header
586 |
587 | % Headings styles
588 |
589 | % Style with chapter number, chapter title, and page in the header (used
590 | % throughout the document)
591 | \renewpagestyle{scrheadings}{%
592 | {\hspace{-\marginparwidth}\hspace{-\marginparsep}\makebox[\overflowingheadlen][l]{%
593 | \parbox[t][1.7cm][c]{2em}{\hfill\thepage}%
594 | \makebox[2em][c]{\rule[-1.03cm]{1pt}{1.55cm}}%
595 | \parbox[t][1.7cm][c]{\textwidth}{\leftmark}}}%
596 | {\makebox[\overflowingheadlen][r]{%
597 | \parbox[t][1.7cm][c]{\textwidth}{\hfill\rightmark}%
598 | \makebox[2em][c]{\rule[-1.03cm]{1pt}{1.55cm}}%
599 | \parbox[t][1.7cm][c]{2em}{\thepage}}}%
600 | {\makebox[\overflowingheadlen][r]{%
601 | \parbox[t][1.7cm][c]{\textwidth}{\hfill\rightmark}%
602 | \makebox[2em][c]{\rule[-1.03cm]{1pt}{1.55cm}}%
603 | \parbox[t][1.7cm][c]{2em}{\thepage}}}%
604 | }{%
605 | {}%
606 | {}%
607 | {}%
608 | }
609 |
610 | % Style with neither header nor footer (used for special pages)
611 | \renewpagestyle{plain.scrheadings}{%
612 | {}%
613 | {}%
614 | {}%
615 | }{%
616 | {}%
617 | {}%
618 | {}%
619 | }
620 |
621 | % Style with an empty header and the page number in the footer
622 | \newpagestyle{pagenum.scrheadings}{%
623 | {}%
624 | {}%
625 | {}%
626 | }{%
627 | {\thepage}%
628 | {\hfill\thepage}%
629 | {}%
630 | }
631 |
632 | % Set the default page style
633 | \pagestyle{plain.scrheadings}
634 |
635 | %----------------------------------------------------------------------------------------
636 | % ENCODING AND FONTS
637 | %----------------------------------------------------------------------------------------
638 |
639 | \RequirePackage[T1]{fontenc} % utf8 encoding in the output (.pdf) file
640 | \RequirePackage[utf8]{inputenc} % utf8 encoding in the input (.tex) file
641 |
642 | \RequirePackage[scaled=.97,helvratio=.93,p,theoremfont]{newpxtext} % Serif palatino font
643 | \RequirePackage[vvarbb,smallerops,bigdelims]{newpxmath} % Math palatino font
644 | \RequirePackage[scaled=.85]{beramono} % Monospace font
645 | \RequirePackage[scr=rsfso,cal=boondoxo]{mathalfa} % Mathcal from STIX, unslanted a bit
646 | \RequirePackage{bm} % Bold math
647 |
648 | % When using the Palatino (mathpazo) font, it is better to use a slightly larger stretch.
649 | %\setstretch{1.10}
650 | \linespread{1.07} % Give Palatino more leading (space between lines)
651 |
652 | %----------------------------------------------------------------------------------------
653 | % HYPERREFERENCES
654 | %----------------------------------------------------------------------------------------
655 |
656 | \RequirePackage{hyperref} % Required for hyperlinks
657 | \RequirePackage{bookmark} % Required for pdf bookmarks
658 |
659 | \PassOptionsToPackage{hyphens}{url} % Break long URLs and use hyphens to separate the pieces
660 |
661 | \hypersetup{ % Set up hyperref options
662 | unicode, % Use unicode for links
663 | pdfborder={0 0 0}, % Suppress border around pdf
664 | %xetex,
665 | %pagebackref=true,
666 | %hyperfootnotes=false, % We already use footmisc
667 | bookmarksdepth=section,
668 | bookmarksopen=true, % Expand the bookmarks as soon as the pdf file is opened
669 | %bookmarksopenlevel=4,
670 | linktoc=all, % Toc entries and numbers links to pages
671 | breaklinks=true,
672 | colorlinks=true,
673 | %allcolors=DarkGreen,
674 | citecolor = DarkOrange,
675 | linkcolor = DarkBlue,
676 | %pagecolor = DarkBlue,
677 | urlcolor = OliveGreen,
678 | }
679 |
680 | % Define a new color for the footnote marks
681 | \def\@footnotecolor{black}
682 | \define@key{Hyp}{footnotecolor}{%
683 | \HyColor@HyperrefColor{#1}\@footnotecolor%
684 | }
685 | \def\@footnotemark{%
686 | \leavevmode
687 | \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
688 | \stepcounter{Hfootnote}%
689 | \global\let\Hy@saved@currentHref\@currentHref
690 | \hyper@makecurrent{Hfootnote}%
691 | \global\let\Hy@footnote@currentHref\@currentHref
692 | \global\let\@currentHref\Hy@saved@currentHref
693 | \hyper@linkstart{footnote}{\Hy@footnote@currentHref}%
694 | \@makefnmark
695 | \hyper@linkend
696 | \ifhmode\spacefactor\@x@sf\fi
697 | \relax
698 | }
699 |
700 | % Adjust the colour of the footnotes marks using the colour defined above
701 | \renewcommand\@makefntext[1]{%
702 | \renewcommand\@makefnmark{%
703 | \mbox{\textsuperscript{\normalfont%
704 | \hyperref[\BackrefFootnoteTag]{%
705 | \color{\@footnotecolor}{\@thefnmark}%
706 | }}\,%
707 | }%
708 | }%
709 | \BHFN@OldMakefntext{#1}%
710 | }
711 |
712 | %----------------------------------------------------------------------------------------
713 | % COLOURS
714 | %----------------------------------------------------------------------------------------
715 |
716 | % Uncomment to have coloured headings
717 | %\addtokomafont{title}{\color{Maroon}}
718 | %\addtokomafont{part}{\color{Maroon}}
719 | %\addtokomafont{chapter}{\color{Maroon}}
720 | %\addtokomafont{section}{\color{Maroon}}
721 | %\addtokomafont{subsection}{\color{Maroon}}
722 | %\addtokomafont{subsubsection}{\color{Maroon}}
723 | %\addtokomafont{paragraph}{\color{Maroon}}
724 | %\addtokomafont{captionlabel}{\color{DarkBlue}}
725 | %\addtokomafont{pagenumber}{\color{Maroon}}
726 |
727 | \hypersetup{
728 | %anchorcolor=Red,
729 | %citecolor=DarkOrange!70!black,
730 | citecolor=OliveGreen,
731 | filecolor=OliveGreen,
732 | %linkcolor=DarkBlue,
733 | linkcolor=Black,
734 | %menucolor=Red,
735 | %runcolor=Red,
736 | urlcolor=OliveGreen,
737 | }
738 |
739 | %----------------------------------------------------------------------------------------
740 | % INCLUDE ADDITIONAL PACKAGES
741 | %----------------------------------------------------------------------------------------
742 |
743 | \RequirePackage{styles/environments}
744 | \RequirePackage{styles/packages}
745 | \RequirePackage{styles/kaorefs}
746 |
--------------------------------------------------------------------------------
/styles/kaobiblio.sty:
--------------------------------------------------------------------------------
1 | %% kaobiblio.sty
2 | %% Copyright 2020 Federico Marotta
3 | %
4 | % This work may be distributed and/or modified under the
5 | % conditions of the LaTeX Project Public License, either version 1.3
6 | % of this license or (at your option) any later version.
7 | % The latest version of this license is in
8 | % http://www.latex-project.org/lppl.txt
9 | % and version 1.3 or later is part of all distributions of LaTeX
10 | % version 2005/12/01 or later.
11 | %
12 | % This work has the LPPL maintenance status `maintained'.
13 | %
14 | % The Current Maintainer of this work is Federico Marotta
15 | %
16 | % This work consists of all the files listed in MANIFEST.md.
17 |
18 | \ProvidesPackage{styles/kaobiblio}
19 |
20 | \RequirePackage{etoolbox} % Easy programming to modify TeX stuff
21 | \RequirePackage{calc} % Operations like sums and differences
22 | \RequirePackage{marginnote} % Provides options for margin notes
23 | \RequirePackage{perpage} % Reset counters
24 | \RequirePackage{xkeyval} % Manage class options
25 | \RequirePackage{xparse} % Parse arguments for macros
26 | \RequirePackage{xstring} % Parse strings
27 | \RequirePackage{hyperref} % Required for hyperlinks
28 |
29 |
30 | % Choose the default options, which will be overwritten by the options passed to this package.
31 | \PassOptionsToPackage{
32 | %style=numeric-comp,
33 | %citestyle=authortitle-icomp,
34 | citestyle=numeric-comp,
35 | %bibstyle=authoryear,
36 | bibstyle=numeric,
37 | sorting=none,
38 | %sorting=nyt,
39 | %sortcites=true,
40 | %autocite=footnote,
41 | backend=biber, % Compile the bibliography with biber
42 | hyperref=true,
43 | backref=true,
44 | citecounter=true,
45 | citetracker=true,
46 | ibidtracker=context,
47 | }{biblatex}
48 |
49 | % Pass this package's options to biblatex, overwriting the previous settings.
50 | \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{biblatex}}
51 |
52 | % Process the options
53 | \ProcessOptions\relax
54 |
55 | % Load biblatex
56 | \RequirePackage{biblatex}
57 |
58 | % Remove some unwanted entries from the bibliography
59 | \AtEveryBibitem{
60 | \clearfield{issn}
61 | \clearfield{isbn}
62 | \clearfield{archivePrefix}
63 | \clearfield{arxivId}
64 | \clearfield{pmid}
65 | \clearfield{eprint}
66 | \ifentrytype{online}{}{\ifentrytype{misc}{}{\clearfield{url}}}
67 | \ifentrytype{book}{\clearfield{doi}}{}
68 | }
69 |
70 | %----------------------------------------------------------------------------------------
71 | % BACK REFERENCES
72 | %----------------------------------------------------------------------------------------
73 |
74 | % Check if a string is in a comma-separated list
75 | \newcommand\IfStringInList[2]{\IfSubStr{,#2,}{,#1,}}
76 |
77 | % Set the back reference strings
78 | \IfStringInList{english}{\bbl@loaded}{
79 | \DefineBibliographyStrings{english}{%
80 | backrefpage = {cited on page},
81 | backrefpages = {cited on pages},
82 | }
83 | }{}
84 | \IfStringInList{italian}{\bbl@loaded}{
85 | \DefineBibliographyStrings{italian}{%
86 | backrefpage = {citato a pag.},
87 | backrefpages = {citato a pagg.},
88 | }
89 | }{}
90 |
91 | %----------------------------------------------------------------------------------------
92 | % CITATION COMMANDS
93 | %----------------------------------------------------------------------------------------
94 |
95 | \newlength\sclen
96 |
97 | % Command to print a citation in the margins
98 | \NewDocumentCommand{\sidecite}{O{0pt}m}{% The optional parameter is the vertical shift; the mandatory one is the citation key
99 | \cite{#2}% With this we print the marker in the text and add the item to the bibliography at the end
100 | \margincitation[#1]{#2}% We then pass the cited items to this command, \margincitation
101 | }
102 |
103 | % Command to split the cited items and execute an action for each of them
104 | \NewDocumentCommand{\margincitation}{O{0pt}>{\SplitList{,}}m}{% The mandatory parameter is a comma-separated list of citation keys, which is splitted into single items
105 | \setlength{\sclen}{#1-1pt}
106 | \marginnote[\sclen]{\ProcessList{#2}{\formatmargincitation}}% Create a marginnote for each item
107 | }
108 |
109 | % Command to format the marginnote created for cited items
110 | \NewDocumentCommand{\formatmargincitation}{m}{% The parameter is a single citation key
111 | \parencite{#1}: \citeauthor*{#1} (\citeyear{#1}), \citetitle{#1}\\
112 | }
113 |
114 | %----------------------------------------------------------------------------------------
115 | % CITATION ENVIRONMENTS
116 | %----------------------------------------------------------------------------------------
117 |
118 | % TODO: create a fancy environment for this. Perhaps printing also the
119 | % abstract.
120 |
121 | % Cite commands (assuming biblatex is loaded)
122 | \DeclareCiteCommand{\fullcite}{%
123 | \defcounter{maxnames}{99}%
124 | \usebibmacro{prenote}}
125 | {\clearfield{url}%
126 | \clearfield{pages}%
127 | \clearfield{pagetotal}%
128 | \clearfield{edition}%
129 | \clearfield{issn}%
130 | \clearfield{doi}%
131 | \usedriver
132 | {\DeclareNameAlias{sortname}{default}}
133 | {\thefield{entrytype}}
134 | }
135 | {\multicitedelim}
136 | {\usebibmacro{postnote}}
137 |
--------------------------------------------------------------------------------
/styles/kaorefs.sty:
--------------------------------------------------------------------------------
1 | %% kaorefs.sty
2 | %% Copyright 2020 Federico Marotta
3 | %
4 | % This work may be distributed and/or modified under the
5 | % conditions of the LaTeX Project Public License, either version 1.3
6 | % of this license or (at your option) any later version.
7 | % The latest version of this license is in
8 | % http://www.latex-project.org/lppl.txt
9 | % and version 1.3 or later is part of all distributions of LaTeX
10 | % version 2005/12/01 or later.
11 | %
12 | % This work has the LPPL maintenance status `maintained'.
13 | %
14 | % The Current Maintainer of this work is Federico Marotta
15 | %
16 | % This work consists of all the files listed in MANIFEST.md.
17 |
18 | \ProvidesPackage{styles/kaorefs}
19 |
20 | % Easily label and reference elements
21 | % Note that \label must appear after \caption
22 |
23 | \RequirePackage{hyperref}
24 | \RequirePackage{varioref}
25 | %\RequirePackage{cleveref} % Don't use cleveref! It breaks everything
26 |
27 | \newcommand{\sectionname}{Section}
28 | \newcommand{\subsectionname}{Subsection}
29 |
30 | \newcommand{\labpage}[1]{\label{page:#1}}
31 | \newcommand{\labpart}[1]{\label{part:#1}}
32 | \newcommand{\labch}[1]{\label{ch:#1}}
33 | \newcommand{\labsec}[1]{\label{sec:#1}}
34 | \newcommand{\labsubsec}[1]{\label{subsec:#1}}
35 | \newcommand{\labfig}[1]{\label{fig:#1}}
36 | \newcommand{\labtab}[1]{\label{tab:#1}}
37 | \newcommand{\labeq}[1]{\label{eq:#1}}
38 | \newcommand{\labdef}[1]{\label{def:#1}}
39 | \newcommand{\labthm}[1]{\label{thm:#1}}
40 | \newcommand{\labprop}[1]{\label{prop:#1}}
41 | \newcommand{\lablemma}[1]{\label{lemma:#1}}
42 | \newcommand{\labremark}[1]{\label{remark:#1}}
43 | \newcommand{\labexample}[1]{\label{example:#1}}
44 | \newcommand{\labexercise}[1]{\label{exercise:#1}}
45 |
46 | \newcommand{\refpage}[1]{\hyperref[#1]{\pagename}\xspace\pageref{page:#1}} % Page 84
47 | \newcommand{\vrefpage}[1]{\vpageref*{page:#1}} % on the following page, on page 84
48 |
49 | \newcommand{\refpart}[1]{\hyperref[part:#1]{\partname}\xspace\ref{part:#1}} % Part IV
50 | \newcommand{\vrefpart}[1]{\hyperref[part:#1]{\partname}\xspace\vref{part:#1}} % Part IV, Part IV on the following page, Part IV on page 84
51 | \newcommand{\nrefpart}[1]{\hyperref[part:#1]{\partname}\xspace\ref{part:#1} (\nameref{part:#1})}
52 | \newcommand{\frefpart}[1]{\hyperref[part:#1]{\partname\xspace\ref{part:#1} (\nameref{part:#1}) \vpageref{part{#1}}}} % Part IV (Name of the Part), Part IV (Name of the Part) on the following page, Part IV (Name of the Part) on page 84)
53 |
54 | %\newcommand{\refch}[1]{\hyperref[#1]{\chaptername\xspace\usekomafont{chapter}\normalsize\nameref{ch:#1}}\xspace\vpageref{ch:#1}\,}
55 | \newcommand{\refch}[1]{\hyperref[ch:#1]{\chaptername\xspace\ref{ch:#1}}}
56 | \newcommand{\vrefch}[1]{\hyperref[ch:#1]{\chaptername\xspace\vref{ch:#1}}}
57 | \newcommand{\nrefch}[1]{\hyperref[ch:#1]{\chaptername\xspace\ref{ch:#1} (\nameref{ch:#1})}}
58 | \newcommand{\frefch}[1]{\hyperref[ch:#1]{\chaptername\xspace\ref{ch:#1} (\nameref{ch:#1}) \vpageref{ch:#1}}}
59 |
60 | %\newcommand{\refsec}[1]{Section~{\usekomafont{section}\normalsize\nameref{sec:#1}}\xspace\vpageref{sec:#1}\,}
61 | \newcommand{\refsec}[1]{\hyperref[sec:#1]{\sectionname\xspace\ref{sec:#1}}}
62 | \newcommand{\vrefsec}[1]{\hyperref[sec:#1]{\sectionname\xspace\vref{sec:#1}}}
63 | \newcommand{\nrefsec}[1]{\hyperref[sec:#1]{\sectionname\xspace\ref{sec:#1} (\nameref{sec:#1})}}
64 | \newcommand{\frefsec}[1]{\hyperref[sec:#1]{\sectionname\xspace\ref{sec:#1} (\nameref{sec:#1}) \vpageref{sec:#1}}}
65 |
66 | \newcommand{\refsubsec}[1]{\hyperref[subsec:#1]{\subsectionname\xspace\ref{subsec:#1}}}
67 | \newcommand{\vrefsubsec}[1]{\hyperref[subsec:#1]{\subsectionname\xspace\vref{subsec:#1}}}
68 | \newcommand{\nrefsubsec}[1]{\hyperref[subsec:#1]{\subsectionname\xspace\ref{subsec:#1} (\nameref{subsec:#1})}}
69 | \newcommand{\frefsubsec}[1]{\hyperref[subsec:#1]{\subsectionname\xspace\ref{subsec:#1} (\nameref{subsec:#1}) \vpageref{subsec:#1}}}
70 |
71 | %\newcommand{\reffig}[1]{{\hypersetup{colorlinks=false}\usekomafont{captionlabel}\hyperref[fig:#1]{Figure}\xspace\ref{fig:#1}}}
72 | \newcommand{\reffig}[1]{\hyperref[fig:#1]{\figurename}\xspace\ref{fig:#1}}
73 | \newcommand{\vreffig}[1]{\hyperref[fig:#1]{\figurename\xspace\vref{fig:#1}}}
74 |
75 | %\newcommand{\reftab}[1]{{\hypersetup{colorlinks=false}\usekomafont{captionlabel}\hyperref[tab:#1]{Table}\xspace\ref{tab:#1}}}
76 | \newcommand{\reftab}[1]{\hyperref[tab:#1]{\tablename}\xspace\ref{tab:#1}}
77 | \newcommand{\vreftab}[1]{\hyperref[tab:#1]{\tablename\xspace\vref{tab:#1}}}
78 |
79 | \newcommand{\refeq}[1]{\hyperref[eq:#1]{Equation}\xspace\ref{eq:#1}}
80 | \newcommand{\vrefeq}[1]{\hyperref[eq:#1]{Equation}\xspace\vref{eq:#1}}
81 |
82 | \newcommand{\refdef}[1]{\hyperref[def:#1]{Definition}\xspace\ref{def:#1}}
83 | \newcommand{\vrefdef}[1]{\hyperref[def:#1]{Definition}\xspace\vref{def:#1}}
84 |
85 | \newcommand{\refthm}[1]{\hyperref[thm:#1]{Theorem}\xspace\ref{thm:#1}}
86 | \newcommand{\vrefthm}[1]{\hyperref[thm:#1]{Theorem}\xspace\vref{thm:#1}}
87 |
88 | \newcommand{\refprop}[1]{\hyperref[prop:#1]{Proposition}\xspace\ref{prop:#1}}
89 | \newcommand{\vrefprop}[1]{\hyperref[prop:#1]{Proposition}\xspace\vref{prop:#1}}
90 |
91 | \newcommand{\reflemma}[1]{\hyperref[lemma:#1]{Lemma}\xspace\ref{lemma:#1}}
92 | \newcommand{\vreflemma}[1]{\hyperref[lemma:#1]{Lemma}\xspace\vref{lemma:#1}}
93 |
94 | \newcommand{\refremark}[1]{\hyperref[remark:#1]{Remark}\xspace\ref{remark:#1}}
95 | \newcommand{\vrefremark}[1]{\hyperref[remark:#1]{Remark}\xspace\vref{remark:#1}}
96 |
97 | \newcommand{\refexample}[1]{\hyperref[example:#1]{Example}\xspace\ref{example:#1}}
98 | \newcommand{\vrefexample}[1]{\hyperref[example:#1]{Example}\xspace\vref{example:#1}}
99 |
100 | \newcommand{\refexercise}[1]{\hyperref[exercise:#1]{Exercise}\xspace\ref{exercise:#1}}
101 | \newcommand{\vrefexercise}[1]{\hyperref[exercise:#1]{Exercise}\xspace\vref{exercise:#1}}
102 |
--------------------------------------------------------------------------------
/styles/mdftheorems.sty:
--------------------------------------------------------------------------------
1 | %% mdftheorems.sty
2 | %% Copyright 2020 Federico Marotta
3 | %
4 | % This work may be distributed and/or modified under the
5 | % conditions of the LaTeX Project Public License, either version 1.3
6 | % of this license or (at your option) any later version.
7 | % The latest version of this license is in
8 | % http://www.latex-project.org/lppl.txt
9 | % and version 1.3 or later is part of all distributions of LaTeX
10 | % version 2005/12/01 or later.
11 | %
12 | % This work has the LPPL maintenance status `maintained'.
13 | %
14 | % The Current Maintainer of this work is Federico Marotta
15 | %
16 | % This work consists of all the files listed in MANIFEST.md.
17 |
18 | \ProvidesPackage{styles/mdftheorems}
19 |
20 | % Use mdframed to shade the background of theorems
21 |
22 | \let\openbox\relax
23 | \usepackage{amsmath} % Improved mathematics
24 | \usepackage{amsfonts} % Mathematical fonts
25 | \usepackage{amssymb} % AMS symbols and environments
26 | \usepackage{amsthm} % Mathematical environments
27 | \usepackage{thmtools}
28 | \usepackage{tikz}
29 | \usepackage[framemethod=TikZ]{mdframed}
30 |
31 | % Box style
32 | \mdfsetup{skipabove=\topskip,skipbelow=0pt}%-.5\topskip}
33 | \mdfdefinestyle{mdfkao}{
34 | skipabove=\topskip,
35 | skipbelow=\topskip, % Does not work :(
36 | rightmargin=0pt,
37 | leftmargin=0pt,
38 | innertopmargin=7pt,
39 | innerbottommargin=3pt,
40 | innerrightmargin=5pt,
41 | innerleftmargin=5pt,
42 | topline=false,
43 | bottomline=false,
44 | rightline=false,
45 | leftline=false,
46 | %linewidth=1pt,
47 | %roundcorner=0pt,
48 | %font={},
49 | %frametitlefont={},
50 | frametitlerule=true,
51 | %linecolor=black,
52 | %backgroundcolor=LightBlue,
53 | %fontcolor=black,
54 | %frametitlebackgroundcolor=LightBlue,
55 | }
56 |
57 | % Theorem styles
58 | \declaretheoremstyle[
59 | %spaceabove=.5\thm@preskip,
60 | %spacebelow=.5\thm@postskip,
61 | %headfont=\normalfont\bfseries,%\scshape,
62 | %notefont=\normalfont, notebraces={ (}{)},
63 | bodyfont=\normalfont\itshape,
64 | %headformat={\NAME\space\NUMBER\space\NOTE},
65 | headpunct={},
66 | %postheadspace={.5em plus .1em minus .1em},
67 | %prefoothook={\hfill\qedsymbol}
68 | ]{kaoplain}
69 |
70 | \declaretheoremstyle[
71 | %spaceabove=.5\thm@preskip,
72 | %spacebelow=.5\thm@postskip,
73 | %headfont=\normalfont\bfseries,%\scshape,
74 | %notefont=\normalfont, notebraces={ (}{)},
75 | bodyfont=\normalfont\itshape,
76 | %headformat={\NAME\space\NUMBER\space\NOTE},
77 | headpunct={},
78 | postheadspace={.5em plus .1em minus .1em},
79 | %prefoothook={\hfill\qedsymbol}
80 | ]{kaodefinition}
81 |
82 | \declaretheoremstyle[
83 | %spaceabove=.5\thm@preskip,
84 | %spacebelow=.5\thm@postskip,
85 | %headfont=\normalfont\bfseries,
86 | %notefont=\normalfont, notebraces={ (}{)},
87 | %bodyfont=\normalfont,
88 | %headformat={\footnotesize$\triangleright$\space\normalsize\NAME\space\NUMBER\space\NOTE},
89 | %headformat={\NAME\space\NUMBER\space\NOTE},
90 | headpunct={},
91 | postheadspace={.5em plus .1em minus .1em},
92 | %refname={theorem,theorems},
93 | %Refname={Theorem,Theorems},
94 | ]{kaoremark}
95 |
96 | \declaretheoremstyle[
97 | %spaceabove=.5\thm@preskip,
98 | %spacebelow=.5\thm@postskip,
99 | %headfont=\normalfont\bfseries,
100 | %notefont=\normalfont, notebraces={ (}{)},
101 | %bodyfont=\normalfont,
102 | %headformat={\NAME\space\NUMBER\space\NOTE},
103 | headpunct={},
104 | postheadspace={.5em plus .1em minus .1em},
105 | %prefoothook={\hfill\qedsymbol}
106 | %refname={theorem,theorems},
107 | %Refname={Theorem,Theorems},
108 | ]{kaoexample}
109 |
110 | \theoremstyle{kaoplain}
111 | \declaretheorem[
112 | name=Theorem,
113 | style=kaoplain,
114 | refname={theorem,theorems},
115 | Refname={Theorem,Theorems},
116 | numberwithin=section,
117 | mdframed={
118 | style=mdfkao,
119 | backgroundcolor=Goldenrod!45!white,
120 | frametitlebackgroundcolor=Goldenrod!45!white,
121 | },
122 | ]{theorem}
123 | \declaretheorem[
124 | name=Proposition,
125 | refname={proposition,propositions},
126 | Refname={Proposition,Propositions},
127 | sibling=theorem,
128 | mdframed={
129 | style=mdfkao,
130 | backgroundcolor=Goldenrod!45!white,
131 | frametitlebackgroundcolor=Goldenrod!45!white,
132 | },
133 | ]{proposition}
134 | \declaretheorem[
135 | name=Lemma,
136 | refname={lemma,lemmas},
137 | Refname={Lemma,Lemmas},
138 | sibling=theorem,
139 | mdframed={
140 | style=mdfkao,
141 | backgroundcolor=Goldenrod!45!white,
142 | frametitlebackgroundcolor=Goldenrod!45!white,
143 | },
144 | ]{lemma}
145 | \declaretheorem[
146 | name=Corollary,
147 | refname={corollary,corollaries},
148 | Refname={Corollary,Corollaries},
149 | sibling=theorem,
150 | mdframed={
151 | style=mdfkao,
152 | backgroundcolor=Goldenrod!45!white,
153 | frametitlebackgroundcolor=Goldenrod!45!white,
154 | },
155 | ]{corollary}
156 |
157 | \theoremstyle{kaodefinition}
158 | \declaretheorem[
159 | name=Definition,
160 | refname={definition,definitions},
161 | Refname={Definition,Definitions},
162 | numberwithin=section,
163 | mdframed={
164 | style=mdfkao,
165 | backgroundcolor=Goldenrod!45!white,
166 | frametitlebackgroundcolor=Goldenrod!45!white,
167 | },
168 | ]{definition}
169 |
170 | \theoremstyle{kaoremark}
171 | \declaretheorem[
172 | name=Remark,
173 | refname={remark,remarks},
174 | Refname={Remark,Remarks},
175 | numberwithin=section,
176 | mdframed={
177 | style=mdfkao,
178 | backgroundcolor=Goldenrod!45!white,
179 | frametitlebackgroundcolor=Goldenrod!45!white,
180 | },
181 | ]{remark}
182 |
183 | \theoremstyle{kaoexample}
184 | \declaretheorem[
185 | name=Example,
186 | refname={example,examples},
187 | Refname={Example,Examples},
188 | numberwithin=section,
189 | mdframed={
190 | style=mdfkao,
191 | backgroundcolor=Goldenrod!45!white,
192 | frametitlebackgroundcolor=Goldenrod!45!white,
193 | },
194 | ]{example}
195 |
196 | %\renewcommand{\thetheorem}{\arabic{chapter}.\arabic{section}.\arabic{theorem}}
197 | %\renewcommand{\thetheorem}{\arabic{subsection}.\arabic{theorem}}
198 | %\renewcommand{\qedsymbol}{$\blacksquare$}
199 |
--------------------------------------------------------------------------------
/styles/packages.sty:
--------------------------------------------------------------------------------
1 | %% packages.sty
2 | %% Copyright 2020 Federico Marotta
3 | %
4 | % This work may be distributed and/or modified under the
5 | % conditions of the LaTeX Project Public License, either version 1.3
6 | % of this license or (at your option) any later version.
7 | % The latest version of this license is in
8 | % http://www.latex-project.org/lppl.txt
9 | % and version 1.3 or later is part of all distributions of LaTeX
10 | % version 2005/12/01 or later.
11 | %
12 | % This work has the LPPL maintenance status `maintained'.
13 | %
14 | % The Current Maintainer of this work is Federico Marotta
15 | %
16 | % This work consists of all the files listed in MANIFEST.md.
17 |
18 | \ProvidesPackage{styles/packages}
19 |
20 | % Productivity
21 | \RequirePackage{pdfpages} % Insert PDF pages
22 | \RequirePackage{subfiles} % Adopt a modular structure
23 | \RequirePackage{todonotes} % Add useful notes in the margins
24 |
25 | % Listings code
26 | \RequirePackage{listings} % Code
27 | %\RequirePackage{minted}
28 | \RequirePackage{morewrites}
29 |
30 | \newsavebox\mycap
31 | \DeclareCaptionFormat{llap}{%
32 | \begin{lrbox}{\mycap}%
33 | \begin{minipage}{\marginparwidth}%
34 | \@margin@par #1:#2#3%
35 | \end{minipage}%
36 | \end{lrbox}%
37 | \marginnote[0.2cm]{\usebox\mycap}%
38 | }
39 | \captionsetup[lstlisting]{format=llap,labelsep=space,singlelinecheck=no,belowskip=-0.6cm}
40 |
41 | \definecolor{listingkeywords}{rgb}{0.0, 0.5, 0.0}
42 | \definecolor{listingidentifiers}{rgb}{0, 0, 0}
43 | \definecolor{listingcomments}{rgb}{0.25, 0.5, 0.5}
44 | \definecolor{listingstrings}{rgb}{0.73, 0.13, 0.13}
45 | \definecolor{listingnumbers}{rgb}{0.25, 0.25, 0.25}
46 | \lstdefinestyle{kaolst}{
47 | aboveskip=0.7\topskip,
48 | belowskip=0.1\topskip,
49 | basicstyle=\small\ttfamily,
50 | commentstyle=\color{listingcomments}\itshape,
51 | keywordstyle=\color{listingkeywords}\bfseries,
52 | numberstyle=\scriptsize\color{listingnumbers}\ttfamily,
53 | stringstyle=\color{listingstrings},
54 | identifierstyle=\color{listingidentifiers},
55 | backgroundcolor=\color{White},
56 | breakatwhitespace=false,
57 | breaklines=true,
58 | captionpos=t,
59 | keepspaces=true,
60 | showspaces=false,
61 | showstringspaces=false,
62 | showtabs=false,
63 | numbers=left,
64 | numbersep=1em,
65 | %frame=lines,
66 | frame=l,
67 | framerule=.7pt,
68 | tabsize=4,
69 | defaultdialect=[LaTeX]Tex,
70 | }
71 | \lstdefinestyle{kaolstplain}{
72 | aboveskip=0.6\topskip,
73 | belowskip=-0.1\topskip,
74 | basicstyle=\small\ttfamily,
75 | commentstyle=\color{listingcomments}\itshape,
76 | keywordstyle=\color{listingkeywords}\bfseries,
77 | numberstyle=\scriptsize\color{listingnumbers}\ttfamily,
78 | stringstyle=\color{listingstrings},
79 | identifierstyle=\color{listingidentifiers},
80 | backgroundcolor=\color{White},
81 | breakatwhitespace=false,
82 | breaklines=true,
83 | captionpos=b,
84 | keepspaces=true,
85 | showspaces=false,
86 | showstringspaces=false,
87 | showtabs=false,
88 | numbers=none,
89 | frame=none,
90 | tabsize=4,
91 | defaultdialect=[LaTeX]Tex,
92 | }
93 | \lstset{style=kaolst}
94 |
95 | % Verbatim
96 | %\RequirePackage{fancyvrb} % Customization of verbatim environments
97 | %\fvset{fontsize=\normalsize} % Change here the font size of all
98 | %verbatim \preto{\@verbatim}{\topsep=0pt \partopsep=0pt }
99 |
100 | % Algorithms
101 | \RequirePackage[linesnumbered, ruled, vlined]{algorithm2e} % Algorithms
102 |
103 | % Special gliphs
104 | \RequirePackage{ccicons} % Creative Commons icons
105 | \RequirePackage{metalogo} % XeTeX logo
106 |
107 | % Index, glossary and nomenclature
108 | \RequirePackage{imakeidx}
109 | \RequirePackage[xindy,toc]{glossaries}
110 | \RequirePackage[intoc]{nomencl}
111 |
112 | % Commands to print specific wors always in the same way
113 | % TODO: in \Command, automatically escape braces {} and replace backslashes with \textbackslash
114 | \newcommand{\Class}[1]{\texttt{#1}}
115 | \newcommand{\Package}[1]{\texttt{#1}}
116 | \newcommand{\Option}[1]{\texttt{#1}}
117 | \newcommand{\Command}[1]{\texttt{\textbackslash#1}}
118 | \newcommand{\Environment}[1]{\texttt{#1}}
119 | \newcommand{\Path}[1]{\texttt{#1}}
120 |
121 | % Print latin words in italics (The xspace package is required but we already loaded it in the class)
122 | \newcommand{\hairsp}{\hspace{1pt}} % Command to print a very short space
123 | \newcommand{\invitro}{\textit{in vitro}\xspace}
124 | \newcommand{\invivo}{\textit{in vivo}\xspace}
125 | \newcommand{\cis}{\textit{cis}\xspace}
126 | \newcommand{\trans}{\textit{trans}\xspace}
127 | \newcommand{\etal}{\textit{et al.}\xspace}
128 | \newcommand{\denovo}{\textit{de novo}\xspace}
129 | \newcommand{\adhoc}{\textit{ad hoc}\xspace}
130 | \newcommand{\etcetera}{\textit{et cetera}\xspace}
131 | \newcommand{\etc}{\textit{etc.}\xspace}
132 | \newcommand{\ie}{\textit{i.\nobreak\hairsp{}e.}\xspace}
133 | \newcommand{\eg}{\textit{e.\nobreak\hairsp{}g.}\xspace}
134 | \newcommand{\vs}{\textit{vs}\xspace}
135 | \newcommand{\cfr}{\textit{cfr.}\xspace}
136 |
137 | % Tables
138 | \newcommand{\na}{\quad--} % Used in tables for N/A cells
139 | \newcommand{\hangp}[1]{\makebox[0pt][r]{(}#1\makebox[0pt][l]{)}} % Create parentheses around text in tables which take up no horizontal space - this improves column spacing
140 | \newcommand{\hangstar}{\makebox[0pt][l]{*}} % Create asterisks in tables which take up no horizontal space - this improves column spacing
141 |
142 | % A command to print the current month and year (from tufte-latex)
143 | \newcommand{\monthyear}{\ifcase\month\or January\or February\or March\or
144 | April\or May\or June\or July\or August\or September\or October\or
145 | November\or December\fi\space\number\year}
146 |
--------------------------------------------------------------------------------
/styles/plaintheorems.sty:
--------------------------------------------------------------------------------
1 | %% plaintheorems.sty
2 | %% Copyright 2020 Federico Marotta
3 | %
4 | % This work may be distributed and/or modified under the
5 | % conditions of the LaTeX Project Public License, either version 1.3
6 | % of this license or (at your option) any later version.
7 | % The latest version of this license is in
8 | % http://www.latex-project.org/lppl.txt
9 | % and version 1.3 or later is part of all distributions of LaTeX
10 | % version 2005/12/01 or later.
11 | %
12 | % This work has the LPPL maintenance status `maintained'.
13 | %
14 | % The Current Maintainer of this work is Federico Marotta
15 | %
16 | % This work consists of all the files listed in MANIFEST.md.
17 |
18 | \ProvidesPackage{styles/plaintheorems}
19 |
20 | % Plain ams* theorems
21 |
22 | \let\openbox\relax
23 | \usepackage{amsmath} % Improved mathematics
24 | \usepackage{amsfonts} % Mathematical fonts
25 | \usepackage{amssymb} % AMS symbols and environments
26 | \usepackage{amsthm} % Mathematical environments
27 | \usepackage{thmtools}
28 | %\usepackage{unicode-math} % Use unicode math font, not TeX
29 | %\usepackage{mathtools} % More math symbols and environments
30 | %\setmathfont{Asana-Math.otf}
31 |
32 | % Edit the following to create a new style (NOTE: it is much simpler using thmtools!)
33 | %\newtheoremstyle{theorem}% name of the style to be used
34 | %{spaceabove}% measure of space to leave above the theorem. E.g.: 3pt
35 | %{spacebelow}% measure of space to leave below the theorem. E.g.: 3pt
36 | %{bodyfont}% name of font to use in the body of the theorem
37 | %{indent}% measure of space to indent
38 | %{headfont}% name of head font
39 | %{headpunctuation}% punctuation between head and body
40 | %{headspace}% space after theorem head; " " = normal interword space
41 | %{headspec}% Manually specify head
42 |
43 | % Theorem styles
44 | \declaretheoremstyle[
45 | spaceabove=.6\thm@preskip,
46 | spacebelow=.1\thm@postskip,
47 | %headfont=\normalfont\bfseries,%\scshape,
48 | %notefont=\normalfont, notebraces={ (}{)},
49 | bodyfont=\normalfont\itshape,
50 | %headformat={\NAME\space\NUMBER\space\NOTE},
51 | headpunct={},
52 | %postheadspace={.5em plus .1em minus .1em},
53 | %prefoothook={\hfill\qedsymbol}
54 | ]{kaoplain}
55 |
56 | \declaretheoremstyle[
57 | spaceabove=.6\thm@preskip,
58 | spacebelow=.1\thm@postskip,
59 | %headfont=\normalfont\bfseries,%\scshape,
60 | %notefont=\normalfont, notebraces={ (}{)},
61 | bodyfont=\normalfont\itshape,
62 | %headformat={\NAME\space\NUMBER\space\NOTE},
63 | headpunct={},
64 | %postheadspace={.5em plus .1em minus .1em},
65 | %prefoothook={\hfill\qedsymbol}
66 | ]{kaodefinition}
67 |
68 | \declaretheoremstyle[
69 | spaceabove=.6\thm@preskip,
70 | spacebelow=.1\thm@postskip,
71 | %headfont=\normalfont\bfseries,
72 | %notefont=\normalfont, notebraces={ (}{)},
73 | %bodyfont=\normalfont,
74 | %headformat={\footnotesize$\triangleright$\space\normalsize\NAME\space\NUMBER\space\NOTE},
75 | %headformat={\NAME\space\NUMBER\space\NOTE},
76 | headpunct={},
77 | %postheadspace={.5em plus .1em minus .1em},
78 | %refname={theorem,theorems},
79 | %Refname={Theorem,Theorems},
80 | ]{kaoremark}
81 |
82 | \declaretheoremstyle[
83 | spaceabove=.6\thm@preskip,
84 | spacebelow=.1\thm@postskip,
85 | %headfont=\normalfont\bfseries,
86 | %notefont=\normalfont, notebraces={ (}{)},
87 | %bodyfont=\normalfont,
88 | %headformat={\NAME\space\NUMBER\space\NOTE},
89 | headpunct={},
90 | %postheadspace={.5em plus .1em minus .1em},
91 | %prefoothook={\hfill\qedsymbol}
92 | %refname={theorem,theorems},
93 | %Refname={Theorem,Theorems},
94 | ]{kaoexample}
95 |
96 | \theoremstyle{kaoplain}
97 |
98 | \declaretheorem[
99 | name=Theorem,
100 | refname={theorem,theorems},
101 | Refname={Theorem,Theorems},
102 | numberwithin=section,
103 | ]{theorem}
104 |
105 | \declaretheorem[
106 | name=Proposition,
107 | refname={proposition,propositions},
108 | Refname={Proposition,Propositions},
109 | sibling=theorem,
110 | ]{proposition}
111 |
112 | \declaretheorem[
113 | name=Lemma,
114 | refname={lemma,lemmas},
115 | Refname={Lemma,Lemmas},
116 | sibling=theorem,
117 | ]{lemma}
118 |
119 | \declaretheorem[
120 | name=Corollary,
121 | refname={corollary,corollaries},
122 | Refname={Corollary,Corollaries},
123 | sibling=theorem,
124 | ]{corollary}
125 |
126 | \theoremstyle{kaodefinition}
127 | \declaretheorem[
128 | name=Definition,
129 | refname={definition,definitions},
130 | Refname={Definition,Definitions},
131 | numberwithin=section,
132 | ]{definition}
133 |
134 | \theoremstyle{kaoremark}
135 | \declaretheorem[
136 | name=Remark,
137 | refname={remark,remarks},
138 | Refname={Remark,Remarks},
139 | numberwithin=section,
140 | ]{remark}
141 |
142 | \theoremstyle{kaoexample}
143 | \declaretheorem[
144 | name=Example,
145 | refname={example,examples},
146 | Refname={Example,Examples},
147 | numberwithin=section,
148 | ]{example}
149 |
150 | %\renewcommand{\thetheorem}{\arabic{chapter}.\arabic{section}.\arabic{theorem}}
151 | %\renewcommand{\thetheorem}{\arabic{subsection}.\arabic{theorem}}
152 | %\renewcommand{\qedsymbol}{$\blacksquare$}
153 |
--------------------------------------------------------------------------------