Jürgen Spitzmüller wrote:
Jürgen Spitzmüller wrote:
Russ, Paul,
how about the attached? It fixes the problem Paul reported. Is that a
formatting you both could live with?
Ping!
Jürgen
Jürgen,
I tweaked your patch slightly. Attached is my patch against the copy of
amsmaths.inc that shipped with LyX 1.5.5. I don't have any version of
1.6, so I can't patch against that. Can you take care of that and also
the corresponding patch against trunk?
Brief summary:
* this uses your fix to the margin violation problem in Russ's original
patch(es);
* Russ had switched the GUI label font to italic (to match output) -- it
was missing from your patch, but I added it back;
* I made the label punctuation in the GUI period rather than colon,
again to match output.
I tested it against a test document I wrote a while back (the one that
found Russ's margin problem). Looks ok to me.
There seems to be no definite standard for labeling cases, so I suppose
someone will be unhappy down the road. The only remaining issue I can
see is that cases are not numbered in the GUI; we use a static label
with '#' as a placeholder for the actual case number. I can't find a
way to fix that unless the current Benevolent God of Layouts decides
either to fiddle the Enumerate label type to allow a text prefix (such
as "Case ") or to fiddle the label counter stuff so that a counter can
be declared to reset each time the environment is begun again. The
former seems easier, but if this is the only place it would be useful,
I'd vote for living with "Case #." as the label.
/Paul
--- C:/Program Files/LyX 1.5.5/Resources/layouts/amsmaths.inc Sun Mar 09
08:36:34 2008
+++ C:/Documents and Settings/Paul Rubin/Application
Data/lyx15/layouts/amsmaths.inc Thu Jul 17 17:43:26 2008
@@ -615,11 +615,22 @@
LatexName caseenv
LabelType Static
LeftMargin "MMMMMMN"
- LabelString "Case #:"
+ LabelString "Case #."
+ LabelFont
+ Series Medium
+ Shape Italic
+ EndFont
Preamble
\newcounter{casectr}
\newenvironment{caseenv}
- {\begin{list}{\bfseries\upshape Case
\arabic{casectr}:}{}\setcounter{casectr}{0}\usecounter{casectr}}
+ {\begin{list}{{\itshape\ Case} \upshape\arabic{casectr}.}{%
+ \setlength{\leftmargin}{\labelwidth}
+ \addtolength{\leftmargin}{\parskip}
+ \setlength{\itemindent}{\listparindent}
+ \setlength{\itemsep}{\medskipamount}
+ \setlength{\topsep}{\itemsep}}
+ \setcounter{casectr}{0}
+ \usecounter{casectr}}
{\end{list}}
EndPreamble
End