I've been doing some work on a layout sheet for my workmates (assuming that I
can persuade them to start using LyX!) which involves a box environment - the
idea is that your text appears in a centred box (which is something we do a
lot). What I have so far works OK, but the next Standard paragraph comes out
on the same line as the box, so I need to kludge it by put in a blank line
with a protected space. Is there a more elegant way to do this?
The relevant parts of the layout file are as follows:
# Box style definition
# Adapted from a style by Herbert Voss
Style Box
Margin Static
LatexType Environment
LatexName myBox
NextNoIndent 1
LeftMargin m
RightMargin m
TopSep 0.5
ParSep 0.5
BottomSep 0.5
Align Block
AlignPossible Block, Left, Right, Center
LabelType No_Label
Font
color blue
EndFont
#define the environment myBox
Preamble
\newenvironment{myBox}{%
\noindent%
\begin{lrbox}{\@tempboxa}%
\begin{minipage}[t]{0.5\columnwidth}%
}{%
\end{minipage}%
\end{lrbox}%
\fbox{\parbox{0.5\columnwidth}{\usebox{\@tempboxa}}}%
\vspace{0.5ex}
}%
EndPreamble