RST cross referencing not working in code highlighting

Masood Azizi <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <[email protected]>
Hello,

I use docutils in order to produce documents via rst file.

In my document, I need to add and highlight some source code. Also I use
cross referencing to make some keywords (section names) hyperlink to the
respective section. So, simply append an underline to the end of the
word, e.g |mysection_| which refers to:

|mysection
---------

Some text...
|

The problem occurs when I use the format of code highlighting. That is,
if I use |.. code:: C| and then a block of C code, cross referencing in
the source code does not work:

|.. code:: C

    #include "example.h"
    int main()
    {
        printf("My Section is:");
        mysection_();
        return 0;    
    }|

So, how can I have both /code highlighting/ and /cross referencing/?


Thank you in advance,

Masood


PS. I am not a subscribed user.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.