答案1
这是一种方法彩色盒子. 有关列表的微调,请参见维基百科上关于 Latex 的内容。
\documentclass[10pt,a4paper]{article}
\usepackage{tcolorbox}
\begin{document}
\begin{tcolorbox}[% passing options here
title=Exercise 1.1,
colframe=orange,
colback=orange!40!yellow!30, % think of mixing 2 colors with sliders
arc=0mm % sharp corners
]
Let's start with some intro, here with an ordinary list:
\begin{itemize}
\item first item here first item here first item here first item here first item here first item here
\item second one goes here
\end{itemize}
\end{tcolorbox}
\end{document}
附言
设计精美的列表是可能的,但需要一些工作。因此,为了简单起见,下面的代码添加了一个描述环境,它自己进行一些粗体格式化,作为一种近似值,一种编码工作量和结果之间的权衡。
它还使用包pifont
来提供一些 ding-symbols。Latex 符号的完整列表提供了更多替代方案,并说明了如何在代码中使用它们。
\documentclass[10pt,a4paper]{article}
\usepackage{tcolorbox}
\usepackage{pifont} % provides the symbols for a pen and check
\begin{document}
\begin{tcolorbox}[% passing options here
title=Exercise 1.1,
colframe=orange,
colback=orange!40!yellow!30, % think of mixing 2 colors with sliders
arc=0mm % sharp corners
]
Let's start with some intro, here with an ordinary list:
\begin{itemize}
\item first item here first item here first item here first item here first item here first item here
\item second one goes here
\end{itemize}
\end{tcolorbox}
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\bigskip
And now let's see how to approach the list of your example a bit more using a description environment.
\begin{tcolorbox}[% passing options here
title=Exercise 1.1,
colframe=orange,
colback=orange!40!yellow!30, % think of mixing 2 colors with sliders
arc=0mm % sharp corners
]
Let's start with some intro, here with an ordinary list:
\begin{description}
\item[\ding{46} Start with something] first item here first item here first item here first item here first item here first item here
\item[\ding{51} End with something else] second one goes here
\end{description}
\end{tcolorbox}
\end{document}