发布时间:2009-11-18 20:25:35
文章类别:小技巧
原文地址:http://blog.sina.com.cn/s/blog_5e16f1770100g39i.html

QQ群:91940767/145316219/141877998/80300084/194770436
淘宝店:http://latexstudio.taobao.com
技巧续篇:http://latexstudio.net/
常见数学公式问题集下载

我们有时候想简单修改一个章节标题的样式,比如章节编号加一个框,下面我们简单举一个例子。

示例如下:

\documentclass{article}
\usepackage{times}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{207.0pt}
\setlength\fboxrule{1pt}

\renewcommand\thesubsection
{\fbox{\thesection.\arabic{subsection}}}

\begin{document}
\setcounter{section}{3}
\subsection{A mistake}\label{wrong}
Referencing a subsection in this format
produces a funny result as we can see
looking at subsection~\ref{wrong}.
We get a boxed reference.
\end{document}

效果如图:

LaTeX技巧76:如何修改章节标题样式

示例二:

\documentclass{article}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{207.0pt}

\makeatletter
\renewcommand\subsection{\@startsection
{subsection}{2}{0mm}%name, level, indent
{-\baselineskip}% beforeskip
{0.5\baselineskip}% afterskip
{\normalfont\normalsize\itshape}}% style

\makeatother

% redefinition of \subsection shown below
\setcounter{section}{4} % simulate previous
% sections
\begin{document}
\ldots\ some text above.
\subsection{Example of a Section Heading}
The heading is set in normal-sized italic
and the separation from the preceding text
is exactly one baseline. The separation
from the text following is one-half
baseline and this text is not indented.
\end{document}

效果图:

LaTeX技巧76:如何修改章节标题样式


点赞(0)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部