heiyhia / thinkstats

程序员统计入门, fork自thinkstats, 改动: 用Numpy, Pandas处理数据, Seaborn可视化
4 stars 0 forks source link

thinkbayes DocBook: some display equations have spurious {{ #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This turns out to be a problem with tralics.

If an expression contains both \mathit and \frac, tralics generates a spurious }

I have submitted a bug report

Original issue reported on code.google.com by allendow...@gmail.com on 27 Jun 2013 at 3:15

GoogleCodeExporter commented 9 years ago
The nice people at tralics have pointed out that the latex generated by plasTeX 
was broken, and that the output from tralics was not-a-bug.

I have added a workaround in tree_cleaner.py:

        # the following is a hack to work around a problem with
        # \ensuremath, which generates spurious \mathit commands.
        # I couldn't find the source of the problem, so I'm cleaning
        # it up here.  Sadly, this will cause a problem if the \mathit
        # was needed.
        latex = re.sub(r'\mathit', r'', latex)

Original comment by allendow...@gmail.com on 1 Jul 2013 at 4:43

GoogleCodeExporter commented 9 years ago

Original comment by allendow...@gmail.com on 1 Jul 2013 at 4:43