{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
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
26 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} ...
0
votes
1answer
44 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 ...
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.
5
votes
1answer
61 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 ...
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 ...
3
votes
2answers
103 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 ...
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} ...
7
votes
1answer
237 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
31 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 ...
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. ...
6
votes
2answers
133 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 ...
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
49 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 - ...
3
votes
3answers
91 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
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} ...
5
votes
1answer
64 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 ...
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 ...
2
votes
2answers
169 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. ...
1
vote
1answer
23 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
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} ...
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: ...
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, ...
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} ...
2
votes
2answers
79 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
28 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
166 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. ...
3
votes
3answers
123 views

How to add extra space inside of a table

I wrote a simple table with this commands: \begin{table}[h] \centering \begin{tabular}{| c | c |} \hline\hline \multicolumn{1}{ |c| }{Parametro} & \multicolumn{1}{ c| }{Espressione} \\ \hline ...
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}}} ...
3
votes
1answer
45 views

Length space on parbox

I am trying to build a table on LaTeX with Parbox. I have found how to do with \parbox. However, the length between rows makes the text so pack. Do you know how to increase the length? I have tried ...
4
votes
3answers
137 views

\hfill \break does not work

I have following text chunk: \colorbox{gray}{[862401.693536] sd 2:0:0:0: [sdb] Write Protect is off\hfill \break [862401.693548] sd 2:0:0:0: [sdb] Mode Sense: 45 00 00 08\hfill \break [862401.700884] ...
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} ...
4
votes
1answer
158 views

Equally distribute text among a given amount of lines; automatically adjusting the width

Given some text, I want to centrally align this text on a given amount of lines. For example, \documentclass{article} \begin{document} Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, ...
9
votes
3answers
493 views

Drawing LaTex boxes

I want to write something like in the attached file. In particular I want the box to be flexible in such a way that it can contain the text -- both in the small box and the bigger one. Any help ...
2
votes
1answer
105 views

How to Nest Proofs in a Useful Way

I am using amsthm and amsbook and nesting claims and proofs. I would like to have two things: 1) Proofs that are in a deeper layer should be indented. 2) There should be a semi-box (only left and ...
1
vote
1answer
39 views

BOX name changing

I am unable to change the box name using flotrow.sty. Kindly advice Box 1 : should be changed to BOX 1 : MWE \documentclass{article} \usepackage{floatrow} \DeclareNewFloatType{Box}{% ...
3
votes
1answer
43 views

Write words within a certain length

I am looking for a way to write some words within a certain length, filled by space on the right side, so that I could align words without making a table. Image that there is a command to do so, ...
4
votes
3answers
201 views

Simplest way to get a colored rectangle behind text? [duplicate]

I'd like to display a grey rectangle behind text, so that certain parts of the text are more recognisable. I will do this to highlight problems' body. I found various packages, like fancytooltips or ...
5
votes
5answers
248 views

Boxes automatically sized to reach end of line?

I'm setting up a little test, which includes empty boxes for students to write their answers. The boxes start at different places on the page, but I'd like - for neatness - each box to reach to the ...
6
votes
1answer
84 views

Command to fill paragraph with repeated text (alignment/spacing problem)

I am trying to define a command \todopar[dummy]{msg} that fills a paragraph with dummy repeated a number of times and msg typeset centered in the paragraph. The end result should look like this ...