ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Wrap figures and equations
@ 2016-07-13 16:26 Wolfgang Schuster
  2016-07-13 20:08 ` Hans Hagen
  2016-07-13 20:39 ` Otared Kavian
  0 siblings, 2 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2016-07-13 16:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Wrap figures and equations
  2016-07-13 16:26 Wrap figures and equations Wolfgang Schuster
@ 2016-07-13 20:08 ` Hans Hagen
  2016-07-13 20:39 ` Otared Kavian
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2016-07-13 20:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Hi Wolfgang,

> 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

it's more a missing state check ... can you check the beta?

\unexpanded\def\beforedisplayspace
   {.......
    \page_sides_check_floats_indeed} % probably needs more


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Wrap figures and equations
  2016-07-13 16:26 Wrap figures and equations Wolfgang Schuster
  2016-07-13 20:08 ` Hans Hagen
@ 2016-07-13 20:39 ` Otared Kavian
  1 sibling, 0 replies; 3+ messages in thread
From: Otared Kavian @ 2016-07-13 20:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1747 bytes --]

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


[-- Attachment #2: bug-placeformula-float.pdf --]
[-- Type: application/pdf, Size: 21786 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1143 bytes --]



> On 13 Jul 2016, at 18:26, Wolfgang Schuster <schuster.wolfgang@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@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
> ___________________________________________________________________________________


[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-13 20:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-13 16:26 Wrap figures and equations Wolfgang Schuster
2016-07-13 20:08 ` Hans Hagen
2016-07-13 20:39 ` Otared Kavian

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).