docu: add version to pdf

This commit is contained in:
Matthias Ringwald 2021-05-25 08:53:22 +02:00
parent 62fc41778a
commit 767003cd11
3 changed files with 20 additions and 3 deletions

View File

@ -12,9 +12,10 @@ pdf:
rm -rf latex
mkdir -p latex
cp -r docs/picts latex
# create latex/btstack_gettingstartec.tex with version
./update_getting_started.sh
# create latex/btstack_generated.md -> latex/btstack_final.tex
./markdown2tex.py
cp btstack_gettingstarted.tex latex
cp docs/ports/*.jpg latex
cd latex && pdflatex btstack_gettingstarted.tex && pdflatex btstack_gettingstarted.tex
mv latex/btstack_gettingstarted.pdf btstack.pdf

View File

@ -71,7 +71,7 @@ morekeywords={*, btstack_timer_source_t, btstack_data_source_t, uint32_t, uint16
le_characteristic_event_t}
}
\newcommand{\versionNr}{1.0}
\newcommand{\versionNr}{VERSION}
\newcommand{\authorMila}{Dr. sc. Milanka Ringwald}
\newcommand{\authorMatthias}{Dr. sc. Matthias Ringwald}
\newcommand{\bkContact}{\href{contact@bluekitchen-gmbh.com}{contact@bluekitchen-gmbh.com}}
@ -89,7 +89,7 @@ morekeywords={*, btstack_timer_source_t, btstack_data_source_t, uint32_t, uint16
\end{minipage}
\hfill\begin{minipage}[b]{.8\textwidth}\begin{flushright}
{\color{bkblue}
VERSION \versionNr{} \\
Version \versionNr{} \\
\today \\}
\vspace*{7.5cm}
\hfill\includegraphics[width=0.85\textwidth]{picts/bklogo.pdf}

View File

@ -0,0 +1,16 @@
#!/usr/bin/env sh
# get commit and tag
tag=`git tag --points-at HEAD`
commit=`git rev-parse --short HEAD`
# use tag if available
if [ -z "$tag" ]
then
version=$commit
else
version=$tag
fi
# create mkdocs.yml
sed -e "s|VERSION|$version|" btstack_gettingstarted.tex > latex/btstack_gettingstarted.tex