Hi, sorry that I repeat my question but I have really no idea how to solve this. When I use \ininner and \inouter directly, always the correct width is used. \ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte But as soon I put it into a function the wrong margin width is often used. \unexpanded\def\startParagraph {\dosingleempty\dostartParagraph} \def\dostartParagraph[#1]% {\getrawparameters[Paragraph][heading=,mark=,#1]% \incrementnumber[ParagraphNumber]% \ininner{\tfx\getnumber[ParagraphNumber]}% \doifsomething\Paragraphheading{\inouter{\Paragraphheading}}% \doifsomething\Paragraphmark{\expanded{\textreference[\Paragraphmark]{\fullheadnumber/\rawnumber[ParagraphNumber]}}}% \ignorespaces} \unexpanded\def\stopParagraph {\blank[medium]} \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph In the attached pdf file in the thread-starting post you can see the broken results on page 6. -------------8<-------------------------------- % define start- stopParagraph \definenumber[ParagraphNumber][way=bysection,prefixsegments=100] \unexpanded\def\startParagraph {\dosingleempty\dostartParagraph} \def\dostartParagraph[#1]% {\getrawparameters[Paragraph][heading=,mark=,#1]% \incrementnumber[ParagraphNumber]% \ininner{\tfx\getnumber[ParagraphNumber]}% \doifsomething\Paragraphheading{\inouter{\Paragraphheading}}% \doifsomething\Paragraphmark{\expanded{\textreference[\Paragraphmark]{\fullheadnumber/\rawnumber[ParagraphNumber]}}}% \ignorespaces} \unexpanded\def\stopParagraph {\blank[medium]} % Setup margins and double sided \definelayout[WithMarginnotes][location={duplex},grid=no,topspace=3cm,height=24cm,backspace=3cm,cutspace=0cm,leftmargin=1cm,leftmargindistance=0.4cm,width=12.1cm,rightmargindistance=0.4cm,rightmargin=3.5cm] \setuplayout[WithMarginnotes] \setuppagenumbering[alternative=doublesided,location=] \showframe % \starttext % direct use: works \ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte \ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte \ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte \ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte \ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte \ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte \ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte % used via fucntion: does not work correctly \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph \startParagraph[heading={M M M M M M M M M M M M }] \input tufte \stopParagraph \stoptext