Questions tagged [tikz-styles]

{tikz-styles} are predefined sets of options that organize 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}.

Filter by
Sorted by
Tagged with
3
votes
1answer
207 views

How to plot cascaded/waterfall barchart using TikZ

I would like to make a plot of this equation P_n = \frac{n^a}{a!}\exp[-n] for different n. How can I use this cascaded style from the TikZ/PGF examples, to plot P_n (y-axis) with a (x-axis), for ...
1
vote
1answer
812 views

Margins around Tikz frame

I'm dealing with the graphic part of a document which I need to fill with text. In particular I need to have a header where to put some general information and the document text simply boxed. ...
0
votes
3answers
201 views

Block Diagram drawing with Tikz - misplaced dot and other

I am trying to generate this table: I have two questions regarding the generation: When I position the dot to try to match up row 3 on the block diagram, I get the dot being offset from the line ...
33
votes
2answers
27k views

Can we define maximum width for a node?

My question is almost opposite to: this question. I have defined a block: \begin{tikzpicture}[node distance = 2cm, auto,->=stealth,point/.style= {circle,fill=red,minimum size=...
26
votes
1answer
6k views

Tikz /.style with two parameters

How do I pass two parameters to a tikz style? I would like to do something like this: \begin{tikzpicture}[ transformer/.style={draw, cylinder, gray!80, rotate=90, minimum height=#1, minimum ...
17
votes
3answers
3k 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 ...
10
votes
2answers
3k views

Counter for tcolorbox

I would like to create a boxes for theorem definition proposition to looks like the following image ( but with counter for each box ) : I tired with tcolorbox Here's my code: %this is created ...
11
votes
2answers
1k views

Hyperlinked nodes in TikZ mindmap

I am trying to make a small mindmap such that some of the child nodes are hyperlinked. I tried to follow the advice given here, about the new node style hyperlink node, but the following MWE compiles ...
10
votes
1answer
1k views

beautiful section styles

I came across to website of IREM which I found beautiful section style in the following file Original file was created with PDFLaTeX. Could someone please create those styles for sections and ...
10
votes
1answer
5k 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 to ...
10
votes
2answers
489 views

Notes on Sentences

I have a sentence like this "पठ् + अ + ति" and I want to add some notes like shown in the attached image. Is there a package for such things or I need to work with Tikz. Any reference material or ...
7
votes
2answers
614 views

A useful illustration for differential geometry

I'm working on creating an illustration that I will need in many, different guises in differential geometry/manifold theory etc. Following on from a previous (answered) question of mine (How can I ...
4
votes
1answer
1k views

How to draw inside a TikZ node using node style with arguments?

The question is an extension to this question, and is also related to this one. I want to draw a Simulink-style sum block which is basically a circle node with a port in each direction (north, west, ...
15
votes
2answers
2k views

TikZ: shade also the border of a node

I would like to shade a node and the border of the node. The following code works but I don't like it very much that I have to draw something after the node on the background layer. I would prefer a ...
12
votes
2answers
931 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 now) ...
12
votes
5answers
286 views

How can I specify a different style for (a difficult to describe concretely) part of a line?

I'm in the following situation: Using TikZ, I have drawn a curve which is fairly simply described: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (1,1.5) .. ...
11
votes
1answer
1k views

How to plot a graph from its adjacency matrix (coordinates manually specified)? [duplicate]

For example, I want to plot a graph whose adjacency matrix is [0,1,0;1,0,1;0,1,0]. I first plot three points labeled by p1,p2,p3, and link the points p1,p2, p2,p3. For a general case, how to link the ...
10
votes
3answers
3k views

TIKZ: only fill 75% of the node-background with color

I want to use some background color on my node, but not for the whole node. Just for 75% of the node. My code is this: \documentclass[tikz,margin=5mm]{standalone} \begin{document} \tikz\node[draw, ...
7
votes
2answers
374 views

Fill area between two parabolas using tikzpicture environment

I was asked to find the integral between x = -4 and x = 4 of the intersection of y_1 = x^2 and y_2 = -x^2. So I recreated it using LaTeX. Please consider the following MWE: \documentclass{article} \...
7
votes
1answer
3k views

Arguments of tikzset inside a beamer document

I am trying to use tikzset with an argument in a beamer document, and I am having an error I do not understand. \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame}{My try} \...
3
votes
3answers
559 views

Tikz: Node instead of newcommand: Making custom nodes

How do I make a special node out of the command \innblock? \documentclass[tikz,border=5]{standalone} \makeatletter \newcommand\getwidthofnode[2]{% \pgfextractx{#1}{\pgfpointanchor{#2}{east}}% ...
3
votes
1answer
1k views

Drawing a closed loop diagram with Tikz with multiple inputs

I am using Tikz for the first time and I am having trouble coming up with a diagram I am required to draw The diagram is this I have found a code and attempted to modify it to make it resemble as ...
1
vote
2answers
724 views

Modify Fancy Chapter Heading to show Chapter Name

In the code given below, I wanted to have the chapter names show up instead of the numbers just for the first two chapters. This code is building from the code found here. I am writing a "Problem" ...
9
votes
2answers
761 views

How to have a specific style for empty cells in a tikz matrix

I have a tikz matrix as the one in the code below which contains some empty cells. (Don't care about issues with column and row separations. I left that out for the sake of simplicity.) \...
8
votes
3answers
311 views

how can I create keys such as “column … to …” for a TikZ matrix

I have a node style I would like to apply to many (but not all) the cells/columns/rows of a matrix of nodes. Currently, for every column or cell that I want the style to apply to, I declare the style ...
7
votes
1answer
1k 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?
7
votes
1answer
12k views

set textcolor in tikzstyle

How can I set text color inside tikzstyle? I tried as shown below, but surely that is not the correct thing. I can do it seperately in each node, as shown here, but I want to declare it globally. \...
6
votes
3answers
1k 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 ...
5
votes
2answers
744 views

Including TikZ file: the key '/tikz/cap' requires a value

I'm trying to include a file with a specific shape (cup) into another TikZ image, in order to use the cup as a "stamp" to draw more complex figure. The file is located in /usr/share/tikzit/shapes/cap....
5
votes
2answers
1k views

Tikz \draw as part of style (Drawing something inside each node of certain type)

I'm currently learning how to use Tikz and was looking into drawing automata (specifically Simulink-like state models). Currently, I'm making a style that should reduce my efforts to a minimum when ...
5
votes
1answer
959 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 ...
5
votes
1answer
121 views

Curved line with varying style

Following this question, I was wondering if it is possible to draw (with a single \draw call) a curved line that is partially of one style then of another etc ... A solution proposed in the linked ...
4
votes
1answer
396 views

Sudoku - Special styles for hints

In the following code, I would like to use one style so as to color background for each hint, and not all the hints, and I would also like to put each single hint in a rounded rectangle. This is to ...
3
votes
1answer
518 views

How can I write the name show in axis of 3D array using TiKz

I am drawing a 3D array like the attached picture, which actually describes a multidimensional array. However, I can not put the name of the axis and take the value from the matrix like the attached ...
3
votes
1answer
1k views

Custom footer using tikz

I am trying to modify the footer of my article document using Tikz but I don't know where to start. My idea is to enclose the page number in a circle and between lines at the footer: -----------------...
2
votes
0answers
105 views

Complicated curves intertwined in the link figures (I): Unsolved Christmas tree decoration [closed]

I am struggled to draw these types of figures: I guessed there is a package called the knot library (just learned this thing exist 2 mins ago): So I am going to try the knot library out. But in case ...
2
votes
1answer
682 views

bend circuit elements in tikz

I am trying to bend circuit elements in bigger circuits for clarity of the values/labels of elements. However, whenever I use bend command, the circuit element is replaced by a line. Any suggestion on ...
2
votes
5answers
869 views

How to make the simple three square box and connect them?

I want to make the three square box and simply connect them.
9
votes
1answer
2k views

pgfplotsset append style is not appended to tikzpicture axis environment

When using every x tick label/.append style={font=\scriptsize} in combination with \pgfplotsset outside the tikzpicture environment, the pgfplotssetcommand from the preamble will be ignored (...
7
votes
1answer
682 views

How to draw connection between cube in tikz?

I am using tikz to draw multiple cubes. I want to achieve my expected result as bellow However, the main difficulty is that locates cube inside and center of the cube and making a connection between ...
6
votes
3answers
449 views

In tikz is there a way to set a node style to center the center of each node within a given scope

In the following MWE, I know that the commented line works. What I want to know is why the every node/.style approach is not working. \documentclass{article} \usepackage{tikz} \begin{document} \...
6
votes
1answer
260 views

Understanding tikz inheritance with the positioning library

I have trouble understanding the tikz inheritance model while using the positioning library. Consider the following example: \documentclass[]{scrbook} \usepackage{tikz} \usetikzlibrary{positioning} \...
5
votes
1answer
3k views

How to split tikz rectangle by half with different colors and text lines

So I have tkiz style: \tikzset{ state/.style={ rectangle, rounded corners, draw=black, very thick, minimum height=2em, inner sep=2pt, text centered, },...
5
votes
1answer
674 views

How to typeset a MinMax algorithm tree?

I want to typeset MinMax decision trees in LaTeX, just like the one in following picture: I have played around a little and achieved part of my goals: \documentclass{article} \usepackage{tikz,tikz-...
4
votes
1answer
2k views

Creating and using styles in pgfplots?

I was wondering if anyone could point me in the direction of some good sources to learn about user-defined styles in pgfplots? I've been through the pgfplots manual but it seems to only touch on this ...
4
votes
2answers
289 views

Improve or simplify this TikZ code for southern hemisphere?

The code below is based upon the answer by @Max to the question Draw lower (southern) hemisphere and great semicircle with "mathematician's" axes orientation. Question 1. Can the code ...
4
votes
1answer
577 views

Commutative diagram using TeX Writer

I bought an ipad app TeX writer and I am wondering if I can draw a commutative diagram. It includes the packages amslatex revtex4-1 IEEEtran babel cyrillic graphicx color xcolr geometry algorithm2e ...
4
votes
5answers
2k views

doubly linked list tikz

I want to draw two doubly linked lists and I know that I can use the tikz package. But I don't know how to. Could anyone show an example code piece for the following doubly linked list? I found some ...
4
votes
2answers
663 views

problems with ellipse TikZ

I'm working on a mac, I use the package TikZ and it works. But I have problems when I want use ellipse or diamond ex : \documentclass{article} \usepackage{graphicx} \usepackage{tikz} \begin{document} ...
3
votes
1answer
85 views

Problem using \pgfmatrixcurrentrow for labels in matrix of nodes style definition

Following code shows four different ways of adding a label with its column and row value for certain nodes in a matrix or matrix of nodes. The problem is that the fourth way (commented in code) doesn'...