xuhdev / vim-latex-live-preview

A Vim Plugin for Lively Previewing LaTeX PDF Output
https://www.topbug.net/blog/2013/06/13/live-preview-of-latex-in-vim/
GNU General Public License v3.0
832 stars 73 forks source link

Citation dissapears during preview #110

Open ENate opened 4 years ago

ENate commented 4 years ago

Expected behavior

Expected that entire pdf document can be viewed live as updates are made to the .tex document. Tell us what should happen Suppose that entire pdf document including the citations should be available

Actual behavior

After typing :LL... in vim, the pdf appears and when updated, citations in the document are replaced by '???'. I use the 'natbib' package for references. Tell us what happens instead Entire references in the pdf document are replaced by question marks.

Steps to reproduce

Install vimtex plugin, try previewing a document with the vim-latex-preview plugin and immediately after the first view, references are not loaded in the document as the pdf refreshes. Tell us how it occurs

1. 1. 1.

System configuration

# output of `vim --version`

Vi IMproved 8.2

badouralix commented 4 years ago

Hi @ENate, thanks for the report. This looks like a bug with how we handle natbib Would you be able to provide a simple snippet reproducing your bug so that we can work it out ?

ENate commented 4 years ago

Hi @badouralix , In principle, one will have to create 2 files: a template.tex (which is the main Tex file); and a corresponding bib file. But the bibliography package is the ´natbib´. I am also cross-checking the ´journalsty.sty´ file whether there is any package which might be causing this error. But it doesn't seem to be the case because when the ´natbib´ package is changed to ´biblatex´, it seems the problem is no longer observed. So, after running the ´LLPreview..´ command, the PDF loads as expected, and then the citations/references disappear from the PDF file and are replaced by the ´??´ when it refreshes automatically. I need to use the ´natbib´ package in the document as a requirement. template.tex contents: \documentclass[smallcondensed]{journalsty} / Journal sty contains lots of configuration packages \usepackage{natbib} \usepackage{lineno,hyperref} \begin{document} % some text This is a citation tex of \cite{Dua2019} which may not be displayed after the latex doc is refreshed automatically using the ´LLPreview..´ command of the ´vim-latex-preview´ plugin. \bibliography{spbasic} % Basic citation for natural sciences and mathematics \bibliography{mlj_artbib} % Name of bibtex data base file saved with mlj_artbib.bib with content: \end{document} @misc{Dua2019, author = {D. Dheeru and G. Casey}, title = {UCI Machine Learning Repository}, url = {http://archive.ics.uci.edu/ml}, institution = {University of California, Irvine, School of Information and Computer Sciences}, year = {2017} } Thanks for the plugin. It is great to use.