bibtex2html [options] [file.bib]where the possible options are described below and where file.bib is the name of the BibTeX file, which must have a .bib suffix. If this file is not given, then entries are input from standard input.
-nobibsource
is selected or input is standard input, see below) :
--output
is not given,
the first file is output to standard output, and the second is not
created.\url
LaTeX macro is used in the text; \url
as HeVeA's one, i.e. with two
arguments, the first one being the url and the second one the text
to print. The default behavior is to interpret the macro \url
as the one from the package url, which has only one
argument (the url itself).bib2bib
. _bib.html
file. In that case, no “BibTeX
entry” link are inserted in the HTML file.-
, then the
standard output is selected.bib2bib [options] file1.bib ⋯ filen.bibwhere the possible options are described below and where file1.bib ⋯ filen.bib are the names of the BibTeX files, which must have a .bib suffix. If no files at all are given on the command line, then input is taken from standard input.
-citefile
to bibtex2html
.bib2bib -oc citefile -ob bibfile.bib -c condition file1.bib file2.bib ...which will produce exactly the HTML file for the selected references. Notice finally that bibtex2html will expand the strings (by default, unless you specify the
bibtex2html -citefile citefile bibfile.bib
-noexpand
option) but not
the cross-references. and
c2 (or c1 &
c2) ;
or
c2 (or c1 |
c2);
not
c (or
!
c) ;
exists
f
(or ?
f) where f is a field name ;
$key
which corresponds to the key of
an entry.
$type
which corresponds to the type
of an entry (ARTICLE, INPROCEEDINGS, etc.). Notice that an entry
type is always written in uppercase letters.
$key
. So usually
you need to put conditions inside quote characters that forbid shell
interpretation: single quotes under Unix shell, or double quotes under
Microsoft Windows shell. This is why strings in conditions may be put
indifferently between single or double quotes: you will use the ones
which are not the ones you use to forbid shell interpretation. In
examples below, we will use Unix convention, so under Windows you have
to permute the use of single and double quotes.$^.*+?[]
matches itself, see
Table ?? for the meaning of the special characters.
Notice that if several conditions are given with option
.
matches any character except newline [..]
character set; ranges are denoted with -
, as in[a-z]
; an initial^
, as in[^0-9]
, complements the set^
matches the beginning of the string matched $
matches the end of the string matched \r
matches a carriage return \n
matches a linefeed \t
matches a tabulation \b
matches word boundaries \
dddmatches character with ASCII code ddd in decimal \
charquotes special character char among $^.*+?[]\
regexp *
matches regexp zero, one or several times regexp +
matches regexp one or several times regexp ?
matches regexp once or not at all regexp1 \|
regexp2alternative between two regular expressions, this operator has low priority against *
,+
and?
\(
regexp\)
grouping regular expression
Table 1: Syntax of regular expressions
-c
on
the command line, then they are understood as the conjunction of them,
in other words
bib2bib -c 'c1' ⋯ -c 'cn'is equivalent to
bib2bib -c 'c1 and ⋯ and cn'Table ?? shows a formal grammar for conditions.
Cond → Cond and
Cond ∣ Condor
Cond ∣not
Cond ∣exists
IdCond → Cond &
Cond ∣ Cond|
Cond ∣!
Cond ∣?
Id∣ Expr Comp Expr ∣ Expr :
String ∣(
Cond)
Comp → =
∣>
∣<
∣>=
∣<=
∣<>
Expr → Id ∣ String ∣ Int ∣ $key
∣$type
Id → [ a
−z
A
−Z
]+String → "
([^"\
] ∣\"
∣\\
)*"
∣'
([^'\
] ∣\'
∣\\
)*'
Integer → [ 0
−9
]+
Table 2: Syntax of conditions
bib2bib
, these are always converted to uppercase, so you may
take this into account when writting conditions (see below).
title : "Computer"
may return true
if the title
contains the word Computer
with a capital letter, whereas
title : "computer"
would return false
.
$type = "INPROCEEDINGS"
,
otherwise the condition would be always false.
not (f = "value")
and f <> "value"
are not equivalent: for an
entry that does not have a field f
, the first condition is true
whereas the second is false.
not
has higher priority than and
, which itself
has higher priority than or
. and
and or
associate to
the left.
>
, <
, >=
and <=
may only be
used between integer values. In any other case, a warning is displayed and
the result is false.
"Filli\^atre"
, "Filli{\^a}tre"
,
"Filli\^{a}tre"
and "Filliātre"
are considered
identical. Note that when using such a string as a regular expression,
there is no need to escape the backslash, since interpretation of
LaTeX accenting commands is made before interpretation into a
regexp.
biblio1.bib
and
biblio2.bib
, and select only entries that appeared in 1999 :
bib2bib -oc cite1999 -ob 1999.bib -c 'year=1999' biblio1.bib biblio2.bibThe resulting file
cite1999
contains the list of keys
selected. You can then produce the HTML file by
bibtex2html -citefile cite1999 1999.bibYou may also select references appeared after and/or before a given year. For example, references after 1997:
bib2bib -oc citeaft1997 -ob aft1997.bib -c 'year>1997' biblio.bibor between 1990 and 1995:
bib2bib -oc cite90-95 -ob 90-95.bib -c 'year>=1990 and year<=1995' biblio.bib
biblio.bib
and select
only entries whose (co)author is Donald Knuth:
bib2bib -oc knuth-citations -ob knuth.bib -c 'author : "Knuth"' biblio.bibMore complicated, if you would like to have only the references whose author is Knuth only, you may try
bib2bib -oc knuth-citations -ob knuth.bib \ -c 'author : "^\(Donald \(E. \)?Knuth\|Knuth, Donald \(E.\)?\)$"' biblio.bibor equivalently but missing the possible “
E.
”:
bib2bib -oc knuth-citations -ob knuth.bib -c 'author = "Donald Knuth" or author = "Knuth, Donald"' biblio.bib
bib2bib -oc lambda -c 'year >= 1995 and title : "lambda.*calculus"' biblio.bibfor example, it will select a title containing
$\lambda$-calculus
. bib2bib
as the effect of merging several bib files into a
single one. This process may result in duplicate entries in the
resulting files, which is considered as erroneous by bibtex
.
Of course, this is not really a bug of bib2bib
since it is of
your own to take care not having entries with the same key. bib2bib
behaves correctly in such a case,
it is designed as follows: for repeated abbrevs, the first abbrev is kept and
the others are ignored, and for repeated regular entries, the last entry
is kept and the others are ignored. With this behaviour, everything
works well as soon as repeated abbrevs are really duplicate abbrevs of
the same sentence, and repeated keys are really duplicate
entries. aux2bib file.auxThe BibTeX file is written on the standard output.
-citefile
to give
the exact list of entries you want to see. If a cross-reference is
not in that list, then its fields will be expanded into all entries
that cross-refers to it. (Technically, this work because bibtex2html
calls bibtex with option -min-crossrefs=1000
by default.)bib2bib -oc knuth-citations -ob knuth.bib -c 'author : "Knuth"' biblio.bibI get "Lexical error in condition: Unterminated string". What's going wrong?
bib2bib
under Microsoft Windows, hence
you should permute the use of single quotes and double quotes, as
explained in Section ??:
bib2bib -oc knuth-citations -ob knuth.bib -c "author : 'Knuth'" biblio.bib
This document was translated from LATEX by HEVEA.