LaTeX: Difference between revisions
Fabrice P. Laussy's Web
Fabrice (talk | contribs)
Fabrice (talk | contribs)
Line 15: Line 15:
Splitting equations within an aligned set can be done as followed~[http://goo.gl/Z8leFI]:
Splitting equations within an aligned set can be done as followed~[http://goo.gl/Z8leFI]:


{{multicol}}
<pre>
\begin{align}
\begin{align}
   a &= \begin{aligned}[t]
   a &= \begin{aligned}[t]
Line 25: Line 27:
       \end{aligned}
       \end{aligned}
\end{align}
\end{align}
</pre>
{{multicol-break}}
\begin{align}
  a &= \begin{aligned}[t]
      &b + c + d +\\
      &c + e + f + g + h + i
      \end{aligned}\\
  k &= \begin{aligned}[t]
      &l + m + n\\
      &+ o + p + q
      \end{aligned}
\end{align}
{{multicol-end}}
== Fonts ==
== Fonts ==



Revision as of 12:58, 2 April 2014

{{{1}}}

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

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

It is the uppercase version of $\tau\epsilon\chi$, a Greek word for Tech, which is how $\mathrm{\TeX}$ should be pronounced.

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

Equations

Alignment

Splitting equations within an aligned set can be done as followed~[1]:

\begin{align}
  a &= \begin{aligned}[t]
      &b + c + d +\\
      &c + e + f + g + h + i
       \end{aligned}\\
  k &= \begin{aligned}[t]
      &l + m + n\\
      &+ o + p + q
       \end{aligned}
\end{align}

\begin{align}

 a &= \begin{aligned}[t]
     &b + c + d +\\
     &c + e + f + g + h + i
      \end{aligned}\\
 k &= \begin{aligned}[t]
     &l + m + n\\
     &+ o + p + q
      \end{aligned}

\end{align}

Fonts

See Will Robertson preambles to use different fontsets.

Formatting

  • Wrapping figures in text: [2]

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 [3])

\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).