aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2024-05-08 16:37:18 +0200
committerSébastien Dailly <sebastien@dailly.me>2024-05-08 16:37:18 +0200
commit0a55a73be010169b8f100c0174c2cbad3cf979c4 (patch)
treeac89f3418cfed733ff547b653d00b216f1a80f5e
parente270c907814c091d047d17d75e65374504ea6bd8 (diff)
Option in the Makefile to add specific arguments to rst2latex
-rw-r--r--common/Makefile.common7
-rwxr-xr-xmodel_8/Makefile2
2 files changed, 5 insertions, 4 deletions
diff --git a/common/Makefile.common b/common/Makefile.common
index e324bd8..92ac79a 100644
--- a/common/Makefile.common
+++ b/common/Makefile.common
@@ -22,9 +22,10 @@ TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
# Add a variable for specific options to add in the rst2latex command
#
-RST_OPTIONS ?=
+EXTRA_RST_OPTIONS ?=
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
+# Remove the comments and the empty lines from the module list file
+PACK = $(shell sed -e 's/\#.*$$//' -e '/^\s$$/d' resources/modules)
PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
tmp:
@@ -40,7 +41,7 @@ tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
--documentclass=extarticle \
--documentoption=12pt,A4,table \
--syntax-highlight=short \
- $(RST_OPTIONS) \
+ $(EXTRA_RST_OPTIONS) \
--stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
sed -i -e 's/admonition-/admonition/g' $@
diff --git a/model_8/Makefile b/model_8/Makefile
index eb751fe..ca74045 100755
--- a/model_8/Makefile
+++ b/model_8/Makefile
@@ -1,5 +1,5 @@
include ../common/Makefile.common
-RST_OPTIONS = \
+EXTRA_RST_OPTIONS = \
--no-section-numbering \
--table-style=booktabs