all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Latex source specials with files in sub directories
@ 2002-11-07 17:54 no
  2002-11-08  0:43 ` no
  0 siblings, 1 reply; 2+ messages in thread
From: no @ 2002-11-07 17:54 UTC (permalink / raw)


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 ?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Latex source specials with files in sub directories
  2002-11-07 17:54 Latex source specials with files in sub directories no
@ 2002-11-08  0:43 ` no
  0 siblings, 0 replies; 2+ messages in thread
From: no @ 2002-11-08  0:43 UTC (permalink / raw)


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 ?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-08  0:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-07 17:54 Latex source specials with files in sub directories no
2002-11-08  0:43 ` no

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.