编辑:
\documentclass[11pt,leqno]{article}
\usepackage[top=1.0in,bottom=1.0in,left=0.8in,right=0.8in]{geometry}
\addtolength{\skip\footins}{1pc plus 1pt}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{siunitx,booktabs}
\usepackage{siunitx,booktabs,caption}
\usepackage{rotating}
\newcommand{\scell}[1]{{\begin{tabular}[t]{@{}c@{}}#1\end{tabular}}}
\usepackage{amsmath,amssymb,amstext}
\usepackage{amsthm}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\renewcommand{\thetheorem}{\arabic{theorem}}
\newtheorem{proposition}{Proposition}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage{siunitx,booktabs}
\usepackage{adjustbox}
\newcommand{\header}[1]{%
\begin{tabular}[t]{@{}c@{}}#1\end{tabular}%
}
\newcommand{\theader}[1]{\smash{\header{#1}}}
\theoremstyle{definition} \newtheorem{definition}{Definition}
\usepackage{thmtools}
\usepackage{enumitem}
\usepackage{textcomp}
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{S}[1]{>{\centering\arraybackslash}m{#1}}
\newcolumntype{D}[1]{>{\raggedright\arraybackslash}m{#1}}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}m{#1}}
\newcolumntype{o}{@{}>{{}}c<{{}}@{}}
\usepackage{textcmds}
\usepackage{longtable}
\newcommand{\scell}[2][c]{%
\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}
\newcommand{\scelll}[2][l]{%
\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}}
\newcommand{\xsub}[1]{%
\mbox{\scriptsize\begin{tabular}{@{}c@{}}#1\end{tabular}}%
}
\usepackage[figuresright]{rotating}
\usepackage{soul}
\usepackage[all]{nowidow}
\usepackage{euscript}
\usepackage{epstopdf}
\usepackage{float}
\makeatletter
\g@addto@macro\@floatboxreset\centering
\makeatother
\usepackage{graphicx}
\graphicspath{{./figures/}}
\usepackage{caption}
\captionsetup[table]{labelfont={small},
labelsep=period,justification=centering,
font={small},skip=6pt}
\usepackage[draft]{hyperref}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\fontsize{20pt}{22pt}\selectfont\bf}{ }{40pt}{\thechapter. \raggedright}[]
\titleformat{name=\chapter,numberless}[display]
{\fontsize{22pt}{22pt}\selectfont\bf}{}{0pt}{
\fontsize{15pt}{16pt}\selectfont\raggedright}[]
\titlespacing{\chapter}{0pt}{0pt}{30pt}
\titlespacing{name=\chapter,numberless}{0pt}{-20pt}{30pt}
\titleformat{\section}
{\normalfont\fontsize{16pt}{17pt}
\bfseries\raggedright}{\thesection}{0.2em}{}
\titlespacing*{\section}
{0pc}{*5.6}{*1.7}[0pc]
%
\titleformat{\subsection}
{\normalfont\fontsize{14pt}{15pt}\bfseries}{\thesubsection}{0.3em}{}
\titlespacing*{\subsection}
{0pc}{*2.6}{*1.7}[0pc]
\titleformat{\subsubsection}
{\normalfont\fontsize{12}{14}\bfseries}{\thesubsubsection}{0.3em}{}
\titlespacing*{\subsubsection}
{0pc}{*2.6}{*1.7}[0pc]
\usepackage{chngcntr}
\counterwithin*{table}{section}
\counterwithin*{equation}{section}
\setcounter{secnumdepth}{1}
\renewcommand{\thesection}{\arabic{section}.}
\renewcommand{\thesubsection}{\thesection\arabic{subsection}.}
\renewcommand{\thesubsubsection}{\thesubsection\arabic{subsubsection}.}
\renewcommand{\theequation}{\thesection\arabic{equation}}
\renewcommand{\thetable}{\thesection\arabic{table}}
\makeatletter
\def\@maketitle{%
\newpage
\null
\vskip 2em%
\begin{center}%
\let \footnote \thanks
{\LARGE\bf \@title \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
%\vskip 1em%
%{\large \@date}%
\end{center}%
\par
\vskip 1.5em}
\makeatother
\newcommand{\erfc}{\operatorname{erfc}}
\newcommand{\supp}{\operatorname{supp}}
\newcommand{\cl}{\operatorname{cl}}
\newcommand{\ce}{\operatorname{ce}}
我的表格代码是:
{\renewcommand{\arraystretch}{1.3}
\tabcolsep=1.0\tabcolsep
\begin{table}[t!]\small
\caption{Tests of Hypotheses\textsuperscript{1}}
\label{t31}
\begin{tabular}{lL{60mm}S{18mm}
S{25mm}S{20mm}S{12mm}}\hline
&Tested Hypothesis &
Maintained Hypothesis&
Assigned Level of Significance
& Number of Restrictions
&$p$-value \\ \hline
%
I. &Maintained Hypotheses of the
Meta-production Function Approach
& & && \\ \hline
&Single Meta-Production Function
\& Commodity Augmentation
& Unrestricted & 0.01 & 50 & 1.00002
\\ \hline
II. &Traditionally Maintained Hypotheses &&&&\\ \hline
&(1a) Homogeneity
%
&I&0.005&3&.00000\\\hline
&(1b) Constant Returns to Scale & I+II(1a) & 0.005 & 1 & .21595 \\ \hline
&(2) Neutrality &I&0.01&42&.00115 \\\hline
&(3) Profit Maximization &I&0.01& 35 & .00000 \\ \hline
%
III. &Hypotheses on Intangible Inputs&&&& \\ \hline
&(1) No Human Capital Effect & I & 0.01 & 4 & .00000 \\ \hline
&(2) No Technical Progress &
I & 0.01 & 56 & .00000 \\ \hline
%
IV. &Hypotheses on Augmentation Levels
& & & & \\ \hline
&(1) Identical Augmentation
Levels for Tangible Capital
&I& 0.005 & 6 & .13854 \\ \hline
&(2) Identical Augmentation Levels for Labor
&I & 0.005 & 6 & .94335 \\ \hline
& (3) Identical Augmentation Levels for Human Capital
&I & 0.005 & 6 & .54661 \\ \hline
%
V. &Hypotheses on Augmentation Rates
&&&& \\ \hline
&(1) Purely Output-Augmenting\textsuperscript{3}
&I & 0.01 & 42 & .00115 \\ \hline
&(2) Purely Tangible Capital-Augmenting& I& 0.005 & 42 & .01659 \\ \hline
&(3) Purely Labor-Augmenting & I & 0.005 & 42 & .00277 \\ \hline
&(4) Purely Human Capital-Augmenting& I & 0.005 & 42 & .15363 \\ \hline
%
VI. &Test of No Oil Price Effect (1974-1985) & I & 0.01 & 28 & .01255 \\ \hline
\end{tabular}\medskip
\raggedright
{\small Notes:}
\begin{enumerate}[itemsep=0pt,
before={\fontsize{9pt}{9pt}\selectfont},label=\arabic*]
\item The variance-covariance matrix is updated successively at the non-identical production function and identical production function and commodity-augmentation stages and fixed thereafter.
\item Due to rounding.
\item The test for the hypothesis of purely output-augmenting technical progress is identical with the test for that of neutrality.
\end{enumerate}
\end{table}
}
由于某种原因,输出如下所示:
为什么会这样呢?
谢谢你!
答案1
(在 OP 发布了看似文档序言的内容后,我完全重写了答案。)
你写了,
由于某种原因,输出看起来像[这个]...为什么会这样?
看起来您的文档的序言包含定义名为的列类型的代码S
;具体来说,此定义似乎用于表格的构造。然后,最近,您似乎开始加载包siunitx
。现在碰巧的是siunitx
包还定义一个名为 的列类型S
。此外,考虑到序言中的加载顺序,列类型siunitx
的版本S
会覆盖您的定义。这就是表的输出不再符合您的要求的直接原因。
顺便说一句,您发布的表格截图只能通过告诉 LaTeX 忽略所有错误和警告消息并继续编译来生成。如果您仔细查看日志文件,就会发现 LaTeX 在列S
类型上遇到了问题。
假设您希望继续使用该siunitx
包 - 毕竟,您开始加载它是有原因的,对吧? - 我建议您选择与S
您希望在表中使用的列类型不同的字母。