template and Makefile improvements

This commit is contained in:
Dirk Alders 2021-03-07 10:14:26 +01:00
parent 5a8f5e1603
commit af2221019b
2 changed files with 16 additions and 12 deletions

View File

@ -1,14 +1,18 @@
.PHONY: all
.PRECIOUS: %.tex
TARGET=specification
all: specification.pdf clean
.PHONY: all tex pdf clean cleanall
%.tex: %.reqif
python3 reqif/scripts/parse.py $<
all: pdf clean
%.pdf: %.tex
latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make $<
tex:
python3 reqif/scripts/parse.py $(TARGET).reqif
pdf: tex
latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make $(TARGET).tex
clean:
latexmk -c
latexmk -c -f $(TARGET).tex
rm -f *~ *.tex
cleanall: clean
rm $(TARGET).pdf

View File

@ -9,18 +9,18 @@
{%- if item.system_type_uid == '_4-K5EHYYEem_kd-7nxt1sg' %}
\section{ {{macros.latex_filter(item.Heading)}} }
{%- elif item.system_type_uid == '_MR7eNHYYEem_kd-7nxt1sg' %}
\subsection{\xspace{}{{ macros.latex_filter(item.ID) }}: {{macros.latex_filter(item.Heading)}} }
\subsection{\xspace{}{{ item.ID }}: {{ item.Heading }} }
{%- if 'Description' in item and item.Description != '' %}
{{ macros.requirement_filter(item.Description) }}
{{ item.Description }}
{%- if 'ReasonForImplementation' in item and item.ReasonForImplementation != '' or 'Fitcriterion' in item and item.Fitcriterion != ''%}
\begin{tabu}{lX}
\toprule
{%- if 'ReasonForImplementation' in item and item.ReasonForImplementation != '' %}
\emph{Reason} & {{ macros.requirement_filter(item.ReasonForImplementation) }}\\
\emph{Reason} & {{ item.ReasonForImplementation }}\\
{%- endif %}
{%- if 'Fitcriterion' in item and item.Fitcriterion != '' %}
\emph{Fitcriterion} & {{ macros.requirement_filter(item.Fitcriterion) }}\\
\emph{Fitcriterion} & {{ item.Fitcriterion }}\\
{%- endif %}
\bottomrule
\end{tabu}