라텍스에서 장 스타일 사용

라텍스에서 장 스타일 사용

나는 아래 출력과 같기를 원합니다. 저를 도와주세요! 매우 감사합니다!

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

답변1

titlesec및 을 사용합니다 tcolorbox. 이 솔루션을 살펴보십시오.tcolorbox를 사용한 챕터 스타일?다른 상자 레이아웃을 사용하지만 tcolorbox옵션을 조정하여 원하는 레이아웃을 얻을 수 있습니다.

다음은 번호가 매겨진 챕터에 대한 해당 솔루션의 초기 적용입니다. 색상, 치수 등을 조정하여 조정해야 합니다.

\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries}
  {}
  {20pt}
  {%
    \begin{tcolorbox}[
      enhanced,
      rounded corners,
      shadow={1mm}{-1mm}{-2.2mm}{black!20!white},
      colback=white,
      boxrule=0mm,
      arc=3mm,
      leftrule=0pt,
      rightrule=0pt,
      fontupper=\color{blueish}\sffamily\bfseries\huge,
      width=\textwidth-3.2mm,  % account for shadow width.
      top=0.6cm, 
      bottom=0.6cm,
      overlay={
        \node[
          fill=blueish,
          line width=0cm,
          inner sep=0pt,
          text width=13mm,
          minimum height=16mm,
          align=center,
          anchor=south east,
          xshift=2.2mm, yshift=9mm,
          font=\color{white}\sffamily\bfseries\fontsize{30}{36}\selectfont
        ] 
        (chapname) at (frame.north east) {\thechapter};
        \node[color=gray,font=\large,anchor=base east,inner sep=1mm] at (chapname.base west)
        {\chaptertitlename};  
      } 
    ]
    \MakeUppercase{#1}
    \end{tcolorbox}%
  }

이것은

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

관련 정보