amsthm.helper module¶
- amsthm.helper.cancel_emph(elem: Element, doc: Doc, ElementType: type[EmphLike] = <class 'panflute.elements.Emph'>) list[EmphLike] | None¶
Emulate the behavior of LaTeX that a double emph is cancelled.
- amsthm.helper.cancel_repeated_type(elem: Element, doc: Doc, ElementType: type[EmphLike] = <class 'panflute.elements.Emph'>) list[EmphLike] | None[source]¶
Emulate the behavior of LaTeX that a double emph is cancelled.
- amsthm.helper.cite_to_ref(elem: pf.Cite, doc: Doc, check_id: dict[str, str] | None = None) pf.RawInline | None[source]¶
Cite to raw LaTeX ref/eqref.
- Parameters
check_id – if provided, transform only if id is in check_id
This maps [@…] to eqref{…} and @… to ref{…}.
- amsthm.helper.merge_consecutive_type(elem: Element, doc: Doc, ElementType: type[EmphLike] = <class 'panflute.elements.Emph'>) list[EmphLike] | None[source]¶
Merge neighboring Emph with optionally Space between them.
- amsthm.helper.merge_emph(elem: Element, doc: Doc, ElementType: type[EmphLike] = <class 'panflute.elements.Emph'>) list[EmphLike] | None¶
Merge neighboring Emph with optionally Space between them.
- amsthm.helper.parse_markdown_as_inline(markdown: str) list[Element][source]¶
Convert markdown string to panflute AST inline elements.
- amsthm.helper.to_emph(elem: Element, doc: Doc, ElementType: type[EmphLike] = <class 'panflute.elements.Emph'>) EmphLike | None¶
Convert all Str to ElementType.
This should works for Emph, Strong, SmallCap, etc.