我正在处理一个包含一些表格的文档。但是,当我添加表格时,长度\parskip
似乎会重置为 0。这是为什么?我该如何避免这种情况?
下面给出了我使用的代码和一个小例子。请注意,为了完整起见,我包含了我使用的每个包。我不知道问题究竟出在哪里,所以最好把所有的东西都包括进去。所以有些包本身不需要显示下面的代码。
parskip 选项在表格之前运行良好,并在表格之后重置。
\documentclass[a4paper, bibtotocnumbered,liststotoc,12pt]{scrartcl}
\makeatletter
\usepackage{apacite}
\usepackage{hyperref}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{-2.5ex\@plus -1ex \@minus -.25ex}%
{1.25ex \@plus .25ex}%
{\normalfont\normalsize\bfseries}}
\makeatother
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\usepackage{xfakebold}
\usepackage{natbib}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{setspace}
\linespread{1.25}
\setlength{\parindent}{0pt}
\setlength{\parskip}{8pt}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{xfrac}
\usepackage{calrsfs}
\DeclareMathAlphabet{\pazocal}{OMS}{zplm}{m}{n}
\usepackage[paper=a4paper,left=40mm,right=20mm,top=20mm,bottom=20mm]{geometry}
\geometry{a4paper}
\usepackage{lmodern}
\usepackage{verbatim}
\setkomafont{sectioning}{\rmfamily\bfseries\boldmath}
\usepackage[usenames,dvipsnames]{color}
\usepackage{caption}
\captionsetup{labelfont=bf}
\captionsetup[figure]{aboveskip=10pt}
\captionsetup{justification=justified,singlelinecheck=false,font=small}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{array}
\usepackage{graphicx}
\usepackage{rotating}
\usepackage{xtab}
\usepackage{float}
\usepackage{tikz}
\usetikzlibrary{positioning, shapes, arrows.meta}
\usetikzlibrary{decorations.pathreplacing, calc}
\tikzset{
answer/.style={rectangle, draw, text width=15em, text badly centered, inner sep=0pt, minimum height=4em},
inout/.style={rectangle, draw, text width=#1, text centered, rounded corners, minimum height=4em},
line/.style={-{Stealth}}
}
\usepackage{booktabs}
\begin{document}
On insensible possession oh particular attachment at excellence in. The books arose but miles happy she. It building contempt or interest children mistress of unlocked no. Offending she contained mrs led listening resembled. Delicate marianne absolute men dashwood landlord and offended. Suppose cottage between and way. Minuter him own clothes but observe country. Agreement far boy otherwise rapturous incommode favourite.
Cause dried no solid no an small so still widen. Ten weather evident smiling bed against she examine its. Rendered far opinions two yet moderate sex striking. Sufficient motionless compliment by stimulated assistance at. Convinced resolving extensive agreeable in it on as remainder. Cordially say affection met who propriety him. Are man she towards private weather pleased. In more part he lose need so want rank no. At bringing or he sensible pleasure. Prevent he parlors do waiting be females an message society.
\smallskip
\captionof{table}{Hypothesis 3}
\begin{scriptsize}
\begin{tabular*}{\columnwidth}{@{\extracolsep{\stretch{1}}}*{5}{r}@{}}
\toprule
& $Estimation$ & $Standard \ Error$ & $t\text{-}Value$ & $Pr > |t|$ \\
\midrule
x. I & 0 & 80 & 80 \\
x. II & 0 & 1 & 80 \\
x. & 0 & 0.39 & 0.02 \\
x. I & 0 & 0.00 & 0.00 \\
x. II & 0 & 0.00 & 0.13 \\
x I & (-)** & 0.39 & 0.02 \\
x II & 0 & 0.08 & 0.00 \\
x I & 0 & 0.39 & 0.02 \\
x II & 0 & 0.08 & 0.00 \\
x & 0 & 0.00 & 0.13 \\
x & 0 & 0.39 & 0.02 \\
x & 0 & 0.39 & 0.02 \\
x & 0 & 0.39 & 0.02 \\
\bottomrule
\end{tabular*}
\caption*{\textit{Notes}: TBD}
\end{scriptsize}
\bigskip
On insensible possession oh particular attachment at excellence in. The books arose but miles happy she. It building contempt or interest children mistress of unlocked no. Offending she contained mrs led listening resembled. Delicate marianne absolute men dashwood landlord and offended. Suppose cottage between and way. Minuter him own clothes but observe country. Agreement far boy otherwise rapturous incommode favourite.
Cause dried no solid no an small so still widen. Ten weather evident smiling bed against she examine its. Rendered far opinions two yet moderate sex striking. Sufficient motionless compliment by stimulated assistance at. Convinced resolving extensive agreeable in it on as remainder. Cordially say affection met who propriety him. Are man she towards private weather pleased. In more part he lose need so want rank no. At bringing or he sensible pleasure. Prevent he parlors do waiting be females an message society.
\end{document}
答案1
你可以将示例简化为
\documentclass[a4paper, bibtotocnumbered,liststotoc,12pt]{scrartcl}
\usepackage{caption}
\begin{document}
[\the\parskip]
\captionof{table}{Hypothesis 3}
\begin{scriptsize}
\caption*{\textit{Notes}: TBD}
\end{scriptsize}
\bigskip
[\the\parskip]
\end{document}
显示 的更改值\parskip
。请注意,您正在使用不应在顶层使用caption
的文档包,并且终端和日志文件会发出警告:\caption
Package caption Warning: \captionsetup{type*=...} or \captionof
(caption) outside box or environment on input line 10.
See the caption package documentation for explanation.
将代码放在任何环境甚至简单{...}
组内都会恢复组后的所有本地设置。