2
votes
1answer
79 views

Rescale paragraph to fit margins or detect used width of paragraph

I want to write a command or similar that allows me to rescale a given paragraph to fit a given frame, keeping the aspect ratio. The problem is that the paragraph is usually manually set and not ...
7
votes
3answers
252 views

Make box with minimum width (in math mode)

How can I give a box a minimal width, in math mode? That is, I would like a command something like \minwidth{exp}{width}, which will always typeset exp, but additionally, if the natural length of exp ...
5
votes
1answer
82 views

Stretching an \fbox horizontally to fit the page

I have a frame box next to some text (Komentar:), and I would like to stretch it so it fills up the page. I've done this using the calc package by subtracting \widthof{Komentar: } from \hsize (or ...
4
votes
3answers
101 views

Set default width of \shadowbox to line, not column, width

When I insert a shadowbox using Lyx (Insert>Box>Drop Shadow) the width is specified as 100% of column width (1\columnwidth). This is the source code it generates: ...
8
votes
1answer
85 views

Minipage width not acurate

I have the following document, with several minipages of 12cm width. Each minipage contains a different number of minipages (with a sum of 12cm for all of them). So every *sub*minipages should fit ...
9
votes
3answers
148 views

Box with adaptive length

When I want to put formulas into boxes, I like the box to adapt to the length of my formula. For example, I don't want to put $1+1=2$ in a very large box. To address this, I use the command \encadrer ...
5
votes
1answer
385 views

Break box (a long caption) over pages

I want to have text of a certain width less than the page width, which goes across several pages. Normally you’d put text into a (\par)box to set its width but these boxes cannot be broken across ...
2
votes
2answers
669 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 ...
4
votes
1answer
1k views

Calculate parbox width to make it meet the page border?

I'm using the program package to typeset my algorithms. I want my comments to have a light gray background, therefore I'm using colorbox with a parbox inside (for multi-line comments). Now the ...
4
votes
2answers
1k views

\parbox “textwidth” for the combined width of a subset of table cells

I would like the parbox width of the text in a multicolumn to be calculated automatically from the combined width of the cells that the multicolumn spans. (Their width will vary in different copies of ...
4
votes
3answers
454 views

Restricting the length of a line of text while allowing line breaks

While attempting to answer this question, I re-read Chapter 14 of The TeX Book (on how TeX breaks paragraphs into lines). It got me thinking: Is there a way to restrict the length of a string of text ...