Questions tagged [tikz-pic]

A “pic” is a “short picture” that can be inserted anywhere in TikZ picture where you could also insert a node.

Filter by
Sorted by
Tagged with
0 votes
1 answer
19 views

adding node to tikz figure

I want to add text where I put the dots, for example w_1, w_2, ... w_n. This is the code: \documentclass[tikz,border=3.14mm]{standalone} \usetikzlibrary{positioning} \begin{document} \tikzset{% ...
0 votes
1 answer
20 views

How to place a tikz node at a lower level

Using the solution provided by @Zarko at Markov Chain Arrows and Labels stacked together, I want to know a way insert a node that is on a lower level than the others as shown in the picture below: I ...
  • 492
0 votes
1 answer
39 views

Tikz Code No Longer Running

This question follows from Markov Chain Arrows and Labels stacked together where I got 2 different solutions to my problem, the one provided by @Zarko which I accepted as my answer and also the one ...
  • 492
2 votes
1 answer
50 views

How to Produce a Bclogo Similar to a Given Tikzpicture and Then Align It Directly Above

Consider the code: \documentclass{book} \hoffset 10pt \voffset -55pt \oddsidemargin 17pt \evensidemargin 18pt \topmargin 35pt \headheight 25pt \textheight 8.25in \textwidth 5.75in \headsep 40pt \...
  • 5,625
0 votes
2 answers
83 views

Markov Chain Arrows and Labels stacked together

I am having challenges with the following: My bottom chain arrows and labels (1-\theta) are stacked together/overlapping which is something I dont like, and I want to add an extra broken line that ...
  • 492
0 votes
1 answer
51 views

How to have alternate coloring of histogram bars

I am kindly requesting for assistance on how to have the color of my histogram bars alternate between blue and orange. Currently the bars all have the same color which is something I do not like. ...
  • 492
1 vote
1 answer
40 views

Logarithmic plot using tikz ung pgfplots

I want to draw a logarithmic plot of wavelength and frequency. The x and y axes show an exponential plot. I want the representation to be a simple number. How do I change the labels on the axes? Since ...
  • 141
2 votes
1 answer
53 views

Drawing Capital Market Line and Efficient Frontier

I am struggling to produce the diagram shown in the picture below: How do I reproduce it? So far my trial yielded an awful result. Below is my MWE: \documentclass[12pt,a4paper]{book} \usepackage{...
  • 492
0 votes
0 answers
36 views

TikZ get value of passed option/key inside pic

Is it possible to access the options that are passed to a pic inside the definition of a pic? And if yes, how? I know I can do this with self-defined custom keys. But is it possible to also get the ...
1 vote
1 answer
74 views

Producing a Glowing Star with the Transparent Package and Pdflatex

Consider the code: \documentclass{book} \textheight 8.5in \textwidth 5.75in \usepackage{xcolor} %\usepackage{transparent} \definecolor{darkpurple}{RGB}{48, 25, 52} \usepackage{tikz} \usetikzlibrary{...
  • 5,625
0 votes
1 answer
53 views

Background Setup for My Title Page

I am having trouble setting up the background for my title page using tikz. I adopted this background style from Benmiloud Mohammed at https://latexdraw.com/. I also adopted the contents of the title ...
  • 492
4 votes
1 answer
56 views

How to use xcolor color names in tikzpicture style?

I want to use color names like MidnightBlue in a style for a tikzpicture to e.g. fill it with a specific color, is this possible? Or am I limited to the other style (red!30 etc.)? This MWE fails with ...
  • 372
1 vote
0 answers
53 views

Extending a John Kormylo Answer for Color Shading a Portion of a Paragraph to Produce Bold Text as Well

This post is an extension of the question posed in How to Contiguously Shade a Portion of a Paragraph with Color Consider the code \documentclass{book} \usepackage{xcolor} \colorlet{soulred}{red!25} \...
  • 5,625
0 votes
1 answer
51 views

Define a pic and use it as node

My purpose is draw an horizontal cylinder. I defined the left and the right base with /.pic . Now I would link these bases with \draw, using the bases anchor point .north and .south. Something goes ...
0 votes
1 answer
62 views

tabularray how to wrap column content inside commands

Tabularray: I want to create a column that prepends and appends some code to save space and avoid repetition, but I don't achieve that behavior. At first, I tried (and failed) to create a new column ...
1 vote
3 answers
60 views

Centre TikZ figure vertically (\vspace*{fill} does not work)

I want to print a lined page with a gap in the middle that should be in the centre of the page vertically. This is my code: \documentclass[landscape]{article} \usepackage[paperheight=320mm, paperwidth=...
2 votes
0 answers
57 views

How to Produce a Rectangular Radial Glow

Consider the code \documentclass[a5paper,12pt,onecolumn,openany,final]{book} \usepackage[hmargin=0.7in,vmargin=0.75in]{geometry} \usepackage{tikz} \usepackage{calc} \usetikzlibrary{fadings} \...
  • 5,625
0 votes
1 answer
29 views

Cheat sheet using mini pages and tikzpicture does not overflow properly

This is a Cheat Sheet template from Overleaf’s templates. The problem: Box 3 does not overflow properly (it should be entirely placed in column 2), and its contents continue to print towards the ...
  • 57
1 vote
1 answer
55 views

Transfiguring an Image with Multiple Tikz Shading Angles

Consider the code \documentclass{book} \textheight=10in \usepackage{tikz,graphicx} \begin{document} \thispagestyle{empty} \begin{tikzpicture} \node[opacity=0.5, inner sep=0pt](A) at (0, 0) {\...
  • 5,625
1 vote
1 answer
32 views

Embedding a Pspicture within a Radial Fading Tikzpicture

The following MWE is taking some code from How to Produce a Colorized Aura About an Image and Which Resembles That Image which produces a "radiant" Norman Window. Consider, \documentclass[...
  • 5,625
1 vote
3 answers
51 views

Adjusting tikzpicture baseline to be flush

I have two minipages one which encloses a tikz picture. I'd like these to have the same baseline. i.e. I would like the minipages to be flush at the top. By default this doesn't happen: \...
0 votes
0 answers
49 views

Ways to create/reproduce an basic pattern/image via Latex and tools [duplicate]

what would be the (easiest) way to make such a plot/pattern in latex (lua and or xe - possible) (would be really nice to adjust the number of sticks and the degree of the lines - as parameters ? kind ...
  • 1
0 votes
0 answers
37 views

How to specify relative coordinates in tikzpicture when using \includegraphics?

I am trying to create an animation for rotating a box in tikzpicture to cover a 16:9 screen. I want to align the east face of the box with a picture and rotate them both simultaneously. I have two ...
  • 101
0 votes
1 answer
120 views

Blockchain Network using latex

I know that this is not a specific problem, but I'm looking for a library that has icons that I can directly use to draw how blockchain network works by using Latex. Is there any such library or ...
  • 1,067
0 votes
1 answer
109 views

Extending the Features of the Glowing Star Posted by User Sandy G

This following code extends a bit, an answer posted by the user Sandy G in How to Give Stars a Glow Effect which asked for a way to produce a glowing star with LaTeX. \documentclass{book} \textheight ...
  • 5,625
2 votes
1 answer
72 views

Nonlinear transformation applied on decorations along path with a custom pic

I am having a problem to apply a single nonlinear transformation to a path decorated with custom pics. A minimal example follows: \documentclass[margin=5pt]{standalone} \usepackage{tikz} \...
0 votes
1 answer
70 views

Chemplants doc example failed

I want to use check valve pic as described on chemplants doc at page 54, but I get an error saying it's not defined. I know it could be an error of the package, but I want to be sure and see if it's ...
0 votes
1 answer
52 views

Problem raising a tikz picture in wrapfigure enviroment

I am doing this paper with the tikz picture tools to draw some diagrams and the wrapfigure enviroment to situate them in the text. The problem is that when I run the code, the picture is placed below ...
  • 103
1 vote
1 answer
83 views

Positioning relative to page in XeLaTeX with package background and 'nested' tikzpictures 'dimension too large'

Context For a personal project I would like to have a tikzpicture on every page that borders the text and all that is on there. I started with LuaLaTeX and wanted to add only a few Chinese characters, ...
  • 137
2 votes
3 answers
118 views

Node positions in Tikzpicture for using tikzmark

I wish to create a diagram like this. My attempt is shown below: Output Code \documentclass{article} \usepackage{tikz-cd} \usetikzlibrary{tikzmark,shapes.geometric,shapes.symbols} \tikzset{elnode/....
3 votes
2 answers
126 views

Transform working tikzpicture into \newcommand with arguments

I am trying to transform the solution of THIS question \documentclass{article} \usepackage{tikz} \usetikzlibrary{tikzmark} \usepackage{leadsheets} \setchords{ major-seven = \textsuperscript{$\Delta$}...
  • 185
0 votes
0 answers
47 views

How to Produce a Page Border That Resembles These Little Blue Boxes

I would like to produce a page border that looks something like this: What I have so far is this: \documentclass{book} \usepackage{xcolor} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \...
0 votes
2 answers
104 views

How to Draw Inline Symbol List with Rotation using Tikz?

Let's say I have the following string list of symbol: {a,b,+,9,3}. Is there a way to print each element of this list with the possibility - EDIT 1: to control the space between each symbol and - to ...
1 vote
2 answers
217 views

Plot polynomial function with tikz

I'm trying to plot this function : f(x)=(x^2+3x+9)/(3x). I'm having an error saying that I can't divide 9 by 0, is there any solution please? here is my code : \begin{tikzpicture} \draw[...
  • 83
2 votes
1 answer
57 views

Incorporating Multiple Title Color Shadings into a Document

Consider the following code: \documentclass{book} \usepackage{tikz} \usepackage{xcolor} \usepackage{pgothic} \newcommand\titleshading[3]{ \newcommand\xoffset{0.3} \newcommand\yoffset{-0.25} ...
  • 5,625
2 votes
1 answer
55 views

How to Justify the Text in a Minipage Environment within a Tikzpicture

Consider the following code--- \documentclass{book} \usepackage{tikz} \usepackage{mwe} \begin{document} \thispagestyle{empty} \begin{center} \begin{tikzpicture} \node[preaction={fill=black,opacity=1....
  • 5,625
1 vote
1 answer
54 views

Cartesian coordinates with rectangles on axes and lines bounded elements

I need help in the pictures below. I can not draw the rounded rectangle upon the two axes, the line like U in the pictures on the left, and the line bounded the elements in the picture on the right. ...
  • 173
3 votes
1 answer
44 views

TikZ: tikzset to set a macro and pass forward a key-val

I've made a TikZ pic called gen(erator). I would like to establish a TikZ key that passes rotate=90 to this pic, but also sets a macro called \complabelanchor that changes the anchor, so that if I ...
3 votes
1 answer
165 views

TikZ: position a pic with its inner coordinate

In the MWE below, I made a TikZ pic called bus with one argument. The argument creates nodes within the pic that will be used as connection points to other buses. I would like to align these pics by ...
1 vote
1 answer
72 views

\vspace{0pt} \hspace{0pt} Effects a Shift; Is There a Better Way to Produce This Tikzpicture?

Consider the code \documentclass[12pt]{book} \hoffset 10pt \voffset -45pt \oddsidemargin 12pt \evensidemargin 10pt \topmargin 25pt \headheight 25pt \textheight 8.25in \textwidth 6.15in \headsep 45pt \...
  • 5,625
0 votes
1 answer
45 views

How to do math with coordinate labels in tikz?

I have a set of TikZ pics defined as \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc,positioning} \tikzset{ shape/.pic = { \node [draw] (xx) {}; ...
  • 258
1 vote
1 answer
34 views

Can't use tikz-pic together with tikzscale

I am trying to use a tikz-picture containing pic-templates together with tikzscale, but when including the image via \includegraphics[]{} I get a variety of errors. On the other hand, when including ...
  • 1,691
2 votes
1 answer
55 views

How to draw lines properly between nested nodes using tikzpicture and chessboard

I am trying to create a states tree for demonstrating the N-Queens problem. I've managed to create a tree and display the chessboards in various states however there there is no gap between the nested ...
2 votes
1 answer
88 views

Making an animation of moving dots between sites

How can I make an animation from this picture with dots moving according to the arrows? In the picture, there are two lattices. The lattice on the bottom is the result of the top lattice after moving ...
2 votes
2 answers
385 views

Reduce the size fo a tikz picture

I have a flowchart created using tikz. Example, \documentclass[tikz, margin=3mm]{standalone} \usetikzlibrary{backgrounds, fit, positioning} \begin{document} \...
  • 431
1 vote
1 answer
781 views

Drawing a lattice in latex

Here is the figure I wanna draw: Could anyone show me how to draw this please?
  • 363
1 vote
1 answer
153 views

How to hatch Boxplot in TikZ

Can you please tell me how to add hatching to a Boxplot in TikZ? Thanks in advance. \documentclass{article} \usepackage{amsmath,amssymb,amsfonts} \usepackage{tikz} \usetikzlibrary{patterns} \...
  • 181
4 votes
2 answers
313 views

Automatically shift scope of tikz pic

I'm trying to create pics that behave like nodes. Following the instructions of shifting scopes and naming scopes for pics, I managed to manually create pics and move them to behave like nodes. The ...
  • 10.8k
2 votes
1 answer
72 views

How to Add a Baselineskip at the Beginning of a Paragraph in a Certain Tikzpicture

The question posted here is an extension of the one posed in Looking to Insert a Figure and Wrap It Within a Customized Tikzpicture Consider the following code \documentclass[border=1cm]{book} \...
  • 5,625
1 vote
1 answer
50 views

Fontsize (14) Apparently Not Working in a Tikzpicture

Consider the code \documentclass{book} \usepackage{lipsum} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \definecolor{boysenberry}{rgb}{.529, .196, .376} \begin{document} \thispagestyle{...
  • 5,625

1
2 3 4 5 6