VOPAk.png

实现代码如下:

\documentclass[10pt,twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage{lipsum, graphicx, tabularx}
\usepackage[svgnames]{xcolor}
\usepackage[explicit]{titlesec}
% todo modify this to display chapter name and number as shown in figure above.
\titleformat{\chapter}[block]
    {\bfseries\Huge\sffamily}
    {\rlap{\hspace*{\dimexpr\linewidth+\marginparsep}%
\parbox{\marginparwidth}{\centering\color{Gainsboro}\scalebox{4}{\thechapter}\\[-0.5ex]% \raisebox{-0.3\height}[0pt][0pt]
    \rule{10pt}{10pt}\hspace{10pt}\rule{10pt}{10pt}\hspace{10pt}\rule{10pt}{10pt}}}}
    {0pt}
    {\color{gray!75}\begin{tabularx}{\linewidth}{@{}>{\raggedright\arraybackslash}X>{\raggedleft\arraybackslash}p{1cm}@{}}
       & \makebox[0pt]{\LARGE\chaptername}\\[2.5ex] #1
    \end{tabularx}}
    [\vspace{1ex}\titlerule\vspace{16pt}]

\titlespacing{\chapter}{0pt}{-5ex}{10ex}

\usepackage{currfile}
\usepackage{lipsum}

\usepackage{shorttoc}
\usepackage{tocbibind}
% http://ctan.org/pkg/bookmark
\usepackage{bookmark}
\usepackage{listings}
\usepackage{wrapfig}

\usepackage{float}

\begin{document}

\chapter{Random Number Generators}

\lipsum[1-5]

\end{document}

其他样式参考:https://tex.stackexchange.com/questions/356771/how-to-display-chapter-number-in-big-numerical-next-to-chapter-title

点赞(0)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部