Skip to main content

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
1 vote
0 answers
129 views

TikZ, standalone and bounding box

I'm aware of tikz' externalize feature, which I don't like because its following 'feature': if I have a picture in the middle of the document, then to externalize it, the inner latex call will process ...
Bubaya's user avatar
  • 2,549
1 vote
1 answer
149 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
  • 207k
0 votes
0 answers
15 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
  • 125
4 votes
2 answers
71 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,612
1 vote
1 answer
99 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,093
0 votes
1 answer
475 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
110 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,124
0 votes
1 answer
163 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
42 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
  • 215
1 vote
3 answers
132 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
201 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
58 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
72 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
122 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
  • 371
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,270
1 vote
1 answer
354 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,203
1 vote
0 answers
115 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
335 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,117
1 vote
0 answers
1k 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
160 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
306 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
112 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
248 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
240 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
  • 976
3 votes
1 answer
118 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,464
5 votes
2 answers
875 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
  • 371
3 votes
1 answer
399 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
418 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
114 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
335 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
  • 551
6 votes
1 answer
3k 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
  • 334
0 votes
0 answers
205 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
176 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,841
0 votes
1 answer
383 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
129 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
532 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 ...
silenstseeker's user avatar
0 votes
3 answers
446 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
616 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,796
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
208 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
638 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
251 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,762
1 vote
1 answer
965 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,343
4 votes
2 answers
480 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
364 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
341 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