0

I wanted to change the font type to \texttt inside of the LIB box:

enter image description here

This code is found here:

\documentclass{article}
\usepackage[many]{tcolorbox}

\newtcbox{\mylib}{enhanced,nobeforeafter,tcbox raise base,boxrule=0.4pt,top=0mm,bottom=0mm,
  right=0mm,left=4mm,arc=1pt,boxsep=2pt,before upper={\vphantom{dlg}},
  colframe=green!50!black,coltext=green!25!black,colback=green!10!white,
  overlay={\begin{tcbclipinterior}\fill[green!75!blue!50!white] (frame.south west)
    rectangle node[text=white,font=\sffamily\bfseries\tiny,rotate=90] {LIB} ([xshift=4mm]frame.north west);\end{tcbclipinterior}}}


\begin{document}

\mylib{test}

\end{document}
3

Just add the option

fontupper=\ttfamily

typewriter text

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.