- To start, there are several things wrong with your
bib
file. Following the BibTeX manual, the book
entry requires year, and author or editor. So I suggest to turn the first three entries into manual
, which just requires title
.
- For those manuals, in particular when the
author
is missing, one should provide a key
entry that BibTeX can use to sort the entries, and that is sometimes shown instead of the author (depends on the style).
- I would also change the
publisher
fields of the manuals into organization
fields, as those are optional fields of manual
, while publisher
is not.
The resulting database would then look like:
@manual{GAMSCPLEX,
key = {GAMS/CPLEX},
organization = {GAMS Development Corporation},
title = {{GAMS/CPLEX} 10 Solver Manual},
url = {http://www.gams.com/dd/docs/solvers/cplex.pdf}
},
@manual{GAMSSBB02,
key = {GAMS/SBB},
address = {Washington, DC},
organization = {GAMS Development Corporation},
title = {{GAMS/SBB} Solver Manual},
url = {http://www.gams.com/dd/docs/solvers/sbb.pdf},
year = {2002}
},
@manual{GAMSCONOPT,
key = {GAMS/CONOPT},
address = {Bagsvaerd},
author = {Drud, A.},
organization = {{ARKI} Consulting and Development},
title = {{GAMS/CONOPT} Solver Manual},
url = {http://www.gams.com/dd/docs/solvers/conopt.pdf}
},
@article{Chou2006,
author = {Chou, C. Y. and Chen, C. H.},
journal = {Expert Systems with Applications},
number = {2},
pages = {233--242},
title = {Economic design of variable sampling intervals {$T^2$} control charts using genetic algorithms},
volume = {30},
year = {2006}
},
@article{DRUZOVEC98,
address = {Ljubljana (Slovenija-Slovenia)},
author = {Dru\v{z}ovec, M. and \v{S}ostar, A. and Godina, A.},
journal = {Strojni{\v{s}}ki Vestnik-Journal of Mechanical Engineering},
number = {1-2},
pages = {29--34},
title = {{MPC} process control procedure},
volume = {44},
year = {1998}
}
Regarding the empty parentheses for non-existing years I have three suggestions:
- Remove the
yr-par
option from your dbj
file to remove all parentheses around years. (maybe not an option for you)
- Just provide a year! If you use a specific version of, say, GAMS/CPLEX, look up its release date, and use that. It is reasonable to assume that the manual was released alongside the software release. (maybe not an option for you)
bst
hackery: Although year
is an optional field of manual
, your style file does not check properly if the year is present. This is a bug in custom-bib
. To circumvent it, add the indicated five lines to your style file, in function format.date
:
FUNCTION {format.date}
{ year "year" bibinfo.check duplicate$ empty$
{
}
'skip$
if$
extra.label *
before.all 'output.state :=
duplicate$ empty$ %% added
{ pop$ "{}" } %% added
{ %% added
" (" swap$ * ")" *
} %% added
if$ %% added
}
In principle, this could be added to merlin.mbs
, to fix all derived styles. With this hack, and the proposed changes to your database, I get:
Removing the brackets from the item's label in the bibliography
To remove the brackets from the item's label in the bibliography, you just need to redefine \@biblabel
. It's original definition is
% latex.ltx, line 6161:
\def\@biblabel#1{[#1]}
So you can change it with \renewcommand
to print, instead of [<arg>]
, <arg>.
:
\makeatletter
\renewcommand\@biblabel[1]{#1.}
\makeatother
Removing the hanging indent in the bibliography
We must redefine thebibliography
environment, which is a \list
. To make things easy, I checked the definition of asparaenum
environment, from the paralist
package and reproduced the lenghts in the thebibliography
environment (which we need to redefine). Assuming you're working with article
class:
\makeatletter
\renewenvironment{thebibliography}[1]
{\section*{\refname}%
\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m
% We redefine the lenghts here
\setlength{\labelwidth}{0pt}
\setlength{\labelsep}{.5em}
\setlength{\leftmargin}{0pt}
\parsep\parskip
\setlength{\itemsep}{0pt}
\setlength{\topsep}{0pt}
\partopsep\parskip
\itemindent\parindent
\advance\itemindent\labelsep
}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\makeatother
Here's a MWE:
\documentclass{article}
\begin{filecontents}{\jobname.bib}
@article{Geddes:2003,
author = {Geddes, Chris D. and
Parfenov, Alex and
Gryczynski, Ignacy and
Lakowicz, Joseph R.},
title = {Luminescent Blinking from Silver Nanostructures},
journal = {The Journal of Physical Chemistry B},
volume = {107},
number = {37},
pages = {9989-9993},
year = {2003},
}
\end{filecontents}
\makeatletter
\renewcommand{\@biblabel}[1]{#1.}
% article.cls, line 570:
\renewenvironment{thebibliography}[1]
{\section*{\refname}%
\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m
% We redefine the lenghts here
\setlength{\labelwidth}{0pt}
\setlength{\labelsep}{.5em}
\setlength{\leftmargin}{0pt}
\parsep\parskip
\setlength{\itemsep}{0pt}
\setlength{\topsep}{0pt}
\partopsep\parskip
\itemindent\parindent
\advance\itemindent\labelsep
}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\makeatother
\begin{document}
\cite{Geddes:2003}
\bibliographystyle{plain}
\bibliography{\jobname}
\end{document}
And the output:
Best Answer
Good news: You needn't edit your bespoke bibliography style file. It suffices to issue the instruction
somewhere in the preamble. After making this change, be sure to re-run LaTeX, BibTeX, and LaTeX twice more to fully propagate the change.
If you wanted to edit the bst file, you could proceed as follows: Open the bst file in an editor and locate the function
format.url
. It should look like this:Delete the substring
\urlprefix
. Then, save the bst file and rerun BibTeX and LaTeX. If, instead, themakebst
utility created a function calledwrite.url
, simply delete the substring\urlprefix
from that function.