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
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Guenter M. <mi...@us...> - 2017-07-21 20:39:39
|
On 2017-07-21, Tony Narlock wrote: > So here is where I am: > https://gist.github.com/tony/1a03b7668c9e33672f4465dd63c6076b No time to look. > On July 20, 2017 at 11:54:07 AM, Guenter Milde via Docutils-users ( > On 2017-07-20, Tony Narlock wrote: >> On July 19, 2017 at 5:27:15 PM, Guenter Milde via Docutils-users ( >> ... > > I suppose rather than messing with "parts", you can use the publish_* > > functions in a wrapper script: > > > Don't use ``.. contents..`` in the source. > > > 1. Parse the rst source with publish_doctree() > > > Returns a doctree object. > > > > 2. Export doctree to HTML with publish_from_doctree() Does this work? > > 3. Run the toc-generating transform on the doctree. > > Returns a "toc doctree". > Where would it be? In docutils/transforms/parts.py > Am I applying the transform correctly in the paste? >> 4. Export the "toc doctree" with publish_from_doctree(). > Assuming I’m running the transform correctly, I see no difference in the > output. So I suppose you don't apply it correctly. The idea is to collect generate a TOC by travelling over the doctree in the same manner as it is done by the "Contents" transform. Therefore, it should be possible to use docutils.transforms.parts.Contents.build_contents() and pass it the startnode of the doctree returned by "publish_parts". >> This is just an idea, not tested and detailled. Günter |
From: Tony N. <to...@gi...> - 2017-07-21 20:26:33
|
Here’s where it’s at now (after looking at footer and PEP code): https://gist.github.com/tony/9c0d5eaa081b5ff611b7ca9e86a83046 Output: <div class="toc"> <hr class="toc" /> <div class="contents topic" id="contents"> <p class="topic-title first">Contents</p> </div> </div> So stuff is showing in TOC. But the pending contents information doesn’t seem to be rendering. On July 21, 2017 at 11:07:44 AM, Tony Narlock (to...@gi...) wrote: So here is where I am: https://gist.github.com/tony/1a03b7668c9e33672f4465dd63c6076b On July 20, 2017 at 11:54:07 AM, Guenter Milde via Docutils-users ( doc...@li...) wrote: On 2017-07-20, Tony Narlock wrote: > On July 19, 2017 at 5:27:15 PM, Guenter Milde via Docutils-users ( > doc...@li...) wrote: > On 2017-07-19, Tony Narlock wrote: > ... >> The transform generates the TOC by travelling the document tree after >> parsing is complete. ... >> https://gist.github.com/tony/c4fc5661fcd4b7de71c65dd8a52c9ea4 > Which contains the description: >> 1. Currently, table of contents is only outputted through directive. > ... >> 3. I want it to be available in "toc" *without* using the directive in the >> source. > For this, you would need to run the "Contents" transform also if the > document does not contain the "contents" directive. >> 2. I do not to position table of contents in the RST. (therefore, I >> specifically do not want it in html_body) I suppose rather than messing with "parts", you can use the publish_* functions in a wrapper script: Don't use ``.. contents..`` in the source. 1. Parse the rst source with publish_doctree() Returns a doctree object. 2. Export doctree to HTML with publish_from_doctree() 3. Run the toc-generating transform on the doctree. Returns a "toc doctree". Where would it be? Am I applying the transform correctly in the paste? 4. Export the "toc doctree" with publish_from_doctree(). Assuming I’m running the transform correctly, I see no difference in the output. This is just an idea, not tested and detailled. > It would be indispensable to get a code example or demonstration. This is left as an exercise to the reader. This has been educational and is helping me understand internals better. I prefer vanilla docutils whenever possible. Any more ideas? Günter ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Docutils-users mailing list Doc...@li... https://lists.sourceforge.net/lists/listinfo/docutils-users Please use "Reply All" to reply to the list. |
From: Tony N. <to...@gi...> - 2017-07-21 16:07:53
|
So here is where I am: https://gist.github.com/tony/1a03b7668c9e33672f4465dd63c6076b On July 20, 2017 at 11:54:07 AM, Guenter Milde via Docutils-users ( doc...@li...) wrote: On 2017-07-20, Tony Narlock wrote: > On July 19, 2017 at 5:27:15 PM, Guenter Milde via Docutils-users ( > doc...@li...) wrote: > On 2017-07-19, Tony Narlock wrote: > ... >> The transform generates the TOC by travelling the document tree after >> parsing is complete. ... >> https://gist.github.com/tony/c4fc5661fcd4b7de71c65dd8a52c9ea4 > Which contains the description: >> 1. Currently, table of contents is only outputted through directive. > ... >> 3. I want it to be available in "toc" *without* using the directive in the >> source. > For this, you would need to run the "Contents" transform also if the > document does not contain the "contents" directive. >> 2. I do not to position table of contents in the RST. (therefore, I >> specifically do not want it in html_body) I suppose rather than messing with "parts", you can use the publish_* functions in a wrapper script: Don't use ``.. contents..`` in the source. 1. Parse the rst source with publish_doctree() Returns a doctree object. 2. Export doctree to HTML with publish_from_doctree() 3. Run the toc-generating transform on the doctree. Returns a "toc doctree". Where would it be? Am I applying the transform correctly in the paste? 4. Export the "toc doctree" with publish_from_doctree(). Assuming I’m running the transform correctly, I see no difference in the output. This is just an idea, not tested and detailled. > It would be indispensable to get a code example or demonstration. This is left as an exercise to the reader. This has been educational and is helping me understand internals better. I prefer vanilla docutils whenever possible. Any more ideas? Günter ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Docutils-users mailing list Doc...@li... https://lists.sourceforge.net/lists/listinfo/docutils-users Please use "Reply All" to reply to the list. |
From: Guenter M. <mi...@us...> - 2017-07-20 16:53:48
|
On 2017-07-20, Tony Narlock wrote: > On July 19, 2017 at 5:27:15 PM, Guenter Milde via Docutils-users ( > doc...@li...) wrote: > On 2017-07-19, Tony Narlock wrote: > ... >> The transform generates the TOC by travelling the document tree after >> parsing is complete. ... >> https://gist.github.com/tony/c4fc5661fcd4b7de71c65dd8a52c9ea4 > Which contains the description: >> 1. Currently, table of contents is only outputted through directive. > ... >> 3. I want it to be available in "toc" *without* using the directive in the >> source. > For this, you would need to run the "Contents" transform also if the > document does not contain the "contents" directive. >> 2. I do not to position table of contents in the RST. (therefore, I >> specifically do not want it in html_body) I suppose rather than messing with "parts", you can use the publish_* functions in a wrapper script: Don't use ``.. contents..`` in the source. 1. Parse the rst source with publish_doctree() Returns a doctree object. 2. Export doctree to HTML with publish_from_doctree() 3. Run the toc-generating transform on the doctree. Returns a "toc doctree". 4. Export the "toc doctree" with publish_from_doctree(). This is just an idea, not tested and detailled. > It would be indispensable to get a code example or demonstration. This is left as an exercise to the reader. Günter |
From: Tony N. <to...@gi...> - 2017-07-20 13:10:35
|
This has been helpful, thank you. It would be indispensable to get a code example or demonstration. On July 19, 2017 at 5:27:15 PM, Guenter Milde via Docutils-users ( doc...@li...) wrote: On 2017-07-19, Tony Narlock wrote: > On July 19, 2017 at 11:33:54 AM, Guenter Milde via Docutils-users ( > doc...@li...) wrote: ... >> There’s transforms.parts.Content(), but I’m not sure where and how I’d put >> it into play. > The transform generates the TOC by travelling the document tree after > parsing is complete. > I just want publish_parts to output the HTML contents of TOC to its own > part. > e.g., In the same way publish_parts gives “html_body” and “fragment”, I > want it to return “toc”, which is the HTML output of the table of contents. Then, you can leave the transform and directive alone. > Yes. I pretty much want a new “part” created by HTMLWriter when > publish_parts is used that only contains “.. contents::” output. >> So how do you think I can go about that? Could you give me a code example >> to how I could get the equivalent of .. contents:: showing up in a “toc” >> part of writer? > Rather, you should provide a minimal working example showing what you want > to achieve (+ a diff between current and desired output). > https://gist.github.com/tony/c4fc5661fcd4b7de71c65dd8a52c9ea4 Which contains the description: > 1. Currently, table of contents is only outputted through directive. ... > 3. I want it to be available in "toc" *without* using the directive in the > source. For this, you would need to run the "Contents" transform also if the document does not contain the "contents" directive . Dont know how to do this and whether it is worth the effort. I suppose, a wrapper adding the directive to the input string may achieve the same result far more easy. > 2. I do not to position table of contents in the RST. (therefore, I > specifically do not want it in html_body) You can suppress it with the "strip-elements-with-class" setting. For an example of parts implementation, have a look how the "footer" part is implemented in writers/_html_base.py. It is not trivial, make sure to understand the code around every occurence of "footer" in the source file. I am looking at those, I think I have it figured out how to add “toc”. This is done by appending ’toc' to visitor_attributes. This gets collected during assemble_parts(). But I’m not sure of where and how to inject a directive (e.g. Contents) via Writer. That’d be needed to get the table of contents to be added to “toc”. Günter ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Docutils-users mailing list Doc...@li... https://lists.sourceforge.net/lists/listinfo/docutils-users Please use "Reply All" to reply to the list. |
From: Guenter M. <mi...@us...> - 2017-07-19 22:26:58
|
On 2017-07-19, Tony Narlock wrote: > On July 19, 2017 at 11:33:54 AM, Guenter Milde via Docutils-users ( > doc...@li...) wrote: ... >> There’s transforms.parts.Content(), but I’m not sure where and how I’d put >> it into play. > The transform generates the TOC by travelling the document tree after > parsing is complete. > I just want publish_parts to output the HTML contents of TOC to its own > part. > e.g., In the same way publish_parts gives “html_body” and “fragment”, I > want it to return “toc”, which is the HTML output of the table of contents. Then, you can leave the transform and directive alone. > Yes. I pretty much want a new “part” created by HTMLWriter when > publish_parts is used that only contains “.. contents::” output. >> So how do you think I can go about that? Could you give me a code example >> to how I could get the equivalent of .. contents:: showing up in a “toc” >> part of writer? > Rather, you should provide a minimal working example showing what you want > to achieve (+ a diff between current and desired output). > https://gist.github.com/tony/c4fc5661fcd4b7de71c65dd8a52c9ea4 Which contains the description: > 1. Currently, table of contents is only outputted through directive. ... > 3. I want it to be available in "toc" *without* using the directive in the > source. For this, you would need to run the "Contents" transform also if the document does not contain the "contents" directive . Dont know how to do this and whether it is worth the effort. I suppose, a wrapper adding the directive to the input string may achieve the same result far more easy. > 2. I do not to position table of contents in the RST. (therefore, I > specifically do not want it in html_body) You can suppress it with the "strip-elements-with-class" setting. For an example of parts implementation, have a look how the "footer" part is implemented in writers/_html_base.py. It is not trivial, make sure to understand the code around every occurence of "footer" in the source file. Günter |
From: Tony N. <to...@gi...> - 2017-07-19 21:04:26
|
On July 19, 2017 at 11:33:54 AM, Guenter Milde via Docutils-users ( doc...@li...) wrote: On 2017-07-19, Tony Narlock wrote: > I’m getting there, > I’ve overrides the Writer and added a new visitor attribute for “toc”. > visitor_attributes = Writer.visitor_attributes + ('toc', ) > So “toc” should be collected during assemble_parts. > From here, I want to inject the TOC the document into “toc”. > There’s transforms.parts.Content(), but I’m not sure where and how I’d put > it into play. The transform generates the TOC by travelling the document tree after parsing is complete. A good representation of its output can be gained, if you create a `minimal example` sample document, translate it to pseudoxml and examine the result. If the toc represents the logical structure you want to show in your output document, fine. You can leave the transform as-is. If not, explain the changes you think are necessary. That means, in my situation, the transform itself is OK as is. I just want publish_parts to output the HTML contents of TOC to its own part. e.g., In the same way publish_parts gives “html_body” and “fragment”, I want it to return “toc”, which is the HTML output of the table of contents. > There is also a directive for parsers.rst.directives.parts.Contents. I’m > curious how I would go about injecting that. This should be the class triggered by the ``.. contents::`` directive. It will ensure the transform is called at the right time and does the right thing. Yes. I pretty much want a new “part” created by HTMLWriter when publish_parts is used that only contains “.. contents::” output. > So how do you think I can go about that? Could you give me a code example > to how I could get the equivalent of .. contents:: showing up in a “toc” > part of writer? Rather, you should provide a minimal working example showing what you want to achieve (+ a diff between current and desired output). https://gist.github.com/tony/c4fc5661fcd4b7de71c65dd8a52c9ea4 Günter ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Docutils-users mailing list Doc...@li... https://lists.sourceforge.net/lists/listinfo/docutils-users Please use "Reply All" to reply to the list. Thanks, P.S. Using the new docutils 0.14rc2 release. Thanks Günter. |
From: Guenter M. <mi...@us...> - 2017-07-19 16:33:38
|
On 2017-07-19, Tony Narlock wrote: > I’m getting there, > I’ve overrides the Writer and added a new visitor attribute for “toc”. > visitor_attributes = Writer.visitor_attributes + ('toc', ) > So “toc” should be collected during assemble_parts. > From here, I want to inject the TOC the document into “toc”. > There’s transforms.parts.Content(), but I’m not sure where and how I’d put > it into play. The transform generates the TOC by travelling the document tree after parsing is complete. A good representation of its output can be gained, if you create a `minimal example` sample document, translate it to pseudoxml and examine the result. If the toc represents the logical structure you want to show in your output document, fine. You can leave the transform as-is. If not, explain the changes you think are necessary. > There is also a directive for parsers.rst.directives.parts.Contents. I’m > curious how I would go about injecting that. This should be the class triggered by the ``.. contents::`` directive. It will ensure the transform is called at the right time and does the right thing. > So how do you think I can go about that? Could you give me a code example > to how I could get the equivalent of .. contents:: showing up in a “toc” > part of writer? Rather, you should provide a minimal working example showing what you want to achieve (+ a diff between current and desired output). Günter |
From: Tony N. <to...@gi...> - 2017-07-19 12:57:25
|
I’m getting there, I’ve overrides the Writer and added a new visitor attribute for “toc”. visitor_attributes = Writer.visitor_attributes + ('toc', ) So “toc” should be collected during assemble_parts. >From here, I want to inject the TOC the document into “toc”. There’s transforms.parts.Content(), but I’m not sure where and how I’d put it into play. There is also a directive for parsers.rst.directives.parts.Contents. I’m curious how I would go about injecting that. So how do you think I can go about that? Could you give me a code example to how I could get the equivalent of .. contents:: showing up in a “toc” part of writer? Best, On July 18, 2017 at 1:32:12 PM, Guenter Milde via Docutils-users ( doc...@li...) wrote: On 2017-07-18, Tony Narlock wrote: > Is there a way to get the equivalent to “.. contents::” from publish_parts? According to http://docutils.sourceforge.net/docs/api/publisher.html#publish-parts-details , no. > If not, is there any way to get the table of contents programmatically? This could be done in a wrapper; or a custom writer or front-end. Places to look include the transforms.parts.Content() and the used HTML writer. > If not, is there any reason / issue with it being a feature? I don't know. > The practical use is a developer pulling out parts the HTML output would > like control over the table of contents output. The simple and secure approach would be CSS styling --- unless the task is more complicated. Günter ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Docutils-users mailing list Doc...@li... https://lists.sourceforge.net/lists/listinfo/docutils-users Please use "Reply All" to reply to the list. |
From: Guenter M. <mi...@us...> - 2017-07-18 20:22:39
|
Dear Docutils users, there is a new Docutils pre-release out at PyPi: `Release 0.14rc2`_. See the HISTORY_ for a detailled list of changes, additions and bugfixes. .. _Release 0.14rc2: https://pypi.python.org/pypi/docutils/0.14rc2 .. _HISTORY: http://docutils.sourceforge.net/HISTORY.html Beware, there are changes that may break existing documents or prevent working "out of the box": - Consistent handling of all whitespace characters in inline markup recognition. ( -> May break documents that relied on some whitespace characters (NBSP, ...) *not* to be recognized as whitespace. - The MathJax CDN shut down on April 30, 2017. For security reasons, we don't use a third party public installation as default but warn if `math-output` is set to MathJax without specifying a URL. -> HTML documents using math-output=MathJax without giving an URL will show the LaTeX syntax instead of typset mathematical content. See http://docutils.sourceforge.net/docs/user/config.html#math-output for details. - The LaTeX writer now handles class arguments for block-level elements by wrapping them in a "DUclass" environment. This replaces the special handling for "epigraph" and "topic" elements. -> Styling of epigraph and topic elements in a custom stylesheet or preamble code using DUroleepigraph or DUroletopic is ignored. See http://docutils.sourceforge.net/docs/user/latex.html We invite you to test and report any problems or improvement suggestions. Günter |
From: Guenter M. <mi...@us...> - 2017-07-18 19:22:21
|
On 2017-07-18, Guenter Milde via Docutils-users wrote: > On 2017-07-18, Alan Isaac wrote: > I expected this_ to work, but it produced an invalid link. > .. this:: [mycite]_ > .. [mycite] > My Citation Details. >> Are such indirect references allowed? > Yes, if you use the correct syntax:: > .. _this: [mycite]_ > .. [mycite] > My Citation Details. > (In your example, you used a *directive* "this".) Actually, the correct syntax is :: .. _this: mycite_ .. [mycite] My Citation Details. as the brackets don't become part of the hyperlink reference name. See docutils/docs/ref/rst/restructuredtext.html#hyperlink-targets Günter |
From: Guenter M. <mi...@us...> - 2017-07-18 18:31:55
|
On 2017-07-18, Tony Narlock wrote: > Is there a way to get the equivalent to “.. contents::” from publish_parts? According to http://docutils.sourceforge.net/docs/api/publisher.html#publish-parts-details, no. > If not, is there any way to get the table of contents programmatically? This could be done in a wrapper; or a custom writer or front-end. Places to look include the transforms.parts.Content() and the used HTML writer. > If not, is there any reason / issue with it being a feature? I don't know. > The practical use is a developer pulling out parts the HTML output would > like control over the table of contents output. The simple and secure approach would be CSS styling --- unless the task is more complicated. Günter |
From: Guenter M. <mi...@us...> - 2017-07-18 18:21:17
|
On 2017-07-18, Alan Isaac wrote: I expected this_ to work, but it produced an invalid link. .. this:: [mycite]_ .. [mycite] My Citation Details. > Are such indirect references allowed? Yes, if you use the correct syntax:: .. _this: [mycite]_ .. [mycite] My Citation Details. (In your example, you used a *directive* "this".) Günter |
From: Alan I. <ala...@gm...> - 2017-07-18 16:14:34
|
I expected this_ to work, but it produced an invalid link. .. this:: [mycite]_ .. [mycite] My Citation Details. Are such indirect references allowed? Thanks, Alan Isaac (using rst2html5) |
From: Tony N. <to...@gi...> - 2017-07-18 06:54:43
|
Hello docutils users, Is there a way to get the equivalent to “.. contents::” from publish_parts? http://docutils.sourceforge.net/0.4/docs/api/publisher.html If not, is there any way to get the table of contents programmatically? If not, is there any reason / issue with it being a feature? The practical use is a developer pulling out parts the HTML output would like control over the table of contents output. |
From: David G. <go...@py...> - 2017-06-21 15:26:33
|
On Wed, Jun 21, 2017 at 8:57 AM, Luis Gomez <lui...@gm...> wrote: > Hello, > > I'm using substitutions to insert images in section headings, but it's less > than ideal when I have to link to those sections > > Take, for example, the following ReST: > > |icon1| My Section > ================ > > This will result in a section link of "icon1-my-section". To refer to this > section elsewhere in the document, I have to write `icon1 My Section`_. > > I would like a way to allow that same section to be referred by `My > Section`_, and the resulting link to be "my-section", as if the substitution > text wasn't there. Is it possible to omit the text content of a substitution > in a section heading? Not currently. Workaround that will give you what you want: .. _My Section: |icon1| My Section ================ If your output is HTML, you could also add an icon via CSS styling. > If not, could this be considered for a future feature? Please add a feature request, else it will be forgotten: https://sourceforge.net/p/docutils/feature-requests/ David Goodger <http://python.net/~goodger> |
From: Luis G. <lui...@gm...> - 2017-06-21 13:57:15
|
Hello, I'm using substitutions to insert images in section headings, but it's less than ideal when I have to link to those sections Take, for example, the following ReST: |icon1| My Section ================ This will result in a section link of "icon1-my-section". To refer to this section elsewhere in the document, I have to write `icon1 My Section`_. I would like a way to allow that same section to be referred by `My Section`_, and the resulting link to be "my-section", as if the substitution text wasn't there. Is it possible to omit the text content of a substitution in a section heading? If not, could this be considered for a future feature? Thanks! Luis Gomez p.s. I'm not subscribed to the mailing list. |
From: Guenter M. <mi...@us...> - 2017-06-10 19:26:01
|
On 2017-06-07, Benoit Barthelet wrote: > [-- Type: text/plain, Encoding: --] > Hello, > I'm finding myself writing in rst and pasting long parts of code using the > .. code:: directive (BTW For complete code files, you can also use the "include" directive with the "code" option. http://docutils.sourceforge.net/docs/ref/rst/directives.html#including-an-external-document-fragment ) > I'd like to be able to have togglable code when using rst2html. > If I'm correct I can achieve that with or without javascript, in both case > I seem to be missing one part of the puzzle to make it work effortlessly. > With javascript, as described in > https://stackoverflow.com/a/25543713/3581357 I can create a container and > have the js code handle the toggle, this works fine for me, except that I'm > unable to find a way to add the js code in question to the rst2html cli. You can specify a custom html template to replace the default docutils/writers/html4css1/template.txt http://docutils.sourceforge.net/docs/user/config.html#template Also, you can pass class arguments to (almost) any rST element using either the "class" directive or (for directives) the "class" option:: .. code-block:: xml :class: toggle-hide So, maybe you don't need to wrap in a "container". > I see there is a --script flag but only for rst2html5. There is no such thing for rst2html5.py shipping with docutils. http://docutils.sourceforge.net/docs/user/config.html#html5-writer > Without javascript it seems like css can be used to get the toggle effect > as described here: > https://siongui.github.io/2017/02/27/css-only-toggle-dom-element/ > That solution would be quite elegant, ids could be changed to classes and > the css modified accordingly, but I don't see a way to add a <input > id="element-toggle" type="checkbox" /> which this solution is ultimately > based on. There is indeed not rST for an HTML <input> element. You could use raw HTML. > Is it where I should write my own directive as described here > http://docutils.sourceforge.net/docs/howto/rst-directives.html ? You would not only need a custom directive, but also an extension to the HTML writer (unless you let the custom directive generate raw HTML). Günter |
From: Benoit B. <ben...@gm...> - 2017-06-07 08:54:23
|
Hello, I'm finding myself writing in rst and pasting long parts of code using the .. code:: directive I'd like to be able to have togglable code when using rst2html. If I'm correct I can achieve that with or without javascript, in both case I seem to be missing one part of the puzzle to make it work effortlessly. With javascript, as described in https://stackoverflow.com/a/25543713/3581357 I can create a container and have the js code handle the toggle, this works fine for me, except that I'm unable to find a way to add the js code in question to the rst2html cli. I see there is a --script flag but only for rst2html5. Without javascript it seems like css can be used to get the toggle effect as described here: https://siongui.github.io/2017/02/27/css-only-toggle-dom-element/ That solution would be quite elegant, ids could be changed to classes and the css modified accordingly, but I don't see a way to add a <input id="element-toggle" type="checkbox" /> which this solution is ultimately based on. Is it where I should write my own directive as described here http://docutils.sourceforge.net/docs/howto/rst-directives.html ? thanks for your pointers for a beginner rst writer -- benoit barthelet http://pgp.mit.edu/pks/lookup?op=get&search=0xF150E01A72F6D2EE |
From: Guenter M. <mi...@us...> - 2017-06-03 14:56:40
|
On 2017-01-28, Matěj Cepl wrote: > I have written a bit longer document using rST (all discussed > files are in https://mcepl.fedorapeople.org/tmp/harry_potter/), > and then convered it to LaTeX just with plain rst2xetex (using > 0.13.1). Mind, that despite the name, rst2xetex does not generate plain TeX for XeTeX but LaTeX for XeTeX/LuaTeX (compile with `xelatex` or `xeluatex` commands). > The resulting file is > https://mcepl.fedorapeople.org/tmp/harry_potter/harry-potter-odpoved-brachovi.pdf > and the problem I have it is that footnotes are quite often not > on the page they referred to (see page 8 for an example). This is a know problem of the LaTeX writer. > Is there some configuration or something which would persuade > docutils not to mess with footenotes and use plain \footnote{} > in LaTeX? There is just a TODO entry in docs/dev/todo.txt: * footnotes + True footnotes with LaTeX auto-numbering (as option ``--latex-footnotes``) (also for target-footnotes): - attach footnote text to footnote-symbol node - write \footnote{<footnote text>} - consider cases where LaTeX does not support footnotes (inside tables, headings, ...)? - consider multiple footnote refs to common footnote text. The problem is that in the source, the footnote text is not known when the footnote mark is parsed. We would need a transform to connect these so that the footnote-mark is written as \footnote{<footnote text>} Günter |
From: engelbert g. <eng...@gm...> - 2017-05-29 12:56:14
|
On 29 May 2017 at 04:37, Ben Finney <ben...@be...> wrote: > Ben Finney <ben...@be...> writes: > > > Version parsing of Python distributions should accept […] > > My apologies, I gave the wrong PEP reference. That should be: > > Version parsing of Python distributions should accept PEP 386 values > <URL:https://www.python.org/dev/peps/pep-0386/>. > superceeded by https://www.python.org/dev/peps/pep-0440/ > -- > \ “When [science] permits us to see the far side of some new | > `\ horizon, we remember those who prepared the way – seeing for | > _o__) them also.” —Carl Sagan, _Cosmos_, 1980 | > Ben Finney > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. > |
From: Ben F. <ben...@be...> - 2017-05-29 02:37:31
|
Ben Finney <ben...@be...> writes: > Version parsing of Python distributions should accept […] My apologies, I gave the wrong PEP reference. That should be: Version parsing of Python distributions should accept PEP 386 values <URL:https://www.python.org/dev/peps/pep-0386/>. -- \ “When [science] permits us to see the far side of some new | `\ horizon, we remember those who prepared the way – seeing for | _o__) them also.” —Carl Sagan, _Cosmos_, 1980 | Ben Finney |
From: Ben F. <ben...@be...> - 2017-05-29 02:24:05
|
Kfir Ilani <kfi...@ir...> writes: > docutils latest package version is 0.14rc1 > while other packages try to parse the version (such as sphinx), it fails > due to parse error for int() What are the “other packages”? Version parsing of Python distributions should accept PEP 396 values <URL:https://www.python.org/dev/peps/pep-0396/>. > Can you please update docutils version to contains only integers (as > universal format) Rather, the tool needs to be updated to accept the standard PEP 396 version format. -- \ “The supreme vice is shallowness.” —Oscar Wilde, _De | `\ Profundis_, 1897 | _o__) | Ben Finney |
From: Kfir I. <kfi...@ir...> - 2017-05-28 16:16:17
|
docutils latest package version is 0.14rc1 while other packages try to parse the version (such as sphinx), it fails due to parse error for int() File "/Users/ci/workspace/wrk_automation_utils_mac_debug/.eggs/Sphinx-1.3.1-py2.7.egg/sphinx/util/compat.py", line 17, in docutils_version = tuple(int(x) for x in _du_version.split('.')[:2]) ValueError: invalid literal for int() with base 10: '14rc1' Can you please update docutils version to contains only integers (as universal format) Thanks Kfir Ilani |
From: Dave K. <dku...@da...> - 2017-05-22 23:34:14
|
Günter, Here is an update -- I did the following: 1. Merged your change for Jython import of locale module. 2. Added notes to HISTORY.txt. 3. Committed changes to the central repository. Dave K On Sun, May 21, 2017 at 10:22:39AM +0000, Guenter Milde wrote: > Dear Dave, > > On 2017-05-19, Dave Kuhlman wrote: > > > I did the following: > > > 1. Merged your changes (patch file below) into my local repository. > > > 2. Did a bit of testing. I had an exception when a document > > contained an admonition. I fixed that. > > > 3. Committed these changes to the central repository. > > > Thank you for your help with this. > > > Let me know if/when there is something more I can do. > > I have one more patch that makes the code failsafe for Python > implementations missing the locale module (e.g. Jython). > > If you could add a short summary of changed to the HISTORY.txt file, > we should be ready for release. > > Thanks, > > Günter > > > > Index: __init__.py > =================================================================== > --- __init__.py (Revision 8070) > +++ __init__.py (Arbeitskopie) > @@ -24,7 +24,10 @@ > import copy > import urllib2 > import docutils > -import locale > +try: > + import locale # module missing in Jython > +except ImportError: > + pass > from docutils import frontend, nodes, utils, writers, languages > from docutils.readers import standalone > from docutils.transforms import references > @@ -589,7 +592,10 @@ > elif len(subtag) == 1: > break # 1-letter tag is never before valid region tag > if region_code is None: > - rcode = locale.normalize(language_code) > + try: > + rcode = locale.normalize(language_code) > + except NameError: > + rcode = language_code > rcode = rcode.split('_') > if len(rcode) > 1: > rcode = rcode[1].split('.') > @@ -596,11 +602,10 @@ > region_code = rcode[0] > if region_code is None: > self.document.reporter.warning( > - 'invalid language-region. ' > - 'Could not find region with locale.normalize(). ' > - 'If language is supplied, then you must specify ' > - 'both language and region (ll-RR). Examples: ' > - 'es-MX (Spanish, Mexico), en-AU (English, Australia).') > + 'invalid language-region.\n' > + ' Could not find region with locale.normalize().\n' > + ' Please specify both language and region (ll-RR).\n' > + ' Examples: es-MX (Spanish, Mexico), en-AU (English, Australia).') > # Update the style ElementTree with the language and region. > # Note that we keep a reference to the modified node because > # it is possible that ElementTree will throw away the Python > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. -- Dave Kuhlman http://www.davekuhlman.org |