Re: [NTG-context] section numbers in margin eventually get placed too far left

2013-09-18 Thread Marco Patzer
On 2013–09–17 Sanjoy Mahajan wrote:

 Is this a bug, or just a change in setuphead that I didn't take
 account of?

It is a bug. ConTeXt sometimes uses the rightmargindistance for the
left margin, which would be correct for a double sided layout, but
is definitely wrong for a single sided document. However, even in a
double sided layout the calculations are not correct. Here a smaller
example. Note that the output is wrong either way, with
\setuppagenumbering commented out or not.

%% \setuppagenumbering[alternative=doublesided]
\setuplayout[rightmargindistance=1cm]
\setuphead[section][alternative=inmargin]
\showframe

\starttext
  \dorecurse{16}{\section{Blah}
\input tufte}
\stoptext

Marco


signature.asc
Description: Digital signature
___
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
___

Re: [NTG-context] section numbers in margin eventually get placed too far left

2013-09-18 Thread Hans Hagen

On 9/18/2013 8:48 AM, Marco Patzer wrote:

On 2013–09–17 Sanjoy Mahajan wrote:


Is this a bug, or just a change in setuphead that I didn't take
account of?


It is a bug. ConTeXt sometimes uses the rightmargindistance for the
left margin, which would be correct for a double sided layout, but
is definitely wrong for a single sided document. However, even in a
double sided layout the calculations are not correct. Here a smaller
example. Note that the output is wrong either way, with
\setuppagenumbering commented out or not.

%% \setuppagenumbering[alternative=doublesided]
\setuplayout[rightmargindistance=1cm]
\setuphead[section][alternative=inmargin]
\showframe

\starttext
   \dorecurse{16}{\section{Blah}
 \input tufte}
\stoptext


\startsetups[\??headrenderings:\v!inmargin]
\vbox {
\headsetupspacing
\begstrut
\dontleavehmode
\ifconditional\headshownumber
\llap {
\signalrightpage
\hbox {
\hfill
\headnumbercontent
\doifrightpageelse {
\scratchdistance\leftmargindistance
} {
\scratchdistance\rightmargindistance
}

\hskip\dimexpr\d_strc_rendering_local_leftoffset+\scratchdistance\relax
}
}
\fi
\headtextcontent
}
\stopsetups

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] section numbers in margin eventually get placed too far left

2013-09-18 Thread Sanjoy Mahajan
Hans,

Thanks, that fixes my and Marco's test cases.  Should I wikify, or will
your fix be part of an uncoming beta?

Best,
-Sanjoy
___
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
___


Re: [NTG-context] section numbers in margin eventually get placed too far left

2013-09-18 Thread Marco Patzer
On 2013–09–18 Sanjoy Mahajan wrote:

 Thanks, that fixes my and Marco's test cases.  Should I wikify, or will
 your fix be part of an uncoming beta?

No need to wikify. It was a bug which has already been fixed in the
latest beta.

Marco


signature.asc
Description: Digital signature
___
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
___

Re: [NTG-context] section numbers in margin eventually get placed too far left

2013-09-18 Thread Marco Patzer
On 2013–09–18 Sanjoy Mahajan wrote:

 Marco Patzer li...@homerow.info writes:
 
  No need to wikify. It was a bug which has already been fixed in the
  latest beta.
 
 Hans is too fast!
 
 Note to self: Test every bug candidate also against the latest beta.

I meant that Hans already uploaded the new fixed beta.

Marco


signature.asc
Description: Digital signature
___
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
___

Re: [NTG-context] section numbers in margin eventually get placed too far left

2013-09-18 Thread Sanjoy Mahajan
Marco Patzer li...@homerow.info writes:

 No need to wikify. It was a bug which has already been fixed in the
 latest beta.

Hans is too fast!

Note to self: Test every bug candidate also against the latest beta.

-Sanjoy
___
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
___


[NTG-context] section numbers in margin eventually get placed too far left

2013-09-17 Thread Sanjoy Mahajan
This test file

==
\setuplayout[leftmargindistance=0.125in,
  leftmargin=0.625in,
  width=4.75in,
  rightmargindistance=0.25in,
  rightmargin=0.25in]

\setuphead[section][alternative=inmargin]
\showframe

\starttext
\dorecurse{6}{\section{Blah} 
\input tufte
}

\stoptext
==

asks for section numbers in the left margin, separated from the section
title by the leftmargindistance.  It works fine for the first four
sections.  But sections 5 and 6 (on page 2) have the section number
shifted further left from the correct position by roughly 10pt or so.

It seems very sensitive to the layout.  If I change the
leftmargindistance to 0.25in, the section numbers are all placed
correctly.

I noticed the problem on my default context version:

ConTeXt  ver: 2013.05.28 00:36 MKIV current [from the Debian TL2013 pkgs]

It also happens with the live ConTeXt and with vanilla TL2013.  (Though
it works fine with MKII.)

Is this a bug, or just a change in setuphead that I didn't take account of?

-Sanjoy
___
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
___