I recently needed to typeset a narrow column with some math, so very dificult to find break points resulting in acceptable looking lines. I found that the best solution would be achieved if I had, say, \mathsurround=0pt plus2pt, but \muthsurround is a dimen, not a skip. Is there any particular reason why it is not a glue? If there is not, it would be easy to implement, wouldn't it? --Javier
Javier Múgica de Rivera wrote:
I recently needed to typeset a narrow column with some math, so very dificult to find break points resulting in acceptable looking lines. I found that the best solution would be achieved if I had, say, \mathsurround=0pt plus2pt, but \muthsurround is a dimen, not a skip. Is there any particular reason why it is not a glue?
I've been thinking about that. I can't come up with a valid reason other than that dimens are easier to handle internally than skips, but I may have overlooked something.
If there is not, it would be easy to implement, wouldn't it?
Implementation would not be hard, afaict. Best, Taco
Taco Hoekwater
Javier Múgica de Rivera wrote:
I recently needed to typeset a narrow column with some math, so very dificult to find break points resulting in acceptable looking lines. I found that the best solution would be achieved if I had, say, \mathsurround=0pt plus2pt, but \muthsurround is a dimen, not a skip. Is there any particular reason why it is not a glue?
I've been thinking about that. I can't come up with a valid reason other than that dimens are easier to handle internally than skips, but I may have overlooked something.
If there is not, it would be easy to implement, wouldn't it?
Implementation would not be hard, afaict.
Skips require reference counting. That's quite a bookkeeping nuisance. -- David Kastrup
David Kastrup wrote:
If there is not, it would be easy to implement, wouldn't it? Implementation would not be hard, afaict.
Skips require reference counting. That's quite a bookkeeping nuisance.
That is possible, but not required. We can just as easy store the entire glue as fields inside the math nodes. For now, we should focus on whether or not a move from dimen to skip would have unwanted side-effects. Taco
Taco Hoekwater
David Kastrup wrote:
If there is not, it would be easy to implement, wouldn't it? Implementation would not be hard, afaict.
Skips require reference counting. That's quite a bookkeeping nuisance.
That is possible, but not required. We can just as easy store the entire glue as fields inside the math nodes. For now, we should focus on whether or not a move from dimen to skip would have unwanted side-effects.
I think that the mathsurround does not actually make it into the surrounding horizontal list explicitly. This might make it hard to let it partake in glue calculations properly. -- David Kastrup
When I wrote about \mathsurround I had also in mind another limitation, but this one seems much more dificult to change. It is the fact that we may only want the mathsurround glue to be inserted if the math formula would otherwise still be adjacent to a glue or a kern, not counting intermediate whatsits or penalties; or better, to have a \shortmathsurround for the other cases. It is even delicate to formaly define the rules we want to follow. For the moment I think it is enough if \mathsurround is changed to be a skip. However I will not forget about this idea. If muthsurround exists it should be possible to have it behave the way we would like (as authors). When I have looked at the tex sources and learned more about the internals I will try to look about it, but it is likely that this year I will have very few time.
participants (3)
-
David Kastrup
-
Javier Múgica de Rivera
-
Taco Hoekwater