Hi Hans,

below is a simple patch for a error which is generated by the example at the end of the mail.

\unexpanded\def\strc_formulas_start_formula_indeed[#1][#2]% setting leftskip adaption is slow !
{\bgroup % HERE
\def\currentformula{#1}%
\dostarttaggedchained\t!formula\currentformula\??formula
\the\everybeforedisplayformula
\setfalse\c_strc_formulas_tight
%\formulastrutdp\strutdepth
%\formulastrutht\strutheight
\d_strc_formulas_display_skip_left \leftskip
\d_strc_formulas_display_skip_right \rightskip
\d_strc_formulas_display_width \formulaparameter\c!width\relax
\d_strc_formulas_display_margin_left \formulaparameter\c!leftmargin \relax
\d_strc_formulas_display_margin_right\formulaparameter\c!rightmargin\relax
\edef\p_option{\formulaparameter\c!option}%
- \edef\p_option{\ifx\p_option\empty\else\p_option,\fi#2}%
+ \ifsecondargument
+ \edef\p_option{\ifx\p_option\empty\else\p_option,\fi#2}%
+ \fi
\ifx\p_option\empty \else
\rawprocesscommacommand[\p_option]\strc_formulas_option
\fi
\edef\p_margin{\formulaparameter\c!margin}%
\ifx\p_margin\empty \else
\dosetleftskipadaption\p_margin
\d_strc_formulas_display_margin_left\leftskipadaption
\fi
\let\strc_formulas_start_formula\strc_formulas_start_formula_nested
\strc_formulas_forget_display_skips
\csname\e!start\formulaparameter\c!alternative\v!formula\endcsname}


%% begin example
\defineformula[pagella][option=pagella]

\starttext

% this works
%\startformula[pagella]
% c^2 = a^2 + b^2
%\stopformula

% this doesn’t
\startpagellaformula
c^2 = a^2 + b^2
\stoppagellaformula

\stoptext
%% end example

Wolfgang
_______________________________________________
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context

Reply via email to