-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.tex
61 lines (54 loc) · 2.44 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
% This file provides examples of some useful macros for typesetting
% dissertations. None of the macros defined here are necessary beyond
% for the template documentation, so feel free to change, remove, and add
% your own definitions.
%
% We recommend that you define macros to separate the semantics
% of the things you write from how they are presented. For example,
% you'll see definitions below for a macro \file{}: by using
% \file{} consistently in the text, we can change how filenames
% are typeset simply by changing the definition of \file{} in
% this file.
%
%% The following is a directive for TeXShop to indicate the main file
%%!TEX root = diss.tex
\newcommand{\NA}{\textsc{n/a}} % for "not applicable"
\newcommand{\eg}{e.g.,\ } % proper form of examples (\eg a, b, c)
\newcommand{\ie}{i.e.,\ } % proper form for that is (\ie a, b, c)
\newcommand{\etal}{\emph{et al}}
% Some useful macros for typesetting terms.
\newcommand{\file}[1]{\texttt{#1}}
\newcommand{\class}[1]{\texttt{#1}}
\newcommand{\latexpackage}[1]{\href{http://www.ctan.org/macros/latex/contrib/#1}{\texttt{#1}}}
\newcommand{\latexmiscpackage}[1]{\href{http://www.ctan.org/macros/latex/contrib/misc/#1.sty}{\texttt{#1}}}
\newcommand{\env}[1]{\texttt{#1}}
\newcommand{\BibTeX}{Bib\TeX}
% Define a command \doi{} to typeset a digital object identifier (DOI).
% Note: if the following definition raise an error, then you likely
% have an ancient version of url.sty. Either find a more recent version
% (3.1 or later work fine) and simply copy it into this directory, or
% comment out the following two lines and uncomment the third.
\DeclareUrlCommand\DOI{}
\newcommand{\doi}[1]{\href{http://dx.doi.org/#1}{\DOI{doi:#1}}}
%\newcommand{\doi}[1]{\href{http://dx.doi.org/#1}{doi:#1}}
% Useful macro to reference an online document with a hyperlink
% as well with the URL explicitly listed in a footnote
% #1: the URL
% #2: the anchoring text
\newcommand{\webref}[2]{\href{#1}{#2}\footnote{\url{#1}}}
% epigraph is a nice environment for typesetting quotations
\makeatletter
\newenvironment{epigraph}{%
\begin{flushright}
\begin{minipage}{\columnwidth-0.75in}
\begin{flushright}
\@ifundefined{singlespacing}{}{\singlespacing}%
}{
\end{flushright}
\end{minipage}
\end{flushright}}
\makeatother
% \FIXME{} is a useful macro for noting things needing to be changed.
% The following definition will also output a warning to the console
\newcommand{\FIXME}[1]{\typeout{**FIXME** #1}\textbf{[FIXME: #1]}}
% END