doc: improve latex look and feel

This patch improves the general look and feel of the LaTeX (PDF)
documentation build. Changes include:

- A custom title with relevant information has been created
- Some colors have been adjusted to match those in the web template
- Charter font family is used

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-07-22 16:14:51 +02:00 committed by Anas Nashif
commit 2f5a9d033d
4 changed files with 79 additions and 4 deletions

BIN
doc/_static/images/logo-latex.pdf vendored Normal file

Binary file not shown.

15
doc/_static/latex/preamble.tex vendored Normal file
View file

@ -0,0 +1,15 @@
% LaTeX documentation preamble
%
% Copyright (c) 2021 Nordic Semiconductor ASA
% SPDX-License-Identifier: Apache-2.0
\usepackage[some]{background}
\usepackage{sectsty}
\definecolor{bg-color}{HTML}{333f67}
\setcounter{tocdepth}{2}
\addto\captionsenglish{\renewcommand{\contentsname}{Table of contents}}
\allsectionsfont{\color{bg-color}}

44
doc/_static/latex/title.tex vendored Normal file
View file

@ -0,0 +1,44 @@
% LaTeX documentation title page
%
% Copyright (c) 2021 Nordic Semiconductor ASA
% SPDX-License-Identifier: Apache-2.0
\makeatletter
\newgeometry{top=3cm,left=0cm,right=0cm,bottom=2.5cm}
\backgroundsetup{
scale=2.3,
contents={\sphinxlogo},
opacity=0.2,
angle=0,
position={0.25\textwidth,-0.4\textheight}
}
\BgThispage
\begin{minipage}{2cm}
\color{bg-color} \rule{2cm}{1.7cm}
\end{minipage}
\hspace{0.2cm}
\begin{minipage}{3cm}
\sphinxlogo
\end{minipage}
\hspace{0.2cm}
\begin{minipage}{15cm}
\Huge \textbf{\@title}\\
\LARGE \py@release\releaseinfo
\end{minipage}
\vspace{21cm}
\begin{flushright}
\begin{minipage}{7cm}
\large \@author\\\@date
\end{minipage}
\begin{minipage}{1.5cm}
\color{bg-color} \rule{1.5cm}{1.3cm}
\end{minipage}
\end{flushright}
\restoregeometry
\makeatother