\indenting[next] and math => no vertical space before the formula
![](https://secure.gravatar.com/avatar/3d131c6a351a6b0092c19b389bd99cf0.jpg?s=120&d=mm&r=g)
Dear all, I have a problem with \indenting[next] combined with math formulas. Look at the example below. The space between the text above the formula and the formula is way to small. This goes away if I change next to for example yes. Btw, this happens on my TeXLive 2007 on ubuntu at home, my ConTeXt minimal from 2007-04-03 at work and on live.contextgarden.net (with pdfTeX but not LuaTeX). Do I misuse the indenting macros? Thanks, Micke P % test file \setupindenting[yes,small] \indenting[next] \starttext Hello World! This is just some dumb text to show the problem. \startformula a=b \stopformula Goodbye World! The space below the formula is OK. \stoptext
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
On Thu, Apr 24, 2008 at 12:15 PM, Mikael Persson
Dear all,
I have a problem with \indenting[next] combined with math formulas. Look at the example below. The space between the text above the formula and the formula is way to small. This goes away if I change next to for example yes.
Btw, this happens on my TeXLive 2007 on ubuntu at home, my ConTeXt minimal from 2007-04-03 at work and on live.contextgarden.net (with pdfTeX but not LuaTeX).
Do I misuse the indenting macros?
Thanks, Micke P
% test file \setupindenting[yes,small] \indenting[next]
\starttext Hello World! This is just some dumb text to show the problem. \startformula a=b \stopformula Goodbye World! The space below the formula is OK. \stoptext
I could reproduce the result and have also a fix but I don't know what the correct reults should be and other people like Aditya should decide if it makes sense to change the current behaviour. \def\startdisplaymath {\ifgridsnapping \beforedisplayspace \snapmathtogrid\vbox \bgroup \informulatrue %\forgetall % breaks side floats \else \bgroup \parskip\formulaparskip % ! ! \informulatrue %\forgetall % otherwise backgrounds fail \ifdim\lastskip<\zeropoint\else \par \ifvmode \ifdim\parskip>\zeropoint\relax \whitespace \vskip-\parskip % kind of forces and cancels again \fi \fi \fi \doif\displaygridcorrection{-\v!top}{\kern-\strutht}% new, currently only option/default \beforedisplayspace \par \ifvmode \ifindentfirstparagraph \verticalstrut \vskip-\struttotal \vskip-\baselineskip \fi \fi \fi $$\setdisplaydimensions \setpredisplaysize\lastlinewidth \startinnermath} I added the \ifindentfirstparagraph test before the last skip upwards is executed. Wolfgang
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Thu, 24 Apr 2008, Wolfgang Schuster wrote:
On Thu, Apr 24, 2008 at 12:15 PM, Mikael Persson
wrote: Dear all,
I have a problem with \indenting[next] combined with math formulas. Look at the example below. The space between the text above the formula and the formula is way to small. This goes away if I change next to for example yes.
Btw, this happens on my TeXLive 2007 on ubuntu at home, my ConTeXt minimal from 2007-04-03 at work and on live.contextgarden.net (with pdfTeX but not LuaTeX).
Do I misuse the indenting macros?
Thanks, Micke P
% test file \setupindenting[yes,small] \indenting[next]
\starttext Hello World! This is just some dumb text to show the problem. \startformula a=b \stopformula Goodbye World! The space below the formula is OK. \stoptext
I could reproduce the result and have also a fix but I don't know what the correct reults should be and other people like Aditya should decide if it makes sense to change the current behaviour.
The current behaviour is visually wrong, so it should be channged. I am not sure how. Hans, if you agree with Wolfgang's fix, I think it should be included in core-mat. Aditya
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Aditya Mahajan wrote:
Hans, if you agree with Wolfgang's fix, I think it should be included in core-mat.
i just wait till you send me a core-mat with fixes .. fixing whitespace is always a bit tricky ... test with/without whitespace as well as with grids 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/3d131c6a351a6b0092c19b389bd99cf0.jpg?s=120&d=mm&r=g)
Thank you Wolfgang, Aditya and Hans for your kind answers.
Today the new ubuntu was released, and I did upgrade. That was not too smart:
With the newer TeXLive in ubuntu 8.04 came an updated ConTeXt which
gave me the problem explained in
http://archive.contextgarden.net/message/20070830.154143.005528b8.en.html
again.
Since I am finishing my PhD thesis and really want to use the
utopia+fourier fonts, I downgraded to an old ConTeXt minimal for now.
I have not managed to get Wolfgang's solution to work (just tried to
copy that definition to my file, and that did not change the vertical
space. I will try to make the change in core-mat.tex now). However,
some questions remain:
1) I also tried the new context minimal with LuaTeX (to see if it
worked better there) and found out that the fourier fonts are not
included in the minimals anymore. Are there any plans to include them?
Or to make some kind of package with these and other nice free fonts?
2) Will the problem from
http://archive.contextgarden.net/message/20070830.154143.005528b8.en.html
go away in the near future (of new versions)? From the answers to that
question I did not really get if the problem was a big one or not.
Best Regards, Micke P
PS I am impressed by the speed of LuaTeX. It compiled my document in
~20s instead of 1-2 minutes.
On Thu, Apr 24, 2008 at 7:28 PM, Hans Hagen
Aditya Mahajan wrote:
Hans, if you agree with Wolfgang's fix, I think it should be included in core-mat.
i just wait till you send me a core-mat with fixes .. fixing whitespace is always a bit tricky ... test with/without whitespace as well as with grids
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 -----------------------------------------------------------------
___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Mikael Persson wrote:
1) I also tried the new context minimal with LuaTeX (to see if it worked better there) and found out that the fourier fonts are not included in the minimals anymore. Are there any plans to include them? Or to make some kind of package with these and other nice free fonts?
mojca will look into it (out of reach, mail etc now) since it came up last week
2) Will the problem from http://archive.contextgarden.net/message/20070830.154143.005528b8.en.html go away in the near future (of new versions)? From the answers to that question I did not really get if the problem was a big one or not.
depends on who wants to fix it -)
PS I am impressed by the speed of LuaTeX. It compiled my document in ~20s instead of 1-2 minutes.
Due to mplib or in general? Some parts of mkiv can still be sped up, e.g. xml processing, but there's not that much more to gain in font handling (that is ... we're playing with runtime mp fonts and there we can gain a lot when the new img related features show up). Also, some mechanisms will be reimplemented and as such be sped up. 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/3d131c6a351a6b0092c19b389bd99cf0.jpg?s=120&d=mm&r=g)
First, thank you Wolfgang, I tried to change it in the core-mat.tex and it looks great now!
1) I also tried the new context minimal with LuaTeX (to see if it worked better there) and found out that the fourier fonts are not included in the minimals anymore. Are there any plans to include them? Or to make some kind of package with these and other nice free fonts?
mojca will look into it (out of reach, mail etc now) since it came up last week
sounds great!
2) Will the problem from http://archive.contextgarden.net/message/20070830.154143.005528b8.en.html go away in the near future (of new versions)? From the answers to that question I did not really get if the problem was a big one or not.
depends on who wants to fix it -)
I don't know what to do (and I am not a programmer), but if there is some monkey-see-monkey-do work, I am happy to help.
PS I am impressed by the speed of LuaTeX. It compiled my document in ~20s instead of 1-2 minutes.
Due to mplib or in general? Some parts of mkiv can still be sped up, e.g. xml processing, but there's not that much more to gain in font handling (that is ... we're playing with runtime mp fonts and there we can gain a lot when the new img related features show up). Also, some mechanisms will be reimplemented and as such be sped up.
Hm, I hoped you would tell me why ;) The document is a math document with a lot of references, 5 different bibliographies. But no MetaPost graphics, just plain text + formulas. It is about 100 pages at the moment. Could it maybe be the fact that I am changing font? With LuaTeX I was using the lm fonts. I have a feeling it takes a bit longer to load other fonts, but that might just be a feeling from what is written in the terminal? Micke P
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Mikael Persson wrote:
First, thank you Wolfgang, I tried to change it in the core-mat.tex and it looks great now!
1) I also tried the new context minimal with LuaTeX (to see if it worked better there) and found out that the fourier fonts are not included in the minimals anymore. Are there any plans to include them? Or to make some kind of package with these and other nice free fonts?
mojca will look into it (out of reach, mail etc now) since it came up last week
sounds great!
2) Will the problem from http://archive.contextgarden.net/message/20070830.154143.005528b8.en.html go away in the near future (of new versions)? From the answers to that question I did not really get if the problem was a big one or not.
depends on who wants to fix it -)
I don't know what to do (and I am not a programmer), but if there is some monkey-see-monkey-do work, I am happy to help.
PS I am impressed by the speed of LuaTeX. It compiled my document in ~20s instead of 1-2 minutes.
Due to mplib or in general? Some parts of mkiv can still be sped up, e.g. xml processing, but there's not that much more to gain in font handling (that is ... we're playing with runtime mp fonts and there we can gain a lot when the new img related features show up). Also, some mechanisms will be reimplemented and as such be sped up.
Hm, I hoped you would tell me why ;) The document is a math document with a lot of references, 5 different bibliographies. But no MetaPost graphics, just plain text + formulas. It is about 100 pages at the moment. Could it maybe be the fact that I am changing font? With LuaTeX I was using the lm fonts. I have a feeling it takes a bit longer to load other fonts, but that might just be a feeling from what is written in the terminal?
mkiv needs less fonts but they may be bigger (more glyphs) at the end of a run you see the statistics, just write them down occasionally so that we can see the improvements other reasons can be that some mem bugs have been removed over time adn that mkiv share more data, so that overall less memory is needed which in turn gives less garbage collection try adding \usemodule[timing] to the top of the doc and one or more \ShowUsage {} \ShowMemoryUsage{} \ShowNodeUsage {} at the end ... it generates some pictures that show what takes most time ----------------------------------------------------------------- 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/3d131c6a351a6b0092c19b389bd99cf0.jpg?s=120&d=mm&r=g)
Hello again, * snip *
I could reproduce the result and have also a fix but I don't know what the correct reults should be and other people like Aditya should decide if it makes sense to change the current behaviour.
\def\startdisplaymath {\ifgridsnapping \beforedisplayspace \snapmathtogrid\vbox
* snip *
Wolfgang
This fix seems not to solve the problem entirely. With this fix applied, If one now put a formula inside an enumeration one gets "double" space before the formula. This is a test file that shows the problem: %%% Test file \setupindenting[yes,small] \indenting[next] \def\testtext{This is just some text so we see better what happens.} \def\testexpr{% \par \testtext \startformula f(x)= \sin(x) \stopformula \testtext \par } \defineenumeration[example] [text=Example, location=serried, width=fit, distance=0.5em, way=bysection, ] \starttext \testexpr % OK if fix is applied, otherwise to little space before the formula \startexample \testexpr % Too much space before the formula if the fix is applied, otherwise OK. \stopexample \stoptext %%% Stop testfile Best regards, Micke P PS Hans, I save the timing testing for next time I try LuaTeX.
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Mon, 28 Apr 2008, Mikael Persson wrote:
Hello again,
* snip *
I could reproduce the result and have also a fix but I don't know what the correct reults should be and other people like Aditya should decide if it makes sense to change the current behaviour.
\def\startdisplaymath {\ifgridsnapping \beforedisplayspace \snapmathtogrid\vbox
* snip *
Wolfgang
This fix seems not to solve the problem entirely. With this fix applied, If one now put a formula inside an enumeration one gets "double" space before the formula. This is a test file that shows the problem:
This is basically because in enumerations indenting is set to never. You can see the same affect with \setupindenting[no] \testtext One possible fix is to add indenting=(reset|next|first) %default is never to the \setupenumeration command. For example
\defineenumeration[example] [text=Example, location=serried, width=fit, indenting=reset, %%<<<---- Add This distance=0.5em, way=bysection, ]
Another is to change \startdisplaymath to \def\startdisplaymath {\ifgridsnapping \beforedisplayspace \snapmathtogrid\vbox \bgroup \informulatrue %\forgetall % breaks side floats \else \bgroup \parskip\formulaparskip % ! ! \informulatrue %\forgetall % otherwise backgrounds fail \ifdim\lastskip<\zeropoint\else \par \ifvmode \ifdim\parskip>\zeropoint\relax \whitespace \vskip-\parskip % kind of forces and cancels again \fi \fi \fi \doif\displaygridcorrection{-\v!top}{\kern-\strutht}% new, currently only option/default \beforedisplayspace \par \ifvmode \ifdim\parskip>\zeropoint\relax \else \ifindentfirstparagraph \verticalstrut \vskip-\struttotal \vskip-\baselineskip \fi\fi \fi \fi $$\setdisplaydimensions \setpredisplaysize\lastlinewidth \startinnermath} But this is getting ugly. Aditya
![](https://secure.gravatar.com/avatar/3d131c6a351a6b0092c19b389bd99cf0.jpg?s=120&d=mm&r=g)
On Tue, Apr 29, 2008 at 6:49 AM, Aditya Mahajan
On Mon, 28 Apr 2008, Mikael Persson wrote:
Hello again,
* snip *
I could reproduce the result and have also a fix but I don't know what the correct reults should be and other people like Aditya should decide if it makes sense to change the current behaviour.
\def\startdisplaymath {\ifgridsnapping \beforedisplayspace \snapmathtogrid\vbox
* snip *
Wolfgang
This fix seems not to solve the problem entirely. With this fix applied, If one now put a formula inside an enumeration one gets "double" space before the formula. This is a test file that shows the problem:
This is basically because in enumerations indenting is set to never.
You can see the same affect with
\setupindenting[no] \testtext
One possible fix is to add
indenting=(reset|next|first) %default is never
to the \setupenumeration command. For example
\defineenumeration[example] [text=Example, location=serried, width=fit, indenting=reset, %%<<<---- Add This
distance=0.5em, way=bysection, ]
Another is to change \startdisplaymath to
\def\startdisplaymath {\ifgridsnapping \beforedisplayspace \snapmathtogrid\vbox
\bgroup \informulatrue %\forgetall % breaks side floats \else \bgroup \parskip\formulaparskip % ! ! \informulatrue %\forgetall % otherwise backgrounds fail \ifdim\lastskip<\zeropoint\else \par \ifvmode \ifdim\parskip>\zeropoint\relax \whitespace \vskip-\parskip % kind of forces and cancels again \fi \fi \fi \doif\displaygridcorrection{-\v!top}{\kern-\strutht}% new, currently only option/default \beforedisplayspace \par \ifvmode \ifdim\parskip>\zeropoint\relax \else
\ifindentfirstparagraph \verticalstrut \vskip-\struttotal \vskip-\baselineskip \fi\fi \fi \fi $$\setdisplaydimensions \setpredisplaysize\lastlinewidth \startinnermath}
But this is getting ugly.
Aditya
Thank you Aditya, but I don't get that to work. Both with ConTeXt ver: 2007.04.03 13:01 MKII fmt: 2008.4.24 int: english/english (with the fix earlier in this thread) and ConTeXt ver: 2007.09.28 16:52 MKII fmt: 2008.4.24 int: english/english (which is the one from new ubuntu, without the fix) this fails with the following error msg: %% Start error msg ! Illegal unit of measure (pt inserted). <to be read again> \chardef \@@in:reset ...rue \parindent \zerocount \chardef \indentingtoggle \zerocount \next1 #1,->\docomplexsetupindentingB {#1} \doprocesscommaitem \doprocesscommalist ...item \gobbleoneargument #1, ]\relax \global \advance \... <argument> ...ndenting ]\docomplexsetupindentingB \checkeverypar \ifindentfi... \firstofoneargument #1->#1 ... l.29 \testexpr % Too much space before the formula if the fix is applied, ? %% Stop error msg The file that gives that error is: %% Begin file \setupindenting[yes,small] \indenting[next] \def\testtext{This is just some text so we see better what happens.} \def\testexpr{% \par \testtext \startformula f(x)= \sin(x) \stopformula \testtext \par } \defineenumeration[example] [text=Example, location=serried, width=fit, indenting=reset, distance=0.5em, way=bysection, ] \starttext \testexpr % OK if fix is applied, otherwise to little space before the formula \startexample \testexpr % Too much space before the formula if the fix is applied, otherwise OK. \stopexample \stoptext %% End file Best regards, Micke P
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Thank you Aditya, but I don't get that to work. Both with
ConTeXt ver: 2007.04.03 13:01 MKII fmt: 2008.4.24 int: english/english (with the fix earlier in this thread) and ConTeXt ver: 2007.09.28 16:52 MKII fmt: 2008.4.24 int: english/english (which is the one from new ubuntu, without the fix)
Update your ConTeXt istallation, both systems use old versions. Wolfgang
![](https://secure.gravatar.com/avatar/3d131c6a351a6b0092c19b389bd99cf0.jpg?s=120&d=mm&r=g)
On Wed, Apr 30, 2008 at 9:33 AM, Wolfgang Schuster
Thank you Aditya, but I don't get that to work. Both with
ConTeXt ver: 2007.04.03 13:01 MKII fmt: 2008.4.24 int: english/english (with the fix earlier in this thread) and ConTeXt ver: 2007.09.28 16:52 MKII fmt: 2008.4.24 int: english/english (which is the one from new ubuntu, without the fix)
Update your ConTeXt istallation, both systems use old versions.
Wolfgang
I wish I could. I cant even run the new version from ubuntu, since there is some problem with the fourier fonts, explained in an earlier mail in this thread (and also in an earlier post: http://archive.contextgarden.net/message/20070830.154143.005528b8.en.html ) And new minimals seem not to include the fourier fonts. If I set indenting=next (or first) in the enumeration, the file compiles... Sorry for "complaining" about old versions of ConTeXt. I am finishing my PhD thesis, and have not found any nice combinations of text and math fonts in the new minimals. (I am not too fond of the lm fonts). If you have a tip about such fonts, please tell me :) Micke P
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
On Wed, Apr 30, 2008 at 9:45 AM, Mikael Persson
On Wed, Apr 30, 2008 at 9:33 AM, Wolfgang Schuster
wrote: Thank you Aditya, but I don't get that to work. Both with
ConTeXt ver: 2007.04.03 13:01 MKII fmt: 2008.4.24 int: english/english (with the fix earlier in this thread) and ConTeXt ver: 2007.09.28 16:52 MKII fmt: 2008.4.24 int: english/english (which is the one from new ubuntu, without the fix)
Update your ConTeXt istallation, both systems use old versions.
Wolfgang
I wish I could. I cant even run the new version from ubuntu, since there is some problem with the fourier fonts, explained in an earlier mail in this thread (and also in an earlier post: http://archive.contextgarden.net/message/20070830.154143.005528b8.en.html)
No solution for this problem.
And new minimals seem not to include the fourier fonts.
If I set indenting=next (or first) in the enumeration, the file compiles...
Sorry for "complaining" about old versions of ConTeXt. I am finishing my PhD thesis, and have not found any nice combinations of text and math fonts in the new minimals. (I am not too fond of the lm fonts). If you have a tip about such fonts, please tell me :)
You don't have update your complete installation, cont-tmf.zip is enough for a new version but you also need the latest version of the latin modern fonts. Wolfgang
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Wed, 30 Apr 2008, Mikael Persson wrote:
On Tue, Apr 29, 2008 at 6:49 AM, Aditya Mahajan
wrote: On Mon, 28 Apr 2008, Mikael Persson wrote:
Hello again,
* snip *
I could reproduce the result and have also a fix but I don't know what the correct reults should be and other people like Aditya should decide if it makes sense to change the current behaviour.
\def\startdisplaymath {\ifgridsnapping \beforedisplayspace \snapmathtogrid\vbox
* snip *
Wolfgang
This fix seems not to solve the problem entirely. With this fix applied, If one now put a formula inside an enumeration one gets "double" space before the formula. This is a test file that shows the problem:
This is basically because in enumerations indenting is set to never.
You can see the same affect with
\setupindenting[no] \testtext
One possible fix is to add
indenting=(reset|next|first) %default is never
to the \setupenumeration command. For example
\defineenumeration[example] [text=Example, location=serried, width=fit, indenting=reset, %%<<<---- Add This
distance=0.5em, way=bysection, ]
Another is to change \startdisplaymath to
\def\startdisplaymath {\ifgridsnapping \beforedisplayspace \snapmathtogrid\vbox
\bgroup \informulatrue %\forgetall % breaks side floats \else \bgroup \parskip\formulaparskip % ! ! \informulatrue %\forgetall % otherwise backgrounds fail \ifdim\lastskip<\zeropoint\else \par \ifvmode \ifdim\parskip>\zeropoint\relax \whitespace \vskip-\parskip % kind of forces and cancels again \fi \fi \fi \doif\displaygridcorrection{-\v!top}{\kern-\strutht}% new, currently only option/default \beforedisplayspace \par \ifvmode \ifdim\parskip>\zeropoint\relax \else
\ifindentfirstparagraph \verticalstrut \vskip-\struttotal \vskip-\baselineskip \fi\fi \fi \fi $$\setdisplaydimensions \setpredisplaysize\lastlinewidth \startinnermath}
But this is getting ugly.
Aditya
Thank you Aditya, but I don't get that to work. Both with
ConTeXt ver: 2007.04.03 13:01 MKII fmt: 2008.4.24 int: english/english (with the fix earlier in this thread) and ConTeXt ver: 2007.09.28 16:52 MKII fmt: 2008.4.24 int: english/english (which is the one from new ubuntu, without the fix)
this fails with the following error msg:
%% Start error msg ! Illegal unit of measure (pt inserted). <to be read again> \chardef \@@in:reset ...rue \parindent \zerocount \chardef \indentingtoggle \zerocount \next1 #1,->\docomplexsetupindentingB {#1} \doprocesscommaitem \doprocesscommalist ...item \gobbleoneargument #1, ]\relax \global \advance \... <argument> ...ndenting ]\docomplexsetupindentingB \checkeverypar \ifindentfi...
\firstofoneargument #1->#1
An old bug (more than two month old :) Also add this \unprotect \defineindentingmethod [\v!reset] {\indentfirstparagraphtrue \parindent\zeropoint%AM was \zerocount \chardef\indentingtoggle\zerocount} \protect Aditya
![](https://secure.gravatar.com/avatar/3d131c6a351a6b0092c19b389bd99cf0.jpg?s=120&d=mm&r=g)
On Wed, Apr 30, 2008 at 7:02 PM, Aditya Mahajan
On Wed, 30 Apr 2008, Mikael Persson wrote:
On Tue, Apr 29, 2008 at 6:49 AM, Aditya Mahajan
wrote: On Mon, 28 Apr 2008, Mikael Persson wrote:
Hello again,
* snip *
I could reproduce the result and have also a fix but I don't know what the correct reults should be and other people like Aditya should decide if it makes sense to change the current behaviour.
\def\startdisplaymath {\ifgridsnapping \beforedisplayspace \snapmathtogrid\vbox
* snip *
Wolfgang
This fix seems not to solve the problem entirely. With this fix applied, If one now put a formula inside an enumeration one gets "double" space before the formula. This is a test file that shows the problem:
This is basically because in enumerations indenting is set to never.
You can see the same affect with
\setupindenting[no] \testtext
One possible fix is to add
indenting=(reset|next|first) %default is never
to the \setupenumeration command. For example
\defineenumeration[example] [text=Example, location=serried, width=fit, indenting=reset, %%<<<---- Add This
distance=0.5em, way=bysection, ]
Another is to change \startdisplaymath to
\def\startdisplaymath {\ifgridsnapping \beforedisplayspace \snapmathtogrid\vbox
\bgroup \informulatrue %\forgetall % breaks side floats \else \bgroup \parskip\formulaparskip % ! ! \informulatrue %\forgetall % otherwise backgrounds fail \ifdim\lastskip<\zeropoint\else \par \ifvmode \ifdim\parskip>\zeropoint\relax \whitespace \vskip-\parskip % kind of forces and cancels again \fi \fi \fi \doif\displaygridcorrection{-\v!top}{\kern-\strutht}% new, currently only option/default \beforedisplayspace \par \ifvmode \ifdim\parskip>\zeropoint\relax \else
\ifindentfirstparagraph \verticalstrut \vskip-\struttotal \vskip-\baselineskip \fi\fi \fi \fi $$\setdisplaydimensions \setpredisplaysize\lastlinewidth \startinnermath}
But this is getting ugly.
Aditya
Thank you Aditya, but I don't get that to work. Both with
ConTeXt ver: 2007.04.03 13:01 MKII fmt: 2008.4.24 int: english/english (with the fix earlier in this thread) and ConTeXt ver: 2007.09.28 16:52 MKII fmt: 2008.4.24 int: english/english (which is the one from new ubuntu, without the fix)
this fails with the following error msg:
%% Start error msg ! Illegal unit of measure (pt inserted). <to be read again> \chardef \@@in:reset ...rue \parindent \zerocount \chardef \indentingtoggle \zerocount \next1 #1,->\docomplexsetupindentingB {#1} \doprocesscommaitem \doprocesscommalist ...item \gobbleoneargument #1, ]\relax \global \advance \... <argument> ...ndenting ]\docomplexsetupindentingB \checkeverypar \ifindentfi...
\firstofoneargument #1->#1
An old bug (more than two month old :)
Also add this
\unprotect \defineindentingmethod [\v!reset] {\indentfirstparagraphtrue \parindent\zeropoint%AM was \zerocount \chardef\indentingtoggle\zerocount} \protect Aditya
Thank you Aditya (and also thank you Wolfgang!) Your help is really appreciated! Micke P
participants (4)
-
Aditya Mahajan
-
Hans Hagen
-
Mikael Persson
-
Wolfgang Schuster