Last active
August 7, 2024 22:25
-
-
Save dginev/f637ff71ec084babd8db095d7276fe8e to your computer and use it in GitHub Desktop.
Named wrapper environment with ltx:block and ltx:inline-block
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: Perl -*- | |
use strict; | |
use warnings; | |
use LaTeXML::Package; | |
DefEnvironment("{namedwrap}{}", "<ltx:inline-block class='#1'>#body</ltx:inline-block>"); | |
DefEnvironment("{namedblock}{}", "<ltx:block class='#1'>#body</ltx:block>"); | |
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<article class="ltx_document"> | |
<div id="p1" class="ltx_para"> | |
<div class="ltx_block sample-value"> | |
<p class="ltx_p">Hello World!</p> | |
</div> | |
</div> | |
<div id="p2" class="ltx_para"> | |
<span class="ltx_inline-block sample-value"> | |
<span class="ltx_p">Hello World!</span> | |
</span> | |
</div> | |
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{myblocks} | |
\begin{document} | |
\begin{namedblock}{sample-value} | |
Hello World! | |
\end{namedblock} | |
\begin{namedwrap}{sample-value} | |
Hello World! | |
\end{namedwrap} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LICENSE
This gist is licensed under CC0 and others are welcome to reuse and redistribute it as they wish.