[texhax] Continued from previous post...
James Smith
james.smith at aleph-one.com
Thu Mar 20 01:24:17 CET 2008
done it again (it's copying a pasting that does it)...
\addvspace\@topsep
\addvspace{-\parskip}%
Anyway, I'm happy with what I have, I think, although I may yet find a
way to adjust the vertical spacing to match amsthm precisely, but not
tonight.
+++
\chapter{First chapter}
\section*{Exercises}
Some text then two exercises...
\begin{myexercise}
A combination of these results leads to the slightly stronger result, as
expected:
\[
\left\{\vphantom\sum\right.(\bigvee^M_{i=1}P_i\left.\vphantom\sum\right\
}
\;\mathsf{while(}l\neq\epsilon\mathsf{)}\;
\{...\}\;
\left\{\vphantom\sum\right.(\bigvee^M_{i=2}P_i)\vee
P_\epsilon\left.\vphantom\sum\right\}
\]
\begin{myanswer}
First answer.
\end{myanswer}
\end{myexercise}
\begin{myexercise}
Second exercise.
\begin{myanswer}
First answer.
\end{myanswer}
\end{myexercise}
Some more text and then another exercise...
\begin{myexercise}
Third exercise.
\end{myexercise}
Last bit of text.
\section*{Answers}
\showAnswers
+++
Thanks again for your help, always appreciated :)
Kind regards,
James
> -----Original Message-----
> From: Barbara Beeton [mailto:bnb at ams.org]
> Sent: 19 March 2008 21:58
> To: James Smith
> Cc: texhax at tug.org
> Subject: Re: [texhax] Continued from previous post...
>
>
> To continue, I found these lines...
>
> \newskip\theorempreskipamount
> \newskip\theorempostskipamount
> \global\setlength\theorempreskipamount{12pt plus 5pt minus 3pt}
> \global\setlength\theorempostskipamount{8pt plus 3pt minus 1.5pt}
>
> ...which I've added to my own package to get the correct
> rubber lengths
> between my exercises and neighbouring paragraphs, section headings
> whatver.
>
> My problem is still that pre and post separations are
> added together
> when one exercise comes immediately after another. I've
> guessed that the
> amsthm package has some mechanism for suppressing this
> but after an
> hour's look at theorem.sty I cannot work it out.
>
> if you're using the techniques of amsthm.sty,
> looking in theorem.sty probably won't help
> much. <g>
>
> and, admittedly, the code in amsthm.sty isn't
> crystal clear because it uses internal latex
> tricks. but essentially, what happens at the
> beginning of a theorem element is
> \addvspace{\theorempreskipamount}
> which first checks existing skip and resets it
> to whichever is greater, the space already there
> or the \theorempreskipamount.
>
> I hope my problem is clear. Apologies for rambling.
>
> no apology needed.
> -- bb
>
More information about the texhax
mailing list