%EC%9D%80%20%EC%9E%A5%EC%97%90%20%EB%8C%80%ED%95%9C%20%EC%88%98%ED%8F%89%EC%84%A0%EC%9D%84%20%ED%91%9C%EC%8B%9C%ED%95%98%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4.png)
titlesec
저는 각 장 아래에 수평선을 그리는 간단한 작업을 시도했습니다 . 에 대한 많은 튜토리얼, 문서 및 질문이 있습니다.텍스이것이 어떻게 이루어질 수 있는지 설명합니다. 하지만... 그 각각의 대답은 나에게 전혀 아무것도 주지 않았습니다. 내가 시도한 솔루션은 다음과 같습니다.
그러나 각각의 경우에 컴파일된 PDF는 \titleformat
. 내 현재 서문은 titlesec
다음과 같이 사용됩니다.
\documentclass[11pt,oneside]{book}
\usepackage{titlesec}
% Below "\section" can be replaced with "\subsection" and "\subsubsection"
% in order to customize the corresponding headings. "bch" - Bitstream
% Charter, "b" - bold.
\titleformat{\section}[hang]
{\usefont{T1}{bch}{b}{n}\selectfont}
{} % label
{0em} % horizontal separation between label and title body
{\hspace{-0.4pt}\Large \thesection\hspace{0.6em}} % before-code
[] % after-code
\titleformat
{\chapter} % command
[display] % shape
{\normalfont\huge\bfseries} % format
{\chaptertitlename\ \thechapter} % label
{20pt} % sep
{\Huge}[\vspace{2ex}\titlerule] % before-code
이것은 내가 시도한 적어도 12가지 변형 중 하나일 뿐입니다.타이틀섹 문서, 섹션 3.8에 설명된 방법을 포함 {name=\chapter,numberless}
하지만 이에 대해 보여줘야 할 것은 다음 스크린샷뿐입니다.
보시다시피, "Abstract" 장 위, 아래 또는 근처에는 수평선이 없습니다. 현재 문서가 거의 비어 있습니다. 서문이 끝나면 나에게 남은 건
\begin{document}
\maketitle
\chapter*{Abstract}
Lorem Ipsum etc. etc.
\end{document}
MWE를 제공할 수 있었으면 좋겠습니다. 가장 기본적인 예라도 결과가 나오지 않도록 내가 여기서 뭘 잘못하고 있는지 알려주십시오.
답변1
번호가 매겨진 장에 대한 형식을 정의하고 에 대해 번호가 매겨지지 않은 장을 사용했습니다 Abstract
. 이 경우 규칙을 얻으려면 번호가 없는 장의 형식을 정의해야 합니다.
\documentclass[11pt,oneside]{book}
\usepackage{titlesec}
% Below "\section" can be replaced with "\subsection" and "\subsubsection"
% in order to customize the corresponding headings. "bch" - Bitstream
% Charter, "b" - bold.
\titleformat{\section}[hang]
{\usefont{T1}{bch}{b}{n}\selectfont}
{} % label
{0em} % horizontal separation between label and title body
{\hspace{-0.4pt}\Large \thesection\hspace{0.6em}} % before-code
[] % after-code
\titleformat
{\chapter} % command
[display] % shape
{\normalfont\huge\bfseries} % format
{\chaptertitlename\ \thechapter} % label
{20pt} % sep
{\Huge}[\vspace{2ex}\titlerule] % before-code
\titleformat
{name=\chapter,numberless} % command
[display] % shape
{\normalfont\huge\bfseries} % format
{} % label
{0pt} % sep
{\Huge}[\vspace{2ex}\titlerule] % before-code %% adjust 2ex here as you want.
\begin{document}
%\maketitle
\chapter*{Abstract}
Lorem Ipsum etc. etc.
\end{document}
간격을 조정하지 않았습니다. 다음을 사용하여 수행하십시오. \titlespacing*
기본값은 다음과 같습니다.
\titlespacing*{\chapter} {0pt}{50pt}{40pt}
다음을 사용하여 번호가 없는 장에도 수행하십시오.
\titlespacing*{name=\chapter,numberless} {0pt}{50pt}{40pt}