twitter bootstrap - A way to incorporate image responsive class in sphinx RST? -


so in using rst format sphinx, image can included webpage using:

.. image:: images/pic.png     :align: center 

but won't work responsive bootstrap class img-responsive required instead. there way work around this? @ moment solution writing html raw code:

.. raw:: html    <div class="container-fluid">     <div class="row">       <img src="images/pic.png" class="img-responsive">      </div>   </div> 

but rather clumsy. there neater way handle this?

i'm looking same thing , found question sadly no answers. after more searching, did come across sphinx extension:

https://pypi.python.org/pypi/sphinxcontrib-css3image

basically lets specify additional settings in new directive (based on image) use this:

.. css3image:: /_images/foo.png   :margin: 10px 10px 10px 10px   :margin-left: 10px   :margin-right: 10px   :margin-top: 10px   :border-radius: 10px   :transform-origin: 10px 10px   :translate: 10px 10px   :translatey: 10px   :translatex: 10px   :scalex: 2.0   :scaley: 2.0   :rotate: -10deg 

i noticed in source code looks can specify class:

https://github.com/fabricesalvaire/sphinx-css3image/blob/master/sphinxcontrib/css3image.py#l123-l148

i installed , played around bit. seems it's doing @ least part of want?


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -