LaTeX math support?

80 views
Skip to first unread message

fooba...@gmail.com

unread,
Jul 11, 2022, 2:22:16 PM7/11/22
to Dataverse Users Community
Has there been any discussion of adding support for math symbol display to the abstract field of dataverse metadata?

For example, we have an abstract like this:

... Higher moments of order $n$ ($\ge$3) diverge as $\tau\^{n-2}$. When only reflected or transmitted photons are considered, the second moment diverges as $\tau\^{-1}$, whatever the illumination and viewing conditions. This provides direct access to $\tau$. ...

and it would be great if the math displayed correctly on the dataset's page.

Philip Durbin

unread,
Jul 13, 2022, 3:39:52 PM7/13/22
to dataverse...@googlegroups.com
No, I don't believe this has been discussed. Please feel free to create a GitHub issue.

The solution I'm aware of is MathJax, used on Stack Overflow's math site. It sounds like DataCite supports it, unofficially: https://github.com/IQSS/dataverse/issues/3328#issuecomment-566173300

I tried your example on the MathJax demo site and it mostly worked. :)

The concern on the Dataverse side, of course, is preventing malicious code from being executed. Right now we only allow certain HTML tags.

I hope this helps,

Phil

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/6b30c2ef-6031-4460-8001-3ca9e1e4336dn%40googlegroups.com.


--

Nico Poppelier

unread,
Jul 14, 2022, 5:31:56 AM7/14/22
to Dataverse Users Community
If only HTML-tags are allowed, adding support for MathML would be another option. As editor of the MathML v2 Recommendation and former member of the W3C Math WG I'm biased of course. :-)

Regards, Nico
Op woensdag 13 juli 2022 om 21:39:52 UTC+2 schreef Philip Durbin:

arnau merino

unread,
Mar 6, 2023, 10:07:59 AM3/6/23
to Dataverse Users Community
Hello Phil,

I have one question about this topic, how did you manage to integrate MathJax?
I am considering adding it and I was wondering if you had any tip.

Thank you in advance,
Best Regards,
Arnau Merino

Philip Durbin

unread,
Mar 6, 2023, 4:25:00 PM3/6/23
to dataverse...@googlegroups.com
Hi Arnau,

Sorry for the confusion. We don't support MathJax or similar in Dataverse. Are you saying you'd like to try contributing support for MathJax?

Thanks,

Phil

Anthony Reyes

unread,
Jun 15, 2023, 2:08:31 PM6/15/23
to Dataverse Users Community
Hi Philip,

Has there been any news or updates related to this topic?

I am in interested in contributing support for latex/mathjax in abstract fields. My organization has some datasets with latex in their abstracts.

Thanks,
Anthony

Philip Durbin

unread,
Jun 15, 2023, 4:03:17 PM6/15/23
to dataverse...@googlegroups.com
Yes, actually! In Portugal last week one of the installations mentioned they implemented MathJax!

However, I can't remember which one! I believe they even showed it on screen, maybe as a video? Does anyone who was there remember?

That's for the old/current/classic JSF frontend.

For the new React frontend, we recently started rendering Markdown in descriptions, for example: https://github.com/IQSS/dataverse-frontend/pull/91

I'm not sure if this helps with MathJax though. I looks like MathJax or similar could be supported through a plugin: https://github.com/remarkjs/react-markdown/tree/8.0.7#use-remark-and-rehype-plugins-math

Let's see if anyone remembers. We definitely invite contributions. Were you thinking for the current UI or the new React UI?

Anthony Reyes

unread,
Jun 15, 2023, 4:21:40 PM6/15/23
to Dataverse Users Community
I was thinking for the current UI. 

If someone already implemented MathJax in the current UI, that's great! Was any issue/PR created in the main repository for that? If not, hopefully someone can point us to the installation who accomplished it.

Its nice to see the new React frontend coming along though!

Dorothea Iglezakis

unread,
Jun 17, 2023, 3:53:28 PM6/17/23
to Dataverse Users Community
Hi Anthony,

that was us. We wrote a small JavaScript script that applies MathJax to the relevant metadata fields and renders existing LaTeX code. It is not yet visible in our production instance (darus.uni-stuttgart.de), but with the upgrade to 5.13 we want to include it.

If you are interested, we are happy to share.

Best,

Doro

Dieuwertje Bloemen

unread,
Jun 19, 2023, 2:51:11 AM6/19/23
to Dataverse Users Community
Hi Doro,

I was also quite excited to see this implementation. I did have one question however; how is the description showing up in aggregators such as OpenAire or Google Dataset Search? I assume they don't have MathJax implemented and was wondering if the description is still legible outside of your dataverse.

Kind regards,
Dieuwertje

Iglezakis, Dorothea

unread,
Jun 19, 2023, 3:01:40 AM6/19/23
to Dataverse Users Community

Hi Dieuwertje,


so far, we didn't do any changes on the export, so aggregators will get the raw LaTeX code in the description. But I'm also not sure, what would be the best solution for the export of LaTeX code.


Best,


Doro


__

Dr. Dorothea Iglezakis
FoKUS - Kompetenzzentrum für Forschungsdaten
IZUS/Universitätsbibliothek Stuttgart
Holzgartenstr. 16
70174 Stuttgart

Tel.: 0711/685-83648
Email: dorothea....@ub.uni-stuttgart.de




Von: dataverse...@googlegroups.com <dataverse...@googlegroups.com> im Auftrag von Dieuwertje Bloemen <dieuwertj...@kuleuven.be>
Gesendet: Montag, 19. Juni 2023 08:51
An: Dataverse Users Community
Betreff: Re: [Dataverse-Users] LaTeX math support?
 
You received this message because you are subscribed to a topic in the Google Groups "Dataverse Users Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dataverse-community/7K0p4Gl4UvU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/f4e2e933-5d4d-4435-baa1-284c7244295an%40googlegroups.com.

Anthony Reyes

unread,
Jun 19, 2023, 2:03:06 PM6/19/23
to Dataverse Users Community
Hi Doro,

Thank you for reaching out, I am interested! If you could share the script I would greatly appreciate it.

Thanks,
Anthony

Iglezakis, Dorothea

unread,
Jun 30, 2023, 2:31:10 AM6/30/23
to Dataverse Users Community

Hi Anthony,


you can find the script in https://github.com/izus-fokus/mathJax4Dataverse


Best,


Doro


__

Dr. Dorothea Iglezakis
FoKUS - Kompetenzzentrum für Forschungsdaten
IZUS/Universitätsbibliothek Stuttgart
Holzgartenstr. 16
70174 Stuttgart

Tel.: 0711/685-83648
Email: dorothea....@ub.uni-stuttgart.de


Von: dataverse...@googlegroups.com <dataverse...@googlegroups.com> im Auftrag von Anthony Reyes <ar06...@gmail.com>
Gesendet: Montag, 19. Juni 2023 20:03:06

Philip Durbin

unread,
Jul 13, 2023, 1:29:47 PM7/13/23
to dataverse...@googlegroups.com
Very interesting! Thanks for sharing, Doro!

Reply all
Reply to author
Forward
0 new messages