-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommonly_used.tex
89 lines (77 loc) · 2.27 KB
/
commonly_used.tex
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
% Referencing
\makeatletter
\def\tabref{\@ifstar\@tabref\@@tabref}
\def\@tabref#1{Table~\ref{#1}}
\def\@@tabref#1{(Table~\ref{#1})}
\makeatother
\makeatletter
\def\figref{\@ifstar\@figref\@@figref}
\def\@figref#1{Figure~\ref{#1}}
\def\@@figref#1{(Figure~\ref{#1})}
\makeatother
\newcommand{\exmref}[1]{Example~\ref{#1}}
\newcommand{\secref}[1]{Section~\ref{#1}}
% TODOs and not considering
\usepackage{xcolor}
\newcommand{\todo}[1]{{\color{red} #1}}
\newcommand{\add}[1]{{\color{blue} #1}}
\newcommand{\ignore}[1]{} % (not called skip to avoid confusion)
\colorlet{grey}{gray} % Added to avoid error messages
\let\textcolour\textcolor % Avoid errors from not using AmEng spelling
\providecommand{\keywords}[1]{{\bfseries Keywords:} #1}
% Alternatively, using an environment instead:
\newenvironment{keyword}
{{\bfseries Keywords:}}
{}
\def\indep{\perp\!\!\!\perp}
% Render code similarly to how JStatSoft does
\newcommand{\code}[1]{%
{\catcode`\%=12 \texttt{\detokenize{#1}}} \kern-1ex
}
% Additional JStatSoft-inspired bits
\let\proglang=\textsf
\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
% Bibliography
\usepackage[sort]{natbib}
\bibliographystyle{plainnat}
\setcitestyle{numbers} % set the citation style to ``numbers''.
% TO get numbered bibliography list % SOURCE tex.stackexchange.com/a/412250
%\bibliography{references}
%% Improve look of links in bibliography
\usepackage[hyphens]{url}
\usepackage{doi}
\renewcommand*{\doi}[1]{DOI \texttt{\href{http://doi.org/#1}{#1}}}
\usepackage{hyperref}
\hypersetup{breaklinks = true}
\hypersetup{colorlinks = true, % Get rid of the boxes
linkcolor = {black},
citecolor = {black},
urlcolor = {blue!80!black}
}
% Encoding etc.
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[british]{babel}
\usepackage{amsmath}
\newcommand*{\dd}{\ensuremath{\operatorname{d}\!}} % Fulfills ISO 80000-2 (preceded by ISO 31-11)
\usepackage{environ}
\NewEnviron{salign}{%
\begin{align}
\begin{split}
\BODY
\end{split}
\end{align}}
\NewEnviron{salign*}{%
\begin{align*}
\begin{split}
\BODY
\end{split}
\end{align*}}
% Fix default date
\usepackage[UKenglish]{datetime}
\let\dateUKenglish\relax
\newdateformat{dateUKenglish}{\ordinaldate{\THEDAY}~\monthname[\THEMONTH] \THEYEAR}
\date{\dateUKenglish\today}
\resizebox{\textwidth}{!}{
%content
}