Skip to content

Commit

Permalink
feat: add latexmk config and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz Jörg committed Feb 5, 2024
1 parent 83cdd87 commit debdd31
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .latexmkrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
### -- Custom Template --------------------------------------------------------
$ENV{'TEXINPUTS'}='./IEEEtran//:' . $ENV{'TEXINPUTS'};
# $ENV{'TEXINPUTS'}='./IEEEtran//:' . $ENV{'TEXINPUTS'};
# $ENV{'TEXINPUTS'}='../uit-thesis//:' . $ENV{'TEXINPUTS'};

### -- Output options --------------------------------------------------------

$quiet = 1;
$silent = 1;
#$quiet = 1;
#$silent = 1;

# -- Build options -----------------------------------------------------------

Expand All @@ -17,4 +17,4 @@ $silent = 1;
# $pretex = '\pdfvariable suppressoptionalinfo 512\relax';
# $usepretex = 1;

$max_repeat = 5; # Try 5 times at maximum then give up
$max_repeat = 5; # Try 5 times at maximum then give up
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,19 @@

TEXSRC = $(shell find . -name "*.tex")
TEXSRC += $(shell find . -name "*.bib")
TARGET := $(patsubst %.tex,%.pdf,$(SRC))
TEXBUILD := build
TEXCOMPILE := latexmk -pdf
BIBCOMPILE := bibtex
TEXNAME := template
OUTNAME := template
TEXFLAGS := -shell-escape -interaction=nonstopmode -output-directory=$(TEXBUILD) -file-line-error
TEXFLAGS := -interaction=nonstopmode -output-directory=$(TEXBUILD) -file-line-error
TEXFILES := acn acr alg aux bbl blg def defdvi fdb_latexmk fls glg glo gls ist lof log lot out synctex.gz toc

.PHONY: all clean
all: $(TEXSRC)
@mkdir -p $(TEXBUILD)
@$(TEXCOMPILE) $(TEXFLAGS) $(TEXNAME).tex
@for aux in $(shell find . -name "*.aux"); do $(BIBCOMPILE) $$aux; done
@$(TEXCOMPILE) $(TEXFLAGS) $(TEXNAME).tex
@$(TEXCOMPILE) $(TEXFLAGS) $(TEXNAME).tex
@mv $(TEXBUILD)/$(TEXNAME).pdf $(OUTNAME).pdf

clean:
Expand Down
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## assignment-template-latex

This repository provides a simple LaTeX template for writing your Assignments at UiT (The Arctic University of Norway).

> [!NOTE]
> This is only a template. You have to adapt the template to your current assignment!
## Usage

### Build PDFs locally

Once you have installed [LaTeX](https://www.latex-project.org/) and [Inkscape](https://inkscape.org/), you can use it like this:

```console
# Creates `template.pdf` in working directory.
make all
```

Clean temp files:

```console
# Removes the temp files inside `build/`
make clean
```

## Build and release a PDF automatically

The project uses GitHub Actions to build the LaTeX document and create a release on GitHub automatically. To trigger a build, create a new release. The release will be tagged with the version number, and the PDF will be attached to the release.

## Credits

This template is using the [IEEE-Tran](https://www.ieee.org/conferences/publishing/templates.html) `cls` file.
16 changes: 8 additions & 8 deletions template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
\usepackage{url}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{svg}
% \usepackage{svg}
\usepackage{booktabs,threeparttable}
\hyphenation{op-tical net-works semi-conduc-tor IEEE-Xplore}
% updated with editorial comments 8/9/2021
Expand Down Expand Up @@ -146,7 +146,7 @@ \subsection{Virtual memory}
physical address in physical memory. This means that two processes can access the same virtual address
in their address space but get two different results since the addresses point to different
places in the physical memory. This again means that each process can use all of its 32-bit
address space while still ensuring that no other processes can access its data \cite{TanenbaumAndrewS.2024Mos}
address space while still ensuring that no other processes can access its data~\cite{TanenbaumAndrewS.2024Mos}

\bigskip

Expand All @@ -160,12 +160,12 @@ \subsection{Virtual memory}
\label{fig:block_diagram}
\end{figure}

\begin{figure}[htbp]
\centering
\includesvg[scale=0.5]{figures/NVSD_VDD_IN.svg}
\caption{Total power consumption compared between NAS and SD-Card\newline \emph{Note} the NAS-experiment did not complete in time, and the measurements for the NAS fit to the SD-card measurements}
\label{fig:local_nas_sd_compare}
\end{figure}
% \begin{figure}[htbp]
% \centering
% \includegraphics[scale=0.5]{figures/NVSD_VDD_IN.svg}
% \caption{Total power consumption compared between NAS and SD-Card\newline \emph{Note} the NAS-experiment did not complete in time, and the measurements for the NAS fit to the SD-card measurements}
% \label{fig:local_nas_sd_compare}
% \end{figure}

\begin{figure}[htbp]
\begin{center}
Expand Down

0 comments on commit debdd31

Please sign in to comment.