Econometrics blog

Sep 29, 2014

LaTeX: Change subsection numbering

If you want to change the subsection numbering, you have to renew the command first as follows:

\renewcommand\thesection{\roman{section}}
\renewcommand\thesubsection{\thesection.\roman{subsection}}
 
with similar commands like \thesubsubsection and so on 
of course, there's also \thechapter (in the book and report class) and \thepart.
Commands to typeset numbers include:
  • \arabic (1, 2, 3, ...)
  • \alph (a, b, c, ...)
  • \Alph (A, B, C, ...)
  • \roman (i, ii, iii, ...)
  • \Roman (I, II, III, ...)
  • \fnsymbol (∗, †, ‡, §, ¶, ...)
  •  
If you want to change numbering in \enumerate, use this:

\usepackage{enumerate}
.
.
.
\begin{enumerate}[(a)] % (a), (b), (c), ...
\item
\end{enumerate}
.
.
.
\begin{enumerate}[a)] % a), b), c), ...
\item
\end{enumerate}


 

Sep 19, 2014

LaTeX: Alligning long equation and manually input equation number


If your equation is too long, you can insert the following comment in the equation environment, with the \\ to break line.

\begin{equation}
\begin{aligned}
 ..... \\
........
 \end{aligned}
\end{equation}

for example:

\begin{equation}\label{e10}
 \begin{aligned}
  \text{ln VA} = lnQ_3 + 1/ \sigma_y lnMP + lnA + \alpha lnK + (1-\alpha + \varepsilon)\\
   \times ln (N-a_0 N^{3/2}) + (1-\rho)/\rho((1+MS)^{-1} ln(N-a_0N^{3/2})).
 \end{aligned}  
\end{equation}


If you want to manually set equation number just put \tag{equation number} in the end of the equation:

\begin{equation}\label{e10a}
\begin{aligned}
 \text{ln VA} = lnQ_3 + 1/ \sigma_y lnMP + lnA + \alpha lnK + (1-\alpha + \varepsilon)\\
   \times ln (N-a_0 N^{3/2}) + (1-\rho)/\rho((1+MS)^{-1} ln(N-a_0N^{3/2})).
   \end{aligned}   \tag{10a}
\end{equation}

LaTeX: Reduce line spacing in enumerate environment


To change enumerate, you must install package enumitem
\usepackage{enumitem}

to change enumerate globally:
\setlist[enumerate]{itemsep=0mm}
 
 to change enumerate locally,
\begin{enumerate}[itemsep=3mm]


 for example:


\documentclass{article}
\usepackage{lipsum}

\usepackage{enumitem}
\setlist[enumerate]{itemsep=-5mm}

\begin{document}

\lipsum[1]
\begin{enumerate}
    \item one
    \item two
\end{enumerate}

\lipsum[2]
\begin{enumerate}[itemsep=5mm]
    \item one
    \item two
\end{enumerate}
\end{document}