Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RefTeX cannot find .bib file or cross references in multifile document #10822

Open
davidpasztor opened this issue Jun 6, 2018 · 7 comments
Open
Labels
- Forum - Auto-completion LaTeX stale marked as a stale issue/pr (usually by a bot)

Comments

@davidpasztor
Copy link

davidpasztor commented Jun 6, 2018

Description :octocat:

I have a large LaTex project, which I organized into several .tex files and use \input{} in a single file to include the content of the other files. However, when editing this project from spacemacs, I run into some trouble, because spacemacs cannot find cross references from the other .tex files nor can it find citations from my .bib file at all.

Autocomplete only works for labels defined in the same .tex file when I use \ref{}, while autocomplete doesn't work at all when using \cite{}

Reproduction guide 🪲

  • Start Emacs
  • Create a LaTeX project with several .tex files and try to cross reference them/use citations.

My project structure is the following: I have a makefile in the root directory in my project and all .tex files along with the bib file is located in a subdirectory. I include the bibliography in my main .tex file using \bibliography{Texfiles/references.bib}.

Observed behaviour: 👀 💔
when using \cite{}, I receive the following error when trying to use autocomplete in a cite command:

cite: info not available, use ‘M-RET r v’ to get it.

Then if I push M-RET r v, I receive a new error:

reftex-view-cr-cite: Cannot display crossref

Calling reftex-citation results in the following error:

reftex-offer-bib-menu: No valid bibliography in this document, and no default available

Expected behaviour: ❤️ 😄
Autocomplete works by listing all available citations from the .bib file specified in the \bibliography command when using the \cite command and lists all cross references from labels from all .tex files when using the \ref command.

System Info 💻

  • OS: darwin
  • Emacs: 27.0.50
  • Spacemacs: 0.300.0
  • Spacemacs branch: develop (rev. 4980a64)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(typescript latex bibtex helm auto-completion emacs-lisp git markdown org spell-checking syntax-checking themes-megapack)
  • System configuration features: RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS
@dbrw
Copy link

dbrw commented May 9, 2019

any work around for this, @davidpasztor ?

@github-actions
Copy link

github-actions bot commented May 8, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label May 8, 2020
@github-actions github-actions bot closed this as completed Aug 6, 2020
@azouaoui-cv
Copy link

azouaoui-cv commented Feb 12, 2021

Bump!
Any update @dbrw? @davidpasztor? @syl20bnr?

@davidpasztor
Copy link
Author

@inzouzouwetrust unfortunately I haven't used spacemacs for quite a while now, so not sure if this has been fixed since.

@syl20bnr
Copy link
Owner

I'm not familiar with LaTeX so it is a bit hard to handle this kind of bug.

Can someone provide some files so we can try to reproduce this bug ?

@syl20bnr syl20bnr reopened this Mar 26, 2021
@dustiestgolf
Copy link

dustiestgolf commented Apr 14, 2021

I found that I am able to replicate this bug without needing a large latex project or even alternate files accessed via \include. I have attached a zip file with an example. The error doesn't always occur though. It seems to be happening for me on the initial citation. If I have citations already in the document when I load it I can sometimes get autocompletion help for the citations already in the document but no help on citations in the .bib file.

Specific steps for reproducing:

  • open the tex file
  • with cursor inside of the \begin{document} ... \end{document} environment press , r c
  • error should occur

Hope this helps!

@JAremko JAremko added the updated This issue has been updated since becoming stale label Apr 14, 2021
@duianto duianto removed stale marked as a stale issue/pr (usually by a bot) updated This issue has been updated since becoming stale labels Apr 14, 2021
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Forum - Auto-completion LaTeX stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

7 participants