aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-09-04 15:30:47 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-09-04 15:30:47 +0200
commit22198af620095899620cd992113842a523fb9c2a (patch)
tree6cb413d295e14caa77948557362bb2f4ae426a5c
parent24a26c0c3ffb34c09098dfab19a33b75632f70fc (diff)
fix compilation under latex workshop / vscode
-rw-r--r--.vscode/settings.json17
-rw-r--r--projdoc.cls3
-rw-r--r--readme.md13
3 files changed, 33 insertions, 0 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..478283a
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,17 @@
+{
+ "latex-workshop.latex.recipe.default": "latexmk",
+ "latex-workshop.latex.tools": [
+ {
+ "name": "latexmk",
+ "command": "latexmk",
+ "args": [ "-cd", "-interaction=nonstopmode", "-outdir=%OUTDIR%", "%DOCFILE%" ],
+ "env": {}
+ }
+ ],
+ "latex-workshop.latex.recipes": [
+ {
+ "name": "latexmk",
+ "tools": [ "latexmk" ]
+ }
+ ]
+}
diff --git a/projdoc.cls b/projdoc.cls
index c6e471c..b43fe56 100644
--- a/projdoc.cls
+++ b/projdoc.cls
@@ -205,6 +205,9 @@
% store figure/table count in macros
\makeatletter
+\def\figurecount{0}%
+\def\tablecount{0}%
+\def\pagecount{0}%
\AtEndDocument{
\immediate\write\@mainaux{\string\global\string\def\string\figurecount{\the\value{figure}}}
\immediate\write\@mainaux{\string\global\string\def\string\tablecount{\the\value{table}}}
diff --git a/readme.md b/readme.md
index 11b11e5..e8b3784 100644
--- a/readme.md
+++ b/readme.md
@@ -5,3 +5,16 @@ systems programming in c++ minor project documentation
Please see [style.md](./style.md) for writing style and
[contributing.md](./contributing.md) for coding and git standards.
+## Compilation
+
+- A `latexmkrc` file is provided for copmilation with `latexmk`. The documents
+ should also compile under [Visual Studio Code][vscode] using the [LaTeX
+ Workshop extension][latexworkshop], as well as [VimTeX][vimtex].
+- These documents use fonts loaded using `fontspec`, please see
+ [style.md](./style.md) for download links.
+- A `makefile` is provided for compiling other files (e.g. plantuml diagrams)
+
+[vscode]: https://code.visualstudio.com
+[latexworkshop]: https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop
+[vimtex]: https://github.com/lervag/vimtex
+