Questions tagged [bounding-box]

{bounding-box} is for questions about the bounding box of elements in a document, usually {graphics}, {tikz-pgf} or {pstricks} pictures, or glyphs in {fonts}. Use this tag in addition to other tags specifying what bounding-box is the question about.

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

Why do lines drawn in TikZ add space equal to their width into the picture and how can this be prevented?

Related: Horizontal space before TikZ picture Consider the following MWE \documentclass{article} \usepackage{tikz} \usepackage[showframe]{geometry} \begin{document} \noindent \begin{tikzpicture} \...
cfr's user avatar
  • 194k
0 votes
0 answers
13 views

I am getting an Error " cannot determine size of graphic ( no boundingBox) Overleaf [duplicate]

I am getting an Error " cannot determine size of graphic ( no boundingBox) \documentclass{proposalnsf} \usepackage{enumitem} \usepackage{graphicx} %\usepackage[dvipdfmx]{graphicx} %\usepackage[...
soooleh's user avatar
  • 115
4 votes
2 answers
65 views

TikZ grid out of sync with page boundaries

The following code \documentclass{article} \usepackage{tikz} \usepackage[paperheight=297mm,paperwidth=210mm,margin=0mm,showframe]{geometry} \begin{document} \noindent \begin{tikzpicture}[remember ...
Enlico's user avatar
  • 2,562
1 vote
1 answer
85 views

Make TikZ overlay part of a formula bounding box

I have a formula, annotated using a TikZ picture overlay: \documentclass{memoir} \usepackage{calc} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{tikzmark,calc,fit,shapes.geometric} \begin{...
Zoxume's user avatar
  • 1,083
0 votes
1 answer
183 views

How to get bounding boxes for jpg/png in latex

Currently i include png/jpg files with graphicx package compiling with lualatex, no problem, in particular no error message because of bounding box not found. This question is about historic ways to ...
user2609605's user avatar
2 votes
2 answers
98 views

Minimizing Extra Spaces in Exam Headers and possible improvements

I am an educator in mathematics and prefer using LaTeX for typesetting documents. However, the dean of our faculty provided us with a Word version for creating exam headers. I tried to convert it to ...
Student's user avatar
  • 1,154
0 votes
1 answer
108 views

TikZ standalone fails to generate PDF with tight layout when using loops

Something quite strange happens when I try to add loops in my code (they are actually not really loops, but edges from one node to itself, controlled by in and out arguments. The following is the code ...
maurizio's user avatar
  • 281
1 vote
1 answer
32 views

Compatibility of custom definition with decorations and removing control points space from bounding box

I'm merging solutions from two different questions, and encountering issues with their compatibility: The first is from Tikz: Arrowheads in the center, allowing decorations on arrows to have an ...
George's user avatar
  • 125
1 vote
3 answers
88 views

How to insert two syntax trees with brackets in a line with tikz-qtree?

I have been reading Heim & Kratzer 1998, and I find that the pattern of compositional analysis interesting. The tree drawing is difficult, for it need to insert two trees in a line and each tree ...
Shear1902's user avatar
4 votes
1 answer
191 views

Why are math italic 𝑊 and 𝑌 so much to the right in TeX Gyre Termes Math?

Continuing http://tex.stackexchange.com/a/662018, feeding \documentclass{article} \pagestyle{empty} \usepackage{unicode-math} \setmathfont{texgyretermes-math.otf} \begin{document} \[ \begin{array}{|@...
user avatar
0 votes
0 answers
51 views

Misalignment of bounding boxes with `psfrag`

My problem The left side of the replacement text written by psfrag is horizontally shifted with respect to that of the tag I inserted in my PostScript file, although I use "l" (left) for ...
Michel Fioc's user avatar
  • 1,257
2 votes
2 answers
61 views

Place node under bounding box of subfigures

I want to draw a figure that consists of two subfigures. How can I place the labels (e.g. (a) and (b)) using bounding boxes? Here is my code so far, but I am not getting anywhere. \documentclass[tikz]{...
MarLau's user avatar
  • 138
0 votes
2 answers
102 views

Is there a way to prevent \mathchoice from resetting the bounds of its contents (with respect to superscript/subscript placement)?

I have a series of norm macros that I want to expand to \left\| ...\right\| in display math but remain as \| ... \| in inline math. Each norm has a subscript unique to the macro: \newcommand {\...
COTO's user avatar
  • 361
28 votes
3 answers
2k views

Why is the 7 (Computer Modern italic) jumping out of the baseline in this code?

I have an issue I cannot explain to myself. Here is the code: \documentclass{scrartcl} \usepackage{tikz} \begin{document} \newcommand{\tikzmark}[4][]{\begin{tikzpicture}\node[inner sep=1pt,outer sep=...
TobiBS's user avatar
  • 5,170
1 vote
1 answer
273 views

Node anchor too far away from node text

I'm using a loop to write several labels for line intersections, but perhaps for reasons of scale or something the labels are a bit too far away from the intersections. I can't fix each manually since ...
thosphor's user avatar
  • 1,183
1 vote
0 answers
96 views

Approximate bounding box for chemfig figure

If I wanted LaTeX to automatically make an approximate bounding box for, say, the following figure, could I use some built-in feature of the chemfig package? Or would I need to code this up in plain ...
Harry's user avatar
  • 149
1 vote
2 answers
236 views

Clipped scope's bounding box

In the following example, I \clip out a 3x3 rectangle of an image. I'd expect the resulting scope to have a bounding box of 3x3, so the two text nodes should line up with the extent of the clipped ...
Cactus's user avatar
  • 1,087
1 vote
0 answers
976 views

Overleaf No Bounding Box Error

I am using Overleaf V2 and just received the following error message: This topic has been dealt with here: No BoundingBox error message But I am new to this and don't understand how to check the eps ...
Daniel W's user avatar
0 votes
1 answer
137 views

'Dimension too large' when `useasboundingbox` with `fill between`

\documentclass[tikz]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \pgfplotsset{compat=newest} \begin{filecontents*}{data.txt} X Y CI95 1 1.50 0.39 2 1....
Hugh Perkins's user avatar
1 vote
1 answer
264 views

How do bounding boxes work?

I want to include a histogram into the first and second node with a bounding box and only text for the rest node. Here's my work: \documentclass{article} \usepackage[dvipsnames]{xcolor} \usepackage{...
Linear Algebra fans's user avatar
1 vote
0 answers
88 views

How to measure the width of a character including overshoot

I'm trying to measure the width of arbitrary letters. For example, I'm using this to get the width of a letter A: \settowidth{\letterwidth}{A} This seems to work fine for all my letters, except for ...
Alec's user avatar
  • 367
4 votes
1 answer
192 views

Bounding a picture inside a shape on a node

I have a tikzpicture tiled inside of a tikzpicture with the shape of a starburst as a central, repeating node. I want to fill the starburst with a picture. Normally, for a question here, I'd take ...
David Collins's user avatar
1 vote
1 answer
223 views

Using chronosys package in standalone class

I want to include a timeline in a beamer presentation. To that end I wrote this code: \documentclass{article} \usepackage{chronosys} \usepackage{xcolor} \definecolor{first-period}{HTML}{b3e2cd} \...
Tonechas's user avatar
  • 974
3 votes
1 answer
104 views

Can I change the bounding box of the digit 1?

This is a follow-up to Is this horizontal alignment correct?. In short, I would to print the text 100 µm visually centered on a scale bar. The problem with this is the digit 1 has the same wide ...
bers's user avatar
  • 5,384
4 votes
2 answers
627 views

How can I get the bounding box of a specific group of objects in TikZ?

Considering TikZ code: \begin{tikzpicture} \draw <a square>; \draw <an elephant>; \draw <a toaster>; \end{tikzpicture} I'd like to access the ...
COTO's user avatar
  • 361
3 votes
1 answer
333 views

Moving tikz node scales coordinates in scope

I was looking for a way to overlay an image with an grid. I found this answer, which allows me to get an evenly sized grid over an arbitrary sized image (see first figure attached). Very nice! However,...
rikisa's user avatar
  • 163
1 vote
1 answer
1k views

How do I put a rectangular box around a figure?

i need to put a bounding box around a cropped image of which I don't know the dimension in cm how can I do it ? This is the code I'm using and the image. \documentclass{article} \usepackage{tikz} \...
Andrea 's user avatar
5 votes
2 answers
345 views

How to position legend at corner of tikxpicture bounding box?

I've created a block diagram and want to add a legend to it which should be positioned in the very top left corner. I've setup a custom environment for the legend according to the answer to this ...
Dominic's user avatar
  • 170
2 votes
2 answers
1k views

Tikz cuts off top of text in tikzpicture

I am drawing an arrow with text above it \documentclass[tikz]{standalone} \usetikzlibrary{decorations.text} \begin{document} \begin{tikzpicture} \draw[<-, thick, postaction={decorate, decoration={...
usernumber's user avatar
0 votes
1 answer
101 views

Make box in alignment mode

I have written this equation in alignment mode. But now I want to box this whole expression. What command should I use? Any Idea? \begin{align*} I=&\frac{1}{|\mathrm{det \, \textbf{A}}|} \sum_{m_{...
Epsilon's user avatar
  • 516
4 votes
4 answers
303 views

How do I use two colours in a bounding box?

I had what I thought was a simple task, which is to create two different coloured background rectangles. The purpose is to distinguish one set of concepts from another. I haven't found an answer that ...
Michelle's user avatar
  • 517
5 votes
1 answer
2k views

tikzpicture padding

I don't get where the mysterious white space around this mwe-tikzpicture comes from: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{arrows.meta} ...
JoN's user avatar
  • 314
0 votes
0 answers
199 views

Inserting figures into Anki (LaTeX cards) causes no BoundingBox error

I'm using latex to format my Anki cards and ran into an error: "! LaTeX Error: Cannot determine size of graphic in" \begin{center} \includegraphics{supplementary.PNG}\\\relax {{c1::Supplementary ...
Vocaloidas's user avatar
3 votes
1 answer
162 views

Why is the bounding box not updated when using arrows.meta arrowheads in inline tikz?

I am using inline tikz calls to create annotations in my documents. I am using the (below defined) \Curve macro to annotate graph plots (e.g. created with pgfplots) and \Curvee macro for more ...
BambOo's user avatar
  • 8,761
0 votes
1 answer
330 views

Make bounding box of 3D figure tighter

I am trying to plot 3 figures using pgfplots next to one-another. To do so, I have created 3 minipages with a with of 0.3\textwidth, so that there is a bit of room between them. In each minipage I ...
Nicky Mattsson's user avatar
1 vote
1 answer
125 views

How to properly use savebox with tikz externalize?

I am unable to properly capture dimensions with savebox while tikzexternalize is on. Here is the MWE: \documentclass {article} \RequirePackage {tikz} \RequirePackage {expl3} \usetikzlibrary {...
Iskustvo's user avatar
  • 289
1 vote
1 answer
471 views

TikZ: Create bounding box in tikz picture of control system diagram

I have completed writing a control system in TikZ. I now want to create two coloured "boxes" with dashed lines which should entail my controller and plant components of the entire control loop. Please ...
elprofessor's user avatar
0 votes
3 answers
431 views

Irregular bounding box for text in LaTeX

Bounding box example Can you tell me the package to use to make the irregular shape for bounding the text, as in the example just above ?
Idefix's user avatar
  • 147
3 votes
1 answer
571 views

How do I find the bounding box that surrounds various Tex elements

Given a tex file like this : \documentclass{article} \usepackage{lipsum} \begin{document} \lipsum[1] \end{document} I'm unable to figure out a way to log the bounding box co-ordinates (x, y, width,...
crazydiamond's user avatar
2 votes
3 answers
1k views

How to position `local bounding box` (scope containing a series of paths) below a node's `south` anchor?

It's easy to position a node below a local bounding box (behavior is standard) but not the other way. I assume it's because the scope doesn't "know" about nodes outside of it. I tried to use ...
bp2017's user avatar
  • 3,726
5 votes
3 answers
1k views

How can I draw a rectangle around venn Diagrams?

I have tried some of the solutions to similar questions, but none of them included minipages, which seems to be the problem (I`m fairly new to LaTeX) So, here's the coding: % Definition of circles \...
Matheus Chebli's user avatar
2 votes
1 answer
157 views

Pgfplots Interrupt Bounding Box by applying a style to a node

I would like to be able to use \addplot ... node {<node text>}; and have the node not affect the bounding box. That is, the bounding box should be what it would be with just: \addplot ... ; ...
Peter Grill's user avatar
12 votes
1 answer
561 views

Change bounding box of math glyphs in LuaTeX

I'm trying to use the Garamond-Math font in LuaTeX (despite the documentation saying I should use it with XeTeX only :-). It's working more or less OK with LuaTeX, except for some unfortunate glyph ...
Phelype Oleinik's user avatar
0 votes
0 answers
218 views

Force includegraphics to obey bounding box of eps

I have an test.eps that consists of %%BoundingBox: 0 0 343 491 %%EOF and a tex document \documentclass{minimal} \usepackage{graphicx} \newbox\figbox \begin{document} \setbox\figbox\hbox{\...
Lupino's user avatar
  • 2,650
1 vote
1 answer
859 views

Creating a Tikz-Picture with respect to paper width

Till now I just create a desired picture for example with QTikz or Tikz-EDT and pass the code afterwards to my document. To fit the picture to the width of the paper I use \resizebox. However, if the ...
SRel's user avatar
  • 1,273
4 votes
2 answers
463 views

Tikz Figure with Adjusted Bounding Box Does Not have Correct Spacing

The \DrawBoundingBox macro draws bounding box around a figure with a 1pt border. In the first figure, produced with \MyNode\MyNode, no tweaks are done to tikz's bounding box. Due to the control points ...
Peter Grill's user avatar
2 votes
1 answer
320 views

Bounding boxes for each column of a 2-column algorithm & align them flush with page margins

I have two sub-algorithms for side-by-side placement using the algpseudocode layout from the algorithmicx package. Since each sub-algorithm needs to be individually referred in text, I chose the ...
Dr Krishnakumar Gopalakrishnan's user avatar
34 votes
2 answers
2k views

Why does rotating a circle alter its bounding box?

Why does rotating a tikzpicture with a circle alter the height and width of the bounding box, and is there a way to not have this effect? The MWE below yields: Code: \documentclass{article} \...
Peter Grill's user avatar
3 votes
1 answer
333 views

mdframed with raised extra content runs into the header of an scrbook document

I'm using a variant of Example 5 – complex example with TikZ from the mdframed manual in a scrbook document. The goal is to include easily distinguishable boxes that contain exercises, definitions, ...
Felix Emanuel's user avatar
6 votes
1 answer
992 views

Align tikzpictures at internal bounding box with text below it

I want to align the bottom of the red bounding boxes, but can't seem to find the right combination of baseline and anchor options to get this to work. The failing test case of the MWE below is the ...
Peter Grill's user avatar