Skip to content

Commit df7c413

Browse files
committed
precompiled preamble
4s compile time Signed-off-by: Jonas Dujava <[email protected]>
1 parent d50395f commit df7c413

File tree

5 files changed

+57
-25
lines changed

5 files changed

+57
-25
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
*.synctex.gz
44
*.synctex.gz(busy)
55

6+
## Precompiled preamble format file
7+
prec.fmt
8+
prec.log
9+
610
## Since the main PDF file is automatically generated with GitHub Actions
711
## and pushed to `gh-pages` branch, is is generally advised to ignore it
812
## (which makes the repository smaller and faster to clone)

Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.PHONY: all fmt pdf rebuild clean clean-all
2+
3+
all: prec.fmt thesis.pdf
4+
fmt: prec.fmt
5+
pdf: thesis.pdf
6+
7+
## see https://tony-zorman.com/posts/speeding-up-latex.html
8+
prec.fmt: prec.tex preamble/*
9+
pdflatex -ini -file-line-error -jobname="prec" "&pdflatex prec.tex\dump"
10+
11+
thesis.pdf: prec.fmt thesis.tex figures frontmatter chapters
12+
latexmk thesis
13+
14+
rebuild: prec.fmt
15+
latexmk -g thesis
16+
17+
clean:
18+
latexmk -C
19+
20+
clean-all:
21+
latexmk -C
22+
rm -rf .aux/

preamble/misc/tikz.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
\usepackage{tikz}
44
\usetikzlibrary{
5-
fadings,
5+
% fadings,
66
arrows.meta,
77
calc,
88
cd,

prec.tex

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
\def\PreambleLoaded{} % for \ifdefined\PreambleLoaded conditional
2+
3+
\newcommand*{\TeXturedVERSION}{1.4.0} %% TeXtured 2025-06-17
4+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5+
%% NOTE: If you find any issues or have any suggestions, please open %%
6+
%% an Issue on GitHub: https://github.com/jdujava/TeXtured %%
7+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8+
9+
%% Enable built-in LaTeX support for PDF/A compliance (must be before `\documentclass`)
10+
\DocumentMetadata{lang=en, pdfversion=1.7, pdfstandard=A-2u}
11+
\input{preamble/pdfA-compliance/glyphtounicode}
12+
13+
%% NOTE: Choose the desirable page layout version (electronic vs print)
14+
\documentclass[12pt,a4paper]{report} % single-side (electronic)
15+
% \documentclass[12pt,a4paper,openright,twoside]{report} % two-sided (for printing)
16+
17+
%% Set some toggle flags to control some of the document properties
18+
\input{preamble/toggles}
19+
% \FANCYfalse % disable some of the more fancy stylistic choices
20+
%% NOTE: Comment out the following lines for the final version
21+
\WIPtrue % THIS IS A WORK-IN-PROGRESS VERSION
22+
% \EXTRAMARGINtrue % add extra right margin in WIP version (for notes/corrections)
23+
% \LINKBOXESfalse % disable reference/link boxes for faster compilations
24+
\CENSORtrue % THIS IS A CENSORED VERSION
25+
26+
%% Preamble - data, packages, macros, and more
27+
\input{preamble/main}

thesis.tex

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,7 @@
1-
\newcommand*{\TeXturedVERSION}{1.4.0} %% TeXtured 2025-06-17
2-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3-
%% NOTE: If you find any issues or have any suggestions, please open %%
4-
%% an Issue on GitHub: https://github.com/jdujava/TeXtured %%
5-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1+
%&prec
2+
%! TEX root = thesis.tex
63

7-
%% Enable built-in LaTeX support for PDF/A compliance (must be before `\documentclass`)
8-
\DocumentMetadata{lang=en, pdfversion=1.7, pdfstandard=A-2u}
9-
\input{preamble/pdfA-compliance/glyphtounicode}
10-
11-
%% NOTE: Choose the desirable page layout version (electronic vs print)
12-
\documentclass[12pt,a4paper]{report} % single-side (electronic)
13-
% \documentclass[12pt,a4paper,openright,twoside]{report} % two-sided (for printing)
14-
15-
%% Set some toggle flags to control some of the document properties
16-
\input{preamble/toggles}
17-
% \FANCYfalse % disable some of the more fancy stylistic choices
18-
%% NOTE: Comment out the following lines for the final version
19-
\WIPtrue % THIS IS A WORK-IN-PROGRESS VERSION
20-
% \EXTRAMARGINtrue % add extra right margin in WIP version (for notes/corrections)
21-
% \LINKBOXESfalse % disable reference/link boxes for faster compilations
22-
\CENSORtrue % THIS IS A CENSORED VERSION
23-
24-
%% Preamble - data, packages, macros, and more
25-
\input{preamble/main}
4+
\usetikzlibrary{fadings}
265

276
%% Only uncommented files are included (faster compilation)
287
%% NOTE: If no files are uncommented, all files are included

0 commit comments

Comments
 (0)