2

Here I am using tcolorbox package, I want to set the bullet/dot need to expand based upon the box spanning as per requirement. Here I attached the screen shot and highlight the area in red color which I required. If anyone please help in this case.enter image description here

MWE:

\documentclass[12pt]{article}

\RequirePackage[most]{tcolorbox}

\newtcolorbox[auto counter]{Boxone}[1][]{%
enhanced,breakable,
before title={\stepcounter{BoxOnecnt}},
toggle left and right,sharp corners,
boxrule=0mm,top=0mm,bottom=0mm,left=0mm,right=0mm,
colframe=white,
colback=black!30,
fonttitle=\bfseries,
left=0pt,%%21.5
leftrule=21.5pt,
rightrule=0pt,
width=\hsize,
overlay unbroken and first ={%
\node[rotate=90,
minimum width=21.5pt,
anchor=south,
font=\fontsize{11.5bp}{11.5bp}\sffamily\bfseries,
yshift=2.5pt,
white]
at (frame.east) {WORKED E.G.~1};
},
}


\begin{document}


\begin{Boxone}%[WORKED E.G. 1.1]
\subsection{Addition}
A patient asks you how many medicines they need to swallow to take all their morning medicines. They have the following medicines to take:
\begin{itemize}
\item 500 mg paracetamol (2 capsules)
\item 40 mg frusemide (1 tablet)
\item 62.5 mcg digoxin (2 tablets)
\end{itemize}
A patient asks you how many medicines they need to swallow to take all their morning medicines. They have the following medicines to take:
\end{Boxone}

\end{document}
2

Something of this kind?

\documentclass[12pt]{article}

\RequirePackage[most]{tcolorbox}
\usetikzlibrary{patterns}
\newtcolorbox[auto counter]{Boxone}[1][]{%
enhanced,breakable,
before title={\stepcounter{BoxOnecnt}},
toggle left and right,sharp corners,
boxrule=0mm,top=0mm,bottom=0mm,left=0mm,right=0mm,
colframe=white,
colback=black!30,
fonttitle=\bfseries,
left=0pt,%%21.5
leftrule=21.5pt,
rightrule=0pt,
width=\hsize,
overlay unbroken and first ={%
\ifodd\thepage
  \fill[overlay,pattern=dots] ([xshift=2.5cm]frame.north east) rectangle
  ([xshift=0.75cm]frame.south east);
  \fill[overlay,green!60!black] ([xshift=0.65cm]frame.north east) rectangle
  ([xshift=0.05cm]frame.south east);
  \node[rotate=-90,
  minimum width=21.5pt,
  anchor=south,
  font=\fontsize{11.5bp}{11.5bp}\sffamily\bfseries,
  yshift=2.5pt,
  white]
  at (frame.east) {WORKED E.G.~1};  
\else
  \fill[overlay,pattern=dots] ([xshift=-2.5cm]frame.north west) rectangle
  ([xshift=-0.75cm]frame.south west);
  \fill[overlay,green!60!black] ([xshift=-0.65cm]frame.north west) rectangle
  ([xshift=0.05cm]frame.south west);
  \node[rotate=90,
  minimum width=21.5pt,
  anchor=south,
  font=\fontsize{11.5bp}{11.5bp}\sffamily\bfseries,
  yshift=2.5pt,
  white]
  at (frame.west) {WORKED E.G.~1};  
\fi  
},
}


\begin{document}


\begin{Boxone}%[WORKED E.G. 1.1]
\subsection{Addition}
A patient asks you how many medicines they need to swallow to take all their morning medicines. They have the following medicines to take:
\begin{itemize}
\item 500 mg paracetamol (2 capsules)
\item 40 mg frusemide (1 tablet)
\item 62.5 mcg digoxin (2 tablets)
\end{itemize}
A patient asks you how many medicines they need to swallow to take all their morning medicines. They have the following medicines to take:
\end{Boxone}

\clearpage

\begin{Boxone}%[WORKED E.G. 1.1]
\subsection{Addition}
A patient asks you how many medicines they need to swallow to take all their morning medicines. They have the following medicines to take:
\begin{itemize}
\item 500 mg paracetamol (2 capsules)
\item 40 mg frusemide (1 tablet)
\item 62.5 mcg digoxin (2 tablets)
\end{itemize}
A patient asks you how many medicines they need to swallow to take all their morning medicines. They have the following medicines to take:
\end{Boxone}

\end{document}

enter image description here

  • Thank you very much marmot!! It's really helpful and fulfill my requirement. You are such a genius, thanks again. – Rajesh Kumar Jan 17 at 4:17

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.