-----------------------
+2015-07-16 Georg Baum <Georg.Baum@post.rwth-aachen.de>
+ * Format incremented to 496
+ Remove noUnzip parameter of InsetGraphics
+
2015-05-24 Jürgen Spitzmüller <spitz@lyx.org>
* Format incremented to 495: Rename sub: refprefix to subsec: in order
to prevent clash of \\subref command with subfloat package.
\begin_inset Newline newline
\end_inset
-The
-\family sans
-Don't
-\begin_inset space ~
-\end_inset
-
-unzip
-\begin_inset space ~
-\end_inset
-
-on
-\begin_inset space ~
-\end_inset
-
-export
-\family default
- option only affects zipped EPS-graphics, e.
-\begin_inset space \thinspace{}
-\end_inset
-
-g.
-\begin_inset space \space{}
-\end_inset
-
-
-\emph on
-x.eps.gz
-\emph default
-.
- When the option is used the images will not be unzipped on export, since
- \SpecialChar LaTeX
- can handle them as they are.
-\begin_inset Newline newline
-\end_inset
-
-Zipped EPS-graphics are useful to save disk space when you choose PostScript
- as output format, see appendix
-\begin_inset space ~
-\end_inset
-
-
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:PostScript"
-
-\end_inset
-
-.
- To zip EPS-graphics, use the following commands in a UNIX-shell or a Windows
- console:
-\begin_inset Newline newline
-\end_inset
-
-
-\series bold
-gzip x.eps
-\series default
-
-\begin_inset Newline newline
-\end_inset
-
-
-\series bold
-zgrep %%Bounding x.eps.gz > x.eps.bb
-\series default
-
-\begin_inset Newline newline
-\end_inset
-
-The second command creates the bounding box file
-\begin_inset Quotes eld
-\end_inset
-
-x.eps.bb
-\begin_inset Quotes erd
-\end_inset
-
- that is needed by \SpecialChar LaTeX
- for zipped graphics.
-\begin_inset Newline newline
-\end_inset
-
In the section
\family sans
Graphics
\family default
has the effect that the image doesn't appear in the output, only a frame
with the image size is printed.
- The option
-\family sans
-Don't
-\begin_inset space ~
-\end_inset
-
-unzip
-\begin_inset space ~
-\end_inset
-
-on
-\begin_inset space ~
-\end_inset
-
-export
-\family default
- is explained in the
-\emph on
-Embedded
-\begin_inset space ~
-\end_inset
-
-Objects
-\emph default
- manual in section
-\emph on
-Graphics Dialog
-\emph default
-.
\end_layout
\begin_layout Standard
\family default
has the effect that the image doesn't appear in the output, only a frame
with the image size is printed.
- The option
-\family sans
-Don't
-\begin_inset space ~
-\end_inset
-
-unzip
-\begin_inset space ~
-\end_inset
-
-on
-\begin_inset space ~
-\end_inset
-
-export
-\family default
- is explained in the
-\emph on
-Embedded Objects
-\emph default
- manual in section
-\emph on
-Graphics Dialog
-\emph default
-.
\end_layout
\begin_layout Standard
("1_6", list(range(277,346)), minor_versions("1.6" , 10)),
("2_0", list(range(346,414)), minor_versions("2.0" , 8)),
("2_1", list(range(414,475)), minor_versions("2.1" , 0)),
- ("2_2", list(range(475,496)), minor_versions("2.2" , 0))
+ ("2_2", list(range(475,497)), minor_versions("2.2" , 0))
]
####################################################################
i += 1
+def convert_nounzip(document):
+ " remove the noUnzip parameter of graphics insets "
+
+ rx = re.compile(r'\s*noUnzip\s*$')
+ i = 0
+ while True:
+ i = find_token(document.body, "\\begin_inset Graphics", i)
+ if i == -1:
+ break
+ j = find_end_of_inset(document.body, i)
+ if j == -1:
+ document.warning("Malformed LyX document: Can't find end of graphics inset at line " + str(i))
+ i += 1
+ continue
+
+ k = find_re(document.body, rx, i, j)
+ if k != -1:
+ del document.body[k]
+ j = j - 1
+ i = j + 1
+
+
##
# Conversion hub
#
[492, [convert_colorbox]],
[493, []],
[494, []],
- [495, [convert_subref]]
+ [495, [convert_subref]],
+ [496, [convert_nounzip]]
]
revert = [
+ [495, []], # nothing to do since the noUnzip parameter was optional
[494, [revert_subref]],
[493, [revert_jss]],
[492, [revert_mathmulticol]],
this, SLOT(change_adaptor()));
connect(draftCB, SIGNAL(stateChanged(int)),
this, SLOT(change_adaptor()));
- connect(unzipCB, SIGNAL(stateChanged(int)),
- this, SLOT(change_adaptor()));
// FIXME: we should connect to clicked() when we move to Qt 4.2 because
// the toggled(bool) signal is also trigged when we update the widgets
// (rgh-4/07) this isn't as much or a problem as it was, because we're now
bc().addReadOnly(filenameL);
bc().addReadOnly(filename);
bc().addReadOnly(browsePB);
- bc().addReadOnly(unzipCB);
bc().addReadOnly(bbFrame);
bc().addReadOnly(draftCB);
bc().addReadOnly(clip);
- bc().addReadOnly(unzipCB);
bc().addReadOnly(displayGB);
bc().addReadOnly(sizeGB);
bc().addReadOnly(rotationGB);
// Update the draft and clip mode
draftCB->setChecked(igp.draft);
clip->setChecked(igp.clip);
- unzipCB->setChecked(igp.noUnzip);
displayGB->setChecked(igp.display);
displayscale->setText(toqstr(convert<string>(igp.lyxscale)));
igp.keepAspectRatio = aspectratio->isChecked();
}
- igp.noUnzip = unzipCB->isChecked();
igp.lyxscale = displayscale->text().toInt();
igp.rotateAngle = widgetToDoubleStr(angle);
<property name="spacing" >
<number>6</number>
</property>
- <item row="2" column="0" colspan="3" >
- <widget class="QCheckBox" name="unzipCB" >
- <property name="toolTip" >
- <string>Don't uncompress image before exporting to LaTeX</string>
- </property>
- <property name="text" >
- <string>Don't un&zip on export</string>
- </property>
- </widget>
- </item>
<item row="0" column="2" >
<spacer>
<property name="orientation" >
<tabstop>getPB</tabstop>
<tabstop>latexoptions</tabstop>
<tabstop>draftCB</tabstop>
- <tabstop>unzipCB</tabstop>
<tabstop>displayGB</tabstop>
</tabstops>
<includes>
// determine the export format
string const tex_format = flavor2format(runparams.flavor);
- // If the file is compressed and we have specified that it
- // should not be uncompressed, then just return its name and
- // let LaTeX do the rest!
if (formats.isZippedFile(params().filename)) {
- if (params().noUnzip) {
- // We don't know whether latex can actually handle
- // this file, but we can't check, because that would
- // mean to unzip the file and thereby making the
- // noUnzip parameter meaningless.
- LYXERR(Debug::GRAPHICS, "\tpass zipped file to LaTeX.");
-
- FileName const bb_orig_file =
- FileName(changeExtension(orig_file, "bb"));
- if (runparams.nice) {
- runparams.exportdata->addExternalFile(tex_format,
- bb_orig_file,
- changeExtension(output_file, "bb"));
- } else {
- // LaTeX needs the bounding box file in the
- // tmp dir
- FileName bb_file =
- FileName(changeExtension(temp_file.absFileName(), "bb"));
- boost::tie(status, bb_file) =
- copyFileIfNeeded(bb_orig_file, bb_file);
- if (status == FAILURE)
- return orig_file;
- runparams.exportdata->addExternalFile(tex_format,
- bb_file);
- }
- runparams.exportdata->addExternalFile(tex_format,
- source_file, output_file);
- runparams.exportdata->addExternalFile("dvi",
- source_file, output_file);
- // We can't strip the extension, because we don't know
- // the unzipped file format
- return latex_path(output_file, EXCLUDE_EXTENSION);
- }
-
FileName const unzipped_temp_file =
FileName(unzippedFileName(temp_file.absFileName()));
output_file = unzippedFileName(output_file);
height = Length();
keepAspectRatio = false; // for LaTeX output
draft = false; // draft mode
- noUnzip = false; // unzip files
scaleBeforeRotation = false; // scale image before rotating
bb = string(); // bounding box
height = igp.height;
keepAspectRatio = igp.keepAspectRatio;
draft = igp.draft;
- noUnzip = igp.noUnzip;
scaleBeforeRotation = igp.scaleBeforeRotation;
bb = igp.bb;
left.height == right.height &&
left.keepAspectRatio == right.keepAspectRatio &&
left.draft == right.draft &&
- left.noUnzip == right.noUnzip &&
left.scaleBeforeRotation == right.scaleBeforeRotation &&
left.bb == right.bb &&
os << "\tkeepAspectRatio\n";
if (draft) // draft mode
os << "\tdraft\n";
- if (noUnzip)
- os << "\tnoUnzip\n";
if (scaleBeforeRotation)
os << "\tscaleBeforeRotation\n";
keepAspectRatio = true;
} else if (token == "draft") {
draft = true;
- } else if (token == "noUnzip") {
- noUnzip = true;
} else if (token == "scaleBeforeRotation") {
scaleBeforeRotation = true;
} else if (token == "BoundingBox") {
bool keepAspectRatio;
/// draft mode
bool draft;
- /// what to do with zipped files
- bool noUnzip;
/// scale image before rotating
bool scaleBeforeRotation;
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
#LyX file created by tex2lyx 2.2
-\lyxformat 495
+\lyxformat 496
\begin_document
\begin_header
\origin roundtrip
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
-#define LYX_FORMAT_LYX 495 // spitz: subsection ref prefix change
-#define LYX_FORMAT_TEX2LYX 495
+#define LYX_FORMAT_LYX 496 // gb: remove noUnzip parameter of InsetGraphics
+#define LYX_FORMAT_TEX2LYX 496
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
#ifndef _MSC_VER