[Ipe-discuss] create white box (multiple lines) which adapts to the text width?

M Elwood151 at web.de
Thu Oct 27 10:21:53 CEST 2011


Dear Otfried,

> The obvious solution I can think of - make a label object and put:
> \colorbox{white{\begin{tabular}{l}line 1\\line 2\\line 3 is
> longer\end{tabular}}
thank you very much!
Seems, I'm not LaTeX geek enough to recognize a table as the obvious
solution for a multi-line environment, but you're absolutely right! ;-)
Thank you!

In the meantime I found solutions involving other packages like varwidth
which can create a minipage-like environment, that adapts its width to the
longest line:

see http://www.tex.ac.uk/cgi-bin/texfaq2html?label=varwidth
 
Thank you very much for your quick help!

Kind regards

Martin

> Von: Otfried Cheong <otfried at ipe.airpost.net>
> Organisation: Ipe Headquarters
> Datum: Thu, 27 Oct 2011 09:08:03 +0900
> An: M <Elwood151 at web.de>
> Cc: "ipe-discuss at cs.uu.nl" <ipe-discuss at cs.uu.nl>
> Betreff: Re: [Ipe-discuss] create white box (multiple lines) which adapts to
> the text width?
> 
> On 10/27/2011 04:00 AM, M wrote:
>> 
>> @Otfried:
>> thank you, yes that's exactly what I want:
>> Linebreaks are set manually and the width is adapted to the longest line.
>> 
>> (It's about labels which contain only 1..3 words to explain the different
>> parts of a photograph.
>> As the width of them shall not be "too long", I want to set linebreaks
>> manually.
>> And the white box in the background shall make them better readable.)
>> 
>> Any idea how to do that with LaTeX?
> 
> The obvious solution I can think of - make a label object and put:
> 
> \colorbox{white{\begin{tabular}{l}line 1\\line 2\\line 3 is
> longer\end{tabular}}
> 
> You may have to tinker with the spacing.
> 
> Cheers,
>   Otfried
> 
> 
> _______________________________________________
> Ipe-discuss mailing list
> Ipe-discuss at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/ipe-discuss




More information about the Ipe-discuss mailing list