Am 05.03.2011 um 18:39 schrieb C.:

Hello,
 
I guess this is an easy one.
How do I get the top lines to behave like the second example? Why is the newline ignored in the top one?

\setlayer use a \hbox for the argument but you can around this with \setlayerframed, e.g.

\setlayerframed[mybg][align=right,frame=off]{…}

Wolfgang