ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \getmarking notworking?
@ 2011-01-06 15:04 Khaled Hosny
  2011-01-06 15:53 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Khaled Hosny @ 2011-01-06 15:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users


The following used to work (still working in texlive) but no longer
working (latest minimals), I get the page number and the rule but not
the text. Bug?

\setuppagenumbering
  [alternative=doublesided,
   location=]

\setupheadertexts
  []
  [\setups{text:header:odd}]
  [\setups{text:header:even}]
  []

\startsetups text:header:odd
  \getmarking[chapter][current]
  \quad\vrule\quad
  \pagenumber
\stopsetups

\startsetups text:header:even
  \pagenumber
  \quad\vrule\quad
  \getmarking[section][current]
\stopsetups

\starttext
\chapter{Chapter}
\dorecurse{10}
{
  \section{Section}
  \input knuth
  \page
}
\stoptext

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___________________________________________________________________________________
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] 3+ messages in thread

* Re: \getmarking notworking?
  2011-01-06 15:04 \getmarking notworking? Khaled Hosny
@ 2011-01-06 15:53 ` Hans Hagen
  2011-01-06 16:02   ` Khaled Hosny
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2011-01-06 15:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 6-1-2011 4:04, Khaled Hosny wrote:
>
> The following used to work (still working in texlive) but no longer
> working (latest minimals), I get the page number and the rule but not
> the text. Bug?

sort of ... chapter refers to a section-* name so we need to get the 
parent:

methods[v_current] = function(name,range)
     local top = stack[topofstack]
     return top and top[parentname(name)] or ""
end

(you know where to patch this)

Hans


-----------------------------------------------------------------
                                           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] 3+ messages in thread

* Re: \getmarking notworking?
  2011-01-06 15:53 ` Hans Hagen
@ 2011-01-06 16:02   ` Khaled Hosny
  0 siblings, 0 replies; 3+ messages in thread
From: Khaled Hosny @ 2011-01-06 16:02 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

On Thu, Jan 06, 2011 at 04:53:16PM +0100, Hans Hagen wrote:
> On 6-1-2011 4:04, Khaled Hosny wrote:
> >
> >The following used to work (still working in texlive) but no longer
> >working (latest minimals), I get the page number and the rule but not
> >the text. Bug?
> 
> sort of ... chapter refers to a section-* name so we need to get the
> parent:
> 
> methods[v_current] = function(name,range)
>     local top = stack[topofstack]
>     return top and top[parentname(name)] or ""
> end

Thanks, works now.

> (you know where to patch this)

Indeed :)

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2011-01-06 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-06 15:04 \getmarking notworking? Khaled Hosny
2011-01-06 15:53 ` Hans Hagen
2011-01-06 16:02   ` Khaled Hosny

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).