0

I have the following to highlight code:

\begin{minted}{python}
def foo():

\end{minted}

However, typing out \begin{minted}{python} is quite tedious.

I want to convert it something like the following:

\code
def foo();

\end 

What't the easiest way to accomplish this?

nz_21
  • 101
  • https://tex.stackexchange.com/questions/55324/can-i-print-only-some-functions-with-minted/55333#55333 – js bibra Dec 08 '19 at 13:58
  • Please, see this answer by @egreg: https://tex.stackexchange.com/questions/269036/starting-environment-with-beginenv-or-with-env It is explained why the use of environments is always preferred with respect to what you want to do. – Pietro D'Antuono Dec 08 '19 at 17:02
  • Use an editor with auto-completion. That is much better than building a house of cards of macros on top of your document. – Henri Menke Dec 09 '19 at 03:41

0 Answers0