Am Donnerstag, 21. Oktober 2004 20:38 schrieb Angus Leeming:
> Georg Baum wrote:
> 
> > Angus Leeming wrote:
> > 
> >> Georg Baum wrote:
> >> 
> >>> No. This is 1.3 behaviour, 1.4 creates 'images/img.pstex_t' and
> >>> 'images/img.eps.' This is alo a case where the converter is called 
on
> >>> the original file and therefore modifies it :-(((
> >> 
> >> Not so. It modifies a COPY of the original file. That's a big
> >> difference.
> > 
> > Not for latex export. For dvi, ps, pdf export, yes. The reason was
> > probably that we don't want the mangled file names in the .tex file.
> > 
> >> Ok, so the bottom line is that a call to
> >>         Export->Latex
> >> results in everything that would be needed to compile buffer.tex 
being
> >> placed in the /tmp/lyx_tmp.../lyx_tmpbuf0/ directory? The only
> >> conceptual
> > 
> > No. The original files are converted where they are, but we should
> > convert copies in the tmp directory.
> 
> You mean that if buffer.lyx has a graphics inset referencing foo.eps, 
then
> generating the DVI file does not result in a copy of foo.eps being 
placed
> in the temp directory? I'll take your word for it, but a single 
directory
> containing all necessary files would be neater somehow, no?

No, not for DVI files. Today seems to be the day of 
misunderstandings ;-( In addition, I have rechecked, and it turns out 
that what I wrote applies only to the external inset, not to the graphics 
inset. The graphics inset does all conversions in the temp dir, on copies 
of the original files, as it should be.
The external inset is different. For latex export (read: runparams.nice == 
true), it does do the conversions directly on the original file. For all 
other formats it does the conversions in the temp dir.

I tried to change the external inset: Do all conversions in the temp dir, 
and copy the results back afterwards. But then we have the problem that 
the .pstex_t file contains \includegraphics{<mangled name>}, because 
fig2pstex.sh sees only the temp file. I currently don't know how to 
change that without being too smart.

> >>> Another problem is that fig2pstex.sh does not know of latex's stupid
> >>> interpretation of relative filenames (relative to the master 
document,
> >>> not the included one. Therefore images/img.pstex_t contains
> >>> \includegraphics{img}, and this fails of course.
> >> 
> >> Ok, I understand your point. I don't think that it's right because my
> >> 'nasty' hack changes that to \includegraphics{<absolute path 
to>/img},
> >> no?
> > 
> > ???
> > It replaces the filename in the .fig file, not the filename in the
> > .pstex_t file. The latter is wrong, the .fig file is ok. Now I get
> > confused ;-)
> 
> But the .pstex_t file is generated from the .fig file. I'd investigate
> further, but Jean-Marc's quotes are biting me.

It is generated from the .fig file, but your hack does not change its name 
(at least it did not when I tried it).

I hope this time I am not confusing!


A related question: It seems that the entries in lib/external-templates 
for xfig are wrong. I think they should be modified (see attachment), 
since fig2pstex.sh creates an .eps file and no .pstex file, fig2pdftex.sh 
is similar. Please confirm wether this is correct or not.


Georg
--- lyx-1.4-clean/lib/external_templates	2004-06-01 15:32:22.000000000 +0200
+++ lyx-1.4-cvs/lib/external_templates	2004-10-21 21:01:43.000000000 +0200
@@ -122,8 +122,8 @@
 		# Preamble WarnNotFound
 		# Preamble InputOrWarn
 		ReferencedFile latex "$$AbsPath$$Basename.pstex_t"
-		ReferencedFile latex "$$AbsPath$$Basename.pstex"
-		ReferencedFile dvi   "$$AbsPath$$Basename.pstex"
+		ReferencedFile latex "$$AbsPath$$Basename.eps"
+		ReferencedFile dvi   "$$AbsPath$$Basename.eps"
 	FormatEnd
 	Format PDFLaTeX
 		TransformCommand Rotate RotationLatexCommand
@@ -135,7 +135,7 @@
 		# Preamble WarnNotFound
 		# Preamble InputOrWarn
 		ReferencedFile latex "$$AbsPath$$Basename.pdftex_t"
-		ReferencedFile latex "$$AbsPath$$Basename.pdftex"
+		ReferencedFile latex "$$AbsPath$$Basename.pdf"
 	FormatEnd
 	Format Ascii
 		Product "$$Contents(\"$$AbsPath$$Basename.asc\")"

Reply via email to