Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [pgf-core]

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.

0
votes
1answer
107 views

Same font in figues as in document text, CorelDraw 2 pgf?

Dear stackoverflow community, I am in the midst of writing my thesis and I want my figures to have the same font as my text in Latex. I have a lot of figures, so I would like the process to be ...
2
votes
2answers
119 views

Extra space at the end of the document added by PGF

As seen in this answer to my previous question “Extra vertical space at end of last column when loading adjustbox (only luatex)”, loading the package pgf causes the following to be added at the end of ...
9
votes
2answers
336 views

Drawing C. elegans germline in Tikz

I am trying to draw C. elegans germline using TikZ. I have used Philippe Goutet's / script to create "hexagon with filled round circles" The codes are \documentclass[11pt]{article} \usepackage{tikz,...
4
votes
1answer
103 views

Bending library and pfgpathquadraticcurveto don't play well together

I'm working on an arrowhead that encompasses a path. As long as the path is straight, it works well. When the path is curved, \pgfpathquadraticcurveto produces some weird results. It appears that ...
3
votes
1answer
111 views

Inverted clipping using node shape?

I'm am able to invert clipping regions (as discussed in this question) and to use node shapes for clipping (as discussed in this one), but I'd like to combine the two, and I don't see quite how to do ...
1
vote
2answers
123 views

How to join lines in a \pgfextra block

I want to make a block using a style "overlay" (append after command) that looks like this but with joined line segments. Is there any way to modify my code to achieve joins? Unfortunately I don't ...
2
votes
0answers
438 views

Absolute positioning of Tikz pictures on Beamer slides when using “show notes” option [closed]

TiKz allows you to position tikzpictures anywhere on the page using the pre-defined current page co-ordinate. However, when you also use Beamer's show notes option, which uses pgfpages, this destroys ...
2
votes
3answers
181 views

How can I loop through macros with \foreach and pass them to \xapptocmd?

Can I use pgffor to loop through macros (control sequences)? e.g. \foreach \macro in {\lions,\tigers,\bears} In case you haven't figured it out, I love modularization! Let's say I have three ...
2
votes
0answers
155 views

Why doesn't TikZ/pgf's \foreach[remember] work with explicit lists? [closed]

The short version: when using \foreach \x in [remember=\x as \lastx], iterating in {1,...,3} works, but iterating in {1,2,3} doesn't. I have read the manual paragraph on /pgf/foreach/remember but don'...
2
votes
1answer
129 views

Wrong intersection and position computations \anchorborder of \pgfdeclareshape

I'm trying to define a "labeled icon" shape (LIS), that is an icon (drawn with pgf commands, but replaced by a simple rectangle here for simplicity) with a label that is stuck to the icon (not the ...
7
votes
1answer
465 views

Logarithmic scaling of picture in tikz

I'm looking for something along the lines of \begin{scope}[scaling=logarithmic] ... \end{scope} The reason is, that I'm trying to visualise whether the Minkowski sums of some specific sets in R^2 (...
4
votes
1answer
186 views

How to combine Hobby paths with PGF Basic Layer commands?

I need to combine paths that are created via the hobby package with standard pgf path elements, like arcs. Within the Frontend Layer this is easily done, e.g. \documentclass{standalone} \usepackage{...
3
votes
1answer
523 views

Using pgfmultipartnode and its parameters (in pgflibraryshapes.callouts.code.tex)

I want to slightly modify pgflibraryshapes.callouts.code.tex to create a small tikz callout package that solves Tikz callout: positioning start of pointer. I think I have located the single relevant ...
3
votes
0answers
163 views

How to define a pgf curve with points instead of controls? [duplicate]

The syntax to produce a Bézier curve in pgf is \pgfpathcurveto{first control point}{second control point}{target} This defines the curvature by control points. Considering the degrees of freedom the ...
0
votes
0answers
50 views

How to declare new path commands in TikZ? [duplicate]

The TikZ Manual, section 59.5 and some very good questions on this site explain how to declare new shapes for TikZ nodes with \pgfdeclareshape{myshape} ... to later use them with \node[shape=myshape] ...
40
votes
1answer
28k views

What's the difference between \path and \draw in Tikz?

The question is in the title: What is the difference between the commands \path and \draw in Tikz? The PGF and TikZ manual by Till Tantau tells me (on page 26 of the current version) that “\draw is ...
2
votes
1answer
416 views

Renaming anchors in predefined shapes

I am drawing several dozen diagrams with TikZ that will be using equilateral triangles. My current setup is using the regular polygon construction. The anchor names corner 1, corner 2, and corner 3 ...
7
votes
1answer
889 views

Tikz, how to a simple new shape

I want to make a new shape for switch in my network diagram. It's really simple based on circle. I got this manually by \def \drawswitch { \node[circle,draw] (circle){}; \draw (circle.south ...
15
votes
4answers
4k views

Tikz shape similar to rectangle with selective drawing of borders

I am looking for a tikz shape similar to the rectangle shape, but with the possibility of drawing individual borders selectively. Also when used with rounded corners, the corners missing a border ...
7
votes
1answer
393 views

Customized template for beamer

I'm a convinced beamer user, but in my institute they ask me to follow some template (of course prepared with PowerPoint). I would like to mimic it as much as possible with beamer, because otherwise I'...
2
votes
1answer
161 views

different coordinate frames for anchors and backgroundpath in node shapes?

I want to create a triangle shape for flow diagrams, so far I succeeded but the anchors I have defined are badly placed. This seems to be wired as I have just copied and pasted the code from the ...
2
votes
1answer
697 views

tick mark separation

My graphs have two ticks on the x-axis. I'd like to have 3 graphs across a page and include y-axis labels. Right now that wont fit. Is it possible to move the x-tick marks closer together so the ...
4
votes
1answer
605 views

Custom T shape in TikZ

I would to define a new "T" shape (i.e. the red and green shapes in the following image) so that I can then draw with TikZ the diagram below. Unfortunately I cannot figure out how to do. To be honest,...
7
votes
1answer
339 views

TikZ: compilation time performance of decorations

I want to produce a picture that contains lots of two-part cylinder-kind shapes (maybe about 200) along certain paths. Here is an example of such a shape: \documentclass{standalone} \usepackage[...
4
votes
1answer
176 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 ...
42
votes
1answer
606 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
555 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
443 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 ...
8
votes
2answers
5k 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} \usetikzlibrary{...
8
votes
1answer
1k 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
391 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}% \def\val{\...
10
votes
2answers
278 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
290 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
2k 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
203 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
332 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? EDIT ...
6
votes
2answers
369 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
388 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
38 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 installer....
15
votes
2answers
4k 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
206 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 ...
10
votes
2answers
360 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 {1--,2--,.....
4
votes
1answer
445 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
176 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 \pgfkeys@error{...
3
votes
1answer
407 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: \...
23
votes
1answer
2k 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 solution ...
22
votes
5answers
1k 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 ...
4
votes
1answer
361 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. ...
4
votes
1answer
309 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} { \lstinputlisting[...
10
votes
2answers
2k 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 ...