🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #12055

Re: Latex source specials with files in sub directories

#12055
From: no
Date: Fri, 08 Nov 2002 00:43
45 lines
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 ?
Technical Details
Message-ID: <277e712a.0211071643.791da4ed@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
References: <277e712a.0211070954.62717c9e@posting.google.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f9e16,3dbb5657b93a310
X-Google-Attributes: gidf9e16,public
X-Google-Thread: 102b9a,3dbb5657b93a310
X-Google-Attributes: gid102b9a,public
X-Google-Thread: 103b8b,3dbb5657b93a310
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 2002-11-07 16:43:07 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: notest@hotmail.com (no)
Newsgroups: comp.text.tex,gnu.emacs.help,comp.emacs
Subject: Re: Latex source specials with files in sub directories
Date: 7 Nov 2002 16:43:06 -0800
Organization: http://groups.google.com/
Lines: 45
Message-ID: <277e712a.0211071643.791da4ed@posting.google.com>
References: <277e712a.0211070954.62717c9e@posting.google.com>
NNTP-Posting-Host: 128.195.175.201
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1036716187 21119 127.0.0.1 (8 Nov 2002 00:43:07 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 8 Nov 2002 00:43:07 GMT