From: Tony N. <to...@gi...> - 2015-04-22 09:35:53
|
Greetings docutils users, Where do things stand with reStructuredText in other programming languages? Does anyone know any attempts? As it stands, I've seen a couple of non-python applications using reST - but they were just wrapping docutils. |
From: TP <wi...@gm...> - 2015-04-22 11:52:07
|
On Wed, Apr 22, 2015 at 2:35 AM, Tony Narlock <to...@gi...> wrote: > Greetings docutils users, > > Where do things stand with reStructuredText in other programming languages? > Does anyone know any attempts? As it stands, I've seen a couple of > non-python applications using reST - but they were just wrapping docutils. Jetbrains has a java implementation [1] used in their Python PyCharm product [2]. Not sure how complete it is and there isn't much activity on it. PyCharm page says "Epydoc and reStructuredText markup highlighting and code completion for tags and tag parameters. Docstrings and the code matching verification, and autoupdate on refactoring." [1] https://github.com/JetBrains/intellij-community/tree/master/python/rest/src/com/jetbrains/rest [2] https://www.jetbrains.com/pycharm/features/ |
From: Roberto A. <ra...@ne...> - 2015-04-22 13:31:36
|
On 22/04/15 08:51, TP wrote: > On Wed, Apr 22, 2015 at 2:35 AM, Tony Narlock <to...@gi...> wrote: >> Greetings docutils users, >> >> Where do things stand with reStructuredText in other programming languages? >> Does anyone know any attempts? As it stands, I've seen a couple of >> non-python applications using reST - but they were just wrapping docutils. > Jetbrains has a java implementation [1] used in their Python PyCharm > product [2]. Not sure how complete it is and there isn't much activity > on it. > > PyCharm page says "Epydoc and reStructuredText markup highlighting and > code completion for tags and tag parameters. Docstrings and the code > matching verification, and autoupdate on refactoring." > > [1] https://github.com/JetBrains/intellij-community/tree/master/python/rest/src/com/jetbrains/rest > > [2] https://www.jetbrains.com/pycharm/features/ Pandoc supports a subset of ReST and is written in Haskell IIRC > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > 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...> - 2015-04-22 11:59:58
|
On 2015-04-22, Tony Narlock wrote: > Greetings docutils users, > Where do things stand with reStructuredText in other programming > languages? Does anyone know any attempts? As it stands, I've seen a couple > of non-python applications using reST - but they were just wrapping > docutils. There is prest (perl reStructuredText) in the sandbox. I don't know how the Leo outline/editer http://leoeditor.com/tutorial-rst3.html implements its rST support. Günter |
From: Terry B. <ter...@ya...> - 2015-04-22 12:44:19
|
On Wed, 22 Apr 2015 11:59:41 +0000 (UTC) Guenter Milde <mi...@us...> wrote: > On 2015-04-22, Tony Narlock wrote: > > > Greetings docutils users, > > > Where do things stand with reStructuredText in other programming > > languages? Does anyone know any attempts? As it stands, I've seen > > a couple of non-python applications using reST - but they were just > > wrapping docutils. > > There is prest (perl reStructuredText) in the sandbox. > > I don't know how the Leo outline/editer > http://leoeditor.com/tutorial-rst3.html > implements its rST support. Leo is in Python and uses docutils. Cheers -Terry > Günter > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live > exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- > event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ Docutils-users > mailing list Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. |
From: TP <wi...@gm...> - 2015-04-22 13:17:06
|
On Wed, Apr 22, 2015 at 2:35 AM, Tony Narlock <to...@gi...> wrote: > Greetings docutils users, > > Where do things stand with reStructuredText in other programming languages? > Does anyone know any attempts? As it stands, I've seen a couple of > non-python applications using reST - but they were just wrapping docutils. You don't bother to mention it for some reason, but the docutils "Emacs Support for reStructuredText" [1] uses elisp to understand quite a bit about reStructured text documents. [1] http://docutils.sourceforge.net/docs/user/emacs.html |
From: Skip M. <sk...@po...> - 2015-04-22 13:20:36
|
Hasn't Markdown kind of taken over the marked-up-text world these days? Or is that just how it appears since that's what Github supports? Skip |
From: Roberto A. <ra...@ne...> - 2015-04-22 13:24:49
|
On 22/04/15 10:20, Skip Montanaro wrote: > Hasn't Markdown kind of taken over the marked-up-text world these > days? Or is that just how it appears since that's what Github supports? > GitHub also supports rst. Just use foo.rst as a filename: https://github.com/getnikola/nikola/blob/master/README.rst |
From: Peter F. <pf...@ar...> - 2015-04-23 08:34:51
|
Roberto Alsina schrieb am Mittwoch, den 22.04.2015 um 10:24: > On 22/04/15 10:20, Skip Montanaro wrote: > > Hasn't Markdown kind of taken over the marked-up-text world these > > days? Or is that just how it appears since that's what Github supports? > > GitHub also supports rst. Just use foo.rst as a filename: > > https://github.com/getnikola/nikola/blob/master/README.rst IMHO comparing the ugliness auf MarkDown with the beauty of ReST this seems to be unfortunately something which should be made more public amongst Github users. BTW: Who can contribute reports about her/his experiences with pandoc ( https://github.com/jgm/pandoc ) to this discussion? I've experimented in a project with the following makefile rule but later decided to manually edit the resulting .rst files a lot. %.rst: %.md pandoc $< -f markdown -t rst -o $@ To the OP question: Pandoc seems to contain a partly finished ReST implementation in the programming language Haskell. From the description of the Pandoc project I guess, that Davids original architecture of docutils might have inspired the author of Pandoc. Regards, Peter Funk -- Peter Funk, home: ✉Oldenburger Str.86, D-27777 Ganderkesee mobile:+49-179-640-8878 phone:+49-421-20419-0 <http://www.artcom-gmbh.de/> office: ArtCom GmbH, ✉Haferwende 2, D-28357 Bremen, Germany |
From: Matěj C. <mc...@ce...> - 2015-06-26 12:27:16
|
On 2015-04-23, 08:01 GMT, Peter Funk wrote: > BTW: Who can contribute reports about her/his experiences > with pandoc ( https://github.com/jgm/pandoc ) to this discussion? > I've experimented in a project with the following makefile rule but > later decided to manually edit the resulting .rst files a lot. https://github.com/jgm/pandoc/issues/2231#issuecomment-111875559 rST processor which cannot process .. image: elements is kind of difficult to use. And now, I cannot upgrade pandoc (more recent one doesn't build on my system, and I don't want to use unpackaged programs anyway). However, I have decided to make The Right Thing™ and wrote my hexo renderer using rst2html (https://gitlab.com/mcepl/hexo-renderer-restructuredtext) except now I have a different problem (issue #1 in that repository). rst2html generates only complete HTML documents and relies on tons of CSS stylesheets. Would it be possible to somehow persuade rst2html to produce just as plain HTML as possible without dependency on too much of CSS? I guess proper template (and --template parameter) could cover multitude of sins. Did anybody prepare such a template? Best, Matěj -- http://www.ceplovi.cz/matej/, Jabber: mc...@ce... GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC The world is coming to an end! Repent and return those library books! |
From: Roberto A. <ra...@ne...> - 2015-06-26 13:01:11
|
On 26/06/15 09:25, Matěj Cepl wrote: > On 2015-04-23, 08:01 GMT, Peter Funk wrote: >> BTW: Who can contribute reports about her/his experiences >> with pandoc ( https://github.com/jgm/pandoc ) to this discussion? >> I've experimented in a project with the following makefile rule but >> later decided to manually edit the resulting .rst files a lot. > https://github.com/jgm/pandoc/issues/2231#issuecomment-111875559 > > rST processor which cannot process .. image: elements is kind of > difficult to use. And now, I cannot upgrade pandoc (more recent > one doesn't build on my system, and I don't want to use > unpackaged programs anyway). > > However, I have decided to make The Right Thing™ and wrote my > hexo renderer using rst2html > (https://gitlab.com/mcepl/hexo-renderer-restructuredtext) except > now I have a different problem (issue #1 in that repository). > rst2html generates only complete HTML documents and relies on > tons of CSS stylesheets. > > Would it be possible to somehow persuade rst2html to produce > just as plain HTML as possible without dependency on too much of > CSS? In Nikola I just extract the body element using lxml and put it in the template where I want it. The CSS ... we have a rst.css which is extracted from docutils and a code.css generated by pygments. The rst.css ... it's very old fashioned, with the 3-d sidebars and such, so we have an outstanding improvement request to redo via LESS so it can be easier to tweak, but haven't got around to hacking on it yet. |
From: Marcelo H. <mar...@gm...> - 2015-06-26 13:43:13
|
Roberto Alsina decía, en el mensaje "Re: [Docutils-users] rst2html for partial HTML generation [Was: Re: 2015: reStructuredText implementations in other programming languages?]" del 26/6/2015 9:34:16: > In Nikola I just extract the body element using lxml and put it in the > template where I want it. Maybe I'm being silly, but wasn't it possible to simply call publish_parts and use the returned parts['html_body'], as indicated in http://docutils.sourceforge.net/docs/api/publisher.html#publish-parts-details ? Tell me if I'm missing something. -- o-=< Marcelo >=-o |
From: Roberto A. <ra...@ne...> - 2015-06-26 13:58:23
|
On 26/06/15 10:43, Marcelo Huerta wrote: > Roberto Alsina decía, en el mensaje "Re: [Docutils-users] rst2html for partial > HTML generation [Was: Re: 2015: reStructuredText implementations in other > programming languages?]" del 26/6/2015 9:34:16: > >> In Nikola I just extract the body element using lxml and put it in the >> template where I want it. > Maybe I'm being silly, but wasn't it possible to simply call publish_parts and > use the returned parts['html_body'], as indicated in > http://docutils.sourceforge.net/docs/api/publisher.html#publish-parts-details > ? Tell me if I'm missing something. No, that was perfectly fine. We do extract body because we support a bunch of "compilers" and not all of them play as nice. Actual code for rst is like this: return pub.writer.parts['docinfo'] + pub.writer.parts['fragment'] I don't quite recall the specifics of how it ended up like that ;-) |
From: Matěj C. <mc...@ce...> - 2015-06-26 14:10:29
|
On 2015-06-26, 13:58 GMT, Roberto Alsina wrote: > No, that was perfectly fine. We do extract body because we support a > bunch of "compilers" and not all of them play as nice. > > Actual code for rst is like this: > > return pub.writer.parts['docinfo'] + pub.writer.parts['fragment'] > > I don't quite recall the specifics of how it ended up like that ;-) Could somebody be able to write a simple example of such script? (/me gets a bit lost while diving into /usr/lib/python2.7/site-packages/docutils/) Thanks, Matěj -- http://www.ceplovi.cz/matej/, Jabber: mc...@ce... GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC Of course I'm respectable. I'm old. Politicians, ugly buildings, and whores all get respectable if they last long enough. --John Huston in "Chinatown." |
From: Roberto A. <ra...@ne...> - 2015-06-26 14:25:14
|
On 26/06/15 11:09, Matěj Cepl wrote: > On 2015-06-26, 13:58 GMT, Roberto Alsina wrote: >> No, that was perfectly fine. We do extract body because we support a >> bunch of "compilers" and not all of them play as nice. >> >> Actual code for rst is like this: >> >> return pub.writer.parts['docinfo'] + pub.writer.parts['fragment'] >> >> I don't quite recall the specifics of how it ended up like that ;-) > Could somebody be able to write a simple example of such script? > (/me gets a bit lost while diving into > /usr/lib/python2.7/site-packages/docutils/) Maybe something like https://github.com/getnikola/nikola/blob/master/nikola/plugins/compile/rest/__init__.py#L233 |
From: Kevin H. <kev...@gm...> - 2015-04-22 17:26:35
|
@Skip IMO, RestructuredText and Markdown fill different niches. Markdown really targets HTML output and is quite limited when talking about other output formats. This is mainly because it only supports a limited group of document elements. If you need something outside this set of elements, the Markdown way of handling this is to insert raw html. This really makes markdown only suitable for (relatively) simple documents or documents that will be turned into HTML. RestructuredText tries much harder to support whatever type of document element you happen to need, and if one isn't supported, it has built in extension mechanisms (custom directives/roles) which you can use. This allows it to be much more useful if you want to support non-HTML output formats. There's room for both in the ecosystem, as they do different things (though there is some overlap). As far as Markdown taking over, I would say that both have experienced quite a bit of growth in the last few years, Markdown mostly being used for simple documents, and HTML fragments (thinking comments here), and RestructuredText getting a lot of use and exposure via Sphinx (which is used for lots of projects even outside the Python community). On Wed, Apr 22, 2015 at 8:20 AM, Skip Montanaro <sk...@po...> wrote: > Hasn't Markdown kind of taken over the marked-up-text world these days? Or > is that just how it appears since that's what Github supports? > > Skip > > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live > exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- > event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. > > -- -- Kevin Horn |
From: George V. R. <ge...@re...> - 2015-04-22 17:53:15
|
StackOverflow and all the other StackExchange sites use Markdown heavily. I think the plethora of Markdown implementations in different languages has helped its adoption. There's also VST, an implementation of reStructuredText in VimL, Vim's native extension language. I used it for a year or so and gave the author feedback, but it was never great. https://github.com/vim-scripts/VST/blob/master/doc2/vst.txt -- /George V. Reilly ge...@re... Twitter: @georgevreilly *http://georgevreilly.github.io/ <http://georgevreilly.github.io/>* On Wed, Apr 22, 2015 at 10:26 AM, Kevin Horn <kev...@gm...> wrote: > @Skip > > IMO, RestructuredText and Markdown fill different niches. Markdown really > targets HTML output and is quite limited when talking about other output > formats. This is mainly because it only supports a limited group of > document elements. If you need something outside this set of elements, the > Markdown way of handling this is to insert raw html. This really makes > markdown only suitable for (relatively) simple documents or documents that > will be turned into HTML. > > RestructuredText tries much harder to support whatever type of document > element you happen to need, and if one isn't supported, it has built in > extension mechanisms (custom directives/roles) which you can use. This > allows it to be much more useful if you want to support non-HTML output > formats. > > There's room for both in the ecosystem, as they do different things > (though there is some overlap). > > As far as Markdown taking over, I would say that both have experienced > quite a bit of growth in the last few years, Markdown mostly being used for > simple documents, and HTML fragments (thinking comments here), and > RestructuredText getting a lot of use and exposure via Sphinx (which is > used for lots of projects even outside the Python community). > > > On Wed, Apr 22, 2015 at 8:20 AM, Skip Montanaro <sk...@po...> wrote: > >> Hasn't Markdown kind of taken over the marked-up-text world these days? >> Or is that just how it appears since that's what Github supports? >> >> Skip >> >> >> >> ------------------------------------------------------------------------------ >> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT >> Develop your own process in accordance with the BPMN 2 standard >> Learn Process modeling best practices with Bonita BPM through live >> exercises >> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- >> event?utm_ >> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF >> _______________________________________________ >> Docutils-users mailing list >> Doc...@li... >> https://lists.sourceforge.net/lists/listinfo/docutils-users >> >> Please use "Reply All" to reply to the list. >> >> > > > -- > -- > Kevin Horn > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live > exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- > event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. > > |
From: Grzegorz A. H. <rs...@gr...> - 2015-04-22 20:07:24
|
El 22/04/2015, a las 11:35, Tony Narlock <to...@gi...> escribió: > > Where do things stand with reStructuredText in other programming languages? Does anyone know any attempts? As it stands, I've seen a couple of non-python applications using reST - but they were just wrapping docutils. Lazy_rest (https://github.com/gradha/lazy_rest) implements a minimal rst spec in Nim. Since Nim compiles to C you can statically link it in most C software. |
From: Philipp A. <fly...@we...> - 2015-04-23 22:21:32
|
Skip Montanaro <sk...@po...> schrieb am Mi., 22. Apr. 2015 um 15:21 Uhr: > Hasn't Markdown kind of taken over the marked-up-text world these days? Or > is that just how it appears since that's what Github supports? > > Skip > it certainly has taken over the *non-semantic* world. reddit comments, readmes, forums, bug trackers. but i real documents, rST’s flexibility is unparalleled. except for LaTeX, which is a programming language and therefore has to be executed. an example where rST is perfect: http://flask.pocoo.org/docs/0.10/quickstart/#a-minimal-application https://github.com/mitsuhiko/flask/blob/master/docs/quickstart.rst the roles :class:, :meth:, :file:, :command:, :option:, :exc:, :attr:, … all semantically define what the text is, and allow independent styling, links to the official python docs, other project’s docs (e.g. werkzeug), and other parts of the same docs. the same can be applied to blocks. rST also knows citations, … |
From: Zeth <the...@gm...> - 2015-04-23 22:36:35
|
Markdown is the VHS of the plain text world. RST is the Betamax, technically superior but lower adoption. The Tables in RST are far superior, especially since they are natively supported by Emacs Table Mode (which comes by default in Emacs 25? 24.x? Cannot remember which exactly). I think one of the reasons Markdown often wins out is that Markdown's inline links are much quicker for people used to HTML or Wikis to understand. RST's link format is superior in that the reference style links look nicer in the textual format of the document, but that is kinda Betamax again, most people using a plain text format are doing small textbox style editing rather than writing a whole document. RST and the docutils setup are better for longer texts or documentation. On 23 April 2015 at 23:21, Philipp A. <fly...@we...> wrote: > Skip Montanaro <sk...@po...> schrieb am Mi., 22. Apr. 2015 um 15:21 Uhr: >> >> Hasn't Markdown kind of taken over the marked-up-text world these days? Or >> is that just how it appears since that's what Github supports? >> >> Skip > > > it certainly has taken over the *non-semantic* world. > > reddit comments, readmes, forums, bug trackers. > > but i real documents, rST’s flexibility is unparalleled. except for LaTeX, > which is a programming language and therefore has to be executed. > > an example where rST is perfect: > http://flask.pocoo.org/docs/0.10/quickstart/#a-minimal-application > > https://github.com/mitsuhiko/flask/blob/master/docs/quickstart.rst > > the roles :class:, :meth:, :file:, :command:, :option:, :exc:, :attr:, … all > semantically define what the text is, and allow independent styling, links > to the official python docs, other project’s docs (e.g. werkzeug), and other > parts of the same docs. > > the same can be applied to blocks. rST also knows citations, … > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. > |
From: Brecht M. <bre...@mo...> - 2015-04-27 17:45:40
|
On Wed, 22 Apr 2015 11:35:06 +0200, Tony Narlock <to...@gi...> wrote: > Greetings docutils users, > > Where do things stand with reStructuredText in other programming > languages? Does anyone know any attempts? As it stands, I've seen a > couple > of non-python applications using reST - but they were just wrapping > docutils. I think the Nim programming language has adopted rST for its documentation [1]. They have an rST parser [2] written in Nim. I don't know how complete this implementation is. [1] http://nim-lang.org/docgen.html [2] http://nim-lang.org/rstast.html You should also look at this SO question: http://stackoverflow.com/questions/2746692/restructuredtext-tool-support It has a long list of rST tools. Best Regards, Brecht |
From: Tony N. <to...@gi...> - 2015-04-28 11:21:24
|
(While studying systems programming...) CMake 3.0 has implemented a subset of reStructuredText + Sphinx in C++: - https://github.com/Kitware/CMake/blob/bb9d71b4fee2cc4abf55e0dcbadf85c6cbe0d07d/Source/cmRST.cxx - https://github.com/Kitware/CMake/blob/bb9d71b4fee2cc4abf55e0dcbadf85c6cbe0d07d/Source/cmRST.h On Mon, Apr 27, 2015 at 12:45 PM, Brecht Machiels <bre...@mo... > wrote: > On Wed, 22 Apr 2015 11:35:06 +0200, Tony Narlock <to...@gi...> > wrote: > > > Greetings docutils users, > > > > Where do things stand with reStructuredText in other programming > > languages? Does anyone know any attempts? As it stands, I've seen a > > couple > > of non-python applications using reST - but they were just wrapping > > docutils. > > I think the Nim programming language has adopted rST for its documentation > [1]. They have an rST parser [2] written in Nim. I don't know how complete > this implementation is. > > [1] http://nim-lang.org/docgen.html > [2] http://nim-lang.org/rstast.html > > You should also look at this SO question: > http://stackoverflow.com/questions/2746692/restructuredtext-tool-support > It has a long list of rST tools. > > Best Regards, > Brecht > > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. > |
From: Matěj C. <mc...@ce...> - 2015-06-26 15:01:50
|
On 2015-06-26, 14:25 GMT, Roberto Alsina wrote: > Maybe something like > > https://github.com/getnikola/nikola/blob/master/nikola/plugins/compile/rest/__init__.py#L233 Thanks, I'll take a look. Matěj -- http://www.ceplovi.cz/matej/, Jabber: mcepl<at>ceplovi.cz GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC <"}}}>< |
From: Guenter M. <mi...@us...> - 2015-06-26 15:10:24
|
Ahoj Matěj, On 2015-06-26, Matěj Cepl wrote: > However, I have decided to make The Right Thing™ and wrote my > hexo renderer using rst2html > (https://gitlab.com/mcepl/hexo-renderer-restructuredtext) except > now I have a different problem (issue #1 in that repository). > rst2html generates only complete HTML documents and relies on > tons of CSS stylesheets. To get parts of the HTML document, the "publish_parts()" convenience function can be used. It is described in http://docutils.sourceforge.net/docs/api/publisher.html#publisher-convenience-functions with example code in http://docutils.sourceforge.net/docutils/examples.py > Would it be possible to somehow persuade rst2html to produce > just as plain HTML as possible without dependency on too much of > CSS? This depends on what you intend: * the default html4css2 writer uses one stylesheet¹, default.css (which is very long) * the new html_base writer (!! to be renamed !!)² in the SVN repository uses two stylesheets¹: * minimal.css required basic rules * plain.css rules for easier reading and pleasant layout This writer also gets rid of IE 6 compatibility hacks to achieve a cleaner HTML output. * the html4trans__ writer in the sandbox does not depend on CSS It uses hard-coded HTML-styling (bad!) instead for rST elements that have no real equivalent in HTML. __ http://docutils.sourceforge.net/sandbox/html4trans/ ¹ + ``math.css``, if you have maths in the document and the "math-output" setting is html ² cf. http://repo.or.cz/w/docutils.git/blob_plain/HEAD:/docutils/docs/user/html.txt Günter |