aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorPedram Ashofteh Ardakani <pedramardakani@pm.me>2022-04-13 19:20:14 +0430
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2022-04-15 05:37:21 +0200
commit7726397841af9d676b5115992bf4fc34ff8a0c81 (patch)
treead50fa0dfb5db67bf4752a4fbd9e386a4d14e839 /project
parent91799fe4b6d62230e99a1520a23a0d30c3eb963e (diff)
./project: new --refresh-bib to force-build bibliography
Until now, the bibliography was only re-built when 'tex/src/references.tex' was modified. This is useful in many regular cases because building the bibliography can slow down the build and it is in-efficient to built it in every edit of the text of the paper. However, it can be inconvenient when a change in the paper's bibliography is necessary, without actually editing 'references.tex' (for example when you are removing a citation from the text). This happens because Make is only sensitive to file modification time. In this case, Make does not see the need to create a new 'bib' file because the 'tex/src/reference' is not changed, and only the 'paper.tex' is changed. Make is totally 'blind' to the new 'citation' defined in 'paper.tex'. As a workaround, until now users were forced to manually change the 'tex/src/references.tex' file modification date: either by altering the content, or using the 'touch' command. With this commit, the '--refresh-bib' is added to './project' arguments to address this issue. It will just 'touch' the 'tex/src/references.tex' file before calling Make. In effect, this will 'force' Make to create the bibliography file, even if 'tex/src/references.tex' hasn't been updated.
Diffstat (limited to 'project')
-rwxr-xr-xproject2
1 files changed, 2 insertions, 0 deletions
diff --git a/project b/project
index 8a7712d..ba9e9ff 100755
--- a/project
+++ b/project
@@ -126,6 +126,7 @@ Make (analysis) options:
-p, --prepare-redo Re-do preparation (only done automatically once).
Make (final PDF) options:
+ --refresh-bib Force refresh the bibliography.
--highlight-new Highlight '\new' parts of text as green.
--highlight-notes Show '\tonote' regions as red text in PDF.
@@ -208,6 +209,7 @@ do
#
# Note that Make's 'debug' can take values, but when called without any
# value, it is like giving it a value of 'a'):
+ --refresh-bib) [ -f tex/src/references.tex ] && touch tex/src/references.tex; shift;;
--highlight-new) highlightnew=1; shift;;
--highlight-new=*) on_off_option_error --highlight-new;;
--highlight-notes) highlightnotes=1; shift;;