Skip to main content

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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
91 views

set transparent color for a pgfpicture

I have a simple document which inputs picture.tex file that includs data of a pgfpicture: \documentclass{article} \usepackage{pgfplots} \usepackage{xcolor} \pagecolor{black} % set the page colour to ...
hasanghaforian's user avatar
1 vote
1 answer
176 views

bar chart fails to add first and last x-axis labels

For some reason the first and last x-axis labels are not printing on this bar chart. More labels are there (though not all) if less columns exist in the table (e.g. 3). Any thoughts on how I can get ...
me_online's user avatar
  • 125
2 votes
2 answers
183 views

Coordinate and Canvas Transformations by given angle of rotation and shifting

I'm new to TikZ so I was reading the TikZ documentation. On page 1155 (chaper 108) I found information about transformations. The CTM (coordinate transformation matrix) consist on the four numbers a, ...
user277909's user avatar
0 votes
0 answers
29 views

Error in pgfcorearrows.code.tex file [duplicate]

Forgive me if the title that I've given to this post isn't appropriate. I am just an average latex user who knows how to write few basic latex codes, and don't know much about the technicalities. ...
Usual_Learner's user avatar
4 votes
1 answer
621 views

Random seed each compilation in XeLaTeX

I've found two answers for ``How to get a new PGF seed each compilation?'' 1 2, and they work wonderfully on PdfLaTeX. However, neither of the methods work on XeLaTeX. I get the error ! Undefined ...
Imp54's user avatar
  • 83
3 votes
1 answer
50 views

\usepgfplotslibrary{external} breaks \@-spacing

The following code should produce a blank after the period, but it doesn't. I get the expected behaviour when I remove the 3d line. Is this a bug or is something wrong with my setup? Can you reproduce ...
Steven's user avatar
  • 31
0 votes
1 answer
783 views

Same font in figures 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 ...
Benno P.'s user avatar
2 votes
2 answers
167 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 ...
Socob's user avatar
  • 1,703
10 votes
2 answers
427 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,...
Ariz Mohammad's user avatar
4 votes
1 answer
249 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 ...
Carl Sorensen's user avatar
3 votes
1 answer
509 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 ...
Magnus Lie Hetland's user avatar
1 vote
2 answers
277 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 ...
Jason S's user avatar
  • 2,880
2 votes
0 answers
779 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 ...
Simon's user avatar
  • 121
3 votes
3 answers
360 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 ...
Jonathan Komar's user avatar
2 votes
0 answers
233 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'...
wchargin's user avatar
  • 3,149
2 votes
1 answer
164 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 ...
Gus's user avatar
  • 133
7 votes
1 answer
722 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 (...
Axel's user avatar
  • 791
4 votes
1 answer
274 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{...
Philipp's user avatar
  • 3,815
3 votes
1 answer
644 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 ...
DaveBall aka user750378's user avatar
3 votes
0 answers
180 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 ...
XZS's user avatar
  • 2,983
0 votes
0 answers
72 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] ...
XZS's user avatar
  • 2,983
75 votes
1 answer
57k 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 ...
Olivier Bégassat's user avatar
4 votes
1 answer
645 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 ...
Jason's user avatar
  • 53
7 votes
1 answer
953 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 ...
qweruiop's user avatar
  • 485
15 votes
4 answers
7k 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 ...
Romildo's user avatar
  • 4,093
7 votes
1 answer
692 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'...
Pythonist's user avatar
  • 229
2 votes
1 answer
209 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 ...
Bertfried Fauser's user avatar
2 votes
1 answer
800 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 ...
Mike's user avatar
  • 33
4 votes
1 answer
749 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,...
Laurent's user avatar
  • 211
7 votes
1 answer
455 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[...
Philipp's user avatar
  • 3,815
5 votes
1 answer
216 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 ...
Xoff's user avatar
  • 1,691
42 votes
1 answer
632 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 ...
Bruno Le Floch's user avatar
6 votes
2 answers
736 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 ...
ThomasH's user avatar
  • 942
5 votes
2 answers
573 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 ...
ThomasH's user avatar
  • 942
8 votes
2 answers
6k 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{...
Charles Staats's user avatar
9 votes
1 answer
2k 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 ...
T. Verron's user avatar
  • 13.6k
2 votes
1 answer
443 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{\...
Raphael's user avatar
  • 6,023
10 votes
2 answers
380 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. ...
devendra's user avatar
  • 2,828
6 votes
1 answer
440 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} \...
Spike's user avatar
  • 6,769
5 votes
2 answers
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) ...
Troels's user avatar
  • 103
7 votes
1 answer
227 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 ...
mhelvens's user avatar
  • 6,126
6 votes
2 answers
430 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 ...
Ahmed Musa's user avatar
  • 11.8k
6 votes
2 answers
469 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 ...
Spike's user avatar
  • 6,769
1 vote
1 answer
531 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 ...
AbstractDissonance's user avatar
0 votes
0 answers
44 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....
Alex Becker's user avatar
18 votes
2 answers
5k 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" ...
Spike's user avatar
  • 6,769
3 votes
1 answer
304 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 ...
Xoff's user avatar
  • 1,691
10 votes
2 answers
457 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--,.....
Ahmed Musa's user avatar
  • 11.8k
4 votes
1 answer
564 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 ...
Raphael's user avatar
  • 6,023
2 votes
2 answers
198 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{...
Ahmed Musa's user avatar
  • 11.8k