pgf-tikz / pgf

A Portable Graphic Format for TeX
https://pgf-tikz.github.io/
1.14k stars 108 forks source link

backgrounds for scopes #531

Open pgf-tikz-bot opened 18 years ago

pgf-tikz-bot commented 18 years ago

Migrated from SourceForge Author: equaeghe Timestamp: 2006-02-22 21:53:21

Currently, backgrounds can be added to tikzpictures, but not to scopes.

To use backgrounds, one just has to additionally use

\usetikzlibrary{backgrounds}

in the preamble.

An example:

\begin{tikzpicture}[framed]
\draw (0,0) -- (1,1);
\end{tikzpicture}

This gives a framed picture.

As a scope can be seen and used as a logical sub-picture, it seems useful to also implement this functionality there, so one could write:

\begin{tikzpicture}
    \draw (0,0) -- (1,1);
    \begin{scope}[framed, xshift=2cm]
        \fill (0,0,1) circle (2cm);
    \end{scope}
\end{tikzpicture}
pgf-tikz-bot commented 11 years ago

Migrated from SourceForge Author: tantau Timestamp: 2013-08-29 09:10:15.589000

pgf-tikz-bot commented 11 years ago

Migrated from SourceForge Author: tantau Timestamp: 2013-08-29 09:10:16.075000

This is, indeed, a nice-to-have thing, but I postpone it (after it has been postponed for 7 years...)...

pgf-tikz-bot commented 11 years ago

Migrated from SourceForge Author: tantau Timestamp: 2013-09-30 10:31:51.568000

pgf-tikz-bot commented 5 years ago

Migrated from SourceForge Author: mo-gul Timestamp: 2018-12-31 06:58:42.934000

Diff:


--- old
+++ new
@@ -4,7 +4,7 @@
 To use `backgrounds`, one just has to additionally use

-\usepackage{pgflibrarytikzbackgrounds} +\usetikzlibrary{backgrounds}


 in the preamble.
hmenke commented 4 years ago

For this we'd need a scope-local bounding box. Sounds like a lot of work and a lot to keep track of. What about nested scopes?