From ecbaadcc88ae38adb34e08755459318372ec13b8 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 12 Jan 2021 16:15:47 +0000 Subject: Default LaTeX preamble: some packages moved to preamble-project.tex Until now, important LaTeX packages like 'caption' (for managing figure captions), 'hyperref' (for managing links) and 'xcolor' (for managing colors) were being loaded inside the optional 'tex/src/preamble-maneagge-defualt-style.tex' file. We recommend to remove this file from loading when you use custom journal sytels. However, these packages will often be necessary after loading special journal styles also. With this commit, these packages are now loaded into LaTeX as part of the 'tex/src/preamble-project.tex' file. This file is in charge of LaTeX settings that are custom to the project and independent of its style. Several other small corrections are made with this commit: - I noticed that './project make texclean' crashes if no PDF exists in the working directory! So a '-f' was added to the 'rm' command of the 'texclean' rule. - As part of the LaTeX Hyperref, we can set general metadata or properties for the PDF (that aren't written into the printable PDF, but into the file metadata). They can be viewed in many PDF viewers as PDF properties. Until now, we were only using the '\projecttitle' macro here to write the paper's title. However, thanks to the recently added 'reproduce/analysis/config/metadata.conf', we now have a lot of useful information that can also go here. So the 'metadata-copyright-owner' is now used to define the PDF author, and the project's 'metadata-git-repository' and commit hash are written into the PDF subject. But to import these, it was necessary to define them as LaTeX macros, hence the addition of these macros in 'initialize.mk'. - Some extra packages that aren't necessary to build the default PDF were removed in 'preamble-project.tex'. --- reproduce/analysis/make/initialize.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'reproduce/analysis/make') diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk index 81943db..886c0a7 100644 --- a/reproduce/analysis/make/initialize.mk +++ b/reproduce/analysis/make/initialize.mk @@ -237,7 +237,7 @@ clean-mmap:; rm -f reproduce/config/gnuastro/mmap* # ------------------------------------------ texclean: - rm *.pdf + rm -f *.pdf rm -rf $(texdir)/build/* mkdir $(texdir)/build/tikz # 'tikz' is assumed to already exist. @@ -505,6 +505,8 @@ $(mtexdir)/initialize.tex: | $(mtexdir) echo "\newcommand{\projectdate}{$$d}" > $@ echo "\newcommand{\projecttitle}{$(metadata-title)}" >> $@ echo "\newcommand{\projectversion}{$(project-commit-hash)}" >> $@ + echo "\newcommand{\projectgitrepo}{$(metadata-git-repository)}" >> $@ + echo "\newcommand{\projectcopyrightowner}{$(metadata-copyright-owner)}" >> $@ # Calculate the latest Maneage commit used to build this # project: -- cgit v1.2.1