From: Guenter M. <mi...@us...> - 2010-10-26 10:50:54
|
Dear Docutils developers, I finally managed to set up, test, and commit a first version of math support for standard Docutils. This is an adaption of Jens Jørgen Mortensen's latex-math sandbox project -- many thanks to Jens. Input and internal storage is in LaTeX-math format (like in the Sphinx math support and the rst2pdf writer). The following writers work: * xml, pseudoxml: content (LaTeX source) in a math tag, * latex, xetex: put content in math environments, * html4css1, html4strict: embedded MathML. TODO: * The followint writers are currently not supported: * odt, MathML_ can be imported by the Math module. However, putting MathML into an ODP file seems tricky: http://idippedut.dk/post/2008/01/25/Do-your-math-ODF-and-MathML.aspx http://idippedut.dk/post/2008/03/03/Now-I-get-it-ODF-and-MathML.aspx * manual (is there math support in manual documents?), * rst2pdf (reportlab): (merge with its math extension). * Should we try to keep it compatible with `Math support in Sphinx`_? .. _Math support in Sphinx: http://sphinx.pocoo.org/ext/math.html More links and considerations are in docutils/docs/dev/todo.txt in the SVN repository. Günter |
From: Alan G I. <ai...@am...> - 2010-10-26 13:37:13
|
On 10/26/2010 6:50 AM, Guenter Milde wrote: > I finally managed to set up, test, and commit a first version of math > support for standard Docutils. Fabulous! I just updated from SVN and found that the rst2latex writer does not yet support a math directive. Did I misunderstand, or is the commit process one that will take time to propagate this to the SVN repository? Thanks, Alan |
From: Guenter M. <mi...@us...> - 2010-10-27 10:42:08
|
On 2010-10-26, Alan G Isaac wrote: > On 10/26/2010 6:50 AM, Guenter Milde wrote: >> I finally managed to set up, test, and commit a first version of math >> support for standard Docutils. > Fabulous! > I just updated from SVN and found that the rst2latex writer > does not yet support a math directive. Did I misunderstand, > or is the commit process one that will take time to propagate > this to the SVN repository? Did you try the test document (doctutils/test/functional/input/math.txt)? Also, the name of the directive is math-block, not math. (This, and more details are described in the todo.txt file.) Günter |
From: Alan G I. <ai...@am...> - 2010-10-27 14:10:36
|
On 10/27/2010 6:41 AM, Guenter Milde wrote: > the name of the directive is math-block, not math. (This, and > more details are described in the todo.txt file My memory is that David blessed "math" as the directive name, which furthermore matches the Sphinx practice. Is there a reason for the clumsier name? I think amsmath and possibly amssymb should be loaded if the math directive or role are used. Might it be possible not to use the split environment if only a single line of input is provided? Alan |
From: Guenter M. <mi...@us...> - 2010-10-27 21:07:59
|
On 2010-10-27, Alan G Isaac wrote: > On 10/27/2010 6:41 AM, Guenter Milde wrote: >> the name of the directive is math-block, not math. (This, and >> more details are described in the todo.txt file > My memory is that David blessed "math" as the directive name, My memory is that David did not oppose a math directive and role under certain conditions, without specifying a name. > which furthermore matches the Sphinx practice. This is discussed in todo.txt. > Is there a reason for the clumsier name? a) analogy to existing role/directive pairs (literal vs. literal block) b) analogy to existing direcive names (line-block) c) no other example of equally named role and directive in Docutils. d) make explicite that this is a block-level element. However, I do not have a problem with renaming the directive (in RST) if there is a consensus among the developers. (But I'd keep the distinction between the internal doctree elements for role and directive.) Possible alternatives are math displaymath equation mathblock > I think amsmath and possibly amssymb should be loaded > if the math directive or role are used. Actually, amsmath must be loaded (because of the "split" env). The requirement was on the false place, fixed now. > Might it be possible not to use the split environment > if only a single line of input is provided? This is one of the many possible improvements. Actually, I prefer a directive option mapping to the environment (equation, align, ...). Günter |
From: Alan G I. <ai...@am...> - 2010-10-28 23:40:10
|
On 10/27/2010 5:07 PM, Guenter Milde wrote: > Possible alternatives are > math I hope you choose this. It is simple, direct, and best looking, like ``image`` or ``container``. > Actually, I prefer a directive option mapping to the environment > (equation, align, ...). So ... personally I would love something like this. But each option will need a rule for mapping to non-LaTeX outputs. How about something like the following? (Just thinking out loud.) The default is to use an equation environment. Offer a ``splitlines`` option that takes an optional argument, adding a split environment by default. Accept as arguments ``align`` and ``gather``. That would be a really tremendous amount of functionality at istm fairly low cost. One possibility then is to not require a double backslash to separate logical lines of a math display. I cannot guess if this "nicer" look would be worth the loss of having to keep a logical line on a physical line. Alan |
From: Guenter M. <mi...@us...> - 2010-10-29 20:44:50
|
On 2010-10-28, Alan G Isaac wrote: > On 10/27/2010 5:07 PM, Guenter Milde wrote: >> Possible alternatives are >> math > I hope you choose this. > It is simple, direct, and best looking, > like ``image`` or ``container``. Done. In the same spirit, the source code directive should be called "code" then, shouldn't it? > How about something like the following? > (Just thinking out loud.) > The default is to use an equation environment. Rather "equation*" --> unnumbered. > Offer a ``splitlines`` option that takes an optional argument, > adding a split environment by default. Accept as arguments > ``align`` and ``gather``. That would be a really tremendous > amount of functionality at istm fairly low cost. > One possibility then is to not require a double backslash > to separate logical lines of a math display. I cannot guess > if this "nicer" look would be worth the loss of having to keep > a logical line on a physical line. I'd rather scan for \\ and use this to select between "equation*" and "align*": * less verbose, * the content is valid LaTeX-math code. * Sphinx-compatible. * latex-math compatible (align* and split in equation* are similar). Günter |
From: Alan G I. <ai...@am...> - 2010-10-29 21:56:00
|
On 10/29/2010 4:44 PM, Guenter Milde wrote: > I'd rather scan for \\ and use this to select between "equation*" and > "align*": > > * less verbose, > * the content is valid LaTeX-math code. > * Sphinx-compatible. > * latex-math compatible (align* and split in equation* are similar). OK. I can understand these reasons. Will the ``math`` directive take a ``numbered`` option? Thanks! Alan |
From: Guenter M. <mi...@us...> - 2010-10-30 20:39:46
|
On 2010-10-29, Alan G Isaac wrote: > On 10/29/2010 4:44 PM, Guenter Milde wrote: >> I'd rather scan for \\ and use this to select between "equation*" and >> "align*": >> * less verbose, >> * the content is valid LaTeX-math code. >> * Sphinx-compatible. >> * latex-math compatible (align* and split in equation* are similar). > OK. I can understand these reasons. > Will the ``math`` directive take a ``numbered`` option? Rather not. Instead, I can imagine a "number-equations" config setting. Also, Sphinx' "label" option triggers numbering - maybe we can port this behaviour. Günter |
From: Alan G I. <ai...@am...> - 2010-10-31 03:13:01
|
On 10/30/2010 4:39 PM, Guenter Milde wrote: > Instead, I can imagine a "number-equations" config setting. But very often one wants only some equations numbered. > Also, Sphinx' "label" option triggers numbering - maybe we can port > this behaviour. That would be fully adequate. Thanks, Alan |