[NTG-context] Wrap figures and equations

Otared Kavian otared at gmail.com
Wed Jul 13 22:39:06 CEST 2016


Hi Hans,

I was going to report a similar issue with \placeformula and floats in general, as in the example below. 
However the trick suggested by Wolfgang does not solve all the problems and in fact in my real size document it triggers an error message saying:

	\strc_formulas_flush_number ...\math_native_reqno 
                                                  {\box \b_strc_formulas_num...
	\strc_formulas_stop_formula ...mulas_flush_number 
                                                  \dostarttagged \t!formulac…

but it is very difficult to set up a minimal example showing this.

In any case here is an example showing the problem with \placeformula and floats, with its PDF attached.

Best regards: OK

% begin bug-placeformula-float.tex

\definefloat[intermezzo]
\setupfloat[intermezzo]
	[leftmargindistance=-12mm,
	rightmargindistance=-12mm,
	default=outer]

\setupcaption[intermezzo][location=none]

\defineframedtext[explication]
	[width=6cm,
	bodyfont=small,
	corner=round,
	frame=on,
	framecolor=darkred,
	rulethickness=1pt,
	background=color, %screen
	backgroundcolor=lightgray] %backgroundscreen=.9
	
\definestartstop[expli]
	[before={\startplaceintermezzo\startexplication},
	after={\stopexplication\stopplaceintermezzo}]
	
%\unprotected\c_strc_formulas_mode\zerocount %% <--- This solves the problem here
%% but not in other instances
\starttext
\startexpli
\input knuth.tex
\stopexpli
\input ward.tex
On dit que la loi de composition interne $\oplus$ est {\bf associative} si on a 
\startformula
\forall\, x,y,z \in G, \qquad x\oplus (y \oplus z) = (x\oplus y) \oplus z.
\stopformula
\input ward.tex

\input tufte.tex
\stoptext
% end bug-placeformula-float.tex

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug-placeformula-float.pdf
Type: application/pdf
Size: 21786 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20160713/a9fb1460/attachment-0001.pdf>
-------------- next part --------------


> On 13 Jul 2016, at 18:26, Wolfgang Schuster <schuster.wolfgang at gmail.com> wrote:
> 
> Hi Hans,
> 
> the following problem is from StackExchange [1] which can only be solved by changing
> the value of the \c_strc_formulas_mode counter which can’t be the right answer for this.
> 
> %\unprotected\c_strc_formulas_mode\zerocount
> 
> \starttext
> 
> \placefigure[right]{}{\blackrule[width=6cm,height=4cm]}
> \input ward
> \startformula
> d = vt
> \stopformula
> \input ward
> 
> \stoptext
> 
> [1] http://tex.stackexchange.com/questions/319157/context-wrap-figures-with-text-and-equations
> 
> Wolfgang
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context at 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
> ___________________________________________________________________________________



More information about the ntg-context mailing list