加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

LaTeX技巧79:titletoc定制自己的目录样式示例

(2009-11-19 14:45:40)
标签:

latex

titletoc

定制

目录

样式

分类: 页面设置

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

示例一:

\documentclass{article}
\usepackage{times}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{135.0pt}

\usepackage{titletoc}
\titlecontents{section}[0pt]{\addvspace{2pt}\filright}
              {\contentspush{\thecontentslabel\ }}
              {}{\titlerule*[8pt]{.}\contentspage}

\begin{document}
\contentsline{section}{\numberline{12.8}Some section that
                       is wrapped in the TOC}{87}
\contentsline{section}{\numberline{12.9}Another section}{88}
\contentsline{section}{\numberline{12.10}And yet another
                       wrapping section}{90}
\contentsline{section}{\numberline{12.11}Final section}{92}

\end{document}

效果图:

 

示例二:

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

\makeatletter
\renewcommand\l@subsection{\@dottedtocline{2}{1.5em}{3em}}
\makeatother

\begin{document}
\contentsline{section}{\numberline{10}A-Head}{3}
\contentsline{subsection}{\numberline{10.9}B-Head}{4}
\contentsline{subsection}{\numberline{10.10}B-Head}{4}
\end{document}

效果图:

 

示例三:

\documentclass{ttctexa}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{207.0pt}
\setlength\textheight{17\baselineskip}
% For the book examples we shorten the vertical spaces
% and make the headings smaller:
\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
                       {-2.5ex \@plus -1ex \@minus -.2ex}%
                       {1.3ex}%
                       {\normalfont\large\bfseries}}

\makeatother
\setcounter{page}{1}

\makeatletter
\renewcommand\ext@table{lof}
\makeatother
\renewcommand\listfigurename
             {Figures and Tables}

\begin{document}
\listoffigures
\section{A Section}
Some text \ldots
\begin{table}[b]
 \centering
 \fbox{\scriptsize A table}
 \caption{Table-Caption}
\end{table}
Some text referencing
figure~\ref{fig} \ldots
\begin{figure}
 \centering
 \fbox{\scriptsize A figure}
 \caption{Figure-Caption}\label{fig}
\end{figure}
\end{document}

效果图:

LaTeX技巧79:titletoc定制自己的目录样式示例

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有