效果如下

}UCP81[_QPFRJF2)ZRRIOM8.png

想在ctexart中实现这种效果(源码读了。。看不懂QAQ

3 回答3

4
<p>很简单,\usepackage[toc]{multitoc}</p>

回答: 2019-09-05 22:32

一个简单的mwe


\documentclass[UTF8]{ctexart}
\usepackage[toc]{multitoc}%多栏目录,默认两栏
\usepackage{blindtext}
%\renewcommand\multicolumntoc{3}可以修改为三栏
\begin{document}
\tableofcontents
\Blinddocument
\end{document}


  • 谢谢! – sikouhjw 2019-09-05 23:13 回复
0
<p>重定义\tableofcontents 也是可以的。</p>
0
<p>by  Heiko Oberdiek 选自<a href="https://tex.stackexchange.com/questions/72749/centering-contents-name-with-twocolumn-contents" target="_self" title="Centering contents name with [twocolumn] contents">https://tex.stackexchange.com/questions/72749/centering-contents-name-with-twocolumn-contents</a></p><p><br></p><p>Example for article:</p><pre class="brush:as3;toolbar:false">\documentclass[twocolumn]{article} \makeatletter \renewcommand*{\tableofcontents}{%   \if@twocolumn     \@restonecolfalse   \else     \@restonecoltrue   \fi   \twocolumn[\section*{\centering\contentsname}]%   \@mkboth{\MakeUppercase\contentsname}%           {\MakeUppercase\contentsname}%   \thispagestyle{plain}%   \@starttoc{toc}%   \if@restonecol     \onecolumn   \else     \clearpage   \fi } \makeatother \begin{document} \tableofcontents \section{Foobar} \subsection{Hello World} \subsubsection{Subsubsection} \addtocontents{toc}{\protect\newpage} \section{Last section} \subsection{Last subsection} \end{document}</pre><p><span style="color: rgb(61, 70, 77); font-family: ">Example for report:</span></p><pre class="brush:as3;toolbar:false">\documentclass[twocolumn]{report} \makeatletter \renewcommand*{\tableofcontents}{%   \if@twocolumn     \@restonecolfalse   \else     \@restonecoltrue   \fi   \twocolumn[\@makeschapterhead{\centering\contentsname}]%   \@mkboth{\MakeUppercase\contentsname}%           {\MakeUppercase\contentsname}%   \thispagestyle{plain}%   \@starttoc{toc}%   \if@restonecol     \onecolumn   \else     \clearpage   \fi } \makeatother \begin{document} \tableofcontents \chapter{Foobar} \section{Hello World} \subsection{Subsection} \addtocontents{toc}{\protect\newpage} \chapter{Last chapter} \section{Last section} \end{document}</pre><p><span style="color: rgb(61, 70, 77); font-family: "></span><img src="/data/ueditor/php/upload/image/20190910/1568090700296709.jpg"></p><p><span style="color: rgb(61, 70, 77); font-family: ">by  user31729 选自</span></p><a href="https://tex.stackexchange.com/questions/353866/table-of-contents-in-two-column-without-multicol" target="_self" title="Table of contents in two column, without multicol">https://tex.stackexchange.com/questions/353866/table-of-contents-in-two-column-without-multicol</a><pre ><code >\documentclass{book} \usepackage{pgffor} \makeatletter \newcommand{\twocolumntoc}{%   \chapter*{\contentsname     \@mkboth{%       \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%   \@starttoc{toc}% } \makeatother \setcounter{tocdepth}{4} \begin{document} \twocolumn \twocolumntoc \onecolumn \foreach \x in {1,...,50}{% \chapter{Chap \x} \section{Foo section} \subsection{Foo subsec} \subsubsection{Foo subsecsec} } \end{document}</pre><p><img src="/data/ueditor/php/upload/image/20190910/1568090818124375.jpg"></p>

你的回答

请登录后回答

你的回答将会帮助更多人,请务必认真回答问题。