From 115678917f285ef45928510f61fb8cd48c6a46b5 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sun, 4 Jul 2021 17:52:10 +0200 Subject: Create standalone make target for faster compilation It takes around 20s on linux and 45s in WSL to compile the book, which is a lot. The file `standalone.tex` is a skeleton that takes the minimum required from `book.tex` to compile only our paper. It is intended only for writing the draft. --- buch/papers/punktgruppen/.gitignore | 1 + buch/papers/punktgruppen/Makefile | 18 ++++++++++++++++++ buch/papers/punktgruppen/main.tex | 6 ++++-- buch/papers/punktgruppen/standalone.tex | 30 ++++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 buch/papers/punktgruppen/.gitignore create mode 100644 buch/papers/punktgruppen/standalone.tex (limited to 'buch/papers/punktgruppen') diff --git a/buch/papers/punktgruppen/.gitignore b/buch/papers/punktgruppen/.gitignore new file mode 100644 index 0000000..6827d9f --- /dev/null +++ b/buch/papers/punktgruppen/.gitignore @@ -0,0 +1 @@ +standalone diff --git a/buch/papers/punktgruppen/Makefile b/buch/papers/punktgruppen/Makefile index 15c0aa0..3960d76 100644 --- a/buch/papers/punktgruppen/Makefile +++ b/buch/papers/punktgruppen/Makefile @@ -3,6 +3,12 @@ # # (c) 2020 Prof Dr Andreas Mueller # +SOURCES := \ + crystals.tex \ + intro.tex \ + main.tex \ + piezo.tex \ + symmetry.tex TIKZFIGURES := \ tikz/combine-symmetries.tex \ @@ -20,3 +26,15 @@ figures/%.pdf: tikz/%.tex mkdir -p figures pdflatex --output-directory=figures $< +.PHONY: standalone +standalone: standalone.tex $(SOURCES) + mkdir -p standalone + cd ../..; \ + pdflatex \ + --halt-on-error \ + --shell-escape \ + --output-directory=papers/punktgruppen/standalone \ + papers/punktgruppen/standalone.tex; + cd standalone; \ + bibtex standalone; \ + makeindex standalone; diff --git a/buch/papers/punktgruppen/main.tex b/buch/papers/punktgruppen/main.tex index d88e221..31ed6a4 100644 --- a/buch/papers/punktgruppen/main.tex +++ b/buch/papers/punktgruppen/main.tex @@ -3,8 +3,10 @@ % % (c) 2020 Hochschule Rapperswil % -\chapter{Crystal M\rotatebox[origin=c]{180}{a}th\label{chapter:punktgruppen}} -\lhead{Crystal M\rotatebox[origin=c]{180}{a}th} +\newcommand{\flippedA}{\raisebox{\fontcharht\font`a}{\scalebox{-1}[-1]{a}}} + +\chapter[Crystal Math]{Crystal M\flippedA{}th\label{chapter:punktgruppen}} +\lhead{Crystal M\flippedA{}th} \begin{refsection} \chapterauthor{Tim T\"onz, Naoki Pross} diff --git a/buch/papers/punktgruppen/standalone.tex b/buch/papers/punktgruppen/standalone.tex new file mode 100644 index 0000000..3317318 --- /dev/null +++ b/buch/papers/punktgruppen/standalone.tex @@ -0,0 +1,30 @@ +\documentclass{book} + +\input{common/packages.tex} + +% additional packages used by the individual papers, add a line for +% each paper +\input{papers/common/addpackages.tex} + +% workaround for biblatex bug +\makeatletter +\def\blx@maxline{77} +\makeatother +\addbibresource{chapters/references.bib} + +% Bibresources for each article +\input{papers/common/addbibresources.tex} + +% make sure the last index starts on an odd page +\AtEndDocument{\clearpage\ifodd\value{page}\else\null\clearpage\fi} +\makeindex + +%\pgfplotsset{compat=1.12} +\setlength{\headheight}{15pt} % fix headheight warning +\DeclareGraphicsRule{*}{mps}{*}{} + +\begin{document} + \input{common/macros.tex} + \def\chapterauthor#1{{\large #1}\bigskip\bigskip} + \input{papers/punktgruppen/main.tex} +\end{document} -- cgit v1.2.1