{tikz-styles} are predefined sets of options that organizes how graphics elements are drawn. It is thus possible to program specific styles and reuse the styles on different objects. The {tikz-styles} tag can be used in parallel with {tikz-pgf}.
42
votes
2answers
4k views
Should \tikzset or \tikzstyle be used to define TikZ styles?
The PGF/TikZ manual states in section 12.4 Using Graphic Options, page 120 (v2.10), that TikZ styles can be set using:
\tikzset{my style/.style={<tikz options>},...}
However, in several ...
7
votes
1answer
341 views
Is there something like \providetikzstyle similar to \providecommand?
I have standalone figures that I include in my document. These figures use statements like \providecommand{\HypotenuseLabel}{$h$} which allows the figure to have a default label, and which can be over ...
12
votes
2answers
902 views
How to decrease the size of single node in mindmap?
In tikz's mindmap, I want to change the concept size for individual parents or children (not the entire system). It is simply possible to increase the size of a child node, by introducing minimum size ...
4
votes
1answer
1k views
Overlay LaTeX/TeX coding easily on PDF with 300 pages
I've been looking for a way to overlay TeX/LaTeX i.e maths language etc (everything LaTeX is designed for) onto a background document containing 310 pages combined together in a PDF file.
So far I ...
9
votes
2answers
1k views
Inserting text inside an arrow in Tikz
I want to draw an arrow between two nodes (a) and (b), and write text inside the arrow. How can I modify this command to control the size of the arrow head and insert the text?
\draw[->, ...
9
votes
3answers
429 views
Choosing styles conditionally in TikZ
I want to create a series of images that visualise a recursion tree as walked on by an algorithm. That means that different styles are applied to nodes depending on the step the algorithm is in, such ...
8
votes
1answer
541 views
How to create a ball shading and to customize 3D lighting manually?
TikZ shading=ball will create a perfect 3D ball perspective, but it has no option to change the lighting angle, the contract, radius of light, etc (or I am not aware of). I tried to create a 3D ball ...
6
votes
3answers
152 views
Page numbering in the middle of a line
How can I set up a document to write the page numbering in the middle of a line?
Through fancy pagestyle I've got a situation like the following one:
--------------------- % this is a line after the ...
7
votes
1answer
494 views
How to shade mindmap concepts?
I tried to add a shade on my mindmap's concepts with
\begin{tikzpicture}[mindmap, text=white,
every concept/.append style={circle,shading=ball, ball color=black!20!white!20}]
but the problem is ...
15
votes
1answer
480 views
TikZ picture shapes
I am very new to the TikZ package, and I need to draw some flow chars by using the following shapes.
However I couldn't figure out how to draw the 4th and and 6th ones below. It would be very nice ...
9
votes
1answer
649 views
tikzpicture in node of another tikzpicture: how to screen of from inheriting style?
I wish to create tikzpicture environments inside a node of another tikzpicture.
The problem I encouter is that styles are inherited by the inner tikzpicture.
How can I screen of the inner tikzpicture ...
10
votes
3answers
266 views
How to draw multiple lines inside the circle
I wish to draw the picture like below, however, I don't know how to add multiple lines in side the circle.
This is my code:
\documentclass[tikz]{standalone}
\usetikzlibrary{
shapes.geometric,
...
12
votes
3answers
727 views
DIN conform arrowheads and hatching in TikZ?
I'm curious how the following simple figure can be recreated with all its characteristics, i.e the DIN correct arrow tips and the hatched areas. I'm very aware of various packages for tikz, where you ...
6
votes
1answer
228 views
How to draw the structure with rectangles inside
I wish to draw the flow like in the picture using the code below, however, I found it is very hard to locate the rectangles by using Coordinate. Is there any better way to do this?
Here is the code ...
12
votes
1answer
364 views
Nested node class with pictogram decoration
I'm wondering how can I define custom TikZ node class mynode thats allows my to use following syntax:
\node [mynode,fill=yellow!40] {component}
\child{
\node [mynode,fill=yellow!40] ...
12
votes
2answers
350 views
Triple lines in TikZ
I need to be able to draw tripled paths in TikZ. I guess this could be done by some clever style which draws a big doubled path to get the outer curves correct, then uses some clever post-action ...
10
votes
2answers
141 views
How to detect if option provided via \tikzset
I would like to be able to detect if a particular option has been provided via a \tikzset and issue a message based on that.
The MWE yields:
But once the conditional works (just a comment for ...
6
votes
2answers
319 views
TikZ: Defining and reusing complex objects?
(How) Is it possible to save some complex TikZ objects for reusing them (in the same and in different pictures)?
I know it's possible to define own styles, but I'm not sure if it's the right thing ...
6
votes
1answer
345 views
What is the correct way to pass array elements to TikZ styles?
I'm trying to use styles to generate TikZ figures that have repeated, regularly spaced elements by looping through an array, but am perplexed by the results I'm getting.
For example, if I define the ...
4
votes
1answer
127 views
How to make a full equation with tikz?
I am using this solution here to make long dashes within a matrix, and it is working well. The code is:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
% possible to customize here ...
4
votes
1answer
629 views
Extract x, y coordinate of an arbitrary point on curve in TikZ
We have very nice
Extract x, y coordinate of an arbitrary point in TikZ
\documentclass{article}
%\url{http://tex.stackexchange.com/q/33703/86}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
...
10
votes
2answers
431 views
Change style of labels of Tikz nodes of a given style
How can all labels of a given type of node be restyled in Tikz?
Imagine that there are nodes of different styles, and that only the nodes of style X should have red labels. Is this possible without ...
8
votes
2answers
216 views
Tikz style conflicting with clip command
Below is my example. I'd like to use a global style for all my tikz pictures to set up the line width. It is working well until I use a clip. I guess that it is not possible to pass some style option ...
6
votes
1answer
491 views
How do I make a path with a custom head in tikz?
I want to make a half circle border, as an arrow head in a tikz diagram.
Does anyone have an idea how to make this style?
5
votes
1answer
743 views
How to globally tikzset styles
I would like to set a tikzstyle from within a tabular environment, and use it after the table. Adding the usual \global seems to have no effect. The MWE below produces:
but I want the last line ...
5
votes
3answers
489 views
Creating stacked shapes for tikzstyle with
I'm working on a diagram, and I'm exploring TikZ for doing it.
I searched, and looks like there is no easy way of doing diagrams, like pgfplots for plotting.
So, I need to create some special node ...
3
votes
1answer
244 views
Using counter values as part of style name for plots
I figured I should be able to give a bunch of line styles and access them using counters. Sure enough, this works out fine; this document
\documentclass{article}
\usepackage{tikz,pgfplots}
...
7
votes
1answer
783 views
Tikz: question about arrow tips color and width of paths
Why 4-6, 4-7, 7-5 get these colorings? More precisely, what is the difference between [draw=green, fill=green] to [color=green]?
Why the 4-5 arc has a slightly bigger width that 7-6? You can see a ...
3
votes
1answer
216 views
How to modify just some nodes' styles in chemfig
In the following molecular drawing, I want to only circle the rightmost OH of the first molecule and the leftmost H of the second, to show that they are the ones that are involved in the formation of ...
2
votes
1answer
377 views
Arrow scaling problem. How can I zoom properly a very tiny part of a drawing?
Thanks to this solution, I can draw tangent line to a path. I'd like to zoom a very little part of my drawing.
Here it is the code:
\documentclass{standalone}
\usepackage{tikz}
...

