-
Notifications
You must be signed in to change notification settings - Fork 1
/
macros.tex
125 lines (99 loc) · 2.05 KB
/
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
\renewcommand\thechapter{\Alph{chapter}}
\newcounter{mysection}
\renewcommand\thesection{\arabic{mysection}}
%Per section figure numbering instead of per chapter.
\counterwithin{figure}{section}
\newcommand{\mysection}[1]{
\stepcounter{mysection}
\section{#1}
\setcounter{footnote}{0}
}
%Section with no number
\newcommand{\mysectionnn}[1]{
\section*{#1}
\addcontentsline{toc}{section}{#1}
\markright{\MakeUppercase{#1}}
\setcounter{footnote}{0}
}
%Section with no number and short title
\newcommand{\mysectiontwo}[2]{
\section*{#2}
\addcontentsline{toc}{section}{#1}
\setcounter{footnote}{0}
}
%No caption figure
\newcommand{\myfigure}[2]{
\begin{figure}
\centering
\mygraphics{#1}
\caption{}
\label{#2}
\end{figure}
}
%Captioned figure
\newcommand{\myfigurec}[3]{
\begin{figure}
\centering
\mygraphics{#1}
\caption{#3}
\label{#2}
\end{figure}
}
\newcommand{\hr}{
\begin{center}
\rule{0.5\linewidth}{0.4pt}
\end{center}
}
\newcommand{\myendsectiontext}{
% {\centering
% \ ~
%\par}
%
%{\centering
% *
%\par}
}
%comma in a superscript
\newcommand{\supercomma}{\textsuperscript{,}}
%Degree sign
\newcommand{\degree}{$^\circ$}
%move the footnote counter back
\newcommand{\footback}[1]{\addtocounter{footnote}{-#1}}
%move the footnote counter +1
\newcommand{\footnext}{\addtocounter{footnote}{1}}
%\DeclareNewFootnote{A}
%\DeclareNewFootnote{B}[alph]
\newcommand{\comment}[1]{
}
%\newcommand\textsubscript[1]{\ensuremath{{}_{\text{#1}}}}
% Outline numbering
\setcounter{secnumdepth}{1}
%Use \whencolumns like:
%\whencolumns{ONE COLUMN}{TWO COLUMN}
\makeatletter
\if@twocolumn
%TWO COLUMN
%Used for graphics
\newcommand{\mygraphics}[1]{
\includegraphics[scale=0.125]{#1}
}
\newcommand{\mygraphicss}[2]{
\scalebox{0.5}{\includegraphics[scale=#2]{#1}}
}
\newcommand{\whencolumns}[2]{
#2
}
\else
%ONE COLUMN
%Used for graphics
\newcommand{\mygraphics}[1]{
\includegraphics[scale=0.25]{#1}
}
\newcommand{\mygraphicss}[2]{
\includegraphics[scale=#2]{#1}
}
\newcommand{\whencolumns}[2]{
#1
}
\fi
\makeatother