This tag marks questions about the basic layer of the TikZ/PGF graphic language stack. For questions about higher layers use the tikz-pgf tag.
4
votes
0answers
59 views
Is this a bug in pgf ? pgfpatharcto
I made a simple and shortest example. I create a simple path containing an arc. But if I compute that path before the begin document, I obtain garbage, whereas it works as expected after begin ...
15
votes
0answers
81 views
Given a PS interpreter, can pstricks be converted to pgf?
When producing pdf directly, PostScript code cannot be used, which means that pstricks macros do not work. Now, it is still possible to include pstricks code using external tools (running LaTeX on ...
6
votes
2answers
66 views
How can I define a calculation of a dimension that I can reuse in a \savedanchor declaration?
In the following MWE, I declare a new shape myshape. In several instances, I plan to use a dimension that is calculated from different pgf keys (\my@width). One of these instances includes the ...
5
votes
2answers
88 views
Why does pgf not understand relative dimensions (ex, em, sp)?
The below MWE draws a number of rectangles using low-level pgf commands, each specified with a different unit that Latex understands. However, pgf doesn't seem to be able to determine the relative ...
7
votes
2answers
530 views
Using form-only patterns with variable: possible TikZ bug
While trying to use a variable pattern in TikZ with varying pattern color, I found that it did not seem to work. Here's a minimal working example:
\documentclass[tikz]{standalone}
...
6
votes
1answer
143 views
Programming with pgf arrays : how to create an array?
I am trying to do some automatic drawing in tikz. The point is I want to be able to provide the minimal quantity of information to my macro, and still have it work.
More precisely (but without ...
2
votes
1answer
81 views
Use result from pgfmath with xifthen
I try to use the results of pgfmath calculations with cnttest from xifthen, but it fails:
\documentclass{article}
\usepackage{pgf,xifthen}
\begin{document}
\pgfmathparse{42+77}%
...
8
votes
2answers
81 views
Identification of an empty macro from pgfplots using \ifx
Consider following MWE and the output thereafter. I have defined an empty macro and used \ifx to identify it as such. However, when an empty macro is received from \pgfkeysgetvalue, \ifx doesn't work.
...
6
votes
1answer
135 views
TikZ: posticipate execution of type /.code key
I'm trying to create some TikZ keys which allows to easily draw distributed loads on a mechanical structure (or truss). The code I wrote at the moment is:
\documentclass[a4paper]{article}
...
5
votes
2answers
433 views
creating a fifo symbol with pgfdeclareshape
I'm compiling with:
pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2011.7.8)
pgf 2008/01/15 v2.10 (rcs-revision 1.12)
tikz 2010/10/13 v2.10 (rcs-revision 1.76)
...
7
votes
1answer
96 views
Why do my “to path” arrowheads disappear when I upgrade to PGF 2.10?
Since I upgraded to PGF 2.10, some of my arrows drawn with to don't look right anymore. For instance, they are missing arrow-heads, and some other styles I applied to them have also disappeared. For ...
6
votes
2answers
196 views
\dimexpr gives 0pt
Why on earth does the following expression give me 0.0pt?
\edef\x{\the\dimexpr 3ex-1ex\relax}
I assume ex is a LaTeX unit, as it isn't in the TeXbook. Please where is it defined in the kernel?
...
5
votes
2answers
177 views
How to share selected options between different nodes in TikZ?
(I didn't find a better title for the question. Suggestions are welcomed.)
I have created some new shapes in TikZ and I would like to put one of them below another one when a certain key is passed to ...
1
vote
1answer
141 views
pgffor map elements
pgffor's foreach can take an "array" of elements. I need to map those elements using another array(a lookup table) because I need both the elements and there mapped value.
e.g., suppose I an doing ...
0
votes
0answers
20 views
TeXnicCenter won't build when using pgf package [duplicate]
Possible Duplicate:
How can I fix the error “GUI framework cannot be initialized” with TeXnicCenter and MiKTeX?
I recently installed the "pgf" package via the MiKTeX package ...
9
votes
2answers
450 views
Custom shapes in TikZ
I am trying to define a new shape in TikZ following the instructions of section 75.5 of the manual. Reading the question Drawing mechanical systems in LaTeX, I started to think that a "mechanical" ...
3
votes
1answer
75 views
pgfparser module and blank spaces
After the question Macro for a code translator, I followed the advice of polgab and used the pgf parser module.
I was very disappointed when I reached the point of trying to parse a blank space.
I ...
9
votes
2answers
229 views
PGF's \foreach with weird list
A claim is made at pgffor: Special treatment for last item in \foreach-list that the following works. But I can't get it to work. What have I missed?
\newcount\nra
\foreach[count=\nx]\x in ...
3
votes
1answer
149 views
PGF loop variables in string comparisons
In a bigger context, I need to check whether an integer parameter is contained in a set of numbers. I decided to encode sets as strings; elements are separated by !. I don't know whether this is the ...
2
votes
2answers
104 views
pgfkeys 'filtering state'
Please does anyone know the 'filtering state' referred to in the following code from the pgfkeys-core file?
\def\pgfkeys@install@filter@and@invoke#1{%
\ifpgfkeysfilteringisactive
...
3
votes
1answer
179 views
Insert TeX code from another Beamer presentation (which uses PGF) into Lyx while composing new Beamer presentation
I'm struggling to insert the TeX code for an older Beamer presentation into one that I'm currently putting together using Lyx. The problem seems to be that Lyx doesn't recognize the package import:
...
14
votes
1answer
538 views
Reuse of soft path in fading declaration? Transformation of fadings?
This question led to a new package:
pgf-blur
I have an idea for a fairly realistic-looking fading drop shadow, that works with almost arbitrary node shapes. This would also give a generic ...
19
votes
5answers
497 views
Parsing text letter by letter
The PGF package has a module named parser that can parse a block of text from an initial state to a final state letter by letter.
For example, the following MWE will parse a given text and count the ...
3
votes
1answer
193 views
How to get the tikz/font pgfkey value and pass is to \pgfnode command
Let's say that I'm writing a decoration where I use the \pgfnode command in it. It works well but if I change the pgfkey TikZ/font to any dimension, it is not passed to the nodes in the decoration. ...
3
votes
1answer
175 views
Multiple listings using range markers and PGF's \foreach
I've been trying to include multiple code snippets from a unique source file by using listings's range markers (named lines) and PGF's \foreach macro:
\foreach \x in {1,2,...,8} {
...
7
votes
2answers
376 views
Making a PGF shape
I'm having terrible trouble trying to declare a new shape with PGF and would appreciate help. What I would like to achieve is:
where the lighter grey boxes are \nodepart anchors, and the base shape ...
14
votes
1answer
1k views
What is the advantage of using \includegraphics instead of \pgfimage for ordinary image inclusion?
The TikZ & PGF manual says that ‘LaTeX’s \includegraphics is designed better than pgf’s image mechanism’ and that ‘LaTeX users are encouraged to use \includegraphics to include images.’ But is ...
0
votes
0answers
311 views
Package clash? Tkz-berge and memoir [closed]
I'm having trouble using memoir and tkz-berge at the same time.
If I use:
\documentclass{article}
\usepackage{tkz-berge}
\begin{document}
Hello world
\end{document}
I can compile without a ...
6
votes
1answer
298 views
Tikz: redefinition of patterns
I save my TikZ figures in separate files containing all the necessary definitions, so it's easy to reuse them.
In some cases I defined a new pattern, e.g. by
\pgfdeclarepatternformonly{wide ...
5
votes
2answers
451 views
How to raise a generic curve. Problem with \pgfdeclaredecoration
The goal I want to obtain is to have a parallel curve to a generic curve defined in a \draw command trough TikZ. To achieve it, I used the TikZ decorations library and the command ...
2
votes
1answer
177 views
Including a djVu files with pgf/pdfpages package
Is it possible to manipulate .djVu files with pgf and/or pdfpage packages; and produce a pdf?
6
votes
3answers
274 views
How to learn to create General (Functional) Shadings wifth pgf?
In the section called General (Functional) Shadings in the PGF/TikZ manual, there is an "explanation" of the command to create a general functional shading.
The author of this section assumes that ...
1
vote
1answer
706 views
Acrobat on Windows doesn't recognize the images from pdflatex pdfs generated on Ubuntu [closed]
I'm dealing with an annoying behaviour of my pdf file. It seems that Acrobat or Reader doesn't recognize the images. I work with texlive on Ubuntu 11.04 and I compile the source file with pdftex in ...
4
votes
1answer
319 views
How to animate a path or how to draw starting fraction of a complex but linear path?
I would like to reproduce something similar to Animating Protocols but with a compound path and not a straight one.
\documentclass{standalone}
\usepackage{tikz}
\usepackage{animate}
...
5
votes
1answer
93 views
defining a new pgf class fails
I want to use the pgf oo library to create a new class. Unfortunately, even this fails:
\documentclass{article}
\usepackage{tikz}
\usepgfmodule{oo}
\pgfooclass{mapEntry}{ %
\method mapEntry() ...
9
votes
1answer
673 views
Using patterns inside pgf shapes
Is it possible to (correctly) use patterns inside a pgf shape definition ? For example, I try to define a shape as a rectangle filled with a pattern, like this
\usetikzlibrary{patterns}
...
8
votes
1answer
335 views
Does \let\a=\a do anything more than \relax?
Poking around with \show (and \loggingall) in the TikZ code, I see that the definition of \tikz@command@path (which \path is \let to inside tikzpictures) starts with
\let \tikz@signal@path ...
2
votes
1answer
636 views
Line with transparence changing with TikZ
I'd like to have a colored line that starts with transparent 100 and ends with trasparent, let's say, 30.
I tried this code:
\documentclass{standalone}
\usepackage{tikz}
...
2
votes
3answers
479 views
Length, surface, and coordinates of a tikz-pgf path
I need to perform computations on the points that belong to a tikz-pgf path. More specifically, I want to know how many points have a y coordinate exceeding a given value, and I want to calculate ...
1
vote
1answer
2k views
Installing pgfcore.sty
There is a problem with installing pgfcore.sty file for the beamer package. This file can not be installed from the internet (TeX says file not found) and when I plug this file manually into the ...
4
votes
1answer
215 views
Determine if within a PGF axis environment
Is there an easy way to test whether a macro is called from within an PGF \begin{axis}...\end{axis} environment? One solution would be to define a new environment myself that sets a flag at ...
1
vote
2answers
354 views
Flushing PGF commands and local variable
I think I need a way to flush the PGF commands as the reference to \LabelText uses the last value, and not value at the time of invocation. The macro LabelPoint is intended to replace the first ...
21
votes
6answers
5k views
What is the easiest way to draw 3D cube with TikZ?
I'm trying to find the easiest way to draw a 3D cube (it's for my UML diagram) with TikZ. Could you please give an example?
Like this:
5
votes
2answers
914 views
How to use pgf-math inside an argument?
I response to xport's recent questions, I tried to do the following
\usepackage{pgf}
[...]
\rule{\pgfmathdivide{4}{3}\pgfmathresult mm}{5mm}
Unfortunately, this fails with the following error ...
2
votes
1answer
225 views
Does \pgflowlevel{\pgftransformscale{}} do the same as normal tikz scale?
I am wondering the following.
Somebody made a complicated tikz figure (our university logo). Now I am having troubles, because the width and height latex is reporting are not the 'real' width and ...