Hi,

the width of my inner and outer margin are different and the pagelayout
is double sided.

When I use \ininner and \inouter directly, always the correct width is
used. But as soon I put it into a function the wrong margin width is
often used.

I attached two files:
        - simple example tex file
        - the pdf output of that example file

In the example pdf you can see starting from page five the mixed up
result.

Is there something I do wrong with the double sided mode? Or is this an
issue how the function is written?

Thanks in advance!

P.
%Test of margins and margins width

%Define paragraph command

\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

% Test content

\starttext

\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
\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
\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

\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

Attachment: pararef-test5.pdf
Description: Adobe PDF document

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to