Coder Social home page Coder Social logo

Comments (10)

LukeXuan avatar LukeXuan commented on June 1, 2024

+1 for this issue

from auctex-latexmk.

tom-tan avatar tom-tan commented on June 1, 2024

Sorry for late reply.

I try to reproduce this issue but I cannot.
Would you tell me more details for this issue? (your environment, what "breaks" means)

My environment:

  • MacOSX El Capitan
  • auctex-latexmk master
  • AUCTeX 11.90.0
\documentclass{article}
\usepackage{xltxtra}

\begin{document}
sample
\end{document}

I set TeX-engine to 'xetex and I did not use .latekmkrc.

I compiled this file with C-c C-c LatexMk and tried to openC-c C-c View.
I confirmed the compiled PDF is opened via preview.app.

from auctex-latexmk.

teoric avatar teoric commented on June 1, 2024

Thanks for looking into this!

Environment 1:

  • Ubuntu 16.10
  • auctex-latexmk-20160923.7 (ELPA)
  • auctex 11.90.0

"breaking" means that compilation works, but preview does not. ("No matching viewer found.")

Environment 2:

  • MacOSX El Capitan
  • auctex-latexmk-20160923.7 (ELPA)
  • auctex 11.90.0

I had not tried the Mac before with this file, sorry. You are right that Preview is opened. However, my preference for viewing is set to Skim (or, as per AUCTeX options, "displayline", which allows SyncTex). This is, even on the Mac, the file is not viewed with the configured PDF viewer, but with another default viewer. If you look at AUCTeX's tex.el, they define open as a program for some files; maybe that leads to opening Preview for unknown files. (Although I wonder how it gets it right to open the PDF, not the XDV, but I am afraid I do not have time to track this right now, sorry.)

The advantage of using Skim on the Mac is that SyncTeX works for forward and backward search in the source, which is essential to my (but not only my) workflow; so I would still count opening the wrong viewer (Preview instead of Skim) as "breaking".

So, summing up:

  • Linux: latexmk breaks auctex viewing.
  • Mac: latexmk breaks viewer configuration.

Both are due to the fact that auctex does not handle the XDV route correctly ('XDV route' is short for: generating XDV only for the LaTeX runs and only after stabilization converting it to PDF, instead of doing the full conversion all the time). The workaround I suggested was to make latexmk use the PDF route again. As I said, one could argue that auctex should fix this, but then again, the support for latexmk is not part of auctex, so they do not have to support the XDV route.

from auctex-latexmk.

tom-tan avatar tom-tan commented on June 1, 2024

Thank you for your reply.

I checked this issue in Linux machine by using the same instruction but I fonud that it can be successfully compiled and opened by evince viewer (my default viewer).
So this issue seems to be the problem of the user configuration.

You can configure the viewer via TeX-view-program-selection and you will see the possible options in TeX-view-program-list-builtin.
For example:

(setq TeX-view-program-selection '((output-pdf "Skim")))

from auctex-latexmk.

teoric avatar teoric commented on June 1, 2024

Thank you for your reply. Are you sure that you re-compiled with LaTeXmk? For me, it works as follows:

  • Mac: Setting the viewer to "displayline" (and making displayline available in the path) I can indeed view the document, even after recompiling. I had some old configuration from before "displayline" was an official option; sorry for not noticing this, but it worked everywhere except with LaTeXmk now. Thank you very much for making me update my configuration!
  • Linux: I have not changed anything here, "Evince" is the default and only viewer; setting it explicitly makes no difference.
    1. compile with LaTeXmk
    2. "No matching viewer found"
    3. quit Emacs
    4. reopen file
    5. without recompiling(!), view document
    6. Evince opens.
    7. Change something and goto i.

from auctex-latexmk.

tom-tan avatar tom-tan commented on June 1, 2024

Sorry for late reply.

I reproduced this issue and fix it as suggested in the first post.
If there still exsits the same issue, please reopen this issue.

from auctex-latexmk.

liushihao456 avatar liushihao456 commented on June 1, 2024

Hi! Recently I have encountered exactly the same issue as teoric did. I'm using Emacs on MacOS. And I didn't change any of the viewing options of AucTeX.

The thing is the same as above: when I first open a tex file which has already been compiled to pdf before, with C-c C-v I can open the pdf with Preview directly. But after that, when I compile the tex file with auctex-latexmk, with C-c C-v I get "No matching viewer found". If I quit Emacs and reopen the tex file, C-c C-v works again.

Can you reproduce this, by not setting the viewer to Skim, and see if there's something wrong, please?

from auctex-latexmk.

jaanli avatar jaanli commented on June 1, 2024

+1 to @liushihao456 's issue - I'm also facing this. Can you please reopen this issue?

from auctex-latexmk.

tom-tan avatar tom-tan commented on June 1, 2024

Thank you @liushihao456 and @altosaar!
I will try to reproduce it.

Once it is reproduced in my environment, I will reopen this issue.

from auctex-latexmk.

myandeg avatar myandeg commented on June 1, 2024

I am using auctex and auctex-latexmk on an Arch Linux machine. And I'm facing similar problem as @liushihao456 's issue.

I've set TeX-view-program-selection and the viewer can be opened once after I compiled the document with latex or it has been compiled before, but if I use latexmk to compile the tex file and then try C-c C-v, it shows "No matching viewer found".

To address this issue, I have to compile the doc twice with latexmk and latex in order. This might be stupid, but it is better than latex+bibtex+latex+latex or exit emacs and reopen with a much longer loading time.

Could you please try to reproduce it and find an elegant solution?

from auctex-latexmk.

Related Issues (20)

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.