[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Latex source specials with files in sub directories
From: |
no |
Subject: |
Re: Latex source specials with files in sub directories |
Date: |
7 Nov 2002 16:43:06 -0800 |
I figured it out myself !! I don't know lisp, but I was able to hack
tex.el to do what I need:
There is a function in tex.el (under auctex) that is defined as:
(defun TeX-current-file-name-nondirectory ()
"Return current filename, without path."
(file-name-nondirectory buffer-file-name))
Change this to:
% Modified by Sumit (gupg-REMOVE-SPAM-FILTER@yahoo.com)
(defun TeX-current-file-name-nondirectory ()
"Return current filename, with path relative to Tex-master."
(file-relative-name (expand-file-name buffer-file-name)
(TeX-master-directory)))
Basically, the first variant just puts the current buffer's file name
and new one gets the file name of the current buffer with its path
relative to the tex-master (the main file from where the other tex
files are being included).
Sumit
notest@hotmail.com (no) wrote in message
news:<277e712a.0211070954.62717c9e@posting.google.com>...
> Hi
>
> I have a directory/file structure like this
> main.tex
> contains a call
> include{subDir/file2.tex}
>
> now I view and compile main.tex with source specials enabled in Emacs.
>
> However, when I try to view the dvi, the command line generated by
> emacs is
> xdvi main.tex --sourceposition 100:file.tex
> instead of
> xdvi main.tex --sourceposition 100:subDir/file.tex
>
> the 1st command line does not work, however, the second one works (I
> verified that in a shell).
>
> I am using the latest beta latex and emacs 21.2.1
>
> Got any idea how I can fix this ?