Hongyi Zhao <[email protected]> writes:

> On Mon, Aug 9, 2021 at 6:03 PM Arash Esbati <[email protected]> wrote:
>>
>> Replace
>>
>>   
>> \bibliography{\string~/Documents/bibliograph/better-bibtex/references-bibtex}
>>
>> with
>>
>>   
>> \bibliography{/home/werner/Documents/bibliograph/better-bibtex/references-bibtex.bib}
>>
>> in your .tex file and see if RefTeX finds your .bib file.
>
> No. I tried with the above revision, but the same problem still
> occurs.

For me, it works with a simple file like this on my Windows box:

    \documentclass{article}

    \usepackage{natbib}
    \bibliography{z:/path/to/test-bib-file}

    \begin{document}

    \begin{verbatim}
    (insert "\n"
            (format "%S" (symbol-value reftex-docstruct-symbol)))
    \end{verbatim}
    \end{document}

    %%% Local Variables:
    %%% mode: latex
    %%% TeX-master: t
    %%% End:

When I eval the form in the verbatim env, there is an entry like this:

    (bib "z:/path/to/test-bib-file.bib")

inserted in the buffer, hence RefTeX finds the file which is in a
different directory than the .tex file.

> BTW, I also configured the helm-bibtex as follows: [...]  And
> helm-bibtex can works well with the `\string~' variable expansion.

I don't use helm, so I can't tell.

>> Based on your use case, check RefTeX's possibilities to find files[1]
>> and try one of them.
>
> I checked the relevant settings method, but if the absolute path to
> the bib file is used, there should be needless to set anything told in
> the above documentation.

Since the absolute path version doesn't work, you could try something
else provided by RefTeX.  Otherwise you have to find the culprit in your
setup.  I don't think this is a RefTeX issue.

Best, Arash

Reply via email to