## docutils-develop — For developer discussions of the implementation.

You can subscribe to this list here.

2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 Jan Feb Mar Apr (5) May (27) Jun (22) Jul (72) Aug (82) Sep (86) Oct (138) Nov (100) Dec (62) Jan (122) Feb (147) Mar (92) Apr (82) May (101) Jun (153) Jul (37) Aug (34) Sep (46) Oct (46) Nov (6) Dec (38) Jan (64) Feb (81) Mar (36) Apr (194) May (329) Jun (272) Jul (68) Aug (74) Sep (150) Oct (57) Nov (62) Dec (63) Jan (78) Feb (30) Mar (137) Apr (78) May (54) Jun (122) Jul (72) Aug (110) Sep (80) Oct (75) Nov (125) Dec (79) Jan (100) Feb (15) Mar (41) Apr (67) May (30) Jun (11) Jul (14) Aug (22) Sep (20) Oct (14) Nov (11) Dec (15) Jan (17) Feb (16) Mar (35) Apr (21) May (33) Jun (50) Jul (12) Aug (7) Sep (2) Oct (6) Nov (5) Dec (2) Jan (14) Feb (20) Mar (35) Apr (9) May (57) Jun (21) Jul (42) Aug (4) Sep (13) Oct (76) Nov (40) Dec (55) Jan (26) Feb (15) Mar (3) Apr (67) May (32) Jun (39) Jul (59) Aug (31) Sep (59) Oct (64) Nov (21) Dec (10) Jan (21) Feb (3) Mar (116) Apr (33) May (6) Jun (28) Jul (21) Aug (23) Sep (146) Oct (70) Nov (31) Dec (57) Jan (33) Feb (22) Mar (11) Apr (21) May (51) Jun (47) Jul (35) Aug (26) Sep (25) Oct (34) Nov (61) Dec (51) Jan (75) Feb (31) Mar (26) Apr (16) May (24) Jun (24) Jul (31) Aug (46) Sep (36) Oct (28) Nov (37) Dec (21) Jan (16) Feb (56) Mar (31) Apr (44) May (45) Jun (29) Jul (38) Aug (18) Sep (12) Oct (16) Nov (21) Dec (11) Jan (13) Feb (14) Mar (28) Apr (7) May (72) Jun (33) Jul (21) Aug (1) Sep (2) Oct Nov Dec
S M T W T F S

1
(7)
2
(1)
3

4
(2)
5
(2)
6
(2)
7
(2)
8
(1)
9

10
(2)
11
(1)
12

13

14
(1)
15

16
(3)
17

18
(10)
19

20
(3)
21
(3)
22
(2)
23

24

25
(2)
26
(6)
27
(10)
28
(1)
29
(5)
30
(2)
31
(2)

Showing 10 results of 10

 Re: [Docutils-develop] plan to add math support From: Guenter Milde - 2010-10-18 19:36:50 On 2010-10-18, David Goodger wrote: > On Mon, Oct 18, 2010 at 10:06, Alan G Isaac wrote: >> On 10/18/2010 9:45 AM, David Goodger wrote: >> But in fact Jens's rst2mathml produces very nice >> output in a broad set of circumstances. > Does it support LaTeX output? What's the input? The input is LaTeX, so it's not needed for LaTeX output. > If it's general-purpose, it's a viable candidate. Single-purpose is not. The proposed general-purpose math support uses the LaTeX math syntax for input and internal storage. LaTeX math syntax is powerfull and widely supported/used for human-edited presentational math. > I'd like to see this implemented, if only so these discussions go > away. But we need a **general-purpose** solution. I'm sorry for your > frustration. Please stop pushing for anything but general-purpose > solutions. With a LaTeX2MathML converter, we can support all Docutils standard output formats + PDF(rst2pdf_reportlab). The proposed "math" directive/role provides the framework for input and internal storage, and supports the standard output formats. However, it will not overcome intrinsic limitations of the output formats. By this, it is as *general purpose* as the "image" directive: It is up to the user to provide image files in a format understood by the presentation software. The "image" directive does no automatic image conversion, nor automatic selection of a supported graphics format. Günter 
 Re: [Docutils-develop] plan to add math support From: Guenter Milde - 2010-10-18 19:12:28 On 2010-10-18, David Goodger wrote: > On Mon, Oct 18, 2010 at 10:16, Roberto Alsina > wrote: >> David Goodger writes: >>> On Mon, Oct 18, 2010 at 09:08, Guenter Milde wrote: >> rst2pdf has math support. >> sphinx has math support (also in HTML, and yes, jsMath is a pain) > Can these approaches be ported for generalized support? Yes. >> HTML support via images and matplotlib should not be terribly hard to >> implement, I am even willing to reluctantly offer to do it ;-) > Great! This would add to the available choice of HTML output options. So we have for math in HTML: LaTeX2MathML: Jens' latex_math in the sandbox, MathJax: (HTML + JavaScript) Sphinx math extension PNGMath: (images via LaTeX) Sphinx mathplotlib: images via mathplotlib (also SVG?) Not all of them need to be supported in core Docutils, though. My preference for HTML output is LaTeX2MathML. >> The same thing happens with the code-block directive. I have in rst2pdf a >> nice code-block that only requires pygments and works for every writer that >> supports inline text roles with colors and fonts, in case someone wants it, >> too ;-) > Sure, please! There is also a generic implementation in sandbox/code-block-directive. Günter 
 Re: [Docutils-develop] plan to add math support From: Guenter Milde - 2010-10-18 18:52:54 On 2010-10-18, David Goodger wrote: > On Mon, Oct 18, 2010 at 09:08, Guenter Milde wrote: >> I [...] want to start implementing math support *now*. > If you can include reasonable HTML output, +1. Fine. > If not (and you seem to indicate not), -1. This depends on what you consider reasonable. Unfortunately, HTML has no math support. The W3C recommends MathML (http://www.w3.org/Math/), which we can support via Jens' LaTeX -> MathML converter. Browser support for MathML is mixed: * Firefox 1.0 renders PersentationMathML in HTML pages natively. See the MathML project page. (Open source, all major platforms). Since MathML rendering is part of Mozilla's layout engine, all derived browsers (Netscape 7, Galeon, Kmeleon, etc.) include it. * Although IE doesn't directly support MathML, it has the hooks that allow plug-in support, enabling the full MathML experience through plug-ins such as Mathplayer or techexplorer. http://www.w3.org/Math/Software/mathml_software_cat_browsers.html http://en.wikipedia.org/wiki/MathML#Web_browsers Could you try the examples in sandbox/jensj/latex_math/ and tell whether you would consider this reasonable? Alternatives are conversion to images (PNG or SVG) or MathJax_. As almost all math symbols are nowadays available as Unicode characters, simple formulas can also be converted to pure HTML+CSS. .. _MathJax: http://www.mathjax.org/ > If we can't improve the status quo, what's the point? LaTeX math > support exists already, via the "raw" directive at least. It's not > ideal, but it's explicit. The point is to get this started and to get a supported common RST syntax for math instead of a variety of add-ons. Even supporting all output formats that support math (LaTeX, PDF(reportlab), ODF) with a consistent input would be an advantage. > IOW, HTML output is IMO a necessary precondition for core inclusion. I agree that all standard writers should be supported. Günter 
 Re: [Docutils-develop] plan to add math support From: David Goodger - 2010-10-18 14:18:13 On Mon, Oct 18, 2010 at 10:06, Alan G Isaac wrote: > On 10/18/2010 9:45 AM, David Goodger wrote: >> If you can include reasonable HTML output, +1. >> If not (and you seem to indicate not), -1. > > Even outputting the math in a PRE element would > be better than the current situation. No, it wouldn't. That would be a mis-feature, horribly broken. -1 > But in fact Jens's rst2mathml produces very nice > output in a broad set of circumstances. Does it support LaTeX output? What's the input? If it's general-purpose, it's a viable candidate. Single-purpose is not. > Not all browsers offer good MathML support, Which ones do? Which don't? > but why not let the user decide if that is a problem! Because broken web pages don't help anybody. They'd just generate noise and siphon off the already limited resources we have (like this discussion). > PLEASE go forward with this. Not until it works. I'd like to see this implemented, if only so these discussions go away. But we need a **general-purpose** solution. I'm sorry for your frustration. Please stop pushing for anything but general-purpose solutions. -- David Goodger ; 
 Re: [Docutils-develop] plan to add math support From: Alan G Isaac - 2010-10-18 14:07:13 On 10/18/2010 9:45 AM, David Goodger wrote: > If you can include reasonable HTML output, +1. > If not (and you seem to indicate not), -1. Even outputting the math in a PRE element would be better than the current situation. This could be offered as an option. But in fact Jens's rst2mathml produces very nice output in a broad set of circumstances. Not all browsers offer good MathML support, but why not let the user decide if that is a problem! PLEASE go forward with this. Alan Isaac 
 Re: [Docutils-develop] plan to add math support From: David Goodger - 2010-10-18 14:02:18 On Mon, Oct 18, 2010 at 10:16, Roberto Alsina wrote: > David Goodger writes: > >> On Mon, Oct 18, 2010 at 09:08, Guenter Milde wrote: >>> Dear Docutils developers, >>> >>> after import this, I read >>> >>>  Simple is better than complex. >>> >>>  There should be one-- and preferably only one --obvious way to do it. >>> >>>  Now is better than never. >>> >>> and want to start implementing math support *now*. >> >> If you can include reasonable HTML output, +1. >> If not (and you seem to indicate not), -1. >> >> If we can't improve the status quo, what's the point? LaTeX math >> support exists already, via the "raw" directive at least. It's not >> ideal, but it's explicit. > > Not only is it not ideal, it's broken. Agreed. But without HTML support the proposed alternative is no less broken. > rst2pdf has math support. > sphinx has math support (also in HTML, and yes, jsMath is a pain) Can these approaches be ported for generalized support? I don't like the situation with Sphinx fragmentation/incompatibility. Core functionality should be moved into core Docutils. Unfortunately I don't have the time to drive this. I've said it before and I'll say it again: the Docutils "commit bit" is widely available to anyone willing to take the responsibility to do the job right. (See http://docutils.sourceforge.net/docs/dev/policies.html -- and that's open to modification too.) If you don't already have the commit bit, just ask! > HTML support via images and matplotlib should not be terribly hard to > implement, I am even willing to reluctantly offer to do it ;-) Great! > The same thing happens with the code-block directive. I have in rst2pdf a > nice code-block that only requires pygments and works for every writer that > supports inline text roles with colors and fonts, in case someone wants it, > too ;-) Sure, please! -- David Goodger ; 
 Re: [Docutils-develop] plan to add math support From: Roberto Alsina - 2010-10-18 13:53:19 David Goodger writes: > On Mon, Oct 18, 2010 at 09:08, Guenter Milde wrote: >> Dear Docutils developers, >> >> after import this, I read >> >>  Simple is better than complex. >> >>  There should be one-- and preferably only one --obvious way to do it. >> >>  Now is better than never. >> >> and want to start implementing math support *now*. > > If you can include reasonable HTML output, +1. > If not (and you seem to indicate not), -1. > > If we can't improve the status quo, what's the point? LaTeX math > support exists already, via the "raw" directive at least. It's not > ideal, but it's explicit. Not only is it not ideal, it's broken. rst2pdf has math support. sphinx has math support (also in HTML, and yes, jsMath is a pain) The idea that the raw latex directive is enough means that every writer that wants to provide it has two paths: 1) Implement math directive by themselves, which means the document doesn't work with other writers 2) Implement a raw directive that handles this, but then you have to duplicate, triplicate, etc. if you want to use more than one writer that supports math, HTML support via images and matplotlib should not be terribly hard to implement, I am even willing to reluctantly offer to do it ;-) The same thing happens with the code-block directive. I have in rst2pdf a nice code-block that only requires pygments and works for every writer that supports inline text roles with colors and fonts, in case someone wants it, too ;-) 
 Re: [Docutils-develop] plan to add math support From: David Goodger - 2010-10-18 13:45:22 On Mon, Oct 18, 2010 at 09:08, Guenter Milde wrote: > Dear Docutils developers, > > after import this, I read > >  Simple is better than complex. > >  There should be one-- and preferably only one --obvious way to do it. > >  Now is better than never. > > and want to start implementing math support *now*. If you can include reasonable HTML output, +1. If not (and you seem to indicate not), -1. If we can't improve the status quo, what's the point? LaTeX math support exists already, via the "raw" directive at least. It's not ideal, but it's explicit. IOW, HTML output is IMO a necessary precondition for core inclusion. ISTM that this is a case of "never is often better than *right* now." (And the Zen of Python applies best to the Python language itself. Its application to Python *code* is questionable.) -- David Goodger ; 
 [Docutils-develop] [ docutils-Bugs-3089774 ] Images in document templates are not preserved From: SourceForge.net - 2010-10-18 13:23:44 Bugs item #3089774, was opened at 2010-10-18 15:23 Message generated for change (Tracker Item Submitted) made by pachiburke You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=422030&aid=3089774&group_id=38414 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: ODT Writer Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: pachiburke (pachiburke) Assigned to: Dave Kuhlman (dkuhlman) Summary: Images in document templates are not preserved Initial Comment: Steps to reproduce the bug: 1. Create an odt template (my-template.odt) with an image in its header 2. Use the template to generate an ODT document with the --stylesheet=my-template.odt 3. Open the generated document The images in the header are not preserved. It's probably due to the Pictures subdir not being copied, and it may contain elements that are not part of contents.xml (such as headers and footers). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=422030&aid=3089774&group_id=38414 
 [Docutils-develop] plan to add math support From: Guenter Milde - 2010-10-18 13:08:47 Dear Docutils developers, after import this, I read Simple is better than complex. There should be one-- and preferably only one --obvious way to do it. Now is better than never. and want to start implementing math support *now*. Plan: 1. stage: Basic support * "math" role and directive * input language "LaTeX math" * output as literal in the non-latex writers 2. stage: Improvements * support other writers (see todo.txt for existing work that we can build upon). * accept Unicode input. Directive --------- +++ rst/directives.txt (Arbeitskopie) @@ -492,6 +492,55 @@ +.. _math: + +Math Block +========== + +**NOT IMPLEMENTED YET** + +:Directive Type: "math" +:Doctree Element: math-block +:Directive Arguments: None. +:Directive Options: Possible. +:Directive Content: Becomes the body of the math block (display formula). + +The "math" directive inserts a block with mathematical content (display +formula) into the document. + +The default input format is "latex" (LaTeX math syntax without surrounding +). + +If the writer does not support math typesetting, the content will be +inserted verbatim. + +The following options are recognized: + +class : text + Set a "classes" attribute value on the block element. See the + class_ directive. Role ---- +++ rst/roles.txt (Arbeitskopie) @@ -256,6 +256,36 @@ +:math: +========== + +**NOT IMPLEMENTED YET** + +:Aliases: :inline-math:, :m: +:DTD Element: math +:Customization: + :Options: class_, input-format + :Content: None. + +The math role marks its content as mathematical notation (inline formula). + +The default input format is LaTeX math syntax without +the surrounding  ("latex"). + +See the math directive_ (producing display formulas) for more info on +mathematical notation in restructuredText. Doctree additions ----------------- +++ docutils/docs/ref/doctree.txt (Arbeitskopie) @@ -2861,7 +2862,129 @@ +math +======== + +The math element contains text in LaTeX format that will be +typeset as mathematical notation (inline formula). + +Details +------- + +:Category: + Inline Elements_ + +:Parents: + All elements employing the %inline.elements;_ parameter entities in + their content models may contain math. + +:Children: + math elements may contain text data. + +:Analogues: + math is analogous to a XHTML "math" element or + the LaTeX ($math$) mode. + +:Processing: + Rendered as mathematical notation. + +Content Model +------------- + +.. parsed-literal:: + + %text.model;_ + +:Attributes: + The math element contains the common attributes_ + (ids_, names_, dupnames_, source_, and classes_). + +To be completed_. + + +math_block +============== + +The math_block element contains a block of text in +LaTeX format that will be typeset as block of mathematical notation +(display formula). + +The math_block element is generated during the initial parse from a +"math" directive. + +If the writer does not support math typesetting, the content will be +inserted verbatim (i.e. as LaTeX source code). + +Details +------- + +:Category: + Simple Body Elements_ + +:Parents: + All elements employing the %body.elements;_ or + %structure.model;_ parameter entities in their content models + may contain math_block. + +:Children: + math_block elements may contain text data. + +:Analogues: + math_block is analogous to a LaTeX "equation*" environment or a XHTML + "math" element displayed as block-level element. + +:Processing: + Rendered in a block as mathematical notation, typically centered or with + indentation + +Content Model +------------- + +.. parsed-literal:: + + %text.model;_ + +:Attributes: + The math element contains the common attributes_ + (ids_, names_, dupnames_, source_, and classes_). Objections, Comments? Günter 

Showing 10 results of 10