ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* inner/outer margin: confused width
@ 2011-07-14 12:48 Peter Schorsch
  2011-07-17 18:08 ` inner/outer margin: wrong width at double sided Peter Schorsch
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Schorsch @ 2011-07-14 12:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

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.

[-- Attachment #2: pararef-test5.tex --]
[-- Type: text/x-tex, Size: 3337 bytes --]

%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 #3: pararef-test5.pdf --]
[-- Type: application/pdf, Size: 36339 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-17 18:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-14 12:48 inner/outer margin: confused width Peter Schorsch
2011-07-17 18:08 ` inner/outer margin: wrong width at double sided Peter Schorsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).