Ideally, you'd be using a bibliography style file -- the argument of the \bibliographystyle
command -- that is set to recognize and process a field named "lastvisited". Which style file are you currently using?
If you can't obtain a suitable style file (extension .bst
) that processes the contents of a field named "lastvisited", you could pursue either of the following strategies:
First, you might combine the contents of the note
and lastvisited
fields into a single note
field, i.e., combine
note = {\url{http://java.sun.com/products/jlf/ed1/dg/higq.htm}},
lastvisited = {2012-03-20},
into
note = {\url{http://java.sun.com/products/jlf/ed1/dg/higq.htm}, visited 2012-03-20},
Second, if you're using a reasonably modern bib style file (i.e., which recognizes a field named url
), you could (i) change the label "note" to "url" and (ii) change the label "lastvisited" to "note" and add "visited on" to the contents of the new note
field.
url = {\url{http://java.sun.com/products/jlf/ed1/dg/higq.htm}},
note = {visited on 2012-03-20},
Addendum: Some examples of reasonably modern bib style files (i.e., which recognize a field named url
) are those that come with the natbib
package: plainnat.bst
, unsrtnat.bst
, and abbrvnat.bst
. They behave very much like the plain
, unsrt
, and abbrv
style files while recognizing five additional fields -- doi
, eid
, isbn
, issn
, and url
-- beyond the 22+ fields recognized by the original bib style files plain
, unsrt
, and abbrv
.
- 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:
Best Answer
(Too long for a comment, hence posted as an answer.)
I recommend you load the
URL
package with the optionshyphens
,spaces
, andobeyspaces
:If you load the
hyperref
package as well, be sure to load it afterurl
.