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

4.115
Last change on this file since ad42291 was ad42291, checked in by Chris Johns <chrisj@…>, on 03/16/16 at 23:33:42

Remove the minted gobble.

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