2

I want to have something like given in the picture. Borders above and below of the box are optional. I tried \colorbox, but it doesn't work.

\documentclass{report}
\usepackage{color}
\definecolor{bg}{RGB}{255,249,227}
%\usepackage[most]{tcolorbox}
\begin{document}
Following are some items:
\colorbox{bg}{\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
}
\end{document}

enter image description here

2

Use tcolorbox.

\documentclass{article}
\usepackage{lipsum}
\usepackage[most]{tcolorbox}
\definecolor{bg}{RGB}{255,249,227}
\begin{document}
  \lipsum[1]
  \begin{tcolorbox}[enhanced jigsaw,colback=bg,boxrule=0pt,arc=0pt]
    \begin{itemize}
        \item Item 1
        \item Item 2
        \item Item 3
    \end{itemize}
  \end{tcolorbox}
\end{document}

enter image description here

With upper and lower lines:

\documentclass{article}
\usepackage{lipsum}
\usepackage[most]{tcolorbox}
\definecolor{bg}{RGB}{255,249,227}

\newtcolorbox{mybox}[1][]{%
enhanced jigsaw,
%oversize,
colback=bg,
boxrule=0pt,
overlay unbroken and first ={%
\draw[line width=0.2pt,double=bg,draw=bg!70!black,
    double distance=1pt,] (frame.north west) -- (frame.north east);
\draw[line width=0.2pt,double=bg,draw=bg!70!black,
    double distance=1pt,] (frame.south west) -- (frame.south east);},
breakable,
arc=0pt,outer arc=0pt,
#1}%


\begin{document}
  \lipsum[1]
  \begin{mybox}
    \begin{itemize}
        \item Item 1
        \item Item 2
        \item Item 3
    \end{itemize}
  \end{mybox}
\end{document}

enter image description here

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.