Discussion:
[Ling-TeX] how to remove line breaking between bibliography entries using bibtex?
Christos Vlachos
2016-11-11 11:02:16 UTC
Permalink
Hi,

does anybody know how to remove line breaks among bibliography entries using bibtex? I’m using linquiry2.bst with natbib. Here is a MWE:

Instead of:

Bibliography entry 1

Bibliography entry 2

etc.

I would like:

Bibliography entry 1. Bibliography entry 2. etc


Many thanks in advance,

christos
Arnold, Doug
2016-11-11 12:08:26 UTC
Permalink
This is easy if you are prepared to do some hacking with the .bst file.

1. put a copy of linquiry2.bst in the same directory as your document
2. in this copy you will probably find some lines that look like this:

FUNCTION {output.bibitem}
{ newline$
"\bibitem{" write$

These define what bibtex outputs for each bibitem -- as you can see, it outputs a newline, and a "\bibitem{"

Replace those lines with:

FUNCTION {output.bibitem}
{
"\relax {" write$

There is no doubt a much more elegant way to do this (I think this will look terrible, but it is your document).

Best
Doug
Post by Christos Vlachos
Hi,
Bibliography entry 1
Bibliography entry 2
etc.
Bibliography entry 1. Bibliography entry 2. etc
Many t
Christos Vlachos
2016-11-11 12:38:41 UTC
Permalink
Many thanks Doug. If nothing else comes up, I’ll try this out.

Best

christos
Post by Arnold, Doug
This is easy if you are prepared to do some hacking with the .bst file.
1. put a copy of linquiry2.bst in the same directory as your document
FUNCTION {output.bibitem}
{ newline$
"\bibitem{" write$
These define what bibtex outputs for each bibitem -- as you can see, it outputs a newline, and a "\bibitem{"
FUNCTION {output.bibitem}
{
"\relax {" write$
There is no doubt a much more elegant way to do this (I think this will look terrible, but it is your document).
Best
Doug
Post by Christos Vlachos
Hi,
Bibliography entry 1
Bibliography entry 2
etc.
Bibliography entry 1. Bibliography entry 2. etc
Many thanks in advance,
christos
--
Dr Christos VLACHOS
Marie Skłodowska-Curie Fellow
Department of Linguistics, SLLF
Queen Mary University of London
https://sites.google.com/site/crsvlachos
Joost Kremers
2016-11-11 13:03:45 UTC
Permalink
Post by Christos Vlachos
Hi,
does anybody know how to remove line breaks among bibliography
entries using bibtex? I’m using linquiry2.bst with natbib. Here
Bibliography entry 1
Bibliography entry 2
etc.
Bibliography entry 1. Bibliography entry 2. etc
If this is for an abstract, then you might try googling for
something like 'compact bibliography latex', though when I've
needed such a compact list of references in the past, there never
seemed to be much except ad-hoc solutions.

There is a similar question and some discussion plus a proposed
solution here:

http://bibdesk-users.661331.n2.nabble.com/Very-compact-bibliography-styles-td1332196.html

HTH
--
Joost Kremers
Life has its moments
Arnold, Doug
2016-11-11 13:48:31 UTC
Permalink
My solution prints the bibtex key as well as the entry. To fix this, you should also redefine \bibitem; but if all you want to do is save space in the bibliography, you eliminate the space between items by something like:

\setlength{\bibsep}{0pt}

each entry will start on its own line, but with no vertical space between them.

\setlength{\bibsep}{0.5\baselineskip}

entries will have half a normal line space between them.

This something I often play with when trying to stay within page limits.

\bibsep is the length used by natbib.sty; I don’t know what it would be in other packages, but it should be easy enough to find out (and no need to mess around with .bst files)

Best
Doug
Post by Christos Vlachos
Hi,
Bibliography entry 1
Bibliography entry 2
etc.
Bibliography entry 1. Bibliography entry 2. etc
If this is for an abstract, then you might try googling for something like 'compact bibliography latex', though when I've needed such a compact list of references in the past, there never seemed to be much except ad-hoc solutions.
http://bibdesk-users.661331.n2.nabble.com/Very-compact-bibliography-styles-td1332196.html
HTH
--
Joost Kremers
Life has its mome
Christos Vlachos
2016-11-11 15:12:39 UTC
Permalink
Indeed this is for an abstract. Many thanks for all recommendations!

Best,

christos
Post by Arnold, Doug
\setlength{\bibsep}{0pt}
each entry will start on its own line, but with no vertical space between them.
\setlength{\bibsep}{0.5\baselineskip}
entries will have half a normal line space between them.
This something I often play with when trying to stay within page limits.
\bibsep is the length used by natbib.sty; I don’t know what it would be in other packages, but it should be easy enough to find out (and no need to mess around with .bst files)
Best
Doug
Post by Christos Vlachos
Hi,
Bibliography entry 1
Bibliography entry 2
etc.
Bibliography entry 1. Bibliography entry 2. etc
If this is for an abstract, then you might try googling for something like 'compact bibliography latex', though when I've needed such a compact list of references in the past, there never seemed to be much except ad-hoc solutions.
http://bibdesk-users.661331.n2.nabble.com/Very-compact-bibliography-styles-td1332196.html
HTH
--
Joost Kremers
Life has its moments
Gerhard Schaden
2016-11-11 16:14:56 UTC
Permalink
If you do not object to biblatex (which you can use with BibTeX), you can do
the following, which is what I use for my abstracts:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{paralist,setspace}

\usepackage[backend=bibtex,
firstinits=true,
uniquename=init,
autopunct=true,
natbib=true,
style=authoryear-icomp,
dashed=false,
doi=false,
url=false]{biblatex}

\bibliography{/path/to/your/bibliography}


\defbibenvironment{bibliography}{% begin code
\footnotesize % sets the size, but does not adapt line spacing
\pointlessenum
\begin{inparaenum}
\renewcommand\makelabel[1]{ [##1]}}
{\end{inparaenum}} % end code
{\item} % item code

\begin{document}

\citet{author2012}

\setstretch{0.8}
\renewcommand{\refname}{}
\printbibliography

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

You can continue to use all the familiar natbib cite-commands, and your
standard bib-file.

Best,

Gerhard
Post by Christos Vlachos
Indeed this is for an abstract. Many thanks for all recommendations!
Best,
christos
Post by Arnold, Doug
My solution prints the bibtex key as well as the entry. To fix this, you
should also redefine \bibitem; but if all you want to do is save space in
the bibliography, you eliminate the space between items by something
\setlength{\bibsep}{0pt}
each entry will start on its own line, but with no vertical space between them.
\setlength{\bibsep}{0.5\baselineskip}
entries will have half a normal line space between them.
This something I often play with when trying to stay within page limits.
\bibsep is the length used by natbib.sty; I don’t know what it would be in
other packages, but it should be easy enough to find out (and no need to
mess around with .bst files)
Best
Doug
Post by Christos Vlachos
Hi,
does anybody know how to remove line breaks among bibliography entries
Bibliography entry 1
Bibliography entry 2
etc.
Bibliography entry 1. Bibliography entry 2. etc
If this is for an abstract, then you might try googling for something
like 'compact bibliography latex', though when I've needed such a
compact list of references in the past, there never seemed to be much
except ad-hoc solutions.
http://bibdesk-users.661331.n2.nabble.com/Very-compact-bibliography-style
s-td1332196.html
HTH
Christos Vlachos
2016-11-11 16:43:03 UTC
Permalink
Cheers! It does the trick.

Best,

christos
Post by Gerhard Schaden
If you do not object to biblatex (which you can use with BibTeX), you can do
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{paralist,setspace}
\usepackage[backend=bibtex,
firstinits=true,
uniquename=init,
autopunct=true,
natbib=true,
style=authoryear-icomp,
dashed=false,
doi=false,
url=false]{biblatex}
\bibliography{/path/to/your/bibliography}
\defbibenvironment{bibliography}{% begin code
\footnotesize % sets the size, but does not adapt line spacing
\pointlessenum
\begin{inparaenum}
\renewcommand\makelabel[1]{ [##1]}}
{\end{inparaenum}} % end code
{\item} % item code
\begin{document}
\citet{author2012}
\setstretch{0.8}
\renewcommand{\refname}{}
\printbibliography
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
You can continue to use all the familiar natbib cite-commands, and your
standard bib-file.
Best,
Gerhard
Post by Christos Vlachos
Indeed this is for an abstract. Many thanks for all recommendations!
Best,
christos
Post by Arnold, Doug
My solution prints the bibtex key as well as the entry. To fix this, you
should also redefine \bibitem; but if all you want to do is save space in
the bibliography, you eliminate the space between items by something
\setlength{\bibsep}{0pt}
each entry will start on its own line, but with no vertical space between them.
\setlength{\bibsep}{0.5\baselineskip}
entries will have half a normal line space between them.
This something I often play with when trying to stay within page limits.
\bibsep is the length used by natbib.sty; I don’t know what it would be in
other packages, but it should be easy enough to find out (and no need to
mess around with .bst files)
Best
Doug
Post by Christos Vlachos
Hi,
does anybody know how to remove line breaks among bibliography entries
Bibliography entry 1
Bibliography entry 2
etc.
Bibliography entry 1. Bibliography entry 2. etc
If this is for an abstract, then you might try googling for something
like 'compact bibliography latex', though when I've needed such a
compact list of references in the past, there never seemed to be much
except ad-hoc solutions.
http://bibdesk-users.661331.n2.nabble.com/Very-compact-bibliography-style
s-td1332196.html
HTH
Gerhard Schaden
2016-11-11 16:01:16 UTC
Permalink
If you do not object to biblatex (which you can use with BibTeX), you can do
the following, which is what I use for my abstracts:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{paralist,setspace}

\usepackage[backend=bibtex,
firstinits=true,
uniquename=init,
autopunct=true,
natbib=true,
style=authoryear-icomp,
dashed=false,
doi=false,
url=false]{biblatex}

\bibliography{/path/to/your/bibliography}


\defbibenvironment{bibliography}{% begin code
\footnotesize % sets the size, but does not adapt line spacing
\pointlessenum
\begin{inparaenum}
\renewcommand\makelabel[1]{ [##1]}}
{\end{inparaenum}} % end code
{\item} % item code

\begin{document}

\citet{author2012}

\setstretch{0.8}
\renewcommand{\refname}{}
\printbibliography

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

You can continue to use all the familiar natbib cite-commands, and your
standard bib-file.

Best,

Gerhard
Post by Christos Vlachos
Indeed this is for an abstract. Many thanks for all recommendations!
Best,
christos
Post by Arnold, Doug
My solution prints the bibtex key as well as the entry. To fix this, you
should also redefine \bibitem; but if all you want to do is save space in
the bibliography, you eliminate the space between items by something
\setlength{\bibsep}{0pt}
each entry will start on its own line, but with no vertical space between them.
\setlength{\bibsep}{0.5\baselineskip}
entries will have half a normal line space between them.
This something I often play with when trying to stay within page limits.
\bibsep is the length used by natbib.sty; I don’t know what it would be in
other packages, but it should be easy enough to find out (and no need to
mess around with .bst files)
Best
Doug
Post by Christos Vlachos
Hi,
does anybody know how to remove line breaks among bibliography entries
Bibliography entry 1
Bibliography entry 2
etc.
Bibliography entry 1. Bibliography entry 2. etc
If this is for an abstract, then you might try googling for something
like 'compact bibliography latex', though when I've needed such a
compact list of references in the past, there never seemed to be much
except ad-hoc solutions.
http://bibdesk-users.661331.n2.nabble.com/Very-compact-bibliography-style
s-td1332196.html
HTH
Loading...