Generalhelp in editing bibliography style (elsart)

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
dpresv
Posts: 5
Joined: Thu Nov 27, 2008 12:30 pm

help in editing bibliography style (elsart)

Post by dpresv »

Hello, i would like to ask for some help in editing the bibliography style i am using for my thesis. I am currently using elsart-num , a style that ca be found in the elsevier site. It generally does what i want it to, but some nuisances do exist.

The output of the bibliography style is the following :

[13] G. McLean, T. Niet, S. Prince-Richard, N. Djilali, An assessment of alkaline fuel cell
technology, International Journal of Hydrogen Energy 27 (5) (2002) 507-526.

[14] M. Al-Saleh, S. Gultekin, A. Al-Zakri, H. Celiker, Eect of carbon dioxide on the
performance of Ni/PTFE and Ag/PTFE electrodes in an alkaline fuel cell, Journal of
Applied Electrochemistry 24 (6) (1994) 575-580.

[15] M. Al-Saleh, S. Gultekin, A. Al-Zakri, H. Celiker, Performance of porous nickel electrode
for alkaline H2=O2 fuel cell, International journal of hydrogen energy 19 (8)
(1994) 713-718.

What i would like it to do for me is the following :

1. exclude the blank line after each citation. i don't want them in a continuous text, i have found a way to do that. i want a new line for each citation, just not the blank line between.
2. i want to eliminate the paper title. i could simply add the title as blank like this {} but i don't want to do it cause i will probably need the title when i'm writing a paper and things like that.
3. i would like to have the style adding commas between the fields (e.g. in above posted references). the style does add commas between the fields in books and proceeedings, but not papers.
4. finally, in the text body, when the citation refers to continuous citations i'd like the style to produce it as [13-15], not [13,14,15]

i have tried to use the default styles included, but none of them was no good, if someone can link me to a style that does what i posted above i would be grateful. i have also tried to compile my own style, but i don't think that the builder let's me chose on the matters i posted above. thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

help in editing bibliography style (elsart)

Post by localghost »

Try to create your own BibTeX style by starting a shell (command prompt) and running latex on makebst from the custom-bib package. Answer the questions to come closer to your desired style.


Best regards and welcome to the board
Thorsten¹
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

help in editing bibliography style (elsart)

Post by phi »

Hello,
dpresv wrote:1. exclude the blank line after each citation. i don't want them in a continuous text, i have found a way to do that. i want a new line for each citation, just not the blank line between.
Set the length \itemsep to zero right before the bibliography:

Code: Select all

\setlength\itemsep{0pt}
dpresv wrote:2. i want to eliminate the paper title. i could simply add the title as blank like this {} but i don't want to do it cause i will probably need the title when i'm writing a paper and things like that.
3. i would like to have the style adding commas between the fields (e.g. in above posted references). the style does add commas between the fields in books and proceeedings, but not papers.
Use custom-bib as suggested.
dpresv wrote:4. finally, in the text body, when the citation refers to continuous citations i'd like the style to produce it as [13-15], not [13,14,15]
The cite package is able to handle this.
dpresv
Posts: 5
Joined: Thu Nov 27, 2008 12:30 pm

Re: help in editing bibliography style (elsart)

Post by dpresv »

ok, thanks for the answers guys, i will post some solutions i found after searching more thoroughly

for the elimination of the blank line between the references, i found this thing posted on a website and it works. i dont understand how or why but it does, i simply put it in the preabmle

\let\oldthebibliography=\thebibliography
\let\endoldthebibliography=\endthebibliography
\renewenvironment{thebibliography}[1]{%
\begin{oldthebibliography}{#1}%
\setlength{\parskip}{0ex}%
\setlength{\itemsep}{0ex}%
}%
{%
\end{oldthebibliography}%
}

for the numbering and sorting of the references, i used the natbib package, with the following options

\usepackage[comma,square,sort&compress]{natbib}

for the other two points, i'm still looking for a solution, but they are not so annoying as the above two points...
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

help in editing bibliography style (elsart)

Post by phi »

Please read our answers carefully! localghost already posted the solution several days ago, which was repeated and supplemented by me. With the help of these two answers, you would already have had enough information to solve all the problems you mentioned, without further investigation.
My first suggestion is only true for the standard LaTeX bibliography. When using natbib, use the \bibsep parameter:

Code: Select all

\setlength\bibsep{0pt}
Post Reply