Skip to main content

Questions tagged [boxes]

{boxes} are the units used by (La)TeX to construct a page by pasting them together horizontally or vertically. A single character from a font is a box, as are the lines of type and the eventual page.

Filter by
Sorted by
Tagged with
4 votes
3 answers
133 views

Expand \hbox to the width of parent \vbox

I have two \hboxes, one above another, inside \vbox: \documentclass{article} \begin{document} Some\vbox{\hbox{longer text above}\hbox{shorter text}}and some more text. \end{document} Which ...
Filip Ž's user avatar
0 votes
0 answers
18 views

LyX hyperref boxes wrong placement

I started using LyX a while ago and soon I got this strange problem. The hyperref boxes doesn't cover the actual title in the table of contents. I only used LyX's PDF properties -> Use hyperref ...
Patrik Gubó's user avatar
2 votes
1 answer
57 views

How to group elements in order to use them like one character

I want to create commands that will show some data and will be used as a single character in different places (paragraphs, tables etc.). Here is an example of how it should be looking: I achieved it ...
Taras's user avatar
  • 123
1 vote
1 answer
29 views

Marginnote and vertical alignment of boxes

After solving the problem I had with the vertical alignment of the margin notes (https://tex.stackexchange.com/a/721419/13180), I am facing a similar problem. I can't control the vertical position of ...
carlosv's user avatar
  • 337
5 votes
2 answers
152 views

Box taking exactly N \baselineskip

I'm trying to define a memoir's \fancybreak taking a vertical space of, say, 2\baselineskip (or any other exact amount of \baselineskip). But I have a problem with the height: if I do \documentclass[...
Iacobus1983's user avatar
-1 votes
2 answers
80 views

How to add colors in boxes and arrows?

My code is complete, I just want the image to be more pretty by adding colors in boxes and arrows. here's the code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes....
Maryam's user avatar
  • 53
1 vote
1 answer
62 views

How to put a text inside a box within a boxed environment?

I have the following LaTeX code, which makes use of a boxed environment. I want to put some of the text within a dashed and normal box, but it throws an error. Any ideas how to achieve this? \...
pixel's user avatar
  • 1,370
0 votes
1 answer
18 views

Aligning a page reference to the bottom of a centered table

I have a page reference to a source text that I'd like to align to the bottom of a centered table. Here is an illustration what I currently have: Note that the page reference ("[p. 74]") ...
Derek's user avatar
  • 1,748
0 votes
0 answers
59 views

Delimit beginning/end of a text section (not being in a box) using visual objects, glued to text at page break

Context I'm creating a LaTeX class for popular mathematic articles in which images play a central role. As a result, the following requirements have been set for: the online versions of articles (...
Denis Bitouzé's user avatar
1 vote
1 answer
70 views

colorbox: how to fill only the inner area of a rectangle (square) with rounded corners

If I have a letter of type "(vertical) rectangle with rounded corners" and put it in a \colorbox{<fillcolor>}{text}, is there a way to set the colorbox-parameters so that exactly the ...
cis's user avatar
  • 8,912
1 vote
0 answers
46 views

Box or rule with rigid sidewalls, not overlap protruding character [closed]

The \mbox and \rule macros have porous sidewalls. That is, if the preceding or following character has negative side bearings, the excess will penetrate into the box. In almost all cases, this is ...
user avatar
1 vote
2 answers
34 views

Problem when using cases environment in pgfplots legend

I noticed that if I use cases from package amsmath in a pgfplots legend, the legend box does not contain the whole text. See the MWE. \documentclass{standalone} \usepackage{amsmath} \usepackage{...
Manuel Du 's user avatar
6 votes
2 answers
166 views

Unable to use dvisvgm when l3draw drawing contains scoped box

I found a strange issue when experimenting with dvisvgm trying to create SVG files from DVI files. I found that if I append a box (or a coffin) to a drawing created with the l3draw package and this ...
Jasper Habicht's user avatar
0 votes
0 answers
31 views

Getting "`refsection:1' multiply defined" - which didn't use to happen

Consider the following document: \documentclass{minimal} \usepackage{biblatex} \newsavebox{\foobox} \newcommand{\doofoo}[1]{ \ifdefined\donewithfoo \else \begin{lrbox}{\foobox} \begin{...
einpoklum's user avatar
  • 12.4k
2 votes
0 answers
60 views

How can we ensure that the spacing before or after a \vbox is correct when using \addvspace?

How can we ensure that the spacing before or after a \vbox is correct when using \addvspace? In the following MWE, the two \addvspace{10pt} which follow each other behave like two \vspace{10pt}. The ...
B Legrand's user avatar
  • 433
0 votes
1 answer
31 views

uncover box within an equation in beamer

I have the equation $X+Y=Z$ in one of myslide, and I want a box to appear around $X+Y$ on a mouse click. I know I can use $\boxed{X+Y}=Z$, but then I can separate the box appearance from the $X+Y$ ...
user3350919's user avatar
0 votes
1 answer
74 views

page with 15 text box

I don't know if this is correct: I need a page (vertical A3) that contain 5 vertical rule each line is composed by 3 column. I need to insert text on this box. How can I obtain that? Thank you Renato ...
RenatoP's user avatar
  • 851
3 votes
3 answers
362 views

Replace each letter of a given word with blank boxes

I would like a command that takes a word and replaces each letter with a box. For example, the output of The mystery word is \mycommand{hello}. should be The mystery word is □□□□□.
Garf's user avatar
  • 510
5 votes
2 answers
242 views

Set Boxes in a table

I have a tabular and I want to group certain elements. All in all it shall look like this (just with straight lines :D) How can I achieve that? Here is my MWE: \documentclass[11pt]{article} \...
Lereu's user avatar
  • 471
-1 votes
2 answers
85 views

How do you get a black-colored border around a bounding box? [closed]

Below, we see an example of the \bbox command. $$ \bbox[5px,border:2px solid red] { e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n \qquad (2) } $$ Note that the color for the borders of the ...
IdleCustard's user avatar
  • 1,250
1 vote
0 answers
51 views

Is there a way of delaying setting the textcolor and the background color of the content of a box until that box is used or shipped out?

Is there a way of delaying setting the textcolor and the background color of the content of a box until that box is used? Is there a way of delaying setting the textcolor and the background color of ...
user avatar
0 votes
2 answers
137 views

Shadowbox set background color

I am trying to set a background color for a shadowbox, as shown in this example, but have not managed to do so. Preferably I'd like to use this yellow color. Maybe someone can help me. Thanks
Aleksandar Urošević's user avatar
0 votes
1 answer
70 views

Adding top inserts in LaTeX

I would like to add top insertions in a LaTeX document, compiled with pdflatex. Although I can add insertions at the bottom of the page, it seems like I can't do the same with top insertions. \insert\...
HomoVafer's user avatar
  • 294
1 vote
2 answers
80 views

Creating custom boxed footnotes (with symbolic / numeric marks)

I'm trying to create custom footnotes for a project, where we need to have the options of using a symbolic footnote, and using a numeric footnote where the text appears inside a box. Using the bigfoot ...
Konstantinos Topaloglou's user avatar
5 votes
1 answer
107 views

Font encoding affects \box_wd:N calculation

I have written a simple function to calculate the width of a line of text and display it using tikz: \documentclass{article} %\usepackage{mathpazo} \usepackage{domitian} \usepackage[T1]{fontenc} %\let\...
Ted Black's user avatar
  • 495
2 votes
2 answers
200 views

disjunction-elimination subproof boxes LaTeX

How can I write subproofs side-by-side inside a logicproof environment in LaTeX like the one provided in the picture? This type of proof is used when using disjunction-elimination laws in ...
Mahdi Soleimani's user avatar
0 votes
1 answer
81 views

Box that doesn't affect the vertical spacing of the main document

Consider the following example: \documentclass{article} \begin{document} Text A. \vspace*{5cm} Text B \end{document} Now I want to change this to \documentclass{article} \usepackage{environ} \...
Julia's user avatar
  • 1,658
3 votes
3 answers
132 views

\vbox of the fixed height with leaders is not filled whole

I am trying some samples. They make a frame around the text. I know there are already realized commands for it but I want to practice leaders, rules and boxes in LaTeX. So the examples below are kind ...
Vladimir's user avatar
  • 589
0 votes
2 answers
63 views

How does TeX fills a broken line

I am studying boxes and glue in LaTeX and I try such a sample: \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \begin{document} Algebra began with\\ computations similar to those of ...
Vladimir's user avatar
  • 589
1 vote
0 answers
48 views

New environment as a single box [closed]

I am making my new environment for headings. It is as follows: \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \begin{document} \newlength{\headspace} \setlength{\headspace}{3mm ...
Vladimir's user avatar
  • 589
3 votes
2 answers
442 views

How to scale \includegraphics to exact width and height?

I have an image foo.jpg. I would like to scale it into a box of an exact size, say 100pt wide by 200pt high. I may want to scale the axes independently, or I may want to preserve the aspect ratio and ...
Taylor R Campbell's user avatar
2 votes
3 answers
264 views

How to set the exact width and height of tikzpicture with pgfplots?

The pgfplots axis environment has options width and height to specify the approximate width and height of the picture drawn, but the resulting box is not exactly as wide or high as specified—it may be ...
Taylor R Campbell's user avatar
1 vote
0 answers
55 views

Missing Item number in enumerate while checking for empty text

This is a follow-up to Missing Item number in enumerate. Similar issue is reported, but only under very specific circumstances. In the prior question, the macro DoIfNonEmptyText is defined which ...
Peter Grill's user avatar
0 votes
0 answers
53 views

Changing from mdframed package to tcolorbox for framed theorems

I have been using the mdframed package for framed theorems in my notes. But there are a lot of problems related to spacing (e.g. bad spacing behaviour of frame right after section title) and page ...
Skadiologist's user avatar
0 votes
3 answers
76 views

How can I remove the extra vertical space above and below this matrix?

I have written the following code: \documentclass[a4paper,twoside,12pt]{article} \usepackage[margin=1cm]{geometry} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage{sansmathfonts} \...
Federico's user avatar
  • 113
0 votes
1 answer
71 views

Reduce size of integral box

I am trying to write an integral over quite a few factors. Everything put together will easily exceed one line, maybe even two. If I try to align everything with some align environment (be it align, ...
Sellerie's user avatar
  • 133
0 votes
0 answers
66 views

Why does a `tcolorbox` code listing box using `listing above text` not keep the output with the code?

I'm trying to use a tcolorbox to list code above output in a document with 2 geometries. My attempt is failing utterly and I can't figure out why. Here's the problem: The box is being split into two, ...
cfr's user avatar
  • 207k
2 votes
1 answer
65 views

How to center text-boxes and draw a rule from each box

I know my headline sounds highly confusing so let me provide you my MWE \documentclass{article} \usepackage{tikz} \usepackage[most]{tcolorbox} \newtcolorbox{frameGray}{enhanced, colframe=black,...
Leon's user avatar
  • 547
3 votes
2 answers
268 views

Remove horizontal spacing between \makebox and \dotfill

I want to present some information in a format which has a scenario described then dotfill to a right aligned result. If the scenario+result would fill the line, I want it to break to the next line ...
jw5801's user avatar
  • 157
10 votes
1 answer
485 views

Understanding boxes at the primitive level

I'm learning plain TeX as a nerdy hobby. My current project involves trying to divide the page into unequal columns. I only want to use boxes and glue, with no external dependencies, e.g. eplain. ...
Jordan Dennis's user avatar
0 votes
1 answer
147 views

How can I create a box for a combine of a figure and a table?

How can I create a box for a combine of a figure and a table? \documentclass[paper=b5]{scrartcl} \usepackage{tabularray} \usepackage{graphicx} \newsavebox\SomeNumbers \sbox\SomeNumbers{\begin{tblr}{...
hana's user avatar
  • 769
0 votes
0 answers
57 views

Overfull \hbox problem in Algorithm caption of ACM template

I faced a problem that my overleaf report that 'Overfull \hbox (8.5pt too wide) in paragraph at lines 92--92' I used 'algorithm2e' package for ACM template. Here is the test demo I used: \...
yuyang sun's user avatar
0 votes
0 answers
35 views

Vertically align parbox text with tabular text

I have a table made with tabular that's 3 lines and a parbox that's 1 line. I want the text in the parbox to line up with the first line of the table, but I can't seem to make that happen. I would ...
joshisanonymous's user avatar
3 votes
2 answers
96 views

Extra horizontal spacing of zero width box

I would like to add a pair of gray quotation marks around the text without affecting the surrounded text. For this I tried to use \makebox with zero width. However, I was still getting: To my ...
Jinwen's user avatar
  • 8,618
3 votes
2 answers
42 views

\makebox inside 3rd argument of \setfoot generates error

If I replace the current version \setfoot with that commented out, I get: "Missing \begin{document}". I guess it has to do with the fact it is flushed right. \documentclass{article} \...
Erwann's user avatar
  • 2,130
0 votes
0 answers
43 views

If you were the word "box" and a word beginning with a letter "m" to describe `\mbox` what might your English phrase be?

Note that English phrase "mathematics blackboard bold" is an example of a super-sequence of \mathbb which has the same meaning as \mathbb. If you were the word "box" and a word ...
IdleCustard's user avatar
  • 1,250
3 votes
1 answer
364 views

How do I put a box around a column in a matrix in Latex?

I want to build a matrix in Latex code and wrap some components of it with a square. For terms that are on the same line I managed to do it well. But for terms of different lines I am not able to do ...
Ramos's user avatar
  • 33
1 vote
0 answers
262 views

Collect information to render later

I am not sure I am using the right terms for describing what I want to do, so the title may be off. I want to be able to use a custom command like for example \PersonalData{Name}{Some Name} but not ...
Zelphir Kaltstahl's user avatar
0 votes
2 answers
104 views

Why are braces mandatory in boxes?

Both \hbox and \vbox (and similar box commands) require explicitly to enclose their content inside of curly braces, so they behave differently from macros. What's the reason of this specification? If ...
User's user avatar
  • 2,530
1 vote
0 answers
68 views

What English word does the `b` in `\bbox` represent? [closed]

Two of the LaTeX commands for building boxes are: The h in \hbox is a subsequence of the English word horizontal The v in \vbox is a subsequence of the English word vertical What English word might ...
IdleCustard's user avatar
  • 1,250

1
2 3 4 5
33