Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass[a4paper,french]{article}
- \usepackage[T1]{fontenc}
- \usepackage{babel}
- \usepackage[margin=1cm]{geometry}
- \usepackage{xcolor}
- \usepackage{enumitem}
- \input{insbox}
- \usepackage{listings}
- \lstdefinestyle{mypython}{
- language=Python,
- tabsize=4,
- numberstyle=\tiny,
- columns=flexible,
- backgroundcolor=\color{black!05},
- showstringspaces=true,
- literate=
- {à}{{\`a}}1
- {â}{{\^a}}1
- {é}{{\'e}}1
- {è}{{\`e}}1
- {ê}{{\^e}}1
- {ë}{{\"e}}1
- {î}{{\^i}}1
- {ô}{{\^o}}1
- {ù}{{\`u}}1
- {«}{{\og}}1
- {»}{{\fg{}}}1
- }
- \usepackage[most]{tcolorbox}
- \begin{document}
- \begin{tcblisting}{
- colback=white,
- colframe=white,
- comment and listing,
- sidebyside,
- listing style=mypython,
- comment={
- \begin{enumerate}
- \item question 1...
- \item question 2...
- \item question 3...
- \end{enumerate}
- }
- }
- def f(x):
- y=x**2-x+3
- return(y)
- \end{tcblisting}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement