source: rtems-docs/common/rtems.sty @ 3a71759

4.115am
Last change on this file since 3a71759 was 5daabd2, checked in by Amar Takhar <amar@…>, on Jan 16, 2016 at 4:41:06 AM

Initial reST documentation using Sphinx.

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