Hi all,

I want to put a title and text inside a box, probably a bordered or shaded 
minipage. The title is defined by the LyX document's author when he's writing 
the content.

I could just ERT \dev\boxtitle{This is my latest title}, and then have the 
\boxtext environment print \boxtitle at the top. However, that would require 
ERT, and the boxtitle text would not show up in the LyX document itself.

So what I'd rather do is somehow have a \boxtitle ENVIRONMENT and a \boxtext 
environment, such that the box is properly printed with the title text at the 
top. This would look good in LyX and the finished product, and would not 
require the author to insert any ERT. Unfortunately, I don't know of a clean 
way of doing it.

As an ultimate kludge, I could do something like this:

\newenvironment{boxtext}{~\vskip 1in}{~\vskip -1in}

That would print the title an inch too low, after which the boxtext 
environment could leave its top 1 inch blank, and it would show the title at 
the top :-) :-) ;-)

I could have two different miniboxes -- one for the title and one for the 
text. If I have a border, that will split the two, so that's no good.

I tried this:

\newenvironment{callouttitle}{
        \begin{minipage}{3in}
}{
}

\newenvironment{callouttext}{
}{
        \end{minipage}
}

Of course it gripes like this:

! LaTeX Error: \begin{minipage} on input line 21 ended by \end{callouttitle}.

I know it can be done because a lot of LyX environments do similar stuff. How 
can it be done?

Thanks

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

(Legal Disclaimer) Follow these suggestions at your own risk.

Reply via email to