unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: notest@hotmail.com (no)
Subject: Re: Latex source specials with files in sub directories
Date: 7 Nov 2002 16:43:06 -0800	[thread overview]
Message-ID: <277e712a.0211071643.791da4ed@posting.google.com> (raw)
In-Reply-To: 277e712a.0211070954.62717c9e@posting.google.com

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 ?

      reply	other threads:[~2002-11-08  0:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-07 17:54 Latex source specials with files in sub directories no
2002-11-08  0:43 ` no [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=277e712a.0211071643.791da4ed@posting.google.com \
    --to=notest@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).