
fncychap 패키지 사용시 발생하는 세로 간격을 없애려고 하는데 어떻게 해야 하나요? 나는 다음을 작성하여 이미 해당 항목을 작성했습니다.
\renewcommand\contentsname{Table of Contents}
\tableofcontents
\addtocontents{toc}{\vskip-70pt}
마지막 줄은 항목을 다시 제자리로 이동시키는 줄입니다 toc
. lof
및 에서 이와 유사한 방법이 있습니까 lot
?
답변1
을 사용하지 마십시오 fncychap
. 이러한 모든 스타일은 다음을 통해 쉽게 생성할 수 있습니다.titlesec
\documentclass{book}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\huge\filleft\bfseries}
{\titlerule[1pt]%
\vspace{1ex}%
\chaptertitlename\ \thechapter}
{20pt}
{\Huge}[\vspace{1ex}{\titlerule[1pt]}]
\titleformat{name=\chapter,numberless}[display]
{\normalfont\huge\filleft\bfseries}
{}
{0pt}
{\titlerule[1pt]
\vspace{1ex}%
\Huge}[\vspace{1ex}{\titlerule[1pt]}]
\titlespacing*{\chapter} {0pt}{20pt}{20pt} %% adjust these numbers
\titlespacing*{name=\chapter,numberless} {0pt}{20pt}{20pt} %% adjust these numbers
\begin{document}
\tableofcontents
\chapter{Introduction}
\end{document}
답변2
이제 @HarishKumar에 동의한다는 점을 인정해야 합니다. 내 문제에 대한 해결책은 fncychap 패키지를 건너뛰고 대신 titlesec을 사용하는 것이었습니다.
@HarishKumar의 예에서 생성한 코드는 다음과 같습니다.
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\Large\filleft}
{\sc\chaptertitlename\ \Huge{\thechapter}\\%
\vspace{1.5cm}
\titlerule[1pt]}
{-20pt}
{\Large}[\vspace{2ex}{\titlerule[1pt]}]
\titleformat{name=\chapter,numberless}[display]
{\normalfont\Large\filleft}
{}
{0pt}
{\titlerule[1pt]
\vspace{2ex}%
\Large}[\vspace{2ex}{\titlerule[1pt]}]
\titlespacing*{\chapter} {0pt}{0pt}{40pt} %% adjust these numbers
\titlespacing*{name=\chapter,numberless} {0pt}{0pt}{40pt} %% adjust these numbers