473,804 Members | 3,909 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Math markup in code documentation?

Done any one have a way (and examples) of how to do math markups in the
docstrings of function and class definitions such that the equations
get typeset in the generated html documentation? I'll take any markup
system that'll do the job... MathML or LaTeX possible?

I'd like to start doing a better job of documenting the equations and
units being used in pmag-py (http://schwehr.org/software/pmag) for
processing paleomagnetic data.

AND on the longest of long shots... anyone have any opensource python
for matching bulk composition to minerals? Nah, I thought not.

Thanks!
-kurt

Oct 25 '05 #1
3 2479
On Tuesday 25 October 2005 09:38 am, sc*****@gmail.c om wrote:
Done any one have a way (and examples) of how to do math markups in the
docstrings of function and class definitions such that the equations
get typeset in the generated html documentation? I'll take any markup
system that'll do the job... MathML or LaTeX possible?


epydoc has some capacity for rendering equations and math symbols. I'm
not sure if it supports the full range of TeX expressions.

--
Terry Hancock ( hancock at anansispacework s.com )
Anansi Spaceworks http://www.anansispaceworks.com

Oct 25 '05 #2
sc*****@gmail.c om schrieb:
Done any one have a way (and examples) of how to do math markups in the
docstrings of function and class definitions such that the equations
get typeset in the generated html documentation? I'll take any markup
system that'll do the job... MathML or LaTeX possible?
[...]


Try Doxygen: http://www.doxygen.org

Examples of formulas are here:
http://www.stack.nl/~dimitri/doxygen/formulas.html

Doxygen has the advantage that you can use it for a variety of
programming languages.

Bye,
Dennis
Oct 25 '05 #3
Awesome!!! When did doxygen start supporting python? I was really
into doxygen last year, but stopped using it when I started doing a lot
of coding in python.

Thanks!!!!
-kurt

Oct 25 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2204
by: Jacek Generowicz | last post by:
:::Title::: A simple text markup utility :::/Title::: :::Section Introduction ::: I'm looking for something to help developers wirte documentation for bits of software they are writing. The main (initially only) presentation format will be HTML. The idea is to allow the author to write a plain text file containing the text he wishes to present, annotated with minimally intrusive markup which describes the :::emph::: meaning...
30
3491
by: Reinhold Birkenfeld | last post by:
Hello, I know that there are different YAML engines for Python out there (Syck, PyYaml, more?). Which one do you use, and why? For those of you who don't know what YAML is: visit http://yaml.org/! You will be amazed, and never think of XML again. Well, almost.
0
1028
by: Arvin Portlock | last post by:
I'm designing a small XML DTD to encode some help documentation. The documentation contains a large number of examples of XML markup. Naturally CDATA was my first thought, but ideally I would like to render certain parts of the markup in bold so that it stands out. I can't think of any way to do this with CDATA: <!]> <b> will not be evaluated any differently than the other markup. So I'm pretty sure CDATA is out. I imagine somebody...
3
4002
by: mikecantrell | last post by:
Hello I have a html page that I am trying to get data from an user input and then I want to be ble to sum the data. I would sum mon-in and mon-out to get mon-time. Then I would like to sum mon-time...fri-time to get total time for the week. <TD height="33" valign="top"> <input type="text" name="mon-in" size="7" maxlength="5" value="00:00"> </TD>
8
2924
by: Sensei | last post by:
I have a quick question about the math library included in the standard C90 (and 99). The gcc, xlc and possibly other compilers/linkers on some unix platforms cannot use any math functions in math.h if a switch (-lm) is used, so *explicitly* having the linker use a file called libm.so or libm.a/dylib/whatever. Is it true on all the platforms? (answer: probably no)
4
3450
by: Chris Davoli | last post by:
The folllowing will round to 526, but it should round to 527. It works correctly for all other numbers, except for this one. Does anybody know of a bug in Math.Round? Dim ldecWater As Decimal = 526.5 CType(Math.Round(ldecWater, 0), String) -- Chris Davoli
11
7376
by: Sambo | last post by:
I have the following module: ------------------------------- import math def ac_add_a_ph( amp1, ph1, amp2, ph2 ): amp3 = 0.0 ph3 = 0.0 ac1 = ( 0, 0j ) ac2 = ( 0, 0j )
15
4703
by: lbrtchx | last post by:
I am trying to write up a page with Math formulas (statistical ones) ~ http://www.geocities.com/tekmonk2005/OnLineStats02.html ~ The thing is that I am not able to make it look OK using HTML. I would like to somehow mark up parenthesis using the character entities for vertical bars and solid front and back slashes, but ~ <td align="left">|</td> ~
3
3220
by: gradeexrex | last post by:
I'm not a professional dba or dbd, but I'm proficient in the basics of database design and sql. I want to create a database of math definitions, and I'm wondering how one would go about creating a database that contains mathematical notation (and I'm not just talking about basic symbols where I could get away with ascii code). I need to be able to insert a wide variety of mathematical expressions, from fractions to integrals, into fields...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10575
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10076
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9144
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4297
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.