You can make it a inline hyperlink target like so:

I love the big _`energy` of it all.
And I often use energy_ for fun.

This result is what you get:

<p>I love the big <span class="target" id="energy">energy</span> of it all.
And I often use <a class="reference internal" href="#energy">energy</a>
for fun.</p>


Cheers,

Martin.


Am 08.12.20 um 10:55 schrieb Luc Saffre:
> Looks as if you want the glossary directive (and the term role):
> https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-glossary
>
> Luc
>
> On 08.12.20 02:07, Pete wrote:
>> What I want to do is write the .rst code for this HTML output:
>>
>> instead of:        <strong>energy</strong>
>> it has to be:      <strong id="energy">energy</strong>
>>
>> How is this done?  The .rst code I'm using now is:   **energy**
>>
>> This will be used hundreds of times (using a software program to
>> convert source into .rst files) in a multipage document (~150 .rst
>> files) so a simple reference label approach, such as `.. _energy:` 
>> would likely be created on different pages, generating
>> multiply-defined errors.
>>
>> BTW, the word "energy" is just an example of the type of words that
>> word be anchored.
>>
>> related topics:
>> * https://groups.google.com/g/sphinx-dev/c/bNW2Tc4hhOA
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "sphinx-users" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to [email protected]
>> <mailto:[email protected]>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sphinx-users/57d82d37-a9e3-416d-9c3e-b89e14784b03n%40googlegroups.com
>> <https://groups.google.com/d/msgid/sphinx-users/57d82d37-a9e3-416d-9c3e-b89e14784b03n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sphinx-users/605d699f-d9de-cdc7-27d6-d675ebe18d9a%40gmail.com
> <https://groups.google.com/d/msgid/sphinx-users/605d699f-d9de-cdc7-27d6-d675ebe18d9a%40gmail.com?utm_medium=email&utm_source=footer>.

-- 
Martin Bless

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/fb6ec812-1826-d52b-ebbb-486a3c5040f5%40gmail.com.

Reply via email to