how to put code with the package minted in the margin (marginpar did not work)?
I want my code in the marge like the document but I want use the package minted.
Thank you.
\documentclass{article}
\usepackage{geometry} % for margin note
\usepackage{marginnote} % for margin note
\usepackage{minted} % for highlighted code
\begin{document}
\marginnote{ %this should appear in the margin (doesn't work)
\begin{minted}{python}
import numpy as np
def incmatrix(genl1,genl2):
m = len(genl1)
n = len(genl2)
M = None #to become the incidence matrix
VT = np.zeros((n*m,1), int) #dummy variable
#compute the bitwise xor matrix
M1 = bitxormatrix(genl1)
M2 = np.triu(bitxormatrix(genl2),1)
\end{minted}}
\begin{minted}{python} % this correctly appears in the document
import numpy as np
def incmatrix(genl1,genl2):
m = len(genl1)
n = len(genl2)
M = None #to become the incidence matrix
VT = np.zeros((n*m,1), int) #dummy variable
#compute the bitwise xor matrix
M1 = bitxormatrix(genl1)
M2 = np.triu(bitxormatrix(genl2),1)
\end{minted}
\end{document}