프레임이 없는 강조 표시된 상자

프레임이 없는 강조 표시된 상자

다음과 같이 프레임이 지정되지 않은 강조 표시된 상자를 어떻게 만들 수 있습니까?

여기에 이미지 설명을 입력하세요

답변1

framed패키지와 환경을 로드할 수 있습니다 shaded*.

...
\usepackage{xcolor}
\usepackage{framed}
\colorlet{shadecolor}{lightgray}
...
\begin{document}
...
\begin{shaded*}
\textbf{Example: Decision space for a College Admission Decision}\\
The decision space for a college admission decision consists of  the (potentially unobservable, hopefully unpredictable) information …
\end{shaded*}
...
\end{document}

여러 페이지에 걸쳐 중단될 수 있습니다. 별표가 없는 버전은 여백으로 번집니다.

답변2

패키지를 사용한 또 다른 솔루션 tcolorbox:

\documentclass{article}

\usepackage{tcolorbox}

\newtcolorbox{mybox}[1]{%
    colbacktitle=gray!30,
    coltitle=black,
    fonttitle=\bfseries,
    colback=gray!30,
    colframe=gray!30,
    sharp corners,
    title=#1}

\begin{document}

\begin{mybox}{Example: Decision space for a College Admissions Decision}
The decision space for a college admissions decision consists of  the \dots
\end{mybox}
\end{document}

여기에 이미지 설명을 입력하세요

관련 정보