Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is it possible to specify the size of tikzpicture like [latex]picture and pspicture?

313 views
Skip to first unread message

Sean

unread,
Nov 26, 2009, 11:50:47 PM11/26/09
to
Is it possible to specify the size of tikzpicture like [latex]picture
and pspicture?

Kjell Magne Fauske

unread,
Nov 27, 2009, 1:48:23 PM11/27/09
to
On Nov 27, 5:50 am, Sean <guo.xiaoy...@gmail.com> wrote:
> Is it possible to specify the size of tikzpicture like [latex]picture
> and pspicture?

Yes, if you by size mean bounding box. PGF does a good job determining
a bounding box automatically, but if you need to set a bounding box
explicitly you can apply the 'use as bounding box' option to a path.
PGF will then use the path as a bounding box. This is described in the
section "Establishing a Bounding Box" of the PGF manual.

Here is a simple example:

...
\begin{tikzpicture}
\path[use as bounding box] (0,0) rectangle (10,10);
\draw (1,1) -- (3,3);
...
\end{tikzpicture}
...

- Kjell Magne Fauske

0 new messages