{scoping} defines the context within which a variable name or other identifier is valid and can be used, or within which a declaration has effect.

learn more… | top users | synonyms (1)

4
votes
1answer
82 views

Scaling a tikz scope to the width of another tikz scope

Is there a way to scale tikz scope to the width of another tikz scope? I have an approach in which I put each of the scopes in an individual tikzpicture which is enclosed in a resizebox. This works ...
2
votes
1answer
71 views

Alternative for tikz's scope environment outside tikzpicture

I have a lot of small tikz graphics that I all want to scale down, so I'd like to put them in a scope, like this: \documentclass{article} \usepackage{tikz} \begin{document} ...
3
votes
0answers
39 views

Preserving the value of a macro outside the local scope [duplicate]

I'm writing a (supposedly) simple financial tracking program using tikz and the fp package. Within a tabular environment I compute a value using \pgfmathparse{adding some numbers}\pgfmathresult. ...
2
votes
2answers
160 views

scopes on chain: node distance not working

I have defined a few commands that each output a bunch of TikZ nodes that, combined, conceptually represent a single node/object. In order for the generated nodes to be treated as a cohesive whole, I ...
5
votes
2answers
205 views

Partial scope transparency in TikZ

When I try to use scope fading, in a scope, it seems to clip the rest of the scope that is not inside the fading rectangle. Interestingly, it seems to clip it at a random place. Some code and ...
7
votes
4answers
243 views

How can I limit the scope of a \renewcommand instruction to “table” environments?

I want to use \renewcommand{\arraystretch}{1.2} to adjust the space between the lines in my table. Since I have used matrices all over my paper (and this command also affect the matrices) I want to ...
3
votes
0answers
54 views

pgfkey `/.store in` handler not functioning as expected

I'm still working on learning how to use pgfkeys. Here's a snippet of code that I'm working on. It compiles fine: \documentclass{article} \RequirePackage{xparse} \RequirePackage{pgfkeys,pgffor} ...
3
votes
1answer
95 views

Match coordinate in two different scopes

I've many small pictures, each centered at (0,0) in their own figure but i need to combine them and in the combined picture the (0,0) of the 1st picture (in a scope) should be (4,2) of the 2nd picture ...
2
votes
1answer
114 views

Labeling user-defined shapes in TikZ

I have modified code for rotating a primitive 'match' shape (adapted from rotating camera code found here (Use a custom shape as a "building block"). How do I pass the label parameter in ...
8
votes
2answers
107 views

Getting \let definitions from inside a group, inside a loop

I have the following nested loop situation: \begingroup \def\do##1{% \begingroup \def\do####1{% \csletcs{somemacro@##1@####1}{someothermacro@##1@####1}}% ...
3
votes
1answer
146 views

How do I nest subdrawings in a bigger drawing in TikZ?

I want to draw several complex drawings and put them all together in a bigger TikZ drawing. How do I do that? So far, this is what I have done: \documentclass[preview]{standalone} \begin{document} ...
4
votes
1answer
213 views

tikz-qtree with scope ? (how to draw the Cayley formula)

I want to make a tree for the Cayley formula as this : (But with a vertical layout) I can use the tikz-qtree environments as show in section 1 below I can draw the graph as show in section 2 But ...
5
votes
2answers
101 views

How do I use scopes to apply a style to nodes inside a path?

I want to use nodes inside a single path, in order that I might position one relative to another using the ++(x,y) notation. However, a scope that I want to use to style the nodes only styles the ...
12
votes
4answers
585 views

Why are node names inside \begin{scope} still visible outside?

The following example draws three rectangles, each divided in two parts (they're Lisp cons cells). It works fine, but something doesn't seem right: I have used \begin{scope} inside the \cons macro, ...
2
votes
1answer
758 views

Applying backgrounds to TikZ scope

I have problems creating a background for a scope envionment Here is part of the code I used for a beamer slide: \documentclass{beamer} \usepackage{tikz} ...
4
votes
3answers
461 views

How to scale and clip a path at the same time?

Again, i started a question here, and i found the solution. But i think this method maybe useful for others. The problem: i exported the TikZ code of one path from Inkscape; then, i wanted to use it ...
6
votes
1answer
345 views

Pass options to the scope that is internally created by preaction

In the reply to this question on shadows, it was suggested to use the backgrounds library so that the shadow of one object doesn't overlap another object drawn previously. If I understand the ...
1
vote
0answers
93 views

Scope issues with pgfplotstable [closed]

I created a command that creates a table and do some computations on it. And I would like to use this command several times. \documentclass{minimal} \usepackage{pgfplotstable} \pgfplotstableset{% ...
10
votes
2answers
258 views

How to make an infix \if variant?

How does one make custom \if variants in core TeX? I would like to write: \ifshape{it} ... \else ... \fi as in: \textit{Italic? \ifshape{it}Yes\else No\fi} Problem is, I get the error "Too many ...
1
vote
1answer
1k views

Why does 'every node' not work inside a scope environment?

I just tried the following and was suprised it didn't work: \begin{tikzpicture} ... some commands \begin{scope}[very thick, every node=./style={circle, fill=white, minimum size=1.2mm, inner ...
6
votes
2answers
501 views

scope/yscale not transforming coordinates?

To my understanding of the documentation, the scope block should transform all coordinates. However, in the following example, only circles themselves are scaled, but not their centers: black circles ...
7
votes
3answers
340 views

Global Coordinates

How can I declare coordinates in a block and access them from outside of the block? \begin{tikzpicture} \foreach \x / \y in { 1 / 3, 2 / 8, 3 / 14, }{ \coordinate (N\x) at ...
9
votes
1answer
674 views

TikZ: Execute code at end of scope OR picture and access its bounding box

TikZ provides the two keys execute at end picture={<code>} and execute at end scope={<code>} which can be used to execute any code at the end of the picture and of the current scope, ...