Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

\marginpar vs. \widowpenalty 1:0

13 views
Skip to first unread message

Linards Ticmanis

unread,
May 3, 2001, 2:49:41 PM5/3/01
to
Hi all,

another dumb problem. I'm using KOMA-Script. It has this nice
\marginline command:

\newcommand\marginline[1]{\marginpar[\raggedleft #1]{\raggedright #1}}

Now if I use this, or plain \marginpar for that matter, my
\widowpenalty=10000 gets tossed out the window. I.e. if I have a
marginal note in the first line of a chapter, it doesn't hesitate to
make this line stand alone at the bottom of the page if that's where
it just happens to stand. Badbadbad. Neither \clubpenalty nor
\samepage fixed the problem... How can I prevent that? For the
TeXperts here goes the \marginpar code from latex.ltx which I do not
claim to understand in the least:

\def\marginpar{%
\ifhmode
\@bsphack
\@floatpenalty -\@Mii
\else
\@floatpenalty-\@Miii
\fi
\ifinner
\@parmoderr
\@floatpenalty\z@
\else
\@next\@currbox\@freelist{}{}%
\@next\@marbox\@freelist{\global\count\@marbox\m@ne}%
{\@floatpenalty\z@
\@fltovf\def\@currbox{\@tempboxa}\def\@marbox{\@tempboxa}}%
\fi
\@ifnextchar [\@xmpar\@ympar}
\long\def\@xmpar[#1]#2{%
\@savemarbox\@marbox{#1}%
\@savemarbox\@currbox{#2}%
\@xympar}
\long\def\@ympar#1{%
\@savemarbox\@marbox{#1}%
\global\setbox\@currbox\copy\@marbox
\@xympar}
\long\def \@savemarbox #1#2{%
\global\setbox #1%
\color@vbox
\vtop{%
\hsize\marginparwidth
\@parboxrestore
\@marginparreset
#2%
\@minipagefalse
\outer@nobreak
}%
\color@endbox
}
\def \@marginparreset {%
\reset@font
\normalsize
\@setminipage
}
\def \@xympar{%
\ifnum\@floatpenalty <\z@\@cons\@currlist\@marbox\fi
\setbox\@tempboxa
\color@vbox
\vbox \bgroup
\end@float
\@ignorefalse
\@esphack
}
\def\reversemarginpar{\global\@mparbottom\z@ \@reversemargintrue}
\def\normalmarginpar{\global\@mparbottom\z@ \@reversemarginfalse}

Many thanks for any help.

--

Linards Ticmanis

The Master said, "The business of laying on the colors follows the
preparation of the plain ground."

0 new messages