答案1
titlesec
这是一种使用和tikz
(用于章节名称周围的垂直规则)来实现此目的的方法。
也许有人有更好的主意。
\documentclass{book}
\usepackage[explicit,calcwidth]{titlesec}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\renewcommand{\chaptername}{Kapitola}
\titlespacing{\chapter}{4cm}{-18pt}{10ex}[4cm]
\titlespacing{\section}{0cm}{0pt}{0ex}
\titleformat{\chapter}[display]{\filcenter\LARGE\bfseries}{\itshape\chaptertitlename\ \Roman{chapter}}{8ex}{\large\MakeUppercase{#1}%
\begin{tikzpicture}[remember picture,overlay]
% Left Rule
\coordinate (L1) at ([xshift=3.5cm]current page text area.north west);
\coordinate (L2) at ([yshift=-3pt]0,0);
\draw [line width=.8pt] (L1) -- ($(L1)!(L2)!(L1)$);
% Right Rule
\coordinate (R1) at ([xshift=-3.5cm]current page text area.north east);
\coordinate (R2) at ([yshift=-3pt]0,0);
\draw [line width=.8pt] (R1) -- ($(R1)!(R2)!(R1)$);
%% Auxiliaries Rules
% \draw (L1) -- (R1)
% \draw (R1) |- (R2);
% \draw (L1) |- (L2);
\end{tikzpicture}
}
\titleformat{\section}[display]{\filcenter}{\large\bfseries § \arabic{section}}{1ex}{\addtolength{\titlewidth}{-12ex}\titleline*[c]{\titlerule[.8pt]}\vspace{1ex}\itshape #1}
\begin{document}
\setcounter{chapter}{5}% Next chapter: 6
\chapter{Besselova Rovnice}
\section{Besselovy funkce l. druhu}
\end{document}
我认为只想调整字母类型。