# Latex tricks, once again… Macros

4 Sep

I’m currently using some macros to help writing the Dissertation, here’s a few that are simple and useful:

%My own command Macros (PedroLopes)

\renewcommand{\quote}[1]{\textquotedblleft{}#1\textquotedblright{}}

This one allows you to define a closed style for quotes.

\newcommand{\cite2}[1]{[\citeNP{#1}]}

This forces the cite command to use [1] style for references instead of (1) that the book template uses.

\newcommand{\superscript}[1]{\ensuremath{^{\textrm{#1}}}}

\newcommand{\subscript}[1]{\ensuremath{_{\textrm{#1}}}}

These are a forcing of the super and subscript command, allows you to write in those styles easily.

\newcommand{\th}[0]{\superscript{th}}

\newcommand{\st}[0]{\superscript{st}}

\newcommand{\nd}[0]{\superscript{nd}}

\newcommand{\rd}[0]{\superscript{rd}}

Even more easily \th, \st, \nd, and \rd does the obvious (2nd, 3rd and so 4th)