6

I want to wrap mintinline into a new command \cc but it produces an additional whitespace when using it:

\documentclass{article}

\usepackage{minted}

\newcommand{\cc}[1]{{\mintinline{latex}{#1}}}

\begin{document}

{\mintinline{latex}{\mycommand{argument}}}

\cc{\mycommand{argument}}

\end{document}

Output:

output

How can I fix this?

4

The package documentation mentions \newmintinline:

\documentclass{article}

\usepackage{minted}

\newmintinline[cc]{latex}{}

\begin{document}

\mintinline{latex}{\mycommand{argument}}

\cc{\mycommand{argument}}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.