BibTeX, biblatex and biberbibtex and datatool

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
mplatex
Posts: 5
Joined: Wed Aug 28, 2013 3:44 pm

bibtex and datatool

Post by mplatex »

Dear all,

I am new in this forum. I am using LaTeX on Mac Os Mountain Lion. I am trying to use the datatool package but I got errors and can't get rid of them.

I used BibDesk to create my bibliography file and then I follow the example on page 37 of the datatool user guide.

In the attached files you can see what the latex command and the bibtex command output when trying to compile the following code.

Code: Select all

\documentclass{article}
\usepackage{databib}

\begin{document}
\nocite{*}
\DTLloadbbl{mybib}{bibliografiamia}
\DTLsort{Year=descending,Month=descending}{mybib}
\DTLbibliography[\DTLbibfieldisge{Year}{2007}]{mybib}
\end{document}
What is wrong? I can't find it out.

Thank you for your help
Best Regards
Attachments
mypubs.log
(19.68 KiB) Downloaded 635 times
mypubs.blg
(1.26 KiB) Downloaded 653 times

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

bibtex and datatool

Post by nlct »

It looks as though the databib.bst file is corrupt. The extraction process from the datatool.dtx file has put \endinput at the end of the .bst file. Delete that line and try again. I'll see if I can get it fixed in the next version.

Regards
Nicola Talbot
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Re: bibtex and datatool

Post by nlct »

This problem has now been fixed in datatool version 2.17.

Regards
Nicola Talbot
mplatex
Posts: 5
Joined: Wed Aug 28, 2013 3:44 pm

bibtex and datatool

Post by mplatex »

Hi,

I tried the new released but I still have some problems.

1) the first command:

Code: Select all

latex mypubs.tex
gives a warning at line 7: Empty 'the bibliography' environment

2) the second command

Code: Select all

bibtex mypubs

does not give any errors (so this is now better than what I had before), it just gives warning saying that some reference have empty field
3) while the second latex command :

Code: Select all

latex mypubs 
give a list of red errors and the final pdf file has some problems.
For me it is still not clear if this comes from the warning of the bibtex command or there is something more.
I copied the .sty files from the data tool packages (after the having compiled it) to both the directory:
/usr/local/texlive/texmf-local/tex/latex/datatool/
and
/usr/local/texlive/2013/texmf-dist/tex/latex/datatool
This is because I do not know exactly which of the two directory is the best. Then I run the command sudo texhash ~/texmf/
Could it be this the problem?

In the attach, the new response file

Regards
Massimo
Attachments
mypubs.blg
(1.14 KiB) Downloaded 643 times
mypubs.bbl
(15.81 KiB) Downloaded 543 times
mypubs.log
(30.27 KiB) Downloaded 544 times
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

bibtex and datatool

Post by nlct »

mplatex wrote: 1) the first command:

Code: Select all

latex mypubs.tex
gives a warning at line 7: Empty 'the bibliography' environment
The bibliography will be empty the first time you compile your document as bibtex hasn't created the bibliography file yet.
2) the second command

Code: Select all

bibtex mypubs

does not give any errors (so this is now better than what I had before), it just gives warning saying that some reference have empty field

3) while the second latex command :

Code: Select all

latex mypubs 
give a list of red errors and the final pdf file has some problems.
For me it is still not clear if this comes from the warning of the bibtex command or there is something more.
Can you provide a minimal .bib file that contains a sample reference that generates the problem.

It's also easier if you just copy and paste the error messages here rather than attaching files.

The following works fine for me:

Code: Select all

    \documentclass{article}
    \usepackage{databib}

    \begin{document}
    \nocite{*}
    \DTLloadbbl{mybib}{xampl}
    \DTLsort{Year=descending,Month=descending}{mybib}
    \DTLbibliography[\DTLbibfieldisge{Year}{1986}]{mybib}
    \end{document}
(This uses the sample bibliography file "xampl.bib" that should be in all TeX distributions.)

Regards
Nicola Talbot
mplatex
Posts: 5
Joined: Wed Aug 28, 2013 3:44 pm

bibtex and datatool

Post by mplatex »

Hello,

so I investigated a bit.
1) If I use a file .bib which contains only articles (a list of 15 items) from paper review I get no problems. The script works fine.
As soon as I try to use a file .bib with proceedings then I get strange behaviour.
In the attachment I send to you a file .bib
In this file there are 2 items. If I use the file (by using the same script you suggest and that works fine also for me with as said in point 1) ) with both the two items I get several errors. If I use the file with just one of the two items inside (it does not matter which one), then I get no problems......
Of course I also have found item that give a problem anyway even if they are alone in the .bib file but I would show them next time so not to mix too many problems.

I attach the .log file where you can see the errors.
I do not know if it is convenient to copy them here, it is quite long....
but if such long text is accepted I'll do it next time..

This is the .tex I used (but I confirmed this has no problem)

Code: Select all

\documentclass{article}
    \usepackage{databib}

    \begin{document}
    \nocite{*}
    \DTLloadbbl{mybib}{soloproceeding}
    \DTLsort{Year=descending,Month=descending}{mybib}
    \DTLbibliography[\DTLbibfieldisge{Year}{2000}]{mybib}
    \end{document}
Thanks a lot
Attachments
soloproceeding.bib
(1.1 KiB) Downloaded 645 times
soloarticoli_prova.log
(13.89 KiB) Downloaded 621 times
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

bibtex and datatool

Post by nlct »

The problem is caused by the fact that you have included the "Month" field in your sort criteria:

Code: Select all

\DTLsort{Year=descending,Month=descending}{mybib}
but none of your entries have a month field. If you want to sort by the month, you must have at least one entry with a month field. For example, if I add a month field to one of the entries, say, if the .bib file now looks like:

Code: Select all

@article{Vicario:2007zz,
        Author = {Vicario, Carlo and Filippetto, D. and Bellaveglia, Marco and Gatti, Giancarlo and Ghigo, A. and others},
        Journal = {Conf.Proc.},
        Pages = {1004},
        Title = {{Drive laser system for SPARC photoinjector}},
        Volume = {C070625},
        month=jan,
        Year = {2007}}

@article{Giannessi:2007zza,
        Author = {Giannessi, L. and Quattromini, M. and Ronsivalle, C. and Bacci, A. and Rossi, A.R. and others},
        Journal = {Conf.Proc.},
        Pages = {986},
        Title = {{Comparison Between SPARC E Meter Measurements and Simulations}},
        Volume = {C070625},
        Year = {2007}}
then the code compiles fine.

If none of your entries should have a month, then remove "Month" from the sort criteria:

Code: Select all

\DTLsort{Year=descending}{mybib}
I'll see if I can get the package to give a more understandable error in the next version.

Regards
Nicola Talbot
mplatex
Posts: 5
Joined: Wed Aug 28, 2013 3:44 pm

bibtex and datatool

Post by mplatex »

Hi,

thanks! this has been fix.
Unfortunately there are some other errors coming from other items.
In the file .bib in the attachment there is just one item giving some problems.
I tried to went trough them but I just could resolve those coming from somewhere in the
''pages'' field. I just remove any pages information.
But there are other I do not know from what are caused.
Since I believed there are other items giving also different errors, do you have any suggestion howto understand easily the error messages?

I used the same code you propose for the .tex file (from previous message)

Thanks a lot

Below the .log file

Code: Select all

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) (format=latex 2013.8.23)  5 SEP 2013 20:40
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**soloarticoli_prova.tex
(./soloarticoli_prova.tex
LaTeX2e <2011/06/27>
Babel <3.9f> and hyphenation patterns for 78 languages loaded.
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/local/texlive/2013/../texmf-local/tex/latex/datatool/databib.sty
Package: databib 2013/06/28 v2.14 (NLCT)

(/usr/local/texlive/2013/../texmf-local/tex/latex/datatool/datatool.sty
Package: datatool 2013/08/29 v2.17 (NLCT)

(/usr/local/texlive/2013/texmf-dist/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2012/10/14 v2.6b package option processing (HA)

(/usr/local/texlive/2013/texmf-dist/tex/generic/xkeyval/xkeyval.tex
\XKV@toks=\toks14
\XKV@tempa@toks=\toks15
\XKV@depth=\count87
File: xkeyval.tex 2012/10/14 v2.6b key=value parser (HA)

(/usr/local/texlive/2013/texmf-dist/tex/generic/xkeyval/keyval.tex)))
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/xfor/xfor.sty
Package: xfor 2009/02/05 v1.05 (NLCT)
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/substr/substr.sty
Package: substr 2009/10/20 v1.2 Handle substrings
\c@su@anzahl=\count88
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/etex-pkg/etex.sty
Package: etex 1998/03/26 v2.0 eTeX basic definition package (PEB)
\et@xins=\count89
)
(/usr/local/texlive/2013/../texmf-local/tex/latex/datatool/datatool-base.sty
Package: datatool-base 2013/08/29 v2.17 (NLCT)

(/usr/local/texlive/2013/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2011/01/03 v2.1 e-TeX tools for LaTeX
\etb@tempcnta=\count90
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2013/01/14 v2.14 AMS math features
\@mathmargin=\skip43

For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01

(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0
\@emptytoks=\toks16
\ex@=\dimen103
))
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d
\pmbraise@=\dimen104
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 1999/12/14 v2.01 operator names
)
\inf@bad=\count91
LaTeX Info: Redefining \frac on input line 210.
\uproot@=\count92
\leftroot@=\count93
LaTeX Info: Redefining \overline on input line 306.
\classnum@=\count94
\DOTSCASE@=\count95
LaTeX Info: Redefining \ldots on input line 378.
LaTeX Info: Redefining \dots on input line 381.
LaTeX Info: Redefining \cdots on input line 466.
\Mathstrutbox@=\box26
\strutbox@=\box27
\big@size=\dimen105
LaTeX Font Info:    Redeclaring font encoding OML on input line 566.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 567.
\macc@depth=\count96
\c@MaxMatrixCols=\count97
\dotsspace@=\muskip10
\c@parentequation=\count98
\dspbrk@lvl=\count99
\tag@help=\toks17
\row@=\count100
\column@=\count101
\maxfields@=\count102
\andhelp@=\toks18
\eqnshift@=\dimen106
\alignsep@=\dimen107
\tagshift@=\dimen108
\tagwidth@=\dimen109
\totwidth@=\dimen110
\lineht@=\dimen111
\@envbody=\toks19
\multlinegap=\skip44
\multlinetaggap=\skip45
\mathdisplay@stack=\toks20
LaTeX Info: Redefining \[ on input line 2665.
LaTeX Info: Redefining \] on input line 2666.
)
(/usr/local/texlive/2013/../texmf-local/tex/latex/datatool/datatool-fp.sty
Package: datatool-fp 2013/08/29 v2.17 (NLCT)

(/usr/local/texlive/2013/texmf-dist/tex/latex/fp/fp.sty
Package: fp 1995/04/02

`Fixed Point Package', Version 0.8, April 2, 1995 (C) Michael Mehlich
(/usr/local/texlive/2013/texmf-dist/tex/latex/fp/defpattern.sty
Package: defpattern 1994/10/12
\actioncount=\count103
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/fp/fp-basic.sty
Package: fp-basic 1996/05/13
\FP@xs=\count104
\FP@xia=\count105
\FP@xib=\count106
\FP@xfa=\count107
\FP@xfb=\count108
\FP@rega=\count109
\FP@regb=\count110
\FP@regs=\count111
\FP@times=\count112
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/fp/fp-addons.sty
Package: fp-addons 1995/03/15
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/fp/fp-snap.sty
Package: fp-snap 1995/04/05
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/fp/fp-exp.sty
Package: fp-exp 1995/04/03
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/fp/fp-trigo.sty
Package: fp-trigo 1995/04/14
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/fp/fp-pas.sty
Package: fp-pas 1994/08/29
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/fp/fp-random.sty
Package: fp-random 1995/02/23
\FPseed=\count113
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/fp/fp-eqn.sty
Package: fp-eqn 1995/04/03
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/fp/fp-upn.sty
Package: fp-upn 1996/10/21
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/fp/fp-eval.sty
Package: fp-eval 1995/04/03
)))
\@dtl@toks=\toks21
\@dtl@tmpcount=\count114
\dtl@tmplength=\skip46
\dtl@sortresult=\count115
\@dtl@numgrpsepcount=\count116
\@dtl@datatype=\count117
\dtl@codeA=\count118
\dtl@codeB=\count119
\@dtl@foreach@level=\count120
)
\dtlcolumnnum=\count121
\dtlrownum=\count122
\@dtl@before=\toks22
\@dtl@after=\toks23
\@dtl@colhead=\toks24
\dtlcurrentrow=\toks25
\dtlbeforerow=\toks26
\dtlafterrow=\toks27
\dtlforeachlevel=\count123
\c@DTLrowi=\count124
\c@DTLrowii=\count125
\c@DTLrowiii=\count126
\c@DTLrow=\count127
\dtl@rowi=\count128
\dtl@rowii=\count129
\dtl@rowiii=\count130
\@dtl@curi=\toks28
\@dtl@previ=\toks29
\@dtl@nexti=\toks30
\@dtl@curii=\toks31
\@dtl@previi=\toks32
\@dtl@nextii=\toks33
\@dtl@curiii=\toks34
\@dtl@previii=\toks35
\@dtl@nextiii=\toks36
\@dtl@elements=\count131
\@dtl@list=\toks37
\@dtl@rowa=\toks38
\@dtl@rowb=\toks39
\@dtl@toksA=\toks40
\@dtl@toksB=\toks41
\@dtl@write=\write3
\@dtl@read=\read1
\dtl@entrycr=\count132
\dtl@omitlines=\count133
)
\dtl@widest=\skip47
\c@DTLbibrow=\count134
\@dtl@authorcount=\count135
\c@DTLmaxauthors=\count136
\c@DTLmaxeditors=\count137
)
(./soloarticoli_prova.aux)
\openout1 = `soloarticoli_prova.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
\dtldb@mybib=\toks42
\dtlkeys@mybib=\toks43
\dtlrows@mybib=\count138
\dtlcols@mybib=\count139
 (./soloarticoli_prova.bbl
! Argument of \DTLnewbibitem has an extra }.
<inserted text> 
                \par 
l.7 ...ons}}\DTLnewbibitem {Journal}\DTLnewbibitem
                                                   {Year}{2007%
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

Runaway argument?
! Paragraph ended before \DTLnewbibitem was complete.
<to be read again> 
                   \par 
l.7 ...ons}}\DTLnewbibitem {Journal}\DTLnewbibitem
                                                   {Year}{2007%
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

Runaway argument?
{
! Paragraph ended before \DTLsplitstring was complete.
<to be read again> 
                   \par 
l.7 ...ons}}\DTLnewbibitem {Journal}\DTLnewbibitem
                                                   {Year}{2007%
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

! Too many }'s.
\DTLsubstitute ...DTLsplitstring \expandafter {#1}
                                                  {#2}{\@dtl@beforepart }{\@...
l.7 ...ons}}\DTLnewbibitem {Journal}\DTLnewbibitem
                                                   {Year}{2007%
You've closed more groups than you opened.
Such booboos are generally harmless, so keep going.

Runaway argument?
{
! Paragraph ended before \DTLsplitstring was complete.
<to be read again> 
                   \par 
l.7 ...ons}}\DTLnewbibitem {Journal}\DTLnewbibitem
                                                   {Year}{2007%
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

! Too many }'s.
\DTLsubstitute ...DTLsplitstring \expandafter {#1}
                                                  {#2}{\@dtl@beforepart }{\@...
l.7 ...ons}}\DTLnewbibitem {Journal}\DTLnewbibitem
                                                   {Year}{2007%
You've closed more groups than you opened.
Such booboos are generally harmless, so keep going.

Runaway argument?
{
! Paragraph ended before \DTLsplitstring was complete.
<to be read again> 
                   \par 
l.7 ...ons}}\DTLnewbibitem {Journal}\DTLnewbibitem
                                                   {Year}{2007%
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

! Too many }'s.
\DTLsubstitute ...DTLsplitstring \expandafter {#1}
                                                  {#2}{\@dtl@beforepart }{\@...
l.7 ...ons}}\DTLnewbibitem {Journal}\DTLnewbibitem
                                                   {Year}{2007%
You've closed more groups than you opened.
Such booboos are generally harmless, so keep going.

Runaway argument?
! Paragraph ended before \@dtl@checknumericalstart was complete.
<to be read again> 
                   \par 
l.7 ...ons}}\DTLnewbibitem {Journal}\DTLnewbibitem
                                                   {Year}{2007%
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

! Undefined control sequence.
<argument> ...checknumericalstart \@dtl@tmp \@nil 
                                                  \@nil 
l.7 ...ons}}\DTLnewbibitem {Journal}\DTLnewbibitem
                                                   {Year}{2007%
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> ...umericalstart \@dtl@tmp \@nil \@nil 
                                                  
l.7 ...ons}}\DTLnewbibitem {Journal}\DTLnewbibitem
                                                   {Year}{2007%
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

)

LaTeX Warning: Empty `thebibliography' environment on input line 9.

[1

] (./soloarticoli_prova.aux) ) 
Here is how much of TeX's memory you used:
 3244 strings out of 493316
 41145 string characters out of 6137930
 146533 words of memory out of 5000000
 6681 multiletter control sequences out of 15000+600000
 4540 words of font info for 17 fonts, out of 8000000 for 9000
 957 hyphenation exceptions out of 8191
 53i,4n,31p,861b,213s stack positions out of 5000i,500n,10000p,200000b,80000s

Output written on soloarticoli_prova.dvi (1 page, 592 bytes).
Attachments
soloproceeding.bib
(563 Bytes) Downloaded 603 times
Last edited by cgnieder on Sun Sep 15, 2013 8:09 pm, edited 1 time in total.
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Re: bibtex and datatool

Post by nlct »

The problem is caused by the missing journal field in the bib entry. Add in the title of the journal for that article, remove the .bbl file and retry. If the article isn't in a journal then you need to use a different entry type.

Regards
Nicola Talbot
mplatex
Posts: 5
Joined: Wed Aug 28, 2013 3:44 pm

Re: bibtex and datatool

Post by mplatex »

Hi,

yes, finally all the others problems rose from missing field in the .bib entries.
I have corrected them all by hands and now it looks everything fine.
Thanks a lot for helping
Post Reply