You are not logged in.

#51 2011-05-09 16:11:28

johnnyponny
Member
Registered: 2011-04-23
Posts: 33

Re: LaTeX composition in (g)vim with live update-as-you-type PDF preview

Works great but my muPDF flickers, it's like some black boxes are appearing when I write in the document. How can I fix this?

Offline

#52 2011-05-09 19:02:45

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: LaTeX composition in (g)vim with live update-as-you-type PDF preview

I'd  love to help, but I can't solve a problem I can't reproduce. Does this happen only with certain documents? If so, any chance you could post a minimal working example of a document that creates the problem?

Last edited by frabjous (2011-05-09 19:03:03)

Offline

#53 2011-05-09 19:22:53

johnnyponny
Member
Registered: 2011-04-23
Posts: 33

Re: LaTeX composition in (g)vim with live update-as-you-type PDF preview

It happens this

\documentclass[a4paper]{article}
\begin{document}
text
\end{document}

Has it something with drivers to do?

EDIT:I fixed it by changing to a background image.

Last edited by johnnyponny (2011-05-09 19:29:58)

Offline

#54 2011-08-19 02:32:08

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: LaTeX composition in (g)vim with live update-as-you-type PDF preview

I just uploaded v 0.8, which has the following changes:

  1. Some necessary changes to the forward search function to accommodate changes to SyncTeX in TeXlive 2011, which I presume will be reaching the Arch repos soon. (I think this is backwards compatible with TeXlive 2010, but as I no longer have TL 2010 installed anymore, I can't check.)

  2. It is now possible to have the PDF preview window open even when live-updating is not taking place. Because of this, the \o and \p keybindings now work differently than before. In the new system \p toggles the PDF window open and close, and \o toggles the live-updating process on and off. Remember: p for PDF, o for live-updating On and Off.

  3. There's a new (or newly documented) keybind \c which will cancel any ongoing compilations and force a new compilation. (In the background if live compilation is active, and in the foreground otherwise.) This is useful for "unsticking" things -- the way the script works if a compilation gets stuck in a loop, a new compilation will never start, and updating stops. This should provide a way to break that loop if need be. It also provides a means to update the PDF if live-updating is turned off.

Let me know if you spot any bugs. Thanks.

Last edited by frabjous (2011-08-19 02:33:53)

Offline

#55 2011-08-19 06:41:02

rekado
Member
From: Shanghai, China
Registered: 2009-01-13
Posts: 98
Website

Re: LaTeX composition in (g)vim with live update-as-you-type PDF preview

@frabjous: thank you for working on this. I'll play with this tonight and if it works well, I'll replace vim-latexsuite with this (and snippets). I hardly ever use anything more than \ll and \lv in the latexsuite plugin, and it doesn't work well with biber (instead of BibTeX), so your plugin looks interesting.

Offline

#56 2011-08-19 17:53:34

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: LaTeX composition in (g)vim with live update-as-you-type PDF preview

This is not really meant as a full alternative to a traditional LaTeX plugin like the LaTeX suite, though I'm not a fan of the LaTeX suite myself, either. You might check out other alternatives like Vim LaTeX Box or Vim-AucTex. My plugin is basically just meant to do one thing (Unix philosophy and all that) and might complement another plugin.

That said, my scripts are currently set up to call BibTeX as part of auto-compilation if there are undefined references. It wouldn't be too hard to make it use biber instead though. I don't use BibLaTeX/Biber myself, but I believe it would just be a matter of editing the following lines in /usr/bin/live-latex-update.sh:

Line 4, change from:

auxfile="${file%.tex}.aux"

to:

auxfile="${file%.tex}.bcf"

And line 15 from

if bibtex "$auxfile" ; then

to

if biber "$auxfile" ; then

But I haven't tested that.

If I'm not mistaken, Biber is significantly slower than BibTeX, so this might slow down the live-updating.

Last edited by frabjous (2011-08-19 17:55:45)

Offline

#57 2012-04-19 11:38:50

onny
Member
From: Europe
Registered: 2010-08-07
Posts: 46
Website

Re: LaTeX composition in (g)vim with live update-as-you-type PDF preview

I noticed one bug in this script. The macro \printbibliography doesn't get updated properly. Here's an short example:
opencl.tex : http://eugeneciurana.com/pastebin/paste … show=45009
opencl.bib : http://eugeneciurana.com/pastebin/paste … show=45010
I'm using biblatex to use the @ONLINE citation feature, but I don't think this causes the problem. It's just that, even after removing a citation, the reference of it doesn't get removed in the pdf-preview.
Hope you have an idea for that. Btw your script is awesome, I really would like to support your work via Flattr.

Offline

#58 2012-04-19 15:34:27

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: LaTeX composition in (g)vim with live update-as-you-type PDF preview

The entry should disappear after bibtex is run again.

I have it set up to run bibtex when a new citation are added. I'm not even sure there's a way to check when a citation is removed; I don't think anything even shows up in the .log file for it.

How often do you remove citations? Are you using any other (La)TeX plugins that would allow you to run BibTeX manually when you do so (and would it be a pain to do so)? (If not, you could always just bind a key to:

:!bibtex %:r.aux

Aside from that, the only other "fix" I can think of would be to make the script run bibtex every single compilation. I'm loathe to do that, since it would delay updating when a bibtex run isn't needed. If you wanted to make that change locally, though, you could edit /usr/bin/live-latex-update.sh and simply remove lines 14 and 28:

if cat "$logfile" | grep -i -q "undefined citations\|undefined references" > /dev/null 2>&1 ; then

and the matching

fi

Then bibtex will be run every time.

(And, though I hate to be "that guy," you should be aware that there's some deprecated LaTeX code, like \bf and \rm, in your sample. See "texdoc l2tabu".)

Oh and don't worry about flattr, etc. I'm not a programmer and this is not "my work". The scripts are really very simple. I've been kind of hoping someone else with real programming experience would take over now that I've provided "proof of concept" as it were, but we'll see.

Offline

#59 2016-01-12 13:35:49

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

Re: LaTeX composition in (g)vim with live update-as-you-type PDF preview

Hi frabjous, good and useful script. Did you abandon working on it? I was about to upload the package to AUR as it has not been transferred to AUR4, but not sure it is relevant if you completely stopped working on it.


Cedric Girard

Offline

#60 2016-01-12 15:13:36

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: LaTeX composition in (g)vim with live update-as-you-type PDF preview

Be advised that it has been exactly one year since we last heard from frabjous sad


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#61 2016-01-13 12:59:01

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: LaTeX composition in (g)vim with live update-as-you-type PDF preview

Ah, but frabjous is still around... and subscribed to the RSS feed for this thread, even if not active on the forums. I haven't learned the new AUR packaging/submission process. It's always something I'm going to get around to, but haven't gotten around to.

It's true I haven't made any changes to the scripts for a long time. I've been busy.

I was always kinda hoping someone else would take over the project -- I'm not a programmer. I kinda made this as a proof-of-concept kinda of thing, but then again, the thing works for me as is, and I still use it.

There is a clone of it here, which you might try. (I haven't.) Feel free to re-upload either one to AUR.

Offline

Board footer

Powered by FluxBB