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: Matěj C. <mc...@ce...> - 2018-07-17 09:30:22
|
On 2018-07-15, 09:38 GMT, Ed Brunelle wrote: > I am trying rst on emacs (both versions 25 and 27) on windows > 8.1. The rst-toc-insert command is not working, produces > nothing. Don't you get some error message somewhere? Best, Matěj -- https://matej.ceplovi.cz/blog/, Jabber: mc...@ce... GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 Basically, the only “intuitive” interface is the nipple. After that, it's all learned. -- Bruce Ediger when discussing intuivity of Mac OS http://groups.google.com/group/comp.sys.next.advocacy\ /msg/7fa8c580900353d0 |
From: Stefan M. <st...@me...> - 2018-07-16 19:36:51
|
Hi Ed! I'm the maintainer of rst.el which implements the reStructuredText support in Emacs. Yesterday Ed Brunelle wrote: > I am trying rst on emacs (both versions 25 and 27) on windows 8.1. > The rst-toc-insert command is not working, produces nothing. > > is this a feature only for emacs on linux/unix? No, this feature does not depend on the operating system in any way. In general the feature is supposed to work though I'm not using it myself. Can you please give me some details (private mail preferred)? Please give me the output of C-h v rst-version and C-h v emacs-version In addition a small example file would be useful and a description of what you are trying to do. Grüße Stefan |
From: Ed B. <edm...@gm...> - 2018-07-15 09:38:31
|
Hi, I am trying rst on emacs (both versions 25 and 27) on windows 8.1. The rst-toc-insert command is not working, produces nothing. is this a feature only for emacs on linux/unix? thank you in advance, Ed |
From: Ashim G. <ash...@gm...> - 2018-06-30 15:43:13
|
Hello Docutils-users, The documentation webpage about Directives_ seems to be missing. It has a filesize of 0 kb. The page was available some time ago: https://web.archive.org/web/20180521031733/http://docutils.sourceforge.net/docs/ref/rst/directives.html. It is a valuable reference. I'm not subscribed to this mailing list: just passing through. Thank You for the great software. .. _Directives: http://docutils.sourceforge.net/docs/ref/rst/directives.html -- Regards, Ashim Ghosh :) |
From: Guenter M. <mi...@us...> - 2018-06-29 19:53:52
|
On 2018-06-09, Cédric Van Rompay wrote: > Hi, > In a previous email [1] I mentioned the following command to install > docutils using pipenv from the sourceforge SVN repo: > pipenv install -e > svn+https://svn.code.sf.net/p/docutils/code/trunk/docutils#egg=docutils > Well actually it does not work. When I try to import docutils I get: > NameError: name 'StandardError' is not defined > From a quick Google search this is an issue of Python 2 to Python 3 > conversion (I am using Python 3). > Previously I was using pipenv and Python 3 but getting the code from > the Pypi repos and had no such problem. > My guess would be that pip (same problem if using pip instead of > pipenv, here pipenv simply calls pip) runs the "setup.py" with the > Python 2 runtime and not the Python 3 one. This would be a bit > surprising though, as my pip explicitly uses Python 3: > $ pip --version > pip 10.0.1 from > /home/cedric/.local/share/virtualenvs/docutils-from-sourceforge-UNMQpB5a/lib/python3.6/site-packages/pip > (python 3.6) > Any idea how to fix that ? Unfortunately not. It seems to be a pip/pipenv problem rather than a Docutils problem, though. As a workaround, you may try to separate download and installation. Using the "traditional" install tools (as described in the documentation) should work. > Or alternatively, do you know when the Pypi repository will be updated > to revision >=8217 ? > [1]: https://sourceforge.net/p/docutils/mailman/docutils-users/thread/CAJKLPhz%2Bi3qfCXdD%3DKeC_0s7tJ%3D9x5nP8MDwnD-EJCTHkAetwg%40mail.gmail.com/#msg36338595 There are currently no plans for a new release as we have several bugfixes in the pipeline waiting for approvement by David G. Günter |
From: Guenter M. <mi...@us...> - 2018-06-28 10:34:55
|
Dear Tongtong Shen, Thank you for reporting the problem. On 2018-06-25, Tongtong Shen wrote: > Good afternoon! > Thank you for your time. > I encountered a problem when running > ./buildhtml.py ../ > with the "--traceback" output as the following: ... > /// Processing directory: ../docs/ref/rst ... > ::: Processing: directives.txt > Traceback (most recent call last): ... > File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 2833, in definition_list_item > termlist, messages = self.term(termline, lineno) > File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 2869, in term > classifier_node[0].rawsource = part > File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/nodes.py", line 569, in __getitem__ > return self.children[key] > IndexError: list index out of range > Docutils version (0.15b.dev) > Python version (2.7.15) > My OS type & version: macOS High Sierra, Version 10.13.5 (17F77) > Command line used: ./buildhtml.py ../ The problem seems to be solved with the (unpublished) changes in my local setup (see the latest patches for bug 332 https://sourceforge.net/p/docutils/bugs/332/). Unfortunately, I am waiting since January for an OK to commit. Thanks again, Günter |
From: Tongtong S. <sh...@pu...> - 2018-06-25 23:07:04
|
Good afternoon! Thank you for your time. I encountered a problem when running ./buildhtml.py ../ with the "--traceback" output as the following: /// Processing directory: ../ ::: Processing: COPYING.txt ::: Processing: RELEASE-NOTES.txt ::: Processing: BUGS.txt ::: Processing: FAQ.txt ::: Processing: THANKS.txt ::: Processing: README.txt ::: Processing: HISTORY.txt /// ...Skipping directory (pruned): ../tools /// ...Skipping directory (pruned): ../test /// ...Skipping directory (pruned): ../licenses /// ...Skipping directory (pruned): ../docutils /// Processing directory: ../docs ::: Processing: index.txt /// Processing directory: ../docs/ref ::: Processing: doctree.txt ::: Processing: transforms.txt /// Processing directory: ../docs/ref/rst ::: Processing: restructuredtext.txt ::: Processing: directives.txt Traceback (most recent call last): File "./buildhtml.py", line 249, in <module> Builder().run() File "./buildhtml.py", line 197, in run self.visit(root, files, dirs) File "./buildhtml.py", line 220, in visit self.process_txt(directory, name) File "./buildhtml.py", line 242, in process_txt settings=settings) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/core.py", line 380, in publish_file enable_exit_status=enable_exit_status) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/core.py", line 664, in publish_programmatically output = pub.publish(enable_exit_status=enable_exit_status) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/core.py", line 217, in publish self.settings) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/readers/__init__.py", line 72, in read self.parse() File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/readers/__init__.py", line 78, in parse self.parser.parse(self.input, document) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/__init__.py", line 191, in parse self.statemachine.run(inputlines, document, inliner=self.inliner) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 171, in run input_source=document['source']) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/statemachine.py", line 239, in run context, state, transitions) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/statemachine.py", line 460, in check_line return method(match, context, next_state) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 3010, in text self.section(title.lstrip(), source, style, lineno + 1, messages) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 327, in section self.new_subsection(title, lineno, messages) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection node=section_node, match_titles=True) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse node=node, match_titles=match_titles) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 196, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/statemachine.py", line 239, in run context, state, transitions) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/statemachine.py", line 460, in check_line return method(match, context, next_state) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 3010, in text self.section(title.lstrip(), source, style, lineno + 1, messages) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 327, in section self.new_subsection(title, lineno, messages) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection node=section_node, match_titles=True) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse node=node, match_titles=match_titles) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 196, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/statemachine.py", line 239, in run context, state, transitions) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/statemachine.py", line 460, in check_line return method(match, context, next_state) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 2771, in underline self.section(title, source, style, lineno - 1, messages) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 327, in section self.new_subsection(title, lineno, messages) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection node=section_node, match_titles=True) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse node=node, match_titles=match_titles) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 196, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/statemachine.py", line 239, in run context, state, transitions) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/statemachine.py", line 460, in check_line return method(match, context, next_state) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 2728, in indent blank_finish=blank_finish, blank_finish_state='Definition') File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 319, in nested_list_parse node=node, match_titles=match_titles) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 196, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/statemachine.py", line 239, in run context, state, transitions) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/statemachine.py", line 460, in check_line return method(match, context, next_state) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 2910, in indent itemnode, blank_finish = self.definition_list_item(context) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 2833, in definition_list_item termlist, messages = self.term(termline, lineno) File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/parsers/rst/states.py", line 2869, in term classifier_node[0].rawsource = part File "/Users/shentongtong/Library/Python/2.7/lib/python/site-packages/docutils/nodes.py", line 569, in __getitem__ return self.children[key] IndexError: list index out of range Docutils version (0.15b.dev) Python version (2.7.15) My OS type & version: macOS High Sierra, Version 10.13.5 (17F77) Command line used: ./buildhtml.py ../ Thank you for your help! Regards, Tongtong. |
From: Aleksandr S. <al...@go...> - 2018-06-10 15:23:00
|
Hello! I have a script that converts XHTML files produced by Sphinx epub builder back to reStructuredText. If anyone is interested, I can publish the source. The problem I had to solve is this: we have some documents in rST, and we've got to make a translation. Unfortunately, CAT (Computer-assisted translation) tools do not play well with plain text files. So I gave XHTML files to my translators, and I got back HTML files with most of the markup preserved. The script parses an (X)HTML input to build a Docutils AST, and then runs a NodeVisitor to build rST text. The script does not cover all of the Docutils nodes, but it works for me. Best wishes, alex. |
From: Cédric V. R. <ced...@gm...> - 2018-06-09 09:37:00
|
Hi, In a previous email [1] I mentioned the following command to install docutils using pipenv from the sourceforge SVN repo: pipenv install -e svn+https://svn.code.sf.net/p/docutils/code/trunk/docutils#egg=docutils Well actually it does not work. When I try to import docutils I get: NameError: name 'StandardError' is not defined >From a quick Google search this is an issue of Python 2 to Python 3 conversion (I am using Python 3). Previously I was using pipenv and Python 3 but getting the code from the Pypi repos and had no such problem. My guess would be that pip (same problem if using pip instead of pipenv, here pipenv simply calls pip) runs the "setup.py" with the Python 2 runtime and not the Python 3 one. This would be a bit surprising though, as my pip explicitly uses Python 3: $ pip --version pip 10.0.1 from /home/cedric/.local/share/virtualenvs/docutils-from-sourceforge-UNMQpB5a/lib/python3.6/site-packages/pip (python 3.6) Any idea how to fix that ? Or alternatively, do you know when the Pypi repository will be updated to revision >=8217 ? [1]: https://sourceforge.net/p/docutils/mailman/docutils-users/thread/CAJKLPhz%2Bi3qfCXdD%3DKeC_0s7tJ%3D9x5nP8MDwnD-EJCTHkAetwg%40mail.gmail.com/#msg36338595 Regards, -- Cédric Van Rompay +33631475604 cedricvanrompay.fr |
From: Cédric V. R. <ced...@gm...> - 2018-06-09 09:06:57
|
Hi, The quick start guide [1] gives the following address to get the latest version: http://docutils.svn.sourceforge.net/viewvc/docutils/trunk/docutils/?view=tar This address leads to a HTTP 404 error. It should be replaced with the following address: https://svn.code.sf.net/p/docutils/code/trunk/ By the way, I would suggest to add the instructions on how to install docutils from the SVN repo using the new "pipenv" tool: $ pipenv install -e svn+https://svn.code.sf.net/p/docutils/code/trunk/docutils#egg=docutils Regards, [1] http://docutils.sourceforge.net/README.html#quick-start -- Cédric Van Rompay +33631475604 cedricvanrompay.fr |
From: Guenter M. <mi...@us...> - 2018-06-05 14:37:25
|
On 2018-05-26, Cédric Van Rompay wrote: > Hi, > When switching from "html" to "html5" writer, I got the following > problem: the docinfo is now included in the "body" parts when using > "publish_parts". Fixed in rev. 8217 https://sourceforge.net/p/docutils/code/8217/ Thank you for reporting, Günter |
From: Guenter M. <mi...@us...> - 2018-06-05 14:32:19
|
On 2018-06-05, Guenter Milde via Docutils-users wrote: > On 2018-06-02, Tim Landscheidt wrote: ... >>| […] >>| ! Undefined control sequence. >>| <write> ...re your \protect \texttt {\DUrolefile >>| {.emacs}} file}{\thepage }... ... Fixed in revision 8218. https://sourceforge.net/p/docutils/code/8218/ Thanks for the report, Günter |
From: Erik S. <st...@ma...> - 2018-06-05 10:01:05
|
On 04.06.2018 17:48, David Goodger wrote: > It should be safe. > > But if you're going to escape everything to prevent parsing, why > bother using Docutils? Certainly not everything, in this case I'm assembling figure-directives with captions from an image database. Had to hack Docutils 0.14 because substitutions cannot be used with block-only directives like 'figure'. -- erik |
From: Guenter M. <mi...@us...> - 2018-06-05 04:53:10
|
Dear Tim, thank you for reporting the problem with the Docutils LaTeX writer. On 2018-06-02, Tim Landscheidt wrote: > Hi, > I'm investigating a build failure in Fedora for Pymacs > (https://github.com/pinard/Pymacs) that occurs with (Fedora 28's) > Docutils 0.14, but not with (Fedora 27's) Docutils 0.13.1 > (https://bugzilla.redhat.com/show_bug.cgi?id=1555730). > The .rst file in question ... > starts with defining custom roles as "aliases": >| .. role:: code(strong) >| .. role:: file(literal) >| .. role:: var(emphasis) > Docutils 0.13.1 is fine with this, Docutils 0.14 causes a > TeX error > (https://bugzilla.redhat.com/attachment.cgi?id=1443162): >| […] >| ! Undefined control sequence. >| <write> ...re your \protect \texttt {\DUrolefile >| {.emacs}} file}{\thepage }... ... > The .tex files differ (inter alia) by: >| --- /tmp/f27.tex 2018-06-02 10:10:17.035844460 +0000 >| +++ /tmp/f28.tex 2018-06-02 10:10:02.937009242 +0000 >| @@ -1,6 +1,5 @@ >| \documentclass[a4paper]{article} >| % generated by Docutils <http://docutils.sourceforge.net/> >| -\usepackage{fixltx2e} % LaTeX patches, \textsubscript >| \usepackage{cmap} % fix search and cut-and-paste in Acrobat >| \usepackage{ifthen} >| \usepackage[T1]{fontenc} >| @@ -37,14 +36,11 @@ >| % inline markup (custom roles) >| % \DUrole{#1}{#2} tries \DUrole#1{#2} >| \providecommand*{\DUrole}[2]{% >| - \ifcsname DUrole#1\endcsname% >| + % backwards compatibility: try \docutilsrole#1{#2} >| + \ifcsname docutilsrole#1\endcsname% >| + \csname docutilsrole#1\endcsname{#2}% >| + \else >| \csname DUrole#1\endcsname{#2}% >| - \else% backwards compatibility: try \docutilsrole#1{#2} >| - \ifcsname docutilsrole#1\endcsname% >| - \csname docutilsrole#1\endcsname{#2}% >| - \else% >| - #2% >| - \fi% >| \fi% >| } ... > Is this a bug in Docutils, or does Pymacs need to add dummy > "\newcommand{\DUrolefile}{}"s as raw LaTex? You actually found a bug. I simplified the definition of the ``\DUrole`` macro, this worked fine in the standard tests but it turns out to be failing in cases where roles have defaults and with roles in section headings. Restoring the old definition helps (patch below). Dummy definitions in the document preamble or in raw LaTeX should help as a stop-gap measure, too. Thanks again, Günter diff --git a/trunk/docutils/docutils/writers/latex2e/__init__.py b/trunk/docutils/docutils/writers/latex2e/__init__.py index a11a98f3c..0463e3504 100644 --- a/trunk/docutils/docutils/writers/latex2e/__init__.py +++ b/trunk/docutils/docutils/writers/latex2e/__init__.py @@ -565,11 +565,15 @@ PreambleCmds.inline = r""" % inline markup (custom roles) % \DUrole{#1}{#2} tries \DUrole#1{#2} \providecommand*{\DUrole}[2]{% - % backwards compatibility: try \docutilsrole#1{#2} - \ifcsname docutilsrole#1\endcsname% - \csname docutilsrole#1\endcsname{#2}% - \else + \ifcsname DUrole#1\endcsname% \csname DUrole#1\endcsname{#2}% + \else + % backwards compatibility: try \docutilsrole#1{#2} + \ifcsname docutilsrole#1\endcsname% + \csname docutilsrole#1\endcsname{#2}% + \else% + #2% + \fi% \fi% }""" |
From: Guenter M. <mi...@us...> - 2018-06-04 20:34:22
|
On 2018-05-26, Cédric Van Rompay wrote: > Hi, > When switching from "html" to "html5" writer, I got the following > problem: the docinfo is now included in the "body" parts when using > "publish_parts". > For details see my question of StackOverflow: > https://stackoverflow.com/q/50423279/3025740 > As I say in StackOverflow it seems to contradict the documentation > which says that "body" should not contain the docinfo. You found a bug in the html5 writer. I have a local fix (patch below). Unfortunately, work on Docutils stalled (still waiting for a go-ahead for the patch fixing https://sourceforge.net/p/docutils/bugs/342/ and https://sourceforge.net/p/docutils/bugs/332/ ). > Searching in docutils mailing list, I found this message suggesting to > use "strip_elements_with_classes": > https://sourceforge.net/p/docutils/mailman/message/35973538/ > But it does not seem to work for me. This was an untested suggestion. It turns out that class arguments are lost during the docinfo transformation (this may be another bug) and therefore the proposed option does not work in this case. Günter diff --git a/trunk/docutils/docutils/writers/_html_base.py b/trunk/docutils/docutils/writers/_html_base.py index d9275d846..bca1db922 100644 --- a/trunk/docutils/docutils/writers/_html_base.py +++ b/trunk/docutils/docutils/writers/_html_base.py @@ -681,6 +681,7 @@ class HTMLTranslator(nodes.NodeVisitor): self.body.append('</dd>\n') def visit_docinfo(self, node): + self.context.append(len(self.body)) classes = 'docinfo' if (self.is_compactable(node)): classes += ' simple' @@ -688,6 +689,9 @@ class HTMLTranslator(nodes.NodeVisitor): def depart_docinfo(self, node): self.body.append('</dl>\n') + start = self.context.pop() + self.docinfo = self.body[start:] + self.body = [] def visit_docinfo_item(self, node, name, meta=True): if meta: @@ -1403,14 +1407,14 @@ class HTMLTranslator(nodes.NodeVisitor): classes = 'sidebar-subtitle' elif isinstance(node.parent, nodes.document): classes = 'subtitle' - self.in_document_title = len(self.body) + self.in_document_title = len(self.body)+1 elif isinstance(node.parent, nodes.section): classes = 'section-subtitle' self.body.append(self.starttag(node, 'p', '', CLASS=classes)) def depart_subtitle(self, node): self.body.append('</p>\n') - if self.in_document_title: + if isinstance(node.parent, nodes.document): self.subtitle = self.body[self.in_document_title:-1] self.in_document_title = 0 self.body_pre_docinfo.extend(self.body) |
From: David G. <go...@py...> - 2018-06-04 15:49:41
|
It should be safe. But if you're going to escape everything to prevent parsing, why bother using Docutils? David Goodger <http://python.net/~goodger> On 4 June 2018 at 10:28, Erik Stein <st...@ma...> wrote: > > Thanks, David. One additional question: Is it safe to just prefix every > string like this (which shouldn't be interpreted by docutils), or might > there be cases where the backslash ends up in the resulting document? > > Best > > -- erik > > > > On 04.06.2018 17:16, David Goodger wrote: >> >> On 4 June 2018 at 09:39, Erik Stein <st...@ma...> wrote: >>> >>> Hello -- >>> >>> I'm using docutils to semi-automatically construct certain content pages. >>> I've got the problem that sometimes people enter text which in the >>> context >>> of a restructured text file has some semantical meaning, but this is not >>> the >>> intention in the actual case. >>> >>> E.g. >>> >>> "v. l. Donald Trump, Kim Jong UN" >>> >>> where "v. l." means "from left to right" in a photo. >>> >>> Docutils interprets this as a roman numbered list (my guess, this is in >>> the >>> context of a figure >> >> You are correct that Docutils is interpreting this text as a list. In >> fact, this specific text will be interpreted as two nested >> lowercase-alphabetic enumerated lists. >> >>> is there a (python) function in docutils which allows to escape a string >>> in >>> a way that docutils simply renders it as text? >> >> There is no generic "escape all" function in Docutils. >> >> In many cases, simply prefixing a backslash to the text will escape it: >> >> $ rst2pseudoxml.py <<EOF >>> >>> \v. l. a b c >>> >>> EOF >> >> <document source="<stdin>"> >> <paragraph> >> v. l. a b c >> >> David Goodger >> <http://python.net/~goodger> >> >> >> ------------------------------------------------------------------------------ >> 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. > > > > ------------------------------------------------------------------------------ > 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: Erik S. <st...@ma...> - 2018-06-04 15:45:27
|
Thanks, David. One additional question: Is it safe to just prefix every string like this (which shouldn't be interpreted by docutils), or might there be cases where the backslash ends up in the resulting document? Best -- erik On 04.06.2018 17:16, David Goodger wrote: > On 4 June 2018 at 09:39, Erik Stein <st...@ma...> wrote: >> Hello -- >> >> I'm using docutils to semi-automatically construct certain content pages. >> I've got the problem that sometimes people enter text which in the context >> of a restructured text file has some semantical meaning, but this is not the >> intention in the actual case. >> >> E.g. >> >> "v. l. Donald Trump, Kim Jong UN" >> >> where "v. l." means "from left to right" in a photo. >> >> Docutils interprets this as a roman numbered list (my guess, this is in the >> context of a figure > You are correct that Docutils is interpreting this text as a list. In > fact, this specific text will be interpreted as two nested > lowercase-alphabetic enumerated lists. > >> is there a (python) function in docutils which allows to escape a string in >> a way that docutils simply renders it as text? > There is no generic "escape all" function in Docutils. > > In many cases, simply prefixing a backslash to the text will escape it: > > $ rst2pseudoxml.py <<EOF >> \v. l. a b c >> >> EOF > <document source="<stdin>"> > <paragraph> > v. l. a b c > > David Goodger > <http://python.net/~goodger> > > ------------------------------------------------------------------------------ > 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: David G. <go...@py...> - 2018-06-04 15:17:32
|
On 4 June 2018 at 09:39, Erik Stein <st...@ma...> wrote: > > Hello -- > > I'm using docutils to semi-automatically construct certain content pages. > I've got the problem that sometimes people enter text which in the context > of a restructured text file has some semantical meaning, but this is not the > intention in the actual case. > > E.g. > > "v. l. Donald Trump, Kim Jong UN" > > where "v. l." means "from left to right" in a photo. > > Docutils interprets this as a roman numbered list (my guess, this is in the > context of a figure You are correct that Docutils is interpreting this text as a list. In fact, this specific text will be interpreted as two nested lowercase-alphabetic enumerated lists. > is there a (python) function in docutils which allows to escape a string in > a way that docutils simply renders it as text? There is no generic "escape all" function in Docutils. In many cases, simply prefixing a backslash to the text will escape it: $ rst2pseudoxml.py <<EOF > \v. l. a b c > > EOF <document source="<stdin>"> <paragraph> v. l. a b c David Goodger <http://python.net/~goodger> |
From: Erik S. <st...@ma...> - 2018-06-04 14:55:11
|
Hello -- I'm using docutils to semi-automatically construct certain content pages. I've got the problem that sometimes people enter text which in the context of a restructured text file has some semantical meaning, but this is not the intention in the actual case. E.g. "v. l. Donald Trump, Kim Jong UN" where "v. l." means "from left to right" in a photo. Docutils interprets this as a roman numbered list (my guess, this is in the context of a figure is there a (python) function in docutils which allows to escape a string in a way that docutils simply renders it as text? thanks and best regards -- erik |
From: Tim L. <ti...@ti...> - 2018-06-02 21:30:10
|
Hi, I'm investigating a build failure in Fedora for Pymacs (https://github.com/pinard/Pymacs) that occurs with (Fedora 28's) Docutils 0.14, but not with (Fedora 27's) Docutils 0.13.1 (https://bugzilla.redhat.com/show_bug.cgi?id=1555730). The .rst file in question is https://github.com/pinard/Pymacs/blob/master/pymacs.rst.in with two instances of "@VERSION@" replaced by "0.25". It gets processed with "rst2latex --use-latex-toc --input-encoding=UTF-8 $rst $tex". It starts with defining custom roles as "aliases": | .. role:: code(strong) | .. role:: file(literal) | .. role:: var(emphasis) | ================================================================ | Pymacs version @VERSION@ | ================================================================ | […] Docutils 0.13.1 is fine with this, Docutils 0.14 causes a TeX error (https://bugzilla.redhat.com/attachment.cgi?id=1443162): | […] | ! Undefined control sequence. | <write> ...re your \protect \texttt {\DUrolefile | {.emacs}} file}{\thepage }... | l.580 F | rom Pymacs 0.23 and upwards, Python 2.2 or better is likely needed, | ? | ! Emergency stop. | […] The .tex files differ (inter alia) by: | --- /tmp/f27.tex 2018-06-02 10:10:17.035844460 +0000 | +++ /tmp/f28.tex 2018-06-02 10:10:02.937009242 +0000 | @@ -1,6 +1,5 @@ | \documentclass[a4paper]{article} | % generated by Docutils <http://docutils.sourceforge.net/> | -\usepackage{fixltx2e} % LaTeX patches, \textsubscript | \usepackage{cmap} % fix search and cut-and-paste in Acrobat | \usepackage{ifthen} | \usepackage[T1]{fontenc} | @@ -37,14 +36,11 @@ | % inline markup (custom roles) | % \DUrole{#1}{#2} tries \DUrole#1{#2} | \providecommand*{\DUrole}[2]{% | - \ifcsname DUrole#1\endcsname% | + % backwards compatibility: try \docutilsrole#1{#2} | + \ifcsname docutilsrole#1\endcsname% | + \csname docutilsrole#1\endcsname{#2}% | + \else | \csname DUrole#1\endcsname{#2}% | - \else% backwards compatibility: try \docutilsrole#1{#2} | - \ifcsname docutilsrole#1\endcsname% | - \csname docutilsrole#1\endcsname{#2}% | - \else% | - #2% | - \fi% | \fi% | } | […] My TeX is rusty, and I do not completely understand http://docutils.sourceforge.net/docs/user/latex.html#custom-interpreted-text-roles. Is this a bug in Docutils, or does Pymacs need to add dummy "\newcommand{\DUrolefile}{}"s as raw LaTex? TIA, Tim |
From: Cédric V. R. <ced...@gm...> - 2018-05-26 09:38:15
|
Hi, When switching from "html" to "html5" writer, I got the following problem: the docinfo is now included in the "body" parts when using "publish_parts". For details see my question of StackOverflow: https://stackoverflow.com/q/50423279/3025740 As I say in StackOverflow it seems to contradict the documentation which says that "body" should not contain the docinfo. Searching in docutils mailing list, I found this message suggesting to use "strip_elements_with_classes": https://sourceforge.net/p/docutils/mailman/message/35973538/ But it does not seem to work for me. Code example: import docutils.core SOURCE = '''\ :key: value Title ======== Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ''' docutils_params = { 'input_encoding': 'utf-8', 'strip_elements_with_classes': ['docinfo simple'] } body = docutils.core.publish_parts( SOURCE, writer_name='html5', settings_overrides=docutils_params )['body'] print(body) (using Python 3) Any idea ? -- Cédric Van Rompay |
From: <seb...@ch...> - 2018-05-24 19:00:36
|
Le 07/05/2018 à 08:22, Nicolas Rougier a écrit : > Hi all, > > I just released an open-access book on "Python & OpenGL for Scientific Visualization” (http://www.labri.fr/perso/nrougier/python-opengl/). > > The book has been written using rst and I wrote a slightly modified rst2html and a css to give the book a modern look (IMHO). Code is available at https://github.com/rougier/python-opengl. > Hello, I just want to say that your work is amazing. As much on the form as on the content. Can you explain what changed did you do in the rst2html code ? |
From: Nicolas R. <Nic...@in...> - 2018-05-24 18:49:54
|
Thanks. I mostly modified the code to take movies into account (both in image and figure directive) with some options. I wanted to be able to write something like: ``` .. figure:: movies/chapter-05/color-cube.mp4 :loop: :autoplay: :controls: :figwidth: 35% Figure The RGB rotating cube ``` The code is here: https://github.com/rougier/python-opengl/blob/master/rst2html.py Nicolas > On 24 May 2018, at 20:44, seb...@ch... wrote: > > > > Le 07/05/2018 à 08:22, Nicolas Rougier a écrit : >> Hi all, >> >> I just released an open-access book on "Python & OpenGL for Scientific Visualization” (http://www.labri.fr/perso/nrougier/python-opengl/). >> >> The book has been written using rst and I wrote a slightly modified rst2html and a css to give the book a modern look (IMHO). Code is available at https://github.com/rougier/python-opengl. >> > Hello, > > I just want to say that your work is amazing. As much on the form as on the content. > > Can you explain what changed did you do in the rst2html code ? |
From: Nicolas R. <Nic...@in...> - 2018-05-07 06:22:13
|
Hi all, I just released an open-access book on "Python & OpenGL for Scientific Visualization” (http://www.labri.fr/perso/nrougier/python-opengl/). The book has been written using rst and I wrote a slightly modified rst2html and a css to give the book a modern look (IMHO). Code is available at https://github.com/rougier/python-opengl. Nicolas |
From: Yuri D'E. <wa...@th...> - 2018-05-06 22:44:37
|
On Wed, Feb 15 2017, Alan Isaac wrote: > Might consideration be given to adding a `kbd` standard role? I'd like to resurrect this thread. Github added `kbd` as a standard role for documentation purposes, since it's very frequently used in READMEs along with code sections. They translate it into <kbd> tags in the html writer. Now I'm a bit thorn if I should add a non-standard role into my READMEs just to have fancier formatting. I admit, I'd use `kbd` quit a bit too. I write almost everything in rst these days, and showing "stuff to type" scores pretty high for me. |