Code Monkey home page Code Monkey logo

auctex-latexmk's Introduction

auctex-latexmk.el

MELPA Stable MELPA

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 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 MikTex users

Due to the bug in MikTex, you will see the following message if TeX-file-line-error is not nil.

Latexmk: Could not find file [%(file-line-error)].
-- Use the -f option to force complete processing.

As a workaround, add (setq TeX-file-line-error nil) to your .emacs file.

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 $kanji";
    $bibtex   = "pbibtex $kanji";
    $dvipdf   = 'dvipdfmx -o %D %S';
    $pdf_mode = 3;
    # .latexmkrc ends

auctex-latexmk's People

Contributors

izahn avatar kljohann avatar pkkm avatar seanfarley avatar syohex avatar tom-tan avatar wang1zhen avatar zakkak avatar

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.