Reputation: 11
I am trying to insert an inline image into an .rst file, with no success. I've tried replicating the syntax used by the previous tech writer, as follows:
|icon-copy|
The name of the image file referenced by the above syntax is studio_icon_copy. However, creating an image file called studio_icon_additional, and using the |icon-additional| syntax, doesn't work. I verified that this is the syntax used for all working instances of inline images.
I have also verified that the studio_icon_copy in the folder I'm using is indeed the right image by making a slight change to it and verifying that I see the change on the front end. I've also made sure that the new image I've created is in this same folder.
I've even tried copying and pasting the correct syntax in the desired place and simply replacing copy with additional, which didn't work either.
For what it's worth, I use Notepad++ and work in GitHub. After trying the above I have no clue how to insert it correctly, although I'm pretty sure I'm missing something.
Thank you.
Upvotes: 1
Views: 1326
Reputation: 91
Actual quote from https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions says:
The |biohazard| symbol must be used on containers used to
dispose of medical waste.
.. |biohazard| image:: biohazard.png
This should be actually this way:
.. |biohazard| image:: biohazard.png
The |biohazard| symbol must be used on containers used to
dispose of medical waste.
Always declare |pic| before referencing to it. I think there were some changes to that and documentation wasn't actually updated. You can always add option to make it really small, then you've got certainty that it will look good next to text:
.. |biohazard| image:: biohazard.png
:height: 25px
Upvotes: 8