JezK
Edit File: stex-backend-rustex.cfg
\RequirePackage{rustex} \rustex_add_Namespace:nn{stex}{http://kwarc.info/ns/sTeX} \rustex_add_Namespace:nn{mmt}{http://uniformal.github.io/MMT} \tl_const:Nx \c_stex_html_emptyarg_tl { \rustex_direct_HTML:n { \c_ampersand_str \c_hash_str 8205; } } \cs_new_protected:Nn \stex_annotate:nnn { \_stex_html_checkempty:n { #3 } \rustex_annotate_HTML:nn { property="stex:#1" ~ resource="#2" } { \mode_if_vertical:TF{ \tl_use:N \l_stex_html_arg_tl\stex_par: }{ \tl_use:N \l_stex_html_arg_tl } } } \cs_new_protected:Nn \stex_mathml_intent:nn { \rustex_annotate_HTML:nn { mml:intent="#1" }{ #2 } } \cs_new_protected:Nn \stex_mathml_arg:nn { \rustex_annotate_HTML:nn { mml:arg="#1" }{ #2 } } \cs_new_protected:Nn \stex_annotate_invisible:n { \_stex_html_checkempty:n { #1 } \rustex_annotate_HTML:nn { stex:visible="false" ~ style:display="none" } { \ifmmode\tl_use:N \l_stex_html_arg_tl\else\hbox{\tl_use:N \l_stex_html_arg_tl}\fi } } \cs_new_protected:Nn \stex_annotate_invisible:nnn { \_stex_html_checkempty:n { #3 } \rustex_annotate_HTML:nn { property="stex:#1" ~ resource="#2" ~ stex:visible="false" ~ style:display="none" } { \ifmmode\tl_use:N \l_stex_html_arg_tl\else\hbox{\tl_use:N \l_stex_html_arg_tl}\fi } } \NewDocumentEnvironment{stex_annotate_env} { m m } { \stex_par: \rustex_annotate_HTML_begin:n { property="stex:#1" ~ resource="#2" } }{ \stex_par: \rustex_annotate_HTML_end: } \prg_new_conditional:Nnn \stex_html_backend: {p, T, F, TF} { \prg_return_true: }