dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit e2459c19b52094da2156d5fc9774d06af129be23
parent 57feb3f90b3fd92ed084e7b4fa8e0de0afb906ec
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Wed, 25 May 2022 21:10:03 +0200

Updated Latex template for research paper

Diffstat:
Mlatex-templates/latex-paper/Makefile | 11++++++-----
Mlatex-templates/latex-paper/src/.projections.json | 2+-
Alatex-templates/latex-paper/src/main.tex | 73+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dlatex-templates/latex-paper/src/thesis.tex | 68--------------------------------------------------------------------
4 files changed, 80 insertions(+), 74 deletions(-)

diff --git a/latex-templates/latex-paper/Makefile b/latex-templates/latex-paper/Makefile @@ -1,9 +1,10 @@ LMK_AUXDIR=build -MAINFILE=src/thesis.tex +MAINFILE=src/main.tex +PDFNAME=output.pdf LMK_FLAGS=-bibtex -cd -auxdir=$(LMK_AUXDIR) -outdir=$(LMK_AUXDIR) SRCFILES=$(wildcard $(dir $(MAINFILE))*.tex) -PDFNAME:=$(basename $(notdir $(MAINFILE))).pdf +OUTPDF=$(dir $(MAINFILE))$(LMK_AUXDIR)/$(notdir $(basename $(MAINFILE))).pdf .PHONY: all clean cleanall open @@ -13,10 +14,10 @@ open: $(PDFNAME) @open $(PDFNAME) || xdg-open $(PDFNAME) || echo "Don't know how to open." -$(PDFNAME): $(dir $(MAINFILE))$(LMK_AUXDIR)/thesis.pdf - mv $(dir $(MAINFILE))$(LMK_AUXDIR)/thesis.pdf ./$(PDFNAME) +$(PDFNAME): $(OUTPDF) + mv $(OUTPDF) ./$(PDFNAME) -$(dir $(MAINFILE))$(LMK_AUXDIR)/thesis.pdf: $(SRCFILES) +$(OUTPDF): $(SRCFILES) latexmk $(LMK_FLAGS) -pdf $(MAINFILE) clean: diff --git a/latex-templates/latex-paper/src/.projections.json b/latex-templates/latex-paper/src/.projections.json @@ -1,4 +1,4 @@ { "references.bib": {"type": "bibliography"}, - "thesis.tex": {"type": "main"} + "main.tex": {"type": "main"} } diff --git a/latex-templates/latex-paper/src/main.tex b/latex-templates/latex-paper/src/main.tex @@ -0,0 +1,73 @@ +\documentclass[12pt,notitlepage]{article} +\usepackage[a4paper, margin=0.7in]{geometry} + +% Todo +\usepackage{todonotes} +\newgeometry{margin=2.5cm} +\setlength {\marginparwidth}{2cm} + +% Set language & encoding; Babel is good for unified rules +\usepackage[utf8]{inputenc} +\usepackage[USenglish]{babel} +\usepackage{csquotes} % recommended with Babel + +% Hyperlinks, as well as automatically adding "section..." or "chapter..." with \autoref +% Set the color of links with xcolor +\usepackage{hyperref} +\usepackage{xcolor} +\hypersetup{ + colorlinks, + linkcolor={red!50!black}, + citecolor={blue!50!black}, + urlcolor={blue!80!black} +} + +% Captions also in subfigures, and set caption style +\usepackage{caption} +\usepackage{subcaption} +\captionsetup{width=0.8\textwidth,font+=it} + +% Code listings +\usepackage{listings} +\lstset{captionpos=b, frame=lines, xleftmargin=1em, framextopmargin=0.5em, framexbottommargin=0.5em, aboveskip=1em, belowskip=1em, linewidth=0.98\linewidth, basicstyle=\small} +\captionsetup[lstlisting]{justification=centering} + +% Pictures & diagrams +\usepackage{graphicx} +\graphicspath{{images/}{diagrams/}} + +% Set up the bibliography +\usepackage[style=ieee]{biblatex} +\addbibresource{references.bib} + +% Show overfull boxes in the document +\setlength{\overfullrule}{5pt} + +% Metadata +\def\theauthor{Author} +\def\thetitle{Title} +\def\thedate{\today} +\def\theinstitution{Institution Name} +\def\thesubject{Subject} + + +% \result: insert numeric results from numbers/*.tex +\newcommand{\result}[1]{\input{numbers/#1}\unskip} + + +\begin{document} + \input{titlepage} + + \begin{abstract} + This is the abstract. + \end{abstract} + + \input{meta} + \input{introduction} + \input{background} + \input{results} + \input{related} + \input{conclusion} + \printbibliography + +\end{document} diff --git a/latex-templates/latex-paper/src/thesis.tex b/latex-templates/latex-paper/src/thesis.tex @@ -1,68 +0,0 @@ -\documentclass[12pt,notitlepage]{article} -\usepackage[a4paper, margin=0.7in]{geometry} - -% Set language & encoding; Babel is good for unified rules -\usepackage[utf8]{inputenc} -\usepackage[USenglish]{babel} -\usepackage{csquotes} % recommended with Babel - -% Hyperlinks, as well as automatically adding "section..." or "chapter..." with \autoref -% Set the color of links with xcolor -\usepackage{hyperref} -\usepackage{xcolor} -\hypersetup{ - colorlinks, - linkcolor={red!50!black}, - citecolor={blue!50!black}, - urlcolor={blue!80!black} -} - -% Captions also in subfigures, and set caption style -\usepackage{caption} -\usepackage{subcaption} -\captionsetup{width=0.8\textwidth,font+=it} - -% Code listings -\usepackage{listings} -\lstset{captionpos=b, frame=lines, xleftmargin=1em, framextopmargin=0.5em, framexbottommargin=0.5em, aboveskip=1em, belowskip=1em, linewidth=0.98\linewidth, basicstyle=\small} -\captionsetup[lstlisting]{justification=centering} - -% Pictures & diagrams -\usepackage{graphicx} -\graphicspath{{images/}{diagrams/}} - -% Set up the bibliography -\usepackage[style=ieee]{biblatex} -\addbibresource{references.bib} - -% Show overfull boxes in the document -\setlength{\overfullrule}{5pt} - -% Metadata -\def\theauthor{Author} -\def\thetitle{Title} -\def\thedate{\today} -\def\theinstitution{Institution Name} -\def\thesubject{Subject} - - -% \result: insert numeric results from numbers/*.tex -\newcommand{\result}[1]{\input{numbers/#1}\unskip} - - -\begin{document} - \input{titlepage} - - \begin{abstract} - This is the abstract. - \end{abstract} - - \input{meta} - \input{introduction} - \input{background} - \input{results} - \input{related} - \input{conclusion} - \printbibliography - -\end{document}