On Jul 23, 1:54 pm, John H Palmieri <[email protected]> wrote:
> On Jul 23, 5:14 am, Dominique <[email protected]> wrote:
>
>
>
>
>
> > Hello,
>
> > I'm using Sphinx 0.6.2 compiled from source on OSX 10.5.7. In one of
> > my docstrings I have
>
> >         .. math::
>
> >            \begin{bmatrix}
> >            J \\
> >            -JR
> >            \end{bmatrix}
>
> > (and I load amsmath in my preamble). This causes Sphinx to issue the
> > warning
>
> > WARNING: inline latex u'\x08egin{bmatrix}\nJ \\\n-JR\n\\end{bmatrix}':
> > latex exited with error:
>
> > i.e., '\b' is interpreted as a special character. The html and latex
> > output then fail to display/compile properly. In the LaTeX output, the
> > carriage return '\\' is transformed to a single '\':
>
> > \begin{gather}
> > \begin{split}^Hegin{bmatrix}
> > J \
> > -JR
> > \end{bmatrix}\end{split}\notag
> > \end{gather}
>
> > I've seen a related issue in this 
> > threadhttp://groups.google.com/group/sphinx-dev/browse_thread/thread/958b33...
>
> > but is using raw strings the solution really? They make the docstrings
> > rather unreadable, even to the LaTeX-trained eye.
>
> I don't understand this last comment.  If your current docstring is
>
> """
> Here is some math:
>
>         .. math::
>            \begin{bmatrix}
>            J \\
>            -JR
>            \end{bmatrix}
> """
>
> then you can just add an "r" to the beginning to make it "raw": change
> it to
>
> r"""
> Here is some math:
>
>         .. math::
>            \begin{bmatrix}
>            J \\
>            -JR
>            \end{bmatrix}
> """
>
> The only difference is the "r" at the beginning, so it is just as
> readable as the original docstring.

Thanks John. I had obviously totally misunderstood the comment in the
other thread.

Dominique

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to