[NTG-context] Numbering subformulas

Procházka Lukáš Ing. - Pontex s. r. o. LPr at pontex.cz
Thu Aug 6 11:32:05 CEST 2015


Hello Wolfgang,

thank you for the patch (not in today's beta); I also attach the modified strc-mat.mkiv and a test file.

Two questions:

1.

What exactly are

   %\startsubformulas[+]       % These two options for \subformulas
   %\startsubformulas[mylabel] % enable subnumbers for the formulas

intended for?

The simple "\startsubformulas[eq:b]" meets my needs (subformulas are sub-numbered) and I can't see any difference to "\startsubformulas[+]".

2.

Is there a way to setup numbering subformulas to "(1a)" form instead of "(1.a)", i.e. set the separator to ""?

Best regards,

Lukas


On Thu, 06 Aug 2015 01:25:10 +0200, Wolfgang Schuster <schuster.wolfgang at gmail.com> wrote:

>> Aditya Mahajan <mailto:adityam at umich.edu>
>> 4. August 2015 02:08
>> On Mon, 3 Aug 2015, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
>>
>>
>> I am not sure when the subformula numbering broke, but I can confirm
>> that it is not working with the latest beta.
> You have to make three changes in strc-mat.mkiv to fix subformula numbering.
>
> The first change is necessary to show the even when there isn’t a
> argument for \startsubformulas.
>
> The second change is necessary to prevent context from reseting the mode
> for subnumbers
> at the end of each formula.
>
> The changes in \stopsubfomulas is necessary because of the test in
> \everyresetformulas.
>
>
> \def\strc_formulas_number_indeed
>    {\ifconditional\c_strc_formulas_handle_number
>       \hbox\bgroup
>         % main counter
>         \ifconditional\c_strc_formulas_inside_formulas_sub
>           % nothing
>         \else
>           \ifcase\c_strc_formulas_number_mode
>             \ifcase\c_strc_formulas_place_number_mode
>               \strc_formulas_handle_numbering
>             \or
>               \strc_formulas_handle_numbering
>             \or
>               % nothing
>             \or
>               \strc_formulas_handle_numbering
>             \fi
>           \or
>             \strc_formulas_handle_numbering
>           \or
>             % nothing
>           \or
>             \strc_formulas_handle_numbering
>           \fi
>         \fi
>         % subcounter
>         \ifconditional\c_strc_formulas_inside_formulas_sub
>           \ifcase\c_strc_formulas_sub_number_mode
> -          % nothing
> +          \strc_formulas_handle_sub_numbering
>           \or
>             \strc_formulas_handle_sub_numbering
>           \or
>             % nothing
>           \or
>             \strc_formulas_handle_sub_numbering
>           \fi
>         \fi
>        \strc_formulas_reference_trace
>       \egroup
>     \fi}
>
> \appendtoks
>      \c_strc_formulas_place_number_mode \zerocount
>      \c_strc_formulas_number_mode       \zerocount
> -   \c_strc_formulas_sub_number_mode   \zerocount
> +   \ifconditional\c_strc_formulas_inside_formulas_sub \else
> +       \c_strc_formulas_sub_number_mode\zerocount
> +   \fi
>      \c_strc_formulas_nested_number_mode\zerocount
> \to \everyresetformulas
>
> \unexpanded\def\stopsubformulas
>    {\nonoindentation
>     \useindentnextparameter\subformulaparameter
> -  \the\everyresetformulas % to be checked
>     \global\setfalse\c_strc_formulas_inside_formulas_sub
> +  \the\everyresetformulas % to be checked
>     \dorechecknextindentation} % here ?
>
>
> %%%% begin example
> \usemodule[visual]
>
> \starttext
>
> \placeformula
> \startformula
> \fakeformula
> \stopformula
>
> %\startsubformulas[+]       % These two options for \subformulas
> %\startsubformulas[mylabel] % enable subnumbers for the formulas
> \startsubformulas
>
>      \placeformula
>      \startformula
>      \fakeformula
>      \stopformula
>
>      \placeformula
>      \startformula
>      \fakeformula
>      \stopformula
>
> \stopsubformulas
>
> \stoptext
> %%%% end example
>
>
> Wolfgang
>


-- 
Ing. Lukáš Procházka | mailto:LPr at pontex.cz
Pontex s. r. o.      | mailto:pontex at pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strc-mat.mkiv
Type: application/octet-stream
Size: 29918 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150806/8da2c870/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SubForm3.mkiv
Type: application/octet-stream
Size: 577 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150806/8da2c870/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SubForm3.pdf
Type: application/pdf
Size: 9006 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150806/8da2c870/attachment-0001.pdf>


More information about the ntg-context mailing list