-
Notifications
You must be signed in to change notification settings - Fork 53
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
Undefined reference #923
Comments
@yashamon Thanks for the report! Does |
@pfoerster This bug happens to me too. Neovim 0.9.2 on linux mint. |
I thought I also replied. In my case kpsewhich also finds the bib file. We are only using the LSP server so I am not sure how to troubleshoot further. |
@yashamon @firubat Can you also try the
|
@pfoerster So seems that if the bib file is in the same folder as the tex file, it is recognized by texlab. But if the bib file is in a different folder in the BIBINPUTS path (which is the way I like to do it), it is not recognized (the goto definition won't open the file in this case). |
Same for me, the issue goes away if the bib file is local.
…On Sat, Sep 23, 2023 at 11:25 AM firubat ***@***.***> wrote:
@pfoerster <https://github.com/pfoerster> So seems that if the bib file
is in the same folder as the tex file, it is recognized by texlab. But if
the bib file is in a different folder in the BIBINPUTS path (which is the
way I like to do it), it is not recognized (the goto definition won't open
the file in this case).
—
Reply to this email directly, view it on GitHub
<#923 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQGIZSYUOFMZNBXNA6H44LX34LSBANCNFSM6AAAAAA4KYRURI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I have the same error even if the actual scenario seems different and just tried the new commit. It does find a bibliography file in the tex distribution and uses it now, however even in the case where a local file with the same name is present. in my case I do have a local file So I am guessing there is still some logic missing to prefer a local file over the one from the tex distribution tree. |
I must admit that I don't know how to do that, I'm using texlab in neovim via Mason, and I don't know how to tell it to use a specific commit which is outside the releases cycle... |
@firubat for me mason saves the binary for texlab in |
@naibaf0 Thanks for trying out the commit.
This should be fixed now. I will publish a new release soon. |
Hi @pfoerster , for some reason this is still an issue for me (current version 5.11.0) |
Is it already in the release version?
I have no way to compile commits, well I would prefer not to.
…On Wed, Nov 8, 2023 at 2:54 PM firubat ***@***.***> wrote:
Hi @pfoerster <https://github.com/pfoerster> , for some reason this is
still an issue for me (current version 5.11.0)
—
Reply to this email directly, view it on GitHub
<#923 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQGIZRPF7WICVFTJOUWXO3YDPWR5AVCNFSM6AAAAAA4KYRURKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBSGY2TSOJWG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
In that case I am still experiencing the issue. My bib is in the supposedly
standard global directory. If bib file is moved to local directory the
issue goes away.
…On Sun, Nov 12, 2023 at 6:53 AM Patrick Förster ***@***.***> wrote:
@yashamon <https://github.com/yashamon>
Is it already in the release version?
Yes, this changeset is included with v5.9.0
<https://github.com/latex-lsp/texlab/blob/master/CHANGELOG.md#590---2023-08-06>
.
@firubat <https://github.com/firubat> Is the missing bibliography
contained in your home directory?
—
Reply to this email directly, view it on GitHub
<#923 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQGIZXOFDCY5BRKF5UTJZLYEDBGBAVCNFSM6AAAAAA4KYRURKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXGEYTSMJYGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@pfoerster It's in ~/Dropbox. Which I manually added to the BIBINPUTS variable |
I tried to put it also in /usr/share/texmf and /usr/local/share/texmf but to no avail. Only if it's in the same directory as the tex file. |
## [5.11.0] - 2023-11-05 ### Added - Add `texlab.inlayHints.labelDefinitions` and `texlab.inlayHints.labelReferences` options ([#753](latex-lsp/texlab#753)) - Display inlay hints for label references by default ([#753](latex-lsp/texlab#753)) ### Fixed - Moving the build logs to the recycle bin will now clear the diagnostics ([texlab-vscode/#825](latex-lsp/texlab-vscode#825)) - Fix false positive when reporting syntax errors for BibTeX accents ([#945](latex-lsp/texlab#945)) ## [5.10.1] - 2023-10-10 ### Fixed - Fix regression when renaming commands ([#936](latex-lsp/texlab#936)) ## [5.10.0] - 2023-09-30 ### Added - Allow passing additional arguments to `ChkTeX` using `texlab.chktex.additionalArgs` ([#927](latex-lsp/texlab#927)) ### Fixed - Fix loading bibliographies from `kpathsea` search path ([#923](latex-lsp/texlab#923)) - Don't report duplicate results when using goto definition on includes ([#924](latex-lsp/texlab#924)) - Fix project detection when there exist files with the same name ([#923](latex-lsp/texlab#923)) - Do not report parse errors with `$` in paths ([#931](latex-lsp/texlab#931)) ## [5.9.2] - 2023-08-14 ### Fixed - Don't crash when using comments inside `\include`-like commands ([#919](latex-lsp/texlab#919)) - Folding ranges include only the contents instead of the entire range of the structure. For example, the folding range of an environment will start after the `\begin` and stop before the `\end` ([#915](latex-lsp/texlab#915)) ## [5.9.1] - 2023-08-11 ### Fixed - Improve performance when completing BibTeX entries ([#493](latex-lsp/texlab#493)) - Don't report unused entries for very large bibliographies - Avoid redundant reparses after saving documents ## [5.9.0] - 2023-08-06 ### Added - Use bibliographies found in `BIBINPUTS` environment variable ([#493](latex-lsp/texlab#493)) - Add `texlab.build.pdfDirectory` setting ([#911](latex-lsp/texlab#911)) ### Fixed - Fix search path for aux files when using `\include` instead of `\input` ([#906](latex-lsp/texlab#906)) ## [5.8.0] - 2023-07-30 ### Added - Report diagnostics for unused and undefined labels - Report diagnostics for unused BibTeX entries and undefined citations - Report diagnostics for duplicate BibTeX entries - Report diagnostics for duplicate labels - Add `texlab.build.auxDirectory` and `texlab.build.logDirectory` settings ([#906](latex-lsp/texlab#906)) ### Deprecated - Deprecate `texlab.auxDirectory` in favor of `texlab.build.auxDirectory` ### Fixed - Fix parsing paths with `|` ([#568](latex-lsp/texlab#568)) - Fix parsing LaTeX identifiers with `=` ([#568](latex-lsp/texlab#568))
I have this issue when there are (at least) Korean characters in the path. I have a This probably means the directory is not properly handled for CJK characters. |
I am also having this issue with version 5.12.3 in both I'm using my distribution's Here's the output of
|
Perhaps it's related to the tilde expansion? \addbibresource{~/Zotero/bibs/all.bib} wasn't working for me, but \addbibresource{/home/lucas/Zotero/bibs/all.bib} does. |
I think we are all using absolute paths.
…On Sat, Apr 13, 2024, 03:28 Lucas ***@***.***> wrote:
Perhaps it's related to the tilde expansion?
\addbibresource{~/Zotero/bibs/all.bib}
wasn't working for me, but
\addbibresource{/home/lucas/Zotero/bibs/all.bib}
does.
—
Reply to this email directly, view it on GitHub
<#923 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQGIZUJ4MH7VJVAS477VRTY5DNDDAVCNFSM6AAAAAA4KYRURKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJTGU2TMNZTG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
tl;dr Percent encoding in paths may have different casing of hex characters (a-f or A-F), which leads to mismatches later.
I also noticed this issue with some characters in the path. (using neovim as the LSP client) I did some investigation and found out that (at least part of) the cause was the percent encoding of URIs. The LSP messages from the client contain URIs, which were percent encoded with lowercase hex. However, the URI for loaded file is constructed from a Rust texlab/crates/base-db/src/workspace.rs Line 95 in 3d70feb
That Another place where the bibliography path is constructed is: texlab/crates/base-db/src/deps/graph.rs Line 162 in 3d70feb
This joins the relative path with the directory component, which may come from the LSP client. Thus the joined path may have different casing for the hex in percent encoding, depending on the LSP client. I think the first is loading the bib file as part of the workspace, and the latter is resolving the path given to (Relative paths seem to work, when the encoded part is within it)After this I also noticed that traversing back the encoded parts of the path "worked" again. (Which kind of makes sense.) Under path Doesn't work \addbibresource{references.bib}
\cite{test} "Works" \addbibresource{../ä/references.bib}
\cite{test} Solutions? I'm not familiar with the project or the code, so can't say what would make sense. Could that be part of texlab/crates/texlab/src/util.rs Line 9 in 3d70feb
|
Improves detection of included files when non-ASCII characters are used by normalizing the casing of the percent encoding found in URIs. See #923.
## [5.21.0] - 2024-10-26 ### Added - Support starred variants in "Go to References" ([#1234](latex-lsp/texlab#1234)) - Add `texlab.latexindent.replacement` setting to allow passing a replacement flag to `latexindent` ([#1222](latex-lsp/texlab#1222)) - Don't require a label to show section numbers for document symbols ([#910](latex-lsp/texlab#910)) - Support navigating to files that are part of the `TEXINPUTS` similar to `BIBINPUTS` ([#1228](latex-lsp/texlab#1228)) ### Fixed - Fix opening `untitled` documents ([#1242](latex-lsp/texlab#1242)) - Handle `\bibitem` when checking for undefined references ([#1171](latex-lsp/texlab#1171)) - Fix false-positive syntax error when using a command inside a `\label` ([#879](latex-lsp/texlab#879)) ## [5.20.0] - 2024-10-08 ### Added - Add `texlab.inlayHints.maxLength` setting to allow limiting inlay hint text length ([#1212](latex-lsp/texlab#1212)) - Allow suppressing diagnostics using `% texlab: ignore` magic comments ([#1211](latex-lsp/texlab#1211)) ### Fixed - Fix enabling `texlab.build.useFileList` setting - Make "Goto Definition" work correctly with starred commands ([#1197](latex-lsp/texlab#1197)) ## [5.19.0] - 2024-07-08 ### Added - Add `texlab.build.useFileList` setting to allow controlling whether to use the `.fls` files ### Changed - Disable using `.fls` files for project detection by default ## [5.18.0] - 2024-07-06 ### Added - Parse `.fls` files to make the project detection more reliable ([#1145](latex-lsp/texlab#1145)) ### Fixed - Fix parsing commands with unicode characters inside BibTeX entries ([#1147](latex-lsp/texlab#1147)) - Improve detection of included files when non-ASCII characters are used ([#923](latex-lsp/texlab#923)) - Fix resolving includes starting from files included using `\subimport` ([#1145](latex-lsp/texlab#1145)) ## [5.17.0] - 2024-06-23 ### Added - Add label commands from `zref` and `zref-clever` to the list of default label commands ([#1140](latex-lsp/texlab#1140)) - Add `texlab.experimental.labelDefinitionPrefixes` and `texlab.experimental.labelReferencePrefixes` options ([#1139](latex-lsp/texlab#1139))
This issue appeared recently. Probably last release. All citations are now marked undefined reference. The location of bib is standard: ~/texmf/bibtex/bib
The document compiles without issues with all references intact.
Platform: Win11 release, neovim 9.1
The text was updated successfully, but these errors were encountered: