{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

2
votes
1answer
44 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
75 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
82 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 ...
3
votes
1answer
89 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: ...
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
128 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
76 views

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

MWE: \documentclass{scrartcl} \RequirePackage[utf8]{inputenc} \RequirePackage[T1]{fontenc} ...
1
vote
1answer
46 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} ...
4
votes
1answer
88 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
95 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
180 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
171 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
51 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
71 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
71 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} ...
2
votes
2answers
87 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
119 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
43 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 ...
5
votes
1answer
188 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
124 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} ...
1
vote
1answer
82 views

Colored box just around the text

I want to have a rounded box with black border lines and a backgroundcolor, f.e. yellow just around the text, not around the whole line, so the sentence should just continue on the same line. I found ...
2
votes
1answer
76 views

Transparency inside empheq (color box)

I'm currently writing a formulary for dynamics and searched for a way to box important equations and have them coloured. The answer to my problem was the empheq package - for now. Now I'm facing the ...
3
votes
1answer
73 views

Inline Boxed Equation

I'm having trouble producing a boxed equation in the same line as some other formulae. For example: $$ \frac{2}{4} =\[\boxed{ \frac{1}{2} }\] $$ I'd like to be able to show some calculations, ...
3
votes
1answer
102 views

\fbox thickness different for different size

The thickness of \fbox in LaTeX can be changed by using \fboxrule. But I want different thickness for different sides. Basically I want to write a text with only a border in top and no where. So I am ...
0
votes
0answers
58 views

Making nice box in {article}

\documentclass[10pt,a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage{ucs} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \makeatletter ...
1
vote
1answer
72 views

Equation wider than tcolorbox in twocolumn

I have a large equation I would like to fit within tcolorbox in a \twocolumn page without split it. Could you please help me to fix this? i tired even \begin{minipage}[c]{5in} but with no luck MWE ...
1
vote
2answers
44 views

\fbox inside an imported pdf

I have imported a pdf using \includepdf and I want insert an fbox into the pdf (the pdf contains standard content that stays at the bottom). I have used this code: ...
0
votes
1answer
38 views

How to put a Figure caption (without grphic) in a box in main text with space between text and box, width box same width text?

I want to put figure caption in a box in main text so that having space between box and main text, and length of box must be equal the width of main text. I tried this code but it is not work ...
2
votes
1answer
25 views

Placing marginal label within multiline heading

I want to make section headings in an article-class document both multiline and having lables on thier margins. I'm using two boxes: one for a label and another one for text to force it to split. ...
4
votes
1answer
45 views

Content of \setbox does not respect pagebreaks

The following MWE demonstrates that the list of answers accumulated into a box does not respect page breaks when printed (code adapted from Multiple Choice Answer Key in exam package at the end of ...
2
votes
0answers
65 views

Place \mbox around elements in a list

I am trying to achieve essentially the same effect as asked for in this question, except that I want to redefine \item to achieve the result automatically. Specifically, I am trying to use an inline ...
2
votes
1answer
74 views

How to create a rectangle in moderncv

I would like to create a rectangle under my personal info in order to fill it with my strenght, key achivements, etc. But I have no idea how to do it. Actually I have something like this : and I ...
11
votes
2answers
180 views

“Incompatible list can't be unboxed” with memoir class and many box registers

Consider the following MWE: \documentclass{memoir} %% Create 123 box registers \newcount\X \X=1 \loop \expandafter\newbox\csname mybox\the\X\endcsname \advance \X by 1 \ifnum \X<124 \repeat %% ...
1
vote
1answer
59 views

Centering text in \parbox

I used \parbox to auto-wrap the text, but it should be centered. How can I do? \begin{table}[H] \centering \begin{tabular}{cW{5}W{5}} \toprule & {\bf Cost} & ...
2
votes
2answers
137 views

Size and position of boxes in title page

I am trying to create a front cover in a document (class article) and I have decided to 'decorate' it with boxes. The first problem I have is that I am not sure why the title appears on the top of ...
3
votes
1answer
53 views

\ThisStyle, \SavedStyle and \bm

I think this is a follow-up to How to capture the current math style?. In this MWE, \bm{\testbox} works when used after \testbox. But it does not work on its own (commented line): ...
4
votes
1answer
149 views

How to customize shadow box?

I have the following text box: \documentclass{article} \usepackage{xcolor} \usepackage{fancybox} \definecolor{ShadowColor}{RGB}{30,150,190} \makeatletter ...
1
vote
1answer
43 views

errors with \fbox and parenthesis

So I'm doing a LaTeX tutorial and trying to recreate a LaTeX document where a pair of tables are in parenthesis, in a box, in a list. I've come upon this error when I try to use both \fbox and \left( ...
1
vote
1answer
65 views

Box with shadow on right hand side of paragraph

Is it possible to draw a box shown in this image which reduces the right margin of a paragraph it displays along side and adjusts its own height to the height of the paragraph? Something like this ...
3
votes
2answers
84 views

Centering text in box

I would like to horizontally center the text in the \fbox: \fbox{\vbox{\hbox{Words,}\hbox{words,}\hbox{and only words again}}} How would I do this?
7
votes
1answer
95 views

Compute depth of paragraph

I need to compute the distance from the current baseline to the bottom of the next/current paragraph. (Eventually this is going to wind up in \everypar.) Is there an easier way to do this precisely? ...
1
vote
1answer
106 views

Align boxes in a page

Thank you very much. I could do the boxes using your comments. The one thing I am having problem is how to align the first and second box (China and EE.UU.). Here is my minimal example (I am writong ...
2
votes
1answer
62 views

Scale text/formula to fit area preserving aspect ratio

I would like write a command to scale a given text-object to fit into a given area preserving the aspect ratio. That is, a maximum width and height should not be exceeded, but either width or height ...
4
votes
3answers
131 views

How do I prevent text overflow when using savebox?

I want to create a custom Definition environment. The environment should use some local commands to declare logical parts of the definition (e.g. assumptions using a command Let). The definition text ...
1
vote
2answers
212 views

Overfull hbox in rule below chapter title

I am writing a report with the KOMA-Script class scrreprt. Below each chapter title, I am creating a rule which goes all the way to the end of the paper: This actually works fine, but creates an ...
2
votes
1answer
131 views

How to repeat box every page?

I need to repeat a box with the same content on each page, but not how. attached sample image
22
votes
2answers
1k views

How to make these boxes?

I don't know how exactly to call what I want to implement. It's like a box surrounded with a line and, depending on the context, I want to place a graphic on the right corner e.g. a light bulb or a ...