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

learn more… | top users | synonyms

1
vote
0answers
93 views

How to avoid overfull and underfull boxes?

I can't solve my problem with overfull and underfull hboxes and vboxes. \usepackage{setspace} \usepackage{subfiles} \usepackage{nomencl} \makenomenclature \usepackage{color} \usepackage{tabularx} \...
1
vote
1answer
32 views

familydefault ignored when sbox defined in preamble

I would like to define my global family default once in the preamble. I would also like to define my save boxes in the preamble, but somehow the latter does not seem to work with the former, as it ...
0
votes
1answer
25 views

Adjust the location and size of beamer's framebox for a custom theme

I am trying to create a simple custom beamer theme for presentations by my lab at school. Our department has a relatively nice powerpoint theme as shown below which I have for the most part ...
2
votes
1answer
91 views

Line breaks in code affecting outcome appearance (boxes)

I fear the answer to my question might be obvious to many of you, still I couldn't explain it to me. Using a parbox in an fbox and changing the textcolor works out as desired. But I came across a ...
7
votes
1answer
72 views

inverse rounded corners

is there a way to use tcolorbox (or some other package) to create inverse rounded corners. By using the following code \begin{tcolorbox}[colback=red!5!white, colframe=red!75!black, arc=4mm, ...
1
vote
2answers
59 views

Determine the height of a box with a rule

\documentclass{scrartcl} \usepackage{calc} \usepackage{showframe} \begin{document} \setlength\parindent{0pt} \newsavebox\maintitleBox \newlength\maintitleHeight \newcommand{\maintitle}[1]{% \...
2
votes
2answers
106 views

Making a text box replace a \vspace

I have an enumerate list that has it's items separated by a \vspace {1 in}. Each \item is a question that needs to be answered within that space, and, I want to create a "possible answers sheet", ...
0
votes
2answers
53 views

How to avoid underfull boxes in itemize?

I am using an itemize as shown in this example: \begin{itemize} \item \textbf{The First}\\ Some text here over fifty lines.... bla blah \item \textbf{The Second}\\ Other text here ...
1
vote
1answer
60 views

Making set length text box

LaTex noob here. Im looking for a simple way to make a box in latex that won't expand to fit the text. I have been trying to use a minipage within a fbox but it keeps expanding. I have been trying to ...
3
votes
1answer
67 views

Beamer box problem

I am working in "Frankurt" theme on my beamer presentation. Sometimes I am faced with overflow problems. For example: \begin{frame} \begin{definition} \begin{multicols}{2} \begin{enumerate}[a)] \item ...
7
votes
3answers
220 views

Building custom text-box using tikz

I'm trying to build a Dungeons and Dragons style LaTeX-Template and would like to recreate a certain box-style as seen here: Using tikz I managed to recreate the rough shape but I don't have any ...
0
votes
0answers
34 views

long remark box

I have the following remark box. However, the text that I'd like to add in it could fit in 2 pages. \NewEnviron{myremark}[1] {\par\medskip\noindent \begin{tikzpicture} \node[inner sep=0pt] (...
4
votes
1answer
153 views

How to create theorem boxes

I wrote a chapter for a book, and we use a structure.tex with a lot of definitios and macros. Now I'm writing other book and I would like to use those kind of boxes as below. Note that when the box ...
1
vote
0answers
36 views

How to make marginal boxes that respect page breaks

At the moment, I'm using a combination of \makebox and \parbox to insert labels into the margin in my thesis. For the most part, this works, but occasionally I have a long label that doesn't quite fit ...
3
votes
2answers
84 views

Express boxes properties in tikz coordinates

In my understanding, any LaTeX box displays such fundamental properties: .. and anything is wrapped into a LaTeX box. So, when I produce a tikz picture, it must be somehow wrapped into a box. ...
1
vote
1answer
155 views

How to wrap the title in an a0poster with a page width color box?

Current Preamble I want to wrap the top part of my document with a colored banner, spanning the entire page width and to the very top of the document. Here is my preamble and title section: ...
5
votes
4answers
175 views

Spacing after \vtop

There is insufficient spacing between the lines in the MWE, made using an \hbox filled with two \vtop boxes. \parindent=0pt \newdimen\linewidth \linewidth=4in \newdimen\colsep \colsep=1em \...
3
votes
1answer
85 views

How can I do unvbox when define macro?

This is another approach to solve the problem in question "How can I write to file part of text between two flags?". I try to "remember" parts of text to use them later. So, I do \newbox\@tmpbox \...
1
vote
1answer
60 views

How to move contents of fbox to top?

My question is how to align things in fbox in general but here's the clumsy solution I came up with: \documentclass[12pt]{article} \begin{document} { \fontfamily{qag}\selectfont \fbox{\vbox to 3in {...
0
votes
0answers
77 views

Underfull \hbox (or \vbox) and Overfull \hbox (or \vbox)

I'm currently using the dis class with strong requirements on text with and text heigth. After compilation of my latex file I got a lot of warnings of the following kinds Underfull \hbox (badness ...
3
votes
2answers
130 views

Color-box behind inline text / inline math without vertical space

I'd like to provide a ‘background-colour’ for spans of code or math inline with text, in the same way that CSS allows. I've tried to do this with \colorbox, but unfortunately, that seems to add ...
5
votes
1answer
54 views

Allow user to specify multiple values with one command

I am attempting to define a macro that can be used to specify the names of committee members for a thesis/dissertation. I would like to allow the user to specify this command multiple times to add ...
0
votes
1answer
67 views

Overfull with two columns, one small box and one big box, how can I deal with the overfull without breaking the boxes?

I have a twocolumn document with some sections where I use some box type of content (tcolorbox for instance) On one of the page, I have two boxes, one small and one big. The big one is too big to fit ...
2
votes
1answer
84 views

Drawing colourful box in a A4 page

I am writting my masters thesis. I want to put 2x2 block boxes in some pages. For example: I can add as image but I do not want to do that. I can draw box using tcolorbox using the following code: ...
2
votes
3answers
206 views

How to draw this diagram in Tex

I am trying to draw the attached diagram in Tex (the attached is from Microsoft Word). Happy to make some tweaks, but it needs to look something like this. Thank you very much! edit: could you give ...
1
vote
2answers
137 views

colorbox around parbox too big

I want to typset some text with colored background and outline, that spans the whole \textwidth. I tried to get this with a colorbox surrounding a parbox. It works in some way, but the colorbox is ...
6
votes
1answer
118 views

Can tcolorbox enhanced boxes be combined with TikZ externalisation and save boxes? If so, how? If not, what's the best workaround?

I am getting the following compilation error when combining TikZ-enhanced boxes from tcolorbox with TikZ's externalisation: ! Argument of \tikzexternal@laTeX@collect@until@end@tikzpicture has an ...
2
votes
1answer
48 views

Itemized in a box with auto scaled width [duplicate]

I would like to have an list (itemize) with a box around it. I know that \framebox doesn't work, because it doesn't support line breaks. Also I don't want to use \parbox because I'd have to set the ...
3
votes
3answers
79 views

\savebox forgets its content across columns inside align

I want to save part of an equation, which is to appear in a single column in a multicolumn align environment. It works as long as I \usebox inside the same column, otherwise it appears blank. Here's ...
3
votes
3answers
88 views

reuse of \newsavebox and avoiding compilation warnings

The answer here may be obvious but I can't find it. I use \newsavebox in many routines and for different purposes. These are saved globally and I guess are a reasonably precious resource. In all ...
4
votes
1answer
133 views

How to renumber a theorem environment with mdframed package?

I have the next document, which compiles fine. I want to change the numbering of theorems according to the number of section or chapter (view image). I wrote: \newmdtheoremenv{theo}{Theorem}[...
2
votes
1answer
32 views

How to insert a paragraph (which works only in the “ltxmdf” class) into a class “book” document?

I have the next document (in ltxmdf class ), which compiles perfectly (view image). I want put in a document book class. ¿is posibble?. I've already tried but get 4 errors. How do I change the ...
0
votes
1answer
190 views

minipage has overfull hbox

I'm struggling with this piece of LaTeX code: \begin{minipage}{0.5\textwidth} \begin{tabu} to \textwidth {>{\itshape}r c} Foo:&\makebox[5cm]{}\\ \cline{2-2}\\[-0.5em] ...
2
votes
0answers
34 views

How can I create block of text that ignores the surrounding glue? [duplicate]

After developing a custom environment that has both table-like data and paragraph data, I noticed some interesting effects. The glue (I think) is messing with the alignment of the text around each ...
1
vote
2answers
85 views

Lines with texttt reach into the page border, how to prevent?

MWE: \documentclass{scrartcl} \RequirePackage[utf8]{inputenc} \RequirePackage[T1]{fontenc} \RequirePackage[a4paper,includeheadfoot,inner=2.4cm,outer=2cm,top=1.78cm,bottom=1.5cm,twoside,headheight=1....
1
vote
1answer
51 views

Cache math content in savebox and account for math style

I am using Create a \savebox in a Group and have it available outside of group to cache some math content. However, I realized that there may be a case where the same math content needs to be cached ...
2
votes
0answers
23 views

Minipage inside framebox creates an undesired horizontal spacing [duplicate]

In the following MWE I'd like the second framebox to look the same as the first one (see the image below). \documentclass[10pt]{article} \begin{document} \setlength{\fboxsep}{0pt} \setlength{\...
5
votes
1answer
113 views

How to set the baseline of a box?

I want to change the baseline of a box so that the depth of the box is equal to that of a letter with a descender in the current font. So far I have only been successful in setting the baseline to ...
5
votes
2answers
102 views

Boxing and coloring background of text

how can I easily make a box like this, set its width and the white border around it? (Ignore the text inside.)
3
votes
2answers
206 views

Draw a special box with tikz

By inspiring from that nice code of that question I would like to draw something like that but with my tired i just could draw this Output: \documentclass{article} \usepackage{geometry} \...
5
votes
2answers
191 views

Dashed version of \boxed

Is there an easy way of putting an equation inside a dashed box? Ideally similar to \boxed from amsmath. The output should look something like this:
2
votes
1answer
65 views

How to horizontally center a vbox

I am using the MIT Thesis templates to write my thesis. I have created my own document class (that reflects the needs of the university I'm studying at) based on the mitthesis.cls version. Since it ...
9
votes
1answer
72 views

Why does unboxing lose margin kerning in pdfTeX?

Consider the following code: \showboxdepth=20 \showboxbreadth=200 \hsize=5.33333in \pdfoutput=0 \pdfprotrudechars=1 \input protcode.tex \setprotcode\tenrm \vbox{\noindent Test. Test. Test. Test. ...
2
votes
1answer
83 views

putting algorithm in box

Below is my code snippet. Please help me to put a framed box in my algorithm. \documentclass[journal,12pt]{IEEEtran} \usepackage{algorithmic} \usepackage{graphicx} \usepackage{algorithm} \usepackage{...
2
votes
2answers
89 views

Enable \ifmeasuring@ flag

Apparently the \DHLhksqrt macro in the MWE below measures its content 20 times: Questions: Where exactly can I put the \measuring@true and \measuring@false so that I get the count of 1? If you ...
5
votes
2answers
122 views

Create a \savebox in a Group and have it available outside of group

The MWE below creates a \savebox within a group which results in several blank lines: If I comment out the\begingroup and \endgroup I get the desired results: My thinking was that adding the \...
1
vote
1answer
47 views

Frame title with picture

For my cv I want to create a frame box where I place my name surname and personal info on the left side and my pic on the right. Basically I need to have a frame which width is splitted let say by 80%...
5
votes
1answer
258 views

How can I title a box?

I was trying to a title inserted on the lines of a box. I don't know if LaTeX has a command or a package for doing this, but it's something similar to the image below. Any suggestions?
3
votes
1answer
56 views

colored underline with vertical spacing

How can I add a vertical spacing between the underline and other items by adjusting the \colorunderline command? \documentclass[12pt,b5paper]{article} \usepackage{amsmath} \usepackage{color} \...
5
votes
3answers
137 views

\sbox in math mode

I want to extract the width of an equation, but it gives me an error. ! Missing $ inserted. <inserted text> $ I do not understand what is missing. \documentclass{article} \...