auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TeX-master and TeX-output-master


From: Al Haji-Ali
Subject: Re: TeX-master and TeX-output-master
Date: Thu, 10 Sep 2020 10:13:53 +0100
User-agent: mu4e 1.5.5; emacs 28.0.50

Hello Uwe,

> I tested it, it works thanks. Later I will try out Index and friends
Great! If something doesn't work, can you please include an example tex file 
for me to test? As I said, I don't use "index and friends".

> I find this patch very useful for directories that contain very tex
> files since all the aux files create a bit of a mess.
Agreed. That's my motivation for it. Although I noticed that you use a global 
directory for all tex files: "/home/oub/blabla/built". I would be careful about 
doing that as having multiple tex files with the same name could create 
conflicting files in this directory. I use a relative path instead so that a 
directory is created next to the tex files which avoids the issue of name 
duplicates.

Also, you may find the following two functions useful. If executed on a tex 
file, the first copies the master output file (pdf or dvi) from the output 
directory to any directory (defaults to root master directory), the second 
function attaches the output file from the output directory to an email

(defun copy-tex-output ()
   (interactive)
   (let* ((default (expand-file-name (TeX-active-master nil)))
          (default-dir (file-name-directory default))
          (default-file (concat (file-name-nondirectory default) "." 
(TeX-output-extension)))
          (outputfile (expand-file-name (TeX-active-master 
(TeX-output-extension))))
          (filename (read-file-name "Save as:" default-dir
                     default-file nil default-file)))
     (copy-file outputfile filename t)))


(defun attach-tex-output ()
   (interactive)
   (require 'gnus-dired)
   (gnus-dired-attach (list (expand-file-name (TeX-active-master 
(TeX-output-extension))))))

Best regards,
-- Al



reply via email to

[Prev in Thread] Current Thread [Next in Thread]