使用 tcolorbox 打破盒子风格

使用 tcolorbox 打破盒子风格

我的代码如下:

\documentclass{book}
\usepackage{xcolor}
\usepackage[skins]{tcolorbox}%
\tcbuselibrary{breakable}
\begin{document}

\begin{tcolorbox}[enhanced jigsaw,breakable,pad at
break*=1pc,title=My Headings,colback=magenta!10,colframe=magenta]
Health fi fl ffi ffl is \textbf{\textit{the}} result
of a complex interaction of people's personal health behaviours and a range of social, economic, cultural and environmental determinants that exist in the society in which they live. These wider social and cultural forces can shape or limit an individuals decision making, affect power relations, and can determine the amount of control an individual has over his or her actions.

For\footnote{Footnote text} some people, these factors are conducive to good health; that is:
\begin{itemize}
\item they have acquired the knowledge, understanding and means to make positive health decisions

\item they live and work in environments that support them in making health]promoting choices.
\end{itemize}
Others may be influenced by factors that prevent them making good health decisions or limit their ability to easily make choices that will promote better health. For example, they may have poor nutrition due to lack of money, poor availability of nutritious foods in their local area or lack of knowledge of nutrition.

Text 2 Health fi fl ffi ffl is \textbf{\textit{the}} result
of a complex interaction of people's personal health behaviours and a range of social, economic, cultural and environmental determinants that exist in the society in which they live. These wider social and cultural forces can shape or limit an individuals decision making, affect power relations, and can determine the amount of control an individual has over his or her actions.

For some people, these factors are conducive to good health; that is:
\begin{itemize}
\item they have acquired the knowledge, understanding and means to make positive health decisions

\item they live and work in environments that support them in making health]promoting choices.
\end{itemize}
Others may be influenced by factors that prevent them making good
health decisions or limit their ability to easily make choices that will promote better health. For example, they may have poor nutrition due to lack of money, poor availability of nutritious foods in their local area or lack of knowledge of nutrition. 

Text 3 Health fi fl ffi ffl is \textbf{\textit{the}} result
of a complex interaction of people's personal health behaviours and a range of social, economic, cultural and environmental determinants that exist in the society in which they live. These wider social and cultural forces can shape or limit an individuals decision making, affect power relations, and can determine the amount of control an individual has over his or her actions.

For some people, these factors are conducive to good health; that is:

Text 4 Health fi fl ffi ffl is \textbf{\textit{the}} result
of a complex interaction of people's personal health behaviours and a range of social, economic, cultural and environmental determinants that exist in the society in which they live. These wider social and cultural forces can shape or limit an individuals decision making, affect power relations, and can determine the amount of control an individual has over his or her actions.

For some people, these factors are conducive to good health; that is:
\end{tcolorbox}

\end{document}

它工作正常,但是为了打破盒子,我需要一个箭头标记,如下所示:

在此处输入图片描述

我怎样才能实现这个目标?

我需要这个盒子,它位于第一个盒子末端的右上角,我忘了提到它了……

答案1

第一个版本仅为第一个和潜在的中间框放置一个覆盖层并在那里绘制一个填充三角形。

(如果箭头不应该出现在中断序列的中间框中,则用overlay first and middle替换overlay first

\documentclass{book}
\usepackage{xcolor}
\usepackage[skins,breakable]{tcolorbox}%
\usetikzlibrary{calc}

\usepackage{blindtext}
\begin{document}


\begin{tcolorbox}[enhanced jigsaw,
  breakable,
  pad at break*=1pc,
  title=My Headings,
  colback=magenta!10,
  colframe=magenta,
  overlay first and middle={
    \coordinate (A1) at ($(interior.south east) + (-10pt,5pt)$);
    \coordinate (C1) at ($(interior.south east) + (-6pt,7.5pt)$);
    \draw[fill=tcbcol@frame] (A1) -- +(0,5pt) -- (C1) -- cycle;
  }
  ]
Health fi fl ffi ffl is \textbf{\textit{the}} result
of a complex interaction of people's personal health behaviours and a range of social, economic, cultural and environmental determinants that exist in the society in which they live. These wider social and cultural forces can shape or limit an individuals decision making, affect power relations, and can determine the amount of control an individual has over his or her actions.

For\footnote{Footnote text} some people, these factors are conducive to good health; that is:
\begin{itemize}
\item they have acquired the knowledge, understanding and means to make positive health decisions

\item they live and work in environments that support them in making health]promoting choices.
\end{itemize}
Others may be influenced by factors that prevent them making good health decisions or limit their ability to easily make choices that will promote better health. For example, they may have poor nutrition due to lack of money, poor availability of nutritious foods in their local area or lack of knowledge of nutrition.

Text 2 Health fi fl ffi ffl is \textbf{\textit{the}} result
of a complex interaction of people's personal health behaviours and a range of social, economic, cultural and environmental determinants that exist in the society in which they live. These wider social and cultural forces can shape or limit an individuals decision making, affect power relations, and can determine the amount of control an individual has over his or her actions.

For some people, these factors are conducive to good health; that is:
\begin{itemize}
\item they have acquired the knowledge, understanding and means to make positive health decisions

\item they live and work in environments that support them in making health]promoting choices.
\end{itemize}
Others may be influenced by factors that prevent them making good
health decisions or limit their ability to easily make choices that will promote better health. For example, they may have poor nutrition due to lack of money, poor availability of nutritious foods in their local area or lack of knowledge of nutrition. 

Text 3 Health fi fl ffi ffl is \textbf{\textit{the}} result
of a complex interaction of people's personal health behaviours and a range of social, economic, cultural and environmental determinants that exist in the society in which they live. These wider social and cultural forces can shape or limit an individuals decision making, affect power relations, and can determine the amount of control an individual has over his or her actions.

For some people, these factors are conducive to good health; that is:

Text 4 Health fi fl ffi ffl is \textbf{\textit{the}} result
of a complex interaction of people's personal health behaviours and a range of social, economic, cultural and environmental determinants that exist in the society in which they live. These wider social and cultural forces can shape or limit an individuals decision making, affect power relations, and can determine the amount of control an individual has over his or her actions.

For some people, these factors are conducive to good health; that is:
\blindtext[4]
\end{tcolorbox}


\end{document}

在此处输入图片描述

相关内容