Page MenuHomePhabricator

Add integral symbol with short horizontal bar in the middle (⨍,⨎)
Closed, ResolvedPublic

Description

An integral symbol with a short horizontal bar in the middle (for instance, the "\strokedint" or "\intbar" commands)

Event Timeline

see
https://de.wikipedia.org/wiki/Integralzeichen for the unicode symbols.
Technically this will be easy to implement. However, I'm not sure if there is really a demand. I created https://en.wikipedia.org/wiki/Wikipedia:Reference_desk/Mathematics#Missing_macros_in_.3Cmath_.2F.3E_environment to start a discussion.

ok. I'm going to add
⨍ U+2A0D finite part integral Integral mit endlichem Teil ⨍ ⨍ \dashint
⨎ U+2A0E integral with double stroke Integral mit Doppelstrich ⨎ ⨎ \ddashint
unless there are any objections?

Physikerwelt renamed this task from Add integral symbol with short horizontal bar in the middle to Add integral symbol with short horizontal bar in the middle (⨍,⨎).Jul 11 2017, 11:02 AM
Physikerwelt raised the priority of this task from Low to Medium.
Physikerwelt moved this task from Inbox to Needs clarification on the Math board.
Physikerwelt added subscribers: Pkra, fredw, Esanders, thiemowmde.

To the contrary, I should be most delighted!

@Mathmensch I think it's worthwhile to wait for https://github.com/mathjax/MathJax/pull/1723 to be resolved. That way MathML disabled browsers do not suffer from suboptimal spacing.

@Physikerwelt you should mention this issue on the MathJax tracker and we will very likely include it.

Unfortunately, the latest version of texvcjs allows the command, even though the underlying rendering engine does not support it. While this is documented in the mathoid doc, it currently does not create a meaningful error message when used.

Hello,
I am a bit confused. Is it now possible to use the average integral in (german) Wikipedia? I got an error while writing <math>\intbar</math> .

Hello,
I am a bit confused. Is it now possible to use the average integral in (german) Wikipedia? I got an error while writing <math>\intbar</math> .

I am looking into this right now. First, I am going to remove \strokeint command T348373. I will look into \intbar as next step.

@Christian1985 can you check if the intbar macro looks correct in the docu https://github.com/wikimedia/mediawiki-services-texvcjs/blob/master/doc/main.pdf . If so the next step is to find the equivalent utf-8 char and put it into the mathjax plugin

Hello @Physikerwelt
I think intbar corresponds to Unicode U+2A0D and is correctly represented in the PDF. The strokedint corresponds to the Unicode character U+2A0F. According to the German Wikipedia, the Unicode character is also called "integral average with slash". However, the mathematician and author Evans uses the Unicode character U+2A0D for the average integral in his books. I find that somewhat irritating.
https://de.wikipedia.org/wiki/Integralzeichen

Thank you. This is an excellent reference. However, it does not list \intbar. In the PDF the symbol was produced using the stix package, which was only added for this special command. Maybe a better way to move forward is to remove \intbar from texvcjs (it was never usable anyhow) and use \dashint instead.

What do you think?

I cannot find a preference for one command or the other. The German Wikipedia article lacks a source. I don't care whether you use the \intbar or \dashint command.

I cannot find a preference for one command or the other. The German Wikipedia article lacks a source. I don't care whether you use the \intbar or \dashint command.

Thank you. I am uncertain how to proceed. While technically all names are the same, I think it makes sense to choose the names for the macros in a way that feels canonical and consistent for the users.

ok. I'm going to add
⨍ U+2A0D finite part integral Integral mit endlichem Teil &#x2A0D; &#10765; \dashint
⨎ U+2A0E integral with double stroke Integral mit Doppelstrich &#x2A0E; &#10766; \ddashint
unless there are any objections?

I see that those two commands are already implemented on the MathJax side, I only need to add them in texvcjs and that's it.

Change 964177 had a related patch set uploaded (by Physikerwelt; author: Physikerwelt):

[mediawiki/services/texvcjs@master] Add \intBar command

https://gerrit.wikimedia.org/r/964177

Change 964178 had a related patch set uploaded (by Physikerwelt; author: Physikerwelt):

[mediawiki/services/mathjax@master] Rename dash and ddash to intbar and intBar

https://gerrit.wikimedia.org/r/964178

Change 964179 had a related patch set uploaded (by Physikerwelt; author: Physikerwelt):

[mediawiki/extensions/Math@master] Fix integral command namings

https://gerrit.wikimedia.org/r/964179

Status update: After careful consideration, I chose the stix macro names. It is well documented and allow to add more integral sings if we need them in the future https://mirror.physik.tu-berlin.de/pub/CTAN/fonts/stix/doc/stix.pdf

The basic stuff is implemented, but we need 3 review cycles to get this into production. This might take quite a while.

Would it be possible also to add the fint symbol?

All symbols from http://mirrors.ibiblio.org/CTAN/fonts/stix2-type1/stix2.pdf can be added with the same mechanism. However, I suggest to focus on the two symbols that were requested in 2016 first:-)

Change 964177 merged by jenkins-bot:

[mediawiki/services/texvcjs@master] Add \intBar command

https://gerrit.wikimedia.org/r/964177

Change 964178 merged by Physikerwelt:

[mediawiki/services/mathjax@master] Rename dash and ddash to intbar and intBar

https://gerrit.wikimedia.org/r/964178

Change 964179 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Fix integral command namings

https://gerrit.wikimedia.org/r/964179

Change 964541 had a related patch set uploaded (by Physikerwelt; author: Physikerwelt):

[mediawiki/services/mathjax-node@master] Release mathoid-mathjax-node 0.7.2

https://gerrit.wikimedia.org/r/964541

Change 964541 merged by Physikerwelt:

[mediawiki/services/mathjax-node@master] Release mathoid-mathjax-node 0.7.2

https://gerrit.wikimedia.org/r/964541

Change 964589 had a related patch set uploaded (by Stegmujo; author: Stegmujo):

[mediawiki/extensions/Math@master] Add intbar and intBar to MathML rendering

https://gerrit.wikimedia.org/r/964589

Change 964589 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Add intbar and intBar to MathML rendering

https://gerrit.wikimedia.org/r/964589

@Christian1985 can you please check on beta in https://de.wikipedia.beta.wmflabs.org/w/index.php?title=Intbar if that looks ok, we can deploy to production.

Due to the very fast implementation of @Stegmujo native rendering is ready, for community review.
Also a big thank you to @Stegmujo @Andreg-p and @Jdforrester-WMF for the code review.

All what remains to be done is

  • validate rendering by the community group
  • deploy new mathoid version to production
  • update documentation
Physikerwelt reopened this task as Open.
Physikerwelt moved this task from Needs clarification to Needs community consensus on the Math board.

Hallo @Physikerwelt ,
leider sehen die zwei neuen Integrale ziemlich kaputt aus.

Intbar.png (405×427 px, 24 KB)

Ich nutze die aktuelle Chrome-Version auf einem Ubuntu-Linux Betriebssystem.

Danke fürs testen. Da hast Du recht. Ich hatte es nur mit Firefox angeschaut

image.png (908×804 px, 101 KB)

(SVG mode)

{F38189939}
(native mode)

@Physikerwelt bei mir sieht es im Firefox genauso aus wie im Chrome, außer die erste Zeile, die Du geschrieben hast. Da sind die beiden Integrale auch groß dargestellt. In Deinem Bild wäre es auch noch wünscheswert, wenn die Integralgrenze A näher am Integral stünde.

@Physikerwelt bei mir sieht es im Firefox genauso aus wie im Chrome, außer die erste Zeile, die Du geschrieben hast. Da sind die beiden Integrale auch groß dargestellt. In Deinem Bild wäre es auch noch wünscheswert, wenn die Integralgrenze A näher am Integral stünde.

Du meinst im textstyle, oder in beiden rendering varianten?

@Physikerwelt , die Zeile
intbar in native mode <math forcemathmode=native>\intbar \intBar</math>
erzeugt in Chrome kleine Integrale, die sich der normalen Zeilenhöhe anpassen und in meinem Firefox sehen die genauso aus, wie auf deinem Screenshot - also deutlich größer sind als die normale Zeilenhöhe.

@Physikerwelt , die Zeile
intbar in native mode <math forcemathmode=native>\intbar \intBar</math>
erzeugt in Chrome kleine Integrale, die sich der normalen Zeilenhöhe anpassen und in meinem Firefox sehen die genauso aus, wie auf deinem Screenshot - also deutlich größer sind als die normale Zeilenhöhe.

Und was wäre richtig? Sollte es größer sein?

Screenshot 2023-10-10 at 16.54.06.png (1×736 px, 164 KB)

Ich habe Mal selbst in Chrome gestestet, dort sieht das neue integral genauso (schlecht) aus wie andere Integrale die mit diesem meachanismus erzeugt werden.

@Physikerwelt , spontan denke ich, dass große Zeichen richtig wären. Ich habe auch mal
<math forcemathmode=native>\displaystyle \intbar \intBar</math>
getestet. Das wird bei mir in Chrome auch klein dargestellt, was ich so nicht erwartet hätte. Mit dem Native-Mode habe ich mich aber noch nie befasst. Das normale Integral wird auch groß dargestellt.

Ja, native-mode ist auch noch in der erprobungsphase. Das Problem mit dem schlechten SVG rendering ist ein Problem der alten MathJax 2 version , und wir können nicht updaten weil einige macros dann nicht funktionieren https://docs.mathjax.org/en/latest/input/tex/extensions/mediawiki-texvc.html . Von daher führt für alle Integral Symbole, wohl nur der Weg über das neue Rendering zum Ziel.

Change 964932 had a related patch set uploaded (by Physikerwelt; author: Physikerwelt):

[operations/deployment-charts@master] mathoid: update version

https://gerrit.wikimedia.org/r/964932

Change 964932 merged by jenkins-bot:

[operations/deployment-charts@master] mathoid: update version

https://gerrit.wikimedia.org/r/964932

  • deploy new mathoid version to production

Done.

I added some documentation.

I will close this task now, even though the SVG layout is not good at all, but this affects other integral symbols as well, thus I think it is better to discuss that as a separate issue.