welcome: please sign in

Revision 1 as of 2016-03-30 12:06:22

Clear message
location: Computer / Latex / Juliacode

Minted

It is possible to include julia code using the package minted https://github.com/gpoore/minted

Prerequisites

sudo pip install pygmentize

Get latest version of minted.sty from the github repo above. Put it in you texlive package folder or in the current working directory. Minted has other prerequisites, but those should be installed already.

A small example

example

Inclusion of unicode characters

With julia, one has the option of including most unicode characters in the code. For a copy-paste-kind of strategy to work, I have found the following two packages useful

\usepackage[mathletters]{ucs} \usepackage[utf8x]{inputenc}

With these packages, unicode characters in the input are handled quite well. At least if one builds with latexmk and pdflatex.

Issues

Beamer

Frames must be declared fragile for minted to work

\begin{frame}[fragile]

Other issues

Minted has issues if the build output is stored in a subdirectory and not in the working directory. Some workaround to this is floating around on the interwebs.