You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(15) |
Oct
(21) |
Nov
(18) |
Dec
(59) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(43) |
Feb
(35) |
Mar
(78) |
Apr
(65) |
May
(163) |
Jun
(169) |
Jul
(137) |
Aug
(77) |
Sep
(47) |
Oct
(27) |
Nov
(43) |
Dec
(68) |
2004 |
Jan
(61) |
Feb
(39) |
Mar
(11) |
Apr
(42) |
May
(86) |
Jun
(82) |
Jul
(24) |
Aug
(26) |
Sep
(37) |
Oct
(62) |
Nov
(131) |
Dec
(43) |
2005 |
Jan
(31) |
Feb
(56) |
Mar
(65) |
Apr
(165) |
May
(106) |
Jun
(97) |
Jul
(65) |
Aug
(150) |
Sep
(78) |
Oct
(115) |
Nov
(41) |
Dec
(26) |
2006 |
Jan
(50) |
Feb
(39) |
Mar
(56) |
Apr
(67) |
May
(89) |
Jun
(68) |
Jul
(116) |
Aug
(65) |
Sep
(58) |
Oct
(103) |
Nov
(28) |
Dec
(52) |
2007 |
Jan
(92) |
Feb
(60) |
Mar
(124) |
Apr
(96) |
May
(69) |
Jun
(79) |
Jul
(25) |
Aug
(22) |
Sep
(7) |
Oct
(17) |
Nov
(27) |
Dec
(32) |
2008 |
Jan
(57) |
Feb
(87) |
Mar
(51) |
Apr
(43) |
May
(56) |
Jun
(62) |
Jul
(25) |
Aug
(82) |
Sep
(58) |
Oct
(42) |
Nov
(38) |
Dec
(86) |
2009 |
Jan
(50) |
Feb
(33) |
Mar
(84) |
Apr
(90) |
May
(109) |
Jun
(37) |
Jul
(22) |
Aug
(51) |
Sep
(93) |
Oct
(86) |
Nov
(31) |
Dec
(62) |
2010 |
Jan
(33) |
Feb
(57) |
Mar
(62) |
Apr
(43) |
May
(30) |
Jun
(49) |
Jul
(20) |
Aug
(40) |
Sep
(152) |
Oct
(38) |
Nov
(15) |
Dec
(32) |
2011 |
Jan
(29) |
Feb
(25) |
Mar
(65) |
Apr
(45) |
May
(27) |
Jun
(11) |
Jul
(14) |
Aug
(8) |
Sep
(13) |
Oct
(117) |
Nov
(60) |
Dec
(19) |
2012 |
Jan
(23) |
Feb
(32) |
Mar
(24) |
Apr
(41) |
May
(56) |
Jun
(24) |
Jul
(15) |
Aug
(11) |
Sep
(26) |
Oct
(21) |
Nov
(12) |
Dec
(31) |
2013 |
Jan
(32) |
Feb
(24) |
Mar
(39) |
Apr
(44) |
May
(44) |
Jun
(8) |
Jul
(9) |
Aug
(12) |
Sep
(34) |
Oct
(19) |
Nov
(5) |
Dec
(9) |
2014 |
Jan
(22) |
Feb
(12) |
Mar
(7) |
Apr
(2) |
May
(13) |
Jun
(17) |
Jul
(8) |
Aug
(10) |
Sep
(7) |
Oct
(4) |
Nov
|
Dec
(39) |
2015 |
Jan
(13) |
Feb
(12) |
Mar
(12) |
Apr
(40) |
May
(5) |
Jun
(22) |
Jul
(3) |
Aug
(42) |
Sep
(5) |
Oct
(10) |
Nov
|
Dec
(10) |
2016 |
Jan
(9) |
Feb
(43) |
Mar
(5) |
Apr
(14) |
May
(17) |
Jun
(5) |
Jul
(5) |
Aug
(22) |
Sep
(5) |
Oct
|
Nov
(4) |
Dec
(18) |
2017 |
Jan
(28) |
Feb
(29) |
Mar
(9) |
Apr
(23) |
May
(48) |
Jun
(5) |
Jul
(32) |
Aug
(9) |
Sep
(13) |
Oct
(13) |
Nov
(6) |
Dec
(4) |
2018 |
Jan
(6) |
Feb
(5) |
Mar
(1) |
Apr
(2) |
May
(5) |
Jun
(17) |
Jul
(12) |
Aug
(15) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
2019 |
Jan
|
Feb
(6) |
Mar
(3) |
Apr
(5) |
May
(10) |
Jun
(6) |
Jul
(6) |
Aug
|
Sep
(11) |
Oct
(18) |
Nov
(10) |
Dec
(7) |
2020 |
Jan
(3) |
Feb
(14) |
Mar
(2) |
Apr
(1) |
May
(5) |
Jun
|
Jul
(1) |
Aug
(11) |
Sep
(8) |
Oct
|
Nov
(1) |
Dec
(14) |
2021 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
(8) |
May
(23) |
Jun
(7) |
Jul
(10) |
Aug
(1) |
Sep
|
Oct
(7) |
Nov
(10) |
Dec
(2) |
2022 |
Jan
|
Feb
(21) |
Mar
|
Apr
(3) |
May
(7) |
Jun
(4) |
Jul
(1) |
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2023 |
Jan
(18) |
Feb
|
Mar
(1) |
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
(2) |
Mar
(3) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
2025 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(3) |
Jun
(6) |
Jul
(22) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David G. <go...@py...> - 2003-03-05 19:04:16
|
Morten W. Petersen wrote: >> First, why? What's your use case? The simplest solution is, just >> don't use that markup in your documents. If it's important, make it >> a policy decision in your organization. > > I'm trying to find a mix of simplified RST that can be used straight > away, and at most have 4-5 different markups (easily taught), for > example emphasis, bullet lists, blockquotes and simple tables. What do you do when the user needs one more construct, that isn't included in your simplified set? Personally, I'd rather begin educating with a small number of core constructs, but using the full parser. Simultaneously, give references to the full docs for those who are interested in going further. We don't teach programming languages or natural languages using limited subsets. We begin with simple concepts and build from there. From PEP 287, Questions & Answers, #2: Is reStructuredText *too* rich? For specific applications or individuals, perhaps. In general, no. Since the very beginning, whenever a docstring markup syntax has been proposed on the Doc-SIG_, someone has complained about the lack of support for some construct or other. The reply was often something like, "These are docstrings we're talking about, and docstrings shouldn't have complex markup." The problem is that a construct that seems superfluous to one person may be absolutely essential to another. reStructuredText takes the opposite approach: it provides a rich set of implicit markup constructs (plus a generic extension mechanism for explicit markup), allowing for all kinds of documents. If the set of constructs is too rich for a particular application, the unused constructs can either be removed from the parser (via application-specific overrides) or simply omitted by convention. I'd emphasize the final "or simply omitted by convention" as preferable. > At the same time, I want to remove the ability to mess things up > ... so that users can > do whatever they want when not using the agreed upon markups. > >> Second, what should the parser do with the markup it ignores? > > Don't touch it, 'pass it on' in other words. Please consider carefully: would you really be doing your users a service with this approach? I think back to when I learned Japanese. The class spent the first week learning hiragana, the basic Japanese syllable characters (similar to an alphabet), so we wouldn't get hooked on using "roma-ji" (roman letters, A-Z) as a crutch. When I lived in Japan, I found that people who had learned Japanese with roma-ji reached a point -- learning written language -- beyond which it was very difficult to progress, whereas those who learned with hiragana had a much easier time. Of course, reStructuredText is a much simpler language, but I believe the same principles apply. > (``'' is turned into some sort of hyperlink) It's an error that's turned into a "problematic" element, with a link to the diagnostic explanation. It's an error because of unbalanced double-backquotes. >> The parser is not set up for this to be really easy to do, because it >> hasn't been needed yet. > > If there are more people out there like me, maybe it would be an idea > to refactor a bit to make parts of docutils more like a 'markup > parsing framework'? Make it easier to mix-n-match different > markups, which could lead to diverse markup 'dialects' of STX; > diverse enough to be used by common people without screwing > up, and diverse enough for the syntatic programmer. I don't think encouraging dialects is a good idea. It introduces incompatibilities. This use case doesn't sufficiently justify such changes to me. 'Course, patches are always welcome. -- David Goodger http://starship.python.net/~goodger Programmer/sysadmin for hire: http://starship.python.net/~goodger/cv |
From: Morten W. P. <mo...@ni...> - 2003-03-05 16:31:06
|
> First, why? What's your use case? The simplest solution is, just > don't use that markup in your documents. If it's important, make it > a policy decision in your organization. I'm trying to find a mix of simplified RST that can be used straight away, and at most have 4-5 different markups (easily taught), for example emphasis, bullet lists, blockquotes and simple tables. At the same time, I want to remove the ability to mess things up (``'' is turned into some sort of hyperlink) so that users can do whatever they want when not using the agreed upon markups. > Second, what should the parser do with the markup it ignores? Don't touch it, 'pass it on' in other words. > Third, which type of markup do you want to suppress, inline markup or > block-level markup? Both, I guess. > The parser (implemented in module docutils.parsers.rst.states) deals > with the two separately and differently. Block-level markup is > recognized via an ordered dispatch table; remove the entry for the > markup you don't want, and it won't be recognized. Inline > markup (class Inliner) is recognized with a large regular expression > (Inliner.patterns.initial) that's built from a data structure > (Inliner.parts), plus a table for standalone/implicit markup (URLs > etc.; Inliner.implicit_dispatch). Alter the data structure, rebuild > and reinstall the regexp, and go from there. Of course, you should > work on subclasses or instances so as not to step on toes. OK, I'll have a look at that. Again, useful info. :) > The parser is not set up for this to be really easy to do, because it > hasn't been needed yet. If there are more people out there like me, maybe it would be an idea to refactor a bit to make parts of docutils more like a 'markup parsing framework'? Make it easier to mix-n-match different markups, which could lead to diverse markup 'dialects' of STX; diverse enough to be used by common people without screwing up, and diverse enough for the syntatic programmer. > > (without using the :: markup). > > What does this mean? Something like "making the parser ignore markup without literal blocks". Regards, Morten W. Petersen Technologies: Zope, Linux, Python, HTML, CSS, PHP Homepage: http://www.nidelven-it.no Phone number: (+47) 45 44 00 69 |
From: David G. <go...@py...> - 2003-03-05 16:16:22
|
Morten W. Petersen wrote: >> What do you mean? Remove marked-up text from a document, or remove >> functionality from the parser? > > Remove functionality from the parser, make the parser ignore certain > elements First, why? What's your use case? The simplest solution is, just don't use that markup in your documents. If it's important, make it a policy decision in your organization. Second, what should the parser do with the markup it ignores? Third, which type of markup do you want to suppress, inline markup or block-level markup? The parser (implemented in module docutils.parsers.rst.states) deals with the two separately and differently. Block-level markup is recognized via an ordered dispatch table; remove the entry for the markup you don't want, and it won't be recognized. Inline markup (class Inliner) is recognized with a large regular expression (Inliner.patterns.initial) that's built from a data structure (Inliner.parts), plus a table for standalone/implicit markup (URLs etc.; Inliner.implicit_dispatch). Alter the data structure, rebuild and reinstall the regexp, and go from there. Of course, you should work on subclasses or instances so as not to step on toes. The parser is not set up for this to be really easy to do, because it hasn't been needed yet. > (without using the :: markup). What does this mean? -- David Goodger http://starship.python.net/~goodger Programmer/sysadmin for hire: http://starship.python.net/~goodger/cv |
From: <po...@or...> - 2003-03-05 15:56:16
|
"Morten W. Petersen" <mo...@ni...> writes: > Hi! > > I'm skimming through the "reStructuredText Markup Specification" and I'm > wondering how to remove certain elements from the markup, such as > inline literals. Any ideas? Could you be a bit more specific? How would you like to remove them? * don't allow them in a document in the first place? (I'm not sure how you can reduce reST to a subset except by not using parts that you don't want to use.) * don't allow an inline literal to appear in an output file? (Create a custom writer that handles inline literals any way you want.) * remove the inline literal markups (``) from the output? (That happens automatically already when the document is read and the tree is built.) * some other way that I'm not understanding (Provide more details.) -- Patrick K. O'Brien Orbtech http://www.orbtech.com/web/pobrien ----------------------------------------------- "Your source for Python programming expertise." ----------------------------------------------- |
From: Morten W. P. <mo...@ni...> - 2003-03-05 15:55:32
|
> Morten W. Petersen wrote: >> I'm skimming through the "reStructuredText Markup Specification" and >> I'm wondering how to remove certain elements from the markup, such as >> inline literals. Any ideas? > > What do you mean? Remove marked-up text from a document, or remove > functionality from the parser? Remove functionality from the parser, make the parser ignore certain elements (without using the :: markup). Regards, Morten W. Petersen Technologies: Zope, Linux, Python, HTML, CSS, PHP Homepage: http://www.nidelven-it.no Phone number: (+47) 45 44 00 69 |
From: David G. <go...@py...> - 2003-03-05 15:53:51
|
Morten W. Petersen wrote: > I'm skimming through the "reStructuredText Markup Specification" and I'm > wondering how to remove certain elements from the markup, such as > inline literals. Any ideas? What do you mean? Remove marked-up text from a document, or remove functionality from the parser? -- David Goodger http://starship.python.net/~goodger Programmer/sysadmin for hire: http://starship.python.net/~goodger/cv |
From: Morten W. P. <mo...@ni...> - 2003-03-05 15:48:40
|
Hi! I'm skimming through the "reStructuredText Markup Specification" and I'm wondering how to remove certain elements from the markup, such as inline literals. Any ideas? Regards, Morten W. Petersen Technologies: Zope, Linux, Python, HTML, CSS, PHP Homepage: http://www.nidelven-it.no Phone number: (+47) 45 44 00 69 |
From: Saunders, G. <gsa...@ea...> - 2003-03-04 00:18:29
|
> -----Original Message----- > From: David Goodger [mailto:go...@py...]=20 > Sent: March 3, 2003 3:54 PM > To: Saunders, Graydon; doc...@so... > Subject: Re: [Docutils-users] Multiple html classes per literal block? >=20 >=20 > Saunders, Graydon wrote: > > What I want to do is to have a code example which is included as a=20 > > literal block and which has a range of lines specifed as having a=20 > > different class name from the rest of the block, so it's=20 > > possible to=20 > > highlight some part of the code example as the interesting bit. >=20 > Not a bad idea. A directive could fit the bill. For example:: >=20 > .. literal:: > :highlight: 2-3 >=20 > Here's the literal block, line 1 (first non-blank line). > Line numbering would be 1-based, including end-points, > so non-geeks could use it too. Yes. > The "highlight" option could take multiple line & > range arguments, comma-separated. Is there > a standard for such notation? Not that I know of. I'd expect either 2..6,19..28 Or 2-6,10-28 > An alternative would be to number the lines of a literal=20 > block, to allow for textual references. Something like this:: >=20 > .. literal:: > :numbered-lines: >=20 > line one > line two >=20 > Would produce something like:: >=20 > (1) line one > (2) line two That seems potentially handy, but it's not a current need. > > Ideally, one could specify multiple ranges per literal=20 > > block and the=20 > > associated class name extension so example 1 and example 2=20 > > can easily=20 > > have the same kind of highlighting for the same 'notice=20 > > this' things. >=20 > I'm not following. What's "associated class name extension"?=20 > Please explain and provide examples. Right now, when I use .. Include:: <foo> :literal: The result is the contents of <foo> in=20 <pre class=3D"literal-block"></pre> tags. If I've got two different sets of lines marked 'interesting', I'd like to have them have different class names so I can give them distinct colours in the stylesheet. So=20 .. literal::=20 :highlight: 2-6,10-28 I'd want whatever tags results in the HTML to have 'class=3D"literal-block:', 'class=3D"literal-block-interesting-1"' and 'class=3D"literal-block-interesting-2"' or similar so there's something for the stylesheet to reference. Incrementing numbers seems to fit pretty well with the feel of reStructured Text. The *next* time there's a literal directive - .. literal:: :highlight: 4-12 I'd want the class associated with those nine lines to be 'class=3D"literal-block-interesting-1"'. If it was .. Literal:: :highlight: -,4-12 I'd want the class associated with those nine lines to be 'class=3D"literal-block-interesting-2"'. That make sense? The hope is to have examples with consistent highlighting colours for different kinds of interesting, even when every kind of interesting isn't present in every example. > > I don't think that's currently possible; if it is, I'd=20 > > appreciate to=20 > > be told how to do it. >=20 > Neither are currently possible; they'd require=20 > implementation. Patches are always welcome! Unfortunately, I entirely lack the programmer nature. > > I'm also unsure that it's necessarily an extension you'd care to=20 > > entertain; I'd like to advance strongly that it would be=20 > > very useful=20 > > for anyone trying to build documentation addressing that=20 > > theological=20 > > question of 'why'. >=20 > I agree that it would be useful. I'd be "willing to=20 > entertain" quite a bit, if implemented as a directive. It's=20 > much easier than new syntax. Well, considering that 'include' is already a directive, I'd have to be feeling quite unhinged to sugguest a syntax change. Not feeling that unhinged. :) Thank you! |
From: David G. <go...@py...> - 2003-03-03 23:53:56
|
Saunders, Graydon wrote: > What I want to do is to have a code example which is included as a > literal block and which has a range of lines specifed as having a > different class name from the rest of the block, so it's possible to > highlight some part of the code example as the interesting bit. Not a bad idea. A directive could fit the bill. For example:: .. literal:: :highlight: 2-3 Here's the literal block, line 1 (first non-blank line). Line numbering would be 1-based, including end-points, so non-geeks could use it too. The "highlight" option could take multiple line & range arguments, comma-separated. Is there a standard for such notation? An alternative would be to number the lines of a literal block, to allow for textual references. Something like this:: .. literal:: :numbered-lines: line one line two Would produce something like:: (1) line one (2) line two > Ideally, one could specify multiple ranges per literal block and the > associated class name extension so example 1 and example 2 can easily > have the same kind of highlighting for the same 'notice this' things. I'm not following. What's "associated class name extension"? Please explain and provide examples. > I don't think that's currently possible; if it is, I'd appreciate to be > told how to do it. Neither are currently possible; they'd require implementation. Patches are always welcome! > I'm also unsure that it's necessarily an extension you'd care to > entertain; I'd like to advance strongly that it would be very useful for > anyone trying to build documentation addressing that theological > question of 'why'. I agree that it would be useful. I'd be "willing to entertain" quite a bit, if implemented as a directive. It's much easier than new syntax. -- David Goodger http://starship.python.net/~goodger Programmer/sysadmin for hire: http://starship.python.net/~goodger/cv |
From: Saunders, G. <gsa...@ea...> - 2003-03-03 21:36:16
|
> -----Original Message----- > From: Aahz [mailto:aa...@py...]=20 > Sent: March 3, 2003 1:18 PM > To: Saunders, Graydon > Cc: doc...@so... > Subject: Re: [Docutils-users] Multiple html classes per literal block? >=20 >=20 > On Mon, Mar 03, 2003, Saunders, Graydon wrote: > > > > What I want to do is to have a code example which is included as a=20 > > literal block and which has a range of lines specifed as having a=20 > > different class name from the rest of the block, so it's=20 > possible to=20 > > highlight some part of the code example as the interesting bit. > >=20 > > Ideally, one could specify multiple ranges per literal=20 > block and the=20 > > associated class name extension so example 1 and example 2=20 > can easily=20 > > have the same kind of highlighting for the same 'notice=20 > this' things. >=20 > I'd say the best way to deal with this is to create a new=20 > ``highlight_literal`` directive. See the ``parsed_literal``=20 > directive for ideas. You'd then need to string together=20 > multiple text sections, but that's fine IMO, much better than=20 > trying to use line numbers. It's not ok to string together multiple text sections, because the text sections are code examples which get auto-tested, so they have to be complete examples. That's something I don't have any control over. |
From: Aahz <aa...@py...> - 2003-03-03 21:17:58
|
On Mon, Mar 03, 2003, Saunders, Graydon wrote: > > What I want to do is to have a code example which is included as a > literal block and which has a range of lines specifed as having a > different class name from the rest of the block, so it's possible to > highlight some part of the code example as the interesting bit. > > Ideally, one could specify multiple ranges per literal block and the > associated class name extension so example 1 and example 2 can easily > have the same kind of highlighting for the same 'notice this' things. I'd say the best way to deal with this is to create a new ``highlight_literal`` directive. See the ``parsed_literal`` directive for ideas. You'd then need to string together multiple text sections, but that's fine IMO, much better than trying to use line numbers. -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ Register for PyCon now! http://www.python.org/pycon/reg.html |
From: Saunders, G. <gsa...@ea...> - 2003-03-03 20:04:15
|
What I want to do is to have a code example which is included as a literal block and which has a range of lines specifed as having a different class name from the rest of the block, so it's possible to highlight some part of the code example as the interesting bit. Ideally, one could specify multiple ranges per literal block and the associated class name extension so example 1 and example 2 can easily have the same kind of highlighting for the same 'notice this' things. I don't think that's currently possible; if it is, I'd appreciate to be told how to do it. I'm also unsure that it's necessarily an extension you'd care to entertain; I'd like to advance strongly that it would be very useful for anyone trying to build documentation addressing that theological question of 'why'. Graydon Saunders gsa...@ea... |
From: Morten W. P. <mo...@ni...> - 2003-03-02 23:12:31
|
>> Can I create a writer that subclasses / makes use of the HTML writer? >> How? > > The docutils/writers/pep.py writer does just that. Use the source, > Luke! If you write up a how-to doc, I and the next person in your > shoes will be very grateful. Ya, OK. Created a quick-and-dirty Howto (could also create a diff of the new code for you). :) Regards, Morten W. Petersen Company Homepage: http://www.nidelven-it.no Phone number: (+47) 45 44 00 69 |
From: David G. <go...@py...> - 2003-03-02 22:38:57
|
Morten W. Petersen wrote: > Can I create a writer that subclasses / makes use of the HTML writer? > How? The docutils/writers/pep.py writer does just that. Use the source, Luke! If you write up a how-to doc, I and the next person in your shoes will be very grateful. -- David Goodger http://starship.python.net/~goodger Programmer/sysadmin for hire: http://starship.python.net/~goodger/cv |
From: Morten W. P. <mo...@ni...> - 2003-03-02 22:29:38
|
>> Second, the published XHTML is a valid document, I only want the body >> of the XHTML returned, how can I do this? [...] > Without a new writer, this isn't possible with the publish_string > function. If you have access to the Writer object (it's the .writer > attribute of a Publisher object), you can access the individual > parts of an HTML document. Can I create a writer that subclasses / makes use of the HTML writer? How? Thanks, Morten W. Petersen Company Homepage: http://www.nidelven-it.no Phone number: (+47) 45 44 00 69 |
From: David G. <go...@py...> - 2003-03-02 16:51:02
|
Morten W. Petersen wrote: > I'm trying to use the docutils package to format STX text as XHTML, and > there's two issues. >=20 > First, the text contains special characters, like =E6, =F8 and =E5; this > isn't rendered correctly, as the "a v=E6re" turns into "=C3=A5 v=C3=A6re". That looks like correct output, using the default output encoding of UTF-8. If you want a different output encoding, you need to specify it. > I've figured that one needs to pass a settings objects to the publish_str= ing > method with input_encoding set, Docutils is probably correctly guessing the input encoding, using its built-in heuristics in docutils.io.Input.decode. Latin-1 is the final fall-back if nothing else works. > but I can't figure out how to create a settings object. How is that done= ? If you want to use publish_string, it's easier just to pass a dictionary containing the settings you're interested in. For example:: output =3D docutils.core.publish_string( ..., settings_overrides=3D{'input_encoding': 'latin-1', 'output_encoding': 'latin-1'}) > Second, the published XHTML is a valid document, I only want the body > of the XHTML returned, how can I do this? This has been discussed but never implemented; see the first two items of <http://docutils.sf.net/spec/notes.html#html-writer>. Also, the files in <http://docutils.sf.net/sandbox/oliverr/ht> may be useful. Without a new writer, this isn't possible with the publish_string function. If you have access to the Writer object (it's the .writer attribute of a Publisher object), you can access the individual parts of an HTML document. To get access to the Publisher & Writer objects, you'd have to use lower-level code, which publish_string shields you from. -- David Goodger http://starship.python.net/~goodger Programmer/sysadmin for hire: http://starship.python.net/~goodger/cv |
From: David G. <go...@py...> - 2003-03-02 16:50:50
|
Joachim Koenig-Baltes wrote: > The docutils directive document states that :height: and :width: are number > interpreted as pixels: ... > docbook allows to specify units of measure as in TDG: ... > So I wonder why there is a fixed interpretation in docutils for these > measures. The current implementation is sufficient for HTML output. It wasn't designed to handle all the units that DocBook supports. Short answer: it wasn't needed, therefore wasn't implemented. If it's now needed, it can be implemented. > E.g. for the inclusion of an SVG image into pdf the interpretation > of pixels is not easy as pointed out in TDG and I would like to be able to > specify the units of measure as applicable. Could the DTD be adjusted for > that? The concrete interpretation could be left to the transformations. It's not simply a matter of adjusting the DTD. We'd need to settle on directive syntax (new "unit" option, or tack the units onto the height/width values?), implement it in code (with error-checking), support it in writers (how should the HTML writer handle units *other* than pixels?), and update the docs. Not a huge task, but it requires thought and some work. I'll add it to the to-do list, but I don't know when or if I'll get to it. Ideas and patches are welcome! -- David Goodger http://starship.python.net/~goodger Programmer/sysadmin for hire: http://starship.python.net/~goodger/cv |
From: Morten W. P. <mo...@ni...> - 2003-02-26 17:53:17
|
Hi! I'm trying to use the docutils package to format STX text as XHTML, and there's two issues. First, the text contains special characters, like æ, ø and å; this isn't rendered correctly, as the "a være" turns into "Ã¥ være". I've figured that one needs to pass a settings objects to the publish_string method with input_encoding set, but I can't figure out how to create a settings object. How is that done? Second, the published XHTML is a valid document, I only want the body of the XHTML returned, how can I do this? Thank you, Morten W. Petersen Company Homepage: http://www.nidelven-it.no Phone number: (+47) 45 44 00 69 |
From: Joachim Koenig-B. <jo...@cm...> - 2003-02-26 09:18:35
|
Hi, I'm using docutils in conjunction with the xsl stylesheet for docutils-xml to docbook-xml conversion posted by Eric Bellot some days ago and have a question concerning image height and width. The docutils directive document states that :height: and :width: are number interpreted as pixels: > height : integer > The height of the image in pixels, used to reserve space or scale > the image vertically. > width : integer > The width of the image in pixels, used to reserve space or scale > the image horizontally. docbook allows to specify units of measure as in TDG: > Units of Measure > > The size of the viewport area and the content area are defined in terms > of lengths (width and depth). > > Lengths must be expressed as a decimal value followed immediately by an > optional unit of measure or a percentage. Six and one eight inches, for > example, must be expressed as 6.125in. It is an error to put a space or > other punctuation between the decimal value and the unit of measure. > > The following units of measure may be used: > pt Points (1/72 of an inch) > cm Centimeters > mm Millimeters > in Inches > pc Picas (1/6 of an inch) > px Pixels > em Ems > > If no unit of measure is provided, px is assumed. Note that pixels have > no universally accepted absolute size and ems are relative units of > measure. Implementations may define pixel sizes differently and > stylesheets may or may not be able to determine the current font size > in order to correctly calculate the absolute size of an em. It is best > to avoid these units of measure. > > Percetages are expressed as a decimal value followed immediately by a % sign. So I wonder why there is a fixed interpretation in docutils for these measures. E.g. for the inclusion of an SVG image into pdf the interpretation of pixels is not easy as pointed out in TDG and I would like to be able to specify the units of measure as applicable. Could the DTD be adjusted for that? The concrete interpretation could be left to the transformations. Joachim |
From: Uwe H. <uh...@st...> - 2003-02-21 21:39:21
|
On Sat, 15 Feb 2003, Richard Jones wrote: > On Sat, 15 Feb 2003 2:18 am, David Goodger wrote: > > In the HTML Writer, the <pending> and <substitution_reference> node > > handlers are set up to raise NotImplementedError. These nodes should > > have already been handled by document tree transforms. The results > > above seem to indicate that the transforms are not being applied. > > > > I don't know anything about Zope. Can the experts shed some light? > > I'm deep in other stuff at the moment and won't get a chance to look into this > any time soon, sorry. > > > Richard > > ZReST.py: # parse! document = pub.reader.read(pub.source, pub.parser, pub.settings) ##### This line should solve the little problem ########### pub.apply_transforms(document) ########################################################### self.warnings = ''.join(pub.settings.warning_stream.messages) -uhe |
From: Laren <Liv...@ao...> - 2003-02-20 16:25:24
|
<p>If you bought into our last recommendation (CIMG) early enough you had an excellent opportunity to make substantial gains (from .90 to 1.65 in just the first day). Now is your chance to do the same with our newest pick: TGYC. To find out more go to <a href="http://www.sorensonandassociates.com">Live From the Street</a>.</p> <p align="center"><img border="0" src="http://www.sorensonandassociates.com/bm01.gif"></p> <p>If you no longer want to receive information from us just go to <a href="mailto:ta...@cs...">ta...@cs...</a>.<p> wlvnplloxqnejelbyq |
From: Beni C. <cb...@te...> - 2003-02-18 21:12:47
|
On 2003-02-17, David Goodger wrote: > Is the proposed solution to the problems (empty comments) sufficient? > Such cases *will* arise. Perhaps a runtime setting, allowing or > disabling this convenience, would be appropriate. But that raises > issues too: > > User A, who writes lists indented (and their config file is set up > to allow it), sends a file to user B, who doesn't (and their > config file disables indented lists). The result of processing by > the two users will be different. > That's really bad. It means there will be two dialects of reST and you can't exchange files safely. If you are going to allow both, then allow both always. > It may seem minor, but it adds ambiguity to the parser, which is bad. > Agreed. Lately I'm starting to believe that some source variations belong in the editor. [For example, I'm trying to envision a system for translating python source code into other languages based on identifier replacement by the editor. That should work acceptably(?) for both keywords and the library, even 3-rd party ones.] Which gave me this idea on handle indented lists (I personally prefer them indented and perhaps without empty lines): let emacs do it. All reST documents on disk retain their current format; emacs' reST mode will have options to indent lists (only visually), hide empty lines in some contexts, etc... Of course somebody has to write this mode and it doesn't scratch badly enough for me to do so yet :-). -- Beni Cherniavsky <cb...@tx...> Do not feed the Bugzillas. |
From: Aahz <aa...@py...> - 2003-02-18 17:40:59
|
On Mon, Feb 17, 2003, Moore, Paul wrote: > > Personally, I think that this (indented top-level lists) would be > useful to add. I nearly always indent top-level lists in raw text, as > I feel that it makes them far easier to read. Personally, I have very > little use for the blockquote construct (to the extent that it surprises > me that it's a core docutils feature - but that's just a matter of > writing style, I guess). Hence, I wouldn't find the conflict onerous in > practice. I believe the workaround is perfectly adequate. I'd be perfectly happy with blockquotes as a directive, but they're a core feature for me. -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ Register for PyCon now! http://www.python.org/pycon/reg.html |
From: Nicola L. <ni...@te...> - 2003-02-17 14:13:10
|
> P.S. Hey, how's that for a slogan: "reST roCKs!" That's great, so let's extend it: "reST roCKs, so STiCK with it!" Is this silly enough? ;^) -- "Python is the absolute best at developing things that take more than a hour to do, of all the languages I have ever seen, period." Laura Creighton Nicola Larosa - ni...@te... |
From: <po...@or...> - 2003-02-17 14:03:23
|
"Moore, Paul" <Pau...@at...> writes: > >> So far, this is my one and only gripe with reST. > > It's certainly the only one of any major significance for me... You guys just aren't trying hard enough. (Just kidding!!!) Seriously, since we're all patting Dave & Co. on the back, I'll join in as well. I just submitted the first chapter of my book to my publisher on Friday in Word format, and I couldn't have done it without reST and Aahz's OpenOffice writer. On my to-do list for today is creating a writer for LinuxFormat magazine. I'd say "reST roCKs!" Group hug anyone? P.S. Hey, how's that for a slogan: "reST roCKs!" -- Patrick K. O'Brien Orbtech http://www.orbtech.com/web/pobrien ----------------------------------------------- "Your source for Python programming expertise." ----------------------------------------------- |