BibTeX, biblatex and biber ⇒ How to make it Single Spacing for Each Entry,?
How to make it Single Spacing for Each Entry,?
I have a quick question:
How to make it single spacing for each bibliography entry, rather than between entries?
I know using "\setlength{\bibsep}{0pt}" can do the job of setting line spacing between entries, but how to set line spaces WITHIN each entry?
Thanks in advance.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Re: How to make it Single Spacing for Each Entry,?
the standard behaviour is normally the one that you describe; are you using a non standard document class? or doing some modifications to the interline spacing?
How to make it Single Spacing for Each Entry,?
gmedina wrote:Hi,
the standard behaviour is normally the one that you describe; are you using a non standard document class? or doing some modifications to the interline spacing?
Thank you for your quick reply, but you may misunderstand my question. My objective here is to set the line spacing WITHIN each entry to be Single-Spacing.
To be more specific, I want Single-Spacing within each entry, but Double-Spacing between entries.
"\setlength{\bibsep}{0pt}" works for line spacing between entries, but NOT for WITHIN each entry.
How to make it Single Spacing for Each Entry,?
Code: Select all
\begin{filecontents}{biblio.bib}
@book{goossens93,
author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
title = "The Latex Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
@article{greenwade93,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351"
}
@book{knuth79,
author = "Donald E. Knuth",
title = "Tex and Metafont, New Directions in Typesetting",
year = "1979",
publisher = "American Mathematical Society and Digital Press",
address = "Stanford"
}
\end{filecontents}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\makeatletter
\renewenvironment{thebibliography}[1]
{\section*{\refname}%
\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\setlength\itemsep{1\baselineskip plus2pt minus1pt}%adjust as required
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\makeatother
\begin{document}
\nocite{*}
\bibliographystyle{plain}
\bibliography{biblio}
\end{document}
How to make it Single Spacing for Each Entry,?
gmedina wrote:in the standard classes the environment thebibliography is defined internally by using a list, so you could simply modify the \itemsep length for that particular list. The following example shows this procedure in the case of the article document class (the line added was marked with the comment "%adjust as required"):
Code: Select all
\begin{filecontents}{biblio.bib} @book{goossens93, author = "Michel Goossens and Frank Mittlebach and Alexander Samarin", title = "The Latex Companion", year = "1993", publisher = "Addison-Wesley", address = "Reading, Massachusetts" } @article{greenwade93, author = "George D. Greenwade", title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})", year = "1993", journal = "TUGBoat", volume = "14", number = "3", pages = "342--351" } @book{knuth79, author = "Donald E. Knuth", title = "Tex and Metafont, New Directions in Typesetting", year = "1979", publisher = "American Mathematical Society and Digital Press", address = "Stanford" } \end{filecontents} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass{article} \makeatletter \renewenvironment{thebibliography}[1] {\section*{\refname}% \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}% \list{\@biblabel{\@arabic\c@enumiv}}% {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \setlength\itemsep{1\baselineskip plus2pt minus1pt}%adjust as required \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \renewcommand\theenumiv{\@arabic\c@enumiv}}% \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% \endlist} \makeatother \begin{document} \nocite{*} \bibliographystyle{plain} \bibliography{biblio} \end{document}
Sorry, I am using Scientific Word with "natbib" package. Do you happen to know how to edit "natbib" using your code, or is there any other way I can deal with the issue for Scientific Word?