[texhax] \marginpars on left
Uwe Lück
uwe.lueck at web.de
Tue Mar 10 14:19:39 CET 2009
At 13:28 10.03.09, Michael Barr wrote:
>I tried the technique that Donald Arsenau suggested, namely
>\makeatletter
>\@mparswitchfalse
>\makeatother
>\newcommand\xlabel[1]{\marginpar[#1]{}\label{#1}}
>
>Unfortunately, the effect is to turn off \marginpar entirely. If I
>replace the definition of \xlabel by
>\newcommand\xlabel[1]{\marginpar{#1}\label{#1}}
>(dropping the optional argument) I get all the labels on the right. I
>guess I can live with that.
Donald Arseneau and I had tried to make clear that using \marginpar with an
empty mandatory argument is wrong, it is the reason when you wonder that
somewhere nothing is printed. The mandatory argument is (by default ...)
printed on right pages, so when it is empty, nothing is printed on right
pages.
At 12:36 09.03.09, Donald Arseneau wrote:
>Michael Barr <barr at math.mcgill.ca> writes:
> > \newcommand\xlabel[1]{\marginpar[#1]{}\label{#1}}
>
>And get rid of such horribly broken definitions.
>\makeatletter
>\@mparswitchfalse
>\makeatother
>\newcommand\xlabel[1]{\marginpar[#1]{}\label{#1}}
is *not* what Donald Arseneau suggested, he suggested using \marginpar
without optional argument after
>\makeatletter
>\@mparswitchfalse
>\makeatother
in the preamble. He may have overlooked your \label. So the suggestion
rather is
>\makeatletter
>\@mparswitchfalse
>\makeatother
>\newcommand\xlabel[1]{\marginpar{#1}\label{#1}}
It might be safer to precede \marginpar with \leavevmode.
-- Uwe.
More information about the texhax
mailing list