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

Can math equations be a default setup? #79

Open
kellard opened this issue Nov 7, 2019 · 3 comments
Open

Can math equations be a default setup? #79

kellard opened this issue Nov 7, 2019 · 3 comments

Comments

@kellard
Copy link

kellard commented Nov 7, 2019

Writing math equations is such a common feature that I think it would be good to include it in the default set up of cicero. I know there is an example at readthedocs one can follow but for new users not knowing much about css and javascript I think it can be a barrier if they just want to make a simple presentation to see if it's a software that is user friendly and easy to get started with.

@bast
Copy link
Owner

bast commented Nov 8, 2019

Indeed the barrier to add support for equations is too high now.

Just want to document the reasoning why this was done this way:

  1. Have as few defaults as possible to not have later trouble with backwards compatibility
  2. This introduces new markup which may conflict with something else: https://github.com/bast/cicero/blob/333ae9c/demo/remark/equations/talk.head.html#L12

In particular with 2) I welcome suggestions or "comforting" advice.

So in short, I agree but want to solve this the right way. Backwards compatibility is important since ideally talk slides should "never" break.

@ashwinvis
Copy link

An updated snippet for MathJax v3. See:

<!-- for older browsers -->
<!-- <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> -->

<script type="text/javascript">
  window.MathJax = {
  options: {
    skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
    ignoreHtmlClass: 'tex2jax_ignore',
    processHtmlClass: 'tex2jax_process'
  },
  tex: {
    inlineMath: [['$','$'], ['\\(','\\)']],
    processEscapes: true,
    macros: {
      AA: "{\\unicode{x212B}}"
    },
    autoload: {
      color: [],
      colorv2: ['color']
    },
    packages: {'[+]': ['noerrors']}
  },
  chtml: {
    scale: 0.9
  },
  loader: {
    load: ['[tex]/noerrors']
  }
};
</script>

<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"
        type="text/javascript" >
</script>

@bast
Copy link
Owner

bast commented Nov 22, 2021

Thanks! I will look at this again and I will try to make this default.

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

3 participants