Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
223 views
in Technique[技术] by (71.8m points)

Change size of image in reStructuredText substitution references

I am writing a reStructuredText document with a lot of images that I reuse in different parts of the document but with different sizes.

I would like to use a mechanism such as substitution to keep my text as uncluttered as possible, but I can’t find a way to adapt the size of each substitution used.

I know that it is possible to set the width or height in the definition itself, but then it is impossible to change it when it is used.

For example, if I set the width to 75% in the definition, it will always be this width when used afterwards:

.. |IMG_1| image:: ./path_to:img_1.png
   :width: 75%

I would like |IMG_1| to be bigger here.

And smaller here |IMG_1|.

Note that I am not using Sphinx.

question from:https://stackoverflow.com/questions/65670866/change-size-of-image-in-restructuredtext-substitution-references

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...