-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(everything): add template files
Signed-off-by: Jonas Dujava <jonas.dujava@gmail.com>
- Loading branch information
Showing
67 changed files
with
2,902 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Store demo PDF in LFS (Large File Storage) | ||
thesis.pdf filter=lfs diff=lfs merge=lfs -text | ||
|
||
# Store large files in LFS (Large File Storage) | ||
figures/large/* filter=lfs diff=lfs merge=lfs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
## thanks to https://github.com/mff-cuni-cz/cuni-thesis-validator | ||
jobs: | ||
build: | ||
name: Build PDF and upload as an artifact | ||
runs-on: ubuntu-latest | ||
container: { image: 'aergus/latex' } | ||
steps: | ||
- name: Instal git-lfs | ||
run: apt-get update && apt-get install -y git-lfs | ||
- name: Set up Git repository | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
- name: Build the PDF | ||
run: latexmk thesis | ||
- name: Upload the artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Thesis | ||
path: thesis.pdf | ||
verify: | ||
name: Verify PDF/A | ||
runs-on: ubuntu-latest | ||
needs: build | ||
container: { image: ghcr.io/jdujava/cuni-thesis-validator } | ||
steps: | ||
- name: Get the PDF file from the artifact | ||
uses: actions/download-artifact@v4 | ||
- name: Verify the PDF file with VeraPDF | ||
run: verify Thesis/*.pdf | tee /dev/stderr | grep -qE 'nonCompliant="0" failedJobs="0"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## LaTeX auxiliary files: | ||
.aux | ||
*.synctex.gz | ||
|
||
## LanguageTool | ||
.ltex | ||
|
||
## ignore "old" PDF files | ||
*_old.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## Choose TeX engine for PDF generation | ||
$pdf_mode = 1; # use pdfTeX | ||
# $pdf_mode = 4; # use LuaTeX | ||
|
||
## Add `--shell-escape` flag to enable calling external programs (e.g. Inkscape) | ||
# $pdflatex = 'pdflatex --shell-escape %O %S'; | ||
# $lualatex = 'lualatex --shell-escape %O %S'; | ||
|
||
## Write all auxiliary files in a separate directory | ||
$aux_dir = '.aux'; | ||
|
||
## The aux directory structure has to match the source directory structure | ||
## in order to compile the `tex` files without problems, since pdfLaTeX | ||
## does not create the directories on its own. | ||
## https://tex.stackexchange.com/questions/323820/i-cant-write-on-file-foo-aux | ||
## NOTE: the following handles only one level of subdirectories | ||
print `find . -maxdepth 2 -type f -name "*.tex" | # find all tex files up to 2 levels deep | ||
sed -nE 's|\\./(.*)/.*|\\1|p' | sort -u | # extract directory names | ||
xargs -I {} mkdir -pv "$aux_dir"/{} # create corresponding directories in aux_dir`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<div align="center"> | ||
<a href="https://github.com/jdujava/TeXtured"> | ||
<img alt="TeXtured Template" src="./figures/TeXtured-logo-light-mode.svg#gh-light-mode-only"> | ||
<img alt="TeXtured Template" src="./figures/TeXtured-logo-dark-mode.svg#gh-dark-mode-only"> | ||
</a> | ||
</div> | ||
|
||
## 🚀 Elevator Pitch | ||
|
||
Do you care in the slightest about what your readers think about your document, | ||
and by proxy about you and your competence level? If yes, then a classy, | ||
typographically professional layout and structured, clear, and revealing content | ||
can only help. This template tries to aid you in both of these endeavours. | ||
|
||
To learn more about the design principles behind `TeXtured` and its capabilities, | ||
look at the `TeXtured` Demo (still WIP 🚧). | ||
<!-- TODO: link to github pages with demo --> | ||
|
||
> [!TIP] | ||
> If you find something interesting or useful, but adopting the whole template | ||
> is simply too much, feel free to just copy and use relevant parts of the code. | ||
> (🚧 TODO: link relevant files for corresponing features in DEMO file) | ||
## 🏗️ Building | ||
|
||
Be sure to have all the dependencies installed (at least the LaTeX build tools), and run | ||
```sh | ||
latexmk thesis | ||
``` | ||
in the root directory of the repository to build the thesis. | ||
|
||
## 📦 Software Dependencies | ||
|
||
LaTeX build tools: | ||
- `latexmk` - LaTeX build tool | ||
- `pdflatex`/`lualatex` - LaTeX engine (you can choose one in `.latexmkrc`) | ||
- `biber` - bibliography processing tool for `biblatex` | ||
|
||
> [!NOTE] | ||
> Some scripts assume `linux` environment. These include: | ||
> - generation of directory structure for `aux_dir` (dependencies are `sed`, `xargs`) | ||
> - vector figure generation (together with watermark) | ||
> + need to enable `--shell-escape` in `.latexmkrc` | ||
> + `inkscape` - vector graphics (and SVG to PDF conversion) | ||
> + `perl` - disabling `/Interpolation` in PDFs generated by `inkscape` | ||
> + `sed` - substituting placeholders in PDF watermark | ||
> + `ghostscript` - injecting `postscript` watermark into PDF | ||
<!-- TODO: maybe describe what to disable if running on Windows --> | ||
<!-- TODO: maybe utilize [details](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections) --> | ||
|
||
Version control: | ||
- `git` - (obviously) the preferred version control system | ||
- `git-lfs` - [Git Large File Storage](https://git-lfs.github.com/) - for storing PDFs, figures, etc. | ||
|
||
<!-- TODO: maybe describe what to disable if someone doesn't want to use `git-lfs` --> | ||
|
||
## 📄 Licence | ||
|
||
Exceptions: | ||
- The MFF CUNI logo `MFF-logo.pdf` is property of the corresponding faculty, see [MFF Visual Identity](https://www.mff.cuni.cz/en/faculty/visual-identity). | ||
- Figure `parallel-plate-capacitor.svg` (with corresponding files) is property of Jonáš Dujava. | ||
|
||
[<img align="center" alt="License: CC0-1.0" src="https://licensebuttons.net/p/zero/1.0/88x31.png">](http://creativecommons.org/publicdomain/zero/1.0/) | ||
All other files are marked with [CC0 1.0](http://creativecommons.org/publicdomain/zero/1.0/). | ||
|
||
Even though you are free to use the source code of `TeXtured` any way you like, attribution is welcome. | ||
<!-- TODO: biblatex entry for attribution --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Ancillary files | ||
|
||
You can put ancillary files (usually source code) in this directory, and arXiv will display them. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
\chapter{Example of Appendix Chapter} \label{appendix:example} | ||
|
||
\section{Appendix Section}% | ||
\label{sec:Appendix Section} | ||
|
||
\begin{definition}[Appendix Definition] | ||
This is an example definition. | ||
\end{definition} | ||
|
||
\begin{figure}[!ht] | ||
\centering | ||
\includegraphics[width=1.0\linewidth]{parallel-plate-capacitor} | ||
\caption{Example of a figure with a corresponding caption: Equipotentials \textcolor{Gray40}{(solid yellow lines)} and field lines \textcolor{Gray40}{(dashed yellow lines)} near a two-dimensional parallel plate capacitor \textcolor{Gray40}{(solid dark brown lines)}.} | ||
\label{fig:parallel-plate-capacitor} | ||
\end{figure} | ||
|
||
\clearpage | ||
|
||
\begin{remark} | ||
The header reflects that this is an appendix page. | ||
\end{remark} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
\chapter{Design Principles} \label{ch:Design} | ||
|
||
It is not like I stated the \emph{Principles} at the beginning and then tried to follow them. | ||
They emerged more naturally. | ||
So the causal structure is more like | ||
\[ | ||
\raisebox{-0.15ex}{\parbox[c]{6em}{\centering made some design choices}} | ||
\mspace{12mu} \text{and} \mspace{10mu} | ||
\parbox[c]{7em}{\centering implemented certain features} | ||
\quad\longleadsto{}\quad | ||
\parbox[c]{10em}{\centering recognized\\\textcolor{gray}{at first subconscious} overarching principles}~. | ||
\] | ||
Anyway, here they are. | ||
\begin{definition}[Design Principles] \label{def:Design Principles} | ||
The main design \emph{Principles} are: | ||
\begin{itemize} | ||
\item \textbf{Elegance} --- Have classy, typographically elegant, and functional layout. | ||
\item \textbf{Structure} --- Create smart, easy to reference and skim through structure. | ||
\item \textbf{Clarity} --- Eliminate distractions and strive for clear explanations. \qedhere | ||
\end{itemize} | ||
\end{definition} | ||
\begin{remark}[Common Goal, Alternative Definition via Antiprinciples] | ||
There is also an alternative point of view. The common goal of \Nref*{def:Design Principles} is to minimize the following \emph{Antiprinciples}: | ||
\begin{itemize} | ||
\item We should be concise, and that means fewer pages, the better. | ||
Long blocks of text without noticeable space between paragraphs are preferred (the reader should go on a walk to have some breathing spacetime). | ||
\item Avoid creating distinct anchor points for important concepts, since an attentive reader should be able to extract them from blocks of text. | ||
\item Do not waste time referencing earlier discussions and reflecting on them from the current context and point of view, as the reader is anyway making such connections all the time. \qedhere | ||
\end{itemize} | ||
\end{remark} | ||
|
||
Each of these principles is somehow reflected in the design choices and features included (or omitted) in \TeXtured{}, see \Cref{ch:Features} for more details. | ||
|
||
\begin{remark}[Disclaimer] | ||
The following is at places highly opinionated, and not applicable to all | ||
scenarios and use-cases. | ||
I tried to describe my reasons for specific design choices, with which you can certainly disagree. | ||
I hope that at least it can provoke more people \emph{(especially you!)} to contemplate about document creation, ideally resulting in production of documents with overall better quality. | ||
\end{remark} |
Oops, something went wrong.