display: block;
}
figure.m-figure.m-fullwidth > *:first-child {
+ /* otherwise figure with clickable image is centered differently */
display: inline;
}
figure.m-figure.m-fullwidth img, figure.m-figure.m-fullwidth svg {
role.
`Colored terminal output`_
-==========================
+--------------------------
Besides code, it's also possible to "highlight" ANSI-colored terminal output.
For that, m.css provides a custom Pygments lexer that's together with
`colored console highlighting as well <{filename}/plugins/math-and-code.rst#colored-terminal-output>`_.
`Code figure`_
-==============
+--------------
It often happens that you want to present code with corresponding result
together. The code figure looks similar to `image figures <#figures>`_ and
consists of a :html:`<figure>` (or :html:`<div>`) element with the
:css:`.m-code-figure` class containing a :html:`<pre>` block and whatever else
you want to put in as the result. The :html:`<pre>` element has to be the very
-first child of the :html:`<figure>` for the markup to work correctly. Similar
+first child of the :html:`<figure>` for the markup to work correctly. Similarly
to image figure, you can apply the :css:`.m-flat` CSS class to remove the
border, the :html:`<figcaption>` element is styled as well.
.. include:: math-and-code-console.ansi
:code: ansi
+
+`Code figure`_
+--------------
+
+See the `m.components <{filename}/plugins/components.rst#code-math-and-graph-figure>`__
+plugin for details about code figures using the :rst:`.. code-figure::`
+directive.