Questions tagged [varwidth]

A package that defines a {varwidth} environment (based on {minipage}) which is an analogue of {minipage}, but whose resulting width is the natural width of its contents.

Filter by
Sorted by
Tagged with
3
votes
1answer
192 views

Determine natural width of align*: varwidth uses \linewidth even though display is correct

In an earlier question, align* in varwidth seems to ignore fleqn option, it appeared as if align* was not being properly handled by the varwidth environment. A "fix" was provided which results in the ...
15
votes
2answers
28k views

Align minipage to baseline of first or last line inside minipage?

The minipage environment has options for making the top, bottom, or center of the minipage box line up with the baseline of the surrounding text. Is there a way to make it line up to the baseline of ...
3
votes
1answer
104 views

align* in varwidth seems to ignore fleqn option

I am using the \documentclass option [fleqn] (which I think is identical to \usepackage[fleqn]{amsmath}). This seems to work fine, except when using an align* within the varwidth environment: Notes: ...
28
votes
2answers
18k views

How do I set a maximum column width?

My problem is that I have many tables in my document with the same layout, and I want to specify the maximum width of a specific column to be 5 cm. I tried with p{5cm} but it make the column fix 5 cm ...
7
votes
3answers
2k 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 ...
3
votes
1answer
548 views

Follow-on to tabulary + longtable + captioning

I was able to use the coding provided by Justibus: Several caption problems in longtable and tabulary. What my question is - now that i've been able to make my table wrap columns and break over ...
7
votes
1answer
271 views

Microtype does not work inside varwidth

I make a template for different texts and I need to use varwidth. But it seems microtype doesn't work inside this environment. Is there any way to make it work? \documentclass{book} \usepackage[...
2
votes
2answers
1k views

Caption package destroys center/varwidth

I have received a wonderful comment how to get listings centered: \documentclass[a4paper]{book} %\usepackage[hang,small,it,hypcap=true]{caption} % screw hypcap \usepackage[T1]{fontenc} \usepackage{...
1
vote
0answers
57 views

Determine value of overfull amount

If I set content into a box that is not wide enough (0pt in the MWE below), I get an overfull mesage displayed in the console. Can I obtain the maximum value reported in the messages Overfull \hbox (...
1
vote
1answer
151 views

`gather` Environment Does Not Work with `minipage`

I have been using minipage environment with displayed equation environments align* and gather*. The align* environment works fine with minipage but does not work well with varwidth. Code1: \...
1
vote
1answer
352 views

problem with varwidth package

I had a book that contains the varwidth package. Until now everything was OK, but finally this error appeared: Sorry, but "C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe" did not ...
1
vote
1answer
484 views

minted Environment Inside varwidth Environment

Is there a way to incorporate a minted environment inside a varwidth environment? I have colored backgrounds for code snippets, and I did manage to put a minted environment inside a minipage, based on ...