auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Select and insert multiple bibliography entries into one \cite comma


From: Hongyi Zhao
Subject: Re: Select and insert multiple bibliography entries into one \cite command with regexp search.
Date: Wed, 11 Aug 2021 07:47:33 +0800

On Wed, Aug 11, 2021 at 12:40 AM Arash Esbati <arash@gnu.org> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>
> > On Mon, Aug 9, 2021 at 6:03 PM Arash Esbati <arash@gnu.org> 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.

I tried to adjust your above example according to my situation as follows:

\documentclass{article}

\usepackage{natbib}
\bibliography{/home/werner/Documents/bibliograph/better-bibtex/references-bibtex.bib}

\begin{document}


\cite{weiFirstprinciplesCharacterizationBibased2009}

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

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


Then I run xelatex and bibtex several times on the above document in
Emacs, but finally meet the following error:

##################
Running `LaTeX' on `reftex-docstruct-symbol' with ``xelatex
-file-line-error   --synctex=1 -interaction=nonstopmode
reftex-docstruct-symbol.tex''
This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2021)
(preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./reftex-docstruct-symbol.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-05-07>
(/opt/texlive/2021/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/opt/texlive/2021/texmf-dist/tex/latex/base/size10.clo))
(/opt/texlive/2021/texmf-dist/tex/latex/natbib/natbib.sty)
\bibdata{/home/werner/Documents/bibliograph/better-bibtex/references-bibtex.bib}
(./reftex-docstruct-symbol.bbl)
(/opt/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
(|extractbb --version)) (./reftex-docstruct-symbol.aux)
(/opt/texlive/2021/texmf-dist/tex/latex/base/ts1cmr.fd)

Package natbib Warning: Citation
`weiFirstprinciplesCharacterizationBibased2009' on page 1 undefined on
input line 9.


Package natbib Warning: There were undefined citations.

[1] (./reftex-docstruct-symbol.aux) )
Output written on reftex-docstruct-symbol.pdf (1 page).
SyncTeX written on reftex-docstruct-symbol.synctex.gz.
Transcript written on reftex-docstruct-symbol.log.

TeX Output finished at Wed Aug 11 07:43:44
##################



> > 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.

Thank you for your comment.

Best, Hongyi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]