答案1
下面的代码至少会让你接近,但你应该调查titlesec 软件包的文档了解更多详细信息,或查阅文档类别的功能。
\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{newtxtext,newtxmath}% font like picture
\usepackage{titlesec}
% style chapters
\titleformat{\chapter}% sectioning command to format
[block]% shape of chapter titles = number next to title
{}% common formatting to number and title
{{\fontsize{40}{40}\selectfont\bfseries\thechapter}% scaled bold chapter number
\hspace*{0.7em}\rule[2pt]{1.3pt}{6\baselineskip}}% vertical line
{0.7em}% space between number and title
{\Large\MakeUppercase}% style applied to title
% (use * after \titlespacing to unindent next paragraph)
\titlespacing{\chapter}% set spacing for chapter titles
{0pt}% no space to left
{0pt}% no space to above
{\baselineskip}% skip one line afterwards
% style sections
\titleformat{\section}% sectioning command to format
[block]% shape: number then title
{\bfseries}% make both number and title bold
{\thesection.}% number followed by period
{0.5em}% space between number and title
{\MakeUppercase}% style of title
\titlespacing{\section}% set spacing for section titles
{0pt}% no space to left
{1.4\baselineskip}% space above
{0.6\baselineskip}% space below
\begin{document}
\chapter{General Thermodynamic Properties}
Text here.
\section{Extensive and Intensive Properties}
More text here.
\end{document}