我发现很难用 acmart 格式制作包含长方程的长表
\documentclass[acmsmall]{acmart}
\AtBeginDocument{%
\providecommand\BibTeX{{%
\normalfont B\kern-0.5em{\scshape i\kern-0.25em b}\kern-
0.8em\TeX}}}
%% Rights management information. This information is sent to you
%% when you complete the rights form. These commands have SAMPLE
%% values in them; it is your responsibility as an author to
replace
%% the commands and values with those provided to you when you
%% complete the rights form.
\setcopyright{acmcopyright}
\copyrightyear{2018}
\acmYear{2018}
\acmDOI{10.1145/1122445.1122456}
%% These commands are for a JOURNAL article.
\acmJournal{JACM}
\acmVolume{37}
\acmNumber{4}
\acmArticle{111}
\acmMonth{8}
%%
%% Submission ID.
%% Use this when submitting an article to a sponsored event.
%% You'll receive a unique submission ID from the organizers
%% of the event and this ID should be used as the parameter to this command.
%%\acmSubmissionID{123-A56-BU3}
%%
%% The majority of ACM publications use numbered citations and
%% references. The command \citestyle{authoryear} switches to the
%% "author year" style.
%%
%% If you are preparing content for an event
%% sponsored by ACM SIGGRAPH, you must use the "author year" style of
%% citations and references.
%% Uncommenting
%% the next command will enable that style.
%%\citestyle{acmauthoryear}
%%
%% end of the preamble, start of the body of the document source.
\begin{document}
% \lipsum[1-3] % dummy text
\begin{table*}[b]
\caption{Different Types of Activation Functions}
\label{tab:long}
\setlist[itemize]{ nosep, % <-- itemize setup
leftmargin = *,
before = \vspace{-.6\baselineskip},
after = \vspace{-\baselineskip}
}
\setcellgapes{3pt}
\makegapedcells % for additional vertical space around cells'
contents
\setkeys{Gin}{width=\linewidth, height=12mm} % all images will have
width of cell's width
\setlength\tabcolsep{4pt}
\footnotesize % for better fit text into cells
\begin{tabularx}{\linewidth}{%
|*{2}{>{\raggedright}p{0.1\linewidth}|}
c|
*{2}{X|}
}
\hline
\thead{Activation} & \thead{Figure} & \thead{Equation}
& \thead{Advantages} & \thead{Disadvantages} \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{ $ % need to be set according to included
equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x< 0
\end{cases} $}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{ $ % need to be set according to included
equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x< 0
\end{cases} $}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{ $ % need to be set according to included
equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x< 0
\end{cases} $}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{ $ % need to be set according to included equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x< 0
\end{cases} $}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{ $ % need to be set according to included
equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x< 0
\end{cases} $}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{ $ % need to be set according to included
equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x< 0
\end{cases} $}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{ $ % need to be set according to included equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x< 0
\end{cases} $}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{ $ % need to be set according to included
equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x< 0
\end{cases} $}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{ $ % need to be set according to included
equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x< 0
\end{cases} $}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{ $ % need to be set according to included
equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x< 0
\end{cases} $}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{ $ % need to be set according to included equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x< 0
\end{cases} $}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\end{tabularx}
\end{table*}
% manually split table
\begin{table*}[t]
\ContinuedFloat
\caption{Different Types of Activation Functions (cont.)}
\label{tab:long}
\setlist[itemize]{ nosep, % <-- itemize setup
leftmargin = *,
before = \vspace{-.6\baselineskip},
% after = \vspace{-\baselineskip}
}
\setcellgapes{3pt}
\makegapedcells % for additional vertical space around cells'
contents
\setkeys{Gin}{width=\linewidth, height=12mm} % all images will have width
of cell's width
\setlength\tabcolsep{4pt}
\footnotesize % for better fit text into cells
\begin{tabularx}{\linewidth}{%
|*{2}{>{\raggedright}p{0.1\linewidth}|}
c|
*{2}{X|}
}
\hline
\thead{Activation} & \thead{Figure} & \thead{Equation}
& \thead{Advantages} & \thead{Disadvantages} \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{ $ % need to be set according to included
equation
f(x) = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x< 0
\end{cases} $}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\end{tabularx}
\end{table*}
% \lipsum\lipsum % dummy text
\end{document}
答案1
评论太长了……
- 抱歉,我安装的文档类有一些问题
acmart
。所以我无法在我的电脑上测试它是如何工作的 - 在 overleaf 中我看到,
[acmsmall]{acmart}
生成一列文档。但是,我对此并不确定,所以请检查我的观察是否正确。 - 如果它生成一列文档,你可以使用
longtable
, 我纠正了你的 MWE。它应该如下:
\documentclass[acmsmall]{acmart} \usepackage{amsmath, amssymb} \usepackage{caption} \usepackage[demo, export]{adjustbox} \usepackage{stfloats} \usepackage{makecell, tabularx} \setcellgapes{3pt} \usepackage{enumitem} \setlist[itemize]{nosep, % <-- itemize setup leftmargin = *, before = \vspace{-\baselineskip}, after = \vspace{-\baselineskip} } \usepackage{lipsum} \begin{document} \lipsum[1] % dummy text \begin{table*}[b] \caption{Different Types of Activation Functions} \label{tab:long} \makegapedcells % for additional vertical space around cells' contents \setkeys{Gin}{width=\linewidth,height=12mm} % all images will have width of cell's width \setlength\tabcolsep{4pt} \footnotesize % for better fit text into cells \begin{tabularx}{\linewidth}{% |*{2}{>{\raggedright}p{0.1\linewidth}|} c| *{2}{X|} } \hline \thead{Activation} & \thead{Figure} & \thead{Equation} & \thead{Advantages} & \thead{Disadvantages} \\ \hline \textbf{Hard Elish}\cite{elish} 2018 & \includegraphics[valign=t]{hardelish.jpg} & \raisebox{-4ex}{$ % need to be set according to included equation f{x} = \begin{cases} x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\ (e^{x}-1)\max(0,\min(1,\frac{x+1}{2})) &\text{ if }x< 0 \end{cases}$} & \begin{itemize} \item Hard variant of Elish \item Product of Hard Sigmoid and Elu in negative part \item Linear and hard sigmoid in positive part \end{itemize} & good \\ \hline \textbf{Hard Elish}\cite{elish} 2018 & \includegraphics[valign=t]{hardelish.jpg} & \raisebox{-4ex}{$ % need to be set according to included equation f{x} = \begin{cases} x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\ (e^{x}-1)\max(0,\min(1,\frac{x+1}{2})) &\text{ if }x< 0 \end{cases}$} & good & \begin{itemize} \item Hard variant of Elish \item Product of Hard Sigmoid and Elu in negative part \item Linear and hard sigmoid in positive part \end{itemize} \\ \hline \textbf{Hard Elish}\cite{elish} 2018 & \includegraphics[valign=t]{hardelish.jpg} & \raisebox{-4ex}{$ % need to be set according to included equation f{x} = \begin{cases} x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\ (e^{x}-1)\max(0,\min(1,\frac{x+1}{2})) &\text{ if }x< 0 \end{cases}$} & \begin{itemize} \item Hard variant of Elish \item Product of Hard Sigmoid and Elu in negative part \item Linear and hard sigmoid in positive part \end{itemize} & good \\ \hline \end{tabularx} \end{table*} % manually split table \begin{table*}[t] \ContinuedFloat \caption{Different Types of Activation Functions (cont.)} \makegapedcells % for additional vertical space around cells' contents \setkeys{Gin}{width=\linewidth,height=12mm} % all images will have width of cell's width \setlength\tabcolsep{4pt} \footnotesize % for better fit text into cells \begin{tabularx}{\linewidth}{% |*{2}{>{\raggedright}p{0.1\linewidth}|} c| *{2}{X|} } \hline \thead{Activation} & \thead{Figure} & \thead{Equation} & \thead{Advantages} & \thead{Disadvantages} \\ \hline \textbf{Hard Elish}\cite{elish} 2018 & \includegraphics[valign=t]{hardelish.jpg} & \raisebox{-4ex}{$ % need to be set according to included equation f{x} = \begin{cases} x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\ (e^{x}-1)\max(0,\min(1,\frac{x+1}{2})) &\text{ if }x< 0 \end{cases}$} & \begin{itemize} \item Hard variant of Elish \item Product of Hard Sigmoid and Elu in negative part \item Linear and hard sigmoid in positive part \end{itemize} & good \\ \hline \textbf{Hard Elish}\cite{elish} 2018 & \includegraphics[valign=t]{hardelish.jpg} & \raisebox{-4ex}{$ % need to be set according to included equation f{x} = \begin{cases} x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\ (e^{x}-1)\max(0,\min(1,\frac{x+1}{2})) &\text{ if }x< 0 \end{cases}$} & good & \begin{itemize} \item Hard variant of Elish \item Product of Hard Sigmoid and Elu in negative part \item Linear and hard sigmoid in positive part \end{itemize} \\ \hline \textbf{Hard Elish}\cite{elish} 2018 & \includegraphics[valign=t]{hardelish.jpg} & \raisebox{-4ex}{$ % need to be set according to included equation f{x} = \begin{cases} x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\ (e^{x}-1)\max(0,\min(1,\frac{x+1}{2})) &\text{ if }x< 0 \end{cases}$} & \begin{itemize} \item Hard variant of Elish \item Product of Hard Sigmoid and Elu in negative part \item Linear and hard sigmoid in positive part \end{itemize} & good \\ \hline \end{tabularx} \end{table*} \lipsum\lipsum % dummy text \end{document}
请在 MWE 上测试并告诉我们您的问题实际上是什么。另外,如果您的文档只有一列,请告知我们。在这种情况下,可以使用例如和包ltablex
的组合。longtable
tabularx
请注意,这是您的第三个类似问题,仅在用法上有所不同\documentclass
。请决定您实际将使用哪个文档类。
附录: 万一你真的需要长桌子,而且你有一列文档,然后尝试,如果以下内容给出了您想要的内容:
\documentclass[acmsmall]{acmart}
\usepackage{amsmath, amssymb}
\usepackage{caption}
\usepackage[demo,
export]{adjustbox}
\usepackage{stfloats}
\usepackage{makecell,
ltablex} % new
\keepXColumns
\setcellgapes{3pt}
\usepackage{enumitem}
\usepackage{lipsum} % for dummy text
\begin{document}
\lipsum[1-3] % dummy text
\begingroup
\setlist[itemize]{nosep, % <-- itemize setup
leftmargin = *,
before = \vspace{-.6\baselineskip},
after = \vspace{-\baselineskip}
}
\makegapedcells % for additional vertical space around cells' contents
\setkeys{Gin}{width=\linewidth,height=12mm} % all images will have width of cell's width
\setlength\tabcolsep{4pt}
\footnotesize % for better fit text into cells
\begin{tabularx}{\linewidth}{%
|*{2}{>{\raggedright\arraybackslash}p{0.1\linewidth}|}
c|
*{2}{>{\raggedright\arraybackslash}X|}
}
\caption{Different Types of Activation Functions}
\label{tab:long} \\
\hline
\thead{Activation} & \thead{Figure} & \thead{Equation}
& \thead{Advantages} & \thead{Disadvantages} \\
\hline
\endfirsthead
\caption{Different Types of Activation Functions (cont)} \\
\hline
\thead{Activation} & \thead{Figure} & \thead{Equation}
& \thead{Advantages} & \thead{Disadvantages} \\
\hline
\endhead
\multicolumn{5}{r}{\textit{continued on the next page}}
\endfoot
\endlastfoot
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{$ % need to be set according to included equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,\frac{x+1}{2})) &\text{ if }x< 0
\end{cases}$}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{$ % need to be set according to included equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,\frac{x+1}{2})) &\text{ if }x< 0
\end{cases}$}
& good
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize} \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{$ % need to be set according to included equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,\frac{x+1}{2})) &\text{ if }x< 0
\end{cases}$}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{$ % need to be set according to included equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,\frac{x+1}{2})) &\text{ if }x< 0
\end{cases}$}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{$ % need to be set according to included equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,\frac{x+1}{2})) &\text{ if }x< 0
\end{cases}$}
& good
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize} \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{$ % need to be set according to included equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,\frac{x+1}{2})) &\text{ if }x< 0
\end{cases}$}
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize}
& good \\
\hline
\textbf{Hard Elish}\cite{elish} 2018
& \includegraphics[valign=t]{hardelish.jpg}
& \raisebox{-4ex}{$ % need to be set according to included equation
f{x} = \begin{cases}
x\max(0,\min(1,(\frac{x+1}{2}))) &\text{ if }x\geqslant 0 \\
(e^{x}-1)\max(0,\min(1,\frac{x+1}{2})) &\text{ if }x< 0
\end{cases}$}
& good
& \begin{itemize}
\item Hard variant of Elish
\item Product of Hard Sigmoid and Elu in negative part
\item Linear and hard sigmoid in positive part
\end{itemize} \\
\hline
\end{tabularx}
\endgroup
\lipsum
\end{document}
结果应类似于以下内容: