[Ipe-discuss] Minted environment for code highlighting in IPE
Lluís Alemany-Puig
lluis.alemany.puig at upc.edu
Fri Apr 30 12:54:01 CEST 2021
Ok, fantastic. That worked. Thanks for your help.
Lluís.
P.S.: For those of you interested in this (and who don't know how to it
already) I followed these steps:
1. I created in /home/user/.ipe/ a directory named shellescape and added
to it a file named pdflatex with the contents
#!/bin/bash
pdflatex -shell-escape $@
and gave it execute permissions.
2. Following the manual, I added, in the /home/user/.ipe directory, a
file named ipe.conf with the contents
IPELATEXPATH=/home/lluis/.ipe/shellescape/
3. I put in the preamble of the document the packages needed
\usepackage{minted}
\usepackage{tcolorbox}
\BeforeBeginEnvironment{minted}{\begin{tcolorbox}}
\AfterEndEnvironment{minted}{\end{tcolorbox}}
and the code
\begin{minted}{python}
var = 3 # this is a comment
print(var)
\end{minted}
in a paragraph object.
On 29/4/21 20:34, Otfried Cheong via Ipe-discuss wrote:
> On Thu, Apr 29, 2021, at 20:24, Lluís Alemany-Puig via Ipe-discuss wrote:
>> In order to compile this we have to pass the -shell-escape flag to
>> pdflatex, like so:
>>
>> pdflatex -shell-espace main.tex
>>
>> Does anyone know how I can do this in IPE? I mean, how do I pass the
>> -shell-escape flag to pdflatex?
> The easiest way to achieve this right now is to make a shell script named 'pdflatex' that calls the real pdflatex with the flag, and set IPELATEXPATH to the directory containing the shell script (https://ipe.otfried.org/manual/manual_53.html).
>
> Cheers,
> Otfried
>
> _______________________________________________
> Ipe-discuss mailing list
> Ipe-discuss at lists.science.uu.nl
> https://mailman.science.uu.nl/mailman/listinfo/ipe-discuss
More information about the Ipe-discuss
mailing list