2009-08-24 868 views

回答

8

您可以使用titlesec包配置節標題的樣式,包括間距。有一個簡潔的縮小空間選項,或者您可以使用更高級的選項來指定特定的值(請參閱鏈接頁面上有關血腥詳細信息的文檔)。

+0

'titlesec'看起來像一個夢幻般的包。 – 2009-08-24 21:26:32

6

titlesec的替代方法是重新定義section命令,如下面的代碼片段所示。請注意,beforeskip和afterskip是您感興趣的變量。代碼本身只是前幾行。接下來是一段冗長的評論,讓我想起當我從一個文檔切割並粘貼整個文檔到另一個文檔時的定義。順便說一下,該代碼或多或少來自不可缺少的書, LaTeX Companion,第二版

\makeatletter 
\renewcommand\section{\@startsection {section}{1}{\[email protected]}% 
    {-2.5ex \@plus -1ex \@minus -.2ex}% 
    {1.3ex \@plus.2ex}% 
    {\centering\bfseries}} 
% \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} 
%   optional * [ALTHEADING]{HEADING} 
% Generic command to start a section. 
% NAME  : e.g., 'subsection' 
% LEVEL  : a number, denoting depth of section -- e.g., chapter=1, 
%     section = 2, etc. A section number will be printed if 
%     and only if LEVEL gt or eq the value of the secnumdepth 
%     counter. 
% INDENT  : Indentation of heading from left margin 
% BEFORESKIP : Absolute value = skip to leave above the heading. 
%     If negative, then paragraph indent of text following 
%     heading is suppressed. 
% AFTERSKIP : if positive, then skip to leave below heading, 
%      else - skip to leave to right of run-in heading. 
% STYLE  : commands to set style 
% If '*' missing, then increments the counter. If it is present, then 
% there should be no [ALTHEADING] argument. A sectioning command 
% is normally defined to \@startsection + its first six arguments. 
\makeatother 
相關問題