Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
224 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 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...