diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2016-06-21 15:22:33 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2016-06-21 15:26:47 +0200 |
commit | 01800989af6674d9022d6f85cb8fd13462d9dc22 (patch) | |
tree | 1e2e2b3cfe790f9639693f2f095973fca0afdc0e /doc/preamble.inc | |
parent | dd9354ecc3a82f922de6cb84662907e0e4efe64a (diff) | |
download | ptxdist-01800989af6674d9022d6f85cb8fd13462d9dc22.tar.gz ptxdist-01800989af6674d9022d6f85cb8fd13462d9dc22.tar.xz |
doc: latex improvements
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'doc/preamble.inc')
-rw-r--r-- | doc/preamble.inc | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/doc/preamble.inc b/doc/preamble.inc new file mode 100644 index 000000000..43041ee01 --- /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 |