[NTG-context] Bugs in defineenumeration

2009-09-24 Thread B. Vogel
Hi all,

The example below shows: lemma 1 (lemmatitle   )

Problems:
- the word lemma is repeated before the title : (lemmatitle
- spaces after the title: title )

Example:
%MTXrun | current version: 2009.09.23 10:07
%linux-32, current beta
\defineenumeration[lemma][title=yes]

\starttext

\startlemma{title} 
\stoplemma 

\stoptext

Kind regards,

Bernard 
___
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] Initialisation problem enumeration a nd way=bysection

2009-08-19 Thread B. Vogel
On Wednesday 19 August 2009, Hans Hagen wrote:
 B. Vogel wrote:
  Hi all,
 
  I have an enumeration: example that will reset by section.
 
  Using my own header: Mysection the enumeration is not reset by section.
  The second instance shows the failure.
 
  However, after a \section it suddenly works.
 
 
  And there is a problem with the sectioncounter as well.
  The headingnumbers are 1 2 1 2 3 4 5 6 instead of 1 2 3 4 5 6 7 8.

 can you try this patch (strc-sec.mkiv)

Problem solved. Thanks.


 \def\dodefineclonedstructurehead#1#2% class parent
{\def\currentstructurehead{#1}%
 \presetlabeltext[#1=]%
 \doifelse{#1}{#2}
   {\getparameters[\??nh#1][\c!label=#1]%
\doifundefined{\??li#1}{\definelist[#1][\c!prefix=\v!no]}}%
 definestructurelist ?

 {\getparameters[\??nh#1][\s!parent=\??nh#2,\c!label=#1,\c!coupling=#2]%
\definemarking[#1][#2]%
\definemarking[#1\v!number][#2\c!number]%
\doifundefined{\??li#1}{\definelist[#1][#2][\c!prefix=\v!no]}}%
 definestructurelist ?
 \the\everystructureheadsetup}

  See the example below.

 nice example

Thanks. 


  Regard, Bernard
 
 
  %MTXrun | current version: 2009.08.17 19:06
  % linux-32
 
  \definehead[Mysection][section]
 
  \defineenumeration[example]
[way=bysection,
location=left]
 
  \def\test{%
\ifnum\currentenumerationfullnumber=\recurselevel\relax
  \currentenumerationfullnumber = \recurselevel\ PASS%
\else
  \currentenumerationfullnumber \not= \recurselevel\ FAIL%
\fi
  }
 
  \starttext
 
  \dorecurse {2} {
\dorecurse {2} {
  \Mysection{Mysection}
  \dorecurse {3} {\startexample \test \stopexample}
}
 
\dorecurse {2} {
  \section{Section}
  \dorecurse {3} {\startexample \test \stopexample}
}
  }
 
  \stoptext

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



___
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] Initialisation problem enumeration and way=bysection

2009-08-18 Thread B. Vogel
Hi all,

I have an enumeration: example that will reset by section. 

Using my own header: Mysection the enumeration is not reset by section. 
The second instance shows the failure.

However, after a \section it suddenly works.  


And there is a problem with the sectioncounter as well.
The headingnumbers are 1 2 1 2 3 4 5 6 instead of 1 2 3 4 5 6 7 8.
 

See the example below.

Regard, Bernard


%MTXrun | current version: 2009.08.17 19:06
% linux-32

\definehead[Mysection][section]

\defineenumeration[example]
  [way=bysection,
  location=left]

\def\test{%
  \ifnum\currentenumerationfullnumber=\recurselevel\relax
\currentenumerationfullnumber = \recurselevel\ PASS%
  \else
\currentenumerationfullnumber \not= \recurselevel\ FAIL%
  \fi
}

\starttext

\dorecurse {2} {
  \dorecurse {2} {
\Mysection{Mysection}
\dorecurse {3} {\startexample \test \stopexample}
  }

  \dorecurse {2} {
\section{Section}
\dorecurse {3} {\startexample \test \stopexample}
  }
} 

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


[NTG-context] sectionblockenvironment not working?

2009-08-08 Thread B. Vogel
Hi all,

I can't get the example below working. 
Is there a problem with the sectionblockenvironment?

Regards,

Bernard


% MTXrun | current version: 2009.08.07 11:22
% linux-32

\startsectionblockenvironment[frontpart]
  \setuppagenumbering [location=footer] 
  \setupuserpagenumber[numberconversion=romannumerals]
  \setupfootertexts[left][right]
\stopsectionblockenvironment

\startsectionblockenvironment[bodypart]
  \setuppagenumber[number=1]
  \setuppagenumbering [location=footer] 
  \setupuserpagenumber[numberconversion=characters]
  \setupfootertexts[left][right]
\stopsectionblockenvironment


\starttext
  \startfrontmatter \chapter{test} \stopfrontmatter
  \startbodymatter \chapter{test} \stopbodymatter
\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] enumerations and definehead

2009-08-08 Thread B. Vogel
Hi all,

How do I reset an enumeration with my own header?

See the example below.
The build-in section works and my own header fails.

Tia,

Bernard


% MKIV beta
% MTXrun | current version: 2009.08.07 11:22
% linux-32

\definehead[Mysection][section]

\setuphead[Mysection]
  [after=\nowhitespace\hairline]

\defineenumeration[example]
  [way=bysection]

\starttext

\dorecurse {3} {
  \Mysection{Mysection \recurselevel}
  \dorecurse {3} {\startexample \recurselevel \stopexample}} 
\page

\dorecurse {3} {
  \section{Section \recurselevel}
  \dorecurse {3} {\startexample \recurselevel \stopexample}} 

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


Re: [NTG-context] sectionblockenvironment not working?

2009-08-08 Thread B. Vogel
Thanks, it is working nicely. 

On Saturday 08 August 2009, Wolfgang Schuster wrote:
 Am 08.08.2009 um 16:28 schrieb B. Vogel:
  Hi all,
 
  I can't get the example below working.
  Is there a problem with the sectionblockenvironment?

 the problem is there since a while

and the solution too, looking at the speed of your answer.

Is there a reason for not merging your patch besides Hans being busy?

Regards,

Bernard


 \unprotect

 \def\dostartstructureblockenvironment[#1]% evt \pushendofline
 \popendofline
{\long\def\do##1##2{\setstructureblockenvironment{#1}{##1##2}}%
 \grabuntil{\e!stop\v!structureblockenvironment}{\csname\??nb\s!
 do#1\endcsname}}

 \def\dostartsectionblockenvironment[#1]% evt \pushendofline
 \popendofline
{\long\def\do##1##2{\setstructureblockenvironment{#1}{##1##2}}%
 \grabuntil{\e!stop\v!sectionblockenvironment}{\csname\??nb\s!
 do#1\endcsname}}

 \def\getstructureblockenvironment#1%
{\let\do\firstofoneargument
 \csname\??nb\s!do#1\endcsname}

 \protect

 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
 ___



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