How to specify image size in HTML Doxygen?

 ̄綄美尐妖づ 提交于 2019-11-29 01:27:05

Put this in the CSS file "Doc/doxygen_html_style.css":

div.image img[src="example.png"]{ 
    width:100px; 
}

And set the Doxygen config variable *HTML_EXTRA_STYLESHEET* to "Doc/doxygen_html_style.css"

To avoid resorting to an extra CSS style sheet you can directly inline the CSS code:

\htmlonly <style>div.image img[src="test.png"]{width:100px;}</style> \endhtmlonly 
@image html test.png "Caption"

even better create an alias in Doxygen configuration file:

ALIASES = imageSize{2}="\htmlonly <style>div.image img[src=\"\1\"]{\2}</style>\endhtmlonly"

and then use this new and shorter Doxygen command:

@imageSize{test.png,height:270px;width:20px;}
@image html test.png "Caption"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!