ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Wolfgang Schuster <wolfgang.schuster@gmail.com>
Subject: Re: formula in TABLE is not continuous numbered
Date: Mon, 13 Aug 2012 00:39:02 +0200	[thread overview]
Message-ID: <50283086.6060601@wxs.nl> (raw)
In-Reply-To: <9599DFD1-B01A-42DF-B840-3BDDE343909E@gmail.com>

On 12-8-2012 22:10, Wolfgang Schuster wrote:
>
> Am 12.08.2012 um 21:48 schrieb Steffen Wolfrum <context@st.estfiles.de>:
>
>> Hi,
>>
>> please have a look at this minimal example below:
>> you'll find three formulas (1), (4), (5)
>>
>> What happen to (2)  and (3)?
>>
>> Steffen
>> .......
>>
>> \starttext
>>
>> \placeformula \startformula a+b=c \stopformula
>>
>> \bTABLE[frame=on,align=right,width=fit,style={\switchtobodyfont[9pt]}]
>> \bTR
>> \bTD[width=35mm]
>> \placeformula
>> \startformula c-a=b
>> \stopformula
>> \eTD
>> \eTR
>> \eTABLE
>>
>> \placeformula \startformula c-b=a \stopformula
>>
>> \stoptext
>
> It’s a bug in the formula numbering. Natural tables perform three runs on the table
> content to calculate the cell size but formula etc. counters shouldn’t be increases
> in the first two runs.

It's always hard to predict side effects (as we can have more data being 
involved; also. not incrementing will give the wrong number and 
therefore the wrong size calculations.  Something like the following can 
be used for testing:

\let\strc_formulas_handle_numbering_indeed 
\strc_formulas_handle_numbering
\let\strc_formulas_handle_sub_numbering_indeed\strc_formulas_handle_sub_numbering
\let\strc_formulas_handle_sub_number_indeed 
\strc_formulas_handle_sub_number

\def\strc_formulas_handle_numbering
   {\iftrialtypesetting
      \strc_counters_save\v!formula
      \strc_formulas_handle_numbering_indeed
      \strc_counters_restore\v!formula
    \else
      \strc_formulas_handle_numbering_indeed
    \fi}

\def\strc_formulas_handle_sub_numbering
   {\iftrialtypesetting
      \strc_counters_save\v!formula
      \strc_formulas_handle_sub_numbering
      \strc_counters_restore\v!formula
    \else
      \strc_formulas_handle_sub_numbering
    \fi}

\def\strc_formulas_handle_sub_number % sub formulas
   {\iftrialtypesetting
      \strc_counters_save\v!formula
      \strc_formulas_handle_sub_number_indeed
      \strc_counters_restore\v!formula
    \else
      \strc_formulas_handle_sub_number_indeed
    \fi}


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


      parent reply	other threads:[~2012-08-12 22:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-12 19:48 Steffen Wolfrum
2012-08-12 20:10 ` Wolfgang Schuster
2012-08-12 20:19   ` Steffen Wolfrum
2012-08-12 20:33     ` Wolfgang Schuster
2012-08-12 20:42       ` Steffen Wolfrum
2012-08-12 22:39   ` Hans Hagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50283086.6060601@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    --cc=wolfgang.schuster@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).