]> git.lyx.org Git - features.git/commitdiff
Use scaling factor in XHTML output.
authorRichard Heck <rgheck@lyx.org>
Sun, 31 Jul 2016 01:57:52 +0000 (21:57 -0400)
committerRichard Heck <rgheck@lyx.org>
Sun, 31 Jul 2016 02:02:48 +0000 (22:02 -0400)
(cherry picked from commit 47c52db13e2f58224d31a2e26a69320f1f5b16cf)

ANNOUNCE
src/insets/InsetGraphics.cpp
status.22x

index 1397ebb92664e2612aa693c6d7057f09dc1ed3fb..d3312067b523218bb135e56ae228afda2ecda98a 100644 (file)
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,27 +1,29 @@
-Public release of LyX version 2.2.1
+Public release of LyX version 2.2.2
 ===================================
 
-We are proud to announce the release of LyX 2.2.1. This is the first
-maintenance release in the 2.2.x series. You can download LyX 2.2.1 from http://www.lyx.org/Download/.
+We are proud to announce the release of LyX 2.2.2. This is the second
+maintenance release in the 2.2.x series. 
+
+You can download LyX 2.2.2 from http://www.lyx.org/Download/.
 
 LyX is a document processor that encourages an approach to writing based 
 on the structure of your documents and not simply their appearance. It is
 released under a Free and Open Source Software license.
 
-LyX 2.2.1 is the result of on-going efforts to make our stable version more 
+LyX 2.2.2 is the result of on-going efforts to make our stable version more 
 reliable and more stable. We have fixed a number of bugs and made a number 
 of improvements. Most of these are relatively minor, but we nonetheless
-encourage all users of 2.2.0 to upgrade to this version.
+encourage all users of 2.2.1 to upgrade to this version.
+
+
 
-One important change is to the behavior of character styles. By default,
-these now prohibit changes to the paragraph layout. Putting a description 
-inside a character style typically results in invalid LaTeX code, so this 
-makes certain mistakes harder to make. Power users who have taken advantage 
-of the previous behavior can restore it by adding "ForcePlain 0" to the 
-declaration of the character style, so long as this is done after "LyXType 
-charstyle" has been declared.
+One new feature is the use of the "scaling" option when exporting images
+for XHTML. This does not work the same way as with LaTeX export. What it
+does is add something like "width: 50%" to the style attribute. This will
+ordinarily be interpreted by the browser as a percentage relative to the
+current element.
 
-If you think you have found a bug in LyX 2.2.1, please open a bug report at
+If you think you have found a bug in LyX 2.2.2, please open a bug report at
 http://www.lyx.org/trac/wiki/BugTrackerHome. If you're not sure whether it
 really is a bug, you can e-mail the LyX developers' mailing list (lyx-devel 
 <at> lists.lyx.org) and ask. 
@@ -31,7 +33,7 @@ documentation that comes with LyX and the LyX wiki, which lives at
 http://wiki.lyx.org/. If you can't find the answer there, e-mail the LyX 
 users' list (lyx-users <at> lists.lyx.org).
 
-We hope you enjoy using LyX 2.2.1.
+We hope you enjoy using LyX 2.2.2.
 
 The LyX team.
 http://www.lyx.org
index 04faae74a4481e0cad4fcacc445ee6950ef7e4fc..92203620b420b80337a30c054ba551635c7c551d 100644 (file)
@@ -964,10 +964,20 @@ docstring InsetGraphics::xhtml(XHTMLStream & xs, OutputParams const & op) const
        // really be better to do width and height conversion, rather than to output
        // these parameters here.
        string imgstyle;
-       if (!params().width.zero())
-               imgstyle += "width:" + params().width.asHTMLString() + ";";
-       if (!params().height.zero())
-               imgstyle += " height:" + params().height.asHTMLString() + ";";
+       bool const havewidth  = !params().width.zero();
+       bool const haveheight = !params().height.zero();
+       if (havewidth || haveheight) {
+               if (havewidth)
+                       imgstyle += "width:" + params().width.asHTMLString() + ";";
+               if (haveheight)
+                       imgstyle += " height:" + params().height.asHTMLString() + ";";
+       } else if (params().scale != "100") {
+               // Note that this will not have the same effect as in LaTeX export:
+               // There, the image will be scaled from its original size. Here, the
+               // percentage will be interpreted by the browser, and the image will
+               // be scaled to a percentage of the window size.
+               imgstyle = "width:" + params().scale + "%;";
+       }
        if (!imgstyle.empty())
                imgstyle = "style='" + imgstyle + "' ";
 
index c8c7fa17c9e3a87095198743905cfa4eefc2183e..36b528c8d3601fe73a9e5aa69f9773660fbf0d97 100644 (file)
@@ -6,6 +6,7 @@ All comments are welcome.
 We try to group things by topic and in decreasing order of importance.
 Please feel free to re-arrange if that seems like a good idea.
 
+
 What's new
 ==========
 
@@ -37,6 +38,9 @@ What's new
 
 * DOCUMENT INPUT/OUTPUT
 
+- We no longer attempt to convert images for which we cannot find an
+  input format.
+
 
 * LYX2LYX
 
@@ -79,6 +83,8 @@ What's new
 
 - Fix display of several math symbols (bug 8844).
 
+- Use scaling factor for export of images (bug 8742).
+
 
 * TEX2LYX