Coder Social home page Coder Social logo

Comments (4)

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

I could not reproduce this issue...

I used Emacs 24.5.1, AUCTeX 11.89.4 (installed from package.el), and the latest auctex-latexmk.
I invoked Emacs with -q option (that is, invoke it without any settings) and evaluated the following code in the scratch buffer.

(require 'cask) ;; I assume that auctex and auctex-latexmk are installed via package.el or cask.el
(cask-initialize)
(auctex-latexmk-setup)

And I tried to compile the following TeX file using C-c C-a.

\documentclass{article}

\begin{document}
aaaa
\end{document}

Finally, I could see the preview.

Could you reproduce the issue with -q option?

from auctex-latexmk.

ellio167 avatar ellio167 commented on June 12, 2024

Hi, Thanks for your reply.

I'm using brew for my emacs and auctex

$ brew info emacs
emacs: stable 24.5 (bottled), devel 25.1-rc1, HEAD
GNU Emacs text editor
https://www.gnu.org/software/emacs/
/usr/local/Cellar/emacs/24.5 (3,916 files, 96.9M) *
  Built from source on 2016-06-01 at 09:02:35 with: --with-x11
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/emacs.rb
$ brew info auctex
homebrew/tex/auctex: stable 11.89, HEAD
Emacs package for writing and formatting TeX
https://www.gnu.org/software/auctex/
/usr/local/Cellar/auctex/11.89 (504 files, 4.9M) *
  Built from source on 2016-03-20 at 18:08:01
From: https://github.com/Homebrew/homebrew-tex/blob/master/Formula/auctex.rb

If I use emacs -q and execute

(add-to-list 'load-path "~/share/emacs/site-lisp/auctex-latexmk")
(require 'auctex-latexmk)
(auctex-latexmk-setup)

then C-c C-a works fine. However, if I use emacs -q and execute

(load "auctex.el" nil t t)
;;
(add-hook 'LaTeX-mode-hook
          (function (lambda ()
                      ;; general setup
                      (turn-on-reftex)
                      (LaTeX-math-mode)
                      (setq-local comment-column 0)
                      (setq-local comment-padding 1)
                      (setq-local TeX-parse-self t)
                      ;; set default indent values
                      (setq-local LaTeX-indent-environment-list ())
                      (setq-local LaTeX-indent-level 0)
                      (setq-local LaTeX-item-indent 0)
                      (setq-local TeX-brace-indent-level 0)
                      (local-set-key [return]
                                     'reindent-then-newline-and-indent)
                      ;; setup latexmk to work with auctex
                      (add-to-list 'load-path "~/share/emacs/site-lisp/auctex-latexmk")
                      (require 'auctex-latexmk)
                      (auctex-latexmk-setup)
                      (setq-local TeX-command-default "LatexMK")
                      (setq-local auctex-latexmk-inherit-TeX-PDF-mode t)
                      ;; settings to make interaction with Skim work
                      (TeX-source-correlate-mode)
                      (add-to-list 'TeX-view-program-selection
                                   '(output-pdf "PDF Viewer"))
                      (add-to-list 'TeX-view-program-list
                                   '("PDF Viewer" "/Applications/Skim.app/Contents/SharedSupport/displayline -b -g %n %o %b"))
                      ;; settings for clean up
                      (add-to-list 'LaTeX-clean-intermediate-suffixes
                                   "\\.spl" "\\.tex~")
                      )))

then C-c C-a produces the error I mentioned previously.

from auctex-latexmk.

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

Sorry for late reply.

I finally found that.

                 (setq-local TeX-command-default "LatexMK")

Please use "LatexMk" instead of "LatexMK".

from auctex-latexmk.

ellio167 avatar ellio167 commented on June 12, 2024

Yes! That does it. Such a stupid mistake. Thanks for finding my error and for a nice package!

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.