branch: externals/auctex-cont-latexmk commit 2893258541723b1306f732b408e3450dbfde505f Author: Paul Nelson <ultr...@gmail.com> Commit: Paul Nelson <ultr...@gmail.com>
docs --- README.org | 23 +++++++++++++++++++++++ czm-tex-compile.el | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org new file mode 100644 index 0000000000..f43bd2fce5 --- /dev/null +++ b/README.org @@ -0,0 +1,23 @@ +#+title: czm-preview.el: Convenience functions for compiling LaTeX +#+author: Paul Nelson + +* Overview +This package provides convenience functions that support a LaTeX workflow where =latexmk= continuously compiles the document in the background. + +* Configuration +Download this repository, install using =M-x package-install-file= (or package-vc-install, straight, elpaca, ...), and add something like the following to your [[https://www.emacswiki.org/emacs/InitFile][init file]]: +#+begin_src elisp +(use-package czm-tex-compile + :bind + ("C-c k" . czm-tex-compile) + ("s-]" . czm-tex-compile-next-error) + ("s-[" . czm-tex-compile-previous-error)) +#+end_src +Replace the keybindings with whatever you prefer (or delete them and just run the commands via =M-x=). + +* Usage + +- If you run =czm-tex-compile= in a TeX buffer visiting "foo.tex", it starts an =eshell= buffer =*eshell-foo*= in the background that continuously compiles the current document. Use =M-x customize-variable czm-tex-compile-command= to customize the compilation command. If you run the same command again, then it switches to the =eshell= buffer. +- =czm-tex-compile-next-error= and =czm-tex-compile-previous-error= navigate the error and warning messages encountered in the log file produced by =latexmk=, jumping to the corresponding positions in the tex buffer. + +That's all. I prefer this workflow to the alternative in which one compiles the document manually via =TeX-command-master= (=C-c C-c=) and navigates the warning/error messages using =next-error= (=M-n=) and =previous-error (=M-p=). It also gives a handy way to keep the .aux files up-to-date; I take advantage of this feature in the packages [[https://github.com/ultronozm/czm-preview.el][czm-preview.el]] and [[https://github.com/ultronozm/czm-tex-fold.el][czm-tex-fold.el]] to annotate th [...] diff --git a/czm-tex-compile.el b/czm-tex-compile.el index 3d20563403..6f7786c60c 100644 --- a/czm-tex-compile.el +++ b/czm-tex-compile.el @@ -1,11 +1,11 @@ -;;; czm-tex-compile.el --- Convenience functions compiling LaTeX -*- lexical-binding: t; -*- +;;; czm-tex-compile.el --- Convenience functions for compiling LaTeX -*- lexical-binding: t; -*- ;; Copyright (C) 2023 Paul D. Nelson ;; Author: Paul D. Nelson <nelson.paul.da...@gmail.com> ;; Version: 0.0 ;; URL: https://github.com/ultronozm/czm-tex-compile.el -;; Package-Requires: ((emacs "29.1") (auctex "11.86.1")) +;; Package-Requires: ((emacs "29.1")) ;; Keywords: tex ;; This program is free software; you can redistribute it and/or modify