mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-14 09:32:20 +00:00
* src/insets/insetgraphics.C
(InsetGraphics::prepareFile): Rename file in the temp dir if the extension does not match the format (bug 2235) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@13900 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5edcf97c19
commit
cb99a55588
@ -681,6 +681,21 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
|
|||||||
<< "\tthe orig file is: " << orig_file << endl;
|
<< "\tthe orig file is: " << orig_file << endl;
|
||||||
|
|
||||||
if (from == to) {
|
if (from == to) {
|
||||||
|
if (!runparams.nice && GetExtension(temp_file) != ext) {
|
||||||
|
// The LaTeX compiler will not be able to determine
|
||||||
|
// the file format from the extension, so we must
|
||||||
|
// change it.
|
||||||
|
string const new_file = ChangeExtension(temp_file, ext);
|
||||||
|
if (lyx::support::rename(temp_file, new_file)) {
|
||||||
|
temp_file = new_file;
|
||||||
|
output_file = ChangeExtension(output_file, ext);
|
||||||
|
source_file = ChangeExtension(output_file, ext);
|
||||||
|
} else
|
||||||
|
lyxerr[Debug::GRAPHICS]
|
||||||
|
<< "Could not rename file `"
|
||||||
|
<< temp_file << "' to `" << new_file
|
||||||
|
<< "'." << endl;
|
||||||
|
}
|
||||||
// The extension of temp_file might be != ext!
|
// The extension of temp_file might be != ext!
|
||||||
runparams.exportdata->addExternalFile(tex_format, source_file,
|
runparams.exportdata->addExternalFile(tex_format, source_file,
|
||||||
output_file);
|
output_file);
|
||||||
|
@ -64,6 +64,9 @@ What's new
|
|||||||
|
|
||||||
- Update templates and examples to latest file format.
|
- Update templates and examples to latest file format.
|
||||||
|
|
||||||
|
- Make jpeg graphics with suffix in capital letters (.JPG) work with
|
||||||
|
pdflatex (bug 2235)
|
||||||
|
|
||||||
* Math editor:
|
* Math editor:
|
||||||
|
|
||||||
- Fix metrics of AMS array environments like bmatrix, vmatrix etc. (bug 2036)
|
- Fix metrics of AMS array environments like bmatrix, vmatrix etc. (bug 2036)
|
||||||
|
Loading…
Reference in New Issue
Block a user