-
Notifications
You must be signed in to change notification settings - Fork 1
/
occi.sty
73 lines (59 loc) · 1.57 KB
/
occi.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
%
% Contributed by Ralf Nyren...
%
%% Double page
\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty} ~ \cleardoublepage}}
%%% Fonts %%%
\def\figurecaptionfont{\footnotesize}
\def\tablefont{\footnotesize}
\def\tablecaptionfont{\footnotesize}
%%% Floats %%%
% Thick \hline (investigate this, the details are not clear to me yet)
\newcommand{\Hline}{%
\noalign{\ifnum0=`}\fi\hrule \@height 2\arrayrulewidth \futurelet
\@tempa\@xhline
}
% Table rulers
\newcommand{\toprule}{\Hline\\[-6.5pt]}
\newcommand{\colrule}{\\[-7.5pt]\hline\\[-5.5pt]}
\newcommand{\botrule}{\\[-8pt]\Hline}
\newcommand{\crule}[1]{\\[-6pt]\cline{#1}\\[-6.5pt]}
% My table float, arguments are caption text and tabular.
\newcommand{\mytablefloat}[2]{%
\begin{table}[!h]
\centering
\footnotesize
\caption{#1}
\vspace{4pt}
#2
\end{table}
\vspace{2pt}%
}
% Caption tweaks
\renewcommand{\@makecaption}[2]{%
\vskip\abovecaptionskip
\sbox\@tempboxa{\footnotesize {\bf #1.} \hspace{2pt} #2}%
\ifdim \wd\@tempboxa >\hsize
\footnotesize {\bf #1.} \hspace{2pt} #2\par
\else
\global \@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
%%% Misc %%%
% Cancel the effect of the \ragged commands
\def\flushboth{%
\let\\\@normalcr
\@rightskip\z@skip \rightskip\@rightskip
\leftskip\z@skip
\parindent 1.5em\relax}
% Highlights
%\usepackage{soul}
\usepackage{color}
\definecolor{hlcolor}{RGB}{40,40,40}
\newcommand{\hl}[1]{\textcolor{hlcolor}{#1}}
% Line numbering
\usepackage{lineno}
\linenumbers
% Todo command
\newcommand{\todo}[1]{\textcolor{red}{TODO: #1}}