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. --- project | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'project') diff --git a/project b/project index 61463ec..d75a9ce 100755 --- a/project +++ b/project @@ -41,8 +41,10 @@ make_targets= software_dir= clean_texdir=0 prepare_redo=0 +highlightnew=0 all_highlevel=0 existing_conf=0 +highlightnotes=0 scriptname="./project" minmapsize=10000000000 @@ -118,10 +120,14 @@ Configure and Make options: -j, --jobs=INT Number of threads to build/run the software. -?, --help Print this help list. -Make options: +Make (analysis) options: -d, --debug=FLAGS Print various types of debugging information. -p, --prepare-redo Re-do preparation (only done automatically once). +Make (final PDF) options: + --highlight-new Highlight '\new' parts of text as green. + --highlight-notes Show '\tonote' regions as red text in PDF. + Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. @@ -205,6 +211,10 @@ do # # Note that Make's `debug' can take values, but when called without any # value, it is like giving it a value of `a'): + --highlight-new) highlightnew=1; shift;; + --highlight-new=*) on_off_option_error --highlight-new;; + --highlight-notes) highlightnotes=1; shift;; + --highlight-notes=*) on_off_option_error --highlight-notes;; -d|--debug) if [ x"$2" = x ]; then debug=a; shift; else debug="$2"; check_v debug "$debug"; shift;shift; fi;; -d=*|--debug=*) debug="${1#*=}"; check_v debug "$debug"; shift;; @@ -370,8 +380,9 @@ controlled_env() { # Remove all existing environment variables (with `env -i') and only # use some pre-defined environment variables, then build the project. envmake=".local/bin/env -i HOME=$bdir sys_rm=$(which rm) $gopt" - envmake="$envmake .local/bin/make --no-builtin-rules" - envmake="$envmake --no-builtin-variables -f $1" + envmake="$envmake highlightnew=$highlightnew" + envmake="$envmake highlightnotes=$highlightnotes .local/bin/make" + envmake="$envmake --no-builtin-rules --no-builtin-variables -f $1" if ! [ x"$debug" = x ]; then envmake="$envmake --debug=$debug"; fi # Set the number of jobs. Note that for the `configure.sh' script the -- cgit v1.2.1