双栏书中的单栏表格列表不起作用

双栏书中的单栏表格列表不起作用

我正在写一本双栏的书。

目录采用双列模式,这很好。但我希望表格列表分布在一列上(主要是因为有些表格的标题很长)。不幸的是,我不知道如何实现这一点。

任何建议都值得感激。谢谢。

在此处输入图片描述

% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[a4paper,oneside,centered,twocolumn]{book}
\special{papersize=210mm,297mm}
\usepackage[top=3cm, bottom=3.2cm, left=2.5cm, right=2.5cm]{geometry}

\usepackage[english]{babel}
\usepackage{newpxtext} % Font for document instead of obsolete Palatino
\usepackage{tocloft} % Customization of TOC LOF LOT
\usepackage[table,xcdraw]{xcolor} % For shading in tables
\usepackage{pdfcolmk}
\usepackage{multirow}
\usepackage{textcomp}
\usepackage{pdfpages}
\usepackage{ltablex}
\usepackage{nicefrac} % to write fractions
\usepackage{attrib} % For source of quotations
\usepackage{lettrine} % For NewThought formatting
\usepackage{array} % To define width of columns in long table
\usepackage{booktabs} % Nicer spacing in columns
\usepackage{siunitx} % To write Celsius, etc.
\usepackage{enumitem} % To create item lists
\usepackage{caption} % To change way captions are labelled
\usepackage{scrextend}
\usepackage{threeparttable} % For table notes + To allow footnote material to stay with the tabular environment
\usepackage{etoolbox} % To make table footnote font smaller
\usepackage{threeparttablex}
\appto\TPTnoteSettings{\footnotesize}
\usepackage{textcomp} % For Numero symbol

%To make TOC into two columns ... but then LOT disappears?
\usepackage[toc,lot]{multitoc}
\renewcommand*{\multicolumntoc}{2}
\renewcommand*{\multicolumnlot}{2}

\usepackage{hyperref} % Hyperlinks

\usepackage{blindtext}
%\usepackage{showframe}

\begin{document}

%\layout    

% FRONTMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\frontmatter

\tableofcontents
\clearpage

\addcontentsline{toc}{section}{\listtablename}
\listoftables

\clearpage

% MAINMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\mainmatter

\chapter{Chapter Title}

\section{A Huge Section}

\blindtext

\begin{table*}
    \centering
    \caption{Table of the Huge Section}\label{Table of the Huge Section}
        \begin{tabular}{lccr}\toprule
        \hline
        1 & 2 & 3 \\ \hline
        4 & 5 & 6 \\ \hline
        7 & 8 & 9 \\
        \hline
    \end{tabular}
\end{table*}

\end{document}

答案1

multitoc 中有一个错误。我还忽略了 [toc,lot,lof] 选项,因为它们没有任何用处。

您可以使用 将其扩展为新的目录类型\newcommand{\multcolumnXXX}{2}

\documentclass[a4paper,oneside,centered,twocolumn]{book}
\special{papersize=210mm,297mm}
\usepackage[top=3cm, bottom=3.2cm, left=2.5cm, right=2.5cm]{geometry}

\usepackage[english]{babel}
\usepackage{newpxtext} % Font for document instead of obsolete Palatino
\usepackage{tocloft} % Customization of TOC LOF LOT
\usepackage[table,xcdraw]{xcolor} % For shading in tables
\usepackage{pdfcolmk}
\usepackage{multirow}
\usepackage{textcomp}
\usepackage{pdfpages}
\usepackage{ltablex}
\usepackage{nicefrac} % to write fractions
\usepackage{attrib} % For source of quotations
\usepackage{lettrine} % For NewThought formatting
\usepackage{array} % To define width of columns in long table
\usepackage{booktabs} % Nicer spacing in columns
\usepackage{siunitx} % To write Celsius, etc.
\usepackage{enumitem} % To create item lists
\usepackage{caption} % To change way captions are labelled
\usepackage{scrextend}
\usepackage{threeparttable} % For table notes + To allow footnote material to stay with the tabular environment
\usepackage{etoolbox} % To make table footnote font smaller
\usepackage{threeparttablex}
\appto\TPTnoteSettings{\footnotesize}
\usepackage{textcomp} % For Numero symbol

%To make TOC into two columns ... but then LOT disappears?
\usepackage{multitoc}
\makeatletter
\renewcommand*{\@starttoc}[1]{\bgroup% use locak registers
   \@ifundefined{multicolumn#1}{\count1=1}{\count1=\csname multicolumn#1\endcsname}%
   \ifnum\count1>1
     \begin{multicols}{\count1}%
       \@multitoc@starttoc{#1}%
     \end{multicols}%
   \else
     \@multitoc@starttoc{#1}%
   \fi
\egroup}%
\makeatother

\renewcommand{\multicolumnlot}{1}

\usepackage{hyperref} % Hyperlinks

\usepackage{blindtext}
%\usepackage{showframe}

\begin{document}

%\layout    

% FRONTMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\frontmatter

\tableofcontents
\clearpage

\addcontentsline{toc}{section}{\listtablename}
\listoftables


% MAINMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\mainmatter

\chapter{Chapter Title}

\section{A Huge Section}

\blindtext

\begin{table*}
    \centering
    \caption{Table of the Huge Section}\label{Table of the Huge Section}
        \begin{tabular}{lccr}\toprule
        \hline
        1 & 2 & 3 \\ \hline
        4 & 5 & 6 \\ \hline
        7 & 8 & 9 \\
        \hline
    \end{tabular}
\end{table*}

\end{document}

相关内容