source: rtems-docs/common/rtemsstyle.sty @ 5353914

4.11
Last change on this file since 5353914 was 5353914, checked in by Chris Johns <chrisj@…>, on Mar 20, 2016 at 11:27:52 PM

Updates from user reviews.

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