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

Disabling inline maths (content fix and removal of build warnings) #12

Closed
morganwillcock opened this issue Aug 11, 2018 · 2 comments · Fixed by #21
Closed

Disabling inline maths (content fix and removal of build warnings) #12

morganwillcock opened this issue Aug 11, 2018 · 2 comments · Fixed by #21

Comments

@morganwillcock
Copy link
Member

I've fixed all of the warnings, except the warnings generated by the lack of maths extension.

This stops all of those warnings:

import docutils

class math(docutils.nodes.Element):
    pass

def visit_math_html(self, node):
    raise docutils.nodes.SkipNode

def setup(app):
    app.add_node(math, html=(visit_math_html, None))

...but introduces a new one:

WARNING: while setting up extension ['conf.py']: node class 'math' is already registered, its visitors will be overridden

...so the maths processing needs to be turned off somewhere within docutils, sphinx, or m2r (I'm not sure which, or whether such a function already exists).

@morganwillcock morganwillcock changed the title Build warnings Disabling inline maths (content fix and removal of build warnings) Aug 28, 2018
@morganwillcock
Copy link
Member Author

Have submitted an option for m2r.
miyakogi/m2r#28

@ericoporto
Copy link
Member

We can use github repos in python through pip with either

pip install git+https://github.com/morganwillcock/m2r.git

Or directly a line in requirements.txt

-e git://github.com/morganwillcock/m2r.git#egg=m2r

In case the modification can't be accepted.

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

Successfully merging a pull request may close this issue.

2 participants