source: rtems-docs/common/rtemsstyle.sty @ 867016d

4.115am
Last change on this file since 867016d was 867016d, checked in by Chris Johns <chrisj@…>, on Mar 9, 2016 at 4:35:00 AM

Format the index for PDF output.

  • Property mode set to 100644
File size: 3.6 KB
Line 
1\definecolor{TitleColor}{rgb}{0,0,0}
2\definecolor{InnerLinkColor}{rgb}{0,0,0}
3\definecolor{OuterLinkColor}{rgb}{1.0,0.5,0.0}
4
5\newenvironment{underscoresplit}{\let\underscore\_
6  \renewcommand{\_}{\discretionary{\underscore}{}{\underscore}}}{}
7
8\let\oldtabulary\tabulary
9\let\endoldtabulary\endtabulary
10
11\renewenvironment{tabulary}{\underscoresplit\oldtabulary}{\endoldtabulary\endunderscoresplit}
12
13\let\oldprintindex\printindex
14
15\renewenvironment{printindex}{\underscoresplit\oldprintindex}
16
17
18\renewcommand{\maketitle}{%
19  \begin{titlepage}%
20    \let\footnotesize\small
21    \let\footnoterule\relax
22    \ifsphinxpdfoutput
23      \begingroup
24      % This \def is required to deal with multi-line authors; it
25      % changes \\ to ', ' (comma-space), making it pass muster for
26      % generating document info in the PDF file.
27      \def\\{, }
28      \pdfinfo{
29        /Author (\@author)
30        /Title (\@title)
31      }
32      \endgroup
33    \fi
34    \begin{flushright}%
35      %\sphinxlogo%
36      {\center
37        \vspace*{3cm}
38        \includegraphics{logo.pdf}
39        \vspace{3cm}
40        \par
41        {\rm\Huge \@title \par}%
42        {\em\LARGE \py@release\releaseinfo \par}
43        {\large
44         \@date \par
45         \py@authoraddress \par
46        }}%
47    \end{flushright}%\par
48    \@thanks
49  \end{titlepage}%
50  \cleardoublepage%
51  \setcounter{footnote}{0}%
52  \let\thanks\relax\let\maketitle\relax
53  %\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
54}
55
56\fancypagestyle{normal}{
57  \fancyhf{}
58  \fancyfoot[LE,RO]{{\thepage}}
59  \fancyfoot[LO]{{\nouppercase{\rightmark}}}
60  \fancyfoot[RE]{{\nouppercase{\leftmark}}}
61  \fancyhead[LE,RO]{{\@title, \py@release}}
62  \fancyhead[RE,LO]{{\chaptername\:\thechapter\:Section\:\thesection}}
63  \renewcommand{\headrulewidth}{0.4pt}
64  \renewcommand{\footrulewidth}{0.4pt}
65}
66
67\fancypagestyle{plain}{
68  \fancyhf{}
69  \fancyfoot[LE,RO]{{\thepage}}
70  \renewcommand{\headrulewidth}{0pt}
71  \renewcommand{\footrulewidth}{0.4pt}
72}
73
74\titleformat{\section}{\Large}%
75            {\py@TitleColor\thesection}{0.5em}{\py@TitleColor}{\py@NormalColor}
76\titleformat{\subsection}{\large}%
77            {\py@TitleColor\thesubsection}{0.5em}{\py@TitleColor}{\py@NormalColor}
78\titleformat{\subsubsection}{}%
79            {\py@TitleColor\thesubsubsection}{0.5em}{\py@TitleColor}{\py@NormalColor}
80\titleformat{\paragraph}{\large}%
81            {\py@TitleColor}{0em}{\py@TitleColor}{\py@NormalColor}
82
83\ChNameVar{\raggedleft\normalsize}
84\ChNumVar{\raggedleft \bfseries\Large}
85\ChTitleVar{\raggedleft \rm\Huge}
86
87\renewcommand\thepart{\@Roman\c@part}
88\renewcommand\part{%
89   \pagestyle{normal}
90   \if@noskipsec \leavevmode \fi
91   \cleardoublepage
92   \vspace*{6cm}%
93   \@afterindentfalse
94   \secdef\@part\@spart}
95
96\def\@part[#1]#2{%
97    \ifnum \c@secnumdepth >\m@ne
98      \refstepcounter{part}%
99      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
100    \else
101      \addcontentsline{toc}{part}{#1}%
102    \fi
103    {\parindent \z@ %\center
104     \interlinepenalty \@M
105     \normalfont
106     \ifnum \c@secnumdepth >\m@ne
107       \rm\Large \partname~\thepart
108       \par\nobreak
109     \fi
110     \MakeUppercase{\rm\Huge #2}%
111     \markboth{}{}\par}%
112    \nobreak
113    \vskip 8ex
114    \@afterheading}
115\def\@spart#1{%
116    {\parindent \z@ %\center
117     \interlinepenalty \@M
118     \normalfont
119     \huge \bfseries #1\par}%
120     \nobreak
121     \vskip 3ex
122     \@afterheading}
123
124% use inconsolata font
125\usepackage{charter}
126\usepackage[defaultsans]{lato}
127\usepackage{inconsolata}
128
129% fix single quotes, for inconsolata. (does not work)
130%%\usepackage{textcomp}
131%%\begingroup
132%%  \catcode`'=\active
133%%  \g@addto@macro\@noligs{\let'\textsinglequote}
134%%  \endgroup
135%%\endinput
Note: See TracBrowser for help on using the repository browser.