Skip to content

Using LaTeX asterisk inside markdown #278

Answered by Witiko
nopria asked this question in Q&A
Discussion options

You must be logged in to vote

@nopria In Markdown, asterisks denote emphasis. To prevent this interpretation, you have several options:

  1. Escape asterisks that do not denote emphasis: \begin{figure\*}
  2. Enable the rawAttribute option and surround TeX code in a raw code span: `\begin{figure}`{=tex}
    Alternatively, you can also enable the fencedCode option and use a raw block:
    ``` {=tex}
    \begin{figure}
    ```
    Unlike hybrid, rawAttribute allows you to cleanly separate TeX and Markdown code.
    If you use TeX sparingly, disabling hybrid and using just rawAttribute will improve readability.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nopria
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #277 on March 09, 2023 10:43.