I want define a command like \maplebox
; for example the command \maplebox{\latex}
.
Why does the following code not compile?
\documentclass{article}
\usepackage[svgnames]{xcolor}
\usepackage{tcolorbox}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{lipsum}
\usepackage[top=2.5cm,right=3.5cm,bottom=2.5cm,left=2.5cm]{geometry}
\tcbuselibrary{listings,skins,theorems}
\newtcbinputlisting{\maplebox}[1][white]{
listing only,
nobeforeafter,
tcbox raise base,
% fontupper=\latinfont\setLTR\ttfamily\bfseries,
fontupper=\ttfamily\bfseries,
arc=0pt,
outer arc=0pt,
colback=#1!10!white,
colframe=#1!50!black,
boxsep=0pt,
left=1pt,
right=1pt,
top=2pt,
bottom=2pt,
boxrule=0pt,
bottomrule=1pt,
toprule=1pt}
\begin{document}
The \maplebox{\latex}
\end{document}