Giter Club home page Giter Club logo

Comments (7)

lervag avatar lervag commented on August 16, 2024

Interesting. I'll look into this when I get some time. My first thought is that this is a deeper issue, and one that I might not be able to fix - it seems related to another issue I've seen with the completion system.

from vimtex.

lervag avatar lervag commented on August 16, 2024

Hi, I tested now. The first thing I notice is that your example uses the filecontents package and the \jobname macro. The latter, I think, is the main reason that this example will not work, since the completion system parses the \addbibliography commands to find which bib files are included. When I removed the filecontents package and changed to \addbibliography{test.bib}, it worked as expected.

Of course, I could implement functionality that expands the \jobname macro, but I don't see when this would really be necessary..?

from vimtex.

nasenatmer avatar nasenatmer commented on August 16, 2024

Hey thanks for your engagement! I agree it would be absolute nonsense to provide for the needs of firecontents ! I only used it to provide a one-file MWE to make it easier to debug for you but never use it to actually work with it.

And indeet, if I change the \addbibresource parameter to a proper file name, completion works as expected, so it seems there is someting wrong with the preamble in the papers I've been writing recently. I think there's no other way than hunting that down before coming back and reporting what the issue was, so there currently doesn't seem to be a bug with vim-latex

from vimtex.

nasenatmer avatar nasenatmer commented on August 16, 2024

Hah, spotted it. If set to use an absolute path (i.e. starting with root), completion doesn't work.

If, however set as a relative path such as \addbibresource{../mwe.bib}, it works. Is this intended?

from vimtex.

lervag avatar lervag commented on August 16, 2024

I am not sure I understand what you mean. Could you please provide an example of how to reproduce the issue?

from vimtex.

nasenatmer avatar nasenatmer commented on August 16, 2024

Ok. For both examples you need the following mwe.bib in the same directory as the tex file.

@Book{jeuk10,
  Title                    = {Deutsch als Zweitsprache in der Schule: Grundlagen - Diagnose - Foerderung},
  Author                   = {Stefan Jeuk},
  Year                     = {2010},
  Location                 = {Stuttgart},
  Publisher                = {Kohlhammer}

Example 1) where it's not working: (before trying it, adjust /home/lervag/mwe.bib to represent the correc full path to the bib file):

\documentclass{scrartcl}
\usepackage[bibencoding=utf8,backend=biber]{biblatex}
   \addbibresource{/home/lervag/mwe.bib}
\begin{document}
\autocite[1]{je
\end{document}

Example 2) working: Only difference: mwe.bib is referenced relatively instead of absolutely:

\documentclass{scrartcl}
\usepackage[bibencoding=utf8,backend=biber]{biblatex}
   \addbibresource{./mwe.bib}
\begin{document}
\autocite[1]{je
\end{document}

from vimtex.

lervag avatar lervag commented on August 16, 2024

Right, I think I found the bug. Should be fixed now. Thanks again for reporting and thus helping to improve the plugin!

from vimtex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.