Skip to content

syohex/auctex-latexmk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 

Repository files navigation

auctex-latexmk.el

This library adds LatexMk support to AUCTeX.

Requirements:

  • AUCTeX
  • LatexMk
  • TeXLive (2011 or later if you write TeX source in Japanese)

You can install it by using package-install via MELPA.

To use this package, add the following line to your .emacs file:

    (require 'auctex-latexmk)
    (auctex-latexmk-setup)

After that, by using M-x TeX-command-master (or C-c C-c), you can use LatexMk command to compile TeX source.

LatexMk will inherit many AUCTeX settings, including:

  • Run with -interaction-nonestopmode if TeX-interactive-mode minor mode is active
  • Run with -synctex if TeX-source-correlate-mode is active

If you would like LatexMk to aso pass the -pdf flag when TeX-PDF-mode is active add

    (setq auctex-latexmk-inherit-TeX-PDF-mode t)

to your .emacs file.

Additional configuration of latexmk is possible by creating a ~/.latexmkrc file. For example, to always compile to pdf add the following line to your .latexmkrc file:

# .latexmkrc starts
$pdf_mode = 1;
# .latexmkrc ends

Additional documention describing all the available options is available on CTAN.

For Japanese users:

LatexMk command automatically stores the encoding of a source file and passes it to latexmk via an environment variable named LATEXENC. Here is the example of .latexmkrc to use LATEXENC:

    # .latexmkrc starts
    $kanji    = "-kanji=$ENV{\"LATEXENC\"}" if defined $ENV{"LATEXENC"};
    $latex    = "platex -interaction=nonstopmode $kanji";
    $bibtex   = 'pbibtex $kanji';
    $dvipdf   = 'perl -e "exec(\'dvipdfmx\', \$ARGV[0])"';
    $pdf_mode = 3;
    # .latexmkrc ends

About

This library adds LatexMk support to AUCTeX.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%