13718354131 | 25 May 2013 01:21

can not search chinese and short words


i found that in  restructured text search function:

1.can not search chinese character
2.can not search  short words

please see attatchment 1,it is my  target article to be searched
please see attatchment 2,can not search chinese character
please see attatchment 3,can not search  short words
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
Peter L. Soendergaard | 22 May 2013 15:17
Picon

capturing errors/warning

Hi,

I am running docutils.core.publish_string inside some python scripts and 
I need to process a lot of REST files from other people, and they often 
contains errors. I need to do some preprocessing to the files before 
passing them onto docutils, so that is why I call publish_string from 
inside of Python instead of the command line tools.

Currently, I just see errors and warnings on the command line like:

<string>:73: (ERROR/3) Unexpected indentation.
<string>:74: (WARNING/2) Block quote ends without a blank line; 
unexpected unindent.

Are there some parameters that I can pass onto publish_string so that I 
can capture the error output instead of it going straight to stderr?

Or some better method than calling publish_string ?

Cheers,
Peter.

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
Michael Prisant | 15 May 2013 17:19
Picon

Fwd: Problem: rst2latex --use-bibtex works but produces double references.


Thanks, sorry dumb error on my part. This works!

Thanks for coding this feature.  The latex writer and the rst2latex command line properly translates citations in the reST source for BibTeX processing in the latex output. 

Cool and very useful! (At least for me)

Michael


On Wed, May 15, 2013 at 10:34 AM, Guenter Milde <milde <at> users.sf.net> wrote:
On 2013-05-13, Michael Prisant wrote:

...

> But it looks like the writer is evaluating self.bibtex as null.

null? bool(self.bibtex) == False, because self.bibtex == '' # empty string

> I thought that I was setting this correctly by setting: (all the other
> settings seem to push through correctly to the latex writer with
> appropriate changes when set to different values.

> ltx_overrides = {
>     'input_encoding': 'utf8',
>     'output_encoding': 'utf8',
>     'doctitle_xform': True,
>     'initial_header_level': 2,
>     'use-latex_abstract': True,
>     'use_latex_citations': True,
>     'use_bibtex': 'no_abstract,Articles,Books,Theses',
>     'template': 'my_default.tex',
>     'use_bibtex': '',
      ^^^^^^^^^^^^^^^^^
>     'latex_preamble':'\input{my_preamble}',
>     'documentoptions':'letterpaper,11pt'
> }

> but self.bibtex seems to think it has a null string.  So once again, what
> am I doing wrong?

using the key 'use_bibtex' two times, the second time with an empty string.

Günter


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Docutils-users mailing list
Docutils-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.



--
Michael G. Prisant,

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
Michael Prisant | 14 May 2013 02:13
Picon

Fwd: custom directive: publish html and latex2e differently

Hi

OK after reading Guenter's note I see my misunderstanding of this piece of code:


return [nodes.raw('', biblsthtml, format='html')]

but my question still stands.

As noted I had adapted it from another source; it seemed to do what I wanted. But I didn't really understand what it did. This mistake may have created some confusion around my underlying request for explanation and sample code.

From Guenter's reponse I now understand that this was more or less equivalent to using the raw directive in the reST source. Which in that manner -- ie raw directives in the rest source -- as Guenter noted could be adapted and targeted to the various other writers.

But my specific question remains.  If I have the custom directive

.. bibentries::
     
    BCC+87;;

How do I write python code in the proper "Docutilic idiom" perhaps resembling my start with

class BibDirective(Directive):
    has_content = True
    def run(self):
...
directives.register_directive("bibentries", BibDirective)

which will allow me to translate the content to both html and latex.

So for purposes of explanation lets try for '<pre> This is the html bibdirective </pre>' to be emitted for html when I call

html_string = publish_string(\
        source=content,\
        writer_name='html',\
        settings_overrides=htm_overrides)

and '\begin{verbatim} This is the latex bibdirective \end{verbatim}' to be emitted when I call:

latex_string = publish_string(\
            source=content,\
            writer_name='latex2e',\
            settings_overrides=ltx_overrides)

Yes this is a dumb example but I think it is enough to get started. How can this question be made more simple or specific? Guenter is right in pointing out that the coding task is resembles coding the stock directives in the docutils source and in principle could begin there. 

But there is a lot of complexity in the docutils code base that is not relevant to my (or other "hacker/user) needs. That complexity makes it hard -- at least for me -- to use the docutils source as a basis for understanding how to "hack" extensions for personal use. In any case the starting point for my question is that I haven't been able to figure out how on my own to adapt the code in the docutils source for what I view as a modest extensions. (Donc J'affiche a la liste apres avoir passe quelques semaines a la recherche de cette question)
 
Responding with a simplified "toy" python example which would be my first preference.  That response might also be the basis for an "examples" addendum to the incomplete "Docutils Hackers Guide" And I not sure that I understand why there is so much resistance to just answering this question. 

If providing a "toy example" is not viewed as a legitimate request or is too burdensome, perhaps the list could at least identify specific pieces of code or one specific directive in the docutils source which would be most relevant for my needs and "easiest" to hack rather than just sending me back to the source in general.

Michael

PS Hoping that this can be posted to list in under 5 days!


On Mon, May 13, 2013 at 3:51 PM, Guenter Milde <milde <at> users.sf.net> wrote:
On 2013-05-13, Michael Prisant wrote:

> Thanks for this reply but I was looking for more specific advice with
> regard to coding rest custom directives (as opposed to using the "raw:
> approach) which are properly translated to both html and latex (like
> non-custom directives).

For specific adwise, we need a specific task. Otherwise, I could just
copy one of the standard directive classes (all of them are good examples
and (almost) all or them are properly translated to all output formats
that Docutils supports.

> Admittedly, I tried to pare my actual python code snippet to a bare
> minimum more or else working example. (This eliminated my actual bibtex
> processing which is what actually necessitated python code as opposed
> to just using "raw".  So some confusion seems to stem from the example
> given which doesn't do very much) On this basis I was hoping that one
> of the experienced coders could offer an *explicit* but *simple* python
> example to the group based on the very *simple* code snippets that I
> provided.

The problem I have with your example is, that it uses "raw" without any
need. I don't know for certain, but I don't think "raw" is required for
the real task either. Therefore, a solution to the stated problem of
providing two raw nodes -- one for latex one for html -- is just going
further in the wrong direction, away from a generic solution to the real
problem behind the example.

...

> The question here is really to help users who are attempting to code simple
> extensions to reST for their own specific uses as opposed to general
> development which would be folded into the software.  I want to translate a
> custom reST directive into just html and latex (as opposed to also
> translating into every possible output format) [2]

Did you already try to let the directive class return a list of "raw"
nodes (one for each supported output format)? AFAIK, "raw" nodes of the
"wrong" format are just ignored by the writers. Caveat: I did not test
this approach nor do I know whether it works this way.

Günter


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Docutils-users mailing list
Docutils-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.



--
Michael G. Prisant,



------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
Michael Prisant | 13 May 2013 18:50
Picon

Problem: rst2latex --use-bibtex works but produces double references.

Hi,

I have been experimenting with the --use-bibtex=mybibsty,mybib option.  The good news is I am able to this to properly process citations in reST.  But the latex translation creates tex code on processing which has two references sections.  Is this the way it is supposed to work? What am I doing wrong?

Here is my example:

- This reST snippet (extracted and edited):

Here is a citation [HLD+00]_. Here is more text with citations [PM60]_.
Donec id elit non mi porta gravida at eget metus.
Fusce dapibus, tellus accursus commodo, tortormauris condimentum nibh, ut fermentum massa justo sit ametrisus.
Etiam porta sem malesuada magna mollis euismod [Dwy04]_.

.. [HLD+00]
.. [PM60]
.. [Dwy04]

- Produces this tex (extracted and edited):

Here is a citation \cite{HLD+00}. Here is more text with citations \cite{PM60}.
Donec id elit non mi porta gravida at eget metus.
Fusce dapibus, tellus ac cursus commodo,tortor mauris condimentum nibh, ut fermentum massa justo sit ametrisus.
Etiam porta sem malesuada magna mollis euismod \cite{Dwy04}.

\begin{thebibliography}{HLD+00}
\bibitem[HLD+00]{HLD+00}{}
\bibitem[PM60]{PM60}{}
\bibitem[Dwy04]{Dwy04}{}
\end{thebibliography}

\bibliography{Articles,Books,Theses}
\bibliographystyle{no_abstract}


- This in turn produces two bibliographies when processed to pdf.  I would like to get rid of the "\begin{thebibliography}..\end{thebibliography}" without kludgey postprocessing of the tex source. Can this be done?

Michael

--
Michael G. Prisant,
 

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
Michael Prisant | 8 May 2013 13:48
Picon

custom directive: publish html and latex2e differently

Dear Group,

Let's say I have a custom restructured text directive of the following form in the string "content":

.. bibentries::
     
    BCC+87;;

For the purpose of this question when I call

print publish_string( source=content, writer_name='html',settings_overrides=overrides)

I would like to emit something similar to the following in my html stream:

<pre> This is the html bibdirective </pre>

and when I call:

print publish_string( source=content,writer_name='latex2e',settings_overrides=overrides)

to emit something similar to the following in my latex stream:

/begin{verbatim} This is the latex bibdirective /end{endverbatim}

Of course in my real code I do some munching on the content of bibdirective but for the purposes of this example/question  I'll work with this simplification.

In any case I have written code for a custom directive as follows::

class BibDirective(Directive):
    has_content = True
    def run(self):
        self.assert_has_content()
        text = '<pre> This is the html bibdirective </pre>'
        return [nodes.raw('', text, format='html')]

directives.register_directive("bibentries", BibDirective)

This idiom works fine if I am only interested in publishing the html part.

Now I want to be able to also publish latex output.  So I try adding something like this to my program:

class BibDirective(Directive):
    has_content = True
    def run(self):
        self.assert_has_content()
        text = '\begin{verbatim} This is the html bibdirective \end{verbatim}'
        return [nodes.raw('', text, format='latex')]


but I can't get this to work in a manner that I am able to appropriately choose the output depending on which writer is passed to the publisher.  So what is the proper "docutils" way of coding this?

Michael

--
Michael G. Prisant

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
13718354131 | 6 May 2013 06:53

why i can't use the search function in restructured text?


Please download the file form:
http://s.yunio.com/faEmEk
Unzip it and cd into ./build
Open the file index.html in chrome or firefox.
There is a file Chapter 1: Introduction to Django in it.
Why the seach function can't be used?
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
Carl Cerecke | 2 May 2013 11:40
Picon

replacement text for enumeration sequence initializer

Hi,

I'm likely to have many dozens of lists, many nested. I would like to defer a decision on how to format the enumeration sequences, so I can change my mind later on without having to do lots of manual editing. I thought the "replace" directive would be what I wanted, but it doesn't seem to work:

Instead of:
#. abc
#. def

have:
|seq1|. abc
#. def

.. |seq1| replace:: a

or:
|seq1| abc
#. def

.. |seq1| replace:: a.

Neither of these options (nor a few variations) work. The first gives "a. abc #. def" on one line, and the second results in an error in the replace directive (something to do with the period - maybe a bug?). Using ".. |seq1| replace:: a\." solves the error, but gives the result of the first option.

What is the best way to be able to specify the starting enumeration of multiple separate lists without having to edit each list? I want to specify the starting enumeration for each nesting level (e.g. |seq1|, |seq2|, |seq3|)

Cheers,
Carl.


------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
Carl Cerecke | 24 Apr 2013 23:34
Picon

inserting generated reST into a reST document

I want to create a directive that will insert some dynamically generated reST into a document. The actual use case is to insert a passage from the bible by reference. (Most of the time, a bible-reference becomes a hyperlink, and that is achieved with a custom role, but sometimes, I'd like to insert the entire passage into the document). I want to be able to write:

.. bible-passage:: John 1:1-4

and have the actual text of John 1:1-4 appear in the document.

This needs to be dynamic, as the documents are bible-version independent-- the bible version is specified as one of the build parameters. There will possibly be some formatting involved as well - some verses are poetry and are laid out as such. Some verses have translational footnotes which need to appear. Some use of italics, and small-caps.

As far as I can see, there are two options:
1. Have the new directive generate nodes directly in the node tree.
2. Have the new directive generate reST that it recursively parses and then inserts the resulting nodes into the node tree.

Which option is the best? And are there other options that I've missed that would be better?

Cheers,
Carl.
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
Carl Cerecke | 19 Apr 2013 11:02
Picon

draft-comments

What would be the best way to put draft comments in a rST document?

Ideally I'd like them rendered something like a LaTeX margin note or the equivalent construct as HTML (whatever that might be).

Also, they need to be able to turned on/off depended on whether I'm building in 'draft' mode or not.

I'm currently using sidebar, but want to know if there is a better way

Cheers,
Carl.
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
Sathiyan.S | 18 Apr 2013 11:35
Picon

[reStructuredTex] How to right align a Grid / Simple Table.

Hi,

How to make a right aligned grid or simple table(whole table) with 
coloured background.

Thanks in Advance

--

-- 
சு. சத்தியன் | Sathiyan. S
ஆமாச்சு | Amachu
http://amachu.in
+919445554010

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Docutils-users mailing list
Docutils-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.

Gmane