From aa3ba69f395a86a1acafe7e52a803d0a3af6d6ef Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Sat, 4 Apr 2020 23:58:21 +0100 Subject: Commenting version numbers with an underscore for LaTeX Until now we would simply return the version numbers as they were written into the separate files and situations can happen where the version numbers contain an underscore (`_'). However, this character is a methematical character in LaTeX, causing LaTeX to complain and abort. With this commit, a step has been added at the end of the configure script to convert any possible `_' to `\_'. Once it is commented (a backslash is put behind it), the underscore will be printed as it is in the final PDF. --- reproduce/software/shell/configure.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'reproduce/software/shell') diff --git a/reproduce/software/shell/configure.sh b/reproduce/software/shell/configure.sh index 6e1b5fb..cf2ef5d 100755 --- a/reproduce/software/shell/configure.sh +++ b/reproduce/software/shell/configure.sh @@ -1319,9 +1319,11 @@ prepare_name_version () | .local/bin/sed '/^\s*$/d' \ | .local/bin/wc -l) - # Put them all in one paragraph. + # Put them all in one paragraph, while sorting them, commenting any + # possible underscores and removing blank lines. .local/bin/cat $@ \ | .local/bin/sort \ + | .local/bin/sed -e's|_|\\_|' \ | .local/bin/awk 'NF>0 { \ c++; \ if(c==1) \ -- cgit v1.2.1