Code Monkey home page Code Monkey logo

Comments (9)

dazzlezhang avatar dazzlezhang commented on June 12, 2024

I'm not sure if this is an issue or not. I can neither get the LaTeX output.

from breathe.

michaeljones avatar michaeljones commented on June 12, 2024

Hi,

I've not taken a look at this yet. I'm not sure how hard it would be to get going. I can try to take a look this week and see if I can learn some more about it. I'm afraid I'm not too experienced with the latex output.

Michael

from breathe.

dazzlezhang avatar dazzlezhang commented on June 12, 2024

Hi Michael,

Thanks for working on this issue. I did some experiments and hopefully it helps.


/**
 * @brief A class
 *
 * A inline formula: \f$ f(x) = a + b \f$
 *
 * A display style formula:
 * @f[
 * \int_a^b f(x) dx = F(b) - F(a)
 * @f]
 *
 * A specific environment formula:
 * \f{equation}{
 * \begin{array}{cc}
 * a & b \\
 * c & d
 * \end{array}
 * \f}
 */
class a 
{
public:
  a() {}
  ~a() {}
}

Doxygen wraps LaTeX formulas in tags in its XML output:


<formula id="0">$ f(x) = a + b $</formula>
...
<formula id="1">\[ \int_a^b f(x) dx = F(b) - F(a) \]</formula>
...
<formula id="2">
\begin{equation} \begin{array}{cc} a & b \\ c & d \end{array} \end{equation}
</formula>

I also checked the Sphinx documentation on math: http://sphinx.pocoo.org/ext/math.html.

For inline math (those enclosed by $$), we need to use :math: directive, e.g.


:math: `f(x) = a + b`

For displayed math (those enclosed by [ and ]), we can use .. math:: directive, e.g.


.. math::
    \int_a^b f(x) dx = F(b) - F(a)

Unfortunately, I failed to see the counterpart of the specific environment formula in Sphinx. I'm not sure if we can get this with an nowrap option, e.g.,


.. math::
   :nowrap:

   \begin{equation} \begin{array}{cc} a & b \ c & d \end{array} \end{equation}

from breathe.

michaeljones avatar michaeljones commented on June 12, 2024

Thank you for the excellent run down. Sorry I've been slow to act on this. I've just set up the example now and will hopefully make some progress in the next day or two.

Michael

from breathe.

michaeljones avatar michaeljones commented on June 12, 2024

Hi,

I've pushed some basic support. Thank you again for the examples. The Latex Math page in the documentation (not updated on github-pages yet) gives a basic run down. For some reason the third example you provided fails with the pngmath extension. I'm not sure why but I can investigate if it is an issue for you.

Let me know if it works when you have time,
Michael

from breathe.

dazzlezhang avatar dazzlezhang commented on June 12, 2024

Hi,

Thanks for the job! I tried the new breathe, it's just awesome! Both
display style and the specific environment work fine. But there's one tiny
issue with the inline equation. It's supposed to be in the same line, e.g.

A inline formula: f(x)=a+b

any it
Could you please fix this?

Yu

On Tue, Oct 16, 2012 at 3:10 PM, Michael Jones [email protected]:

Hi,

I've pushed some basic support. Thank you again for the examples. The
Latex Math page in the documentation (not updated on github-pages yet)
gives a basic run down. For some reason the third example you provided
fails with the pngmath extension. I'm not sure why but I can investigate if
it is an issue for you.

Let me know if it works when you have time,
Michael


Reply to this email directly or view it on GitHubhttps://github.com//issues/22#issuecomment-9475004.

from breathe.

michaeljones avatar michaeljones commented on June 12, 2024

Hey,

Good points, thanks for noting it. I've pushed a fix which should take care of that.

Cheers,
Michael

from breathe.

dazzlezhang avatar dazzlezhang commented on June 12, 2024

Perfect! The mathjax output looks pretty good. I think it's much better
than the png output. I don't know why Sphinx suggests png math. Anyway,
thanks for the fix. I can use breathe with my own project now. :-)

BR/Yu

On Thu, Oct 18, 2012 at 2:40 PM, Michael Jones [email protected]:

Hey,

Good points, thanks for noting it. I've pushed a fix which should take
care of that.

Cheers,
Michael


Reply to this email directly or view it on GitHubhttps://github.com//issues/22#issuecomment-9554650.

Best regards,
Yu ZHANG

from breathe.

michaeljones avatar michaeljones commented on June 12, 2024

Great, thanks for the quick response! I'll close for the moment and new issues can go in new tickets.

Thanks again for the help,
Michael

from breathe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.