Closed clnsmth closed 2 years ago
It doesn't appear that DataONE supports the rendering of LaTex equations: https://search.dataone.org/view/https%3A%2F%2Fpasta.lternet.edu%2Fpackage%2Fmetadata%2Feml%2Fknb-lter-sbc%2F103%2F3
Thanks @servilla.
The implementation should take this into consideration
There is a solution to mixing LaTeX equations and markdown formatted text within EML
methodStep = list(
description = list(
markdown = md_section_1,
para = equation_1,
markdown = md_section_2,
para = equation_2
)
)
But EML::eml_write()
returns:
<methodStep>
<description>
<markdown>md_section_1</markdown>
<para>equation_1</para>
<markdown.1>me_section_2</markdown.1>
<para.1>equation_2</para.1>
</description>
<methodStep>
Editing the EML file to drop the ".1" may be the hack to get this to work.
Shouldn't this be adressed as an issue in the ropensci EML package git?
Good point @earnaud. I'll open an issue there.
The "hack" mentioned above has been implemented. LaTeX equations can now be imbedded in methods.md.
Test drive this feature from the development branch.
_NOTE: LaTeX equations must be wrapped in "$$" (i.e. "$$
Currently, EAL converts markdown to TextType sections and paras via
read_txt()
. Since EDI and DataONE now render markdown in their respective data portals we can now begin writing TextType markdown.EDI can render LaTeX along side markdown but it cannot be within markdown tags (see methods section of example rendering, and example EML). Does DataONE handle LaTeX + markdown similarly?
Consider an implementation that solves ropensci/EML issue #298
To the best of my knowledge, two things:
$$equation$$
construct is used by the renderer, there are probably other ways to trigger a transform. So the LaTeX solution for EAL is limited to EDI, and doesn't apply to the EML-R package in general.Hey all, just thought I'd pipe in since a few things caught my eye:
Happy to help answer any questions here or on your Slack.
Thanks @amoeba!
RE:
I'm not sure we have any/many real-world usages yet but I just tossed up a basic example on one of our test sites: https://test.arcticdata.io/view/urn%3Auuid%3A235b3315-0f31-42e7-9fc2-26e817a394a8. I think the magic on our end is initializing Showdown with and these extensions: https://github.com/NCEAS/metacatui/blob/b8c3fb444501843a3564b508604508c634681a7e/src/js/views/MarkdownView.js#L208-L210. Let me know if that helps!
Super helpful @amoeba! Thanks!
This feature has been merged into the master branch
Currently, EAL converts markdown to TextType sections and paras via
read_txt()
. Since EDI and DataONE now render markdown in their respective data portals we can now begin writing TextType markdown.EDI can render LaTeX along side markdown but it cannot be within markdown tags (see methods section of example rendering, and example EML). Does DataONE handle LaTeX + markdown similarly?
Consider an implementation that solves ropensci/EML issue #298.