* section numbers in margin eventually get placed too far left
@ 2013-09-18 0:13 Sanjoy Mahajan
2013-09-18 6:48 ` Marco Patzer
0 siblings, 1 reply; 7+ messages in thread
From: Sanjoy Mahajan @ 2013-09-18 0:13 UTC (permalink / raw)
To: ntg-context
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: section numbers in margin eventually get placed too far left
2013-09-18 0:13 section numbers in margin eventually get placed too far left Sanjoy Mahajan
@ 2013-09-18 6:48 ` Marco Patzer
2013-09-18 7:43 ` Hans Hagen
0 siblings, 1 reply; 7+ messages in thread
From: Marco Patzer @ 2013-09-18 6:48 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 734 bytes --]
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
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
[-- Attachment #2: 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] 7+ messages in thread
* Re: section numbers in margin eventually get placed too far left
2013-09-18 6:48 ` Marco Patzer
@ 2013-09-18 7:43 ` Hans Hagen
2013-09-18 11:05 ` Sanjoy Mahajan
0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2013-09-18 7:43 UTC (permalink / raw)
To: ntg-context
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-09-18 16:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-18 0:13 section numbers in margin eventually get placed too far left Sanjoy Mahajan
2013-09-18 6:48 ` Marco Patzer
2013-09-18 7:43 ` Hans Hagen
2013-09-18 11:05 ` Sanjoy Mahajan
2013-09-18 12:14 ` Marco Patzer
2013-09-18 16:08 ` Sanjoy Mahajan
2013-09-18 16:30 ` Marco Patzer
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).