## 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 (9) 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 (6) Oct (14) Nov (18) Dec (22) Jan (23) Feb (108) Mar (76) Apr (114) May (60) Jun (9) Jul (8) Aug (9) Sep (42) Oct (7) Nov Dec

Showing results of 7778

1 2 3 .. 312 > >> (Page 1 of 312)
 Re: [Docutils-develop] How transforms deal with nodes? - Implementing a math transform From: Silas Silva - 2015-10-07 03:57:25 On Mon, Oct 05, 2015 at 11:25:16AM +0000, Guenter Milde wrote: > Dear Silas, Hello Guenter! > MathJax understands ASCIIMath markup, so with "math-output=mathjax", the > input format could be ASCIIMath without need for conversion (just the > correct wrapper is required). Yeah, it works pretty fine. Thanks! I changed my mind and I see that MathJaX is the best choice for my problem. This is because it keeps plain math in its original form (in my case, ASCIImath) inline, making it appear originally in old or non-standard HTML renderers. A user using an old browser that doesn't support javascript, for instance, could yet see the nice ASCIImath markup. > The main obstacle for ASCIIMath as input is the missing converter to LaTeX. > Otherwise it seems to be the "natural" choice as rST-maths language. I see... This is mainly for the LaTeX writer, right? asciimathpython converts ASCIImath to a valid MathML tree using a tree data structure. It makes things easier. A converter of MathML to LaTeX would be acceptable? And thank you for the rest of the answer. Let me first deal with the thoughest problem, which is the conversion among different math markups. Thank you! -- Silas Silva 
 Re: [Docutils-develop] Emacs ‘electric-indent-mode’ versus ‘rst-mode’ From: Laura Creighton - 2015-10-05 11:34:16 In a message of Sun, 04 Oct 2015 20:59:33 +0200, Stefan Merten writes: >Hi Ben! > >Today Ben Finney wrote: >> It would be great if ‘electric-indent-mode’ and ‘rst-mode’ could both be >> active together and work sensibly. > >Frankly I don't know much about electric-indent-mode. > >The problem is that electric-indent-mode assumes something probably >called a deterministic indentation. This does not work for >reStructuredText. > >Apart from that I have no idea what any electricity could do better >than rst-mode does already. Indentation in rst-mode is already >very useful and usually does what you want. > >>> The problem with electric-indent-mode' has been fixed in the Emacs >>> tree already. >> >> What resolution was chosen? > >The Emacs people did what they do in such cases:: > > ;; Indentation is not deterministic. > (setq electric-indent-inhibit t) I think that is what rst-mode.el needs to do if it doesn't already. If your only problem is with editing ReStructured Text, this will fix things for you. But I had a more comprehensive problem, the day this happened. editing ReST didn't work. Writing Python and Haskell didn't work. And, most importantly, cutting and pasting text from one window to an emacs session running on another machine did not work. I was told I needed to do: (add-hook 'after-change-major-mode-hook (lambda() (electric-indent-mode -1))) And that got most, but not all of my problem. But I finally got the thing to stop biting me with: (electric-indent-mode 0) which is the way to brutally turn it off altogether. I figured that if I ever found a case where it would be useful, I would just write a hook to enable it for whenever that was. It's been a long time now, and so far I haven't managed to want it once. I chalk it up to 'takes all kinds to make a world' ... Laura 
 Re: [Docutils-develop] How transforms deal with nodes? - Implementing a math transform From: Guenter Milde - 2015-10-05 11:25:35 Dear Silas, On 2015-10-04, Silas Silva wrote: ... > So, after some search in mail list, I found this post by Guenter Milde > with some thoughts on math support. > http://sourceforge.net/p/docutils/mailman/message/30208157/ > It is titled "vision for maths" and bring the idea of implementing a > math transform. See also http://docutils.sourceforge.net/docs/dev/todo.html#math-markup > With MathJax and asciimathpython it would be very nice > to have a math transform. At least a part of the conversion matrix > could be implemented and used by different writers. MathJax understands ASCIIMath markup, so with "math-output=mathjax", the input format could be ASCIIMath without need for conversion (just the correct wrapper is required). The main obstacle for ASCIIMath as input is the missing converter to LaTeX. Otherwise it seems to be the "natural" choice as rST-maths language. > So, I started to code a math transform. I hope I get some results > sometime, but stopped in a stupid problem: after conversion, my math > code (output MathML) is latter considered a Text node and all HTML > escaping is done, messing every MathML tag up. Without changes to the HTML writer(s), it is actually considerd to be a "math" node with content in LaTeX syntax and converted as if you did not use the transform. Even with the fallback setting for math-output, this processes the content:: # settings and conversion if self.math_output in ('latex', 'mathjax'): math_code = self.encode(math_code) > My code of the math transform with a hardcoded example is something > like this: > def apply(self): > for node in self.document.traverse(nodes.math_block): > new_node = nodes.math_block( > node.rawsource, > '3x- 2y', > **node.attributes) > node.replace_self(new_node) > So, this whole text is for asking you: how to make writer do not think > it is a Text node? The quick and dirty way would be to replace the "math_block" node with a "raw" node. This would require to put the wrapper around the MathML code in the transform, the writer would just insert the content as if it were content of a "raw" directive. (You must set the format to "html", of course). A comprehensive solution would include: * add a "format" argument to the "math" and "math_block" nodes (defaulting to "LaTeX"), * set the "format" argument to "MathML" in the transform (if the content is tranfomed to MathML) * make the HTML writer(s) understand the "format" tag and process the output accordingly. Also, the "math-output" option would no longer be specific to the html-writer, although the different writers would use different sets of supported values and a different default. I actually don't know how this should be implemented in a "Docutilsic" way. Günter 
 Re: [Docutils-develop] Emacs ‘electric-indent-mode’ versus ‘rst-mode’ From: Stefan Merten - 2015-10-04 19:12:39 Attachments: Message as HTML Hi Ben! Today Ben Finney wrote: > It would be great if ‘electric-indent-mode’ and ‘rst-mode’ could both be > active together and work sensibly. Frankly I don't know much about electric-indent-mode. The problem is that electric-indent-mode assumes something probably called a deterministic indentation. This does not work for reStructuredText. Apart from that I have no idea what any electricity could do better than rst-mode does already. Indentation in rst-mode is already very useful and usually does what you want. >> The problem with electric-indent-mode' has been fixed in the Emacs >> tree already. > > What resolution was chosen? The Emacs people did what they do in such cases:: ;; Indentation is not deterministic. (setq electric-indent-inhibit t) Grüße Stefan 
 [Docutils-develop] How transforms deal with nodes? - Implementing a math transform From: Silas Silva - 2015-10-04 17:27:05 Hello guys! First of all, I'd like to thank you for the great job with docutils and rST. I'm a user of rST since 2009 and never stopped using it more and more. It really solved [almost] all my problems regarding documentation! Well, I'm here because I started to hack docutils source code to solve a problem: make it support more math input formats. There are older and newer threads about this problem along the docutils-develop list. My main request is ASCIImath support. So, I did a very quick-n-dirty change to the html4css1 writer, changing the visit_math() method to get text and use Paul Tremblay's code (http://sourceforge.net/projects/asciimathpython/) to convert it to MathML. It works but, as I just said, it is quick-n-dirty and doesn't respect --math-output or anything. So, after some search in mail list, I found this post by Guenter Milde with some thoughts on math support. http://sourceforge.net/p/docutils/mailman/message/30208157/ It is titled "vision for maths" and bring the idea of implementing a math transform. With MathJax and asciimathpython it would be very nice to have a math transform. At least a part of the conversion matrix could be implemented and used by different writers. So, I started to code a math transform. I hope I get some results sometime, but stopped in a stupid problem: after conversion, my math code (output MathML) is latter considered a Text node and all HTML escaping is done, messing every MathML tag up. My code of the math transform with a hardcoded example is something like this: def apply(self): for node in self.document.traverse(nodes.math_block): new_node = nodes.math_block( node.rawsource, '3x- 2y', **node.attributes) node.replace_self(new_node) So, this whole text is for asking you: how to make writer do not think it is a Text node? Thanks! :-) -- Silas Silva 
 [Docutils-develop] Emacs ‘electric-indent-mode’ versus ‘rst-mode’ (was: Time for release 0.13?) From: Ben Finney - 2015-10-04 12:39:57 Stefan Merten writes: > 2 weeks (20 days) ago Stefan Merten wrote: > > Emacs 24.4 sets electric-indent-mode' globally on by default which > > breaks rst.el. It would be great if ‘electric-indent-mode’ and ‘rst-mode’ could both be active together and work sensibly. > The problem with electric-indent-mode' has been fixed in the Emacs > tree already. What resolution was chosen? -- \ “I will cast terror into the hearts of those who disbelieve. | \ Therefore strike off their heads and strike off every fingertip | _o__) of them.” —Muhammad, _Qur'an_ 8:12 | Ben Finney 
 Re: [Docutils-develop] Time for release 0.13? From: Stefan Merten - 2015-10-04 09:35:24 Attachments: Message as HTML Hi! 2 weeks (20 days) ago Stefan Merten wrote: > I have to look into rst.el also. Emacs 24.4 sets > electric-indent-mode' globally on by default which breaks rst.el. Done. The problem with electric-indent-mode' has been fixed in the Emacs tree already. I also merged in some more changes the Emacs developers did. I also improved the tutorial based on some suggestions from Jason Eisner. This is a bug fix release so I raised the version from V1.4.0 to V1.4.1. Grüße Stefan 
 [Docutils-develop] [docutils:feature-requests] #47 Add explicit Email and Phone fields to the Docinfo From: Jeffrey C. Jacobs - 2015-09-24 20:01:37 Attachments: Message as HTML
 [Docutils-develop] [docutils:feature-requests] #46 Add Telephone Number recognition to the RST parser From: Jeffrey C. Jacobs - 2015-09-24 19:38:20 Attachments: Message as HTML
 [Docutils-develop] [docutils:feature-requests] #46 Add Telephone Number recognition to the RST parser From: Jeffrey C. Jacobs - 2015-09-24 19:37:39 Attachments: Message as HTML
 [Docutils-develop] [docutils:bugs] #251 system message copy() produced TypeError From: Günter Milde - 2015-09-24 09:44:12 Attachments: Message as HTML
 [Docutils-develop] [docutils:feature-requests] #46 Add Telephone Number recognition to the RST parser From: Günter Milde - 2015-09-24 09:37:18 Attachments: Message as HTML
 [Docutils-develop] [docutils:bugs] #285 rst2latex should call \title only when a title exists From: Günter Milde - 2015-09-24 09:24:01 Attachments: Message as HTML
 Re: [Docutils-develop] [docutils:feature-requests] #46 Add Telephone Number recognition to the RST parser From: Laura Creighton - 2015-09-23 21:45:59 In a message of Wed, 23 Sep 2015 17:55:19 -0000, Guenter Milde writes: >Hej Laura, > >On 2015-09-22, Laura Creighton wrote: >> In a message of Tue, 22 Sep 2015 16:37:10 -0000, "Jeffrey C. Jacobs" >> writes: > >>> > >... > >> Whatever we do know that '3 digits == a region' thing is very US + >> Canada centric. regions in Sweden can be 2 3 or 4 digits long. Of >> course, phone number sizes are not fixed, either, here. > >Docutils recognizes all phone numbers that comply with >RFC 3966. This includes also European conventions (BTW: /, -, and . are only >used for the readers covenience but dropped when actually calling the number. > >Ha det bra, > >Günter Tack så mycket, Günter! Har det så bra, också! (thank you very much, Günter! May you go (so) well, also! (which is idiomatic for 'good bye', but generally only when speaking to somebody, not when writing a letter. So, is email more like speaking? I think so.) Laura 
 Re: [Docutils-develop] [docutils:feature-requests] #46 Add Telephone Number recognition to the RST parser From: Jeffrey C. Jacobs - 2015-09-23 19:58:31 Message: 4 Date: Tue, 22 Sep 2015 19:13:42 +0200 From: Laura Creighton Subject: Re: [Docutils-develop] [docutils:feature-requests] #46 Add Telephone Number recognition to the RST parser To: "$docutils:feature-requests$ " <46@...> Cc: docutils-develop@... Message-ID: <201509221713.t8MHDgdw024774@...> Content-Type: text/plain; charset="UTF-8" > > Whatever we do know that '3 digits == a region' thing is very US + > Canada centric. regions in Sweden can be 2 3 or 4 digits long. Of > course, phone number sizes are not fixed, either, here. My house (with > region) is 8 digits long, (6 without the region as you just dial it > from within the region) my office is 9 (7 from inside). Absolutely. As Günter has pointed out in Germany they often use a stroke (/) to separate country code from local code and hyphens to separate regions, and in Italy I've seen numbers like 00.00.00.00 like IP addresses. :) There are many canonical variations of phone numbers and a match would have to recognize all of them. Fortunately, if we do require the Tel: prefix, it should be easy for RST to recognize them. > The prevelance of cell phones (which aren't inside anything, and > if you and I both have a 76 prefix I still have to dial 076 to > reach you) means that people are forgetting about the shorter > in-region dial around here. Actually, mobile phones in the countries in which I've used them generally have their own regional code separate from any of the land regions and are all under the same code. At least, that's how I recall it was in Germany when I was there last year. I'm not sure which nation I'll be getting a SIM card from next time I'm in Europe but I will say in China IIRC it was similar to the 00.00.00.00 IIRC. All that said, I don't expect RST to distinguish region codes or mobile vs. land lines. Jeffrey. 
 [Docutils-develop] [docutils:bugs] #285 rst2latex should call \title only when a title exists From: Sébastien Dailly - 2015-09-23 19:44:40 Attachments: Message as HTML
 Re: [Docutils-develop] Time for release 0.13? From: Guenter Milde - 2015-09-23 18:02:16 On 2015-09-22, Jeffrey C. Jacobs wrote: ... >>> On Fri, Sep 11, 2015 at 07:45:28AM +0000, Guenter Milde wrote: >>>> * there is currently an error when >>>> Testing Docutils 0.13 [repository] with Python 2.7.10:: >> ... >>>> FAIL: test_odt_nested_class (test_writers.test_odt.DocutilsOdtTestCase) >> ... >>>> AssertionError: content.xml not equal: expected len: 1978 actual len: 1974 >>> Guenter (and others who are interested, too), > Thanks Günter and Dave for tracking this down for me. I was very busy > last week with three Drive Electric Week events I was planning locally > and that took up most of my time. Glad you figured out it was the > smart quotes and now it's sorted. I agree that the test isn't > responsible for knowing if quotes would be replaced so making it > always use dumb quotes and having a separate test to validate that > quotes are made smart when requested seems like the logical approach. Just for the record: unit tests and functional test should generally set :: settings_overrides['_disable_config'] = True in order to be independent on the users local configuration. Günter 
 Re: [Docutils-develop] [docutils:feature-requests] #46 Add Telephone Number recognition to the RST parser From: Guenter Milde - 2015-09-23 17:55:41 Hej Laura, On 2015-09-22, Laura Creighton wrote: > In a message of Tue, 22 Sep 2015 16:37:10 -0000, "Jeffrey C. Jacobs" > writes: >> ... > Whatever we do know that '3 digits == a region' thing is very US + > Canada centric. regions in Sweden can be 2 3 or 4 digits long. Of > course, phone number sizes are not fixed, either, here. Docutils recognizes all phone numbers that comply with RFC 3966. This includes also European conventions (BTW: /, -, and . are only used for the readers covenience but dropped when actually calling the number. Ha det bra, Günter 
 [Docutils-develop] [docutils:feature-requests] #46 Add Telephone Number recognition to the RST parser From: Jeffrey C. Jacobs - 2015-09-23 17:27:46 Attachments: Message as HTML
 [Docutils-develop] [docutils:feature-requests] #46 Add Telephone Number recognition to the RST parser From: Günter Milde - 2015-09-23 16:20:13 Attachments: Message as HTML
 [Docutils-develop] [docutils:bugs] #285 rst2latex should call \title only when a title exists From: Günter Milde - 2015-09-23 16:12:10 Attachments: Message as HTML
 [Docutils-develop] [docutils:bugs] #285 rst2latex should call \title only when a title exists From: Sébastien Dailly - 2015-09-23 11:16:05 Attachments: Message as HTML
 [Docutils-develop] [docutils:bugs] #285 rst2latex should call \title only when a title exists From: Günter Milde - 2015-09-23 10:13:13 Attachments: Message as HTML
 [Docutils-develop] [docutils:bugs] #285 rst2latex should call \title only when a title exists From: engelbert gruber - 2015-09-23 08:32:09 Attachments: Message as HTML
 Re: [Docutils-develop] Time for release 0.13? From: Jeffrey C. Jacobs - 2015-09-22 17:34:05 Date: Tue, 15 Sep 2015 10:22:19 +0000 (UTC) From: Guenter Milde Subject: Re: [Docutils-develop] Time for release 0.13? To: docutils-develop@... Message-ID: Content-Type: text/plain; charset=UTF-8 > > On 2015-09-13, Dave Kuhlman wrote: >> On Fri, Sep 11, 2015 at 07:45:28AM +0000, Guenter Milde wrote: > >>> * there is currently an error when >>> Testing Docutils 0.13 [repository] with Python 2.7.10:: > ... >>> FAIL: test_odt_nested_class (test_writers.test_odt.DocutilsOdtTestCase) > ... >>> AssertionError: content.xml not equal: expected len: 1978 actual len: 1974 > >> Guenter (and others who are interested, too), Thanks Günter and Dave for tracking this down for me. I was very busy last week with three Drive Electric Week events I was planning locally and that took up most of my time. Glad you figured out it was the smart quotes and now it's sorted. I agree that the test isn't responsible for knowing if quotes would be replaced so making it always use dumb quotes and having a separate test to validate that quotes are made smart when requested seems like the logical approach. Jeffrey. `

Showing results of 7778

1 2 3 .. 312 > >> (Page 1 of 312)