0

Regarding the code I attach here, I want to change the space of the article to 1.5. When using \renewcommand{\baselinestretch}{1.5} the title also affected. What should I do?

\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}
  • Don't change the baselinestretch manually through '\renewcommand'. Rather try including '\usepackage{setspace}' and then use the command '\onehalfspacing' at the begin of your document. If that doesn't work you can wrap anything that should be in onehalf spacing inside a '\begin{spacing}{1.5} ... \end{spacing} block. – Nico Mar 11 at 8:51
2

Don't change the baselinestretch manually through \renewcommand{\baselinestretch}{1.5}. Rather include \usepackage{setspace} and use the command \onehalfspacing at the place where your document should start to be formattet in "one half spacing". If you want to have only parts of your document in between to be in "one half spacing" you can also wrap those parts inside \begin{spacing}{1.5} ... \end{spacing} blocks.

Here is a MWE based on your code:

\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}

enter image description here

| improve this answer | |
  • +1, You could also set the spacing globally via ´\usepackage[onehalfspacing]{setspace}´, that way you don't need to put the default spacing manually in your code. Accordingly, you would just put ´\begin{spacing}{1}´ around your title, bibliography or whatever else you want differently spaced. – TivV Mar 11 at 12:02
  • Sure, you are right. I think the best strategy depends on the document structure. – Nico Mar 11 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.