I don't want to be difficult, but this patch does not give correct behavior. In particular, this is not true: > Assume you have a 2cm x 4cm image and want to have it in double size. > So you would write in the dialog the values 4cm x 8cm but as the > smaller value is taken as border you get as result again 2cm x4cm image. This is what the graphicx documentation says:
*keepaspectratio* Boolean valued key like 'clip'. If set to true then specifying both 'width' and 'height' (or 'totalheight') does not distort the figure but scales such that neither of the specified dimensions is exceeded. This seems the desirable behavior. One wants to be able to say "Scale this image but do not allow it to take up more than Wcm or Hcm". And one wants that to remain a correct instruction even if the size and aspect ratio of the image change. The attached LaTeX file and graphic demonstrate how this works. The graphic itself is (about) 2cm wide by 1cm high. For the first image, we have the options [width=4cm, height=1.5cm, keepaspectratio], and we get a graphic that is 3cm wide and 1.5 cm high. That's as big as it can get without exceeding either value. For the second image, we have the options [width=2cm, height=1.5cm, keepaspectratio]. If it were only the smaller figure that mattered, as Uwe's patch assumes, then the size of the graphic would not change. But it does. You get a graphic that is 2cm wide and 1 cm high. So the problem with Uwe's patch is that it makes it impossible to have either of these sets of options. It forces you to have width=height if you have keepaspectratio. So it seems to me that only a more extensive re-working of the dialog, along the lines proposed in http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg113354.html will do the trick here. The idea developed in that patch is to use elements of the dialog to give the user visual feedback about the effects of setting, or not setting, different options. Another advantage to that approach is that it could also be used elsewhere---whenever we want to indicate that, if an option is not specified, then the value is calculated automatically. If the basic idea here seems reasonable, then I'll finish that work. There's only a little more to be done. Richard -- ================================================================== Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ ================================================================== Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
%% LyX 1.4.4 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{paper} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{geometry} \geometry{verbose,letterpaper,tmargin=1in,bmargin=1in,lmargin=1.25in,rmargin=1.25in} \setlength{\parskip}{\medskipamount} \setlength{\parindent}{0pt} \usepackage{graphicx} \usepackage{setspace} \onehalfspacing \makeatletter \usepackage{babel} \makeatother \begin{document} Text above. \includegraphics[width=4cm,height=1.5cm,keepaspectratio]{/home/rgheck/files/graphics/test} More text. \includegraphics[width=2cm,height=1.5cm,keepaspectratio]{/home/rgheck/files/graphics/test} Text below. \end{document}