{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

10
votes
3answers
6k views

Sample example of box in latex

Could someone make this picture in sample code in LaTeX and please make it in different style with different colors. Here is my attempt: \fbox{ \parbox{\linewidth}{ This example will show ...
6
votes
1answer
66 views

Reflowing marginpars typeset using pdfsavepos

I'm trying to typeset marginpars more accurately on the correct side of the page using a solution based on pdfsavepos by David Carlisle. (The code below is a slight alteration of it.) I got most of ...
5
votes
1answer
29 views

storebox doesn't work before begin{document} like normal savebox

One can use storebox package to save space. For example, I will expect that this works as it is similar to the use of savebox. However, it does not. One needs to move the \storebox{\foobox}{FOO} ...
131
votes
2answers
27k views

What are the different kinds of boxes in (La)TeX?

I've seen hbox, vbox, mbox, parbox and others used in various code samples. What are the different kinds of box in (La)Tex? Which are suitable for use in LaTeX, as opposed to plain TeX?
1
vote
1answer
24 views

Render content normally, then wrap into box of given size, letting text stick out to the right

With komascript and geometry I made a page layout such that I can render a logo at the top right of every page simply with \ohead{\hfill\usebox{\rtlogo}} except that this pushes the logo only out ...
1
vote
1answer
27 views

Textbox of arbitrary shape [duplicate]

Textboxes are rectangles which can contains text and other stuffs. I was wondering if there is some package that allows to create textboxes with arbitrary shapes. I mean, can I obtain something like ...
1
vote
1answer
28 views

How to create boxes within columns (Beamer)?

I need to have three columns and the text within each should be enclosed in a box. below is my code, but it is not working: \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{calc} ...
3
votes
2answers
105 views

Wrap a few lines of Algorithmic in a box

I have some pseudocode where I want to reveal an algorithm little-by-little. Currently I highlight the code that is revealed by coloring it red and this looks good onscreen. However, on print, this ...
0
votes
1answer
45 views

Boxed equations and arrows

I would like to implement this into an align-environment (or equivalent) how can I do this? I tried with boxes but the structure is rather complicated since I want a large box on the left-hand ...
1
vote
1answer
35 views

tikz mdframed environment: lemma/excursus skips pages

I used the example code under this link [TikZ mdframed environment: close box at end of page and continue on next to successfully create a nice excursus section in an a4 onesided environment. However, ...
4
votes
1answer
122 views

How to make this particular type of box?

I need this type of command. Someone can help me? I do this with tabular and some negative space but it is very difficult to work like this.
1
vote
1answer
50 views

How to write text that takes up no space? [duplicate]

How does one write text such that whatever comes next is placed as if the text had not been written? Edit: More specifically, I would like to place text in the top-left corner of a tikzpicture by ...
1
vote
0answers
36 views

Box with fancy colors

Does anyone know how to create these? I think they made it by using tcolorbox but I can't find a way to generate them.
2
votes
1answer
50 views

“Underfull \vbox while \output is active”, adjusting stretch/shrink does not make the error vanish

I intend to use the sidenote package along with David Carlisle's implementation of \marginpar based on \pdfsavedpos from the answer here: http://tex.stackexchange.com/a/52436/44160. I've simplified ...
2
votes
1answer
34 views

Background color of the block of text

I want to have something like given in the picture. Borders above and below of the box are optional. I tried \colorbox, but it doesn't work. \documentclass{report} \usepackage{color} ...
5
votes
1answer
124 views

Bottom margin not respected with tikz and verticaly centered boxes

I've been working on making a Cards Against Humanity clone in TeX and have everything but this one last bit working. The text on one card is long enough that I need to stick the logo/game name on the ...
7
votes
1answer
238 views

How can I fill vertical spaces with dotted horizontal lines?

I'm sure this must be a duplicate, but I can't find it. I'm preparing a worksheet for students to use when starting to work on an assignment. Here is a (naturally sweetened) version of the code: ...
5
votes
1answer
45 views

Unused \setbox0 in beamerbasedecode.sty

Inside the source file beamerbasedecode.sty of beamer package, there are the following lines: \def\beamer@stoptexts{| stop:0| } { \catcode`\|=13 \catcode`\:=13 \catcode`\,=13 ...
4
votes
2answers
32 views

How can I set contents in a box of zero width and specified height, optionally rotating, using expl3 syntax?

Using Steven B. Segletes's answer, I can centre something horizontally, optionally rotating it, using \centering \makebox[0pt]{\rotatebox{<angle>}{<contents>}} \par However, I would ...
2
votes
2answers
36 views

forcing vertical size of savebox to equal page height

Is there a better way of generating a \savebox whose dimensions are equal to the paper dimensions than sticking in a \strut of length equal to the page height (width is an argument to the \savebox ...
1
vote
3answers
75 views

How to add a framed box inside a paragraph?

I'm using little markers in some parts of my text and I wanted to add one of those to a paragraph entitling a list: \newcommand{\hip}{{\color{BlueViolet}\framebox[1.1\width]{HIP}}} ...
10
votes
3answers
11k 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} ...
2
votes
2answers
46 views

How to box aligned equations

\boxed{ \begin{align*} x &= 1 \\ y &= 1 \end{align*} } obviously doesn't work/compile.. \begin{framed} \begin{align*} x &= 1 \\ y &= 1 \end{align*} \end{framed} sort of work, but ...
3
votes
1answer
62 views

TeX expert needed: how to \setto(optimal)width?

there is a problem I have been trying to solve for a while but without success so far. As far as I know, TeX is very good at appropriately breaking text lines with respect to a fixed container width. ...
4
votes
1answer
85 views

How to handle box creation inside a question of AMC when shuffled

I am doing a follow up on How to expand a macro to use it inside a question in AMC?, as suggested by @Steven B. Segletes, so the question can be answered. Context I'm trying to use AMC to produce an ...
6
votes
2answers
136 views

Vertically align text to graphic

At first this might look like a duplicate, but I couldn't find any solution, although I tried various (combinations of) vspace, minipage and box-commands. Situation: I have some pictures (all have ...
8
votes
1answer
5k views

Beamer: highlighting aligned math with overlay

This question led to a new package: hf-tikz Minimal working example: \documentclass{beamer} \usepackage{amsmath} \begin{document} \begin{frame} \begin{align} a_i + b_j = 10 & ...
1
vote
1answer
56 views

add frame to matrix [duplicate]

I want to enclose my matrix by a box. I have followed the instructions in this link but couldnt get the borders correct. Here is how the frame looks like and the code. \begin{frame} ...
3
votes
3answers
1k views

How to create a keybutton in latex? [duplicate]

Possible Duplicate: Keyboard Font for LaTeX So the result looks like: Press F5 for help. I've checked the fancybox package, but it only includes three patterns: doublebox, ovalbox, ...
3
votes
1answer
34 views

How do you make a tight box using \begin{framed} and how do you skiplines in it?

I cant fit a tight box using this code: \begin{framed} \begin{flushleft} \# Description of the data \\ summary(training) \end{flushleft} \end{framed} and I dont manage to skip lines. Can anyone ...
3
votes
1answer
76 views

How to fit title and author into footline of the CambridgeUS beamer theme

I am writing a presentation using a beamer theme; the code I wrote is this: \documentclass{beamer} %\documentclass[handout]{beamer} % THIS PUTS TWO SLIDES ON EACH PAGE %\usepackage{pgfpages} ...
4
votes
2answers
52 views

Resizebox within equation environment

How does the resize command work with the equation environment? The following code results in an error. \begin{equation}\label{model3_coef} \resizebox{0.91\hsize}{!}{y_{t}^{3} = -145.071 - ...
12
votes
1answer
3k views

how to draw a container box in latex around automata?

This is my tikz code : \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,shapes.geometric,arrows,fit,calc,positioning,automata,} \usepackage{amsmath} \begin{document} ...
3
votes
3answers
92 views

Placeholder with hint for handwritten text

How can I typeset form with hint which will flow nicely with other text in paragraph? Approximate sample of what I'm trying to achieve is like this
5
votes
1answer
65 views

Automatic box packing

I have a number of say, subfigures, of varying shapes and would like to waste less space displaying them; their order doesn't matter, and rather than having them all lined up on the same baseline I ...
2
votes
2answers
170 views

How to leave horizontal mode?

There is this question: How do I leave horizontal mode? - but there is no answer no how to leave horizontal mode. I know there is a command \leavevmode (Function and usage of \leavevmode); the post ...
13
votes
1answer
230 views

How to show keys (ctrl, alt, …, etc.) as fancy as StackOverflow? [duplicate]

In StackOverflow, I can show keys like this: ctrl + alt. How to do the same things in LaTeX?
0
votes
0answers
43 views

\hphantom behaving like \mbox, not like the counterpart of \vphantom

I have the following figure as part of a slideshow I'm writing with beamer. If it is relevant, I've used pst-jtree (which is essentially a bunch of macros over pstricks) to produce the tree branches. ...
15
votes
4answers
3k views

Drawing boxes around words

I want to put some small boxes around certain words in a paragraph. The boxes will never contain more than one word. The \ovalbox command described in the fancybox documentation is close to what I ...
1
vote
2answers
24 views

Save a longtabu in a box for check and reuse

I want to measure the height of a table and insert a \newpage before it if the table is too high. My table is done with longtabu of the tabu package. Where should I start? \documentclass{article} ...
8
votes
1answer
135 views

microtype, listings and lrbox: What in the world is going on here?

The image says it all: I'm not sure what's going on, but it seems that microtype "breaks" the lrbox hack for coloring \lstinline. The code is here: \documentclass[a4paper]{article} ...
1
vote
1answer
57 views

Boxed text inside tcolorbox tcblisting?

I am writing a text which includes lots of programming snippets which I've put into environments which use tcolorbox/tcblisting: \usepackage[pdftex]{xcolor} \definecolor{vlgray}{gray}{0.9} ...
7
votes
4answers
830 views

A \boxed alternative with minimal spacing?

The following code comes from this post. The problem is that I would like a way to automate the size of the box so as to be very small with a few of spacing, but the following solution doesn't work ...
8
votes
2answers
2k views

How to make a box containing LaTeX output?

I am writing a short introductory book on LaTeX and I would like to implement nice looking code example boxes. Using this answer: Source code listing with frame around code? I made the boxes with the ...
1
vote
1answer
44 views

position punctuation after a box

In this document I think the period would look better horizontally aligned with the floor of the box. Perhaps it should be bolder, too. If you think the alignment is right as is please say so. Edit: ...
2
votes
2answers
80 views

How to customize boxes?

I want make block in my document like javadoc method description (see figure) I have wrotten a macro: \def\makemybox{% \noindent% \fcolorbox[HTML]{9EADC0}[HTML]{F9F9F9}{% \makebox[\textwidth]{% ...
8
votes
1answer
52 views

A problem on realboxes: unexpected vertical space

I had sent an e-mail to Martin, and I have not received reply from him. Compare the codes \documentclass{article} \usepackage{tikz} \usepackage{realboxes} \begin{document} The above line ...
2
votes
1answer
75 views

LaTeX style boxes

I need to create this: I have a LaTeX file with this code, but I can't use styles to file with text: \newlength\sidebar \newlength\envrule \newlength\envborder \addtolength{\voffset}{-0.7in} ...
0
votes
0answers
30 views

How to put the footnote texts on the footnote when wrap text with a box

I tried the following code but the footnote text is wrapped into the box. Anyway to put the footnote texts on the footnote of the page? \documentclass{article} \usepackage[framemethod=tikz]{mdframed} ...
4
votes
3answers
168 views

How to make a framebox around paragraph title

I would like to have a framebox around some paragraph titles. Something like the diagram below. I would like the framebox to have a background color (e.g. cyan), round corners, and shade if possible. ...