TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working with tcolorbox, I saw the pdf here and I want to reproduce the little green box in this image:

enter image description here

Can anyone help me please?

share|improve this question
up vote 12 down vote accepted

This is a \newtcbox called mylib and defined in tcolorbox.tex:


\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}},
  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}}}




enter image description here

share|improve this answer

This pice of code also works with the \tikzexternalize flag.


            rectangle split,
            rectangle split parts=2,
            rectangle split horizontal,
            rectangle split part fill={green!75!blue!50!white,green!10!white},
            rectangle split draw splits=false,
            rounded corners=2pt,
            rectangle split part align={right,right},
            minimum height=16pt}
        \node[lib] (var){
        \node[text=white,font=\sffamily\bfseries\tiny,rotate=90] at ([xshift=6pt]var.west) {LIB};

enter image description here

share|improve this answer
Nice solution. A minor detail: In the original, there is no green line between LIB and the library name. – jarauh Nov 13 '15 at 11:52
To erase line between LIB and library name you just need to add option rectangle split draw splits=false to lib/. style. – Zarko Nov 13 '15 at 12:35
@Zarko thank you for the hint. I've edited the post. – CDieck Nov 13 '15 at 13:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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