
Я использую 2-колоночныйШаблон ИЭТи я столкнулся с проблемой с таблицами. А именно, заголовки таблиц выходят за обе колонки, даже если сама таблица одноколоночная. Я настроилфиктивный проектс файлом MWE .tex для демонстрации проблемы:
\documentclass{cta-author}
\begin{document}
\supertitle{Test}
\title{Test}
\author{\au{First Author$^{1}$}, \au{Second Author$^{2\corr}$}, \au{Third Author$^{3}$}}
\address{\add{1}{First Department, First University, Address, City, Country Name}
\add{2}{Second Company Department, Company Address, City, Country Name}
\add{3}{Third Department, Third University, Address, Country Name}
\add{4}{Current affiliation: Fourth Department, Fourth University, Address, Country Name}
\email{[email protected]}}
\begin{abstract}
In the beginning the Universe was created. This had made many people very angry and has been widely regarded as a bad move.
\end{abstract}
\maketitle
\section{Figure}
Figures work fine as seen in Figure \ref{fig:sample}.
\begin{figure}
\centering
\includegraphics[width=\linewidth]{example-image-a}
\caption{This is a fairly long caption that doesn't actually provide any relevant, helpful, or indeed at all useful information about the figure in question.}
\label{fig:sample}
\end{figure}
\section{Table}
However, table captions extend over two columns even when the table itself is in a single column as seen in Table \ref{tab:sample}.
\begin{table}
\caption{This is another long and unhelpful caption that doesn't actually say anything about the below table but it does helpfully demonstrate the problem being discussed. Notice the table itself is appropriately placed and centred but the caption extends over both columns.}
\label{tab:sample}
\centering
\begin{tabular}{c|c}
1 & 2 \\
3 & 4
\end{tabular}
\end{table}
\end{document}
(Я не могу вставить сам файл класса, так как он превышает ограничение в 30 тыс. символов.)
Что мне нужно исправить в файле класса, чтобы решить эту проблему? Я бы хотел избежать необходимости добавлять вручную переносы строк во все подписи таблиц.
решение1
Класс cta-author
имеет довольно своеобразный синтаксис, необходимый для table
.
\documentclass{cta-author}
\usepackage{lipsum} % for filler text
\begin{document}
\supertitle{Test}
\title{Test}
\author{\au{First Author$^{1}$}, \au{Second Author$^{2\corr}$}, \au{Third Author$^{3}$}}
\address{\add{1}{First Department, First University, Address, City, Country Name}
\add{2}{Second Company Department, Company Address, City, Country Name}
\add{3}{Third Department, Third University, Address, Country Name}
\add{4}{Current affiliation: Fourth Department, Fourth University, Address, Country Name}
\email{[email protected]}}
\begin{abstract}
In the beginning the Universe was created. This had made many people very angry and has been widely regarded as a bad move.
\end{abstract}
\maketitle
\section{Figure}
Figures work fine as seen in Figure \ref{fig:sample}.
\begin{figure}
\centering
\includegraphics[width=\linewidth]{example-image-a}
\caption{This is a fairly long caption that doesn't actually provide any relevant, helpful, or indeed at all useful information about the figure in question.}
\label{fig:sample}
\end{figure}
\section{Table}
However, table captions extend over two columns even when the table itself is in a single column as seen in Table \ref{tab:sample}.
\begin{table}
\processtable{This is another long and unhelpful caption that doesn't actually say anything
about the below table but it does helpfully demonstrate the problem being
discussed. Notice the table itself is appropriately placed and centred but the
caption extends over both columns.\label{tab:sample}}
{\makebox[\columnwidth]{\begin{tabular}{c|c}
1 & 2 \\
3 & 4
\end{tabular}}}{}
\end{table}
\lipsum
\end{document}
На самом деле, подпись набрана той же ширины, что и таблица (по непонятным мне причинам), поэтому я схитрил, добавив \makebox[\columnwidth]{...}
.