1

This question already has an answer here:

I found a pretty cool box I would like to replicate and use in my report, however, the source code for this particular box is not available, and although I'm getting close to figuring it out, I've already put a ridiculous amount of time into it, so I'm hoping maybe one of y'all have an easy answer.

The box I'm referencing can be seen in the Table of Contents -- Section 6 -- of the tcolorbox Manual. It's the small green "side by side" box.

I basically just want to reproduce the box width/size, and vertically-stacked text style, change the colors, and enter arbitrary text.

Start with the used \documentclass{... and end the code with \end{document} so that it is compilable with pdflatex. Not all of us use LyX ...

Here's what I have so far:

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

\begin{document}
\tcbsidebyside
[
nobeforeafter,
sidebyside adapt=both,
size=fbox,
drop lifted shadow,
bicolor, colback=black, colbacklower=white,
colframe=black,
colupper=white,  collower=black,
fontupper=~\bfseries, fontlower=\bfseries,
]
{AC}
{H}
\end{document}

Here's my alternate approach:

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

\begin{document}

\begin{tcolorbox}
[
nobeforeafter,
sidebyside,
size=fbox,
skin=bicolor,
halign=center,
halign lower=center,
colframe=black,
colback=black, 
colbacklower=white, 
colupper=white,  
collower=black,
fontupper=~\bfseries, 
fontlower=\bfseries,
]
\textbf {AC}
\tcblower {H}
\end {tcolorbox}
\end{document}

Thanks!

ijwmcb

marked as duplicate by Mensch, Stefan Pinnow, ChrisS, TeXnician, CarLaTeX Sep 26 '17 at 4:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4

The code of the manual is online. Looking into it I guess you want this box:

\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{xparse}

\end{document}

enter image description here

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