Commit a872a426 authored by Benoit Rat's avatar Benoit Rat

doc: fixing title/subtitle

We did try to use the YAML metadata block but for a strange reason it
does not work with starting-kit.md so we have decided to create a
specific Makefile rule for this purpose
parent 4364d91e
...@@ -23,8 +23,8 @@ PDF=$(addprefix pdf/, $(SRC:.md=.pdf)) ...@@ -23,8 +23,8 @@ PDF=$(addprefix pdf/, $(SRC:.md=.pdf))
TEX=$(SRC:.md=.tex) TEX=$(SRC:.md=.tex)
## Pandoc arguments ## Pandoc arguments
OPTIONS=-f markdown --toc --number-sections --smart OPTIONS=-s --from markdown+yaml_metadata_block --toc --number-sections --smart
TEMPLATE=pandoc.latex TEMPLATE=pandoc.latex
ifneq "$(TEMPLATE)" "" ifneq "$(TEMPLATE)" ""
...@@ -47,6 +47,11 @@ pdf: $(PDF) ...@@ -47,6 +47,11 @@ pdf: $(PDF)
DIR_%: DIR_%:
mkdir -p $(subst DIR_,,$@) mkdir -p $(subst DIR_,,$@)
pdf/wr-starting-kit.pdf: wr-starting-kit.md Makefile $(TEMPLATE) DIR_pdf
pandoc $(OPTIONS) --latex-engine=xelatex --listings --highlight-style=haddock $(TEMPLATEARG) \
-V title="WR Starting Kit" -V subtitle="User Guide" -V author="Seven Solutions" \
-V lang=english -V fontsize=11pt -V documentclass=article -V bg-color=238,245,240 -V date="$(DATE) - $(VERSION)" -o $@ $<
pdf/%.pdf: %.md Makefile $(TEMPLATE) DIR_pdf pdf/%.pdf: %.md Makefile $(TEMPLATE) DIR_pdf
pandoc $(OPTIONS) --latex-engine=xelatex --listings --highlight-style=haddock $(TEMPLATEARG) \ pandoc $(OPTIONS) --latex-engine=xelatex --listings --highlight-style=haddock $(TEMPLATEARG) \
-V lang=english -V fontsize=11pt -V documentclass=article -V bg-color=238,245,240 -V date="$(DATE) - $(VERSION)" -o $@ $< -V lang=english -V fontsize=11pt -V documentclass=article -V bg-color=238,245,240 -V date="$(DATE) - $(VERSION)" -o $@ $<
......
---
title: 'Generate WR Starting Kit Documentation'
subtitle: "How to generate starting kit pdf from markdown using pandoc"
author: Seven Solutions
...
Intro Intro
========== ==========
......
...@@ -351,7 +351,7 @@ $endif$ ...@@ -351,7 +351,7 @@ $endif$
%% Footer %% Footer
\renewcommand{\footrulewidth}{1pt} \renewcommand{\footrulewidth}{1pt}
\fancyfoot[L]{{\scriptsize \bfseries $title$ - $title-prefix$} \\ \raisebox{5pt}{\tiny $date$}} \fancyfoot[L]{{\scriptsize \bfseries $title$ - $subtitle$} \\ \raisebox{5pt}{\tiny $date$}}
\fancyfoot[C]{\raisebox{0pt}{\small \weburl }} \fancyfoot[C]{\raisebox{0pt}{\small \weburl }}
\fancyfoot[R]{\raisebox{0pt}{\scriptsize \thepage}} \fancyfoot[R]{\raisebox{0pt}{\scriptsize \thepage}}
...@@ -405,31 +405,26 @@ $endif$ ...@@ -405,31 +405,26 @@ $endif$
\makeatletter \makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1pt\hfill \kern \z@} \def\thickhrulefill{\leavevmode \leaders \hrule height 1pt\hfill \kern \z@}
\renewcommand{\maketitle}{\begin{titlepage}% \renewcommand{\maketitle}{\begin{titlepage}%
$if(imgcover)$ \let\footnotesize\small
\ThisLRCornerWallPaper{1}{$imgcover$} \let\footnoterule\relax
$endif$ \parindent \z@
\vspace{5mm} \reset@font
\begin{minipage}{\textwidth} \null\vfil
\vspace{4.5cm} \begin{flushleft}
\begin{flushright} \Huge \textbf{\@title}
\fontsize{10pt}{8pt}\selectfont \end{flushleft}
{\@date} \par
\end{flushright} \hrule height 4pt
\end{minipage} \par
\begin{minipage}{\textwidth} \begin{flushright}
\vspace{5.8cm} \large \@date \par
\noindent \end{flushright}
\begin{center} \vskip 500\p@
\textsc{\textbf{\@title}} \vfil\null
\end{center} \begin{flushleft}
\vspace{7cm} \Large \textbf{\@author}
\begin{flushleft} \end{flushleft}
{\Large \textbf{\@author}}\\ \hrule height 2pt
\vspace{2cm}
{\large \OldTexttt{Seven Solutions S.L}}\\
{\url{www.sevensols.com}}
\end{flushleft}
\end{minipage}
\end{titlepage}% \end{titlepage}%
\setcounter{footnote}{0}% \setcounter{footnote}{0}%
} }
......
% WR SPEC Starting Kit
% Benoit RAT, Javier Diaz (Seven Solutions) & Miguel Jimenez (UGR)
### Copyright ### Copyright
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment