-
I'm a complete latex novice, so it might be that I'm missing something very obvious. I'm fiddling with trying to embed some Markdown snippets into a Latex document, and I keep running into obscure Latex errors trying to put Markdown into a tabularx table. And I get similar errors when trying to use Markdown inside of a command definition. Is this some known limitation or am I doing something very wrong? Here a small example of what I'm trying to do:
And here are the sort of errors I'm getting with this code:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@FGUFA If you save your markdown document into a separate file (such as |
Beta Was this translation helpful? Give feedback.
@FGUFA
\begin{markdown} ... \end{markdown}
must appear at the top level of a document. It cannot be produced as a result of expansion (\newcommand
) or inside environments that scan their content (\begin{tabular}
,\begin{frame}
). This is because\begin{markdown}
must be able to scan its contents first before TeX gets to incorrectly tokenize it according to TeX's rules, throwing away what it perceives as comments after percent signs and all sorts of other nasty things.If you save your markdown document into a separate file (such as
my-document.md
) and use the\markdownInput{my-document.md}
command, this limitation no longer applies. Admittedly, this is less convenient.