customizing the rendering of a standard role (emphasis)

26 views
Skip to first unread message

marco.m

unread,
Sep 11, 2013, 12:16:38 PM9/11/13
to rst2pdf...@googlegroups.com
Hi,

I know I can use the role trick, to, say, put a word in red:

=========
.. role:: redtext

Foo :redtext:`initiative` bar
=========

plus an associated style definition for redtext will render the word "initiative" in red.

On the other hand, I want to change the rendering of a standard role, emphasis. I am finding a bizarre behavior and I am wondering if this is a bug in rst2pdf or if I am doing it wrong.

In my stylesheet I have:
=======
    emphasis:
      parent: normal
      textColor: red
=======

If the source file is:

=======
Foo *initiative* bar
=======

or

=======
.. role:: emphasis

Foo *initiative* bar
=======

the word "initiative" is rendered black italics, so it doesn't work.

If the source file is:

=======
.. role:: emphasis

Foo :redtext:`initiative` bar
=======

then "initiative" is rendered as red text.

What am I doing wrong?

thanks for rst2pdf! :-)
marco.m

marco.m

unread,
Oct 1, 2013, 2:24:29 AM10/1/13
to rst2pdf...@googlegroups.com
Anybody has an idea?
Reply all
Reply to author
Forward
0 new messages