我正在尝试调整标题和其下方正文之间的垂直间距。这可能是因为软件包之间互相干扰,但我不确定是哪个。
赫伯特建议将这些命令纳入我的序言中,并且我已经完全删除了标题包,因为它似乎被floatrow
随附的包所取代chemstyle
。
\captionsetup{
justification=centering,
singlelinecheck=false,
font=small,labelfont=bf,labelsep=space}
\floatsetup{captionskip=6pt}
\renewcommand\FBbskip{20pt}
但似乎\FBbskip
只对第一幅图像浮动有影响。我已更新下面的 MWE,以便更清晰,使用\FBbskip
20pt,这样您就可以清楚地看到两种方案之间的垂直空间差异。
另外。我仍然不清楚这些设置的作用:
\captionsetup{skip=5cm}
\addtolength\belowcaptionskip{20.0cm}
\addtolength\abovecaptionskip{20.0cm}
注释掉它们似乎没有效果,将它们设置为极端值似乎也没有任何作用?我应该删除它们吗?
MWE 使用 Herbert 的解决方案,希望您能看到围绕这两种方案的垂直空间的差异?
\documentclass[11 pt]{report}
\usepackage[T1]{fontenc}
\usepackage{bera}
\usepackage[scaled]{berasans}
\usepackage[scaled]{beramono}
\usepackage{textcomp}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[left=1in, right=1in, top=.75in, bottom=.5in, includeheadfoot, headheight=13.6pt]{geometry}
\usepackage{setspace}
\usepackage{achemso}
\usepackage{graphicx}
\usepackage{times,mathptmx}
\usepackage[version=3]{mhchem}
\usepackage[runs=2]{auto-pst-pdf}
\usepackage{chemstyle}
\usepackage{chemnum}
\usepackage{chngcntr}
\usepackage{titlesec}
\usepackage{sectsty}
\usepackage{balance}
\usepackage{lastpage}
\usepackage[toc, page, header]{appendix}
\usepackage{fancyhdr}
\usepackage[plain]{fancyref}
\captionsetup{
justification=centering,
singlelinecheck=false,
font=small,labelfont=bf,labelsep=space}
\floatsetup{captionskip=6pt}
\renewcommand\FBbskip{20pt}
\linespread{1.8} %1.5 line spacing
\parindent=0pt
\parskip=8pt
\renewcommand{\captionfont}{\sffamily}{\small}
\renewcommand{\captionlabelfont}{\bf}
\renewcommand\thescheme{\arabic{scheme}}
\counterwithout{scheme}{chapter}
\renewcommand\thefigure{\arabic{figure}}
\counterwithout{figure}{chapter}
\begin{document}
\captionsetup{skip=5cm}
\addtolength\belowcaptionskip{20.0cm}
\addtolength\abovecaptionskip{20.0cm}
\onehalfspace
\chapter[Introduction]{Introduction}
\chaptermark{Introduction}
\label{ch:introduction} % label for referring to chapter in other parts of the thesis
\section[Importance]{Importance}\label{C1:Intro}
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
\begin{scheme}[ht]
\centering
\includegraphics[scale=0.2]{cat}
\caption{}
\label{scheme}
\end{scheme}
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
\begin{scheme}[ht]
\centering
\includegraphics[scale=0.2]{dog}
\caption{}
\label{scheme}
\end{scheme}
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
\end{document}
答案1
包chemscheme
加载自身包,floatrow
该包使用自己的设置控制标题上方/下方的空间:
\floatsetup{captionskip=10pt}%% space between figure and caption
\renewcommand\FBaskip{20pt}% space before float
\renewcommand\FBbskip{20pt}% space after float
您正在寻找后者。但是,在您的示例中,字体设置有点奇怪。您加载了多个字体包,这些字体包会覆盖前面的每个字体包。以下是 bera 的正确字体设置示例:
\documentclass[11pt]{report}
\usepackage[T1]{fontenc}
\usepackage{bera}
\usepackage[scaled]{berasans}
\usepackage[scaled]{beramono}
\usepackage{textcomp}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[left=1in, right=1in, top=1in, bottom=1in, includeheadfoot, headheight=13.6pt]{geometry}
\usepackage{setspace}
\usepackage{graphicx}
\usepackage{chemstyle}
\usepackage{chemnum}
\usepackage{chngcntr}
\captionsetup{
justification=centering,
singlelinecheck=false,
font=small,labelfont=bf,labelsep=space}
\floatsetup{captionskip=1cm}
\renewcommand\FBbskip{20pt}
\parindent=0pt
\parskip=8pt
\renewcommand\thescheme{\arabic{scheme}}
\counterwithout{scheme}{chapter}
\renewcommand\thefigure{\arabic{figure}}
\counterwithout{figure}{chapter}
\begin{document}
\captionsetup{skip=1cm}
\addtolength\belowcaptionskip{2cm}
\addtolength\abovecaptionskip{2cm}
\onehalfspace
\chapter[Introduction]{Introduction}
\chaptermark{Introduction}
\label{ch:introduction} % label for referring to chapter in other parts of the thesis
\section[Importance]{Importance}\label{C1:Intro}
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
\begin{scheme}
\centering
\includegraphics[scale=0.2]{cat}
\caption{foo bar baz}
\label{scheme}
\end{scheme}
How I adjust the space between this text and the caption above??Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
\end{document}