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 
<[email protected]> wrote:

Aditya Mahajan <mailto:[email protected]>
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:[email protected]
Pontex s. r. o.      | mailto:[email protected] | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

Attachment: strc-mat.mkiv
Description: Binary data

Attachment: SubForm3.mkiv
Description: Binary data

Attachment: SubForm3.pdf
Description: Adobe PDF document

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 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
___________________________________________________________________________________

Reply via email to