擅长:python、mysql、java
<p>Python正在解释反斜杠。您需要传递反斜杠,以便LaTeX可以解释它们;应该使用<a href="https://stackoverflow.com/questions/2081640/what-exactly-do-u-and-r-string-flags-do-in-python-and-what-are-raw-string-l">raw string</a>来执行此操作:</p>
<pre><code>def func(x):
# Note the r!
r'''Boring function
Notes
-
Let :math:`\bar{x}_k = \sum_{i=1}^{n_k}x_{ik}`,
'''
</code></pre>