Questions tagged [tikzmark]

A {tikz-pgf} library for remembering positions on a page for later use.

Filter by
Sorted by
Tagged with
2 votes
3 answers
80 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/....
user avatar
0 votes
1 answer
50 views

Error using tikzmark with multiple tikzcd's

I wish to create a figure like the one shown below. I am getting the error above with the following code. Can someone tell me where I may be going wrong? \begin{tikzcd}[arrows={-latex, outer sep=-1....
user avatar
1 vote
0 answers
145 views

An alternative to tcolorbox - how to specify vertical skips?

EDIT This question was edited and made more precise. Background This is a question related to my other one. In a desperate effort made to avoid some of tcolorbox pitfalls described there, I have ...
user avatar
  • 143
3 votes
2 answers
108 views

Color diagonal of a matrix

I would like to color the diagonal and off diagonal elements of a matrix: I have: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amssymb,amsmath,amsthm,enumitem} \usepackage[a4paper, ...
user avatar
  • 39
5 votes
1 answer
99 views

fill and overlay do not work well together

In trying to answer the question in here with tikzmark, it seems that [overlay] and \fill are not good enough to use simultaneously. I have a question - see in the below code. \documentclass{article} ...
user avatar
  • 13.4k
3 votes
1 answer
96 views

How to position a TikZ picture relative to a \tikzmark?

This is a follow-up to this question. I'd like to achieve the same output as described in the question, namely a 1cm wide square that is 1cm below and 1cm to the right of the red dot in the following ...
user avatar
  • 8,684
3 votes
2 answers
86 views

Arrows with tikz between words in beamer

I would like, ideally, to reproduce the following picture. I am using the tikz package at the moment and my code is as follows (all packages and the frame I would like to modify): \documentclass[10pt]...
user avatar
2 votes
1 answer
73 views

Tikzcd: point to specific line using tikzmark

I'd like to add in tikzcd some arrows pointing to a specific line (here the line JKL). However my code always point to the top of the cell (when it's even producing a meaningfull output): I'm not ...
user avatar
  • 5,043
2 votes
1 answer
98 views

Tikz node or TikZmark Node, which fits for the figure?

I want to draw the following picture: But I got stuck where to start? What should I use normal TikZ node (\node) or TikZmark Node (\tikzmarknode)? I am not expert in tikz-pgf package. Your help is ...
user avatar
  • 2,002
0 votes
1 answer
31 views

Checking if tikzmark exists on page inside datatool dtlforeach

I would like to check that a list of nodes loaded in a DTL database exist on the current page, where each node has a tikzmark. Including a \iftikzmarkoncurrentpage inside a \DTLforeach returns a ...
user avatar
  • 3
1 vote
1 answer
49 views

Get position of a tikzmark

In order to solve this question, I'd like to obtain the absolute y position of a tikzmark (actually I want the distance from the border of the text area, but I guess it's not too hard to convert ...
user avatar
  • 5,043
1 vote
2 answers
40 views

Using \tikzmarkin and \tikzmarkend twice in one presentation breaks highlighting in one of the tables

In the code below, highlighting works just fine for the first table if the second is commented out, but breaks when the code for the second table is not commented out. It's always the first table in ...
user avatar
1 vote
1 answer
40 views

\tikzmarkin not highlighting whole row in table (beamer)

For some reason, when I try to highlight table rows using \tikzmarkin, the last character is not included in the highlight. See the example below. \documentclass[notes,11pt, aspectratio=169]{beamer} \...
user avatar
2 votes
1 answer
43 views

Localized TiKZ marks

The following code, adapted from the first answer here , works the way I want. But it is not what I expected. I'm reusing the tikzmark labels a..e, and the \makebrace use after the first placement of ...
user avatar
  • 1,894
1 vote
0 answers
42 views

What could go wrong with putting a tikzmark node around an existing box just before unboxing it?

I've an idle thought on how to use the dastardly tikzmark TikZ library to put nodes around pre-packaged boxes, specifically (but not limited to) the boxes that the awesome AMSMath packages use when ...
user avatar
0 votes
0 answers
38 views

TikZ-Newcommand to improve my toc

About this code: \documentclass{book} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[a4paper,top=3cm,bottom=3cm,left=1.5cm,right=1.5cm]{geometry} \usepackage{xcolor} \usepackage{...
user avatar
  • 793
0 votes
1 answer
51 views

Better vertical spacing between boxes and chapter in tableofcontents

About this code, I'd like to personalize spacing between boxes and chapter in tableofcontents \documentclass{book} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[a4paper,top=3cm,...
user avatar
  • 793
0 votes
1 answer
53 views

Multiple Pointing arrows in a slide unable to find the location

I am new to tikz just able to draw some arrows but going to complex part unable to find the location and technique to do so. \documentclass[xcolor=dvipsnames, aspectratio=169, 11pt]{beamer} \...
user avatar
  • 49
3 votes
2 answers
157 views

tikzmark error in itemize

I am trying to create nodes using tikzmark but for some reason it is generating an error, supposedly I am copying from the example of the manual offered by the package. Objective \documentclass[...
user avatar
  • 347
1 vote
1 answer
68 views

Problem with `current axis` node and `externalize` and `tikzmark` packages

Abstract I use current axis for drawing my axes and add labels to them but, if tikzmarks are used on a tikzpicture, current axis doesn't behave well in the next ones. My main goal is to find out why ...
user avatar
  • 462
2 votes
1 answer
94 views

How to include lines in an equation

I am a newbie to latex and I am trying to compile notes. I came across an equation and I am wondering how it was produced. I haven't tried any method as I have no clue. Please help particularly with ...
user avatar
2 votes
1 answer
89 views

Tikzmark at beginning and end of environment

TL;DR: how can I place a tikzmark at the actual beginning or end of a piece of text, ignoring spurious newlines added by other environments (see the pictures below)? For the sake of simplicity, ...
user avatar
  • 123
3 votes
1 answer
75 views

Vertical spacing in diagram

Consider the following MWE: \documentclass[letterpaper]{article} \usepackage[dvipsnames]{xcolor} \usepackage{tikz} \usepackage{lipsum} \usetikzlibrary{tikzmark,calc} \usepackage{amsmath} \begin{...
user avatar
  • 27.6k
2 votes
1 answer
76 views

Drawing an arrow from a cell in a table contained in a node to an anchor of another node in a tikz picture

I have a tikz picture where I would like draw an arrow from a cell in a table contained in a node to an anchor of another node: (the arrow is added using Microsoft Paint) I attempted to draw the ...
user avatar
  • 726
1 vote
1 answer
62 views

How can I make a `tikzmark` inside an environment work over a pagebreak?

This is an extension of my previous question How can I highlight part of an equation with TikZ but without extra space around the highlighted part?. The new question is, how do I make the hilite ...
user avatar
2 votes
2 answers
147 views

Tikz: Is it possible to align any two nodes by aligning their subnodes?

My question is: Is it possible to align any two nodes by aligning their subnodes? For TikZ nodes, is it possible to add a new anchor to an existed nodes? (for example: add node-b.north as an new ...
user avatar
4 votes
1 answer
124 views

Why does [rounded rectangle] cause random "divide by zero" PGF Math Error?

I was using tikzmark to insert tikz drawings inside an equation when I encountered a weird bug, which I reduced to the following minimal (non-)working example: The following file bug.tex, \...
user avatar
1 vote
2 answers
210 views

Pointing an arrow to an entry in a table (beamer)

I am trying to annotate a single entry in a table on a slide. My problem is that the word "tag" appears at a correct y location, but its x location is dead center of the slide. I tried xshift = ??? ...
user avatar
  • 531
2 votes
1 answer
108 views

remember picture not working with forest and tikzmark's subnode

According to the tikzmark documentation, when using \subnode, it should be possible to use ordinary node syntax (within a tikzpicture) to access this information. Thus after \node {a \subnode{a}{...
user avatar
2 votes
1 answer
279 views

Returning TikZ arrow across multiple pages

I want to have arrows between my marginnotes and I achieved this with \tikzmarknode. I've also fixed the issue with multiple pages (see this question). However, when I put in a returning arrow, to ...
user avatar
  • 508
1 vote
1 answer
326 views

Draw TikZ arrow across multiple pages

I want to have arrows between my marginnotes and I achieved this with \tikzmarknode (figure 1). But it does not work if one mark is on another page (figure 2). What I would like to have is a ...
user avatar
  • 508
2 votes
2 answers
182 views

Tikzmark Annotations Overlapping with Footer

Currently, my tikzmark annotations overlap with my footer defined by the fancyhdr package. Currently I have my equation with the annotation defined like \begin{equation} \tikzmarknode{A}{2} \end{...
user avatar
  • 53
4 votes
1 answer
207 views

How to use tikzmark to label steps in math mode with fractions?

I have an equality between to fractions in math mode and want to be able to show how we got from one to another. I want to use arrows and label them. Ideally, it should look like this: I have the ...
user avatar
  • 157
4 votes
1 answer
551 views

Is it possible to annotate equations (i.e. arrow signs/curly braces) to define each variable?

I have quite a simple question. I was wondering if it was possible to do something like this in LaTeX: But formatted a little more nicely. It doesn't need to be arrows necessarily. Just some form of ...
user avatar
2 votes
1 answer
122 views

tikzmark: How to add a '['-bracket / square brace on content?

€dit - New Text: I have some content (pgfplotstable and some text) and would like to add a square brace on the left side, like this is a "bmatrix". What is the best way to do that? What have I to ...
user avatar
  • 6,217
9 votes
4 answers
358 views

How can I prevent this tikzpicture from running into my text?

I'm using tikzmark to define some arrows to point to variables in an equation. \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{tikz} \usetikzlibrary{tikzmark} \begin{...
user avatar
2 votes
1 answer
197 views

Cross Multiplication

I am trying to achieve something similar to this: My first idea was to use nodes inside tikzpicture, so I came up with this: First Example \documentclass[11pt]{article} \usepackage{tikz} \...
user avatar
  • 23
1 vote
1 answer
95 views

Systeme and Tikzmark

The following program outputs the image below. My question: Can I improve this program to achieve a more precise image? The node were not calculated but were achieved by a trial-and-error. Any idea ...
user avatar
  • 2,431
2 votes
1 answer
249 views

Horizontal space after tikzpicture[overlay, remember picture]

I'm writing a document using a template that is not mine, in which, after an equation, some arrows are added using TikZ, by defining tikzmarks and using the overlay, remember picture options to the ...
user avatar
4 votes
1 answer
110 views

Why xelatex renders arrows in tikz figures differently than lualatex?

My document can be produced with the following code: \documentclass{beamer} % only frames ...
user avatar
  • 611
2 votes
2 answers
776 views

tikzmarknode not working in Overleaf

I have started going through all of the bookmarked answers on StackExchange that I want to use for examples. I have had success with most of the answers being able to compile within Overleaf. However, ...
user avatar
  • 33
1 vote
1 answer
235 views

Anchor alignment in tikzmarknode

The following code results in a strange behavior: \begin{align*} \sum\limits_{i=1}^{3}\sum\limits_{j=1}^{4} a_{ij}&= \tikzmarknode{red1}{\highlight[red!20]{\sum\limits_{j=1}^{3}a_{1j}}} + \...
user avatar
  • 135
3 votes
1 answer
259 views

TikZ in floating algorithm2e

I had a question to strikeout a line in algorithm2e. I got an answer that uses tikz to strikeout the line. This works great. However, if I use a floating algorithm2e (i.e. removing the [H] in \begin{...
user avatar
  • 159
4 votes
1 answer
285 views

"Dimension too large" error with too many tikzmarks

This is a follow up to the discussion here. Andrew provided a patch for the problem that when the page number go too large it created the problem (see his and Ulrike's answers in the linked question)....
user avatar
  • 2,174
4 votes
2 answers
117 views

"Dimension too large" error with tikz graphic using tikzmark when document gets too many pages

I use this code (fixed by marmot :) ...), which worked perfectly until a point where my document got too many pages. At a given point I get a "Dimension too large" error. It uses code that tests if a ...
user avatar
  • 2,174
3 votes
1 answer
107 views

Tikz picture with tikzmark across page boundary won't print if inside environment

Combining this solution to draw braces with tikzmarks, with this to make them go across page boundaries, presents me with an interesting problem: It won't print the vertical part on the first page if ...
user avatar
  • 2,174
4 votes
1 answer
223 views

Test if tikzmark exists on same page

Apologies for flooding the site with tikzmark problems ... :) I know that with \iftikzmark I can test if a given tikzmark exists in general. Is there a way to test if a particular tikzmark exists on ...
user avatar
  • 2,174
8 votes
1 answer
503 views

tikzmarknode and vphantom take up horizontal space

A tikzmarknode combined with a vphantom character takes up horizontal space. Minimal but nonetheless noticeable. \documentclass{article} \usepackage{tikz} \usetikzlibrary{tikzmark} \begin{document}...
user avatar
  • 2,174
2 votes
1 answer
279 views

\tikzmarknode lines with hooks

I'm trying to get a line produced by tikzmarknodes to start and end with little hooks, i.e., horizontal thinner lines protruding from the ends, more or less to resemble a bracket. I couldn't figure ...
user avatar
  • 2,174
10 votes
3 answers
579 views

how one can write a nice vector parser, something that does \pgfvecparse{\A=\B-\C; \D=\E x \F;}

I am often use coordinates of points to draw figure in geometry. I know that, we can add, minus coordinates of points, example \begin{tikzpicture} \tkzDefPoints{0/0/C',3/0/D',1/1/B'} \coordinate (A') ...
user avatar