auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] patch for preview-latex to reduce file clutter and no


From: Tim Toolan
Subject: Re: [AUCTeX-devel] patch for preview-latex to reduce file clutter and not overwrite document
Date: Mon, 17 Nov 2008 09:12:23 -0500
User-agent: Internet Messaging Program (IMP) H3 (4.2)

Quoting "David Kastrup" <address@hidden>:

"Tim Toolan" <address@hidden> writes:

Hello,

First, I must thank the developers of preview-latex for this really
great package.

Included is a small patch for preview-latex that does three things:

1) Greatly reduces file clutter.  When generating previews, only two
   things are added to the main tex directory, a directory called
   MASTERTEXFILE.prv and a file called file _region_.tex.  All other
   files generated when creating previews, including previews of
   regions, are placed in the directory MASTERTEXFILE.prv.

2) Any typeset version of the document, such as a .pdf or .dvi file is
   left alone.  Previously they were deleted when generating a preview.

3) Auxilary files are created for previews since there is no longer
   any danger of clobbering anything.

How does this play together with \include ?

The \include function is defined as:

\def\include#1{\relax
  address@hidden@partaux
    address@hidden@error{\string\include\space cannot be address@hidden
  \else address@hidden \fi}

which means it is just a simple wrapper to address@hidden There are only two lines changed in the address@hidden function, and they are:
  1) When the command is written to the master aux file to input the
     the aux file for the included tex file, it modifies any path
     component in the filename string that is written.  In otherwords,
     instead of writing
       address@hidden/chap1.aux}
     it writes
       address@hidden
     to masterfile.aux.
  2) When TeX creates the aux file which corresponds to the included file
     for writing it also modifies the path component similarly.

This modification should be safe anytime, whether or not using the preview package or the -output-directory option.

I tried to implement it using a \let for \include that alters the argument to modify itself when it is followed by the string ".aux", but because the argument is used in a \write command, and any implementation would require a \futurelet statement, it is not possible to do it this way.

-Tim







reply via email to

[Prev in Thread] Current Thread [Next in Thread]