From ee8c6be24166c16df9cd7fb1912503e25bdfde85 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Thu, 24 Sep 2020 02:15:40 +0100 Subject: Gnuastro's analysis configuration files removed Until now, the core Maneage branch included some configuration files for Gnuastro's programs. This was actually a remnant of the distant past when Maneage didn't actually build its own software and we had to rely on the host's software versions. This file contained the configuration files specific to Gnuastro for this project and also had a feature to avoid checking the host's own configuration files. However, we now build all our software ourselves with fixed configuration files (for the version that is being installed and its version is stored). So those extra configuration files were just extra and caused confusion and problems in some scenarios. With this commit, those extra files are now removed. Also, two small issues are also addressed in parallel with this commit: - When running './project make clean', the 'hardware-parameters.tex' macro file (which is created by './project configure' is not deleted. - The project title is now written into the default output's PDF's properties (through 'hypersetup' in 'tex/src/preamble-header.tex') through the LaTeX macro. All these issues were found and fixed with the help of Samane Raji. --- tex/src/preamble-header.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tex/src') diff --git a/tex/src/preamble-header.tex b/tex/src/preamble-header.tex index 9353afc..42bb409 100644 --- a/tex/src/preamble-header.tex +++ b/tex/src/preamble-header.tex @@ -73,8 +73,8 @@ \hypersetup { pdfauthor={YOUR NAME}, - pdfsubject={A SHORT DESCRIPTION OF THE WORK}, - pdftitle={THE TITLE OF THIS PROJECT}, + pdfsubject={\projecttitle}, + pdftitle={\projecttitle}, pdfkeywords={SOME, KEYWORDS, FOR, THE, PDF} } -- cgit v1.2.1 From 6ca2fbf925d14fff862889840913e3c89ea8048a Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Mon, 30 Nov 2020 23:50:38 +0000 Subject: IMPORTANT: organizational improvements in Maneage TeX sources This only concerns the TeX sources in the default branch. In case you don't use them, there should only be a clean conflict in 'paper.tex' (that is obvious and easy to fix). Conflicts may only happen in some of the 'tex/src/preamble-*.tex' files if you have actually changed them for your project. But generally any conflict that does arise by this commit with your project branch should be very clear and easy to fix and test. In short, from now on things will even be easier: any LaTeX configuration that you want to do for your project can be done in 'tex/src/preamble-project.tex', so you don't have to worry about any other LaTeX preamble file. They are either templates (like the ones for PGFPlots and BibLaTeX) or low-level things directly related to Maneage. Until now, this distinction wasn't too clear. Here is a summary of the improvements: - Two new options to './project make': with '--highlight-new' and '--highlight-notes' it is now possible to activate highlighting on the command-line. Until now, there was a LaTeX macro for this at the start of 'paper.tex' (\highlightchanges). But changing that line would change the Git commit hash, making it hard for the readers to trust that this is the same PDF. With these two new run-time options, the printed commit hash will not changed. - paper.tex: the sentences are formatted as one sentence per line (and one line per sentence). This helps in version controlling narrative and following the changes per sentence. A description of this format (and its advantages) is also included in the default text. - The internal Maneage preambles have been modified: - 'tex/src/preamble-header.tex' and 'tex/src/preamble-style.tex' have been merged into one preamble file called 'tex/src/preamble-maneage-default-style.tex'. This helps a lot in simply removing it when you use a journal style file for example. - Things like the options to highlight parts of the text are now put in a special 'tex/src/preamble-maneage.tex'. This helps highlight that these are Maneage-specific features that are independent of the style used in the paper. - There is a new 'tex/src/preamble-project.tex' that is the place you can add your project-specific customizations. --- tex/src/preamble-header.tex | 89 ------------ tex/src/preamble-maneage-default-style.tex | 215 +++++++++++++++++++++++++++++ tex/src/preamble-maneage.tex | 35 +++++ tex/src/preamble-necessary.tex | 70 ---------- tex/src/preamble-project.tex | 75 ++++++++++ tex/src/preamble-style.tex | 152 -------------------- 6 files changed, 325 insertions(+), 311 deletions(-) delete mode 100644 tex/src/preamble-header.tex create mode 100644 tex/src/preamble-maneage-default-style.tex create mode 100644 tex/src/preamble-maneage.tex delete mode 100644 tex/src/preamble-necessary.tex create mode 100644 tex/src/preamble-project.tex delete mode 100644 tex/src/preamble-style.tex (limited to 'tex/src') diff --git a/tex/src/preamble-header.tex b/tex/src/preamble-header.tex deleted file mode 100644 index 42bb409..0000000 --- a/tex/src/preamble-header.tex +++ /dev/null @@ -1,89 +0,0 @@ -%% The headers: title, authors, top of pages and section title formatting -%% of the final LaTeX file are configured here. -% -%% Copyright (C) 2018-2020 Mohammad Akhlaghi -% -%% This file is free software: you can redistribute it and/or modify it -%% under the terms of the GNU General Public License as published by the -%% Free Software Foundation, either version 3 of the License, or (at your -%% option) any later version. -% -%% This file is distributed in the hope that it will be useful, but WITHOUT -%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -%% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -%% for more details. -% -%% You should have received a copy of the GNU General Public License along -%% with this file. If not, see . - - - - - -%% General page header settings. -\usepackage{fancyhdr} -\pagestyle{fancy} -\lhead{\footnotesize{\scshape Draft paper}, {\footnotesize nnn:i (pp), Year Month day}} -\rhead{\scshape\footnotesize YOUR-NAME et al.} -\cfoot{\thepage} -\setlength{\voffset}{0.75cm} -\setlength{\headsep}{0.2cm} -\setlength{\footskip}{0.75cm} -\renewcommand{\headrulewidth}{0pt} - - - - - -%% Specific style for first page. -\fancypagestyle{firststyle} -{ - \lhead{\footnotesize{\scshape Draft paper}, nnn:i (pp), YYYY Month day\\ - \scriptsize \textcopyright YYYY, Your name. All rights reserved.} - \rhead{\footnotesize \footnotesize \today, \currenttime\\} -} - - - - - -%To set the style of the titles: -\usepackage{titlesec} -\titleformat{\section} - {\centering\normalfont\uppercase} - {\thesection.} - {0em} - { } -\titleformat{\subsection} - {\centering\normalsize\slshape} - {\thesubsection.} - {0em} - { } -\titleformat{\subsubsection} - {\centering\small\slshape} - {\thesubsubsection.} - {0em} - { } - - - - - -% Basic Document information that goes into the PDF meta-data. -\hypersetup -{ - pdfauthor={YOUR NAME}, - pdfsubject={\projecttitle}, - pdftitle={\projecttitle}, - pdfkeywords={SOME, KEYWORDS, FOR, THE, PDF} -} - - - - - -%% Title and author information -\usepackage{authblk} -\renewcommand\Authfont{\small\scshape} -\renewcommand\Affilfont{\footnotesize\normalfont} -\setlength{\affilsep}{0.2cm} diff --git a/tex/src/preamble-maneage-default-style.tex b/tex/src/preamble-maneage-default-style.tex new file mode 100644 index 0000000..665c846 --- /dev/null +++ b/tex/src/preamble-maneage-default-style.tex @@ -0,0 +1,215 @@ +%% 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'. +% +%% Copyright (C) 2019-2020 Mohammad Akhlaghi +% +%% This file is free software: you can redistribute it and/or modify it +%% under the terms of the GNU General Public License as published by the +%% Free Software Foundation, either version 3 of the License, or (at your +%% option) any later version. +% +%% This file is distributed in the hope that it will be useful, but WITHOUT +%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +%% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +%% for more details. +% +%% You should have received a copy of the GNU General Public License along +%% with this file. If not, see . + + + + + +%% Font. +\usepackage[T1]{fontenc} +\usepackage{newtxtext} +\usepackage{newtxmath} + + + + + +%% 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=footnotesize, labelfont={color=DarkBlue,bf}, skip=1pt} +\captionsetup[figure]{font={stretch=1, small}} +\setlength{\abovecaptionskip}{3pt plus 1pt minus 1pt} +\setlength{\belowcaptionskip}{-1.25em} + + + + + + +%% 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} + + + + + +%% Define the abstract environment +\renewenvironment{abstract} + {\vspace{-0.5cm}\small% + \list{}{% + \setlength{\leftmargin}{2cm}% + \setlength{\rightmargin}{\leftmargin}% + }% + \item\relax} + {\endlist} + + + + + +%% To keep the main page's code clean. +\newcommand{\includeabstract}[1]{% +\twocolumn[% + \begin{@twocolumnfalse}% + \maketitle% + \begin{abstract}% + #1% + \end{abstract}% + \vspace{1cm}% + \end{@twocolumnfalse}% + ]% +} + + + + + +%% Basic header style +%% ------------------ +% +%% The steps below are to use the necessary LaTeX packages to get the demo +%% Maneage paper running with a reasonably looking, custom paper style. If +%% you are using a custom journal style, feel free to delete these. + +%% General page header settings. +\usepackage{fancyhdr} +\pagestyle{fancy} +\lhead{\footnotesize{\scshape Draft paper}, {\footnotesize nnn:i (pp), Year Month day}} +\rhead{\scshape\footnotesize YOUR-NAME et al.} +\cfoot{\thepage} +\setlength{\voffset}{0.75cm} +\setlength{\headsep}{0.2cm} +\setlength{\footskip}{0.75cm} +\renewcommand{\headrulewidth}{0pt} + +%% Specific style for first page. +\fancypagestyle{firststyle} +{ + \lhead{\footnotesize{\scshape Draft paper}, nnn:i (pp), YYYY Month day\\ + \scriptsize \textcopyright YYYY, Your name. All rights reserved.} + \rhead{\footnotesize \footnotesize \today, \currenttime\\} +} + +%To set the style of the titles: +\usepackage{titlesec} +\titleformat{\section} + {\centering\normalfont\uppercase} + {\thesection.} + {0em} + { } +\titleformat{\subsection} + {\centering\normalsize\slshape} + {\thesubsection.} + {0em} + { } +\titleformat{\subsubsection} + {\centering\small\slshape} + {\thesubsubsection.} + {0em} + { } + +% Basic Document information that goes into the PDF meta-data. +\hypersetup +{ + pdfauthor={YOUR NAME}, + pdfsubject={\projecttitle}, + pdftitle={\projecttitle}, + pdfkeywords={SOME, KEYWORDS, FOR, THE, PDF} +} + +%% Title and author information +\usepackage{authblk} +\renewcommand\Authfont{\small\scshape} +\renewcommand\Affilfont{\footnotesize\normalfont} +\setlength{\affilsep}{0.2cm} diff --git a/tex/src/preamble-maneage.tex b/tex/src/preamble-maneage.tex new file mode 100644 index 0000000..81d8535 --- /dev/null +++ b/tex/src/preamble-maneage.tex @@ -0,0 +1,35 @@ +%% Preamble for Maneage-related features. +% +%% Copyright (C) 2020 Mohammad Akhlaghi +% +%% This LaTeX file is part of Maneage. Maneage is free software: you can +%% redistribute it and/or modify it under the terms of the GNU General +%% Public License as published by the Free Software Foundation, either +%% version 3 of the License, or (at your option) any later version. +% +%% Maneage is distributed in the hope that it will be useful, but WITHOUT +%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +%% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +%% for more details. See . + + + + + +%% Highlighting +%% ------------ +% +%% Maneage feature for highlighting changes they can be set activated +%% directly on the command-line with the '--highlight-new' or +%% '--highlight-notes' options +\ifdefined\highlightnew +\newcommand{\new}[1]{\textcolor{green!50!black}{#1}} +\else +\newcommand{\new}[1]{\textcolor{black}{#1}} +\fi + +\ifdefined\highlightnotes +\newcommand{\tonote}[1]{\textcolor{red!60!black}{[#1]}} +\else +\newcommand{\tonote}[1]{{}} +\fi diff --git a/tex/src/preamble-necessary.tex b/tex/src/preamble-necessary.tex deleted file mode 100644 index bf74c8b..0000000 --- a/tex/src/preamble-necessary.tex +++ /dev/null @@ -1,70 +0,0 @@ -%% Necessary (independent of style) macros for this project. -%% -%% These are a set of packages that have been commonly necessary in most -%% LaTeX usages. However, if any are not needed in your work, please feel -%% free to remove them. -% -%% Copyright (C) 2018-2020 Mohammad Akhlaghi -% -%% This file is free software: you can redistribute it and/or modify it -%% under the terms of the GNU General Public License as published by the -%% Free Software Foundation, either version 3 of the License, or (at your -%% option) any later version. -% -%% This file is distributed in the hope that it will be useful, but WITHOUT -%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -%% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -%% for more details. -% -%% You should have received a copy of the GNU General Public License along -%% with this file. If not, see . - - - - - -%% 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/src/preamble-project.tex b/tex/src/preamble-project.tex new file mode 100644 index 0000000..4206801 --- /dev/null +++ b/tex/src/preamble-project.tex @@ -0,0 +1,75 @@ +%% Necessary macros for this project. +%% +%% These are a set of packages that have been commonly necessary in most +%% LaTeX usages. However, if any are not needed in your work, please feel +%% free to remove them. +% +%% Copyright (C) 2018-2020 Mohammad Akhlaghi +%% Copyright (C) YYYY Your Name +% +%% This file is free software: you can redistribute it and/or modify it +%% under the terms of the GNU General Public License as published by the +%% Free Software Foundation, either version 3 of the License, or (at your +%% option) any later version. +% +%% This file is distributed in the hope that it will be useful, but WITHOUT +%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +%% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +%% for more details. +% +%% You should have received a copy of the GNU General Public License along +%% with this file. If not, see . + + + + + +%% Packages you need in your project +%% --------------------------------- +% +%% Here you can add/remove any custom LaTeX package that you need for this +%% project that aren't provided by the journal's style. + +% 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} + + + + + +%% BibLaTeX or PGFPlots templates +%% ------------------------------ +% +%% These are ready-made customizations of these two commonly used packages +%% that you can use as a template for your own project: BibLaTeX (advanced +%% bibliography management) or PGFPlots (for drawing plots within LaTeX +%% directly from tables of data). If you don't use them, you can just +%% delete these two lines and also delete their files from your branch (to +%% keep the 'tex/src' directory on your branch clean). +\input{tex/src/preamble-biblatex.tex} +\input{tex/src/preamble-pgfplots.tex} + + + + + +%% Style of default paper (DELETE IF USING JOURNAL STYLES) +%% ------------------------------------------------------- +% +%% This is primarily defined for the default Maneage paper style. So when +%% you later import your journal's style, delete this line (and these +%% comments). Also delete the file (to keep your project source branch +%% clean from files you don't need/use). +\input{tex/src/preamble-maneage-default-style.tex} diff --git a/tex/src/preamble-style.tex b/tex/src/preamble-style.tex deleted file mode 100644 index c07837f..0000000 --- a/tex/src/preamble-style.tex +++ /dev/null @@ -1,152 +0,0 @@ -%% 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'. -% -%% Copyright (C) 2019-2020 Mohammad Akhlaghi -% -%% This file is free software: you can redistribute it and/or modify it -%% under the terms of the GNU General Public License as published by the -%% Free Software Foundation, either version 3 of the License, or (at your -%% option) any later version. -% -%% This file is distributed in the hope that it will be useful, but WITHOUT -%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -%% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -%% for more details. -% -%% You should have received a copy of the GNU General Public License along -%% with this file. If not, see . - - - - - -%% Font. -\usepackage[T1]{fontenc} -\usepackage{newtxtext} -\usepackage{newtxmath} - - - - - -%% 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=footnotesize, labelfont={color=DarkBlue,bf}, skip=1pt} -\captionsetup[figure]{font={stretch=1, small}} -\setlength{\abovecaptionskip}{3pt plus 1pt minus 1pt} -\setlength{\belowcaptionskip}{-1.25em} - - - - - - -%% 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} - - - - - -%% Define the abstract environment -\renewenvironment{abstract} - {\vspace{-0.5cm}\small% - \list{}{% - \setlength{\leftmargin}{2cm}% - \setlength{\rightmargin}{\leftmargin}% - }% - \item\relax} - {\endlist} - - - - - -%% To keep the main page's code clean. -\newcommand{\includeabstract}[1]{% -\twocolumn[% - \begin{@twocolumnfalse}% - \maketitle% - \begin{abstract}% - #1% - \end{abstract}% - \vspace{1cm}% - \end{@twocolumnfalse}% - ]% -} -- cgit v1.2.1