Thread View: comp.text.tex
2 messages
2 total messages
Started by no
Thu, 07 Nov 2002 17:54
Latex source specials with files in sub directories
Author: no
Date: Thu, 07 Nov 2002 17:54
Date: Thu, 07 Nov 2002 17:54
21 lines
1542 bytes
1542 bytes
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 ?
Re: Latex source specials with files in sub directories
Author: no
Date: Fri, 08 Nov 2002 00:43
Date: Fri, 08 Nov 2002 00:43
45 lines
2558 bytes
2558 bytes
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 ?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads