轉(zhuǎn)載自
http://blog.sina.com.cn/s/blog_5e16f1770100g39w.html
http://blog.sina.com.cn/s/blog_5e16f1770100lqn7.html
加粗
\bfseries
典型
@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
NAME 表示所定義的節(jié)標(biāo)題的名稱(chēng)(不要帶反斜杠),比如section和subsection。
LEVEL 是一個(gè)數(shù)字,可以定義節(jié)標(biāo)題的命令層次。這個(gè)數(shù)決定了定義的節(jié)標(biāo)題是否編號(hào)(若是小于等于 secnumdepth則被編號(hào))也決定了標(biāo)題是否會(huì)被編進(jìn)目錄(若是小于等于tocdepth則被編號(hào))。
INDENT : 定義節(jié)標(biāo)題到版心左邊的距離。此度量若是負(fù)數(shù)則標(biāo)題進(jìn)入邊空。
BEFORESKIP: 是一個(gè)長(zhǎng)度,其絕對(duì)值表示標(biāo)題到上文之間的距離。若是此距離為負(fù)數(shù),則標(biāo)題后面的第一個(gè)段落不縮進(jìn)。此度量最好是一個(gè)可以被伸長(zhǎng)和縮短的長(zhǎng)度。另外標(biāo)題總是另起一段的。因而parskip已被加入到標(biāo)題與上下文的距離。
AFTERSKIP :是一個(gè)長(zhǎng)度,其絕對(duì)值表示獨(dú)立顯示的標(biāo)題到下文之間的垂直間距或者是段內(nèi)顯示的標(biāo)題到下文之間的距離。此度量若是負(fù)的,則定義的標(biāo)題是段內(nèi)顯示的。對(duì)于獨(dú)立顯示的標(biāo)題,parskip也已被加進(jìn)標(biāo)題與下文的距離。 STYLE :決定標(biāo)題的內(nèi)容形式??梢允侨我庥绊懳谋九虐娼Y(jié)構(gòu)的命令如加入尺寸\huge \large \bfseries 對(duì)齊命令等
\documentclass{article}
\usepackage{times}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{183.0pt}
\makeatletter
\newcommand\Csub{\@startsection{subsection}{2}%
{0pt}{-\baselineskip}{.2\baselineskip}%
{\centering\itshape}}
\newcommand\Lsub{\@startsection{subsection}{2}%
{0pt}{-\baselineskip}{.2\baselineskip}%
{\raggedright\sffamily}}
\newcommand\Rsub{\@startsection{subsection}{2}%
{0pt}{-\baselineskip}{.2\baselineskip}%
{\raggedleft\MakeUppercase}}
\newcommand\Hsub{\@startsection{subsection}{2}%
{0pt}{-\baselineskip}{.2\baselineskip}%
{\hrule\medskip\itshape}}
\makeatother
\begin{document}
\section{A very long heading that shows
the default behavior of \LaTeX's
sectioning commands}
\Csub{A subsection heading}
The heading is centered using an italic font.
\Lsub{A subsection heading}
The heading is left-justified using a sans
serif font.
\Rsub{A subsection heading}
The heading is right-justified and uses
uppercase letters.
\Hsub{A subsection heading}
This heading has a horizontal rule above
the text.
\end{document}

% define a chapter format
\makeatletter
\newcommand\MySec{@startsection{section}{1}%
{0pt}{-\baselineskip}{.2\baselineskip}%
{\large\bfseries}}
\makeatother
\makeatletter
\newcommand\Hsub{@startsection{subsection}{2}%
{0pt}{-\baselineskip}{.2\baselineskip}%
{\bfseries}}
\makeatother
\makeatletter
\renewcommand\bibsection{%
\section{{\large\bfseries{\refname}}@mkboth{\MakeUppercase{\refname}}{\MakeUppercase{\refname}}}\vspace{-.8\baselineskip}%
}%
\makeatother
\begin{thebibliography}{45}
\setlength{\itemsep}{-.1 em} % 縮小參考文獻(xiàn)間的垂直間距
\setlength{\baselineskip}{-20pt} % 縮小參考文獻(xiàn)的行垂直間距
%\setlength{\itemsep}{-1.5pt}