Re: Latex style file for formatting/coloring clojure code?

2014-02-18 Thread Tassilo Horn
Jean Niklas L'orange jeann...@hypirion.com writes:

 I am unable to find a style file that supports clojure code in LaTeX.
 Can anyone point me in the right direction?

 I always use Minted for this kind of stuff: See 
 https://code.google.com/p/minted/

I just want to second that.  Minted is excellent.  The only downside is
that compiling the document takes some time if you have lots of
listings.  But the most recent git version has a cache option which
won't call pygments only on listings that have changed.

BTW, minted is now on github:

  https://github.com/gpoore/minted

Bye,
Tassilo

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Latex style file for formatting/coloring clojure code?

2014-02-17 Thread Jean Niklas L'orange
Hi Mark,

On Monday, February 17, 2014 12:05:24 AM UTC+1, puzzler wrote:

 I am unable to find a style file that supports clojure code in LaTeX.  Can 
 anyone point me in the right direction?


I always use Minted for this kind of stuff: See 
https://code.google.com/p/minted/

It is available in most, if not all, linux distributions. A small example 
for clojure follows:

[...]
\usepackage[section]{minted}

\begin{document}
[...]
\begin{minted}[gobble=2, frame=single}{clj}
  (with-open [reader (- 
META-INF/maven/my-program/my-program/pom.properties
 io/resource
 io/reader)]
(- (doto (java.util.Properties.)
  (.load reader))
(.getProperty version)))
\end{minted}
[...]
\end{document}

Keep in mind that pdflatex has to be invoked with -shell-escape in order to 
allow pygments to be called. If you use latexmk (if you don't know about 
it, check it out!), then you could use the following command stored in a 
shell script or Makefile:

latexmk -pdf -pdflatex='pdflatex -shell-escape %O %S' -pvc $(REPORT).tex

At least it has been immensely useful to me.

-- JN

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Latex style file for formatting/coloring clojure code?

2014-02-16 Thread Mark Engelberg
I am unable to find a style file that supports clojure code in LaTeX.  Can
anyone point me in the right direction?

Thanks,

Mark

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Latex style file for formatting/coloring clojure code?

2014-02-16 Thread Andy-
On Sunday, February 16, 2014 6:05:24 PM UTC-5, puzzler wrote:

 I am unable to find a style file that supports clojure code in LaTeX.  Can 
 anyone point me in the right direction?

Pygments can output LaTeX. (There is also minted)

HTH 

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.