0

Here is what I'm trying to achieve:

enter image description here

To this purpose I've written the following commands:

\documentclass[11pt]{article}
\usepackage[utf8]{luainputenc}

\setdefaultlanguage[variant=us]{english}

\setmainfont{CMU Concrete} \setsansfont{CMU Sans Serif} \setmonofont{CMU Typewriter Text}

\usepackage{xspace} \usepackage{xparse}

\usepackage[dvipsnames]{xcolor}

\definecolor{keywdcolor}{HTML}{bf616a} \DeclareDocumentCommand{\keywd}{m}{ \ttfamily\bfseries \textcolor{keywdcolor}{#1} }

\DeclareDocumentCommand{\apicmd}{m}{ \keywd{\textbackslash#1\xspace} }

\DeclareDocumentCommand{\apienv}{m}{ \keywd{{#1}\xspace} }

\definecolor{argscolor}{HTML}{a3be8c} \DeclareDocumentCommand{\argcontent}{m}{ \ttfamily\bfseries \textcolor{argscolor}{\xspace\ensuremath{\langle}\textit{#1}\ensuremath{\rangle}\xspace} }

but when I try to implement it like this:

\begin{document}
   \apicmd{path}\apiopt{shape}
\end{document}

this is the result:
enter image description here

Any idea why this happens and how I could correct it?

Guidone
  • 127

0 Answers0