-
Notifications
You must be signed in to change notification settings - Fork 0
/
arg-macros.tex
129 lines (116 loc) · 3.65 KB
/
arg-macros.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
\usepackage[T1]{fontenc}
%\usepackage[scaled]{uarial}
\usepackage{helvet}
\renewcommand*\familydefault{\sfdefault}
\usepackage{xcolor}
\definecolor{dark}{gray}{.5}
\usepackage{fancyhdr}
\usepackage{ifthen}
\usepackage{titlesec}
\usepackage[dotinlabels]{titletoc}
\usepackage{changepage}
\usepackage{setspace}
\usepackage{array}
\usepackage{multirow}
\usepackage{makecell}
\usepackage{float}
\usepackage{colortbl}
\usepackage{enumerate}
\usepackage{lipsum}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{stmaryrd}
\usepackage{proof}
\usepackage[hyphens,spaces,obeyspaces]{url}
\usepackage[hidelinks]{hyperref}
%% For highlighting
\usepackage{soul}
\sethlcolor{yellow}
% Table of contents
\usepackage[titles]{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\renewcommand\contentsname{Table of Contents}
\titlecontents{section}[0em]{\smallskip\bfseries} % margin and space after item
{\thecontentslabel.\enspace} %numbered sections
{} %numberless section
{\titlerule*[0.4pc]{.}\contentspage} % dots between title and page number
%% Allows changing from portrait to landspace pages and back
\usepackage[usegeometry]{typearea}
\usepackage{geometry}
\geometry{
left=0.5in, right=0.5in, top=0.76in, bottom=0.76in
}
\newcommand*{\useportrait}{%
\clearpage
\KOMAoptions{paper=portrait,DIV=current} % switch to portrait
\newgeometry{ % geometry settings for portrait
left=0.5in, right=0.5in, top=1in, bottom=1.2in
}%
\fancyhfoffset{0pt} % recalculate head and foot width for fancyhdr
}
\newcommand*{\uselandscape}{%
\clearpage
\KOMAoptions{paper=landscape,DIV=current} % switch to landscape
\newgeometry{ % geometry settings for landscape
left=0.5in, right=0.5in, top=0.76in, bottom=0.76in
}%
\fancyhfoffset{0pt} % recalculate head and foot width for fancyhdr
}
\titleformat*{\section}{\normalsize\bfseries}
\titlespacing*{\section}{0pt}{0pt}{0.5\baselineskip}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}
\titlespacing*{\subsubsection}{0pt}{10pt}{5pt}
%\titlespacing*{\section}{0pt}{0.2\baselineskip}{0.3\baselineskip}
%\titlespacing*{\subsection}{0pt}{0.2\baselineskip}{0.3\baselineskip}
% Dot after section number and space between section number and title
\makeatletter
\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname.\ }
\makeatother
% Radiobuttons on front page
\usepackage{tikz}
\makeatletter
\newcommand*{\radiobutton}{%
\@ifstar{\@radiobutton0}{\@radiobutton1}%
}
\newcommand*{\@radiobutton}[1]{%
\begin{tikzpicture}
\pgfmathsetlengthmacro\radius{height("X")/2}
\draw[radius=\radius] circle;
\ifcase#1 \fill[radius=.6*\radius] circle;\fi
\end{tikzpicture}%
}
\makeatother
\newcommand{\PartName}{}
\newcommand{\Part}[1]
{\renewcommand{\PartName}{#1}
\clearpage%
\setcounter{section}{0}%
%\setcounter{page}{1}%
\noindent%
\textbf{#1}%
\vspace{3pt}%
\noindent}
\newcommand{\instructions}[1]
{\ifthenelse{\isundefined{\draft}}
{}
{{\color{dark} \small #1} \smallskip\par}}
%% Headers and footers
\pagestyle{fancy}
\renewcommand{\footrulewidth}{\headrulewidth}
\lhead{}
\rhead{{\small ARG No.: \proposalNo}}
\lfoot{{\small\textbf{ARG 2\textsuperscript{nd} Cycle Research Plan Form {\color{red}(Rev. March 2024)}}}}
\cfoot{}
\rfoot{{\small\textbf{Page \thepage}}}
%% For tables
\renewcommand{\arraystretch}{1.5}
\newcolumntype{P}[1]{m{\dimexpr #1\textwidth-2\tabcolsep}}
% Vertically centered wrapping columns
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
% Vertically and horizontally centered wraping columns
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
\definecolor{headercolor}{gray}{.8}
\colorlet{wpcolor}{blue!20}
\colorlet{taskcolor}{red!20}
\newlength{\realwidth}