Bug#695733: latexmk: bibtex does not find bib file

2019-07-01 Thread Hilmar Preuße
On 12.12.12 05:47, Andres Cimmarusti wrote:

Hi Andres,

> Using a local configuration/initialization file (latexmkrc in same 
> location as .tex file), I'm passing a path option to 'kpsewhich', so 
> that it knows where to look for my bib file:
> 
> $kpsewhich = "kpsewhich -path=bibliography %S";
> 
> This is the result of invoking latexmk:
> 


> So it seems latexmk finds the bib file (or rather kpsewhich does), but 
> somehow this information is not passed to bibtex which fails 
> catastrophically (the same happens to a similar tool as latexmk called 
> rubber).
> 
I'm trying to understand your bug report.

1. I do not understand your statement "latexmk finds the bib file (or
rather kpsewhich does)". On my system (Debian unstable) the kpsewhich
command does not find your bibliography.

hille@sid:~/devel/TeXLive/open_bugs/695733 $ kpsewhich
--path=bibliography latexmk_bibtex_test
hille@sid:~/devel/TeXLive/open_bugs/695733 $

Please note that %S expands to the TeX source file, if I understand
correctly. The kpsewhich works, when all informations about the bib file
are submitted:

hille@sid:~/devel/TeXLive/open_bugs/695733 $ kpsewhich
--path=$PWD/bibliography testbib.bib
/home/hille/devel/TeXLive/open_bugs/695733/bibliography/testbib.bib
hille@sid:~/devel/TeXLive/open_bugs/695733 $

..however I don't see much gain in doing it this way. Putting $PWD into
latexmkrc does not work anyway.

2. kpsewhich is very good in finding files, when they are indexed in a
ls-lR database, which is probably not the case four your personal files.

So my understanding is that you have wrong expectations, what kpsewhich
can do for you when searching files. Submitting the subdir directly in
the TeX source file seems to be a more smart solution:

\bibliography{bibliography/testbib}

Let me know your thoughts,
  Hilmar
-- 
#206401 http://counter.li.org



signature.asc
Description: OpenPGP digital signature


Bug#695733: latexmk: bibtex does not find bib file

2012-12-11 Thread Andres Cimmarusti
Package: latexmk
Version: 1:4.24-1
Severity: important

Dear Maintainer,

Using a local configuration/initialization file (latexmkrc in same 
location as .tex file), I'm passing a path option to 'kpsewhich', so 
that it knows where to look for my bib file:

$kpsewhich = "kpsewhich -path=bibliography %S";

This is the result of invoking latexmk:

$ latexmk -pdf latexmk_bibtex_test.tex 
Latexmk: This is Latexmk, John Collins, 7 May 2011, version: 4.24.  Report 
bugs etc to John Collins 
.  Latexmk: applying rule 'pdflatex'... 
Rule 'pdflatex': Rules & subrules not known to be previously run:
   pdflatex
Rule 'pdflatex': The following rules & subrules became out-of-date:
  'pdflatex'

Run number 1 of rule 'pdflatex'


Running 'pdflatex   "latexmk_bibtex_test.tex"'

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
 restricted \write18 enabled.
entering extended mode
(./latexmk_bibtex_test.tex
LaTeX2e <2011/06/27>
Babel  and hyphenation patterns for english, dumylang, nohyphenation, lo
aded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(./latexmk_bibtex_test.aux)

LaTeX Warning: Citation `test_citation' undefined on input line 10.

No file latexmk_bibtex_test.bbl.
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
(./latexmk_bibtex_test.aux)

LaTeX Warning: There were undefined references.

 )
Output written on latexmk_bibtex_test.pdf (1 page, 14941 bytes).
Transcript written on latexmk_bibtex_test.log.
Latexmk: Citation `test_citation' undefined
Latexmk: Non-existent bbl file 'latexmk_bibtex_test.bbl'
 No file latexmk_bibtex_test.bbl.
Latexmk: Log file says output to 'latexmk_bibtex_test.pdf'
Latexmk: Found bibliography file(s) [bibliography/testbib.bib]
Latexmk: applying rule 'bibtex latexmk_bibtex_test'...
Rule 'bibtex latexmk_bibtex_test': File changes, etc:
   Non-existent destination files:
  'latexmk_bibtex_test.bbl'

Run number 1 of rule 'bibtex latexmk_bibtex_test'


Running 'bibtex  "latexmk_bibtex_test"'

This is BibTeX, Version 0.99d (TeX Live 2012/Debian)
The top-level auxiliary file: latexmk_bibtex_test.aux
I couldn't open database file testbib.bib
---line 3 of file latexmk_bibtex_test.aux
 : \bibdata{testbib
 : }
I'm skipping whatever remains of this command
The style file: unsrt.bst
I found no database files---while reading file latexmk_bibtex_test.aux
Warning--I didn't find a database entry for "test_citation"
(There were 2 error messages)
Rule 'pdflatex': File changes, etc:
   Changed files, or newly in use since previous run(s):
  'latexmk_bibtex_test.aux'
  'latexmk_bibtex_test.bbl'
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': The following rules & subrules became out-of-date:
  'pdflatex'

Run number 2 of rule 'pdflatex'


Running 'pdflatex   "latexmk_bibtex_test.tex"'

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
 restricted \write18 enabled.
entering extended mode
(./latexmk_bibtex_test.tex
LaTeX2e <2011/06/27>
Babel  and hyphenation patterns for english, dumylang, nohyphenation, lo
aded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(./latexmk_bibtex_test.aux)

LaTeX Warning: Citation `test_citation' undefined on input line 10.

(./latexmk_bibtex_test.bbl

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

) [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
(./latexmk_bibtex_test.aux)

LaTeX Warning: There were undefined references.


)
Output written on latexmk_bibtex_test.pdf (1 page, 23413 bytes).
Transcript written on latexmk_bibtex_test.log.
Latexmk: Citation `test_citation' undefined
Latexmk: Found input bbl file 'latexmk_bibtex_test.bbl'
Latexmk: Log file says output to 'latexmk_bibtex_test.pdf'
Latexmk: Found bibliography file(s) [bibliography/testbib.bib]
Latexmk: All targets (latexmk_bibtex_test.pdf) are up-to-date
Collected error summary (may duplicate other messages):
  bibtex latexmk_bibtex_test: Bibtex errors: See file 'latexmk_bibtex_test.blg'
Latexmk: Use the -f option to force complete processing.


So it seems latexmk finds the bib file (or rather kpsewhich does), but 
somehow this information is not passed to bibtex which fails 
catastrophically (the same happens to a similar tool as latexmk called 
rubber).

There's been a recent development in bibtex (version 0.99d included with 
texlive 2012) that forces it to use the option 'openout_any = p' for 
security reasons. It appears this blocks bibtex from being executed in a 
directory different from where the .tex file is.

Could this be affecting the behavior of latexmk? I've c