我希望对各种垂直空间命令的情境效用进行一些评估,即:\smallskip
,,,,。\medskip
\bigskip
\vspace*{value}
\\[value]
\smallskip
、、、\medskip
和\bigskip
由\vfill
组成\vspace
。
但上面的代码不会在以下代码中产生垂直空间
\documentclass{book}
\usepackage{geometry}
\geometry{ paperheight=21cm, paperwidth=21cm, left=8mm, right=8mm,
top=21mm, bottom=21mm}
\usepackage{fix-cm}
\makeatletter
\renewcommand\normalsize{%
\@setfontsize\normalsize{13pt}{15pt}
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
\abovedisplayshortskip \z@ \@plus3\p@
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
\belowdisplayskip \abovedisplayskip
\let\@listi\@listI}
\makeatother
\usepackage{bm} % makes bold arguments
\usepackage[x11names]{xcolor} % loads 317 named rgb colours
\usepackage{amsmath}
\usepackage{amsthm}
\boldmath
\renewcommand{\seriesdefault}{\bfdefault}
\newcommand\blskip{\\[0.3\baselineskip]}
\begin{document}
\normalsize
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
\section{Fourier Transform}
\begin{theorem}
[\color{blue} \textbf{Convolution Property of Fourier Transform}]
\label{convolution}
\textcolor{blue}{\bigskip This is not insterted on a new line}
\textcolor{blue}{\vspace{8pt} This does not work either}
\textcolor{blue}{\blskip This worked as intended}
The Fourier transform of the product of two functions, \( u_1(t) \)
and \( u_2(t) \), is equal to the product of the Fourier transforms
\( F(u_1) \) and \( F(u_2) \).
\end{theorem}
\end{document}
What is happening? How does the utilisation of `\\{skip}`, but the others based upon `\vspace` do not?
答案1
根据设计,定理的初始文本是内联的,amsthm
文档显示一种break
总是以新行开始的样式。
\documentclass{article}
\usepackage{amsthm,color}
\newtheoremstyle{break}%
{}{}% % Note that final punctuation is omitted.
{\itshape}{}%
{\bfseries}{}%
{\newline}{}
\theoremstyle{break}
\newtheorem{theorem}{thm}
\begin{document}
\newcommand\blskip{\\[0.3\baselineskip]}
\begin{theorem}
[\color{blue} \textbf{Convolution Property of Fourier Transform}]
\label{convolution}
\textcolor{blue}{\bigskip This is not insterted on a new line}
\textcolor{blue}{\vspace{8pt} This does not work either}
\textcolor{blue}{\blskip This worked as intended}
The Fourier transform of the product of two functions, \( u_1(t) \)
and \( u_2(t) \), is equal to the product of the Fourier transforms
\( F(u_1) \) and \( F(u_2) \).
\end{theorem}
\end{document}
\textcolor
(ulike \color
)启动一个段落和水平模式,因此您的\bigskip
(即\vspace{\bigskipamount}
)可以工作,但会增加垂直空间后该段落已分成几行并立即添加后具有包含跳过的 vadjust 节点的行,因此垂直空间出现在段落第一行之后,而不是段落之前。
相反,最后一行,忽略颜色是
\mbox{}\\[0.3\baselineskip]
因此,您会得到 parskip 空格,然后是段落的“白色”行,只有段落缩进框,然后您会得到强制换行符.3\baselineskip
。因此,它可能看起来有点像垂直空格,1.3\baselineskip
但在分页符处会表现得非常奇怪。如果页面在段落之前分页,则空白行不会像垂直空格那样被放在页面的开头。如果分页符发生在空白行之后,您将在页面的底部有一个空白行,然后空格.3\baselineskip
将被放在下一页的开头。