From 623ae15c95bb8575b111709705c29b10fcf7c12b Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 2 Jun 2020 03:45:46 +0100 Subject: IMPORTANT: Added publication checklist, improved relevant infrastructure Possible semantic conflicts (that may not show up as Git conflicts but may cause a crash in your project after the merge): 1) The project title (and other basic metadata) should be set in 'reproduce/analysis/conf/metadata.conf'. Please include this file in your merge (if it is ignored because of '.gitattributes'!). 2) Consider importing the changes in 'initialize.mk' and 'verify.mk' (if you have added all analysis Makefiles to the '.gitattributes' file (thus not merging any change in them with your branch). For example with this command: git diff master...maneage -- reproduce/analysis/make/initialize.mk 3) The old 'verify-txt-no-comments-leading-space' function has been replaced by 'verify-txt-no-comments-no-space'. The new function will also remove all white-space characters between the columns (not just white space characters at the start of the line). Thus the resulting check won't involve spacing between columns. A common set of steps are always necessary to prepare a project for publication. Until now, we would simply look at previous submissions and try to follow them, but that was prone to errors and could cause confusion. The internal infrastructure also didn't have some useful features to make good publication possible. Now that the submission of a paper fully devoted to the founding criteria of Maneage is complete (arXiv:2006.03018), it was time to formalize the necessary steps for easier submission of a project using Maneage and implement some low-level features that can make things easier. With this commit a first draft of the publication checklist has been added to 'README-hacking.md', it was tested in the submission of arXiv:2006.03018 and zenodo.3872248. To help guide users on implementing the good practices for output datasets, the outputs of the default project shown in the paper now use the new features). After reading the checklist, please inspect these. Some other relevant changes in this commit: - The publication involves a copy of the necessary software tarballs. Hence a new target ('dist-software') was also added to package all the project's software tarballs in one tarball for easy distribution. - A new 'dist-lzip' target has been defined for those who want to distribute an Lzip-compressed tarball. - The '\includetikz' LaTeX macro now has a second argument to allow configuring the '\includegraphics' call when the plot should not be built, but just imported. --- tex/src/delete-me-demo.tex | 51 ----------------------------------- tex/src/delete-me-image-histogram.tex | 51 +++++++++++++++++++++++++++++++++++ tex/src/delete-me-squared.tex | 32 ++++++++++++++++++++++ tex/src/delete-me.tex | 32 ---------------------- tex/src/preamble-pgfplots.tex | 25 ++++++++++++----- 5 files changed, 101 insertions(+), 90 deletions(-) delete mode 100644 tex/src/delete-me-demo.tex create mode 100644 tex/src/delete-me-image-histogram.tex create mode 100644 tex/src/delete-me-squared.tex delete mode 100644 tex/src/delete-me.tex (limited to 'tex/src') diff --git a/tex/src/delete-me-demo.tex b/tex/src/delete-me-demo.tex deleted file mode 100644 index 1fde25d..0000000 --- a/tex/src/delete-me-demo.tex +++ /dev/null @@ -1,51 +0,0 @@ -%% Plot the demonstration image and its histogram. -% -%% 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 . - -\begin{tikzpicture} - - %% The displayed WFPC2 image. - \node[anchor=south west] (img) at (0,0) - {\includegraphics[width=0.5\linewidth] - {tex/build/delete-me-demo/wfpc2.pdf}}; - - %% Its label - \node[anchor=south west] at (0.45\linewidth,0.45\linewidth) - {\textcolor{white}{a}}; - - %% This histogram. - \begin{axis}[at={(0.52\linewidth,0.1\linewidth)}, - no markers, - axis on top, - xmode=normal, - ymode=normal, - yticklabels={}, - scale only axis, - xlabel=Pixel value, - width=0.5\linewidth, - height=0.412\linewidth, - enlarge y limits=false, - enlarge x limits=false, - ] - \addplot [const plot mark mid, fill=red] - table [x index=0, y index=1] - {tex/build/delete-me-demo/wfpc2-hist.txt} - \closedcycle; - \end{axis} - - %% The histogram's label - \node[anchor=south west] at (0.95\linewidth,0.45\linewidth) {b}; -\end{tikzpicture} diff --git a/tex/src/delete-me-image-histogram.tex b/tex/src/delete-me-image-histogram.tex new file mode 100644 index 0000000..8d62892 --- /dev/null +++ b/tex/src/delete-me-image-histogram.tex @@ -0,0 +1,51 @@ +%% Plot the demonstration image and its histogram. +% +%% 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 . + +\begin{tikzpicture} + + %% The displayed WFPC2 image. + \node[anchor=south west] (img) at (0,0) + {\includegraphics[width=0.5\linewidth] + {tex/build/image-histogram/wfpc2.pdf}}; + + %% Its label + \node[anchor=south west] at (0.45\linewidth,0.45\linewidth) + {\textcolor{white}{a}}; + + %% This histogram. + \begin{axis}[at={(0.52\linewidth,0.1\linewidth)}, + no markers, + axis on top, + xmode=normal, + ymode=normal, + yticklabels={}, + scale only axis, + xlabel=Pixel value, + width=0.5\linewidth, + height=0.412\linewidth, + enlarge y limits=false, + enlarge x limits=false, + ] + \addplot [const plot mark mid, fill=red] + table [x index=0, y index=1] + {tex/build/to-publish/wfpc2-histogram.txt} + \closedcycle; + \end{axis} + + %% The histogram's label + \node[anchor=south west] at (0.95\linewidth,0.45\linewidth) {b}; +\end{tikzpicture} diff --git a/tex/src/delete-me-squared.tex b/tex/src/delete-me-squared.tex new file mode 100644 index 0000000..c0cc609 --- /dev/null +++ b/tex/src/delete-me-squared.tex @@ -0,0 +1,32 @@ +%% PGFPlots code to plot a random set of numbers as demo +%% +%% 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 . + +\begin{tikzpicture} + + %% Settings of the plotted axis + \begin{axis}[ + width=\linewidth, + xlabel=$X$, + ylabel=$X^2$, + ] + + %% A particular plot. + \addplot+[scatter, only marks] + table {tex/build/to-publish/squared.txt}; + + \end{axis} +\end{tikzpicture} diff --git a/tex/src/delete-me.tex b/tex/src/delete-me.tex deleted file mode 100644 index e264854..0000000 --- a/tex/src/delete-me.tex +++ /dev/null @@ -1,32 +0,0 @@ -%% PGFPlots code to plot a random set of numbers as demo -%% -%% 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 . - -\begin{tikzpicture} - - %% Settings of the plotted axis - \begin{axis}[ - width=\linewidth, - xlabel=$X$, - ylabel=$X^2$, - ] - - %% A particular plot. - \addplot+[scatter, only marks] - table {tex/build/delete-me-num/data.txt}; - - \end{axis} -\end{tikzpicture} diff --git a/tex/src/preamble-pgfplots.tex b/tex/src/preamble-pgfplots.tex index af6cb8d..1d57daf 100644 --- a/tex/src/preamble-pgfplots.tex +++ b/tex/src/preamble-pgfplots.tex @@ -77,17 +77,28 @@ -%% 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]{% +%% The '\includetikz' can be used to either build the figures using +%% PGFPlots (when '\makepdf' is defined), or use an existing file (when +%% '\makepdf' isn't defined). When making the PDF, it will set the output +%% figure name to be the same as the 'tex/src/XXXX.tex' file that contains +%% the PGFPlots source of the figure. In this way, when using the PDF, it +%% will also have the same name, thus allowing the figures to easily change +%% their place relative to others: figure ordering won't be a problem. This +%% is a problem by default because if an explicit name isn't set at the +%% start, tikz will make images based on their order in the paper. +% +%% This function takes two arguments: +%% 1) The base-name of the LaTeX file with the 'tikzpicture' +%% environment. As mentioned above, this will also be the name of +%% the produced figure. +%% 2) The settings to use with 'includegraphics' when an already-built +%% file should be used. +\newcommand{\includetikz}[2]{% \ifdefined\makepdf% \tikzsetnextfilename{#1}% \input{tex/src/#1.tex}% \else - \includegraphics[width=\linewidth]{tex/tikz/#1.pdf} + \includegraphics[#2]{tex/tikz/#1.pdf} \fi } -- cgit v1.2.1