Awkee / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

Towards Syntax Highlighting in LaTeX #110

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have made delightingly few changes to the Text.Pandoc.Writers.LaTeX
to employ the listings package instead of verbatim for code and code
blocks.
Thus, the block

~~~ {.haskell }
f x = x

is now translated to

\begin{lstlisting}[language=haskell] f x = x \end{lstlisting}

And f 23 = 23 becomes

\lstinline[]!f 23 = 23!

Likewise for one-language documents you can have a default language by adding, e.g., \lstset{language=haskell} to your header file and then simply write

f x = x

John MacFarlane said that there should be an option to switch between this and verbatim mode, but I did not come round to add that also.


Original issue reported on code.google.com by `bras...@googlemail.com` on 19 Nov 2008 at 3:49

Attachments:
* [pan.patch](https://storage.googleapis.com/google-code-attachments/pandoc/issue-110/comment-0/pan.patch)
GoogleCodeExporter commented 9 years ago
Any movement on this or more general highlighting? It would be very nice to 
have the
highlighting-kate syntax highlighting in non-HTML export targets, like context 
(for
PDFs).

Original comment by gwe...@gmail.com on 23 Dec 2009 at 6:16

GoogleCodeExporter commented 9 years ago

Original comment by fiddloso...@gmail.com on 23 Dec 2009 at 8:14