[pracjourn-forum] Macro problems, weird results

Peter Flom Flom at ndri.org
Thu Oct 5 17:48:49 CEST 2006


I wrote a little macro (maybe something is wrong with it)


\newcommand{\AM}[1]{%
\marginpar{\scriptsize Add more:\\ #1}}


This causes some weird errors and odd printing  if there is not space
around it

If I have no space betwen it and \tableofcontents, there's no 
error, but the table of contents does not print, and the word
'Contents' appears at the bottom of a page

In an itemized list, if there is no space, then it seems to remove the
next \item

If it's right before a \chapter, it causes a weird incomprehensible
error
<<<<
Chapter 3.
! Use of \@chapter doesn't match its definition.
\protected at write ...le at protect \edef \reserved at a {
                                                  \write
#1{#3}}\reserved at a ...
>>>

and, if in the middle of text, it deletes the next letter and puts it
in the margin!


So.....

What's wrong with my macro?
and

Aren't these weird side effects?

and

What an error message for the collection!


Peter


  
  



More information about the pracjourn-forum mailing list