关于我在这里附加的代码,我想将文章的空间更改为1.5。使用\renewcommand{\baselinestretch}{1.5}
标题时也会受到影响。我该怎么办?
\documentclass[11pt]{article}
\usepackage[margin=1.25in]{geometry}
\title{zxczxc zvzvzv aterial chazfgzzion rxgfxhse physicsgsdfsdfg ure of tzgdfgfgural fisfdsfds to agasdfadftheisfgsfgaon in fgfgs managfdfgsdfhctshfg sfgsfdgsfsfg}
\usepackage{lineno,hyperref}
\newcommand\degrees[1]{\ensuremath{#1^\circ}}
\bibliographystyle{elsarticle-num}
\renewcommand{\baselinestretch}{1.5}
\begin{document}
\date{}
\maketitle
vzcv zxzxc
\end{document}
答案1
不要通过 手动更改 baselinestretch \renewcommand{\baselinestretch}{1.5}
。而是在文档应开始以“半间距”格式格式化的位置包含\usepackage{setspace}
并使用该命令 \onehalfspacing
。如果您希望文档中只有部分内容以“半间距”格式排列,您也可以将这些部分包装在块内\begin{spacing}{1.5} ... \end{spacing}
。
这是基于您的代码的 MWE:
\documentclass[11pt]{article}
\usepackage[margin=1.25in]{geometry}
\title{zxczxc zvzvzv aterial chazfgzzion rxgfxhse physicsgsdfsdfg ure of tzgdfgfgural fisfdsfds to agasdfadftheisfgsfgaon in fgfgs managfdfgsdfhctshfg sfgsfdgsfsfg} \usepackage{lineno,hyperref}
\newcommand\degrees[1]{\ensuremath{#1^\circ}}
\bibliographystyle{elsarticle-num}
\usepackage{blindtext}
\usepackage{setspace}
\begin{document}
\date{} \maketitle % title is not in one half spacing
\onehalfspacing % begin of one half spacing area
\blindtext
\begin{spacing}{2} % part in between in double spacing
\blindtext
\end{spacing}
\blindtext % again in one half spacing (because we didn't change it globally)
\end{document}