Could anyone help me?
Thank you a lot.
--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To post to this group, send email to latexus...@googlegroups.com.
To unsubscribe from this group, send email to latexusersgro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/latexusersgroup?hl=en.
--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To post to this group, send email to latexus...@googlegroups.com.
To unsubscribe from this group, send email to latexusersgro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/latexusersgroup?hl=en.
--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To post to this group, send email to latexus...@googlegroups.com.
To unsubscribe from this group, send email to latexusersgro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/latexusersgroup?hl=en.
--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To post to this group, send email to latexus...@googlegroups.com.
To unsubscribe from this group, send email to latexusersgro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/latexusersgroup?hl=en.
--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To post to this group, send email to latexus...@googlegroups.com.
To unsubscribe from this group, send email to latexusersgro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/latexusersgroup?hl=en.
I played with this some, and there is something that I was not able to
do: to have more than one line in the label frame The text for the
label frame is put into an \hbox so that if there is too much text:
\begin{theorem}{This label just goes on for entirely too long to
be believed!}
it causes the entire frame to grow horizontally. Is there some way to
get the label text into a \vbox? I tried, but was getting odd
indentation.
Thanks
Stephen Moye
...
\fcolorbox{FrameColor}{FrameColor}{%
\vbox{%
\nobreak
\advance\FrameSep\errorsize
\vskip 0.625\FrameSep
\hbox{%
\hskip\FrameSep
\strut
\textcolor{TitleColor}{\textbf{#1}}
}%
}%
...
having deleted the colored \hrule, and knowing that I'd have to format
the text in the \vbox. Seemed logical, but I'm getting an error that I
can't "use \prevdepth in horizontal mode." That was a little
unexpected...
Help?
Thanks
Stephen Moye
\newcommand\LabFrame[2]{%
\parindent0pt%
\fboxrule=\FrameRule
\fboxsep=-\errorsize
\textcolor{FrameColor}{%
\fbox{%
\vbox{%
\nobreak
\advance\FrameSep\errorsize
\begingroup
\advance\baselineskip\FrameSep
\hrule height \baselineskip
\nobreak
\vskip-\baselineskip
\endgroup
\vskip 0.625\FrameSep%** Use to center text vertically
\vbox{%
\fcolorbox{FrameColor}{FrameColor}{%
\vbox{%
\leftskip\FrameSep
\rightskip\FrameSep plus 1fill
\strut
\textcolor{TitleColor}{%
\textbf{%
#1%
\vrule width0pt depth10pt%
}%
}%
}%
}%
}%
\nobreak
\nointerlineskip
\vskip 1.25\FrameSep%** Use to adjust distance after framed
text
\hbox{%
\hskip\FrameSep
\normalcolor #2%
\hskip\FrameSep
}%
\vskip\FrameSep
}%
}%
}%
}%
Suggestions, anyone?
Stephen Moye
Both of these look fine.
One caution, that goes back to a problem with the one I posted,
is that you can get funny widths when you use a wide title text
as part of \FrameCommand and also adjust the text width by
"\advance\hsize-\width". The intent is that \width indicates
the width added to the sides by the frame command, but if there
is a wide title, it may give a false \width adjustment.
One solution is to adjust \hsize like:
\MakeFramed{%
\advance\hsize-2\FrameSep \advance\hsize-2\Framerule
\FrameRestore}
Then the title will not influence the side-widths.
The title needed to be part of \FrameCommand in my original
because it was a REPEATING title. Since it is now used only
at the top, it doesn't need to be part of \FrameCommand,
as Kumaresh has shown. This is a good method.
Perhaps there should be a \@nobreaktrue before \begin{framed}
to ensure that \framed does not cause a page break between
the title and the body. Then a \needspace (from various
packages/classes) above the title would ensure there is room
for the title plus a bit of the body.
Donald Arseneau
\newcommand\LabFrame[2]{%
\parindent0pt%
\fboxrule=\FrameRule
\fboxsep=-\errorsize
\color{FrameColor}{%
\fbox{%
\vbox{%
\nobreak
\advance\FrameSep\errorsize
\vbox{%
\fcolorbox{FrameColor}{FrameColor}{%
\vbox{%
\vskip 0.625\FrameSep%** Use to center text vertically
\leftskip\FrameSep
\rightskip\FrameSep plus 1fill
\strut
\textcolor{TitleColor}{%
\textbf{%
#1%
\vrule width0pt depth10pt%
}%
}%
}%
}%
}%
\nobreak
\nointerlineskip
\vskip 1\FrameSep%** Use to adjust distance after framed text
\hbox{%
\hskip\FrameSep
\normalcolor #2%
\hskip\FrameSep
}%
\vskip\FrameSep
}%
}%
}%
}%