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.

0
votes
2answers
70 views

character box depth and height

As I understand it, when TeX reads a glyph TeX puts the glyph into a character box. It pays attention the left sidebar and right sidebar, so negative sidebars are handled correctly (as are positive ...
0
votes
0answers
18 views

Box format of Definition and Example in Tex

When I search for a material, I found this material have these two logical boxes (Definition 1.2 and Example 1.2). How can I create these two boxes ? Any help is appreciated.
2
votes
1answer
20 views

Underful \hbox in template

I like to use this template:https://www.latextemplates.com/template/journal-article I am using it in Overleaf and it compiles however I am shown in the logs that the \hboxes seem to be underfull? ...
1
vote
1answer
67 views

Formatting of Axler’s Linear Algebra Done Right

I recently started reading Sheldon Axler’s Linear Algebra Done Right and I find the formatting and design of the text quite appealing. I provided a page as an example. What I’m interested in the ...
0
votes
0answers
21 views

How to insert conditional content in footer if box splits to next page?

I am currently creating a songbook, and would like to add a small indicator in the footer of right (odd) pages, if the song continues on the next page. As I am fairly new to LaTeX and someone else ...
2
votes
1answer
52 views

How can I insert a tree diagram into text?

I've made a tree diagram using the forest package. To prevent the diagram stretching beyond the page I've placed it in a box. How can I place this box within the text such that Latex can determine its ...
0
votes
1answer
18 views

Package lplfitch and “Overfull \hbox”

I get a huge lot of Overfull \hbox using Fitch diagrams, package lplfitch. MWE: \documentclass{article} \usepackage{graphicx} \usepackage{lplfitch} \begin{document} \begin{figure} \noindent\fitchprf{...
13
votes
2answers
402 views

How to construct an hbox with negative height?

According to answer on exercise 12.10 in TeXbook, a box's height may be negative: Yes it did, but only because none of his boxes had a negative height or depth. But on p.77 it is said: The ...
5
votes
2answers
353 views

Geometry affects line breaking

This one has me stumped. The idea is to pack boxes (in this case, \rule) together tightly while allowing them to break at the end of a line. It works without geometry, but not with. Another package ...
0
votes
0answers
17 views

make page framed [duplicate]

how can I make a box with title and the box filled the whole page even if the text in the box is a single line lick this
4
votes
2answers
106 views

Why appending box dimensions to a sequence (in a loop) makes that sequence only contain duplicates of last dimension?

Loop steps from 1 through 9. Each step puts current index digit of the loop into a box and extracts the digit's width. The width is then appended as dimension value to a sequence. Although the ...
1
vote
1answer
61 views

Tcolorbox and tikz package for colored page [closed]

Bonjour. How to code these two pages in latex using tikz package.
3
votes
1answer
53 views

An understanding trouble with \framebox

I'm reading More Math Into LaTeX, and it introduces the command of \framebox at section 3.9.2 on page 91-92. There are the two following code examples which show different output: \framebox{\makebox[\...
4
votes
4answers
221 views

\includegraphics: get the “scale” value of a figure whose size is expressed by “width”

Lets take this string: \boxed{\includegraphics[width=0.4\textwidth]{FIGURE.pdf}} that generates this figure: Now lets say that I need to crop the blank margins of the figure keeping the figure's ...
2
votes
1answer
25 views

Can I teach \censor to break on lines?

This is similar to Censor text spanning multiple lines, but I'd like to keep using the censor package if possible. Its \StopCensoring/ \RestartCensoring macros and actual style of censoring (big ole' ...
1
vote
2answers
58 views

Is there any way to draw box outside margin?

I am looking to create a box outside page margin with some text in it. Is there any way to manually position the box. I want desire output as follows:
0
votes
0answers
28 views

How can I do a box for biographies?

I would like to do a box with 2 biographies. I have a code that it works but the box results small: Like you see, the box is tight so I want to do it wider. %Formato \documentclass[a4paper]{...
1
vote
1answer
40 views

How do I make words align horizontally in a box?

I have a problem with boxes. I'd like to make it so that a box including 2 words align horizontally. So the first word is above the second word, in turn hopefully making the box smaller. This is what ...
2
votes
0answers
29 views

header-footer and box [duplicate]

I am mostly new to Latex. I was looking for a template which I like. The problem is I don't know how to obtain that. Here is one. This one looks very challenging for a new one like me. I will really ...
4
votes
4answers
177 views

How can I make a vertical rule that extends to the edges of an fbox?

Consider the following MWE: \documentclass{minimal} \begin{document} \fbox{some text \vrule{} more text} \fbox{some text \vrule{} more deep text} \fbox{some text \vrule{} more $\int$ tall text} \end{...
1
vote
1answer
35 views

Resize the text and keep the color box the same size

Hi I have a gray box that contains my python code, I want to reduce the size of the code, but keep the grey box the same size. This is my latex code: \lstset { %Formatting for code in appendix ...
0
votes
1answer
37 views

Automatically drawing frames around document elements with LaTeX

I wonder how to draw frames around various elements in LaTeX (or LuaLaTeX if needed)? I would like to get frames around every text paragraph, and/or every equation, every image, every header, every ...
5
votes
2answers
397 views

Crossed out red box fitting tightly around image

I can do \textcolor{red}{ \fbox{ \includegraphics{path} } } To get a red frame sitting tightly around an image inside a firgure environment. Now, is there a way to also get a red cross over ...
1
vote
1answer
24 views

function multiple lines into box

I'm trying to write the Leapfrog integrator for Monte Carlo Hamiltonian, but I can not properly align each of the rows, any suggestions please. Expected Output: My code: \documentclass[12pt,a4paper]...
3
votes
3answers
38 views

How to stack frameboxes one next to another filling all available horizontal space

I'm writting a "cheat sheet" where I put a bunch of formulas and ideas inside frameboxes, stacked one after another. The issue is that paragraph indentation, the framebox separator and the framebox ...
1
vote
2answers
49 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
103 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
28 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
38 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
39 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
24 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
33 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{\...
6
votes
1answer
102 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
130 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
51 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
30 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
45 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
116 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
40 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
127 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
746 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
57 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
55 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 ...
2
votes
2answers
616 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
144 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
64 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 ...
0
votes
0answers
82 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 ...