cicero
cicero copied to clipboard
Can math equations be a default setup?
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.
Indeed the barrier to add support for equations is too high now.
Just want to document the reasoning why this was done this way:
- Have as few defaults as possible to not have later trouble with backwards compatibility
- 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.
An updated snippet for MathJax v3. See:
- https://mathjax.github.io/MathJax-demos-web/convert-configuration/convert-configuration.html
- https://docs.mathjax.org/en/latest/upgrading/v2.html
<!-- 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>
Thanks! I will look at this again and I will try to make this default.