今天,我们分享大致的章节样式设计:

ThomasCalculus20140515202309

这里有样例如下,代码:

\documentclass[
  11pt,
  pagesize=auto,
  version=last,
  chapterprefix=true
  ]{scrbook}
\usepackage[frenchb]{babel}
\usepackage[babel=true]{csquotes}
\usepackage[T1]{fontenc}
\usepackage[explicit]{titlesec}
\usepackage{xcolor}
\usepackage{charter}

\definecolor{mybluei}{RGB}{28,138,207}
\definecolor{myblueii}{RGB}{131,197,231}

\newcommand\ChapterFont{\usefont{T1}{qhv}{b}{n}\selectfont\huge}
\newcommand\SectionFont{\usefont{T1}{qhv}{b}{n}\selectfont}

\titleformat{\chapter}[display]
  {\normalfont\ChapterFont\huge\color{myblueii}}
  {}
  {0pt}
  {\parbox[b]{70pt}{\mbox{}}%
    \parbox[b]{50pt}{\colorbox{mybluei}{%
      \parbox[b][60pt][t]{45pt}{\centering%
        \color{white}%
        {\itshape\rmfamily\small\chaptertitlename}%
        \vfill{\fontsize{50}{120}\selectfont\thechapter}%
        }%
      }%
    }\hspace{15pt}%
    \parbox[b]{\dimexpr\textwidth-150pt}{%
      \raggedright\scshape#1\vskip6pt%
    }%
  }

\titleformat{name=\chapter,numberless}[display]
  {\normalfont\ChapterFont\huge\color{myblueii}}
  {}
  {0pt}
  {\parbox[b]{70pt}{\mbox{}}%
    \hspace{15pt}%
    \parbox[b]{\dimexpr\textwidth-150pt}{%
      \raggedright\scshape#1\vskip6pt%
    }%
  }

\titleformat{\section}
  {\normalfont\small\sffamily\SectionFont\color{myblueii}}
  {\colorbox{mybluei}{%
    \parbox[c][16pt][c]{40pt}{%
      \centering\textcolor{white}{\SectionFont\Large\rmfamily\thesection}%
      }%
    }%
  }
  {1em}
  {#1}
  [\vspace{-1.2\baselineskip}%
    \color{myblueii}\hspace*{\dimexpr40pt+2\fboxsep\relax}%
    \rule{\dimexpr\textwidth-40pt-2\fboxsep\relax}{1pt}%
  ]

\begin{document}

\chapter{Preliminaries}
\section{Test section}

\end{document}

效果图如下:g8jEe

点赞(0)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部