On Friday 18 May 2007 08:07, Helge Hafting wrote:
> Steve Litt wrote:
> > Hi all,
> >
> > All my books contain, interspersed throughout regular text, boxes
> > breaking out special stuff. The boxes are centered and have slightly
> > narrower margins than the rest of the text. Each box has a large box
> > title on the top line, and the text of the message to the reader in the
> > rest of the box. Titles are often things like NOTE, TIP, WARNING,
> > CAUTION, but often are completely ad-hock text, which is why I can't
> > simply create an environment for each.
>
> Well - do you need latex code at all? LyX supports boxes
> directly, and you can use a normal heading inside the box.
> The box can of course be centered.
>
> Or do you need something that insert->box don't offer?

Thanks Helge,

I didn't even know Insert->box existed. That's gonna save me a lot of time on 
shorter documents.

Now to answer your question...

My box has all these features that Insert->box doesn't give you (natively):

* Narrower text width than body text
* A background color
* A large, bold, centered title
* Different formatting for the box text (in this case ragged right)

One could probably fine tune all that each time, but... Or one could make 
environments for the title and text, but then why not just have those two 
environments do the whole job.

Also, from a conceptual viewpoint, any time you have type of content that 
serves a special purpose, you should probably have a style for that type of 
content so that, in the future, if you want to change the appearance of every 
occurrence of that type of content, you just change your layout.

On that subject, the "working version", of those environments, which I used in 
first-drafting the book, didn't use a minipage -- it just narrowed the text 
and put lines above and below the "box". I wrote the book like that, and then 
at the last minute, took the time to convert the style to print in a shaded 
minipage, and all my boxes became shaded and quit page breaking at bad 
places.

Thanks

SteveT

Steve Litt
Author: Universal Troubleshooting Process books and courseware
http://www.troubleshooters.com/

Reply via email to