Angus Leeming wrote:

> On Friday 19 April 2002 3:04 pm, Herbert Voss wrote:
> 
>>Juergen Spitzmueller wrote:
>>
>>>Herbert Voss wrote:
>>>
>>>>>But can't we anymore have \includegraphics[...]{my}?
>>>>>Didn't we say this is good if we want pdf and ps output?
>>>>>
>>>>It's not an important question for me, so I can't really
>>>>say what's the right way. but writing it in the above
>>>>way is only a one-line-patch.
>>>>
>>>If it's easy, please do!
>>>I have lots of pictures inserted without extension to have the ability of
>>>pdflatex and latex runs. I have to change all these otherwise.
>>>
>>attached,
>>
>>Herbert
>>
> 
> Herbert, prepareFile removes the extension in some cases also. Can you strip 
> that code out too to remoce the redundancy?


thanks Angus,


here is a better one


Herbert

-- 
http://www.lyx.org/help/
Index: src/insets/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v
retrieving revision 1.399
diff -u -r1.399 ChangeLog
--- src/insets/ChangeLog        19 Apr 2002 14:16:07 -0000      1.399
+++ src/insets/ChangeLog        19 Apr 2002 16:50:29 -0000
@@ -1,3 +1,8 @@
+2002-04-19  Herbert Voss  <[EMAIL PROTECTED]>
+
+       * insetgraphic.C (prepareFile): return filename without
+       extension if we only export without compiling
+
 2002-04-19  Juergen Vigna  <[EMAIL PROTECTED]>
 
        * insettext.C (draw): call a fullRebreak on the row where we had a
Index: src/insets/insetgraphics.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetgraphics.C,v
retrieving revision 1.104
diff -u -r1.104 insetgraphics.C
--- src/insets/insetgraphics.C  12 Apr 2002 13:50:04 -0000      1.104
+++ src/insets/insetgraphics.C  19 Apr 2002 16:50:29 -0000
@@ -614,11 +614,14 @@
        string filename_  = params().filename;
        bool const zipped = zippedFile(filename_);
 
-       if ((zipped && params().noUnzip) || buf->niceFile) {
+       if (zipped && params().noUnzip) {
                lyxerr[Debug::GRAPHICS] << "don't unzip file or export latex"
                                    << filename_ << endl;
                return filename_;
        }
+       // only export latex without compiling the file
+       if (buf->niceFile)
+               return RemoveExtension(filename_);
 
        // Enable these helper functions to find the file if it is stored as
        // a relative path.

Reply via email to