Discussion:
[Docutils-users] Visible comments?
Matěj Cepl
2017-04-27 22:56:41 UTC
Permalink
Hi,

is there a way (perhaps rst2html5 option) to render comments
visible? I would like to send a draft of my text as HTML5 (or
PDF via rst2xetex) to somebody for review, and then my current
comments may be useful for better understanding of context and
what stands behind my text.

Any ideas?

Matěj
--
https://matej.ceplovi.cz/blog/, Jabber: ***@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8

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."
David Goodger
2017-04-28 00:02:12 UTC
Permalink
Post by Matěj Cepl
Hi,
is there a way (perhaps rst2html5 option) to render comments
visible? I would like to send a draft of my text as HTML5 (or
PDF via rst2xetex) to somebody for review, and then my current
comments may be useful for better understanding of context and
what stands behind my text.
Any ideas?
There is no way currently.

There is a --leave-comments option will transform reST comments into
<!-- HTML/XML comments -->. They won't show up in the output, but a
simple text substitution (after Docutils processing) could transform
them into something visible.

It would be straightforward to write a transform that converts
comments into some other form, like a "comment"-class admonition or
something.

David Goodger
<http://python.net/~goodger>
Matěj Cepl
2017-04-28 08:48:55 UTC
Permalink
Post by David Goodger
There is no way currently.
There is a --leave-comments option will transform reST comments into
<!-- HTML/XML comments -->. They won't show up in the output, but a
simple text substitution (after Docutils processing) could transform
them into something visible.
I have already created
https://mcepl.fedorapeople.org/tmp/comments.js , but I hoped
there could be some better solution.

Matěj
--
https://matej.ceplovi.cz/blog/, Jabber: ***@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8

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."


------------------------------------------------------------------------------
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
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" t
Guenter Milde
2017-04-28 16:38:18 UTC
Permalink
Post by Matěj Cepl
Post by David Goodger
There is no way currently.
There is a --leave-comments option will transform reST comments into
<!-- HTML/XML comments -->. They won't show up in the output, but a
simple text substitution (after Docutils processing) could transform
them into something visible.
I have already created
https://mcepl.fedorapeople.org/tmp/comments.js , but I hoped
there could be some better solution.
You could create a custom role "notes", say and "style it away" with CSS in
the final version.

Thre are no "rst-level" custom directives. If the comments/notes shall be
block-level elements, you might consider (ab)using an existing directive
that is not used otherwise in the document.
(There is even a "note" directive.)

With the new (development and upcoming 0.14) version, you can also style
(some) block-level elements in LaTeX.

Günter
Matěj Cepl
2017-05-03 20:13:13 UTC
Permalink
If the comments/notes shall be block-level elements, you might
consider (ab)using an existing directive that is not used
otherwise in the document. (There is even a "note" directive.)
This is good. Actually, “note” directive is exactly, what I will
abuse.

Thank you,

Matěj
--
https://matej.ceplovi.cz/blog/, Jabber: ***@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8

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."


------------------------------------------------------------------------------
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
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to
Continue reading on narkive:
Loading...