aboutsummaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-02-07 20:37:15 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-02-07 20:37:15 +0100
commita16f22881841e57f2652f2a17b7f60b5106b2e60 (patch)
tree6e5a86c38e68cd9f9be546d17c69adad17483825 /tex
First commit to the reproduction pipeline template
Let's start working on this pipeline independently with this first commit. It is based on my previous experiences, but I had never made a skeleton of a pipeline before, it was always within a working analysis. But now that the pipeline has a separate repository for its self, we will be able to work on it and use it as a base for future work and modify it to make it even better. Hopefully in time (and with the help of others), it will grow and become much more robust and useful.
Diffstat (limited to 'tex')
-rw-r--r--tex/preamble-biblatex.tex115
-rw-r--r--tex/preamble-necessary.tex68
-rw-r--r--tex/preamble-pgfplots.tex33
-rw-r--r--tex/preamble-style.tex97
4 files changed, 313 insertions, 0 deletions
diff --git a/tex/preamble-biblatex.tex b/tex/preamble-biblatex.tex
new file mode 100644
index 0000000..757f007
--- /dev/null
+++ b/tex/preamble-biblatex.tex
@@ -0,0 +1,115 @@
+%% Biblatex settings.
+%%
+%% Since the preamble settings necessary to make the bibliography with
+%% Biblatex is a little long and unclean, and might be used in other places
+%% separately later, it is easier to have it here as a separate file.
+%%
+%% USAGE:
+%%
+%% - `tex/ref.tex': the file containing Bibtex source of each
+%% reference. The file suffix doesn't have to be `.bib', this naming
+%% helps in clearly identifying the files and avoiding places that
+%% complain about `.bib' files.
+
+
+
+
+
+%% To break up highlighted text (for example texttt when some it is on the
+%% line break) and also to no underline emphasized words (like journal
+%% titles in the references).
+\usepackage[normalem]{ulem}
+
+
+
+
+
+% Basic BibLaTeX settings
+\usepackage[
+ doi=false,
+ url=false,
+ dashed=false,
+ eprint=false,
+ maxbibnames=4,
+ minbibnames=1,
+ hyperref=true,
+ maxcitenames=2,
+ mincitenames=1,
+ style=authoryear,
+ uniquelist=false,
+ backend=biber,natbib]{biblatex}
+\DeclareFieldFormat[article]{pages}{#1}
+\DeclareFieldFormat{pages}{\mkfirstpage[{\mkpageprefix[bookpagination]}]{#1}}
+\addbibresource{./tex/ref.tex}
+\renewbibmacro{in:}{}
+\renewcommand*{\bibfont}{\footnotesize}
+\DefineBibliographyStrings{english}{references = {References}}
+
+%% Include the adsurl field key into those that are recognized:
+\DeclareSourcemap{
+ \maps[datatype=bibtex]{
+ \map{
+ \step[fieldsource=adsurl,fieldtarget=iswc]
+ \step[fieldsource=gbkurl,fieldtarget=iswc]
+ }
+ }
+}
+
+%% Set the color of the doi link to mymg (magenta) and the ads links
+%% to mypurp (or purple):
+\definecolor{mypurp}{cmyk}{0.75,1,0,0}
+\newcommand{\doihref}[2]{\href{#1}{\color{magenta}{#2}}}
+\newcommand{\adshref}[2]{\href{#1}{\color{mypurp}{#2}}}
+\newcommand{\blackhref}[2]{\href{#1}{\color{black}{#2}}}
+
+%% Define a format for the printtext commands in
+%% DeclareBibliographyDriver to make links for the doi, ads link and
+%% arxiv link:
+\DeclareFieldFormat{doilink}{
+ \iffieldundef{doi}{#1}{\doihref{http://dx.doi.org/\thefield{doi}}{#1}}}
+\DeclareFieldFormat{adslink}{
+ \iffieldundef{iswc}{#1}{\adshref{\thefield{iswc}}{#1}}}
+\DeclareFieldFormat{arxivlink}{
+ \iffieldundef{eprint}{#1}{\href{http://arxiv.org/abs/\thefield{eprint}}{#1}}}
+
+\DeclareListFormat{doiforbook}{
+ \iffieldundef{doi}{#1}{\doihref{http://dx.doi.org/\thefield{doi}}{#1}}}
+\DeclareFieldFormat{googlebookslink}{
+ \iffieldundef{iswc}{#1}{\adshref{\thefield{iswc}}{#1}}}
+
+%% Set the formatting to make the last three values into the
+%% appropriate link. Note that the % signs are necessary. Without
+%% them, the items will be indented.
+\DeclareBibliographyDriver{article}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/translator+others}%
+ \newunit%
+ \ifdefined\makethesis\printtext{\usebibmacro{title}}\fi%
+ \newunit%
+ \printtext[doilink]{\usebibmacro{journal}}%
+ \addcomma%
+ \printtext[adslink]{\printfield{volume}}%
+ \addcomma%
+ \printtext[arxivlink]{\printfield{pages}}%
+ \addperiod%
+}
+
+\DeclareBibliographyDriver{book}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/translator+others}%
+ \newunit%
+ \printtext{\usebibmacro{title}}%
+ \addperiod%
+ \addspace%
+ \printlist[doiforbook]{publisher}%
+ \addcomma%
+ \addspace%
+ \printfield[googlebookslink]{edition}%
+ \printtext{ ed.}%
+ \addperiod%
+}
+
+%% In order to have et al. instead of et al.,:
+\renewcommand*{\nameyeardelim}{\addspace}
diff --git a/tex/preamble-necessary.tex b/tex/preamble-necessary.tex
new file mode 100644
index 0000000..debcb4b
--- /dev/null
+++ b/tex/preamble-necessary.tex
@@ -0,0 +1,68 @@
+%% Some (commonly) necessary LaTeX packages.
+%%
+%% These are a set of packages that are commonly necessary in most LaTeX
+%% usages. However, if any are not needed in your work, you can remove them
+%% from here.
+
+
+
+
+
+% Macros for to help in typing, remove them if you don't need them, but
+% this can help as a demo on how you can simply writing of commonly used
+% words that need special formatting (like software names).
+\newcommand{\snsign}{{\small S}/{\small N}}
+\newcommand{\originsoft}{\textsf{ORIGIN}}
+\newcommand{\sextractor}{\textsf{SE\-xtractor}}
+\newcommand{\noisechisel}{\textsf{Noise\-Chisel}}
+\newcommand{\makecatalog}{\textsf{Make\-Catalog}}
+
+
+
+
+
+%% For highlighting updates. When this is set, text marked as \new
+%% will be colored in dark green and text that is marked wtih \tonote
+%% will be marked in dark red.
+\ifdefined\highlightchanges
+\newcommand{\new}[1]{\textcolor{green!60!black}{#1}}
+\newcommand{\tonote}[1]{\textcolor{red!60!black}{[#1]}}
+\else
+\newcommand{\new}[1]{\textcolor{black}{#1}}
+\newcommand{\tonote}[1]{{}}
+\fi
+
+
+
+
+
+% Better than verbatim for displaying typed text.
+\usepackage{alltt}
+
+
+
+
+
+% For arithmetic opertions within LaTeX
+\usepackage[nomessages]{fp}
+
+
+
+
+
+%To add a code font to the text:
+\usepackage{courier}
+
+
+
+
+
+%To add some enumerating styles
+\usepackage{enumerate}
+
+
+
+
+
+%Including images if necessary
+\usepackage{graphicx}
diff --git a/tex/preamble-pgfplots.tex b/tex/preamble-pgfplots.tex
new file mode 100644
index 0000000..13570e9
--- /dev/null
+++ b/tex/preamble-pgfplots.tex
@@ -0,0 +1,33 @@
+%% PGFPlots settings.
+%%
+%% PGFPlots is a package in (La)TeX for making plots internally. It fits
+%% nicely with the purpose of a reproduction pipeline. But it isn't
+%% mandatory. Therefore if needed, you can just uncomment the line that
+%% includes this file in the top LaTeX source (`paper.tex').
+
+
+
+
+
+% For a tikz environment:
+\usepackage{tikz}
+\usetikzlibrary{external}
+\tikzexternalize
+
+\tikzsetexternalprefix{\bdir/tex/tikz/}
+
+%% Uncomment the following lines for EPS and PS images. Note that you
+%% still have to use pdflatex and also add a `[dvips]' option to
+%% graphicx.
+
+%\tikzset{external/system call={rm -f "\image".eps "\image".ps
+%"\image".dvi; latex \tikzexternalcheckshellescape -halt-on-error
+%-interaction=batchmode -jobname "\image" "\texsource";
+%dvips -o "\image".ps "\image".dvi;
+%ps2eps "\image.ps"}}
+
+%For drawing plots:
+\usepackage{pgfplots}
+\pgfplotsset{compat=newest}
+\usepgfplotslibrary{groupplots}
+\pgfplotsset{axis line style={thick}, tick style={semithick}}
diff --git a/tex/preamble-style.tex b/tex/preamble-style.tex
new file mode 100644
index 0000000..ae7ce92
--- /dev/null
+++ b/tex/preamble-style.tex
@@ -0,0 +1,97 @@
+%% General paper's style settings.
+%%
+%% This preamble can be completely ignored when including this TeX file in
+%% another style. This is done because this LaTeX build is meant to be an
+%% initial/internal phase or part of a larger effort, so it has a basic
+%% style defined here as a preamble. To ignore it, uncomment or delete the
+%% respective line in `paper.tex'.
+
+
+
+%% Print size
+\usepackage[a4paper, includeheadfoot, body={18.7cm, 24.5cm}]{geometry}
+
+
+
+
+%% Set the distance between the columns if two columns:
+\setlength{\columnsep}{0.75cm}
+
+
+
+
+
+% To allow figures to take up more space on the top of the page:
+\renewcommand{\topfraction}{.99}
+\renewcommand{\bottomfraction}{.7}
+\renewcommand{\textfraction}{.05}
+\renewcommand{\floatpagefraction}{.99}
+\renewcommand{\dbltopfraction}{.99}
+\renewcommand{\dblfloatpagefraction}{.99}
+\setcounter{topnumber}{1}
+\setcounter{bottomnumber}{0}
+\setcounter{totalnumber}{2}
+\setcounter{dbltopnumber}{1}
+
+
+
+%% Color related settings:
+\usepackage{xcolor}
+\color{black} % Text color
+\definecolor{DarkBlue}{RGB}{0,0,90}
+
+
+% figure and figure* ordering correction:
+\usepackage{fixltx2e}
+
+
+
+%% For editing the caption appearence. The `setspace' package defines
+%% the `stretch' variable. `abovecaptionskip' is the distance between
+%% the figure and the caption.
+\usepackage{setspace, caption}
+\captionsetup{font=small, labelfont={color=DarkBlue,bf}, skip=1pt}
+\captionsetup[figure]{font={stretch=1, small}}
+\setlength{\abovecaptionskip}{3pt plus 1pt minus 1pt}
+
+
+
+%% To make the footnotes align:
+\usepackage[hang]{footmisc}
+\setlength\footnotemargin{10pt}
+
+
+
+%For including time in the title:
+\usepackage{datetime}
+
+
+
+%To make links to webpages and include document information in the
+%properties of the PDF
+\usepackage[
+ colorlinks,
+ urlcolor=blue,
+ citecolor=blue,
+ linkcolor=blue,
+ linktocpage]{hyperref}
+\renewcommand\UrlFont{\rmfamily}
+
+
+
+% Basic Document information
+\hypersetup
+{
+ pdfauthor={Mohammad Akhlaghi},
+ pdfsubject={MUSE detected objects},
+ pdftitle={Broadband HST photometry of MUSE detected objects},
+ pdfkeywords={Mohammad, Akhlaghi, photometry, MUSE, HST}
+}
+
+
+
+% Title
+\title{A nice title for your research project}
+\date{\small Reproduction pipeline \pipelineversion{}
+ and Gnuastro \gnuastroversion\\on \today, \currenttime}
+\author{Your name here.}