I'm trying to draw something like the following:
but with my following ( note that i'm tired with tcolorbox
)
Code :
\documentclass{article}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage[svgnames]{xcolor}
\usepackage[most]{tcolorbox}
\usepackage[margin=1.5cm]{geometry}
\tcbset{
lemmastyle/.style={enhanced, colback=white, colframe=black, arc=0pt,
fonttitle=\bfseries, description color=Maroon,
colbacktitle=white, coltitle=black,
top=\tcboxedtitleheight,
boxed title style={arc=0pt},
attach boxed title to top left={yshift=-\tcboxedtitleheight/1,
}%
},
}
\newtcbtheorem{myLemma1}{Question :}{lemmastyle}{thm}
\usepackage{pifont}
\usepackage{fancybox}
\begin{document}
\begin{tcolorbox}[width=\textwidth, enhanced, valign=center, colback=white, colframe=black, sharp corners, shadow={0pt}{0pt}{0mm}{black},boxrule=0.5pt]
\textbf{Question 1~: Area of the region bounded by the curves $y=x^2+2, y=-x, x=0$ and $x=1$ is}
\[ \dfrac{7}{10} \]
\end{tcolorbox}
\begin{tcolorbox}[width=\textwidth, enhanced, valign=center, colback=white, colframe=black, sharp corners, shadow={0pt}{0pt}{0mm}{black},boxrule=0.5pt]
\textbf{Question 2~:}
\end{tcolorbox}
\begin{myLemma1}{}{}
\textbf{ Area of the region bounded by the curves $y=x^2+2, y=-x, x=0$ and $x=1$ is \[ \dfrac{7}{10}\] }
\end{myLemma1}
\end{document}
I got this
output:
- Could someone please show me how to set up a
tcolorbox
environment to get the box I want?
Area of the region...
right to the framed title box?