displayed formula confuses parshape around figure
![](https://secure.gravatar.com/avatar/b16ca16bcbc474a1ba15813999e212da.jpg?s=120&d=mm&r=g)
In the following small example, two squares are cut out of the long paragraph. The first is where the external figure belongs and goes, so no problem with that. But the second removed square is after the displayed equation, and it shouldn't be removed. If I comment out the formula, then the paragraph shape is fine. If I make add a \placeformula before the \startformula, then the equation number goes where it should (below the right edge of the figure), but the area below it is still whitespace. Is it a bug or is there an option to make startformula not interfere with the paragraph shape calculation? I'm using context version: 2006.08.08 21:51, and I found the same problem just now on the live ConTeXt. \starttext \placefigure[right,none]{}{\externalfigure[dummy]} \input tufte \startformula A = a^\alpha b^\beta, \stopformula \input tufte \input tufte \stoptext -Sanjoy
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
On Wed, 20 Sep 2006 01:15:35 -0400
Sanjoy Mahajan
In the following small example, two squares are cut out of the long paragraph. The first is where the external figure belongs and goes, so no problem with that. But the second removed square is after the displayed equation, and it shouldn't be removed. If I comment out the formula, then the paragraph shape is fine.
If I make add a \placeformula before the \startformula, then the equation number goes where it should (below the right edge of the figure), but the area below it is still whitespace.
Is it a bug or is there an option to make startformula not interfere with the paragraph shape calculation?
I'm using context version: 2006.08.08 21:51, and I found the same problem just now on the live ConTeXt.
\starttext \placefigure[right,none]{}{\externalfigure[dummy]}
\input tufte \startformula <-- \par or empty line A = a^\alpha b^\beta, \stopformula \input tufte \input tufte
\stoptext
-Sanjoy
It works for me if put a \par or a empty line after the first \input. Wolfgang
![](https://secure.gravatar.com/avatar/b16ca16bcbc474a1ba15813999e212da.jpg?s=120&d=mm&r=g)
It works for me if put a \par or a empty line after the first \input.
That's true, but doing so ends the paragraph. Shouldn't the displayed math be part of the paragraph? The \input tufte's were just to make the minimal example. It came from a paragraph with text and math that begins with a figure: \placefigure[right,none]{}{\externalfigure[dummy]} Then lots of text about the figure, leading up to \startformula this equation \stopformula then more text discussing the equation... -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
On Wed, 20 Sep 2006 14:36:33 +0100
Sanjoy Mahajan
It works for me if put a \par or a empty line after the first \input.
That's true, but doing so ends the paragraph. Shouldn't the displayed math be part of the paragraph? The \input tufte's were just to make the minimal example. It came from a paragraph with text and math that begins with a figure:
\placefigure[right,none]{}{\externalfigure[dummy]}
Then lots of text about the figure, leading up to \startformula this equation \stopformula then more text discussing the equation...
-Sanjoy
Ok, I playes yesterday I bit with your example and can you give now a solution for your problem. \starttext % This works \hangindent4cm \hangafter-3 \input tufte $$ A = a^\alpha b^\beta, $$ \input tufte \blank[line] % The group around the formula produces the error. I tried this also % with plain TeX and I worked without problems. A ConTeXt bug. \hangindent4cm \hangafter-3 \input tufte \bgroup $$ A = a^\alpha b^\beta, $$ \egroup \input tufte % Test if my path works also with intending %\setupindenting[yes,medium] %\setupformulas[indentnext=yes] % Patch for startformula/s, look a hangindent and hangafter. \unprotect \def\dostopformula {\doplaceformulanumber \getvalue{\e!stop\formulaparameter\c!alternative\v!formula}% \resetlastlinewidth \nonoindentation \dochecknextindentation{\??fm\currentformula}% \egroup \hangafter\minusone % added \hangindent\zeropoint % added \setfalse\handleformulanumber \dorechecknextindentation} % here ? \def\startformulas#1\stopformulas % new / to be internationalized {\bgroup \forgetdisplayskips \startdisplaymath \setlocalhsize \long\def\startformula##1\stopformula{\advance\scratchcounter \plusone}% \scratchcounter\zerocount #1% preroll \divide \hsize \scratchcounter \hbox to \localhsize \bgroup \hss \def\normalstartformula{\vskip-\strutdepth$$}% i hate this \def\normalstartformula{\vskip-\strutdepth$$}% i hate this \def\normalstopformula {$$}% \def\startformula{$\vcenter\bgroup\normalstartformula}% \def\stopformula {\normalstopformula\egroup$\hss}% #1% \egroup \stopdisplaymath \egroup \hangafter\minusone % added \hangindent\zeropoint} % added \protect % No longer a problem, my patch works. \hangindent4cm \hangafter-3 \input tufte \startformula A = a^\alpha b^\beta, \stopformula \input tufte \blank[line] \hangindent4cm \hangafter-3 \input tufte \startformulas \startformula A = a^\alpha b^\beta, \stopformula \stopformulas \input tufte \stoptext Wolfgang
![](https://secure.gravatar.com/avatar/b16ca16bcbc474a1ba15813999e212da.jpg?s=120&d=mm&r=g)
[this bounced before, I think due to disk space being used up on the
mailman server. Hopefully you don't get it twice]
Wolfgang Schuster
Ok, I played yesterday I bit with your example and can you give now a solution for your problem.
At first I thought I'd need to include \hangindent and \hangafter to use it, but then I realized that you were using those comands for simulating the figure inclusion. I put your patch at the start of my test file using the dummy figure, and it works great. Thanks! I'll keep using it and let you know if I notice any side effects, but hopefully it can go into the distribution. -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
![](https://secure.gravatar.com/avatar/73e83abe26320559cc17517ebe99876c.jpg?s=120&d=mm&r=g)
Dear Sirs, I need to prepare a letter to send to hundred persons but I don't find a working example for use with a address database in xml format. Can you post a small example, please? I had read the manual named xcorres.pdf, but the examples don't work for me and I don't know what I'm doing in wrong way. Thanks a lot Have a nice night Jorge
![](https://secure.gravatar.com/avatar/d7a5b83b6ac73773980f3ee00fdd24b6.jpg?s=120&d=mm&r=g)
See attached sample files. I tried them, and got a correct pdf. Regards, Robert
![](https://secure.gravatar.com/avatar/73e83abe26320559cc17517ebe99876c.jpg?s=120&d=mm&r=g)
Robert, Many thanks for your reply. I tried to make "texexec letter-sample.tex" but I got "no pages of output". What I'm doing in the wrong way? Jorge
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
On Sat, 23 Sep 2006 10:53:43 +0100
Jorge Manuel de Almeida Magalhães
Robert,
Many thanks for your reply. I tried to make "texexec letter-sample.tex" but I got "no pages of output". What I'm doing in the wrong way?
Jorge
Dou you have the file m-letter.tex on your system installed, it's not part of the ConTeXt-Distribution. Look in the log-file if there is a message m-letter.tex not found or something else. Wolfgang
![](https://secure.gravatar.com/avatar/5d334e03463c666df0117ff45732e510.jpg?s=120&d=mm&r=g)
Dear Sirs, In my letters I tried to include some notes after the closing part. I use the m-letter module and xcorres: \startsetups[letter:appendices] My notes for my all students \stopsetups But in this way the appendice is only placed in the head of the first letter. If I try changing the closing definition in m-letter.tex module all works fine. \startsetups [letter:place:closing] \endgraf \setups[letter:closing] \endgraf %\EnglishRule My notes for my all students \stopsetups This is a bug? Jorge
![](https://secure.gravatar.com/avatar/5d334e03463c666df0117ff45732e510.jpg?s=120&d=mm&r=g)
Dear Sirs, I want to prepare a forma for handwriting filling. With this propose e use \blackrule command for trace some lines inside paragraphs. For example, I, \blackrule[width=5cm, height=0.05cm] , promise maintain a good... In the pdf document appears: I, !max___________________ , promise maintain a good... Are there a good reason for that? Thanks Jorge
![](https://secure.gravatar.com/avatar/44ca9eda7aaa681c0e3b3e90125c56b0.jpg?s=120&d=mm&r=g)
Hi Jorge, batela wrote:
Dear Sirs,
I want to prepare a forma for handwriting filling. With this propose e use \blackrule command for trace some lines inside paragraphs. For example,
I, \blackrule[width=5cm, height=0.05cm] , promise maintain a good...
In the pdf document appears: I, *!max*___________________ , promise maintain a good...
Are there a good reason for that?
Which beta version do you use (texexec --version)? If it's not the latest one (17.09.) simply update to that version. This bug (typo) was fixed some beta versions ago. Greetings, Peter
Thanks
Jorge
------------------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Peter Rolf wrote:
Hi Jorge,
batela wrote:
Dear Sirs,
I want to prepare a forma for handwriting filling. With this propose e use \blackrule command for trace some lines inside paragraphs. For example,
I, \blackrule[width=5cm, height=0.05cm] , promise maintain a good...
In the pdf document appears: I, *!max*___________________ , promise maintain a good...
Are there a good reason for that?
Which beta version do you use (texexec --version)? If it's not the latest one (17.09.) simply update to that version. This bug (typo) was fixed some beta versions ago.
normally this !xxx kind of errors point to a missing \protect Hans -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/44ca9eda7aaa681c0e3b3e90125c56b0.jpg?s=120&d=mm&r=g)
Hans Hagen wrote:
Peter Rolf wrote:
Hi Jorge,
batela wrote:
Dear Sirs,
I want to prepare a forma for handwriting filling. With this propose e use \blackrule command for trace some lines inside paragraphs. For example,
I, \blackrule[width=5cm, height=0.05cm] , promise maintain a good...
In the pdf document appears: I, *!max*___________________ , promise maintain a good...
Are there a good reason for that?
Which beta version do you use (texexec --version)? If it's not the latest one (17.09.) simply update to that version. This bug (typo) was fixed some beta versions ago.
normally this !xxx kind of errors point to a missing \protect
But in this case I had the same error in a prior beta. And if I remember it right, \blackrule works in the current stable version (and older ones). This is from a mail I sent you on 31.08. [..] \def\doblackrule[#1]% {\hbox\bgroup \getparameters[\??bj][#1]% \setstrut \doif\@@bjwidth\ v!max{\def\@@bjwidth {1em}}% ^^^^ I had the text "!max" in one of my gfx :) [..] The typo was corrected in the following beta version. This is the reason why I think Jorge uses an older beta. Peter
Hans
![](https://secure.gravatar.com/avatar/5d334e03463c666df0117ff45732e510.jpg?s=120&d=mm&r=g)
Dear Sirs, I had updated my context version and now all works fine. Thanks to all Jorge Em 24/09/2006, às 9:07, Peter Rolf escreveu:
Hans Hagen wrote:
Peter Rolf wrote:
Hi Jorge,
batela wrote:
Dear Sirs,
I want to prepare a forma for handwriting filling. With this propose e use \blackrule command for trace some lines inside paragraphs. For example,
I, \blackrule[width=5cm, height=0.05cm] , promise maintain a good...
In the pdf document appears: I, *!max*___________________ , promise maintain a good...
Are there a good reason for that?
Which beta version do you use (texexec --version)? If it's not the latest one (17.09.) simply update to that version. This bug (typo) was fixed some beta versions ago.
normally this !xxx kind of errors point to a missing \protect
But in this case I had the same error in a prior beta. And if I remember it right, \blackrule works in the current stable version (and older ones).
This is from a mail I sent you on 31.08.
[..]
\def\doblackrule[#1]% {\hbox\bgroup \getparameters[\??bj][#1]% \setstrut \doif\@@bjwidth\ v!max{\def\@@bjwidth {1em}}% ^^^^ I had the text "!max" in one of my gfx :)
[..]
The typo was corrected in the following beta version. This is the reason why I think Jorge uses an older beta.
Peter
Hans
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Um Abraço, Jorge Magalhães
participants (7)
-
batela
-
Hans Hagen
-
Jorge Manuel de Almeida Magalhães
-
Peter Rolf
-
r.ermers@hccnet.nl
-
Sanjoy Mahajan
-
Wolfgang Schuster