-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLaTeX-utilities.tex
More file actions
55 lines (45 loc) · 1.6 KB
/
LaTeX-utilities.tex
File metadata and controls
55 lines (45 loc) · 1.6 KB
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
\usepackage{graphicx, xspace, wrapfig, ifthen, amssymb}
% hyperref for validation
\usepackage[draft=true,hyperfootnotes=false,bookmarks=false]{hyperref}
% Compress bibliography
%\def\IEEEbibitemsep{1pt plus 0.5cm}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
% Section, Figure, and Table references
\newcommand{\secref}[1]{Section~\ref{#1}}
\newcommand{\figref}[1]{Figure~\ref{#1}}
\newcommand{\tabref}[1]{Table~\ref{#1}}
%\newcommand{\seeurl}[1]{\footnote{See \url{#1}}}
\newcommand{\seeurl}[1]{\footnote{See \nolinkurl{#1}}}
% Tools in small case
\newcommand{\tool}{\textsc{ToolName}\xspace}
% Abbreviations
\newcommand{\etal}{{\em et al.}\xspace}
\newcommand{\etc}{{\em etc.}\xspace}
\newcommand{\ie}{{\em i.e.,}\xspace}
\newcommand{\eg}{{\em e.g.,}\xspace}
% Uber-cool way to add figures
\newcommand{\incfig}[4]{\begin{figure}[#1]
\centering
\includegraphics[#2]{figs/#3}
\caption{#4}
\label{fig:#3}
\end{figure}}
\newcommand{\incfight}[3]{\incfig{ht}{#1}{#2}{#3}}
\newcommand{\incwrapfig}[4]{\begin{wrapfigure}{#1}{#2}
\begin{center}
\vspace{-0.75cm}
\includegraphics[width=#2]{figs/#3}
\end{center}
\vspace{-0.55cm}
\caption{#4}
\vspace{-0.5cm}
\label{fig:#3}
\end{wrapfigure}}
% To add inline comments.
\newboolean{showcomments}
\setboolean{showcomments}{true}
\ifthenelse{\boolean{showcomments}}
{\newcommand{\nb}[2]{\fbox{\bfseries\sffamily\scriptsize#1}{\sf\small$\blacktriangleright$\textit{#2}$\blacktriangleleft$}}}
{\newcommand{\nb}[2]{}}
\newcommand{\vectornorm}[1]{\left|\left|#1\right|\right|}
\newcommand\RM[1]{\nb{Roberto}{#1}}