m ($\TeX$ and $\LaTeX$)
m (Lists)
Line 19: Line 19:
 
</code>
 
</code>
  
For more advanced redefinitions, see the tweaklist.sty package.
+
* To change the starting value of an enumerate list:
 +
 
 +
<code lang="latex">
 +
\begin{enumerate}
 +
  \setcounter{enumi}{4}
 +
  \item fifth element
 +
\end{enumerate}
 +
</code>
 +
 
 +
* To change enumeration (with square brackets, parentheses, etc.): (see [http://goo.gl/0ZzbB])
 +
 
 +
<code lang="latex">
 +
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
 +
\begin{document}
 +
\begin{enumerate}[label={[\arabic*]}]
 +
  \item First item
 +
  \item Second item
 +
  \item \ldots
 +
  \item Last item
 +
\end{enumerate}
 +
\end{document}
 +
</code>
  
 
== Footnotes ==
 
== Footnotes ==

Revision as of 23:56, 18 September 2012

{{{1}}}

Contents

$\mathrm{\TeX}$ and $\mathrm{\LaTeX}$

$\mathrm{\TeX}$ is one of the masterpieces of Don Knuth.

At some point in the early 2000, I switched to $\mathrm{\LaTeX}$ for convenience, and almost exclusively use the latter now.

Formatting

  • Wrapping figures in text: [1]

Lists

  • To change spacing between items, put after \begin{itemize}:

\addtolength{\itemsep}{-0.5\baselineskip}

  • To change the starting value of an enumerate list:

\begin{enumerate} \setcounter{enumi}{4} \item fifth element \end{enumerate}

  • To change enumeration (with square brackets, parentheses, etc.): (see [2])

\usepackage{enumitem}% http://ctan.org/pkg/enumitem \begin{document} \begin{enumerate}[label={[\arabic*]}] \item First item \item Second item \item \ldots \item Last item \end{enumerate} \end{document}

Footnotes

There is a $\mathrm{\LaTeX}$ package, footmisc, that is useful for manipulating footnote formatting.

  • Spacing between footnotes:

%\footnotesep is the space between footnotes: \setlength{\footnotesep}{-0.5\baselineskip}

%\footins is the space between the text body and the footnotes: \setlength{\skip\footins}{1cm}

  • To use footnotes to feature reference-style annotations, that is, with no subscripts and with enclosing brackets [1], add in the preamble:

\makeatletter \renewcommand{\@makefnmark} %{\@textsuperscript{\textit{\tiny{\@thefnmark}}}} {[\@thefnmark]} \renewcommand\@makefntext[1]{%

   \parindent 1em
   \noindent
   [\@thefnmark]\enspace #1}

\makeatother

(I left, commented, the original definition of the footnote).