The entry for the /tikz/trim left
option on pp. 176-177 of the TikZ & PGF manual for version 3.0.1a states (in the end of the option's description, on p. 177):
Use
trim left = default
to reset the value.
Why would anyone want to reset the value of the trim left
option? If I understand correctly, (1) this option applies to the entire \tikzpicture
environment, and (2) like every other option it has local effect.
Fact #1 implies that there is no sense in having more than one trim left
option in a given environment, and therefore if you find yourself wishing to reset this value, which you had set previously in the current tikzpicture
environment, you can simply avoid using this option to begin with.
Fact #2 implies that the value of the trim left
option is automatically reset in every following \tikzpicture
environment.
So what's the point in writing trim left = default
? Can anyone please give an example where this feature is put to sensible use?
A tikz/trim left
usage example
The tikz/trim left
option is described in section 15.8 'Establishing a Bounding Box'. The effect of tikz/trim left=<dimension or coordinate>
is described as follows.
The effect is the same as if you issue
\hspace{-s}
wheres
is the difference of the picture's bounding box's lower leftx
coordinate and thex
coordinate specified as<dimension or coordinate>
.
In other words, the picture is shifted horizontally in such a way that the imaginary vertical line through coordinate
will pass through the point on the page where the lower-left corner of the bounding box would have normally been located (in the absence of the tikz/trim left
option).
The following LaTeX manuscript is based on the example given on p. 176 of the manual:
\documentclass{article}
\usepackage{tikz}
\begin{document}
Text before image.%
\begin{tikzpicture}[trim left={(0,0)}]
\draw(-1,-1) grid (3,2);
\fill (0,0) circle (5pt);
\end{tikzpicture}%
Text after image.
\end{document}
trim left
. I, for example, have no idea what it does.\tikzset{...}
, so you need something that can turn the option back locally.every picture
defines a value fortrim left
,trim left=default
becomes useful.