tcolorbox:可破坏选项不起作用

tcolorbox:可破坏选项不起作用

我目前正在尝试为我的硕士论文写一个路线图,设计得很漂亮。我想为每一章使用多个 tcolorbox 框并将它们堆叠起来。这些框应该在每页的末尾断开,否则页面很快就会变空。我添加了这个选项,breakable但什么也没发生。Enforce breakable似乎也不起作用。有什么想法吗?我做错了什么吗?

以下是一个盒子的代码:

\begin{tcolorbox}[before skip=\baselineskip,breakable,enhanced,sharpish corners, colframe=black!6!white, colback =black!6!white, sidebyside, lefthand width = 0cm,drop lifted shadow]
    \flaticonbox{loading2_6} 
    \tcblower
    \textbf{Concepts draft:}
    This chapter describles the initial development of the concepts and the solution considered in the early phases of the project.
    \begin{enumerate}
        \item Description of the different process steps and possible combinations.
        \item Listing of the retained concepts to focus on during the project.
    \end{enumerate}
\end{tcolorbox}

PS:该flaticonbox命令是个人命令,它基本上在左栏添加一个具有定义大小的 pdf 图像。

这是最终结果,共 4 页。如您所见,我在页面末尾留有大量可用空间: 堆叠盒子的示例

在此先感谢您的帮助!

编辑:这是一个可编译的测试代码

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[T1]{fontenc}
\usepackage[bitstream-charter]{mathdesign}
\usepackage[skins,xparse,breakable]{tcolorbox}
\usepackage{setspace}
\onehalfspacing
\setlength{\parindent}{0pt}
\setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}

\begin{document}
    \begin{tcolorbox}[before skip=\baselineskip,enhanced,breakable,sharpish corners, colframe=black!3!white, colback =black!3!white, sidebyside, lefthand width = 0cm,drop lifted shadow]
        Icon
        \tcblower
        \textbf{State of the art:} Context, technical background and choice of the assessment methods.
        \begin{enumerate}
            \item Description of the initial context at Volvo construction equipment and description of the chosen sub-assemblies for the Thesis. The mechanical characteristics of the sub-assemblies will also be described, since they are from importance for the project
            \item Description of the state of current production. The focus is set on the welding department, and more particularly on the workstations where the sub-assemblies still produced at VCE. 
            \item Description of the welding technology and welding state of the art. This section also describes the type of welds used along the project, and the different equipment usable to achieve them.
        \end{enumerate}
    \end{tcolorbox}

    \begin{tcolorbox}[before skip=\baselineskip,breakable,enhanced,sharpish corners, colframe=black!6!white, colback =black!6!white, sidebyside, lefthand width = 0cm,drop lifted shadow]
        Icon
        \tcblower
        \textbf{Concepts draft:}
        This chapter describles the initial development of the concepts and the solution considered in the early phases of the project.
        \begin{enumerate}
            \item Description of the different process steps and possible combinations.
            \item Listing of the retained concepts to focus on during the project.
        \end{enumerate}
    \end{tcolorbox}

    \begin{tcolorbox}[before skip=\baselineskip,enhanced,sharpish corners, colframe=black!9!white, colback =black!9!white, sidebyside, lefthand width = 0cm,drop lifted shadow,enforce breakable]
        Icon
        \tcblower
        \textbf{Fixture design:}
        This chapter is focused on the development of the welding fixture, which represent a major amount of the total thesis work due to it's innovations.
        \begin{enumerate}
            \item Assessment of the fixture requirements
            \item First concept development and assessment: Fixture with standard locators.
            \item Second concept: Smart fixture without locators. This concept seemed to be the most suitable for the project application and this chapter focuses grandly on a multitude of analysis to assess the feasability of such a fixture (exact layout for maximum flexibility, security, resistance to a welding environment, gripping force, etc.).        
        \end{enumerate}
    \end{tcolorbox}

    \begin{tcolorbox}[before skip=\baselineskip,enhanced,sharpish corners, colframe=black!12!white, colback =black!12!white, sidebyside, lefthand width = 0cm,drop lifted shadow,enforce breakable]
        Icon
        \tcblower
        \textbf{Tack welding assembly design:}
        This chapter is focused on the design of the tack welding process for all chosen sub-assemblies and it's characteristics.
        \begin{enumerate}
            \item Tack welding characteristics: Tack welding Do's and don'ts
            \item Definition and assessment method of the tack welds.
            \item Distortion compensation: Assessment of the geometry variation and impact on quality because of thermal deformation when tack welding without a dedicated fixture.
            \item Original curvature of the plate: Assessment of the geometry variation and impact on quality due to the initial geometry variation of the plate when tack welding without a dedicated fixture.    
        \end{enumerate}
    \end{tcolorbox}

    \begin{tcolorbox}[before skip=\baselineskip,enhanced,sharpish corners, colframe=black!15!white, colback =black!15!white, sidebyside, lefthand width = 0cm,drop lifted shadow,enforce breakable]
        Icon
        \tcblower
        \textbf{Design of the production cell:}
        This chapter finalizes the development of the concepts and comprehends global assessments.
        \begin{enumerate}
            \item Cycle time analysis: Assessment of the time needed to tack weld, weld and quality check all sub-assemblies. Definition of the required workforce and equipment to achieve weekly production target, depending on the concept used. Implementation and verification with Siemens Tecnomatix.
            \item Definition and assessment of the means of production for each concept, in particular the sensors for the tack welding workcell with HRI.
            \item Final concepts description
        \end{enumerate}
    \end{tcolorbox}

    \begin{tcolorbox}[before skip=\baselineskip,enhanced,sharpish corners, colframe=black!18!white, colback =black!18!white, sidebyside, lefthand width = 0cm,drop lifted shadow,enforce breakable]
        Icon 
        \tcblower
        \textbf{Final concepts assessment:}
        This chapter assesses the concepts that were not eliminated along the project and defines which one ar the most suited.
        \begin{enumerate}
            \item Assessment criteria and method
            \item Final assessment (cost,...)
            \item Discussion of the results
        \end{enumerate}
    \end{tcolorbox}
\end{document}

答案1

是的,sidebyside盒子是牢不可破的,但没有必要使用sidebyside盒子来获得这些结果。一个简单的left margin图标overlayed就可以完成工作,而且tcolorboxes会损坏。

以下代码定义了mybox两个强制参数和一个可选参数。强制参数是背景颜色的百分比back和图标图形名称。可选参数可用于将更改应用于特定框。

\documentclass{article}
\usepackage[]{graphicx}
\usepackage[T1]{fontenc}
\usepackage[bitstream-charter]{mathdesign}
\usepackage[skins,xparse,breakable]{tcolorbox}
\usepackage{setspace}
\onehalfspacing
\setlength{\parindent}{0pt}
\setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}

\newtcolorbox{mybox}[3][]{
    enhanced,
    breakable,
    notitle,
    sharpish corners,
    before skip=\baselineskip,
    colframe=black!#2!white,
    colback=black!#2!white,
    drop lifted shadow,
    leftupper=1.5cm,
    overlay={\node[anchor=west] at ([xshift=2mm]frame.west) {\includegraphics[width=1cm]{#3}};},
    #1
}

\begin{document}
    \begin{mybox}{3}{example-image-A}
        \textbf{State of the art:} Context, technical background and choice of the assessment methods.
        \begin{enumerate}
            \item Description of the initial context at Volvo construction equipment and description of the chosen sub-assemblies for the Thesis. The mechanical characteristics of the sub-assemblies will also be described, since they are from importance for the project
            \item Description of the state of current production. The focus is set on the welding department, and more particularly on the workstations where the sub-assemblies still produced at VCE. 
            \item Description of the welding technology and welding state of the art. This section also describes the type of welds used along the project, and the different equipment usable to achieve them.
        \end{enumerate}
    \end{mybox}

    \begin{mybox}{6}{example-image-B}       
    \textbf{Concepts draft:}
        This chapter describles the initial development of the concepts and the solution considered in the early phases of the project.
        \begin{enumerate}
            \item Description of the different process steps and possible combinations.
            \item Listing of the retained concepts to focus on during the project.
        \end{enumerate}
    \end{mybox}

    \begin{mybox}[colback=red!5,colframe=red!5]{0}{example-image-C}      
        \textbf{Fixture design:}
        This chapter is focused on the development of the welding fixture, which represent a major amount of the total thesis work due to it's innovations.
        \begin{enumerate}
            \item Assessment of the fixture requirements
            \item First concept development and assessment: Fixture with standard locators.
            \item Second concept: Smart fixture without locators. This concept seemed to be the most suitable for the project application and this chapter focuses grandly on a multitude of analysis to assess the feasability of such a fixture (exact layout for maximum flexibility, security, resistance to a welding environment, gripping force, etc.).        
        \end{enumerate}
    \end{mybox}

    \begin{mybox}{12}{example-image}      
        \textbf{Tack welding assembly design:}
        This chapter is focused on the design of the tack welding process for all chosen sub-assemblies and it's characteristics.
        \begin{enumerate}
            \item Tack welding characteristics: Tack welding Do's and don'ts
            \item Definition and assessment method of the tack welds.
            \item Distortion compensation: Assessment of the geometry variation and impact on quality because of thermal deformation when tack welding without a dedicated fixture.
            \item Original curvature of the plate: Assessment of the geometry variation and impact on quality due to the initial geometry variation of the plate when tack welding without a dedicated fixture.    
        \end{enumerate}
    \end{mybox}

    \begin{mybox}{15}{example-image-A}      
        \textbf{Design of the production cell:}
        This chapter finalizes the development of the concepts and comprehends global assessments.
        \begin{enumerate}
            \item Cycle time analysis: Assessment of the time needed to tack weld, weld and quality check all sub-assemblies. Definition of the required workforce and equipment to achieve weekly production target, depending on the concept used. Implementation and verification with Siemens Tecnomatix.
            \item Definition and assessment of the means of production for each concept, in particular the sensors for the tack welding workcell with HRI.
            \item Final concepts description
        \end{enumerate}
    \end{mybox}

    \begin{mybox}{18}{example-image-B}      
        \textbf{Final concepts assessment:}
        This chapter assesses the concepts that were not eliminated along the project and defines which one ar the most suited.
        \begin{enumerate}
            \item Assessment criteria and method
            \item Final assessment (cost,...)
            \item Discussion of the results
        \end{enumerate}
    \end{mybox}
\end{document}

在此处输入图片描述

相关内容