fletcher / peg-multimarkdown

An implementation of MultiMarkdown in C, using a PEG grammar - a fork of jgm's peg-markdown. No longer under active development - see MMD 5.
Other
525 stars 55 forks source link

LaTeX and Code Blocks #150

Closed moonglum closed 11 years ago

moonglum commented 11 years ago

The Code Blocks work exactly as expected when converting to HTML. When I convert to LaTeX and give an explicit language it is written in though, I get a problem. This is the Markdown Code (ignore the slash... I don't know how to create the code block inside the code block...):

```clojure
(:require clojure.string)
\```

it will translate into the following LaTeX Code:

\texttt{clojure
(:require clojure.string)
}

This doesn't make a lot of sense. What it should actually do is the following:

\begin{lstlisting}[language=clojure]
(:require clojure.string)
\end{lstlisting}

Then you get Code Highlighting and so on :smile:

PS: MultiMarkdown is great. Currently trying it out with a smaller project, if it turns out well, I will use it for my master thesis next year :smile: I searched for a way to create the body of my LaTeX documents in Markdown, and there it is!

moonglum commented 11 years ago

I'm deepy sorry, @fletcher – I used a totally outdated version from homebrew. This is fixed in Version 4.2 (installed via the installer). It now works exactly as I expected. Thanks for this great tool!!!