diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/preamble-pgfplots.tex | 68 | ||||
-rw-r--r-- | tex/preamble-style.tex | 39 |
2 files changed, 92 insertions, 15 deletions
diff --git a/tex/preamble-pgfplots.tex b/tex/preamble-pgfplots.tex index 13570e9..c2a7f14 100644 --- a/tex/preamble-pgfplots.tex +++ b/tex/preamble-pgfplots.tex @@ -1,33 +1,73 @@ -%% PGFPlots settings. -%% -%% PGFPlots is a package in (La)TeX for making plots internally. It fits +%% 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'). +%% PGFPlots uses the (La)TeX TiKZ package to build plots. So we will first +%% do the settings that are necessary in TiKZ, and then go onto the actual +%% PGFPlots package. + -% For a tikz environment: +%% Very general TiKZ settings. In particular, to allow faster processing +%% (not having to re-build the plots on every run), we are using the +%% externalization feature of TiKZ. With this option, TiKZ will build every +%% figure independently in a special directory afterwards it will include +%% the built figure in the final file. This has many advantages: 1) if the +%% code for the plot hasn't changed, then the plot won't be re-made (can be +%% slow with detailed plots). 2) You can use the PDFs of the individual +%% plots for other purposes (for example to include in slides) cleanly. \usepackage{tikz} \usetikzlibrary{external} \tikzexternalize +\tikzsetexternalprefix{tikz/} + + + + + +%% The following rule will cause the name of the files keeping a figure's +%% external PDF to be set based on the file that the TiKZ commands are +%% from. Without this, TiKZ will use numbers based on the order of +%% figures. These numbers can be hard to manage and they will also depend +%% on order in the final PDF, so it will be very buggy to manage them. +\newcommand{\includetikz}[1]{% + \tikzsetnextfilename{#1}% + \input{tex/#1.tex}% +} -\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 + + + +%% Uncomment the following lines for EPS and PS images. Note that you still +%% have to use the `pdflatex' executable 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"}} +%% \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: +%% Inport and configure PGFPlots. \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepgfplotslibrary{groupplots} -\pgfplotsset{axis line style={thick}, tick style={semithick}} +\pgfplotsset{ + axis line style={thick}, + tick style={semithick}, + tick label style = {font=\footnotesize}, + every axis label = {font=\footnotesize}, + legend style = {font=\footnotesize}, + label style = {font=\footnotesize} + } diff --git a/tex/preamble-style.tex b/tex/preamble-style.tex index d22354d..d794ac1 100644 --- a/tex/preamble-style.tex +++ b/tex/preamble-style.tex @@ -8,12 +8,31 @@ + + %% Print size \usepackage[a4paper, includeheadfoot, body={18.7cm, 24.5cm}]{geometry} + +%% Page using multiple columns +\usepackage{multicol} + + + + + +%% Allow using figures within the `multi-col' environment. +\newenvironment{Figure} + {\par\medskip\noindent\minipage{\linewidth}} + {\endminipage\par\medskip} + + + + + %% Set the distance between the columns if two columns: \setlength{\columnsep}{0.75cm} @@ -35,38 +54,52 @@ + + %% 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{font=footnotesize, 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[ @@ -79,6 +112,8 @@ + + % Basic Document information that goes into the PDF meta-data. \hypersetup { @@ -90,6 +125,8 @@ + + % Title, author, pipeline info and date as they appear on the output PDF. \title{THE TITLE OF THIS PROJECT} \author{YOUR NAME, COLLEAGE1 NAME, ETC} |