You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to change from raw html to MyST directives and am trying use the figure-md directive (I have added colon_fence to the enabled extensions for MyST).
However, when I apply the following code, the caption is not aligned, and I'm struggling to work out why.
:::{figure-md} figure-1
:class: myclass
<imgsrc="figures/figure-1-test.png"alt="Figure showing something"width="100%"/>
This is my caption - it is not aligned
:::
If I inspect the generated page, I see the following, so I'm wondering why it's not being aligned?
<figureclass="myclass align-default" id="figure-1"><aclass="reference internal image-reference" href="../_images/figure-1-test.png"><imgalt="Figure showing something" src="../_images/figure-1-test.png" style="width: 100%;"/></a><figcaption><p><spanclass="caption-text">This is my caption - it is not aligned</span><aclass="headerlink" href="#figure-1" title="Permalink to this image">¶</a></p></figcaption></figure>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to change from raw html to MyST directives and am trying use the
figure-md
directive (I have added colon_fence to the enabled extensions for MyST).In the example here: https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#markdown-figures, the caption appears directly underneath the image, aligned with the image. This is what I'd expect have read the documentation on that directive.
However, when I apply the following code, the caption is not aligned, and I'm struggling to work out why.
If I inspect the generated page, I see the following, so I'm wondering why it's not being aligned?
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions