Re: [NTG-context] Can \getmarking take more than one argument?

2015-08-09 Thread tala...@fastmail.fm
Many thanks, Hans, as that seems to have done the trick!

 On 9 Aug 2015, at 11:59, Hans Hagen pra...@wxs.nl wrote:
 
 On 8/9/2015 2:42 AM, tala...@fastmail.fm mailto:tala...@fastmail.fm wrote:
 Hello,
 
 I currently use the following to define my even and odd page headers.
 
 —
 \startsetups[header]
   {\doifoddpageelse
  {\getmarking[section]}
  {\getmarking[chapter]}
  }
   \doiftextelse
  {\getmarking[chapter]}
 \stopsetups
 —
 
 The problem is that some of my ‘section’s are not sections, but ‘subject’s 
 (because I don’t want that section heading to appear in the TOC). As a 
 result, my header is blank on the ‘subject’ pages.
 
 Is it possible to define getmarking to take either a section or a subject, 
 somehow? Listing them both separated by a coma 
 (\getmarking[section,subject]) produced no result. I also tried:
 —
   {\doifoddpageelse
  {\getmarking[section]}
  {\getmarking[subject]}
  {\getmarking[chapter]}
 —
 …but that caused the subject and the chapter to both be printed in the 
 header.
 
 Many thanks for any help.
 
 \setupheadertexts[{\getmarking[section]}]
 \definehead[suction][section][number=no]
 
 \starttext
\placelist[section] \page
\section{foo} \page
\suction{bar} \page
 \stoptext
 
 -
  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 
 http://www.pragma-ade.com/
 | www.pragma-pod.nl 
 http://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
 ___

___
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] Can \getmarking take more than one argument?

2015-08-09 Thread Hans Hagen

On 8/9/2015 2:42 AM, tala...@fastmail.fm wrote:

Hello,

I currently use the following to define my even and odd page headers.

—
\startsetups[header]
   {\doifoddpageelse
{\getmarking[section]}
{\getmarking[chapter]}
}
   \doiftextelse
{\getmarking[chapter]}
\stopsetups
—

The problem is that some of my ‘section’s are not sections, but ‘subject’s 
(because I don’t want that section heading to appear in the TOC). As a result, 
my header is blank on the ‘subject’ pages.

Is it possible to define getmarking to take either a section or a subject, 
somehow? Listing them both separated by a coma (\getmarking[section,subject]) 
produced no result. I also tried:
—
   {\doifoddpageelse
{\getmarking[section]}
{\getmarking[subject]}
{\getmarking[chapter]}
—
…but that caused the subject and the chapter to both be printed in the header.

Many thanks for any help.


\setupheadertexts[{\getmarking[section]}]
\definehead[suction][section][number=no]

\starttext
\placelist[section] \page
\section{foo} \page
\suction{bar} \page
\stoptext

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

[NTG-context] Can \getmarking take more than one argument?

2015-08-08 Thread tala...@fastmail.fm
Hello,

I currently use the following to define my even and odd page headers.

—
\startsetups[header]
  {\doifoddpageelse
{\getmarking[section]}
{\getmarking[chapter]}
}
  \doiftextelse
{\getmarking[chapter]}
\stopsetups
—

The problem is that some of my ‘section’s are not sections, but ‘subject’s 
(because I don’t want that section heading to appear in the TOC). As a result, 
my header is blank on the ‘subject’ pages. 

Is it possible to define getmarking to take either a section or a subject, 
somehow? Listing them both separated by a coma (\getmarking[section,subject]) 
produced no result. I also tried:
—
  {\doifoddpageelse
{\getmarking[section]}
{\getmarking[subject]}
{\getmarking[chapter]}
—
…but that caused the subject and the chapter to both be printed in the header.

Many thanks for any help.

Talal
___
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] bug: \getmarking with mixedcolumns

2013-11-26 Thread Lars Huttar
On 11/22/2013 4:34 PM, Hans Hagen wrote:
 On 11/21/2013 7:01 PM, Lars Huttar wrote:

 I now have a MWE that shows the problem.
 Where top and bottom work fine outside of columns, in mixedcolumns, any
 keyword I use with \getmarking always seem to return the *last* item on
 the page. Here's the MWE:

 I changed the example a bit

 \setupbodyfont[dejavu]

 \definemarking[country]

 \startsetups myheader

 (\getmarking[country][1][top]\enspace\emdash\enspace\getmarking[country][1][bottom])

 \hfill

 (\getmarking[country][2][top]\enspace\emdash\enspace\getmarking[country][2][bottom])

 \stopsetups

 \setupheadertexts
   [\setups{myheader}][]
   [][\setups{myheader}]

 \def\anothersection#1%
   {\par
\dontleavehmode
\marking[country]{#1}%
\start\bf #1 \endgraf\stop
\quad
test
\par}

 \starttext
 \startmixedcolumns[distance=5mm, balance=yes]
 \anothersection{Brazil}
%\anothersection{Suriname}
%\anothersection{Uruguay}
%\anothersection{Bolivia}
%\anothersection{Venezuela}
 \anothersection{Peru}
 \stopmixedcolumns
 \stoptext

 The problem, is/was that mixed columns had not yet mark
 synchronization enabled. I uploaded a new beta.

When I use the new beta (using 2013.11.26), marking works better, with
the following caveats:

1) The column number argument is required; using
\getmarking[country][top] instead of \getmarking[country][1][top] still
returns the wrong value. This is not a problem for us, but it's
important to know, because if you leave out the column number argument,
there is no error given, and AFAIR the documentation doesn't tell you
it's required.

2) Sometimes \getmark[country][n][bottom] returns the country at the top
of column n+1 (or column 1 on the next page). In your example above,
\getmarking[country][1][bottom] shows Peru, which is in column 2,
instead of Brazil. This can be a significant problem for us, unless we
can find a way to fix it.
Did you get a different result?

 In the process I also made marks a bit more restrictive but it might
 have (yet unknown) side effects.

 \enabledirectives[marks.boxestoo]

 can be used to see the effect of this.


I tried this with your example above, but didn't see anything change.
Are we supposed to see some colored boxes around the marks?

Thanks again,
Lars


___
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] bug: \getmarking with mixedcolumns

2013-11-22 Thread Hans Hagen

On 11/21/2013 7:01 PM, Lars Huttar wrote:


I now have a MWE that shows the problem.
Where top and bottom work fine outside of columns, in mixedcolumns, any
keyword I use with \getmarking always seem to return the *last* item on
the page. Here's the MWE:


I changed the example a bit

\setupbodyfont[dejavu]

\definemarking[country]

\startsetups myheader

(\getmarking[country][1][top]\enspace\emdash\enspace\getmarking[country][1][bottom])
\hfill

(\getmarking[country][2][top]\enspace\emdash\enspace\getmarking[country][2][bottom])
\stopsetups

\setupheadertexts
  [\setups{myheader}][]
  [][\setups{myheader}]

\def\anothersection#1%
  {\par
   \dontleavehmode
   \marking[country]{#1}%
   \start\bf #1 \endgraf\stop
   \quad
   test
   \par}

\starttext
\startmixedcolumns[distance=5mm, balance=yes]
\anothersection{Brazil}
   %\anothersection{Suriname}
   %\anothersection{Uruguay}
   %\anothersection{Bolivia}
   %\anothersection{Venezuela}
\anothersection{Peru}
\stopmixedcolumns
\stoptext

The problem, is/was that mixed columns had not yet mark synchronization 
enabled. I uploaded a new beta. In the process I also made marks a bit 
more restrictive but it might have (yet unknown) side effects.


\enabledirectives[marks.boxestoo]

can be used to see the effect of 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
___


Re: [NTG-context] bug: \getmarking with mixedcolumns

2013-11-22 Thread Lars Huttar
On 11/22/2013 4:34 PM, Hans Hagen wrote:
 On 11/21/2013 7:01 PM, Lars Huttar wrote:

 I now have a MWE that shows the problem.
 Where top and bottom work fine outside of columns, in mixedcolumns, any
 keyword I use with \getmarking always seem to return the *last* item on
 the page. Here's the MWE:

 I changed the example a bit

 \setupbodyfont[dejavu]

 \definemarking[country]

 \startsetups myheader

 (\getmarking[country][1][top]\enspace\emdash\enspace\getmarking[country][1][bottom])

 \hfill

 (\getmarking[country][2][top]\enspace\emdash\enspace\getmarking[country][2][bottom])

 \stopsetups

 \setupheadertexts
   [\setups{myheader}][]
   [][\setups{myheader}]

 \def\anothersection#1%
   {\par
\dontleavehmode
\marking[country]{#1}%
\start\bf #1 \endgraf\stop
\quad
test
\par}

 \starttext
 \startmixedcolumns[distance=5mm, balance=yes]
 \anothersection{Brazil}
%\anothersection{Suriname}
%\anothersection{Uruguay}
%\anothersection{Bolivia}
%\anothersection{Venezuela}
 \anothersection{Peru}
 \stopmixedcolumns
 \stoptext

 The problem, is/was that mixed columns had not yet mark
 synchronization enabled. I uploaded a new beta. In the process I also
 made marks a bit more restrictive but it might have (yet unknown) side
 effects.

 \enabledirectives[marks.boxestoo]

 can be used to see the effect of this.


Thanks. We will try this out.

Lars

___
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] bug: \getmarking with mixedcolumns

2013-11-21 Thread Lars Huttar
On 11/21/2013 11:40 AM, Lars Huttar wrote:
 In a thread from July
 (http://context.markmail.org/thread/6tgzusw45whaqghi), Marco Patzer
 raised some questions that we have too. They were somewhat answered, but
 I'm still not clear on what the meanings of the keywords are.

 On Jul 8, 2013 4:08:33 pm Hans wrote:
 On 7/9/2013 12:30 AM, Marco Patzer wrote:
 / On 2013–07–08 Hans Hagen wrote:
 //
 // I expect the markings on the left and right to be the same and show
 // A–C on the first page and D–E on the second one. Looks like a bug to
 // me.
 //
 // use top and bottom
 //
 // This works. Thanks.
 //
 // -- previous : last before sync
 // -- next : first after sync
 //
 // -- top  : first in sync
 // -- bottom   : last in sync
 //
 // -- first: first not top in sync
 // -- last : last not bottom in sync
 //
 // That is exactly what's in the wiki (Command/getmarking). To my
 // defence: The manual (chapter 12.4) is outdated, it lists:
 //
 //previous - the last of the previous page
 //first- the first of the actual page
 //last - the last of the actual page
 //both - first — last
 //all  - previous — first — last
 //
 // I have no idea what “first not top in sync” means, in contrast to
 // “first of the actual page”, which is quite clear but wrong on a
 // current MkIV.
 /
 old tex terminology ... in mkiv i don't use the build-in-tex marks at 
 all (too much juggling needed to get things right)
 So I'm wondering ... Hans, since the descriptions you posted are old tex
 terminology, what do previous/next/top/bottom/first/last/etc. mean in
 current terminology?
 I agree with Marco that the descriptions in the ref manual are much
 easier to understand, but appear to be wrong; and do not include top/bottom.
 I'll be happy to update the ref manual and the wiki if I can get clear
 and accurate information.

 We have run many examples here, including the ones on the getmarking
 wiki page, trying to understand what these keywords mean.
 top/bottom do appear to do what we need in an MWE, but are not working
 for us in the real document, and knowing the meaning of these keywords
 would be very helpful in troubleshooting the problem.

 Thanks,
 Lars

 
I now have a MWE that shows the problem.
Where top and bottom work fine outside of columns, in mixedcolumns, any
keyword I use with \getmarking always seem to return the *last* item on
the page. Here's the MWE:
\definemarking[country]


%\startsetups myheader

%F1: \getmarking[country][1][first] - L2: \getmarking[country][2][last]

%\hfill

%T1: \getmarking[country][1][top] - B2: \getmarking[country][2][bottom]

%\stopsetups


\startsetups myheader

F: \getmarking[country][first] - L: \getmarking[country][last]

\hfill

T: \getmarking[country][top] - B: \getmarking[country][bottom]

\stopsetups


\setupheadertexts[\setups{myheader}][][][\setups{myheader}]


\def\anothersection#1{

\marking[country]{#1}

{\bfb #1 \endgraf}

\dorecurse{1}{\input knuth \endgraf}

\marking[country]{#1}

}


\starttext

\startmixedcolumns[distance=5mm, balance=yes]

\anothersection{Brazil}

\anothersection{Suriname}

\anothersection{Uruguay}

\anothersection{Bolivia}

\anothersection{Venezuela}

\anothersection{Peru}

\stopmixedcolumns

\stoptext



When you run the MWE, you see that all the fields in the page header
show the same value: whatever country appears last on the page. (Or
even, depending on how you tweak the length of the country text, if the
next page starts with a new country, you'll get that new country for the
old page.)

I also tried using column numbers, in imitation of the columnsets
example on the wiki at http://wiki.contextgarden.net/Command/getmarking

\startsetups myheader

F1: \getmarking[country][1][first] - L2: \getmarking[country][2][last]

\hfill

T1: \getmarking[country][1][top] - B2: \getmarking[country][2][bottom]

\stopsetups


But this didn't appear to make any difference. Maybe it works for
columnsets but not for mixedcolumns. Does anyone know how to get correct
results for \getmarking in mixedcolumns?


Thanks,
Lars

___
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] bug: \getmarking with mixedcolumns

2013-11-21 Thread Lars Huttar
On 11/21/2013 1:01 PM, Lars Huttar wrote:
 I now have a MWE that shows the problem. Where top and bottom work
 fine outside of columns, in mixedcolumns, any keyword I use with
 \getmarking always seem to return the *last* item on the page. 

I sometimes forget to include our version info.
MKIV, the Context version from TeX Live 2013.

Lars

___
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] Problem with getmarking and setupheadertexts

2013-04-03 Thread H. Özoguz

Hi together,

what is wrong with the following shortexample?


\setupheadertexts

[] [{\cap\getmarking[chapter]}]

[][]


\starttext


\startchapter[

title={Long long long title, it is indeed},

marking = {Shorter Title},

]

\stopchapter

\stoptext



The getmarking in setupheadertexts seems to be ignored, why? Maybe 
marking is the wrong attribute?


Thanks,
Huseyin

___
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] Problem with getmarking and setupheadertexts

2013-04-03 Thread Philipp Gesang
···date: 2013-04-03, Wednesday···from: H. Özoguz···

 Hi together,
 
 what is wrong with the following shortexample?
 
 
 \setupheadertexts
 
 [] [{\cap\getmarking[chapter]}]
 
 [][]
 
 
 \starttext
 
 
 \startchapter[
 
 title={Long long long title, it is indeed},
 
 marking = {Shorter Title},
 ^

  marking={Shorter Title},

Spaces are significant!

Regards
Philipp

 
 ]
 
 \stopchapter
 
 \stoptext
 
 
 
 The getmarking in setupheadertexts seems to be ignored, why? Maybe
 marking is the wrong attribute?
 
 Thanks,
 Huseyin
 
 ___
 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
 ___

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpt2nrwYqQ5c.pgp
Description: PGP 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] solved-how to make \getmarking[title] show using default font size?

2011-07-26 Thread Wolfgang Schuster

Am 26.07.2011 um 06:04 schrieb Jeong Dalyoung:

 Dear all,
 
 For the header text, I used \getmarking as follows:
 
 \setupheadertexts[][{\getmarking[{\v!title}]}]
 
 *
 This problem comes from my setting which is as follows: 
 
 \title{\ss\bf\tfb Title}
 
 I changed it by using the definition as follows:
 
 \def\Mytitle#1{%
 \framedtext
 [width=\overlaywidth,
 height=5\bodyfontsize,
 background=color,
 backgroundcolor=lightgray,
 offset=2pt,
 strut=no,
 frame=off,
 align=middle,
 top=\vss,
 bottom=\vss]{
 \sans #1} }
 
 \setuphead[title][textcommand=\Mytitle]
 
 This makes everything fine.


Don’t set the font style with the argument of the \title command, use 
\setuphead.

\setupheadertexts[][title]

\define[2]\Mytitle
  {\framedtext
 [width=broad,
  height=5\bodyfontsize,
  background=color,
  backgroundcolor=lightgray,
  offset=2pt,
  strut=no,
  frame=off,
  align={middle,middle}]
   {#2}}

\setuphead
  [title]
  [command=\Mytitle,
   style=\ssbfb] % \ss\bfb

\setupheader[style=\ssb] % \ss\tfb

\starttext
\title{Title}
\stoptext

Wolfgang

___
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] how to make \getmarking[title] show using default font size?

2011-07-25 Thread Jeong Dalyoung
Dear all,

For the header text, I used \getmarking as follows:

\setupheadertexts[][{\getmarking[{\v!title}]}]

Then it showed title in the header as shown in the text which is bigger than 
default bodyfont size.
It is rather big for the header text.

How to make it using the default font size or smaller one?

Thank you.

Best regards,

Dalyoung


___
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] solved-how to make \getmarking[title] show using default font size?

2011-07-25 Thread Jeong Dalyoung
Dear all,

For the header text, I used \getmarking as follows:

\setupheadertexts[][{\getmarking[{\v!title}]}]

*
This problem comes from my setting which is as follows: 

\title{\ss\bf\tfb Title}

I changed it by using the definition as follows:

\def\Mytitle#1{%
\framedtext
[width=\overlaywidth,
height=5\bodyfontsize,
background=color,
backgroundcolor=lightgray,
offset=2pt,
strut=no,
frame=off,
align=middle,
top=\vss,
bottom=\vss]{
\sans #1} }

\setuphead[title][textcommand=\Mytitle]

This makes everything fine.

Thank you for reading.

Best regards,

Dalyoung

   
___
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] getmarking and empty chapter number

2011-05-24 Thread Oliver Buerschaper
 %D \macros
 %D   {doiftextelse, doiftext}
 %D
 %D When \type {\doifelse} cum suis hopelessly fail, for
 %D instance because we pass data, we can fall back on the next
 %D macro:
 %D
 %D \starttyping
 %D \doiftextelse {data} {then branch} {else branch}
 %D \doiftext {data} {then branch}
 %D \stoptyping

Works neatly! Thanks a lot.

Oliver
___
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] getmarking and empty chapter number

2011-05-23 Thread Oliver Buerschaper
Hi all,

I'm just trying to wrap my mind around why the following doesn't work as I 
expect:

--
\setupheadertexts
[]

[{\doifsomething{\getmarking[sectionnumber]}{\getmarking[sectionnumber]\enskip}\getmarking[section]}]

[{\doifsomething{\getmarking[chapternumber]}{\getmarking[chapternumber]\enskip}\getmarking[chapter]}]
[]
--

When this encounters an unnumbered \startchapter (say in the front matter) then 
this \doifsomething should detect this void and in particular not insert the 
\enskip. For some reason the space ends up in the PDF nevertheless :-(

Any ideas?

Many thanks,
Oliver
___
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] getmarking and empty chapter number

2011-05-23 Thread Aditya Mahajan

On Mon, 23 May 2011, Oliver Buerschaper wrote:


Hi all,

I'm just trying to wrap my mind around why the following doesn't work as I 
expect:

--
\setupheadertexts
[]

[{\doifsomething{\getmarking[sectionnumber]}{\getmarking[sectionnumber]\enskip}\getmarking[section]}]

[{\doifsomething{\getmarking[chapternumber]}{\getmarking[chapternumber]\enskip}\getmarking[chapter]}]
[]
--

When this encounters an unnumbered \startchapter (say in the front 
matter) then this \doifsomething should detect this void and in 
particular not insert the \enskip. For some reason the space ends up in 
the PDF nevertheless :-(


Any ideas?



From supp-box.mkiv:


%D \macros
%D   {doiftextelse, doiftext}
%D
%D When \type {\doifelse} cum suis hopelessly fail, for
%D instance because we pass data, we can fall back on the next
%D macro:
%D
%D \starttyping
%D \doiftextelse {data} {then branch} {else branch}
%D \doiftext {data} {then branch}
%D \stoptyping

Aditya
___
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] \getmarking notworking?

2011-01-06 Thread Khaled Hosny

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
___


Re: [NTG-context] \getmarking notworking?

2011-01-06 Thread Hans Hagen

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
___


Re: [NTG-context] \getmarking notworking?

2011-01-06 Thread Khaled Hosny
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
___


[NTG-context] Bug: delay in \getmarking

2010-12-17 Thread Steffen Wolfrum
Hi,

I don't no exactly when it changed, but it still worked in ConTeXt  ver: 
2010.09.05 13:23 MKIV.
Now, there is a one page delay in \getmarking!

Please run minimal exmaple below and look at page 7:

Section = 1.2 B
Header = 1.2 A

Steffen


---

\setuppagenumbering [alternative=doublesided,location=]

\setupheader[align=middle]

\def\KolumneL{{\convertnumber{Numbers}{\namedheadnumber{chapter}}.\,Teil:}\enskip\getmarking[chapter]}
\def\KolumneR{\headnumber[section]\enskip\getmarking[section]}

\setupheadertexts
[\vtop{\startalignment[center]\KolumneR\stopalignment}] [pagenumber]
[pagenumber] [\vtop{\startalignment[center]\KolumneL\stopalignment}]


\starttext

\chapter[reference={Teil_1},
 title={Einleitung},
 bookmark={Einleitung},
 list={Einleitung},
 marking={Einleitung}]
 

\dorecurse{14}{\input tufte}
 
\section[
 title={A},
 marking={A}]

\dorecurse{14}{\input tufte}

\section[
 title={B},
 marking={B}]

\dorecurse{14}{\input tufte}


\stoptext
___
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] Problems with getmarking

2010-11-26 Thread luigi scarso
On Tue, Nov 23, 2010 at 1:29 PM, luigi scarso luigi.sca...@gmail.com wrote:
 On Tue, Nov 23, 2010 at 12:32 PM, Wolfgang Schuster
 schuster.wolfg...@googlemail.com wrote:

 Am 23.11.2010 um 11:14 schrieb luigi scarso:

 Hm I cannot see a solution --- perhaps a bug ?

 I think so and i hope this is the correct solution:

 \unprotect
 %setvalue{\??nh:\??mk:y:\v!page }{\resetcurrentstructuremarks} % 
 strc-sec.mkiv
 \setvalue{\??nh:\??mk:y:\v!page }{}
 \protect

 \setuphead[part][placehead=yes,marking=page]

 \setupheadertexts[{\getmarking[part][first]\ – \getmarking[chapter][first]\ 
 – \getmarking[section][first]}]

 \starttext

 \dorecurse{2}
  {\part{Part #1}
   \dorecurse{2}
     {\chapter{Chapter #1-##1}
      \section{Section #1-##1}}}

 \stoptext
 It's ok with the example, but
 I've another test that is still wrong, but it's too much long -- I
 must  simplify it.
No, my example was wrong. The patch seems to work ok .

-- 
luigi
___
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] Problems with getmarking

2010-11-26 Thread Hans Hagen

On 23-11-2010 12:32, Wolfgang Schuster wrote:


Am 23.11.2010 um 11:14 schrieb luigi scarso:


Hm I cannot see a solution --- perhaps a bug ?


I think so and i hope this is the correct solution:

\unprotect
%setvalue{\??nh:\??mk:y:\v!page }{\resetcurrentstructuremarks} % strc-sec.mkiv
\setvalue{\??nh:\??mk:y:\v!page }{}
\protect


I'll patch it but I don't have time now to check it.


-
  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] Problems with getmarking

2010-11-26 Thread luigi scarso
On Fri, Nov 26, 2010 at 5:11 PM, Hans Hagen pra...@wxs.nl wrote:
 On 23-11-2010 12:32, Wolfgang Schuster wrote:

 Am 23.11.2010 um 11:14 schrieb luigi scarso:

 Hm I cannot see a solution --- perhaps a bug ?

 I think so and i hope this is the correct solution:

 \unprotect
 %setvalue{\??nh:\??mk:y:\v!page }{\resetcurrentstructuremarks} %
 strc-sec.mkiv
 \setvalue{\??nh:\??mk:y:\v!page }{}
 \protect

 I'll patch it but I don't have time now to check it.
It seems ok, at least with my last one-thousand-pages pdf .

-- 
luigi
___
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] Problems with getmarking

2010-11-23 Thread luigi scarso
On Mon, Nov 22, 2010 at 3:47 PM, luigi scarso luigi.sca...@gmail.com wrote:
 With this code mkii and mkiv make differents pdf :
 mkiv doesn't show the header after the second \part.
 Perhaps \getmarking is obsolete ?

 \setuppagenumbering[way=bytext,partnumber=no,location={margin},alternative=doublesided]

 \setupcolors[state=start]
 \setupinteraction[state=start]

 \setupbodyfont[ss]
 \setuppapersize[A4][A4]



 \setuphead[part]
          [placehead=yes,
          page=right]
 \setuphead[chapter]
          [placehead=yes,page=yes,before=,after=,]
 \setuphead[section]
          [placehead=yes,page=yes,before=,after=,]
 \setuphead[subsection]
          [placehead=yes,before=,after=,]


 \def\ChapterId#1{\setupheadertexts[text]
 [{}]
 [{\getmarking[chapter][first]---\getmarking[section][first]}]
 [{\getmarking[chapter][first]---\getmarking[section][first]}]
 [{}]}


 \starttext
 \part{Part}
 \chapter{Chapter}
 \ChapterId{}
 \section{Section}
 foo

 \chapter{Chapter}
 \ChapterId{}
 \section{Section}
 goo

 %%


 \part{Part}
 \chapter{Chapter}
 \ChapterId{}
 \section{Section}
 foo

 \chapter{Chapter}
 \ChapterId{}
 \section{Section}
 goo


 \stoptext
Hm I cannot see a solution --- perhaps a bug ?


-- 
luigi
___
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] Problems with getmarking

2010-11-23 Thread Wolfgang Schuster

Am 23.11.2010 um 11:14 schrieb luigi scarso:

 Hm I cannot see a solution --- perhaps a bug ?

I think so and i hope this is the correct solution:

\unprotect
%setvalue{\??nh:\??mk:y:\v!page }{\resetcurrentstructuremarks} % strc-sec.mkiv
\setvalue{\??nh:\??mk:y:\v!page }{}
\protect

\setuphead[part][placehead=yes,marking=page]

\setupheadertexts[{\getmarking[part][first]\ – \getmarking[chapter][first]\ – 
\getmarking[section][first]}]

\starttext

\dorecurse{2}
  {\part{Part #1}
   \dorecurse{2}
 {\chapter{Chapter #1-##1}
  \section{Section #1-##1}}}

\stoptext

Wolfgang

___
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] Problems with getmarking

2010-11-23 Thread luigi scarso
On Tue, Nov 23, 2010 at 12:32 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:

 Am 23.11.2010 um 11:14 schrieb luigi scarso:

 Hm I cannot see a solution --- perhaps a bug ?

 I think so and i hope this is the correct solution:

 \unprotect
 %setvalue{\??nh:\??mk:y:\v!page }{\resetcurrentstructuremarks} % strc-sec.mkiv
 \setvalue{\??nh:\??mk:y:\v!page }{}
 \protect

 \setuphead[part][placehead=yes,marking=page]

 \setupheadertexts[{\getmarking[part][first]\ – \getmarking[chapter][first]\ – 
 \getmarking[section][first]}]

 \starttext

 \dorecurse{2}
  {\part{Part #1}
   \dorecurse{2}
     {\chapter{Chapter #1-##1}
      \section{Section #1-##1}}}

 \stoptext
It's ok with the example, but
I've another test that is still wrong, but it's too much long -- I
must  simplify it.

-- 
luigi
___
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] Problems with getmarking

2010-11-22 Thread luigi scarso
With this code mkii and mkiv make differents pdf :
mkiv doesn't show the header after the second \part.
Perhaps \getmarking is obsolete ?

\setuppagenumbering[way=bytext,partnumber=no,location={margin},alternative=doublesided]

\setupcolors[state=start]
\setupinteraction[state=start]

\setupbodyfont[ss]
\setuppapersize[A4][A4]



\setuphead[part]
  [placehead=yes,
  page=right]
\setuphead[chapter]
  [placehead=yes,page=yes,before=,after=,]
\setuphead[section]
  [placehead=yes,page=yes,before=,after=,]
\setuphead[subsection]
  [placehead=yes,before=,after=,]


\def\ChapterId#1{\setupheadertexts[text]
[{}]
[{\getmarking[chapter][first]---\getmarking[section][first]}]
[{\getmarking[chapter][first]---\getmarking[section][first]}]
[{}]}


\starttext
\part{Part}
\chapter{Chapter}
\ChapterId{}
\section{Section}
foo

\chapter{Chapter}
\ChapterId{}
\section{Section}
goo

%%


\part{Part}
\chapter{Chapter}
\ChapterId{}
\section{Section}
foo

\chapter{Chapter}
\ChapterId{}
\section{Section}
goo


\stoptext




-- 
luigi
___
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] getmarking does not use mark?

2010-09-27 Thread Steffen Wolfrum


Hi,

did I misunderstood something ... or is this simply a bug?!

In that example below \getmarking uses the value of title ... and not of mark!


(is there an other command to access the value of mark?)

Steffen

---

\def\KolumneL{\headnumber[chapter]\enskip\getmarking[chapter]}
\def\KolumneR{\headnumber[section]\enskip\getmarking[section]}

\setuppagenumbering [alternative=doublesided,location=]
\setupheader[align=middle]
\setupheadertexts
[\vtop{\startalignment[center]\KolumneR\stopalignment}] [pagenumber]
[pagenumber] [\vtop{\startalignment[center]\KolumneL\stopalignment}]

\starttext

\startchapter[]
test
\stopchapter

\startsection[
 title={title},
 bookmark={bookmark},
 mark={mark},
 list={list}]

test\page test \page test

\stopsection

\stoptext
___
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] getmarking does not use mark?

2010-09-27 Thread Wolfgang Schuster

Am 27.09.2010 um 17:36 schrieb Steffen Wolfrum:

 
 
 Hi,
 
 did I misunderstood something ... or is this simply a bug?!
 
 In that example below \getmarking uses the value of title ... and not of mark!

The name of the key is marking”.

Wolfgang

___
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] getmarking does not use mark?

2010-09-27 Thread Steffen Wolfrum

Am 27.09.2010 um 17:50 schrieb Wolfgang Schuster:

 
 Am 27.09.2010 um 17:36 schrieb Steffen Wolfrum:
 
 
 
 Hi,
 
 did I misunderstood something ... or is this simply a bug?!
 
 In that example below \getmarking uses the value of title ... and not of 
 mark!
 
 The name of the key is marking”.



I don't understand.

In context-excursion it says ...

After the definition texts can be marked by:
\marking[.1.]{.2.}
.1. name .2. text
and recalled by:
\getmarking[.1.][.2.]

But in MkIv sections there is already text marked ...

\startsection[
title={title},
bookmark={bookmark},
mark={mark},
list={list}]

At least it looks as if there were some text marked by mark={mark}!

Just, how can it be accessed??

Steffen
___
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] getmarking does not use mark?

2010-09-27 Thread Wolfgang Schuster

Am 27.09.2010 um 18:16 schrieb Steffen Wolfrum:

 In that example below \getmarking uses the value of title ... and not of 
 mark!
 
 The name of the key is marking”.
 
 
 
 I don't understand.
 
 In context-excursion it says ...
 
 After the definition texts can be marked by:
 \marking[.1.]{.2.}
 .1. name .2. text
 and recalled by:
 \getmarking[.1.][.2.]
 
 But in MkIv sections there is already text marked ...
 
 \startsection[
 title={title},
 bookmark={bookmark},
 mark={mark},
 list={list}]
 
 At least it looks as if there were some text marked by mark={mark}!

\startsection[...,marking=mark,...]

...

\stopsection

Wolfgang

___
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] getmarking does not use mark?

2010-09-27 Thread Steffen Wolfrum

Am 27.09.2010 um 18:21 schrieb Wolfgang Schuster:

 
 Am 27.09.2010 um 18:16 schrieb Steffen Wolfrum:
 
 In that example below \getmarking uses the value of title ... and not of 
 mark!
 
 The name of the key is marking”.
 
 
 
 I don't understand.
 
 In context-excursion it says ...
 
 After the definition texts can be marked by:
 \marking[.1.]{.2.}
 .1. name .2. text
 and recalled by:
 \getmarking[.1.][.2.]
 
 But in MkIv sections there is already text marked ...
 
 \startsection[
 title={title},
 bookmark={bookmark},
 mark={mark},
 list={list}]
 
 At least it looks as if there were some text marked by mark={mark}!
 
 \startsection[...,marking=mark,...]
 
 ...
 
 \stopsection




Time is fleeting, madness takes its toll.


... and I swear: last year in April it was

\startchapter[label=...,title={...},bookmark={...},mark={...},list={...},reference={...}]
 


Thanks Wolfgang!
Steffen


___
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] should \getmarking[title] work?

2009-06-26 Thread Hans Hagen

Michael Green wrote:

On Jun 25, 2009, at 3:00 AM, Wolfgang Schuster wrote:


Am 25.06.2009 um 00:51 schrieb Michael Green:


I expected \getmarking[title] to give me the contents of \title. It
used to work (as of late spring). Perhaps something has changed.

MTXrun | current version: 2009.06.14 21:01
This is LuaTeX, Version beta-0.40.5-2009061123 (Web2C 2009)
luatex.web = v2471

Test file:

\starttext
\title{This is the title}

The title should be here: \getmarking[title]. But it's just a blank
space.

\stoptext


\starttext

\title[sec:title]{This is the title}

The title should be here: \ref[s][sec:title].

\stoptext

Wolfgang



Thanks! That worked using Mk II but not with Mk IV. Is that to be expected?


markings are only available (reliable) in the page builder

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] should \getmarking[title] work?

2009-06-25 Thread Michael Green
I expected \getmarking[title] to give me the contents of \title. It  
used to work (as of late spring). Perhaps something has changed.


MTXrun | current version: 2009.06.14 21:01
This is LuaTeX, Version beta-0.40.5-2009061123 (Web2C 2009) luatex.web  
= v2471



Test file:

\starttext
\title{This is the title}

The title should be here: \getmarking[title]. But it's just a blank  
space.


\stoptext


-
This message has been scanned by Postini anti-virus software.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] should \getmarking[title] work?

2009-06-25 Thread Wolfgang Schuster


Am 25.06.2009 um 00:51 schrieb Michael Green:

I expected \getmarking[title] to give me the contents of \title. It  
used to work (as of late spring). Perhaps something has changed.


MTXrun | current version: 2009.06.14 21:01
This is LuaTeX, Version beta-0.40.5-2009061123 (Web2C 2009)  
luatex.web = v2471


Test file:

\starttext
\title{This is the title}

The title should be here: \getmarking[title]. But it's just a blank  
space.


\stoptext


\starttext

\title[sec:title]{This is the title}

The title should be here: \ref[s][sec:title].

\stoptext

Wolfgang

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] should \getmarking[title] work?

2009-06-25 Thread Michael Green

On Jun 25, 2009, at 3:00 AM, Wolfgang Schuster wrote:


Am 25.06.2009 um 00:51 schrieb Michael Green:


I expected \getmarking[title] to give me the contents of \title. It
used to work (as of late spring). Perhaps something has changed.

MTXrun | current version: 2009.06.14 21:01
This is LuaTeX, Version beta-0.40.5-2009061123 (Web2C 2009)
luatex.web = v2471

Test file:

\starttext
\title{This is the title}

The title should be here: \getmarking[title]. But it's just a blank
space.

\stoptext


\starttext

\title[sec:title]{This is the title}

The title should be here: \ref[s][sec:title].

\stoptext

Wolfgang



Thanks! That worked using Mk II but not with Mk IV. Is that to be  
expected?


Michael
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] [***SPAM***] Bug? \getmarking fails under some circumstances

2009-05-12 Thread Oliver Heins
Hello,

I'm new to ConTeXt, so this is perhaps not a bug but a fault on my side.

Under some circumstances, the living column heads fail to refer to the
subsubject.  As you can see from the attached minimal example

\startsetups[header]
  \getmarking[subject]\ $\cdot$ \getmarking[subsubject]
\stopsetups

will yield something like »Mikrotypografie *«, though it should be
»Mikrotypografie * Absatzumbruch«.

If you uncomment the \subsubject-line at the end of the example,
everything works as expected unless you uncomment the former line, too.

A workaround is to add a \vfill\eject just before the next \subject.

Best regards,
 olli


You probably can ignore the environments used in the minimal example, they
are copied from the document from which I ran into the problem and are
just dummy text.  I hope I have stripped down the preamble to an
acceptable amount of lines.

---

% interface=en output=pdftex

\usetypescript[fourier][ec]
\setupbodyfont[fourier,12pt]

\setuppapersize
  [A4][A4]

\usemodule[layout]
\chardef\charwidthmethod=3
\def\charwidthlanguage{\currentmainlanguage}
\setuplayout
  [width=70\averagecharwidth,
  height=middle,
  grid=yes]

\startsetups[header]
  \hfill
  \getmarking[subject]\ $\cdot$ \getmarking[subsubject]
  \hfill
\stopsetups

\setupheadertexts[\setups{header}]

\setuphead
  [title]
  [before=\hairline,
   after=\blank\leftline{\tfa Ein
   Beispieldokument}\blank\leftline{\tfa Oliver Heins
 \ss$\langle$\from[email]$\rangle$}
 \bigskip\hairline]

\definehead[subject][section]
\setuphead[subject][number=no]
\definehead[subsubject][subsection]
\setuphead[subsubject][number=no]

\setuphead
  [subject]
  [style=\tfb]


% Text

\starttext


\startlinecorrection
\title{Mikrotypografie und Interaktivität}
\stoplinecorrection

\setupindenting[medium, yes]
\setupwhitespace[none]

\vskip-\baselineskip

\subject{Mikrotypografie}

Besonderes Augenmerk legt scriptorium adp auf die typografische
Qualität der erzeugten Dokumente.  Die von uns verwendeten
Textsatzsysteme aus der Programmfamilie \TeX{} ermöglichen einen
besonders hochwertigen Satz.

\subsubject{Mathematiksatz}

Der Mathematiksatz von \TeX{} ist legendär.  Kein Wunder, wurde \TeX{}
doch vom amerikanischen Informatikprofessor und Turing-Preisträger
Donald Knuth entwickelt, der mit der immer schlechter werdenden
Qualität seiner Buchreihe \quotation{The Art of Computer Programming}
unzufrieden war, seit von Hand- auf Fotosatz umgestellt worden war.

Von 1977 bis 1986 entwickelte Knuth \TeX{}: {\en\quotation{Ever since
those beginnings in 1977, the TeX research project that I embarked
on was driven by two major goals.  The first goal was quality: we
wanted to produce documents that were not just nice, but actually
the best. {\dots} The second major goal was archival: to create
systems that would be independent of changes in printing
technology as much as possible.  When the next generation of
printing devices came along, I wanted to be able to retain the
same quality already achieved, instead of having to solve all the
problems anew.  I wanted to design something that would be still
usable in 100 years.}}\footnote{Donald E. Knuth, {\it Digital
typography.} Stanford, Calif.: CSLI Publications, 1999, S.~559.}

\TeX{} stellt im engeren Sinn lediglich eine Programmiersprache
bereit, mit der sich Textsatzsysteme entwickeln lassen. Knuth
entwickelte ein erstes mit dem sogenannten plain-\TeX-Format, weitere
wie {\LaTeX} oder {\ConTeXt} folgten.  scriptorium adp setzt die
beiden letztgenannten Formate ein.

Hier ein Beispiel für den Mathematiksatz von \TeX{}:

\startlinecorrection
\vskip-.5\baselineskip
\placeformula
\startformula
  \startmathalignment[m=2,distance=2em]%Notice distance=2em
   \NC \nabla\cdot \bf E \NC= \frac{\rho}{\varepsilon_0},
   \NC \nabla\times \bf E \NC= -\frac{\partial \bf B}{\partial t}, \NR[+]
   \NC \nabla\cdot \bf B \NC= 0,
   \NC \nabla\times \bf B \NC= \mu_0{\bf j}+\varepsilon_0\mu_0
   \frac{\partial \bf E}{\partial t}. \NR[+]
 \stopmathalignment
\stopformula
\vskip-.5\baselineskip
\stoplinecorrection


Auch im Fließtext ist Mathematik problemlos möglich.

\startlinecorrection
\placeformula
\startformula
  f(x) =
  \startmathcases[style=\displaystyle]
\NC \int_0^x g(y)\,dy,\NC if $x \ge 0$; \NR
\NC \int_{-x}^0 g(y)\,dy, \NC otherwise.\NR
  \stopmathcases
\stopformula
\stoplinecorrection


\subsubject{Absatzumbruch}

Hervorzuheben ist insbesondere der absatzbasierte {\it
  Total|-|Fit}|-|Umbruchalgorithmus: nach einem raffinierten
Optimierungsverfahren werden alle möglichen Zeilenumbrüche (inklusive
Worttrennung) im Absatz gleichzeitig bestimmt und bewertet.  Der
Umbruch, der den besten optischen Gesamteindruck verspricht, wird dann
vom System benutzt.  Im Vergleich mit dem verbreiteten {\it
  First|-|Fit}|-|Algorithmus, der die Zeilenumbrüche Zeile für Zeile