{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

8
votes
1answer
159 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
173 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
547 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
107 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
46 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}{% ...
0
votes
1answer
72 views

Cut off text hight than a given value

Is it possible to have a text box which cuts of text running out of its height? Considering the following minimal working example, I would like to have the text in the first parbox to be cut of as ...
5
votes
1answer
233 views

Vertical spacing between parboxes

I'm using \parbox for creating a flexible table-like structure of paragraphs as in the following minimal working example: \documentclass[a4paper]{scrartcl} \usepackage{polyglossia} % ...
3
votes
1answer
50 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
259 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
263 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
111 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
176 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 ...
3
votes
1answer
113 views

Hyphenation/text wrapping in \parbox

I have a \parbox with some text. The text should be wrapped as normal, but it doesn't seam to work, while the words wrap in normal text: \documentclass[a4paper,parskip]{scrartcl} ...
6
votes
1answer
70 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
130 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
33 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
186 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
244 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
2answers
263 views

Tikz: Creating a rectangle with a fake \parbox

In the example below, I am trying to get identical blue and red boxes, without any text in the red one. I would like to have the red box exactly identical to the blue one, whose size depends on the ...
4
votes
4answers
164 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
88 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} ...
1
vote
1answer
74 views

How to make a custom legend with a squared box followed by a text?

I'm trying to make one of that legends that we can find in some graphics such as bar plots. Just to clarify, I'm not displaying a plot. I have to present a schedule, which is defined trough a ...
2
votes
1answer
52 views

boxes are in the same order in a column

I want to draw boxes as in the picture, but the same order. So i create a table and i add the boxes in the columns of the table but it did not work. Also, I do not want that the texts on the arrows ...
1
vote
2answers
66 views

Balanced Text Wrapping in \parbox

Is there a possibility to balance the lines if a text has to be wrapped in a \parbox? \documentclass[a4paper]{scrartcl} \usepackage{polyglossia} \setmainlanguage{english} \begin{document} ...
4
votes
2answers
146 views

frame more than 1 equation (but not all) of an align environment

I think the question is self-explanatory. I have an align environment with four equations and I want only the last two of them framed in a single box. So not separately framed. If I try to achieve ...
4
votes
2answers
174 views

Color-filled box in text area with size corresponding to font size

Is it possible to construct a small, color-filled box in text among ordinary text? The size of the box should correspond to the font size. I need it because I need to construct a legend for some ...
4
votes
1answer
116 views

Box environment created with frame box

I am creating the box environment using packages environ and float. But I will try to put the \BODY part after the caption and also try to fix the "framebox environment" by using \fbox{} command. ...
3
votes
2answers
97 views

Boxed caption and figure, with colored caption

I'm trying to recreate a figure and caption effect from a journal. An example of it can be seen on PDF version of Figure 1 from this article: It's basically a large grey bordered box that goes ...
2
votes
2answers
169 views

how to draw a text box with shadow Borders, i have tried the following but it give error

how to draw a text box with shadow Borders, i have tried the following but it give error \fbox{ \begin{minipage}[c]{5in} \shadowbox{\large\bf text write here} \end{minipage} }
4
votes
0answers
114 views

Border control for LaTeX tables generated using TeX4ht

In producing simultaneous pdfs and html/word files using xelatex and TeX4ht I have noticed that the table produced by TeX4ht is kind of illogical and is clumsy to clean up and manipulate. I would ...
0
votes
0answers
44 views

Solving underfull warnings “the general way”

I finished writing my LaTeX template, which I now fill with data I retrieve from a database. I am yet struggling with fixing underfull/overfull warnings, I have plenty of them, especially in tabulars ...
1
vote
1answer
82 views

Placing Vbox es

I am writing a text using LaTeX. I want my test to be 2-columned. I have done this using multicols environment. My question's text and its choices mustn't be splitted by a page break, or column break. ...
2
votes
1answer
131 views

New Box environement created follow all aspects in figure

I try to create the box environment and all figure future to be included in the box environment like (BOX - single column, BOX* - double column, placemnt - [tphb], and seperate auto box label counter ...
0
votes
0answers
50 views

Problem with length of psshadow box

I am using the a0poster environment and I am trying to create a psshadow box that has the same length with the document. I am using the following code: \documentclass[landscape,a0,final]{a0poster} ...
3
votes
1answer
130 views

LaTeX equivalent of \wd [closed]

Please consider the following code: \newsavebox{\mybox} \savebox{\mybox}{some text} \newlength{\widthmybox} \settowidth{\widthmybox}{\usebox{\mybox}} Is \widthmybox then equivalent to \wd\mybox?
4
votes
2answers
175 views

Pleasing line breaks with extremely long words that must fit on the page

I'm typesetting some technical documentation that includes identifiers with very long names. It is unacceptable to break or hyphenate these names because that would look confusingly like juxtaposed ...
9
votes
2answers
124 views

How to define a command that produces a different savebox depending on the argument

I'd like to define a sequence of saveboxes \fooA, \fooB, etcetera, in a style file and introduce a command like \newcommand{\foo}[1]{....} which produces \usebox{\fooA} if the argument of \foo is 1, ...
5
votes
2answers
129 views

Preserving font size in scalebox

I'm using a scalebox around a picture. There's text inside it. I'd like the text size to keep constant even if I change the scale factor. \scalebox{0.5}{ \begin{picture}(360,255)(0,0)% ...
3
votes
1answer
196 views

Maintaining text colour change in a breakable tcolorbox

I try to maintain the current text colour in breakable boxes from tcolorbox, but the manual clearly states (see manual of the current version, section 15.2, page 292, version 3.34) • If your text ...
4
votes
1answer
80 views

Add vertical space before a line

I have the following code: \documentclass[12pt, a4paper] {article} \usepackage[T1]{fontenc} \usepackage[english]{babel} \begin{document} \vspace*{1cm} \begin{center} \textbf{Text of ...
1
vote
1answer
89 views

Avoid underfull \vbox with page number “inside textblock”

My thesis requirements state that the page numbers must be "centered at one inch from the bottom of the page." All the margins are to be 1 inch and nothing can be printed in the margin area. I have ...
6
votes
3answers
227 views

Build a box that starts after next line break

I have reason to insert notes in-text in boxes. I defined the following command for doing so: \newcommand{\Lnote}[1]{% \textsuperscript{\footnotesize{\thelnote}} \begin{center} ...
23
votes
3answers
910 views

Make fireworks with only text

For the holidays, I wanted to follow up to the question about making fireworks with tikz (How can we display fireworks?): How can we make fireworks with only text? I have made a crude attempt below. ...
6
votes
1answer
216 views

Recursion of unknown origin: TeX capacity exceeded, sorry [input stack size=10000]

For some reason, there's a recursive definition in this MWE. Who can find where it goes wrong? \documentclass{article} \usepackage{xcolor} \usepackage{titlesec} \usepackage{tcolorbox} ...
4
votes
1answer
57 views

How to get a centered colored box

I want to create a centered colored parbox, but although I defined boarders using package geometry, the parbox has a greater margin left than right. Thanks for help ...
10
votes
2answers
134 views

Is \c_empty_box intended to be used instead of \mbox{}

At a first glance, I understood \c_empty_box as a replacement of \mbox{} but the following MWE (that points out a weird behavior of \c_empty_box: it is replaced by "æ") gives me serious doubts. ...
5
votes
3answers
209 views

How to make a fixed height-width box with custom padding

I am new to latex, I am trying to include output of TI84 calculator in my document. It is supposed to look like this: Following is what I am able to make. My output's height and width arrange ...
4
votes
2answers
137 views

Uneven spacing between parbox

I have uneven vertical space between two parboxes and between a parbox and beginning of a new text paragraph. How to fix these? Here is a minimum working example. \documentclass{article} ...
2
votes
1answer
128 views

Measure distance from text to bottom margin

I'm making some boxes for providing answers. The box macro takes the height of the box as an argument. I need to measure the remaining space from the line the box starts at, to the bottom of the page. ...
7
votes
1answer
162 views

how to use fbox in align mode

I'm trying to highlight the diagonal elements of a matrix by using fbox but I failed. I've searched for the problem, some ppl suggest using tikz. I don't want to use it, so I decided to use fbox{}. ...