皇家统计学会期刊样式文件的表格对齐问题

皇家统计学会期刊样式文件的表格对齐问题

因此,我正在尝试格式化我的论文以供提交,并且JRSS-b 样式文件 (statsoc.sty)似乎严重混淆了表格。这是一个简单的例子;

\documentclass{statsoc}
\usepackage[a4paper]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{amsmath,amssymb}

\title[Short title]{Statistics Journal Style Guide}
\author[Author 1 {\it et al.}]{Author}
\address{Affiliation, City, Country.}
\email{[email protected]}


\begin{document}

\begin{abstract}
\end{abstract}
\subsection{Sample title}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.



\begin{table}
\caption{\label{tab01}A table as an example}
\centering
\fbox{%
\begin{tabular}{*{10}{c}}
\em a&\em b&\em c&\em da&\em b&\em c&\em da&\em b&\em c&\em d\\
\hline
a&b&c&da&b&c&da&b&c&d\\
a&b&c&da&b&c&da&b&c&d\\
a&b&c&da&b&c&da&b&c&d\\
a&b&c&da&b&c&da&b&c&d\\
\end{tabular}}
\end{table}

\end{document}

编译后为

在此处输入图片描述

标题在左边,表格在右边的边界外,而它们都应该居中

答案1

正如 egreg 链接的问题所建议的那样,应用以下补丁并清除辅助文件可以解决问题。

\usepackage{etoolbox}

\makeatletter
\patchcmd{\@makecaption}
  {\parbox}
  {\advance\@tempdima-\fontdimen2\font\parbox} % decrease the width!
  {}{}
\makeatother 

在 sharelatex 上,可以通过以下方式删除辅助文件清除缓存

相关内容