{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
39 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
24 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
228 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
43 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 ...
3
votes
2answers
28 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
33 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
43 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
60 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
117 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
59 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
42 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
84 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
54 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
61 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
84 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
165 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
225 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
40 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
19 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
54 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
26 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
78 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
74 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
23 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
151 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
120 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
69 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
44 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
132 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
130 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
156 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
474 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
102 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
36 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
40 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
192 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
242 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
80 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 ...
4
votes
1answer
131 views

Nice title highlighted

I would like to construct a title highlighted by two horizontal lines look like the picture below: To add it to the front of document I have the following segement of code, for example ...
6
votes
1answer
64 views

write the content of an hbox in an auxilary file

I know that TeX can't write the content of hbox in an auxiliary file (Re-parse the content of a box register). That mean that \newwrite\foo \immediate\openout\foo=\jobname.txt \setbox0=\hbox{bar} ...
6
votes
1answer
69 views

vbox of 0 height still adding margin

There is this box that I want to place next to a description list. It should not affect the list itself. I'm using an mbox and within the mbox a vbox with a height of 0. However, it still pushes the ...
1
vote
1answer
29 views

How can I move my fcolorbox underneath a description list label?

I have a description list. In this list, I have the label name, which should have a score underneath (say in a box with a colored background). Then next to it should be the description. So far, I have ...
1
vote
1answer
117 views

Difficult mdframed example

I want to do this mdframed model: Which is the example 6 of the page 21 and 22 of this pdf: http://texdoc.net/texmf-dist/doc/latex/mdframed/mdframed.pdf My question is if it is correct or not, ...
9
votes
2answers
204 views

What's the difference between ~ and {\mbox{$~$}}

I'm looking at the source code of a book where I found: D.{\mbox{$~$}}Knuth What's the purpose of this?
4
votes
4answers
87 views

Colored box with image and text, no margins

I would be extremely grateful to get some help with this following problem: I would like to have following outcome: Where the grey box is all the way out in the margin, but the image and the rest ...
0
votes
0answers
45 views

Strange overfull error in texmaker

I am getting a strange error related to an overfull line. Here is a stripped down version of my code. \documentclass[11pt]{article} \usepackage{amsmath, amssymb} \usepackage[mathscr]{eucal} ...