fuzzingbook icon indicating copy to clipboard operation
fuzzingbook copied to clipboard

Simple LaTeX commands missing from HTML rendering

Open andreas-zeller opened this issue 7 years ago • 2 comments

Describe the bug $\sqrt{x}$ is not rendered in HTML notebooks.

To Reproduce Have a cell with $\sqrt{x}$. The \sqrt is simply ignored.

Expected behavior I should see $\sqrt{x}$.

andreas-zeller avatar Sep 02 '18 21:09 andreas-zeller

This is a bug in ipypublish; it removes all LaTeX tags of the form \foo{x}. To fix:

*** /Users/zeller/Projects/fuzzingbook/ipypublish-master/ipypublish/preprocessors/latextags_to_html.py Tue Apr 24 19:17:20 2018 --- latextags_to_html.py Sun Sep 2 23:40:36 2018


*** 261,271 **** pass elif any([tag.startswith('\end{{{0}}}'.format(env)) for env in ['split']]): pass else: ! new = new.replace(tag, '') return new

  def preprocess(self, nb, resources):

      logging.info('converting latex tags to html')

--- 261,272 ---- pass elif any([tag.startswith('\end{{{0}}}'.format(env)) for env in ['split']]): pass else: ! # new = new.replace(tag, '') ! pass # -- AZ return new

  def preprocess(self, nb, resources):

      logging.info('converting latex tags to html')

andreas-zeller avatar Sep 02 '18 21:09 andreas-zeller

This had better be fixed by integrating a local fork of ipypublish

andreas-zeller avatar Sep 24 '18 07:09 andreas-zeller