summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2016-06-21 15:22:33 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-06-21 15:26:47 +0200
commit01800989af6674d9022d6f85cb8fd13462d9dc22 (patch)
tree1e2e2b3cfe790f9639693f2f095973fca0afdc0e
parentdd9354ecc3a82f922de6cb84662907e0e4efe64a (diff)
downloadptxdist-01800989af6674d9022d6f85cb8fd13462d9dc22.tar.gz
doc: latex improvements
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-xbin/ptxdist1
-rw-r--r--doc/conf.py34
-rw-r--r--doc/figures/new_logo_2006_ptx.pdfbin0 -> 11824 bytes
-rw-r--r--doc/figures/small_leiste_200dpi.jpgbin0 -> 79469 bytes
-rw-r--r--doc/figures/warning.pdfbin0 -> 1937 bytes
-rw-r--r--doc/preamble.inc78
-rw-r--r--doc/titlepage.inc50
7 files changed, 158 insertions, 5 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 5e3e461..952bcca 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -1228,6 +1228,7 @@ create_docs() {
sphinx-build -b "${builder}" -d "${outdir}/.doctrees" "${srcdir}" \
"${outdir}/${builder}" &&
if [ "${builder}" = "latex" ]; then
+ sed -i s/pdflatex/xelatex/ ${outdir}/${builder}/Makefile
make -C "${outdir}/${builder}"
fi
}
diff --git a/doc/conf.py b/doc/conf.py
index 417e149..e76af9e 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -112,7 +112,10 @@ oselasTCNvariant = gnu_target.split("-")[1]
oselasTCNVendorVersion = toolchain[-4].split("-")[1]
oselasTCNVendorptxdistversion = re.sub(r"\..$",".0", toolchain[-4].split("-")[1])
oselasToolchainName = toolchain[-3] + "_" + re.sub(r"-([a-z])",r"_\1", toolchain[-2], 3)
-ptxdistBSPName = "OSELAS.BSP-" + os.getenv("PTXCONF_PROJECT_VENDOR", "Pengutronix") + "-" + os.getenv("PTXCONF_PROJECT", "Example") + os.getenv("PTXCONF_PROJECT_VERSION", "")
+ptxdistHwVendor = os.getenv("PTXCONF_PROJECT_VENDOR", "Pengutronix")
+ptxdistHwProduct = os.getenv("PTXCONF_PROJECT", "Example")
+ptxdistBSPName = "OSELAS.BSP-" + ptxdistHwVendor + "-" + ptxdistHwProduct + os.getenv("PTXCONF_PROJECT_VERSION", "")
+ptxdistBSPRevision = os.getenv("PTXDIST_BSP_AUTOVERSION", "???")
ptxdistCompilerName = gnu_target
ptxdistCompilerVersion = toolchain[-2]
ptxdistPlatformConfigDir = os.path.basename(os.getenv("PTXDIST_PLATFORMCONFIGDIR")) if os.getenv("PTXDIST_PLATFORMCONFIGDIR") != os.getenv("PTXDIST_TOPDIR") else "platform-versatilepb"
@@ -133,7 +136,10 @@ replace_dict = {
b"|oselasTCNVendorVersion|": oselasTCNVendorVersion,
b"|oselasTCNVendorptxdistversion|": oselasTCNVendorptxdistversion,
b"|oselasToolchainName|": oselasToolchainName,
+ b"|ptxdistHwVendor|": ptxdistHwVendor,
+ b"|ptxdistHwProduct|": ptxdistHwProduct,
b"|ptxdistBSPName|": ptxdistBSPName,
+ b"|ptxdistBSPRevision|": ptxdistBSPRevision,
b"|ptxdistCompilerName|": ptxdistCompilerName,
b"|ptxdistCompilerVersion|": ptxdistCompilerVersion,
b"|ptxdistPlatformConfigDir|": ptxdistPlatformConfigDir,
@@ -251,20 +257,38 @@ htmlhelp_basename = 'ptxdistdoc'
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
-#'papersize': 'letterpaper',
+'papersize': 'a4paper',
# The font size ('10pt', '11pt' or '12pt').
-#'pointsize': '10pt',
+'pointsize': '11pt',
# Additional stuff for the LaTeX preamble.
-#'preamble': '',
+'preamble': '\\input{preamble.inc}',
+
+'inputenc': '''
+\\ifdefined\\DeclareUnicodeCharacter\\else
+\\newcommand{\\DeclareUnicodeCharacter}[2]{}
+\\fi
+''',
+
+'extraclassoptions': 'oneside,openany',
+
+'maketitle': '\\input{titlepage.inc}'
}
+latex_additional_files = [
+ 'titlepage.inc',
+ 'preamble.inc',
+ 'figures/new_logo_2006_ptx.pdf',
+ 'figures/small_leiste_200dpi.jpg',
+ 'figures/warning.pdf',
+]
+
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
- ('index', 'ptxdist.tex', u'PTXdist Documentation',
+ ('index', "OSELAS.BSP-" + ptxdistHwVendor + "-" + ptxdistHwProduct + '-Quickstart.tex', u'PTXdist Quickstart Manual',
u'The PTXdist project', 'manual'),
]
diff --git a/doc/figures/new_logo_2006_ptx.pdf b/doc/figures/new_logo_2006_ptx.pdf
new file mode 100644
index 0000000..57215d7
--- /dev/null
+++ b/doc/figures/new_logo_2006_ptx.pdf
Binary files differ
diff --git a/doc/figures/small_leiste_200dpi.jpg b/doc/figures/small_leiste_200dpi.jpg
new file mode 100644
index 0000000..f0bbce4
--- /dev/null
+++ b/doc/figures/small_leiste_200dpi.jpg
Binary files differ
diff --git a/doc/figures/warning.pdf b/doc/figures/warning.pdf
new file mode 100644
index 0000000..a26cc34
--- /dev/null
+++ b/doc/figures/warning.pdf
Binary files differ
diff --git a/doc/preamble.inc b/doc/preamble.inc
new file mode 100644
index 0000000..43041ee
--- /dev/null
+++ b/doc/preamble.inc
@@ -0,0 +1,78 @@
+\usepackage{fontspec}
+\usepackage{xunicode}
+\usepackage{xltxtra}
+\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}
+\IfFileExists{iffont.sty}{
+ \usepackage{iffont}
+ \settofirstfound{\mainfont}{LTProjekt, DejaVu Sans, Liberation Sans}
+ \settofirstfound{\boldfont}{LTProjekt Heavy, DejaVu Sans Bold, Liberation Sans Bold}
+ \setmainfont[BoldFont=\boldfont]{\mainfont}
+ \setsansfont[BoldFont=\boldfont]{\mainfont}
+ \settofirstfound{\monofont}{Inconsolata, DejaVu Sans Mono, Liberation Sans Mono}
+ \setmonofont[Scale=MatchLowercase, LetterSpace=-4]{\monofont}
+}{
+ \setmainfont{DejaVu Sans}
+ \setsansfont{DejaVu Sans}
+ \setmonofont[Scale=MatchLowercase, LetterSpace=-4]{DejaVu Sans Mono}
+}
+
+\usepackage{graphicx}
+\usepackage[absolute]{textpos}
+\setlength{\TPHorizModule}{1mm}
+\setlength{\TPVertModule}{\TPHorizModule}
+
+% counting for chapter, section, subsection, subsubsection
+\setcounter{secnumdepth}{3}
+% put into toc up to this subsection level
+\setcounter{tocdepth}{2}
+
+% head- and footlines
+% -------------------
+\newcommand*{\PtxFootLogo}{\raisebox{-0.4em}{\includegraphics[scale=.11]{new_logo_2006_ptx.pdf}}}
+\makeatletter
+\fancypagestyle{normal}{
+ \fancyhf{}
+ \fancyfoot[R]{{\py@HeaderFamily\thepage}}
+ \fancyfoot[L]{{\PtxFootLogo}}
+ \fancyhead[C]{{\py@HeaderFamily \leftmark}}
+ \renewcommand{\headrulewidth}{0.4pt}
+ \renewcommand{\footrulewidth}{0.4pt}
+}
+\fancypagestyle{plain}{
+ \fancyhf{}
+ \fancyfoot[R]{{\py@HeaderFamily\thepage}}
+ \fancyfoot[L]{{\PtxFootLogo}}
+ \renewcommand{\headrulewidth}{0.0pt}
+ \renewcommand{\footrulewidth}{0.4pt}
+}
+
+\renewenvironment{notice}[2]{
+ \def\py@noticetype{#1}
+ \csname py@noticestart@#1\endcsname
+ \begin{minipage}[c]{\textwidth}
+
+ \begin{center}
+
+ \vspace{1ex}
+
+ \begin{minipage}[c]{0.1 \textwidth}
+ \includegraphics[scale=.075]{warning.pdf}
+ \end{minipage}
+ \begin{minipage}[c]{0.85 \textwidth}
+ \begingroup\sf
+}{
+ \endgroup
+ \end{minipage}
+
+ \vspace{1ex}
+
+ \end{center}
+ \end{minipage}
+\csname py@noticeend@\py@noticetype\endcsname }
+
+\definecolor{VerbatimColor}{gray}{0.95}
+\definecolor{VerbatimBorderColor}{gray}{0.75}
+
+\makeatother
+
+% vim:syntax=tex
diff --git a/doc/titlepage.inc b/doc/titlepage.inc
new file mode 100644
index 0000000..2422291
--- /dev/null
+++ b/doc/titlepage.inc
@@ -0,0 +1,50 @@
+\begin{titlepage}
+
+\thispagestyle{empty}
+
+% side bar
+\begin{textblock}{40}(0,-5)
+\includegraphics[width=40mm,height=300mm]{small_leiste_200dpi.jpg}
+\end{textblock}
+
+\begin{textblock}{135}(50,25)
+ \fontsize{24}{26}\selectfont%
+ {{\color[gray]{0.8}OSELAS.}Support}\\
+ {{\color[gray]{0.7}OSELAS.}Training}\\
+ {{\color[gray]{0.7}OSELAS.}Development}\\
+ {{\color[gray]{0.5}OSELAS.}Services}
+\end{textblock}
+
+% ----------------------------------------------------------------------------
+% vendor and product
+% ----------------------------------------------------------------------------
+\begin{textblock}{135}(50,115)
+ \centering
+ {\color[gray]{0.5}\rule{\linewidth}{2pt}}\llap{\rule{\linewidth}{0.5pt}}\\
+ \vspace{2mm}
+ \fontsize{24}{26}\selectfont\bf%
+ {\color[gray]{0.5}Quickstart Manual}\\
+ OSELAS.BSP(~)\\
+ |ptxdistHwVendor| |ptxdistHwProduct|\\
+ \vspace{-1mm}
+ {\color[gray]{0.5}\rule{\linewidth}{2pt}}\llap{\rule[1.5pt]{\linewidth}{0.5pt}}\\
+\end{textblock}
+
+% pengutronix logo and address
+\begin{textblock}{135}(50,225)
+ \raggedleft
+ \includegraphics[width=60mm]{new_logo_2006_ptx.pdf}\hspace*{-7pt}\vspace*{-7pt}\\
+ \fontsize{12}{12}\selectfont%
+ Pengutronix e.\,K.\\
+ Peiner Stra├če 6--8\\
+ 31137 Hildesheim\\[1ex]
+ +49\,(0)51\,21\,/\,20\,69\,17\,--\,0 (Fon)\\
+ +49\,(0)51\,21\,/\,20\,69\,17\,--\,55\,55 (Fax)\\[1ex]
+ info@pengutronix.de\\[2.5ex]
+ {\footnotesize \copyright \, \number \year \ Pengutronix, Hildesheim -- GIT Rev.\ |ptxdistBSPRevision| \negthinspace}
+\end{textblock}
+
+\end{titlepage}
+\vspace*{\fill}
+\newpage
+% vim:syntax=tex