Questions tagged [pgf-decorations]

{pgf-decorations} concerns the capability to decorate (sub)paths in the TikZ-pgf package

2
votes
1answer
24 views

Dimension too large in pgfplots when using decoration

I have a set of points that are not evenly distributed. I found this post that's supposed to do exactly what I want, but when I try to use it for my problem I get a Dimension too large error and I don'...
5
votes
1answer
112 views

Tikz: ugly decorations on closed objects at merge point

When I use a decoration on objects that are closed, the merge point is usually ugly. The same problems also appears with arrows, even with the pre option: sometimes the zigzag stops "close" to the ...
3
votes
1answer
79 views

tikz-decoration: How do I use “is input segment is closepath=< options>”?

In the answer to this question TikZ decorations: How to draw a closed path little by little? @marmot uses this option of the decoration automaton in a way that I don't understand very well but that ...
8
votes
2answers
229 views

Shortening and decorating a path

Placing an arrow as decoration on a path which has been shortened leads to a misplacement of the arrow. This is potentially emphasized if the looseness key has been used. In this other question (and ...
3
votes
2answers
112 views

How do I make a separation mark in Turkish proofreading?

I am making a proofreading mark. MWE \documentclass[12pt]{article} \usepackage{amssymb,mathtools} \begin{document} Electricheater % to be separately written Electri$\underline{c}$/$\overline{h}$...
4
votes
0answers
45 views

No decoration is dropped when the total length of the decoration list exceeds the length of the input path (a possible bug)

Just want to run this by the good people of tex.stackexchange before I submit this as a bug. Consider the following LaTeX manuscript featuring a pgf picture of a 2cm long horizontal line that is ...
1
vote
1answer
80 views

What is an 'input segment' in the context of PGF decorations?

Regarding PGF decorations, consider the two dimensions with the catchy names (p. 1001 of the TikZ & PGF manual for version 3.0.1a) \pgfdecoratedinputsegmentremainingdistance ... The remaining ...
13
votes
3answers
558 views

Making custom Koch decoration with angle parameter in Tikz

So I'm trying to draw a fractal similar to the Koch Snowflake, so I want to define my own decoration that does the same thing but lets you specify the angle. For example in this picture the angle is ...
1
vote
1answer
78 views

Disappearing lines and misplaced rotated arrowheads

The issue is illustrated in the below MWE (and the full preamble we have used is in the comment at the end). When the curly brace decorations have been added, the original lines disappeared and their ...
4
votes
0answers
350 views

balance pre-length and post-length

In Can TikZ dashed lines emulate PSTricks dashed lines?, @Dominic asked if one can balance the dash pattern so that an ant living on the curve cannot distinguish the two ends. Same problem arise ...
2
votes
1answer
451 views

PGFplot: Adding a single marker to a graph (while keeping the marker symbol in the legend)

What I want: I want a single marker per graph. EDIT: .. and I want it in the legend, too, of course. I've got my plots, however, for the plots that include several graphs (that are colour-coded at ...
4
votes
2answers
376 views

Decoration of (relative) segments of Bézier curves

I would like to modify a bezier curve in tikz, e.g. \draw (0,0) .. controls +(87:2.3) and +(50:-0.7) .. (1,1); in such a way, that a part in the middle is draw with dots (instead of a full solid ...
6
votes
1answer
140 views

Why does the pic option get passed through to the entire object?

Description This question follows from the question Why is the decoration marker off center? where we found what was causing the problem, but not why it was being caused in the first place. It seems ...
7
votes
1answer
120 views

Why is the decoration marker off center?

Description I am making a graph and am using a decoration marker to make square nodes between the circular ones. That had been working fine until I wanted to add a decoration between T_t and I_t (...
7
votes
2answers
444 views

TikZ/PGF decoration that adds noise only to y coordinate

I'm trying to come up with a PGF decoration that adds pseudo-random noise to the y coordinates of a path, while leaving x coordinates the same. The idea is that if I'm drawing a function y=f(x), this ...
6
votes
1answer
754 views

Drawing abstract region with partitions using tikz

I want to draw an abstract region with five partitions, where each partition is shaded and labeled differently. An example region (without the shading) would be as follows:
5
votes
2answers
138 views

How can I access the value of `\pgfdecoratedpathlength` for use later in the document?

Is there anyway that during the decoration process I can save the value of \pgfdecoratedpathlength to some macro (via xdef or some other mechanism)?
3
votes
1answer
182 views

Additional parallel paths and “shorten”

A while ago, I have stumbled upon a very nice solution for parallel paths drawn with TikZ, which can be found here: Draw additional parallel paths in TikZ. However, when trying to use this for my ...
6
votes
1answer
466 views

Putting repeated symbols along a path with decorations?

I have a drawing of a curved-plate capacitor: \documentclass[]{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture}[ ...
5
votes
1answer
122 views

Ignoring rotation in pgf decorations

Edit: I am interested in how this problem could or could not be solved using pgf decorations, not in how to draw this specific shape. I am trying to use pgf line decorations to draw dotted lines, ...
6
votes
4answers
1k views

Horizontal brace above another brace + node in TikZ

In the following MWE, I've put a brace over the subordinate clause that he knows with a node Subordinate clause above the brace. Now I want to put a brace over the full sentence (the main clause) with ...
2
votes
1answer
550 views

A random, smooth ellipse in TikZ

I've tried to do a random, smooth ellipse in TikZ with decorations and I came up with something similar like this, but the endpoints don't match: \documentclass{article} \usepackage{tikz} \...
11
votes
4answers
2k views

Position arrow decoration by center, not by tip

I have lots of curves, each of which I would like to decorate with an arrow precisely at the centre. Here is a simple attempt to do this with TikZ: \documentclass{article} \usepackage{tikz} \...
2
votes
1answer
275 views

How to improve a path with tikz decorations?

I am a beginner in LaTeX, trying to draw a series of sketches, close to engineering drawings, in order to illustrate the equations governing the constriction resistance of two pieces of metal pushed ...
5
votes
1answer
172 views

pgf path decoration with corners awareness

I try to create pgf decoration that will be able to tell in each segment whether the its start is a sharp corner on the input path, but I can't figure how to do this. Take for example the following ...
4
votes
1answer
1k views

TikZ crosses-decoration does not work

When trying to compile the examples from the manual like \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \begin{document} \tikz \fill [decorate,decoration={crosses}...
5
votes
1answer
302 views

How do I use the `every character` key in tikz decorations?

Assuming I have the following MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.text} \begin{document} \begin{tikzpicture}[node distance=5cm] \node[draw, rectangle] (a) ...
7
votes
1answer
2k views

Tikz path with changing color and arrow decorations

How does one draw a path that is changing color as a function of the path length and is decorated with arrows at the same time? Basically, I want to combine these to figure into one: The code for the ...
3
votes
2answers
253 views

\texttt in decoration causes LaTeX to hang

I have the following code: \documentclass{standalone} \usepackage{tikz} \begin{document} \usetikzlibrary{decorations.text} \begin{tikzpicture} \path [->,decorate,decoration={raise=-5pt, text ...
3
votes
1answer
631 views

TikZ : let … Could not parse this coordinate?

I don't understand why ? \documentclass[tikz,margin=3pt]{standalone} \usetikzlibrary{decorations.pathreplacing,calc} \usepackage{pgf} \tikzset{% alamain/.style={% decoration={show path ...
4
votes
1answer
295 views

How to append style with decorations.pathreplacing?

\documentclass[tikz,margin=3pt]{standalone} \usetikzlibrary{decorations.pathreplacing,calc} \usepackage{pgf} \tikzset{alamain/.style={% decoration={show path construction,% lineto code={ ...
3
votes
1answer
590 views

TikZ decorations.pathreplacing and lineto curve ignored

Why the decoration option is ignored ? \documentclass[tikz,margin=3pt]{standalone} \usetikzlibrary{decorations.pathreplacing} \tikzset{alamain/.style={% decoration={% lineto code={ \...
1
vote
1answer
159 views

Rounded corners don't work properly in custom decoration

I want to create some chemical Lewis structures with TikZ - I can't use chemfig for this since I need to draw the atoms according to their coordinates - and need to define some custom bond types, for ...
3
votes
2answers
436 views

TikZ decorated paths and fixedpointarithmetic library

Background: I am trying to apply multiple decorations to a path in a TikZ picture. In this particular case, my attempts fail as the maximum dimension PGF can calculate with is exceeded. This is not ...
7
votes
1answer
1k views

Arrow from brace to node

I would like to draw an arrow from the tip of a curly bracket to a node, but if I do the following, an extra arrow point is drawn just above the tip of the brace. \documentclass{article} \usepackage{...
12
votes
3answers
438 views

How to improve on this “twolines” decoration?

I'm typesetting an article on graphical calculus in tensor categories in TikZ and I wanted to define a decoration that draws two parallel lines at the same time. Here is my first try: \documentclass{...
14
votes
2answers
1k views

Decorating a path's edge with a hatch pattern in TikZ

Problem I would like to indicate an infeasible region in one of my pgfplots by manually drawing a path in the canvas. This should be a hatched pattern that is decorated on the path, something like ...
3
votes
1answer
704 views

Workaround for “dimension too large” for short, custom decorated, arcs?

I have already seen Avoiding `Dimension too large' and `ill-formatted floating point' errors in tikz, and probably there is no answer, but let's see... I have this MWE, with a custom ...
2
votes
0answers
905 views

Special decoration for TikZ pin feature

I try to achieve the curvy pin style I sketched below. It would help to distinguish pin lines from grid and other lines in the diagram. How can I realize a decoration that automatically draws such a ...
2
votes
1answer
1k views

Piecewise styling and decoration of a tikz path?

I have this path, which I would like to style "piecewise" from a single specification, shown on the image below: As the image says, I'd like to decorate segments 2-3 and 5-6, and colorize only 3-4. I'...
9
votes
1answer
513 views

How to get a tangent coordinate system for the decoration of a path?

I want to draw some lines in a tangent coordinate system of the decoration of a path. Especially I want to draw a tangent segment at the end of the decoration with full controll, i.e. with having the ...
3
votes
1answer
452 views

TikZ - pgfdeclaredecoration vs. curved path

I want to use a complex decoration, and then apply it to a curved path. It seems as if TikZ does not bend single segments though. Do you have any idea how I could get the desired behavior? Is there ...
4
votes
1answer
407 views

“Text along path” decorations take absurdly long to be compiled for non-default font sizes

I'm trying to use a text along path decoration in tikz-pgf which causes absurd loading times, sometimes far longer than an hour if I want to print a whopping two (!!) words in for example \large font ...
9
votes
1answer
812 views

How to correctly decorate an ellipse with random steps

To create something that looks like the shape of a lake, the following code transforms the border of a blue ellipse with smooth random steps. The idea is taken from another answer. \documentclass[...
3
votes
1answer
382 views

Directed polyline with circles at vertices

This is a follow up question of two other questions. The first is Node at every vertex and the second one is this. My goal is to combine the two. In particular, I want to write something like \draw[...
3
votes
1answer
450 views

TikZ table with floating labels + time discontinuity

I'm trying to create a TikZ version of this table, made in LibreOffice Draw. I'm quite new to TikZ, and don't really know what I'm doing, but have followed an example here and have built this table: ...
7
votes
1answer
341 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[...
7
votes
1answer
941 views

Small text near arrow tips

How can I add some tiny text near arrow tips? Details I have an automaton like Now I want each edge to have the usual arrow tip, and close to the tip additionally a tiny text $\tau$. How can I ...
5
votes
1answer
765 views

tikz extending spring with constant number of segments

Is there as simple way to create a pdf animation with tikz of an oscillating mass attached to a spring which extends and compresses as the mass oscillates. The number of "spring elements" should be ...
11
votes
2answers
2k views

Crossing paths in TikZ without intersection

Once again, I'm preparing a new logic puzzle; Resuko to be precise. For the race track, I would like to have a symbolized bridge/underbridge -|-. I searched this site, but only found this question: ...