# Latex

## Pycode

Caveat: Don't end a pycode environment with a comment, it will cause harm.

# Caption package

The caption package has the good intention of improving the appearance of figure captions. Unfortunately it changes the default style in a non-verbose way, which makes it dangerous to use in documents with existing formatting rules. Furthermore the subcaption package does not really tell that it loads the caption package behind the scenes.

## Positioning of pgfplots

Current answer: An axis environment is a special tikz node. It can be given a name using the option [name=abc] and be referenced as such. It can be positioned using the options [at=(...)] and [anchor=...]. It can NOT be positioned with the positioning library for reasons unknown.

## Images in tikz/pgfplots

It is possible to add images to plots using

\node {\includegraphics[width=.5\linewidth]{image}}


or

\begin{axis}[width=.5\linewidth,
enlargelimits=false,
axis lines=none,
ticks=none,
scale only axis,
axis equal image]