How can I create two boxes in the same line with words in between(as the picture below which I made using MS-Word)? I tried \makebox
, \fbox
or \minipage
and none of them seem to be working, maybe because I am using verbatim
environment at the same time. I am trying to make a section illustrating how to type Chinese in LaTeX.
I have tried
\fbox{
\begin{minipage}{5cm}
\begin{verbatim}
\documentclass{article}
\usepackage[UTF8]{ctex}
\end{verbatim}
\end{minipage}
}
or any other possible combination of this three command but the typeset engine always give me errors says there is one extra {
at the end of the code, even though it should be the right bracket of \fbox
.
tcolorbox
and itslistings
library can make such code boxes with basically any fancy decoration.