[biblio] Relative paths and BIBINPUTS

Tohiko Looka toh.looka at gmail.com
Mon Jun 15 20:34:49 CEST 2020


I found a strange behavior by bibtex that I am wondering if it's a bug. I
have the following structure

-- dir/
    |--- ref.bib
    |--- dir2/
-- main.tex

My main.tex file has the content

\documentclass{article}
\begin{document}
\nocite{*}
\bibliographystyle{acm}
% \bibliography{ref}   % This works
% \bibliography{dir2/../../dir/ref}  % This works
\bibliography{../dir/ref}  % This does not work
\end{document}

I also have BIBINPUTS set to "./dir".

Note that I use a relative path starting with ".." to specify that path
(the example is highly artificial to illustrate the issue, I know that what
I am doing here doesn't make sense).

Compiling with `pdflatex` and then running `bibtex`, I get that `ref`
cannot be found.

Note that specifying other paths like "ref" or "dir2/../ref" or
"dir2/../../dir/ref" works as expected. So the problem appears only when
the path starts with `..` (or `.`).

I attach an archive with the structure and a file `run.sh` that contains
the command and would illustrate the problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/biblio/attachments/20200615/1a753bda/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bibtex-bug.tar.gz
Type: application/gzip
Size: 538 bytes
Desc: not available
URL: <https://tug.org/pipermail/biblio/attachments/20200615/1a753bda/attachment.gz>


More information about the biblio mailing list.