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 [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.

1
vote
2answers
40 views

Aligning content in multirow

I want to write a document, where i group two plots and the two functions corresponding to the plots together. There should be two such groups aligned next to each other. Here is a picture of what i ...
4
votes
2answers
98 views

Different macro behavior when used in another macro

Please consider the following MWE : \documentclass{article} \newcommand{\mymargin}{\hspace*{3em}} \newcommand{\innerbox}[1]{\mymargin\fbox{#1}\mymargin} \newcommand{\outerbox}[1]{\fbox{#1}} \begin{...
1
vote
1answer
21 views

Inclosing \section in \vbox failed with: “Something's wrong--perhaps a missing \item. }”

I wanna put some complex commands (e.g. \section and \chapter) inside a box (\vbox) so later I can compute the height of the block contains the text. Here is the full example: \documentclass[11pt]{...
0
votes
0answers
28 views

\Underfull badness(10000) error message [duplicate]

Can someone rectify this. Thanks in advance. \textbf{Sub interval 1:}($t_{o}-t_{1}$)\\\ This sub-interval starts when D1 and D4 are Forward biased, so in this sub-interval D1-D4 and D6-D7 are ...
1
vote
0answers
31 views

capture=hbox inside newtcblisting doesn't work

I can include a minted listing inside a tikz node using newtcblisting from the tcolorbox package. However, when I do that it takes all horizontal space available, because the default is to use ...
2
votes
1answer
18 views

How can I center a text and figure vertically in a framed box of fixed size? (Ideally within the tocentry environment from the achemso package.)

I am trying to add a TOC entry with text and a figure to an ACS paper draft. I would like to have everything fit in a box of width=3.25in and height=1.75in, with the figure on the right and the text ...
0
votes
0answers
31 views

Wrong orientation of body box

I am using the fancyhdr package to create a specific headline and footline. My code: \begin{document} \renewcommand\headrule{\textcolor{gray!60}{\rule{\textwidth}{.5pt}}}% \renewcommand{\...
7
votes
1answer
96 views

Add big quotation marks inside my colorbox

I have this code (MWE): \documentclass{article} \usepackage{tikz,lmodern} \usepackage[most]{tcolorbox} \newtcbtheorem{theo}% {Definition}{fonttitle=\bfseries\upshape, arc=0mm, colback=blue!5!...
0
votes
1answer
45 views

Underfull \hbox (badness 10000) in paragraph in bbl bibliography

Just after the word resonance it is getting the above error. underfull. I have tried using \smallskip \bigskip but it does not work. In texstudio the author name until the word resonance in one line. ...
2
votes
1answer
34 views

How to get \baselineskip instead of \lineskip when using a stored box?

Consider this code: \documentclass{article} \begin{document} \pagestyle{empty} \def\contents{% \parindent = 0pt \LARGE \strut \raise\baselineskip \vtop {% {\Large\smash{...
3
votes
1answer
29 views

Multiple boxes with many rows on a line with wrapping when overflowing

I would like to have multiple boxes with many rows on a line with wrapping when the boxes are overflowing. The idea would be to build a custom contributors/reviewers environment that I can also use ...
0
votes
1answer
29 views

Position a box in LaTeX-Beamer at the top of the slide

I finally managed to create a box. I want this box to be centered and at the top of my slide, however. And I don't know how to achieve this: I have created a minipage, but I cannot position it at the ...
1
vote
0answers
61 views

Overfull \hbox error on begin [closed]

I get the following error when I try to build my document: Overfull \hbox (30.0pt too wide) in paragraph at lines 32--32 [] line 34 is \begin{document} The other questions about overfull ...
0
votes
0answers
30 views

How to know the height of the footnotes?

I tried to use the following code to get the height of the footnote box : \documentclass{article} \begin{document} Example\footnote{A footnote}. Height : \the\ht\footins. \end{document} However, I ...
1
vote
1answer
115 views

\hbox \mbox difference … what they do? [duplicate]

What is the difference between \hbox and \mbox? What are these commands intended to do? I cannot see what they do from my code alone without a word explanation...
7
votes
2answers
739 views

Draw a palette box in LaTeX

Is there a way to build a structure like the following in Latex? They're probably just boxes, but I have very little experience with Latex and I'm not sure how to get this result.
1
vote
1answer
31 views

Indented paragraph next to a box

I am trying to indent a whole paragraph to the right of a numbered box. However, the paragraph does not appear vertically aligned with the box. I am using the below code: \documentclass[journal,...
3
votes
3answers
50 views

Vertically filling frameboxes on page

I am trying to write a problem assignment, with textboxes containing the written solutions. The textboxes should be distributed evenly on the page, consuming all the available space. The intended ...
1
vote
1answer
52 views

Headings with coloured boxes

I am needing to write a risk assessment report, the headings within the report are risks that have been discovered, next to each of the headings/risks I'm needing to use a key or coloured boxes to ...
1
vote
2answers
277 views

Text boxes in Latex

In an article is it possible to create boxes so that when the document has been printed users have some text boxes areas where they are able to make notes in? A very basic mock up using word with ...
11
votes
3answers
2k views

How to write mathematics with boxes?

I want to write the mathematics inside the box as written below. See my code given below: \documentclass{article} \begin{document} \\fbox{text} \framebox[width][pos]{text} \makebox[\textwidth]{...
0
votes
0answers
36 views

spacing problem after \makebox [duplicate]

The following two lines give me different results with respect to spacing: \noindent\makebox[\parindent]{?} Blabla \noindent\makebox[\parindent]{?}Blabla The second case is what I want: no space is ...
1
vote
3answers
97 views

Framed boxed text with “continued” text on page break

I need to write a boxed text as like as: Currently, I am using \documentclass{book} \usepackage{framed} \begin{document} \begin{framed} \section{Box 15...} ... \end{framed} \end{document} Please ...
0
votes
1answer
59 views

How can I execute a LaTeX command then hide the resulting text? [duplicate]

I would like to execute a command which produces text, but not have that text visible anywhere inside the document. Can we put the command inside a box, which clips other text, such as in the middle ...
1
vote
1answer
56 views

Two column CV - Increasing personal info and adding description under the name

I'm trying to use the tccv class to build my curriculum. Does someone know how to put my description under my name? I don't want it to be part of the half page format. Also do you know how to add ...
2
votes
2answers
174 views

Ideas to recreate this using latex

I'd like to create a Latex template similar to the one on the picture. Basically it's a set of boxes with different fields plus the big box on the bottom with a graphic. I've been analysing several ...
2
votes
1answer
49 views

Makebox spacing inside mdframed

I want to be able to have some text aligned in the left margin such as a theorem label, and then have the example in the mdframed box. Here is an example of my failed attempt. As you can see the text ...
2
votes
1answer
64 views

Why does additional brace group cause \settominwidth to complain about missing }

I'm using the pbox package's \settominwidth command to measure the typeset width of text that includes explicit line breaks (which is a case in which standard LaTeX's settowidth doesn't work). In the ...
2
votes
2answers
69 views

overfull hbox on chapters with line above/below chapter title using KOMA-script

I would like to add \linewidth-sized lines above and below my chapter titles (similar to borders above/below the 'paragraph' in MS Word) I tried the following, which somewhat approximates the desired ...
4
votes
1answer
113 views

Can you replace glue with a box, after it's been set?

The question is as asked. My intended use case for this would be to have something like minipage, but whose height can be set using glue, rather than only a dimen. When the page is pretty easy to ...
3
votes
2answers
52 views

Create an empty framebox with specific with and length

I am looking a package to create an empty framebox of 2.7 cm height and 15.97 cm lenght. I am using \framebox but I am able only to set the size. \framebox[15.97cm][l]{}
4
votes
1answer
51 views

Text in TikZ nodes: controlling the box variables of characters/string

I remember that there were different commands in TikZ that allow modifying how the characters in a node are placed but I'm not able to find all of them in TikZ manual. Probably I'm looking for the ...
1
vote
1answer
52 views

A visible box on the right hand side of the document

How can I get a small box at the right hand side of the document as in the figure below: My initial attempt failed: \begin{flushright} \begin{tcolorbox} \textbf{Date:11/12/2018}\\ \textbf{Time: 2:...
19
votes
1answer
355 views

Spacing difference when using boxes

On the left (obtained from the MWE below), I do not use boxes for the title nor the body text and the title and the text appears to be in the correct spot. However, when I attempt to use \...
1
vote
1answer
42 views

Prevent macro expansion within setbox

Following code is the quintessence of a problem i'm facing: \documentclass{minimal} \newbox\boxa \newbox\boxb \newbox\boxc \parindent=0pt \begin{document} \setbox\boxc\hbox{Hello World!} \def\...
11
votes
3answers
676 views

Squares for answer choice options and perfect alignment to mathematical answers

Since 2005, I have generally used this model to create multiple-choice tests for my students. I kindly ask you if there are packages or macros, or particular strategies to have squares with the ...
2
votes
1answer
72 views

\fbox around multiple \includegraphics

I am working on a figure like this, \begin{figure} \includegraphics[width=\textwidth]{a.png} \includegraphics[width=\textwidth]{b.png} \includegraphics[width=\textwidth]{c.png} \end{...
2
votes
1answer
105 views

Drawing grid lines to show vertical position of text [closed]

I have text where I want to adjust the space above the first line. I want to overlay grid lines to show where the vertical position of the text is. The MWE below with the following line commented is ...
2
votes
1answer
43 views

“Smart” page breaking for boxed content

I am trying to load content from a central .tex file, then display it. %%%%%%%%%%%%%%% % central.tex % %%%%%%%%%%%%%%% \saveContent{A}{this is content "A"} \saveContent{B}{this is content "B"} \...
13
votes
1answer
190 views

\savebox within tikzpicture results in an empty \savebox

Using \savebox within a tikzpicture environment seems wipe out the content of the \savebox. In the MWE below, the following macros define, measure and display the size of a \savebox: \newcommand*{\...
0
votes
0answers
30 views

Tex version and overfull boxes

I'm working on a paper with a collaborator and I've noticed that the number of overfull boxes is different whether I compile the document or he does. It's also not the same whether I compile it from ...
0
votes
1answer
23 views

Title and text paragraph indent

I'm trying to reproduce those design decision text boxes. How do I do this? They are indented and numbered. See Design decision 5 and Design decision 6 in the attached picture.
0
votes
1answer
59 views

Centralized/lateral boxes with squared/round edges

I'm trying to reproduce the boxes below exactly, i.e., a central box with round edges and a lateral box with squared edges. I've found articles teaching about coloured boxes, with shadows on the ...
0
votes
1answer
41 views

text justification/comments filling the space left from equation - flalign and paragraph mode

I have equations in a flalign environment and comments that may need to be multi-liner. \parbox seems fine except I can't tell it to automatically stretch in order to fill the space from the right-end ...
8
votes
2answers
366 views

How to add a small rounded rectangle around a word inline

I want to add a box with a very light pink background and red border around a word but inline and within a sentence. i.e. something like this (drawn with inkscape) I know the mdframed package can ...
3
votes
1answer
40 views

Overfull in vbox inside hbox with hsize of the same width

While learning with Plain TeX, I am trying to create a framed paragraph. I have started with the following code, which is supposed to limit the paragraph width but still enable the line breaking ...
1
vote
1answer
69 views

\leaders in redefining \headrule cause “A <box> was supposed to be here”

After stripping away hundreds of line of code to reach this MWE, I found that my "A «box» was supposed to be here" seemed to be caused by a \renewcommand{\headrule} in conjunction with fancyhdr. ...
4
votes
2answers
96 views

Aligned boxes without exceeding textwidth

I have this: \newcommand{\bpic}[2]{ \makebox[\textwidth][l]{ \fbox{\makebox[.1\textwidth][r]{\includegraphics[width=20pt]{#1}\hspace*{5pt}}}\fbox{\parbox{.9\textwidth}{#2}\newline}% } ...
1
vote
1answer
80 views

How does using \makebox allow arbitrary placement of things on a page?

What is it about using \makebox that makes it disregard text body borders / margins, where other boxes respect the margins / text width and friends? Allowing images outside of margin Letting graphics ...
1
vote
1answer
63 views

How to make this rectangle with an image on the left?

Here are two examples of the formatting I'm trying to recreate: I'm trying to recreate this style as closely as possible (including the slight shadow), but I don't know the font. I'd also like the ...