## docutils-users — General discussions, questions, help requests.

You can subscribe to this list here.

2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 Jan Feb Mar Apr May Jun Jul Aug (3) Sep (15) Oct (21) Nov (18) Dec (59) Jan (43) Feb (35) Mar (78) Apr (65) May (163) Jun (169) Jul (137) Aug (77) Sep (47) Oct (27) Nov (43) Dec (68) Jan (61) Feb (39) Mar (11) Apr (42) May (86) Jun (82) Jul (24) Aug (26) Sep (37) Oct (62) Nov (131) Dec (43) Jan (31) Feb (56) Mar (65) Apr (165) May (106) Jun (97) Jul (65) Aug (150) Sep (78) Oct (115) Nov (41) Dec (26) Jan (50) Feb (39) Mar (56) Apr (67) May (89) Jun (68) Jul (116) Aug (65) Sep (58) Oct (103) Nov (28) Dec (52) Jan (92) Feb (60) Mar (124) Apr (96) May (69) Jun (79) Jul (25) Aug (22) Sep (7) Oct (17) Nov (27) Dec (32) Jan (57) Feb (87) Mar (51) Apr (43) May (56) Jun (62) Jul (25) Aug (82) Sep (58) Oct (42) Nov (38) Dec (86) Jan (50) Feb (33) Mar (84) Apr (90) May (109) Jun (37) Jul (22) Aug (51) Sep (93) Oct (86) Nov (31) Dec (62) Jan (33) Feb (57) Mar (62) Apr (43) May (30) Jun (49) Jul (20) Aug (40) Sep (152) Oct (38) Nov (15) Dec (32) Jan (29) Feb (25) Mar (65) Apr (45) May (27) Jun (11) Jul (14) Aug (8) Sep (13) Oct (117) Nov (60) Dec (19) Jan (23) Feb (32) Mar (24) Apr (41) May (56) Jun (24) Jul (15) Aug (11) Sep (26) Oct (21) Nov (12) Dec (31) Jan (32) Feb (24) Mar (39) Apr (44) May (44) Jun (8) Jul (9) Aug (12) Sep (34) Oct (19) Nov (5) Dec (9) Jan (22) Feb (12) Mar (7) Apr (2) May (13) Jun (17) Jul (8) Aug (10) Sep (7) Oct (4) Nov Dec (39) Jan (13) Feb (12) Mar (12) Apr (40) May (5) Jun (22) Jul (3) Aug (42) Sep (5) Oct (10) Nov Dec (10) Jan (9) Feb (43) Mar (5) Apr (14) May (17) Jun (5) Jul (4) Aug Sep Oct Nov Dec

Showing results of 7594

1 2 3 .. 304 > >> (Page 1 of 304)
 Re: [Docutils-users] MathJax configuration From: Guenter Milde - 2016-07-21 07:40:13 On 2016-07-03, Alan Isaac wrote: > By default, MathJax recognizes back ticks as math delimiters: > http://docs.mathjax.org/en/latest/asciimath.html > Might it be a good idea for the HTML writers to changes this configuration? Could you please elaborate a bit or give a minimal example? Do you want to *use* asciimath or *prevent* accidential interpretation of text containing  as asciimath? Günter 
 [Docutils-users] naming conventions for custom roles? From: Alan Isaac - 2016-07-03 17:43:45 Custom roles are registered without changing their case, but case is changed when the roles are located. This seems inconsistent? Alan Isaac 
 [Docutils-users] MathJax configuration From: Alan Isaac - 2016-07-03 17:03:23 By default, MathJax recognizes back ticks as math delimiters: http://docs.mathjax.org/en/latest/asciimath.html Might it be a good idea for the HTML writers to changes this configuration? Alan Isaac 
 [Docutils-users] ISBN URL? From: Matej Cepl - 2016-07-01 20:36:27 Hi, I still cannot shake off a bad habit of reading pieces of dead wood, so I refer in my writing quite often to ISBNs. So, normally it looks like this: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus at tellus sollicitudin, pellentesque orci a, ornare risus. Vivamus et quam a felis aliquet sollicitudin quis ac orci “Four loves_”. Vestibulum pretium dui dolor, ac ullamcorper sapien suscipit sed. .. _Four loves: https://en.wikipedia.org/wiki/Special:BookSources?isbn=0156329301 I would prefer to be able either to use the reference like .. _Four loves: isbn:0156329301 and docutils would generate proper URL, or to go all the way to (how to make docutils role with two parameters?): Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus at tellus sollicitudin, pellentesque orci a, ornare risus. Vivamus et quam a felis aliquet sollicitudin quis ac orci isbn::“Four loves”,0156329301. Vestibulum pretium dui dolor, ac ullamcorper sapien suscipit sed. Do you know about something like this already made? If I am reading correctly the documentation_, does it mean that I have to write some Python? And if yes (I am a Python programmer, so it is not that big obstacle), could I somehow package it as a standalone Python package uploadable to PyPI? Are there any such packages already available on PyPI? I cannot find any. Thanks for any replies, Matěj .. _documentation: http://docutils.sourceforge.net/docs/howto/rst-roles.html -- http://matej.ceplovi.cz/blog/, Jabber: mceplceplovi.cz GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 Reality is merely an illusion, albeit a very persistent one. -- Albert Einstein 
 [Docutils-users] Custom Directives From: Paul VonZimmerman - 2016-06-14 23:57:29 Attachments: Message as HTML Hello everyone, I have a question about creating custom directives. My approach thus far has been to iterate through self.content and wrap HTML around it. I then convert the HTMLto rST using nodes.raw(). Is this a valid approach or frowned upon when creating custom directives? Here is a bit of sample code: class eCard(Directive): """ usage: .. ecard:: [name] [image] [name] [image] """ has_content = True optional_arguments = 0 def run(self): this = "

Desk Attendants

\n
\n" count = 0 for item in range(0, len(self.content)/2): name = self.content[count] image = self.content[count+1] count += 2 this += "
\n" this += '\n' this += "" + name + "" this += "
\n" this += "
\n" this = nodes.raw('', this, format='html') return [this] directives.register_directive('ecard', eCard) I haven't run into anything wrong with this approach, I'm mostly just curious if this way will cause problems in the future. 
 Re: [Docutils-users] How to get rst preview tools on CentOS7? From: Matěj Cepl - 2016-06-06 15:01:25 On 2016-06-06, 09:50 GMT, Oleksandr Gavenko wrote: > You should contact RH/CentOS packaging team and ask them for > inclusion of > rst2pdf utility. rst2pdf is part of Fedora/EPEL ... https://admin.fedoraproject.org/pkgdb/package/rpms/rst2pdf/ You just file a bug against the package asking for what you want. Of course, you may be asked to maitain the branch yourself, in which case, welcome to the Fedora packaging world! :) Matěj -- https://matej.ceplovi.cz/blog/, Jabber: mcepl@... GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 The American Republic will endure, until politicians realize they can bribe the people with their own money. -- based on a statement of Alexander Fraser Tytler 
 Re: [Docutils-users] How to get rst preview tools on CentOS7? From: Oleksandr Gavenko - 2016-06-06 09:50:42 On 2016-06-03, Oleksandr Gavenko wrote: > From: "David M. Karr" >> What I can't figure out is how to get the various RST preview tools, >> like "rst2pdf". I see that "rst2pdf" is available on Ubuntu, but I >> don't see it in the default repos for CentOS7. > > I don't use RH, just make web search for Debian "apt-file" alternative: > > sudo yum install yum-utils > repoquery --whatprovides '*bin/rst2pdf' On Debian 'rst2pdf' is provided by external project: $apt-file search bin/rst2pdf rst2pdf: /usr/bin/rst2pdf$ apt-cache show rst2pdf Version: 0.93-4 Maintainer: Elena Grandi Homepage: http://code.google.com/p/rst2pdf/ It seems that docutils team is not responsible for that utility. You should contact RH/CentOS packaging team and ask them for inclusion of rst2pdf utility. ================================================================ I managed to install CentOS in LXC container: sudo lxc-create -t centos -n centos2 -- --release 6.8 sudo lxc-create -t centos -n centos2 -- --release 7 Even "yum" utility provide built-in ability to query for packages which have certain files: [root@... media]# cat /etc/redhat-release CentOS release 6.8 (Final) [root@... media]# yum whatprovides '*/bin/rst2pdf*' No Matches found [root@... media]# yum whatprovides '*/bin/rst2*' python-docutils-0.6-1.el6.noarch : A system for processing plaintext documentation Matched from: Filename : /usr/bin/rst2html Filename : /usr/bin/rst2odt Filename : /usr/bin/rst2xml Filename : /usr/bin/rst2s5 Filename : /usr/bin/rst2latex Filename : /usr/bin/rst2man Filename : /usr/bin/rst2pseudoxml Filename : /usr/bin/rst2newlatex Filename : /usr/bin/rst2odt_prepstyles [root@... media]# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) [root@... media]# yum whatprovides '*/bin/rst2pdf*' No Matches found [root@... media]# yum whatprovides '*/bin/rst2*' Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.mirohost.net * extras: mirror.mirohost.net * updates: mirror.mirohost.net python-docutils-0.11-0.2.20130715svn7687.el7.noarch : System for processing plaintext documentation Repo : base Matched from: Filename : /usr/bin/rst2odt Filename : /usr/bin/rst2html Filename : /usr/bin/rst2pseudoxml Filename : /usr/bin/rst2xml Filename : /usr/bin/rst2s5 Filename : /usr/bin/rst2latex Filename : /usr/bin/rst2man Filename : /usr/bin/rst2odt_prepstyles Filename : /usr/bin/rst2xetex -- http://defun.work/ 
 Re: [Docutils-users] How to get rst preview tools on CentOS7? From: Oleksandr Gavenko - 2016-06-03 07:50:20 On 2016-06-01, David M. Karr wrote: > I'm just starting to look at ReST. I'll likely be editing rst files in > Emacs, although I could use Eclipse if a suitable editor was available. > As it's just simple text formatting, I could probably get by with a > plain text view in Eclipse if I had to. The Emacs mode appears to be a > little more functional. > I probably use docutils-common: /usr/share/emacs/site-lisp/rst.el On "C-c C-t C-t" it shows TOC for easy navigation and on "C-c C-=" it fixes and cycles through header declarations. I never use any other commands. Full command list is available on C-h m. I miss indenting and text wrapping in definition list declaration but except this and syntax highlighting issues in "verbatim" text it works fine > What I can't figure out is how to get the various RST preview tools, > like "rst2pdf". I see that "rst2pdf" is available on Ubuntu, but I > don't see it in the default repos for CentOS7. I don't use RH, just make web search for Debian "apt-file" alternative: sudo yum install yum-utils repoquery --whatprovides '*bin/rst2pdf' In this way you be able to find any package that contain specific file. See: http://stackoverflow.com/questions/1133495/how-do-i-find-which-rpm-package-supplies-a-file-im-looking-for While I build RST files with GNU make there are command C-c C-c C-c (M-x rst-compile). If you work with Java (I assume that because you are mentioning Eclipse) it is possible to build Java project documentation in Maven project with: org.apache.maven.plugins maven-site-plugin 3.2 org.nuiton.jrst doxia-module-jrst 1.5 -- http://defun.work/ 
 Re: [Docutils-users] How to get rst preview tools on CentOS7? From: Matěj Cepl - 2016-06-01 08:01:33 On 2016-05-31, 21:19 GMT, David M. Karr wrote: > I'm just starting to look at ReST. I'll likely be editing rst files in > Emacs, although I could use Eclipse if a suitable editor was available. > As it's just simple text formatting, I could probably get by with a > plain text view in Eclipse if I had to. The Emacs mode appears to be a > little more functional. Try to run yum list \*docutil\* That's where plenty of rST related programs are packaged. Matěj -- https://matej.ceplovi.cz/blog/, Jabber: mcepl@... GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 How many Bavarian Illuminati does it take to screw in a light bulb? Three: one to screw it in, and one to confuse the issue. 
 [Docutils-users] How to get rst preview tools on CentOS7? From: David M. Karr - 2016-05-31 21:20:02 I'm just starting to look at ReST. I'll likely be editing rst files in Emacs, although I could use Eclipse if a suitable editor was available. As it's just simple text formatting, I could probably get by with a plain text view in Eclipse if I had to. The Emacs mode appears to be a little more functional. What I can't figure out is how to get the various RST preview tools, like "rst2pdf". I see that "rst2pdf" is available on Ubuntu, but I don't see it in the default repos for CentOS7. 
 Re: [Docutils-users] Maybe a bug in rst2latex From: Guenter Milde - 2016-05-30 21:18:59 On 2016-05-28, Sergio wrote: > If I run rst2html test.rst > test.html I obtain a file with the links > correctly setted as one can expect. > But if I run > $rst2latex test.rst > test.tex >$ pdflatex test.tex > I obtain a series of warnings: > LaTeX Warning: Hyper reference chunk3' on page 2 > undefined on input line 150. > and the links there are not into the resultin pdf. > I can correct this behaviour adding into "test.tex" a series of macro > "\phantomsection\label{chunk1}", but I think this should be done by > rst2latex. You are right. There is no provision for handling of targets for a row of block element (including literal block and lists) in the latex writer. Thank you for the report. I am working on a fix. Günter 
 Re: [Docutils-users] how to correct reStructuredText markup in batch. From: Guenter Milde - 2016-05-30 17:01:26 On 2016-05-30, Jeffery wrote: > [-- Type: text/plain, Encoding: --] > hello,, > recently i review the translation project that translate English reST > document into chinese reST document use gettext tools on transifex > platform. > a you know, there have no bank need in chinese, and most translator no > sense with reST markup, so that the no bank around reST markup. I suppose you mean blank (or whitespace), do you? > now, i want a tools/or scripts that can correct this issue batch > process po file. I don't know of any such ready-made tool. I see two possible ways: a) Use a text editor or script language and regular expressions to convert e.g. "a*" to "a\ *" and "*a" to "*\ a" (a stands for any chinese letter around the inline markup). b) Download a daily snapshot of Docutils from the SVN repository (http://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/) In the configuration file set the new setting "character-level-inline-markup: True" or use the command line option --character-level-inline-markup (see the SVN version of docutils/docs/user/cofig.txt). Of course, this only works if you can install this version at the target system. Hope this helps Günter 
 [Docutils-users] how to correct reStructuredText markup in batch. From: Jeffery - 2016-05-30 14:49:43 Attachments: Message as HTML hello,, recently i review the translation project that translate English reST document into chinese reST document use gettext tools on transifex platform. a you know, there have no bank need in chinese, and most translator no sense with reST markup, so that the no bank around reST markup. now, i want a tools/or scripts that can correct this issue batch process po file. thanks. -- Jeffery -odoo expert form kunshan, suzhou, china 
 [Docutils-users] Maybe a bug in rst2latex From: Sergio - 2016-05-28 18:27:56 If I run rst2html test.rst > test.html I obtain a file with the links correctly setted as one can expect. But if I run $rst2latex test.rst > test.tex$ pdflatex test.tex I obtain a series of warnings: LaTeX Warning: Hyper reference chunk3' on page 2 undefined on input line 150. and the links there are not into the resultin pdf. I can correct this behaviour adding into "test.tex" a series of macro "\phantomsection\label{chunk1}", but I think this should be done by rst2latex. The file "test.tex" has the corrections into a comment block. ==file test.rst========================= ========= pipe test ========= A little benchmark to study the behavior of noweb. .. contents:: Table of Contents | The name of this program is "pipe" and has two blocks of code. .. _chunk1: :: = The first block of code takes two parameters and return the sum of them. Think of it as a graeting code between two column of beer. .. _chunk2: :: = def add(a, b): result = a + b return result *[defines used in chunk3_]* . then open the list and return the result. .. _chunk3: :: += result = result - [] return result The second and last block of code takes one parameter, uses the add function previously defined, and finally say hallo. .. _chunk4: :: = def sayhallo(s): v = add(s, s+1) print "Hallo %d" % (v) *[defines ]* . So has come the end of the program. List of chunks -------------- | , defined at chunk1_ | , defined at chunk2_, used at chunk1_ | , defined at chunk3_, used at chunk1_ List of identifiers ------------------- | *add*, defined at chunk2_, used at chunk3_ | *sayhallo*, defined at chunk3_ ==end of file test.rst================== ==file test.tex========================= \documentclass[a4paper]{article} % generated by Docutils ; \usepackage{fixltx2e} % LaTeX patches, \textsubscript \usepackage{cmap} % fix search and cut-and-paste in Acrobat \usepackage{ifthen} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \setcounter{secnumdepth}{0} %%% Custom LaTeX preamble % PDF Standard Fonts \usepackage{mathptmx} % Times \usepackage[scaled=.90]{helvet} \usepackage{courier} %%% User specified packages and stylesheets %%% Fallback definitions for Docutils-specific commands % providelength (provide a length variable and set default, if it is new) \providecommand*{\DUprovidelength}[2]{ \ifthenelse{\isundefined{#1}}{\newlength{#1}\setlength{#1}{#2}}{} } % lineblock environment \DUprovidelength{\DUlineblockindent}{2.5em} \ifthenelse{\isundefined{\DUlineblock}}{ \newenvironment{DUlineblock}[1]{% \list{}{\setlength{\partopsep}{\parskip} \addtolength{\partopsep}{\baselineskip} \setlength{\topsep}{0pt} \setlength{\itemsep}{0.15\baselineskip} \setlength{\parsep}{0pt} \setlength{\leftmargin}{#1}} \raggedright } {\endlist} }{} % hyperlinks: \ifthenelse{\isundefined{\hypersetup}}{ \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref} \urlstyle{same} % normal text font (alternatives: tt, rm, sf) }{} \hypersetup{ pdftitle={pipe test}, } %%% Title Data \title{\phantomsection% pipe test% \label{pipe-test}} \author{} \date{} %%% Body \begin{document} \maketitle A little benchmark to study the behavior of noweb. \phantomsection\label{table-of-contents} \pdfbookmark[1]{Table of Contents}{table-of-contents} \renewcommand{\contentsname}{Table of Contents} \tableofcontents \begin{DUlineblock}{0em} \item[] \end{DUlineblock} The name of this program is \textquotedbl{}pipe\textquotedbl{} and has two blocks of code. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% HERE SHOULD BE THE LINE %% %% \phantomsection\label{chunk1} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{quote}{\ttfamily \raggedright \noindent =\\ ~~\\ ~~ } \end{quote} The first block of code takes two parameters and return the sum of them. Think of it as a \texttt{graeting code} between two column of beer. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% HERE SHOULD BE THE LINE %% %% \phantomsection\label{chunk2} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{quote}{\ttfamily \raggedright \noindent =\\ ~~def~add(a,~b):\\ ~~~~~~result~=~a~+~b\\ ~~~~~~return~result } \end{quote} \emph{{[}defines used in chunk3\_{]}} . then open the list and return the result. % \begin{quote}{\ttfamily \raggedright \noindent +=\\ ~~~~~~result~=~result~-~{[}{]}\\ ~~~~~~return~result } \end{quote} The second and last block of code takes one parameter, uses the add function previously defined, and finally say hallo. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% HERE SHOULD BE THE LINE %% %% \phantomsection\label{chunk3} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{quote}{\ttfamily \raggedright \noindent =\\ ~~def~sayhallo(s):\\ ~~~~~~v~=~add(s,~s+1)\\ ~~~~~~print~\textquotedbl{}Hallo~\%d\textquotedbl{}~\%~(v) } \end{quote} \emph{{[}defines {]}} . So has come the end of the program. \section{List of chunks% \label{list-of-chunks}% } \begin{DUlineblock}{0em} \item[] \texttt{}, defined at \hyperref[chunk1]{chunk1} \item[] \texttt{}, defined at \hyperref[chunk2]{chunk2}, used at \hyperref[chunk1]{chunk1} \item[] \texttt{}, defined at \hyperref[chunk3]{chunk3}, used at \hyperref[chunk1]{chunk1} \end{DUlineblock} \section{List of identifiers% \label{list-of-identifiers}% } \begin{DUlineblock}{0em} \item[] \emph{add}, defined at \hyperref[chunk2]{chunk2}, used at \hyperref[chunk3]{chunk3} \item[] \emph{sayhallo}, defined at \hyperref[chunk3]{chunk3} \end{DUlineblock} \end{document} ==end of file test.tex================== 
 Re: [Docutils-users] MathJax From: Guenter Milde - 2016-05-24 10:32:06 On 2016-02-21, Alan Isaac wrote: > If I request MathJax output from rst2html, > it is included as an http request. > This means the content won't display (by default) > in browsers that care about mixed content if the > page is securely served. (Examples: FireFox, Edge.) > As I understand it, MathJax recommends using https: > http://mathjax.readthedocs.org/en/latest/misc/faq.html#how-do-i-access-the-mathjax-cdn-using-a-https-secure-connection > Can this be changed in the source (rather than > relying on user configuration)? Then, the abovementioned Browsers would refuse to show the page if it is served via "normal" html... > I am grateful for the configuration option, but it seems > the default is wrong? I recommend setting the mathjax URL in the docutils configuration file. > PS I am confused about why the documentation > http://docutils.sourceforge.net/docs/user/config.html#math-output > reads:: > math-output: MathJax file:/usr/share/javascript/mathjax/MathJax.js > instead of:: > --math-output="MathJax file:/usr/share/javascript/mathjax/MathJax.js" > In my experience, the quotes are essential for this to work. The example shows the use in a config file. The quotes are essential for command line arguments. They are not required in the configuration file. (Also a colon will not work on the command line.) Günter 
 Re: [Docutils-users] how to correct reStructuredText markup batchly. From: Guenter Milde - 2016-05-22 10:12:27 On 2016-05-21, Aahz wrote: > On Thu, May 19, 2016, Jeffery wrote: >> hey, recently i review the translation project that translate English reST >> document into chinese reST document use gettext tools on transifex >> platform. > Can you provide more information or at least a link? >> a you know, there have no bank need in chinese, and most translator no >> sense with reST markup, so that the no bank around reST markup. now, i >> want a tools/or scripts that can correct this issue batch process po file. > What is a "bank"? I suppose this should be "blank" (i.e. whitespace). rST inline markup recognition rules__ require whitespace or punctuation around inline markup. This is a problem for languages that dont't use whitespace to separate words (Chinese, Japanese, ...). __ http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules There is already a bug report and patch for this issue. https://sourceforge.net/p/docutils/patches/103/ --conservative-inline-markup Require whitespace or punctuation around inline markup. Enabled by default. --simple-inline-markup No restrictions on characters around inline markup. > If you want a batch process, you need to identify some kind of text > that you can use to delimit reST markup. This might be solved via a set of regular expression replacements, but I don't know a ready solution. It might be simpler to apply the patch https://sourceforge.net/p/docutils/patches/_discuss/thread/e5337656/6356/attachment/simple-inline-rules.patch or wait for the config setting to be in the SVN version and use it. Günter 
 Re: [Docutils-users] how to correct reStructuredText markup batchly. From: Aahz - 2016-05-21 18:09:58 On Thu, May 19, 2016, Jeffery wrote: > > hey, recently i review the translation project that translate English reST > document into chinese reST document use gettext tools on transifex > platform. Can you provide more information or at least a link? > a you know, there have no bank need in chinese, and most translator no > sense with reST markup, so that the no bank around reST markup. now, i > want a tools/or scripts that can correct this issue batch process po file. What is a "bank"? Do you mean "backquote"? If you want a batch process, you need to identify some kind of text that you can use to delimit reST markup. -- Aahz (aahz@...) <*> http://www.pythoncraft.com/ "There are three kinds of lies: Lies, Damn Lies, and Statistics." --Disraeli 
 Re: [Docutils-users] [Feature/Bug] If a role content is empty, it's never called? From: Guenter Milde - 2016-05-21 16:55:18 On 2016-05-20, Anil Lakhman wrote: > Hi, > I'm not subscribed to the mailing list, please CC me if possible on the > issue. > I have filed a github issue here replicating the issue: > https://github.com/sphinx-doc/sphinx/issues/2562 > Basically, If I add a custom role and pass an empty string within the > backticks, the role is never called, so I don't have a chance to show a > warning or error message. This is the same for standard roles:: das ist interpreted das ist   nichts becomes :: das ist interpreted das ist   nichts and is a consequence of the rST inline markup recognition rules__ __ http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules > For example the :download: role shows a warning > message if we pass an empty string or space within the backticks. Really? Then parsing happens somehow differently from Docutils implementation of rst. > Am I missing something or is this not possible? (I'm using sphinx) ... > # Now say I forget to pass through some text or empty space > # (accidently deleted, forget I had it, etc..) >:icon: # No text >:icon:  # Space empty text > #= :icon: > #= :icon:  > # Notice how it just outputs the role raw, it doesn't seem to even > call icon_role > # so I don't have a chance to check the value (and throw a warning) > If the content with backticks is empty, I would like to decide what to do > with the role (output a empty node, throw a warning, place a default icon). > Am I missing something? > The :download: role does this, but I'm finding it confusing as to who it's > implemented. It throws the following error if you pass an empty string. > # Throws an error: WARNING: Inline literal start-string without end-string. >:download: Does this really happen with :download: It usually happens if there is no end string (and also nothing else), e.g. :math: but not with :funny: more text > # Just outputs the raw role text (I don't have a chance to do anything) >:icon: Yes, this is not recognized as rST markup (just like e.g. :: x*y* or :math: x+2  ) I am afraid this is an issue to stay, as it concerns defines rST rules. You may file an enhancement ticket for recognition of :something: or :something  but there is no chance of a quick fix unfortunately. Günter 
 [Docutils-users] [Feature/Bug] If a role content is empty, it's never called? From: Anil Lakhman - 2016-05-20 16:52:06 Attachments: Message as HTML Hi, I'm not subscribed to the mailing list, please CC me if possible on the issue. I have filed a github issue here replicating the issue: https://github.com/sphinx-doc/sphinx/issues/2562 Basically, If I add a custom role and pass an empty string within the backticks, the role is never called, so I don't have a chance to show a warning or error message. For example the :download: role shows a warning message if we pass an empty string or space within the backticks. Am I missing something or is this not possible? (I'm using sphinx) Here it is in code: Say I have the following role which converts an icon role into an inline font awesome icon: # e.g: Create an inline def icon_role(role, rawtext, text, lineno, inliner, options={}, content=[]): options.update({'classes': ["fa-" + x for x in text.split(",")]}) options['classes'].append('fa') set_classes(options) node = nodes.inline(**options) return [node], [] # ... add it - Note i'm using sphinx hence app app.add_role('icon', icon_role) # Now I use it like so: :icon:rocket,2x #= Issue # Now say I forget to pass through some text or empty space # (accidently deleted, forget I had it, etc..) :icon: # No text :icon:  # Space empty text #= :icon: #= :icon:  # Notice how it just outputs the role raw, it doesn't seem to even call icon_role # so I don't have a chance to check the value (and throw a warning) If the content with backticks is empty, I would like to decide what to do with the role (output a empty node, throw a warning, place a default icon). Am I missing something? The :download: role does this, but I'm finding it confusing as to who it's implemented. It throws the following error if you pass an empty string. # Throws an error: WARNING: Inline literal start-string without end-string. :download: # Just outputs the raw role text (I don't have a chance to do anything) :icon: Any Ideas? You can also reply to this github ticket on sphinx: https://github.com/sphinx-doc/sphinx/issues/2562 Any help would be very much appreciated! - This could be an excellent feature for validation, if it doesn't exist already. Thanks! 
 [Docutils-users] how to correct reStructuredText markup batchly. From: Jeffery - 2016-05-19 01:53:16 Attachments: Message as HTML hey, recently i review the translation project that translate English reST document into chinese reST document use gettext tools on transifex platform. a you know, there have no bank need in chinese, and most translator no sense with reST markup, so that the no bank around reST markup. now, i want a tools/or scripts that can correct this issue batch process po file. thanks. -- Jeffery -odoo expert form kunshan, suzhou, china 
 [Docutils-users] Failing testsuite, Windows 10, python 2.7.11, docutils 0.12 From: Christian Aastorp - 2016-05-13 13:00:15 Attachments: Message as HTML     alltests.7z
 Re: [Docutils-users] Is there a DTD or Schema for the resulting reStructruredText XML? From: Guenter Milde - 2016-05-12 15:50:10 On 2016-05-11, Mikhail Edoshin wrote: Dear Michail, > Is there a DTD or Schema for the reStructuredText XML or any other > complete and maybe formal description of it? Yes, see the Documentation overview and http://docutils.sourceforge.net/docs/ especially http://docutils.sourceforge.net/docs/ref/docutils.dtd Günter 
 [Docutils-users] Is there a DTD or Schema for the resulting reStructruredText XML? From: Mikhail Edoshin - 2016-05-11 08:55:29 Attachments: Message as HTML Hi, Is there a DTD or Schema for the reStructuredText XML or any other complete and maybe formal description of it? -- Mikhail Edoshin mikhail.edoshin@... Skype: mikhail_edoshin (GMT+3) 
 Re: [Docutils-users] Literal blocks within Option Lists (for man pages) From: engelbert gruber - 2016-05-08 09:48:01 Attachments: Message as HTML i tried it with manpage writer an option block, and within it, a part of the text block indented. the rest of the text ("More lines 1", etc.) isn't aligned at the same level as "Line1". Instead, they're flush left to the screen -l, --color-limit limit Line1. Line2. Line3. :: Indented line 1. Indented line 2. Indented line 3. Indented line 4. Indented line 5. Indented line 6. More lines 1. More lines 2. More lines 3. produces this manpage:: () () NAME - an option block, and within it, a part of the text block indented. the rest of the text ("More lines 1", etc.) isn't aligned at the same level as "Line1". Instead, they're flush left to the screen -l,--color-limit limit Line1. Line2. Line3. Indented line 1. Indented line 2. Indented line 3. Indented line 4. Indented line 5. Indented line 6. More lines 1. More lines 2. More lines 3. () ? On 8 May 2016 at 11:14, Guenter Milde wrote: > On 2016-05-07, Thomas Adam wrote: > > Hi all, > > > I'm writing a man page using RST and have come across a situation I can't > > solve. I have an option block, and within it, I'd like to have a part > of the > > text block indented. To achieve that, I've done the following: > > > > > -l, --color-limit limit > > Line1. > > Line2. > > Line3. > > > :: > > > Indented line 1. > > Indented line 2. > > Indented line 3. > > > Indented line 4. > > Indented line 5. > > Indented line 6. > > > > > The indentation of a literal block is a layout setting, not an intrinsic > feature. > > For indented text, the simplest representation would be a block-quote. > If line-breaks are to be kept a line-block:: > > -l, --color-limit limit > Pragraph 1 > > Indented block > > | line 1 > | line 2 > > Only if you really want "literal" text (no markup parsing, teletype font), > use the literal block. > > > This all works fine, and the indented lines are rendered as I'd expect > them > > to. However, I also have further lines which are part of the > description for > > the '-l' option. However, those lines are not indented at the same > level as > > lines "Line1", "Line2", etc. > > > Here's the code as I've written it including the additional text: > > > > > -l, --color-limit limit > Line1. > Line2. > Line3. > > :: > > Indented line 1. > Indented line 2. > Indented line 3. > > Indented line 4. > Indented line 5. > Indented line 6. > > More lines 1. > More lines 2. > More lines 3. > > > > > However, the rest of the text ("More lines 1", etc.) isn't aligned at > > the same level as "Line1". Instead, they're flush left to the screen, > > which isn't something I'd expect. > > I cannot reproduce. Here, I get > > * lines in the "normal paragraphs" merged > * paragraphs "line1 ... line3" and "More lines 1 ... 3" aligned > in the HTML output. > > rst2html (Docutils 0.13 [repository], Python 2.7.11+, on linux2) > > > Maybe there is something in your original source but missing in the minimal > example? > > Günter > > > > ------------------------------------------------------------------------------ > Find and fix application performance issues faster with Applications > Manager > Applications Manager provides deep performance insights into multiple > tiers of > your business applications. It resolves application problems quickly and > reduces your MTTR. Get your free trial! > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z > _______________________________________________ > Docutils-users mailing list > Docutils-users@... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. > 
 Re: [Docutils-users] Literal blocks within Option Lists (for man pages) From: Guenter Milde - 2016-05-08 09:14:42 On 2016-05-07, Thomas Adam wrote: > Hi all, > I'm writing a man page using RST and have come across a situation I can't > solve. I have an option block, and within it, I'd like to have a part of the > text block indented. To achieve that, I've done the following: > > -l, --color-limit limit > Line1. > Line2. > Line3. > :: > Indented line 1. > Indented line 2. > Indented line 3. > Indented line 4. > Indented line 5. > Indented line 6. > The indentation of a literal block is a layout setting, not an intrinsic feature. For indented text, the simplest representation would be a block-quote. If line-breaks are to be kept a line-block:: -l, --color-limit limit Pragraph 1 Indented block | line 1 | line 2 Only if you really want "literal" text (no markup parsing, teletype font), use the literal block. > This all works fine, and the indented lines are rendered as I'd expect them > to. However, I also have further lines which are part of the description for > the '-l' option. However, those lines are not indented at the same level as > lines "Line1", "Line2", etc. > Here's the code as I've written it including the additional text: > -l, --color-limit limit Line1. Line2. Line3. :: Indented line 1. Indented line 2. Indented line 3. Indented line 4. Indented line 5. Indented line 6. More lines 1. More lines 2. More lines 3. > > However, the rest of the text ("More lines 1", etc.) isn't aligned at > the same level as "Line1". Instead, they're flush left to the screen, > which isn't something I'd expect. I cannot reproduce. Here, I get * lines in the "normal paragraphs" merged * paragraphs "line1 ... line3" and "More lines 1 ... 3" aligned in the HTML output. rst2html (Docutils 0.13 [repository], Python 2.7.11+, on linux2) Maybe there is something in your original source but missing in the minimal example? Günter 

Showing results of 7594

1 2 3 .. 304 > >> (Page 1 of 304)