给LaTeX文章加上目录表格

http://tex.stackexchange.com/questions/24750/article-appendix-with-sections-and-toc-entries-in-the-form-appendix-a


up vote 8 down vote accepted

Here's a solution using the appendix package (adding the title package option) and a redefinition of \thetable and \thefigure:

\documentclass{article}
\usepackage[titletoc,toc,title]{appendix}

\begin{document}
\tableofcontents

\section{Dolor sit amet}
Have a look at \ref{app:foobar}

\begin{appendices}
  \renewcommand\thetable{\thesection\arabic{table}}
  \renewcommand\thefigure{\thesection\arabic{figure}}
  \section{Consectetur adipiscing elit} \label{app:foobar}
    \begin{table}[h]
    \caption{foo}
    \begin{tabular}{cc}
    \textbf{ a } & \textbf{ b }\\
    1 & 3 \\
    2 & 4\\
    \end{tabular}
    \end{table}
  \section{Mauris euismod}
\end{appendices}
\end{document}

enter image description here

To change the \paragraph formatting. add these lines to the preamble:

\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {3.25ex \@plus1ex \@minus.2ex}%
                                    {-1em}%
                                    {\normalfont\normalsize\itshape}}
\makeatother
share edit flag
 
 
thanks a lot! this is the perfect solution for my requirements! –   deboerk  Aug 2 '11 at 23:40
 

在使用LaTeX编写文章时,插入表格和图片时通常会出现表格或图片与正文内容之间间隔很大的情况。为了控制文字与表格的分离,可以在生成表格LaTeX代码开始和结束处加上`\vspace{-2.0em}`来调整上下间隔的大小,其中的数值越大间隔越小,可以根据需要进行调整。 这样可以有效地控制文字与表格之间的距离,使排版更加紧凑。此外,还需要注意在LaTeX中,空格键、回车键和Tab键均被视为空格,多个空白字符被视为一个空格,一行开头的空格会被忽略不计。 因此,在编辑LaTeX文档时,可以合理使用换行符和空格来调整文字与表格之间的间距,以达到最佳的视觉效果。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [simple-latex:使我与 LaTeX 的关系很好的小包](https://download.csdn.net/download/weixin_42109178/19396449)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [LaTeX中解决表和图与内容之间间隔较大的问题](https://blog.csdn.net/qq_38506270/article/details/115402380)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [LaTex学习笔记(二):LaTex排版文字](https://blog.csdn.net/weixin_43771001/article/details/104957247)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值