Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
3answers
33 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 ...
4
votes
3answers
97 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 \...
2
votes
1answer
31 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 ... ; ...
9
votes
1answer
128 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 ...
0
votes
0answers
47 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{\...
1
vote
1answer
133 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 ...
4
votes
2answers
84 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 ...
2
votes
1answer
53 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 ...
33
votes
2answers
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} \...
2
votes
1answer
92 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, ...
6
votes
1answer
221 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 ...
3
votes
3answers
78 views

How to avoid or compensate horizontal and vertical shifts in a tikz' struck out node?

The following MCE below points out that, for a tikz' struck out node, the line width causes both horizontal and vertical shifts. Is it possible to avoid them? Or, at least, to know exactly the ...
2
votes
1answer
45 views

Proof tree as argument to function, with tight-fitting box

I would like to define a function over proof trees, using mathpartir to layout the proofs. For example: However, I would like the function parentheses to fit snugly around the inference rule. I'm ...
1
vote
2answers
213 views

\includegraphics pagebox without clipping

I have some PDF icons with a TrimBox different from the MediaBox. For example: Page size: 23.2441 x 20.6929 pts (rotated 0 degrees) MediaBox: 0.00 0.00 23.24 20.69 CropBox: ...
5
votes
2answers
190 views

Tikz “overlay” option does not draw nodes referencing local bounding box

I'm wanting to populate the cover page of my package with a border of examples of my package command's outputs, which are drawn in TikZ. To this end I'm using a tikzpicture environment with the ...
16
votes
2answers
484 views

How to have a background which exactly fits the text height/depth?

I tried with a background starting from text anchor or from base anchor, and with a colorbox without sep, but the top of the "S" and the bottom of the "p" are a little bit above of the background ...
2
votes
1answer
147 views

Boxed text, multiline

How can I something like this (an \fbox that can span multiple lines): |--------------------------------------------- The quick brown fox |jumps over the| lazy dog. The quick ...
1
vote
1answer
181 views

Adjust overpic size to accommodate annotations

How to make a bounding box around overpic that includes the added contents (such as \put, etc.)? For instance below \fbox does not take into account the \put commands nor the grid labels. \...
1
vote
0answers
117 views

tikz bounding box of a cubic Bézier curve [duplicate]

This document \documentclass[DIV=16]{scrartcl} \usepackage{tikz} \pagestyle{empty} \begin{document} \hrule \begin{center} \begin{tikzpicture}[scale=.3] \draw[domain=-1:5] plot (\x,{0.5*\x*\x*(\x-...
4
votes
2answers
201 views

Overfull box on table that don't exceed textwidth

I have the following code. As you can see, in the column definition I have put @{} as suggested here \documentclass[draft]{scrbook} \usepackage{dcolumn,booktabs} \begin{document} \newcolumntype{P}[...
5
votes
3answers
3k views

Includegraphics doesnt show graphic if using bounding box

as the title says... I dont really know what's the problem, tried with different formats of figures (eps, pdf, jpg) \documentclass{article} \usepackage{graphicx} \usepackage{float} \begin{document} ...
2
votes
1answer
164 views

How to calculate and use the bounding box of a figure/tikzpicture/table/array

I am writing some text where I usually have some text and then some figure/tikz picture/table (with tabular or array environment) side by side, in this orden. The command that I use is \newcommand{\...
2
votes
1answer
275 views

Bounding box and umlaut issue in text decoration

In the above TikZ picture, how can I extend the bounding box to include the text decoration without manual tinkering (the only solution I was able to find is fiddle with the border or margin class ...
4
votes
2answers
237 views

Decoration markings don't extend bounding box

How come decoration markings don't extend a TikZ picture's bounding box and how can I change this? Consider this example where the arrow markings are partially cropped. \documentclass[tikz]{...
3
votes
1answer
564 views

Edges of tikz picture cut off when using shifted scope

I'm drawing a standalone tikz picture and when I compile it one of the edges is cut off. I think it's because I'm using a shifted scope within the picture. (Edit, it may be due to the [x=2cm,y=2cm] ...
3
votes
2answers
156 views

TikZ image with overlaid pins

In the below TikZ image I'd like the two pins to not extend the bounding box but still be displayed in their entirety (even if parts of them fall outside the bounding box). Using the overlay option ...
1
vote
0answers
121 views

Add rectangle color box inside align and explain using an arrow [duplicate]

Hi i'm creating a beamer presentation and trying to make my equation beautiful. Is it possible to make color rectangle or circle in align and then write something about that part of the equation. \...
2
votes
3answers
118 views

Add a pin not counted in bounding box

I would like to use Tikz to annotate some terms in equations. I have attempted the following \documentclass{article} \usepackage{tikz} \pagestyle{empty} \begin{document} \newcommand{\tikzbox}[2]{\...
3
votes
3answers
399 views

Pass frame option to \includegraphics by default?

I'm a professional typesetter and in my job I format papers for scientific journals. One of my task is (in some cases) to crop images to remove extra space between the images and the bounding box. ...
2
votes
0answers
164 views

How to find out if a PDF file has data not visible within the bounding box? [closed]

I am embedding a small area of a large webpage into a document compiled with pdflatex (using \includegraphics). A raster image / screenshot produces artifacts when zooming in, so instead I am saving ...
3
votes
1answer
19k views

Cannot determine the size of the image [duplicate]

I have this code in LaTeX, I compile with "latex+dvips+ps2pdf+See PDF" \documentclass[a4paper,12pt]{article} \usepackage[spanish]{babel} \usepackage[utf8]{inputenc} \usepackage{graphicx} \begin{...
3
votes
1answer
379 views

Removing whitespace on the left side of a tikzpicture to align it

There's a lot of whitespace on the left of the figure drawn by the following code: \documentclass{article} \usepackage{pgfplots,pgfplotstable} \pgfplotsset{% xbar% ,/tikz/font=\footnotesize\...
3
votes
1answer
186 views

Why does standalone truncate my tikzpicture?

While I was testing an answer of mine, I realized I had to set the standalone border option to border={2mm 2mm 14mm 2mm} because simply with border=2mm the image was truncated. Why? \documentclass[...
2
votes
1answer
342 views

remove clipped image sections from included PDF

The graphicx package provides some very useful options for its all-powerful \includegraphics command, namely the trim and clip options. With these, it's easily possible to trim and clip an included ...
1
vote
0answers
126 views

Image not shown when bounding box is used [closed]

I have a DIMENSION TOO LARGE error when I don't put bounding box syntax (bb=200 570 350 699). but when I include bb=200 570 350 699, pdf is generated but there is no image. Below is my code. Please ...
2
votes
1answer
687 views

How to draw arbitrary bounding box for a flowchart using tikz

My flowchart is as in: I need to draw a bounding box enclosing JT, VB, L and PM. Minimum Working example for my flowchart: \documentclass[10pt,twocolumn,letterpaper]{article} \usepackage{times} \...
0
votes
1answer
693 views

Standalone and PGFplot cropping

As asked here I set up a template for plots that can be used with standalone and included into the main document. 1 remaining problems is that the cropping does not crop enough of the whitespace ...
5
votes
1answer
157 views

pinlabel doesn't work after upgrade to luatex 0.95

I use extensively pinlabel package in my project, which I compile with LuaLaTeX. After recent MiKTeX 2.9 upgrade, I cannot compile the project any more, getting numerous errors like ! Undefined ...
1
vote
1answer
338 views

How can I adjust the bounding box of a (complicated) tikz-cd diagram?

This question is related to my previous post (the MWE can be reused from there), and the links provided there. I'm trying to draw a (complicated) diagram using tikz-cd, including big, curved arrows, ...
1
vote
1answer
240 views

boundary for x axis for plot in tikz

I have a problem with my plot, I want to have a boundary at x=4000 and don't know how to do. My current plot is the one below and here is the code that I have now \makeatletter \newcommand{\...
2
votes
0answers
73 views

Have tikz bezier control points defined off of page [duplicate]

I have taken it on myself to reproduce some of my university's PPT templates (not that I necessarily love the design, but I have some good reasons for undertaking this venture) using Beamer. I have ...
1
vote
0answers
98 views

Highlight or find locations of bounding boxes

I want to produce documents where every paragraph, equation, and other visually distinct part of the document is highlighted with its own background color (e.g. equations are highlighted in blue, ...
2
votes
1answer
198 views

Tight box around siunitx degree

I want the box around the degree symbol to be like the one around the exponent on the x. I thought \mbox{} would do it, but it does not seem to in this case. Code: \documentclass{article} \...
2
votes
1answer
312 views

I put \pgfresetboundingbox after \clip, what should the bounding box be?

Short question After a \clip and a \pgfresetboundingbox, the bounding box is permanently (0,0)rectangle(0,0). How can I turn on the bounding-box calculation and obtain a fairly small bounding box? ...
7
votes
3answers
625 views

tikz bounding box / cropping: too much space for curves

I have a problem with TikZ's auto-cropping/auto-calculating the bounding box for a tikzpicture. Look at the following example: \documentclass{article} \usepackage{tikz} \begin{document} Lorem ipsum ...
4
votes
2answers
1k views

How to create a bounding box the size of the page?

I was attempting to create a bounding box across an entire page (as I've seen here in beamerinnerthemetexsx.sty). However, the box will not flush with the left margin. As can be seen in this example, ...
2
votes
4answers
834 views

Add frame and logo on all pages

I am not able to do both these commands at the same time. The both work separatly. I would also like to put page numbering at the bottom right of all pages. Any suggestions? \documentclass{article} \...
3
votes
1answer
744 views

Fix bounding box in pgfplots

I want to do the following: Do some draw or plot commands in pgfplots and then fix the bounding box. I.e. all plots which come afterwards shouldn't influence the bounding box. How can I do this? I ...
1
vote
1answer
69 views

Can a command typeset its argument without letting latex take it into account for bounding box?

Quite often, especially when preparing slides, vertical space is precious. However, there is no automatic equivalent of "vertical kerning of lines", by which you would reduce or even have a negative ...
3
votes
1answer
406 views

How to make a line style for drawing the ground line?

I'd like to draw a piece of "ground line" (picture below), but I don't know, how to make a line style and how to ensure proper localizations of the picture boundary. The solution of achieving an ...