Typographical issues with the Maxima-plugin returning integral expressions in mathematical output

For my liking, the spacing before the d and the variable x that the Maxima-plugin generates is much too large:


I’d rather have this spacing of <space | 0.27em>


be replaced by <space | 0.24em> before the d and <space | 0.08em> before the variable x automatically by the plugin as


produces typographically more pleasing results:

So my question, where exactly (i.e in which of the plugin files) can this be fixed.

Cheers
Tilda

My guess is here:

1 Like

Thanks for your fast reply @jeroen! Does the LaTeX instruction \; translate into 0.27em? If I remember correctly, there are corresponding instructions \: and \, but I’ve forgotten which of then produce bigger or smaller horizontal spacing in math mode.

Is there a way to numerically define that?

Cheers
Tilda

You can check what spacing you will get by copying e.g. \; and then doing Paste from LaTeX.

1 Like

After checking as you suggested, @jeroen, I figured out that LaTeX \; does indeed translate into <space|0.27em>, \: into <space|0.22em> and \, into <space|0.17em>. The latter being obviously the delimiter the Reduce plugin uses.

Tilda

The spacing does look off to me as well. Perhaps you could file a bug report?

Dear @jeroen before I file a bug report to Savannah, I would like to ask your opinion.

I modified lines 111 and 116 of texmacs-maxima.lisp the following way:

(append l `("\\int {" ,@s1 "}{\\,\\mathd\\hspace{0.05em}" ,@var "}\\big.") r))

	    (append l `("\\int_{" ,@low "}^{" ,@hi "}{" ,@s1 "\\,\\mathd\\hspace{0.05em}" ,@var "}\\big.") r)

The plugin thus automatically creates <space | 0.17em> before the d and <space | 0.05em> before the variable x.


which produces typographically much better output than before:


What do you think?

Cheers
Tilda

That looks a lot better than the original :slightly_smiling_face:
It seems there is a multiplication appearing after the d and after sin(x), which probably adds some more space. The one before d is okay, but the one after is not necessary. It would be good to find out where it comes from. I just normally don’t use any additional spacing in integrals, I just have one multiplication before the d.

It does not come from the space before ,@var in ll. 111 and 116. of the above mentioned lisp file. I have no idea why Texmacs inserts a * in-between dx and after the function term. The reduce plugin btw. exhibits the same behaviour.

copy and pasting the rhs of the equation in the mathematically formatted output in (o%3) into a maxima input line yields

which is not quite the same as the original input integrate(x*sin(x),x).

Looks as if this is more than just a formatting issue.

should read: copy and pasting the lhs

I filed the bug report. For your reference: https://savannah.gnu.org/bugs/index.php?62488

1 Like