ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Wrap figures and equations
Date: Wed, 13 Jul 2016 22:39:06 +0200	[thread overview]
Message-ID: <6F70BA1F-0EAF-47D6-9E1D-5A83F9461452@gmail.com> (raw)
In-Reply-To: <57866BC7.90707@gmail.com>

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

      parent reply	other threads:[~2016-07-13 20:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 16:26 Wolfgang Schuster
2016-07-13 20:08 ` Hans Hagen
2016-07-13 20:39 ` Otared Kavian [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6F70BA1F-0EAF-47D6-9E1D-5A83F9461452@gmail.com \
    --to=otared@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).