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

math extension: add HTML fragments alternative #148

Open
pkra opened this issue Mar 9, 2016 · 4 comments
Open

math extension: add HTML fragments alternative #148

pkra opened this issue Mar 9, 2016 · 4 comments

Comments

@pkra
Copy link
Contributor

pkra commented Mar 9, 2016

I would like to implement support for HTML-fragments in the math extension and I'm hoping we can contribute this back to core Lens.

Now it's obviously a bit tricky to include random HTML5 in a JATS document, so I asked on the JATS mailing list where I go the following markup suggestion.

  1. Most simply you wrap everything up as CDATA:
    text]]>…

That seems ok to me but perhaps people think it needs more refined markup (e.g., an attribute on the textual-form).

For the implementation, it seems sufficient to

I'm hoping I can re-use the second part but it might be easier not to (e.g., add appropriate data-attributes to the HTML and extract those).

Am I missing anything?
Any other suggestions?

@pkra
Copy link
Contributor Author

pkra commented Mar 9, 2016

One problem I've run into is white-space: pre-wrap; on .content. This has been bugging me for a while actually since it means all math previews that Lens injects are preceded by line-breaks, leading to jagged documents. Any suggestions where you'd like to fix this? Or should I file a separate issue for this?

@pkra
Copy link
Contributor Author

pkra commented Mar 9, 2016

Two more ideas from the JATS list

  • <code>
  • data-uris

@pkra
Copy link
Contributor Author

pkra commented Apr 19, 2016

I've begun implementing support in 7350feb -- but the branches are a bit of a mess right now so I'm not sure I should make a PR.

I've reused the label extraction from the MathML support.

The setup seems to work fine so far but I'm still expecting to tweak the related mathjax-node pre-processor (I've only run a few samples through it so far).

@pkra
Copy link
Contributor Author

pkra commented Apr 25, 2016

I've cherry-picked the fix in #166.

Is there already a way to configure the format Lens picks from existing alternatives (except by order in the xml source)? I couldn't see one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant