-
Notifications
You must be signed in to change notification settings - Fork 17
/
microej.sty
108 lines (97 loc) · 3.93 KB
/
microej.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
% Copyright 2008-2024, MicroEJ Corp. Content in this space is free for read and redistribute. Except if otherwise stated, modification is subject to MicroEJ Corp prior approval.
% MicroEJ is a trademark of MicroEJ Corp. All other trademarks and copyrights are the property of their respective owners.
\ProvidesPackage{microej}[2019/11/21 package microej]
% Set up Source Sans Pro as the default font, and Inconsolata as the default
% monospace font.
\usepackage[default]{sourcesanspro}
\usepackage{inconsolata}
\usepackage[T1]{fontenc}
% tcolorbox for wrapping color boxes
\usepackage{tcolorbox}
% Redefine some colors used outside highlighting
\usepackage{xcolor}
\definecolor{code}{HTML}{E74C3C}
\definecolor{codebg}{RGB}{248,248,248}
\definecolor{codeborder}{HTML}{E1E4E5}
\definecolor{guilabel}{HTML}{000000}
\definecolor{guilabelbg}{HTML}{cbd3d7}
\definecolor{guilabelborder}{HTML}{cbd3d7}
\definecolor{link}{HTML}{E74C3C}
\sphinxsetup{
TitleColor={RGB}{0,0,0},
InnerLinkColor={named}{link},
OuterLinkColor={named}{link},
VerbatimColor={named}{codebg},
VerbatimBorderColor={named}{codeborder},
}
%Restyle code elements to border boxes with color, not just \emph (default)
\renewcommand{\sphinxcode}[1]{
% {\fcolorbox{codeborder}{codebg}{\color{code}\texttt{#1}}}
% {\begin{tcolorbox}[colback=codebg, colframe=codeborder]
{\color{code}\texttt{#1}}
% {testimg}
% \end{tcolorbox}}
}
% Restyle gui label elements to border boxes with color, not just \emph (default)
\renewcommand{\sphinxguilabel}[1]{
{\fcolorbox{guilabelborder}{guilabelbg}{\color{guilabel}#1}}
}
% style for URLs
\hypersetup{%
% colorlinks=true,% hyperlinks will be coloured
% linkcolor=green,% hyperlink text will be green
linkbordercolor=link,% hyperlink border will be red
}
\Hy@AtBeginDocument{%
\def\@pdfborder{0 0 1}% Overrides border definition set with colorlinks=true
\def\@pdfborderstyle{/S/U/W 1}% Overrides border style set with colorlinks=true
% Hyperlink border style will be underline of width 1pt
}
% Used to set a commit id over the release version. Sphinx makes it difficult to
% override release/version commands directly
\newcommand{\microejversion}{}
\renewcommand{\py@release}{\microejversion}
% Title page forked from Sphinx title page. Override the base sphinxmaketitle
% command to make a centered title page with more spacing
\renewcommand{\sphinxmaketitle}{%
\let\sphinxrestorepageanchorsetting\relax
\ifHy@pageanchor\def\sphinxrestorepageanchorsetting{\Hy@pageanchortrue}\fi
\hypersetup{pageanchor=false}% avoid duplicate destination warnings
\begin{titlepage}%
\let\footnotesize\small
\let\footnoterule\relax
\begingroup % for PDF information dictionary
\def\endgraf{ }\def\and{\& }%
\pdfstringdefDisableCommands{\def\\{, }}% overwrite hyperref setup
\hypersetup{pdfauthor={\@author}, pdftitle={\@title}}%
\endgroup
\begin{center}%
\vfill
{\Huge \@title \par}
\vfill
\sphinxincludegraphics[height=2in]{mascot.pdf}\par
\vfill
{\LARGE
\begin{tabular}[t]{c}
MicroEJ Corp.
\end{tabular}\kern-\tabcolsep
\par}
\vfill
{\large \py@release \par}
{\large \@date \par}
{\small {Copyright 2008-2024, MicroEJ Corp. Content in this space is free for read and redistribute. Except if otherwise stated, modification is subject to MicroEJ Corp prior approval. MicroEJ is a trademark of MicroEJ Corp. All other trademarks and copyrights are the property of their respective owners.} \par}
\end{center}%\par
\@thanks
\end{titlepage}%
\setcounter{footnote}{0}%
\let\thanks\relax\let\maketitle\relax
%\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
\clearpage
\ifdefined\sphinxbackoftitlepage\sphinxbackoftitlepage\fi
\if@openright\cleardoublepage\else\clearpage\fi
\sphinxrestorepageanchorsetting
}
% Customize TOC tree
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}
\endinput