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
F9 \cite and \ref completion does not work anymore #135
Comments
Maybe this is related to python. Can you tell me what
yield? Afterwards, it would be nice if you could enable debugging
then press |
Hi Gerd, Please find below the answers to your question. Thanks for your help! :echo Tex_HasPython A minimal example: \documentclass[pdftex,a4paper,12pt]{article} The logfile output after typing F9 after \cite{ : view : Tex_Complete: s:type = cite, typeoption = Strangely enough, after typing \ref{ , I was presented a menu from which I could chose a label. So this seemed to have worked this time. Best wishes, Kim |
Hello, The \ref{ completion works in my minimal example, however, the \cite completion does not work at all. In my more complex document, also \ref{ doesn't work even though it used to work just fine before. If noticed today that when typing \cite{, the syntax is not highlighted in red as for example for \ref{. I wonder if this is somehow related to cite completing not working as it is somehow not recognized (any more)? Kim |
It seems that your are using a very old version of latex-suite. Please update and try again. (And please post the new log file). |
It would also be helpful if you post your bib-file. |
I have noticed similar behaviour using (G)Vim 8.0 with latex-suite 1.9.0 on Ubuntu 18.04 LTS, with latex-suite installed from Ubuntu's package repositories. I have no Is this issue still open? I'm happy to follow the steps above (e.g. post values of the variables and a debug log), but want to check whether this has already been resolved before proceeding. If the bug is resolved in a later version of latex-suite, then I can file a bug report against the Ubuntu package (https://packages.ubuntu.com/bionic/vim-latexsuite). |
Can you post a minimal tex-file for which the completion is broken? |
Sure. Here is a minimal example:
I have also managed to capture most of the error message (it turns out that if your window is smaller than the error message, then the error message is paged, so does not immediately disappear). If I switch to insert mode and press F9 within the curly brackets for the
only the last line is missing from this error message. If I comment out the |
This bug was fixed two years ago: 7d60db0. |
Thanks for the quick response. Okay, for my own purposes, I will switch to a manual installation of the 1.10.0 release. I can also file a bug report for the Ubuntu package (1.9.0) and request that the package be updated to incorporate this fix. It looks like the package is at 1.9.0 for post 18.04 LTS versions of Ubuntu. |
I have created a bug report for the Ubuntu package: https://bugs.launchpad.net/ubuntu/+source/vim-latexsuite/+bug/1831989 |
I can confirm that this issue is not present when the latest release of Vim LaTeX suite (1.10.0, from github) is manually installed as a package in Vim 8.0 on Ubuntu 18.04 LTS. Thanks for your help @gerw . |
You are welcome! |
I have the same issue as the OP. \ref{… is working, \cite{… is not. I use the most recent version from git (master). …
\addbibresource{../literatur.bib}
…
\begin{document}
\autocite{<F9> With a bibtex file like: % Encoding: ISO-8859-1
@String{PHZH = {Pädagogische Hochschule Zürich}}
@Online{lp21de1,
url = {https://zh.lehrplan.ch/lehrplan_printout.php?k=1&z=1&ekalias=0&fb_id=1&f_id=11},
subtitle = {Deutsch},
titleaddon = {Kompetenzaufbau 1. Zyklus},
urldate = {2020-02-25},
crossref = {lp21},
groups = {Deutsch},
keywords = {qualityAssured},
qualityassured = {qualityAssured},
}
@Online{lp21ma1,
url = {https://zh.lehrplan.ch/lehrplan_printout.php?k=1&z=1&ekalias=0&fb_id=5},
subtitle = {Mathematik},
titleaddon = {Kompetenzaufbau 1. Zyklus},
urldate = {2020-02-25},
crossref = {lp21},
groups = {Mathe},
keywords = {qualityAssured},
qualityassured = {qualityAssured},
}
… It does not help to all capitalize the keys. |
Ah yes, the debug log:
Edit: Could it be that the \n at the end of the file name is causing the troubles? |
And here is a minimal LaTeX file: \documentclass{scrartcl}
\begin{filecontents}[overwrite]{test.bib}
@Book{spiegel2018,
author = {Hartmut Spiegel and Christoph Selter},
date = {2018},
title = {Kinder \& Mathematik},
edition = {10},
foreword = {Ranga Yogeshwar},
isbn = {3-7800-5238-5},
language = {german},
location = {Seelze},
pagetotal = {112},
publisher = {Kallmeyer},
subtitle = {Was Erwachsene wissen sollten},
ean = {978-3-7800-5238-4},
groups = {Mathe},
keywords = {qualityAssured, read},
qualityassured = {qualityAssured},
readstatus = {read},
}
\end{filecontents}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{biblatex-chicago}
\addbibresource{test.bib}
\begin{document}
\end{document} |
Your MWE cannot work since the LaTeX-Suite correctly identifies your bib file. The |
Hi,
Am Sa den 1. Mai 2021 um 20:36 schrieb Gerd Wachsmuth:
Your MWE cannot work since the `filecontents` writes to a different place than the `\addbibresource`.
Ah yes, just remove the `../` from the `\addbibresource`.
LaTeX-Suite correctly identifies your bib file. The `\n` is intended. What happens after you are pressing F9? Does the OUTLINE window open?
It openes without error but it is empty.
Regards
Klaus
--
Klaus Ethgen http://www.ethgen.ch/
pub 4096R/4E20AF1C 2011-05-16 Klaus Ethgen <Klaus@Ethgen.ch>
Fingerprint: 85D4 CA42 952C 949B 1753 62B3 79D0 B06F 4E20 AF1C
|
I have to correct with my mini example. It works. That is frustrating. If I press F9 on my files, it fails with an empty window. But now I found the problem. My bib file starts with: % Encoding: ISO-8859-1
@String{PHZH = {Pädagogische Hochschule Zürich}}
… If I convert the file to UTF-8, it works but all resources that contains german umlauts gets rendered wrong then. It seems that this is a bug in python not able to handle different encodings correctly. If I set |
Can you post your bib file (or a minimal one)? For me, it also works with an iso-encoded bib file. Do you use python2 or python3 within vim ( |
(Btw: currently, latex-suite assumes that the bib-file is utf-8 encoded) |
:echo Tex_HasPython gives 3. I cannot upload a bib file here. % Encoding: ISO-8859-1
@String{PHZH = {Pädagogische Hochschule Zürich}}
@Book{spiegel2018,
author = {Hartmut Spiegel and Christoph Selter},
date = {2018},
title = {Kinder \& Mathematik},
edition = {10},
foreword = {Ranga Yogeshwar},
isbn = {3-7800-5238-5},
language = {german},
location = {Seelze},
pagetotal = {112},
publisher = {Kallmeyer},
subtitle = {Was Erwachsene wissen sollten},
ean = {978-3-7800-5238-4},
groups = {Mathe},
keywords = {qualityAssured, read},
qualityassured = {qualityAssured},
readstatus = {read},
}
@Book{gallmann2001,
author = {Gallmann, Peter},
date = {2001},
title = {Deutsche Grammatik},
isbn = {3-906718-54-9},
location = {Zürich},
publisher = {Lehrmittelverlag des Kantons Zürich},
groups = {Deutsch},
} |
I have pushed a small fix. Now, if decoding the bib file with utf-8 fails, we try again with latin1. Does it work for you? |
Great! Works fine for me. I hope, that the issue of the OP (@yipeah) is the same and is fixed too. |
Hello,
I have been using latex-suite for several years and am currently using gvim 7.4.1689 and latex suite 1.9.0 on Ubuntu 16.04.
Typically, I was able to use F9 for \cite and \ref completion without a problem. I do not know why but for some time now, pressing F9 after for example \cite{ only produces empty outline buffers with no visible error message, even with files that previously worked.
When pressing F9 after having typed \ref{, I very briefly see an error message that disappears very fast, related to python3.5 and outline.py.
I've disabled the use of python by setting g:Tex_UsePython=0 in tex.vim but this does not restore the initial behavior.
Also, I installed latex-suite 1.10 to see if it makes a difference, but the observed behavior remains the same.
I have noticed that the F9 completion has been causing some issues for users on and off. None of the answers that I read on the internet were able to help me solve my problem.
What kind of additional information would you need from me to diagnose and possibly fix the problem on my installation?
Thanks a lot in advance!
Kim
The text was updated successfully, but these errors were encountered: