Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow rich inline content (or OMOBJ) in OMCD texts #20

Open
kohlhase opened this issue Oct 2, 2017 · 7 comments
Open

Allow rich inline content (or OMOBJ) in OMCD texts #20

kohlhase opened this issue Oct 2, 2017 · 7 comments
Labels
Milestone

Comments

@kohlhase
Copy link
Member

kohlhase commented Oct 2, 2017

see OpenMath/OM3#145 and OpenMath/OM3#11

@kohlhase kohlhase changed the title Allow OMOBJ in OMCD texts Allow rich inline content (or OMOBJ) in OMCD texts Oct 2, 2017
@davidcarlisle
Copy link
Member

We should allow (and use in the standard CDs) the use of OMOBJ for formulae in the OMCDs. With the Notation Definitions in SEP #144, this would allow for better presentation and more interaction.

I don't think we should allow omobj in cmp, it sort of loses the point of the distinction between CMP and FMP.

Many CDs use some kind of pseudo-tex in cmp (and other text areas of CDs) since mathjax is anyway active in the standard display, then with a bit of care and making the pseudo-tex more accurately mathjax-tex, then it will get displayed as math without any changes in the standard text or the implementation.

@JamesHDavenport
Copy link
Contributor

In the absence of a compelling use case, I'd agree with David.

@kohlhase
Copy link
Member Author

kohlhase commented Oct 6, 2017

David's citation is not quite summarizing the whole discussion in in the issues cited above. I think that there is a very compelling use case to to be made to use inline HTML5 (maybe only a restricted subset) in CMPs. In particular, having MathML in there would be very helpful. And I would only use the OMOBJ David cites inside MathML parallel markup.

Wouldn't it be much nicer to see nice MathML instead of

<CMP> 
grad(F)  is defined as (\partial(F)/\partial(x_1), ... ,\partial(F)/partial(x_n))
</CMP>

(adapted from veccalc1.ocd). What I am proposing as a best practice is to show this as

<CMP>
 <math>
   <semantics>
    <mrow>
      <mo>grad</mo>
      <mo>(</mo>
      <mi>F</mi>
      <mo>)</mo>
  </mrow>
  <annotation-xml encoding="OpenMath">
    <OMR href="#lhs"/>
  </annotation-xml>
</math>
is defined as .... 
</CMP>

where lhs is the id on the OM subobject in the accompanying FMP which represents the left hand side of the defining equation.

There are tools to create this relatively painlessly (for instance my sTeX system).

The result here would be that we can have much better-looking CDs that can be made much more active and helpful.

I would call this a compelling use case (but not for R2).

@davidcarlisle
Copy link
Member

davidcarlisle commented Oct 6, 2017 via email

@davidcarlisle
Copy link
Member

I just confirmed that if you put a

 <Description> 
 This CD defines symbols for common arithmetic functions \(x^2=\sqrt{x^4}\implies \mathrm{something}\)
 see http://www.example.org for details..

 A new paragraph starts after a blank line
</Description>

into a Description or CMP etc then the maths renders as maths, the link acts as a link and the new paragraph is rendered as a new paragraph as currently implemented in the display on the website.
cd

@kohlhase
Copy link
Member Author

kohlhase commented Oct 6, 2017

This is nice in practice, but hardly something our CDs should rely on. I do not consider this a counter-argument.

@davidcarlisle
Copy link
Member

davidcarlisle commented Oct 6, 2017 via email

@kohlhase kohlhase added this to the OMNext milestone Oct 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants