How to remove accent for internal hyperlink in sphinx documentation

Cross reference in the sphinx is done using ref, for example:

.. _my-reference-label:

Section to cross-reference
--------------------------

This is the text of the section.

It refers to the section itself, see :ref:`my-reference-label`.

When compiling in HTML, the hyperlink will be introduced after “see” above, but it will also be embedded in the tag <em>, which makes internal links different from external hyperlinks.

Is there a way to instruct sphinx not to underline internal links, i.e. not to embed them in a tag <em>?

+4
source share
2 answers

You can add a line to your CSS file:

a.internal {font-style: normal}

For Sphinx to use a custom CSS file, you need to edit conf.py:

html_style = 'my_style.css'

_static , html_static_path.

my_style.css :

@import url("default.css");  /* This should be the file used by your theme */

/* Internal links */
a.internal {font-style: normal}

<em>, , .

+2

.

+1

All Articles