Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tom-tan/auctex-latexmk
This library adds LatexMk support to AUCTeX.
https://github.com/tom-tan/auctex-latexmk
auctex emacs emacs-lisp latexmk melpa
Last synced: 2 months ago
JSON representation
This library adds LatexMk support to AUCTeX.
- Host: GitHub
- URL: https://github.com/tom-tan/auctex-latexmk
- Owner: tom-tan
- Created: 2013-05-19T15:42:40.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2022-04-15T17:35:43.000Z (over 2 years ago)
- Last Synced: 2024-08-05T06:06:38.252Z (5 months ago)
- Topics: auctex, emacs, emacs-lisp, latexmk, melpa
- Language: Emacs Lisp
- Size: 31.3 KB
- Stars: 91
- Watchers: 7
- Forks: 24
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# auctex-latexmk.el
[![MELPA Stable](https://stable.melpa.org/packages/auctex-latexmk-badge.svg)](https://stable.melpa.org/#/auctex-latexmk)
[![MELPA](http://melpa.org/packages/auctex-latexmk-badge.svg)](http://melpa.org/#/auctex-latexmk)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](https://melpa.org/).
To use this package, add the following line to your `.emacs` file:
```elisp
(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 activeIf you would like LatexMk to pass the `-pdf` flag when `TeX-PDF-mode` is
active add
```elisp
(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:
```perl
# .latexmkrc starts
$pdf_mode = 1;
# .latexmkrc ends
```
Additional documention describing all the available options is available on
[CTAN](http://ctan.org/pkg/latexmk).### For MikTex users
Due to the [bug in MikTex](https://sourceforge.net/p/miktex/bugs/2310/), 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`:
```perl
# .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
```