I'm able to compile the following in Overleaf for the desired inline code-coloring effect:
\documentclass{article}
\usepackage{minted}
\usepackage{xcolor}
\definecolor{codeblue}{rgb}{0,0.3,0.6}
\newmintinline[bluecode]{c++}{\color{codeblue}}
\begin{document}
This is a blue \bluecode{keyword} and this is a normal \mintinline[]{C++}{keyword}.
Which produces:
Yet I have the following errors: Missing \endcsname inserted.
and Package keyval Error: \color {codeblue} undefined.
I need these errors to go away so I can upload to arXiv. How can I correct this, or otherwise color inline code?
\newmintinline
isn't supposed to store arbitrary code but to pass in key=value pairs defined by theminted
package.c++
and then usingC++
?color
key.