Thank You both, I'll use rst_prolog.

--
Boris.

On Tuesday, November 13, 2012 6:37:42 PM UTC+4, Takayuki SHIMIZUKAWA wrote:
>
> Hi Boris, 
>
> I'd like to introduce other two methods. 
>
> 1. rst_prolog setting in conf.py:: 
>
>       rst_prolog = """ 
>       .. role:: raw-html(raw) 
>          :format: html 
>       """ 
>
>    .. seealso:: http://sphinx-doc.org/config.html#confval-rst_prolog 
>
>
> 2. call app.add_role() in conf.py:: 
>
>       ## append these code to conf.py 
>
>       from docutils.parsers.rst.roles import code_role 
>
>       def raw_html_role(role, rawtext, text, lineno, inliner, 
> options={}, content=[]): 
>           options['format'] = ['html'] 
>           return code_role( 
>                  role, rawtext, text, lineno, inliner, 
>                  options=options, content=content) 
>
>       def setup(app): 
>            app.add_role('raw-html', raw_html_role) 
>
>    .. seealso:: 
> http://sphinx-doc.org/ext/appapi.html#sphinx.application.Sphinx.add_role 
>
> Best regards, 
> -- 
> Takayuki SHIMIZUKAWA 
> http://about.me/shimizukawa 
>
>
> 2012/11/13 Martin Bless <[email protected] <javascript:>>: 
> > Hi Boris Kheyfets, 
> > 
> >> Can I somehow make the role global for a project -- for example I'd 
> >> set this in index.rst, and that will be all: I'll be able to use &nbsp 
> >> in all rst files. 
> > 
> > we are using a single "includes.txt" which we then include in each ReST 
> > document at the top. Could then look like 
> > 
> > .. include:: includes.txt 
> > 
> > or 
> > 
> > .. include:: ../../../../includes.txt 
> > 
> > Martin 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "sphinx-users" group. 
> > To post to this group, send email to 
> > [email protected]<javascript:>. 
>
> > To unsubscribe from this group, send email to 
> [email protected] <javascript:>. 
> > Visit this group at http://groups.google.com/group/sphinx-users?hl=en. 
> > 
> > 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/sphinx-users?hl=en.


Reply via email to