From 647ce436871b5b692fa07ff166b731f72dff8bf8 Mon Sep 17 00:00:00 2001 From: Raul Infante-Sainz Date: Sun, 5 Apr 2020 17:59:57 +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. This commit was originally written by Mohammad Akhlaghi --- .file-metadata | Bin 7946 -> 7946 bytes reproduce/software/shell/configure.sh | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.file-metadata b/.file-metadata index 5b28e1d..0559dea 100644 Binary files a/.file-metadata and b/.file-metadata differ diff --git a/reproduce/software/shell/configure.sh b/reproduce/software/shell/configure.sh index ca95a92..a0fc228 100755 --- a/reproduce/software/shell/configure.sh +++ b/reproduce/software/shell/configure.sh @@ -1320,9 +1320,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