Skip to content

Path to bib file in a command #1745

@p135246

Description

@p135246

Description

I have a document structure with the main file 'text.tex' and several subfiles. The preamble of 'text.tex' contains the following definitions:

\providecommand{\MainFolder}{.}
%	The directory of the main file text.tex
\providecommand{\MyPackagesFolder}{\MainFolder/latex-packages}
%	The directory with LateX packages
\providecommand{\SubfilesFolder}{\MainFolder/subfiles}
%	The directory with subfiles
\providecommand{\GraphicsFolder}{\MainFolder/graphics}
%	The directory with graphics
\providecommand{\BibliographyFile}{\MainFolder/bibliography/bibliography.bib}
%	The bibliography file

If I want to include bibliography, I have the following command either in 'text.tex' or in one of the subfiles:

\addbibresource{\BibliographyFile}

In this setting, VimTex does not detect the bibliography file 'bibliography.bib'.

Question

Would it be possible for VimTex to recursively unfold '\BibliographyFile' to the actual path to 'bibliography.bib' or do you find this sort of abstraction a bad practice in general? Of course, if I replace '\BibliographyFile' with the actual path to 'bibliograph.bib', then VimTex detects it. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions