{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
1answer
63 views

Horizontal boxes in article class

How can I have a box with multiple boxes inside like the following in the article class? It should be at the beginning of the page on the left side.
3
votes
1answer
138 views

Bottom-right box

I am preparing a poster with LaTeX and I want my blocks to be only half boxed to the bottom-right. Which means that I want to draw a half box made of only two lines. Can anyone help me?
5
votes
2answers
659 views

Getting a particular kind of page border using background package

I am doing my project report using latex, and the format requires a particular kind of page border around each page. (Its a black thick box enclosing a thin box). I saw this question, Multiple border ...
1
vote
1answer
67 views

How to set \framed to make the baseline of the whole \framed as same as the first line in this \framed in ConTeXt?

An simple example: \starttext \setupframed[align=right,frame=off,offset=none] \framed{A\hskip3em\framed{B\\ C}} \stoptext How can I set the framed which contains B\\ C so that the baseline of ...
4
votes
1answer
165 views

Highlight theorem environment using todonotes

I'm trying to highlight theorem-like environment (defined using amsthm) utilizing todonotes. In the preamble I have: \newtheorem{que}{Question} \newcommand*{\question}[1]{% ...
8
votes
1answer
6k views

What is a “Overfull \hbox (9.89561pt too wide)”?

I have this warnings around, some of them seems to be solved naturally but I never really understand what do they mean. What this means? Edit: I would like to keep the question in more general ...
1
vote
0answers
183 views

Covered Box Beamer Shadows [closed]

It seems to me that in beamer, a (rounded) box with shadows that is covered (transparent, normally visible on the next slide) has buggy shadows, I'm not sure if this is a know bug, or maybe an error ...
6
votes
1answer
234 views

Creating form boxes with labels

I want to recreate a form with LaTeX, that can be filled by hand or --- of course --- via LaTeX. How can I create the boxes, with a footnotesized label at the top and enough space for the text to be ...
3
votes
1answer
3k views

Set the width of a fcolorbox

Hi a very basic question I'm sure, but is there a way to tell \fcolorbox in xcolor to draw the box of a certain width. For example with \fbox I would do \documentclass{article} \usepackage{xcolor} ...
1
vote
2answers
3k views

How to put \algorithm and \algorithmic environments inside a box?

I want to put an algorithm inside a box. Here is the code \fbox{\parbox{0.8\linewidth}{ \begin{algorithm} \caption{My algorithm} \begin{algorithmic}[1] \scriptsize ... \end{algorithmic} ...
1
vote
1answer
183 views

Textbox on frontpage

in my thesis I would like to include a "textbox" in the lower left corner of the front page. It should contain the names of my supervisors. But I'm not able to put a box there, I suppose it has to do ...
6
votes
2answers
5k views

How can I box multiple aligned equations?

This question is two-fold. In my document, I currently have boxes around single equations like so: \documentclass[11pt]{article} \usepackage{amsmath} \begin{document} \begin{equation} ...
1
vote
1answer
339 views

footnote inside itemize

I know that I should use \footnotemark and \footnotetext{} (or not?) for putting a footnote inside an itemize environment, but when the items are split on more pages, I want the footnote to be placed ...
3
votes
1answer
101 views

can't put figures in a box

The other day I had a problem in creating an example that contained text and listings, I asked about that here: lstlisting in a box? David Carlisle found a very good solution for it, and after toying ...
5
votes
1answer
222 views

Hide paragraph but keep space

I need a command that replaces its contents by white space of the same size. Unlike \phantom it should work paragraphs and/or images. It should do more or less the same as the \visible command of the ...
4
votes
1answer
828 views

lstlisting in a box?

My problem is that I am trying to write a document with coloured sections for examples. Examples can contain code listings. Somehow I can't seem to combine a background colouring with a listing, or ...
5
votes
2answers
290 views

Drawing boxes of any size and any location

How can I draw rectangles of any size and any placement on the current page? \PassOptionsToPackage{dvipsnames}{xcolor} \documentclass[landscape]{article} \usepackage{tikz,graphicx} ...
8
votes
2answers
2k views

Beamer overlay box around text - the correct way?

I have something that "works," but I'm wondering if there's a more elegant solution. I want to box some text after an itemize in beamer, so this is what I'm doing: \documentclass{beamer} ...
4
votes
1answer
101 views

\hbox in “p”-column (tabular) destroys row layout

The following example code shows a problem with my \vertgap command, which is just intended to add some space above and below the mandatory argument after encapsulating it in an \hbox (for tall ...
15
votes
5answers
7k views

How to draw a square of 1cm in LaTeX filled with color?

How to draw a square of 1cm in LaTeX filled with colour? I found mdframed and framebox does this, but there need to write text inside it. I just need to draw a box.
4
votes
1answer
5k views

Set background color of a box with predefined width

I would like to have something like a minipage with colored background, i.e. a box where you can predefine the width and the background color. My attempt \colorbox{green}{\begin{minipage}{\slwidth} ...
5
votes
1answer
102 views

boxed equation but framed only some sides

I need to box part of an equation, but I need the frame to be open one side. In the following MWE I would need the left part of the equation not to have the right frame of the box and the right part ...
3
votes
1answer
78 views

Vertical centering of a title within a box which ignores possible accents

I am currently adapting the \part command to customize the table of contents as follows [code directly extracted from the book.cls class]: \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax% ...
2
votes
2answers
577 views

(Framed) Boxes are too long / Textwidth doesn't work

I want to create a box/frame (in math mode) with its content centered horizontally and vertically such that I can adjust the height of the box and such the width of the box automatically (!) is the ...
6
votes
2answers
220 views

Saving a list in a re-usable box

Pardon me if this is a dumb question, but I am a bit rusty about this. I want to store a list like one generated by the enumerate environment in a re-usable box that I may re-use within a TikZ ...
13
votes
1answer
197 views

Is it possible to `split a hbox`?

When creating two columns or balancing it, we may use \vsplit to achieve this, but can we split a \hbox in TeX? Compared with \vsplit, an example may be like this: \setbox0=\hbox to 6in{ ... } ...
5
votes
1answer
249 views

Putting text in a box: custom box : different color for each line

For a beamer presentation, I would like to enclose text in a box such that: - all the line of the box are blank, - except the upper left corner, and the lower right corner of the box which are color ...
2
votes
2answers
302 views

Align boxes and rotate boxes in plain TeX

When I finish reading the Appendix D: Dirty Tricks in the TeXbook, I rethink a question: is it possible to align some character boxes like this: The input may be like this: ...
9
votes
1answer
130 views

LaTeX2e \makebox !=\hbox?

The source2e documentation (pg. 233) when describing \makebox states: ... If wid  is missing, then pos is also missing and obj  is put in an \hbox of its natural width... This, ...
3
votes
1answer
887 views

Make matrix inside equation fit the page width in LyX

I have a matrix that is a bit too wide to fit inside my page width. After reading a lot of different answers on the Internet, none really related to LyX, I came up with these three different ...
5
votes
2answers
129 views

Figure with a different box around

I'm trying to make a box around my figure like the ones in Benjamin Pierce "Types and Programming Languages" book and Luca Cardelli paper "Types Systems". Such boxes have horizontal rules and only ...
0
votes
2answers
171 views

Linebreak in table cell at document margin

In order to allow line breaks within a table cell, I use \parbox. But when the cells I want to have line breaks in are in the last column of the table, the best thing would be to break them at the ...
6
votes
3answers
3k views

How to specify height and width of \fbox{}

I am trying to have my text read like this inside a box: If A and B are two events that are not mutually exclusive then: $P(A \cup B) = P(A) + P(B) - P(A \cap B)$ Al I ...
7
votes
1answer
104 views

Why does \textit not produce the expected result when used with \usebox?

\documentclass[border=3pt]{standalone} \newsavebox\temp \newenvironment{definition} {\begin{lrbox}{\temp}} {\end{lrbox}\textit{\usebox\temp}} \begin{document} \begin{definition} Hello World! ...
3
votes
1answer
117 views

Globally set the justification in a framed box

I want to show the text from a Python Interpreter in a Windows console. This should be plain text (like you see in a command line terminal). I also want to show Python code snippets with highlighting. ...
1
vote
0answers
39 views

How to implement a floating text box? [duplicate]

I'm trying to write an environment that creates a new float type for text boxes. These are used for example in some books to provide interesting tidbits that aren't really part of the main line of ...
6
votes
1answer
332 views

How can I adjust the box around my equation?

I currently use the \boxed{} command to place boxes around my equations. However, I would like to have more control of the style of the box. Is there a way to do this? To take a specific example, ...
4
votes
1answer
67 views

Removing boxes in a ytableau

I am attempting to draw a ytableau where I remove the boxes around the outermost part of the table. Basically, what I would like to do is remove the boxes around all of the numbers in the example ...
5
votes
1answer
207 views

How to create a shade box that covers the whole footnotes area?

I would like to shade the whole footnote area (bottom of the page). Does anyone know, if it can be done ? Edit : Using the answer provided, the text direction commands \setRL and \setLR, from the ...
1
vote
2answers
541 views

How to right align content of pbox?

Lets have simple \pbox example like this: \documentclass[twoside]{book} \usepackage{pbox, calc} \begin{document} \noindent\fbox{\pbox{\textwidth}{Some text\\Text}} \end{document} Here is printed ...
2
votes
1answer
296 views

How to scale a dirtree inside a figure?

I drew a tree structure with \dirtree. This tree is located in a {figure} environment. It is possible to adjust the size of the figure? With \includegraphics one can do it with scale. Is there a ...
2
votes
1answer
94 views

Prevent underful hbox in custom environment

I created an environment for a thesis about a framework, which formats documentation of some methods. The method(s) are at the top with one line per method, set with \lstinline from the listings ...
4
votes
1answer
444 views

Create an environment like the `checkboxes` in exam.cls

I am having trouble on how will i create something like the checkboxesor oneparcheckboxes environment in exam.cls. The only difference is that since the checkboxes gives circle, i'd like to create ...
10
votes
1answer
768 views

Box or sidebar for additional text

I'm not sure of the name of what I need. I would like to set some text in a box or sidebar, as I've seen in some textbooks. The main text will refer the reader to the sidebar for more details. I would ...
4
votes
2answers
1k views

Removing an “Overfull \vbox” message caused by a nested table

I am trying to typeset a nested table, like this: \documentclass{article} \usepackage{bigstrut} \usepackage{multirow} \begin{document} \begin{tabular}{|lll|} \hline A & \multirow{2}{*}{ ...
7
votes
4answers
296 views

Function determining the length of text, usable where something with internal units (e.g. “em”) is expected

Is there a way to define a function \horizontallengthof returning the length of a piece of text in internal units? I would like to be able to use it anywhere where something of that sort is required, ...
4
votes
2answers
130 views

How can I set the color of an \sbox / \usebox?

In the following code, I want to produce a coloured shape, for example a \rule{1em}{1em}. If I use the \rule as is, it works as expected. However, putting it in an \sbox somehow breaks colouring and I ...
0
votes
0answers
37 views

Create two small box after text? [duplicate]

how should i declare a command for two small boxes after text in every line? based from this link Create a two column static small box. I need to remove the automatic printing of its numbers. What ...
5
votes
2answers
554 views

hf-tikz doesn't box around equation

In TikZ based \boxed construct is causing pdflatex to hang it was suggested to use hf-tikz instead of manually using tikz. The documentation indicates that this package doesn't work properly for tall ...
3
votes
2answers
119 views

Why does xcolor not like \fbox (or vice versa)?

This document would not compile and a rather cryptic ! Illegal unit of measure (pt inserted) pops up. Here's the MnWE: \documentclass{article} \usepackage{xcolor} \renewcommand{\fboxrule}{0.9pt} ...