GithubHelp home page GithubHelp logo

latex-preview-pane's People

Contributors

jsinglet avatar pstch avatar purcell avatar vzaliva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

latex-preview-pane's Issues

Feature Request: On preview update jump to the "proper" page

When using an external viewer (e.g. evince) auctex is able to take me to the page containing the rendered LaTeX under my cursor with C-c C-v.

How hard would it be for LPP to provide something similar?
That is, after reverting the doc-view-buffer change to the appropriate page if not there already.

My configuration for evince looks like this:

(add-to-list 'TeX-view-program-list
             '("Evince" "evince --page-index=%(outpage) %o"))

Code for automatic loading of latex-preview-pane

Is this the best game in Emacs town to finally do side-by-side preview? I guess so. I struggled to load it automatically though even when writing: ((latex-preview-pane-enable) in the .emacs file. The Emacs startup crashes, so there must be something wrong somewhere. Can you please help to get it loaded automaticlly? I use Windows7 - Emacs24 - AUCTeX 8.17.

latex-preview-pane-enable not working

The wiki says that to auto-initialize latex-preview-pane-mode when opening tex files, you have to place (latex-preview-pane-enable) in your .emacs file. This has never worked for me.

Also, calling latex-preview-pane-mode works as expected, so the problem is just with the auto-initialization.

My .emacs code:

(add-to-list 'package-archives
	     '("melpa" . "https://melpa.org/packages/"))
(latex-preview-pane-enable)

Using latex-preview-pane with org-mode

I'm writing a multi-file document in org-mode and exporting to LaTeX. I've already setup a way of doing the compilation but now I'd like to use latex-preview-pane simply to display the resulting pdf. Is there a way to only monitor a selected pdf and display it when it changes?

No preview picture but the original tex code on the right frame

Hi jsinglet,

Thanks for your wonderful mode and I appreciate it very much. But I have encountered some problems for a few times. That is when I type "M-x latex-preview-pane-mode" in a tex buffer, then the right frame doesn't show the expected preview figure but the original tex code itself. See picture below.

image

Every time I encountered this problem, I just reinstall the Emacs and all the necessary packages and then it will work well for a period before it breaks down again. Could you please give me some suggestions which might avoid this problem? By the way, I'm using Emacs 24.3 and latest latex-preview-pane mode on Mac OS 10.9.5 and the configuration file of Emacs is from https://github.com/purcell/emacs.d.

Thanks,
Weizhi

pdflatex with synctex?

Would you so kind as to implement the option synctex in your program?
Some thing like this:

         (call-process pdf-latex-command nil "*pdflatex-buffer*" nil "-synctex=1" buff)

Thank you!

Feature request: synctex support

This is a converse to issue 18.

With pdf-tools you can C+click in PDF to jump to the corresponding line in the source file. Since this involves some non-trivial parsing of PDF and synctex files, which is carried out by libpoppler, this seems to only be doable by switching to pdf-tools as the rendering backend.

XeLaTeX?

Thanks for putting this together. Do you have any plans to make it work with xetex? That would be very useful (for me).

Preview Pane not working with filenames with spaces on Win10 with Doom Emacs

Hi, I have just recently begun the transition from vim to emacs, and have started using auctex for my LaTeX.
However, when I open .tex files that have spaces in their path, the preview-pane fails and only reads the path up until the first space. Is this an issue that I can fix myself, or is this something that someone who better knows what they are doing needs to fix in the addon?

Thanks,
Nicolas

How can I change the layout of the tex file and the latex-preview-pane

The default layout of the two buffers is vertical (side-by-side), how can I set it to horizontal(up-and-down)?

If you prefer to make it side-by-side, once I already change the layout to horizontal for some reason, after I modify and save the tex file again, how can I prevent it automatically creating a new side-by-side latex-preview-pane window, why not just update the existed latex-preview-pane window?

M-p and M-P shortcuts are not defined.

Hi There!
I installed latex-preview-pane with melpa.
So i had a .tex buffer open (with auctex) in emacs. I wanted to preview the entire buffer, so i used m-x latex-preview-pane-mode. After doing so, a split buffer named Latex Preview Pane Welcome opened with just the welcome screen and "[loading document preview...]" Pressing M-p or M-P do nothing ( Although strangely both make the minibuffer say M-p is not defined).

Any ideas as to what I could be doing wrong?
Thanks!

fit to window

It would be nice for PDF display to fit the frame it is shown in. It could be manually done using doc-view-fit-page-to-window and perhaps should be done automatically.

PDF does not refresh properly in cygwin

Yesterday I downloaded latex-preview-pane on Ubuntu, and everything was working fine. However, when I switched to using cygwin with X, I encountered the following problem:

  • Pressing C-s saves and compiles, as expected (I use ergoemacs)
  • Prompt appears, asking whether or not I want to revert to changes on disk (presumably for the pdf).
  • I input yes, and Emacs complains that the PDF file is corrupt. However, the file is perfectly fine when I relaunch Emacs.

Helpful info:

  • Cygwin Emacs 25.3 is compiled from source with xwidget support
  • LaTeX compiler is TeX live from cygwin (NOT windows)

prevew pane not updating

The first time I enable latex-preview-pane mode, the page renders just fine. However, it just won't update, even after I M + p. I can see from the message in the status bar that the pane is updating, but nothing is really changing on the actual preview pane.

If I disable the preview and enable the mode again, then the file refreshes. But it has never automatically updated properly. Has anyone encountered such a problem?

Support for pdf-tools

Since doc-view's display quality is terrible, I think I'm not the only one who uses pdf-tools instead for PDF. However, I cannot see if there's a way to manually revert pdf-tools buffer to replace the function doc-view-revert-buffer. auto-revert-mode doesn't help though.

disable undo

Periodically Emacs shows me a warning about undo buffer being exhausted. I suspect it is cause by it trying to keep history of updated PDFs in preview buffer. I think the solution for this problem would be to
disable undo on doc-view buffer using (buffer-disable-undo)

too many lines of message-no-preview-yet.txt

Would you please delete those lines above "Error generating your PDF document. Please see the output below for more information."

When compile fails, I have to scroll the preview window to see the error message. I can do this locally, but since that part already exists in message-latex-preview-pane-welcome.txt file, I don't think that's necessary.

The pane cannot display Celsius symbol and some packages well

I was recommended to try this cool last night, and cannot help testing my previous .tex file after waking up.

I installed in my Emacs 27.0.50 on Manjaro, using Spacemacs develop branch.

When I tested the article has whole English letters, it displayed everything well. Although I found two problems just now.

  1. It highlighted the line with red color, in which has Celsius symbol (โ„ƒ). The symbol uses Unicode character 0x2103.

  2. Some packages cannot be displayed well with \usepackage{}, such as graphicx, amsmath, cite, geometry, caption...

Thank you.

latex-preview-pane do not work with luatex

I'm using luatex which also support fontspec and can generate pdf without any problem.
However, when using latex-preview-pane to preview, it gives:

Most Recent Backtrace:

Transcript written on draft.log.
! ==> Fatal error occurred, no output PDF file produced!

l.41 }

!...............................................
! Emergency stop.
?

l.41 }

!...............................................
! For immediate help type H .
!
! See the fontspec documentation for further information.
!
! instead of plain "latex" or "pdflatex".
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! Fatal fontspec error: "cannot-use-pdftex"
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

When looking into the log file, it seems latex-preview-pane use pdftex instead since it cannot fine xetex.

Is it possible to add support to luatex?
Thanks.

Preview Pane Not Showing PDF

Hello Mr. jsinglet. I am using

  • Emacs24
  • pdflatex (pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian))
  • Ubuntu 16.04
  • LaTeX Preview Pane 20151023.1303 installed from MELPA
  • I have been followed the wiki page https://www.emacswiki.org/emacs/PreviewLaTeX

My problem is when previewing (M-p), the preview pane does not show the actual PDF result. Instead, it shows a wall of unknown strange characters (at least, unknown for me). No matter how many I compiling the .tex file (pdflatex command), or doing M-p, the result is always the same. I can not see the normal output of the PDF in the Preview Pane just like the wiki page. I want my output to be normal like in the wiki. I am sorry, I am completely new to Emacs.

Here is my screenshot:

The Error

And this is the expected result in Okular:

The Expected

And this is my .emacs file content:

;; dua baris ini diperoleh dari video Mohammed Ismail Ansari pada 12 November 2016
(global-hl-line-mode)
(show-paren-mode)

(setq TeX-PDF-mode t)

;; Autoload Packages 18 November 2016
(package-initialize)

;; MELPA Settings 18 November 2016
(require 'package)
(add-to-list 'package-archives
          '("melpa" . "http://melpa.milkbox.net/packages/") t)

;; Activate LaTeX Preview Pane 18 November 2016
(latex-preview-pane-enable)

;; Add hook for LaTeX Preview Pane 18 November 2016
(add-hook 'LaTeX-mode-hook 'latex-preview-pane-mode)

;; Tambahkan jam dan tanggal di mode-line Emacs
;; Diambil dari https://www.emacswiki.org/emacs/DisplayTime
;; (display-time-mode 1)
;; (setq display-time-format "%I:%M:%S") ;; diambil dari http://emacs.stackexchange.com/questions/6065/how-to-display-time-in-seconds-in-the-mode-line

;; diambil dari http://efod.se/writings/linuxbook/html/date-and-time.html
(setq display-time-day-and-date t
     display-time-24hr-format t
     display-time-format "%A %B %Y %I:%M:%S")
            (display-time)

;; diambil dari https://www.emacswiki.org/emacs/auto-complete-extension.el
;; (require 'auto-complete-extension)

;; Run C programs directly from within emacs
;; Taken from http://stackoverflow.com/questions/9593880/compile-and-run-a-c-program-in-emacs
(defun execute-c-program ()
 (interactive)
 (defvar foo)
 (setq foo (concat "gcc " (buffer-name) " && ./a.out" ))
 (shell-command foo))

(global-set-key [?\C-x ?\C-r] 'execute-c-program)

I thank you for this wonderful Preview Pane program. I am waiting for your reply.

Compilation Command

A cool feature would be a way to select the command that is being used to compile the latex source file into what is finally shown in the preview. This would be useful for when you have to compile your source file twice or when you to compile a BibTex file to see the changes in your document.

Using multiple windows leads to split preview buffer

This might be a dupe of issue #24 so please close if appropriate but the issue reads as if it was resolved and I am currently using the melpa package from 20181008.

Emacs version: 25.2.2
latex-preview-pane-mode version: 20181008 melpa

Issue:
Using only one window works but as soon as I open a second window (i.e. C-x 5 2) saving any buffer with active latex-preview-pane-mode causes a new one to open as a vertical split buffer of the original preview window.

Installing issues with doom emacs

I encountered quite confusing issues trying to install latex-preview-pane on Doom Emacs.

Installing the package with M-x package-install works perfectly, then activating the M-x latex-preview-pane-mode is ok, it works and everything is OK.

Since I quit Doom Emacs. When I launch it again after, the package is still installed but the latex-preview-pane-mode doesn't work anymore.

I tried with or without a doom/reload or a doom/sync, and with or without adding the (latex-preview-pane-enable) in my .emacs.

I am quite confused by the situation, tbh.

Using Emacs 27 with Doom Emacs 3.0.0 and the package reference is 20181008.1822

latex-preview-pane does not support TeX-master

With large(ish) documents, documents are often split up. By setting the TeX-master local variable, AUCTeX knows which file to build. See http://www.gnu.org/software/auctex/manual/auctex/Multifile.html

It looks like latex-preview-pane simply runs pdf-latex-command on the file visited by the current buffer, which will not work when you are viewing one of the included files (more often the case than not).

I'm just passing by (recently finished a large LaTeX project :) -- so I'm leaving this here in case any other users search for the same thing.

Preview pane placement

For some time I have looked for solutions that preview Latex in a Emacs buffer, this one was really easy to install and getting to work

However I would like to place the preview pane at the bottom, splitting the working buffer and the PDF buffer horizontally.

Could you suggest how I could do that?

Render issues with Emacs 25

I'm seeing incorrectly rendered pdfs when using latex-preview-pane-mode with Emacs 25.3.1 on Mac OS X 10.13 and with Emacs 25.1.1 on Debian 9. The same issue does not occur with Emacs 24.5.1 on Debian 9.

  • Mac OS X 10.13
  • Emacs 25.3.1
  • pdf-tools 20171012.2226
  • latex-preview-pane 20151023.1303

Creating a new latex file and writing it out results in a PDFView buffer which is correctly rendered.

image

If I subsequently change the latex file and write it out the PDFView is not updated. Clicking in the PDF buffer or resizing emacs results in an update but the rendered PDF is incorrect.

image

Viewing the updated PDF with preview shows the issue is not with the PDF file itself. And viewing the same PDF with a python script using the same poppler library shows the correct result as well.

It looks like the definition of doc-view-revert-buffer changed in Emacs 25.

Emacs 24.5.1 doc-view-revert-buffer:

(defun doc-view-revert-buffer (&optional ignore-auto noconfirm)
  "Like `revert-buffer', but preserves the buffer's current modes."
  ;; FIXME: this should probably be moved to files.el and used for
  ;; most/all "g" bindings to revert-buffer.
  (interactive (list (not current-prefix-arg)))
  (revert-buffer ignore-auto noconfirm 'preserve-modes))

Emacs 25.1 doc-view-revert-buffer:

(defun doc-view-revert-buffer (&optional ignore-auto noconfirm)
  "Like `revert-buffer', but preserves the buffer's current modes."
  (interactive (list (not current-prefix-arg)))
  (cl-labels ((revert ()
                      (let (revert-buffer-function)
                        (revert-buffer ignore-auto noconfirm 'preserve-modes))))
    (if (and (eq 'pdf doc-view-doc-type)
             (executable-find "pdfinfo"))
        ;; We don't want to revert if the PDF file is corrupted which
        ;; might happen when it it currently recompiled from a tex
        ;; file.  (TODO: We'd like to have something like that also
        ;; for other types, at least PS, but I don't know a good way
        ;; to test if a PS file is complete.)
        (if (= 0 (call-process (executable-find "pdfinfo") nil nil nil
                               doc-view--buffer-file-name))
            (revert)
          (when (called-interactively-p 'interactive)
            (message "Can't revert right now because the file is corrupted.")))
      (revert))))

If I modify latex-preview-pane-update-p() as follows the PDFView is updated as expected:

              ;(doc-view-revert-buffer nil t)                                                                                                                          
              (revert-buffer nil t 'preserve-modes)

Problem installing

Hi there. I'm trying to install preview-pane following the instructions on the wiki (http://www.emacswiki.org/emacs/LaTeXPreviewPane). But when I run:
M-x package-install latex-preview-pane
I get:
http://melpa.milkbox.net/packages/latex-preview-pane-20150519.1244.tar: Not found

Do you know what might be causing that, or how to fix it? Is there an alternative way to install it?

Thanks for helping! :D

Save pdf file without opening preview pane

Is it possible to have it update the pdf file without opening the preview pane? This way I can have the pdf file open in another application and have it updating everytime I save the tex file.

Follow cursor

A nice feature would be that if you
scrolled in your Latex buffer, that the generated PDF pane would follow and scroll the pane

Doesn't work in Cygwin (with cygwin-mount.el & setup-cygwin.el) under Windows 10 - path problems

FYI, I am using GNU Emacs 24.5.1 (i686-pc-mingw32) on Windows 10 with Cygwin64.

  1. TeXLive installed C:\Cygwin64\bin\pdftex.exe and a link 'pdflatex' pointing to the pdftex.exe; however, latex-preview-pane doesn't know how to use the link and I have to provide the name of the real file (pdftex) in using the custom-set-variables.
  2. latex-preview-pane cannot find the tex file itself when I trigger M-p, here is what displayed on the latex-preview split panel:

Error generating your PDF document. Please see the output below for more information.

Most Recent Backtrace:

Transcript written on texput.log.
! ==> Fatal error occurred, no output PDF file produced!

<*> ...me/jwong/Dropbox/sp/paper1_theories_v25.tex
! Emergency stop.
Please type another input file name:
(Press Enter to retry, or Control-D to exit)

<*> ...me/jwong/Dropbox/sp/paper1_theories_v25.tex
! I can't find file `d:/home/jwong/Dropbox/sp/paper1_theories_v25.tex'.
entering extended mode
restricted \write18 enabled.
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Cygwin) (preloaded format=pdftex)

Question: Is it possible to center the pdf file by default?

I'm creating latex on a small monitor, but big enough to run 2 windows side by side, however not large enough to have the pdf document being displayed with its full width. Example:
screenshot 2015-11-17 19 38 14

Is it possible to make it "center" the pdf page by default so that I can see the contents of my file?
Example:
screenshot 2015-11-17 19 41 16

I've sort of managed to achieve the result above by simply using the directional arrows to move the window around, and the position persists even when I change the contents of the file. I wonder if it is possible to get this behavior by default by altering some of the option of lpp.

Thanks for taking the time to read this! ๐Ÿ‘ฏ ๐Ÿ˜„

pdflatex not found despite setting PATH

I get "Searching for program: No such file or directory, pdflatex" when I try loading/refreshing the pane.
I've set the PATH variable in .emacs to include the latex directory (it exists in /home). This works fine with AUCTeX.

latex command flags

As discussed in previous issues, you can set pdf-latex-command to something like luatex or xelatex. What I need to do is add flags to the pdflatex command (specifically -shell-escape so that I can use the minted package). (setq pdf-latex-command "pdflatex -shell-escape") results in the error:

Error running timer `latex-preview-pane-update': (file-error "Searching for program" "no such file or directory" "pdflatex-shell-escape")

which makes it seem like pdf-latex-command only works if you give it only the name of an executable. Can we add an option to give it arguments?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.