Re: [O] [bug] new beamer exporter always adds default width to graphics
On Mar 12, 2013 10:38 PM, "Jay Kerns" wrote: > Yes, the same thing happened to me too, and yes, there was a change > recently, and here is a link to the discussion about it: > > http://comments.gmane.org/gmane.emacs.orgmode/68011 > > I believe you can do the following to get what you were expecting: > > #+ATTR_LaTeX: :width 6cm Even better :-) I wasn't crazy about adding :options every time. Thanks for clarifying. Even though the dust hasn't fully settled on the new exporter, I'm finding it's a big enough improvement that it's worth the occasional static. hjh
Re: [O] [bug] new beamer exporter always adds default width to graphics
Hi Suvayu, 2013ko martxoak 12an, Suvayu Ali > That is understandable, but if the aim is to support other kinds of > graphics that support :width, I expect the change to not interfere with > graphics that do not support it. I think there are two cases here: > > 1. the author targets the document for a specific backend that does not >support :width > > 2. the author expects to export to multiple backends and wants to be as >general as possible so uses and expects :width to work. :width is an ATTR_LATEX keyword, as is :options. So they only apply to the LaTeX backend – and those which derive from it, such as beamer. If document authors wish to also export to e.g. HTML, they will have to make separate arrangements. > > So now the question is, is it reasonable to expect the author in case > (1) is aware of this subtlety and use :width even though her/his backend > does not support it, or would it be better to handle these deficient > cases "specially" and help the author by not clobbering their :options > argument. Eliminating subtleties is precisely the point of this change. All(-ish)* backends now use :width. * As far as I’ve checked, HTML(+ derived backends) and LaTeX(+derived backends). If there are any that don’t, they should probably be patched to do so as well. -- Aaron Ecay
Re: [O] [bug] new beamer exporter always adds default width to graphics
Hi Aaron, On Tue, Mar 12, 2013 at 02:40:55PM -0400, Aaron Ecay wrote: > Hi Suvayu, > > 2013ko martxoak 12an, Suvayu Ali-k idatzi zuen: > > I believe Nicolas mentioned sometime back the :width option is available > > only for floats whereas :options is the only way for included graphics > > files (because of how LaTeX works). This addition is a bit inconsistent > > with that line of thought. > > I helped write this change, so that org could support kinds of graphics > where the width is not specified by an options string, but rather by > another means. The new syntax is hopefully more consistent in the long > run: one uses :width to set the width of anything. > > Nicolas and I originally discussed a transition period where the default > :width would not be inserted, but ultimately we decided to just go ahead > with the change. The new exporter is after all not yet stable, though > thanks to the fantastic effort of the community it is continually > improving. That is understandable, but if the aim is to support other kinds of graphics that support :width, I expect the change to not interfere with graphics that do not support it. I think there are two cases here: 1. the author targets the document for a specific backend that does not support :width 2. the author expects to export to multiple backends and wants to be as general as possible so uses and expects :width to work. So now the question is, is it reasonable to expect the author in case (1) is aware of this subtlety and use :width even though her/his backend does not support it, or would it be better to handle these deficient cases "specially" and help the author by not clobbering their :options argument. I hope I expressed myself clearly. Cheers, -- Suvayu Open source is the future. It sets us free.
Re: [O] [bug] new beamer exporter always adds default width to graphics
Hi Suvayu, 2013ko martxoak 12an, Suvayu Ali-k idatzi zuen: > I believe Nicolas mentioned sometime back the :width option is available > only for floats whereas :options is the only way for included graphics > files (because of how LaTeX works). This addition is a bit inconsistent > with that line of thought. I helped write this change, so that org could support kinds of graphics where the width is not specified by an options string, but rather by another means. The new syntax is hopefully more consistent in the long run: one uses :width to set the width of anything. Nicolas and I originally discussed a transition period where the default :width would not be inserted, but ultimately we decided to just go ahead with the change. The new exporter is after all not yet stable, though thanks to the fantastic effort of the community it is continually improving. -- Aaron Ecay
Re: [O] [bug] new beamer exporter always adds default width to graphics
On Tue, Mar 12, 2013 at 10:38:27AM -0400, Jay Kerns wrote: > Dear James, > > On Tue, Mar 12, 2013 at 9:25 AM, James Harkins wrote: [...] > > The org file contains: > > > > #+BEGIN_CENTER > > #+ATTR_LaTeX: :options width=6cm > > [[./img/new-version.png]] > > #+END_CENTER > > > > In the .tex file, I see: > > > > \begin{center} > > \includegraphics[width=6cm,width=.9\linewidth]{./img/new-version.png} > > \end{center} > > > > Two widths appear: the one that I wanted, and the default that I was > > trying to override. LaTeX obeys the one that I didn't want. > > > > The problem is somewhere between HEAD and this commit (i.e., 8cc6c13 > > is a "good" commit; head is "bad"): > > > > commit 8ee6c13c7fd6eacc2e8c2ace8054f8aac3548966 > > Author: Bastien Guerry > > Date: Sat Feb 23 13:47:44 2013 +0100 > > Fix typo: an headline -> a headline. > > Yes, the same thing happened to me too, and yes, there was a change > recently, and here is a link to the discussion about it: > > http://comments.gmane.org/gmane.emacs.orgmode/68011 > > I believe you can do the following to get what you were expecting: > > #+ATTR_LaTeX: :width 6cm I believe Nicolas mentioned sometime back the :width option is available only for floats whereas :options is the only way for included graphics files (because of how LaTeX works). This addition is a bit inconsistent with that line of thought. -- Suvayu Open source is the future. It sets us free.
Re: [O] [bug] new beamer exporter always adds default width to graphics
Dear James, On Tue, Mar 12, 2013 at 9:25 AM, James Harkins wrote: > Hi, > > Apologies if this was previously reported. I read the digest, so I > might not have seen the most recent e-mails. I took a quick glance at > gmane's archive and didn't readily see anything. > > The width attribute for beamer graphics is not handled properly at > present (current master). > > The org file contains: > > #+BEGIN_CENTER > #+ATTR_LaTeX: :options width=6cm > [[./img/new-version.png]] > #+END_CENTER > > In the .tex file, I see: > > \begin{center} > \includegraphics[width=6cm,width=.9\linewidth]{./img/new-version.png} > \end{center} > > Two widths appear: the one that I wanted, and the default that I was > trying to override. LaTeX obeys the one that I didn't want. > > The problem is somewhere between HEAD and this commit (i.e., 8cc6c13 > is a "good" commit; head is "bad"): > > commit 8ee6c13c7fd6eacc2e8c2ace8054f8aac3548966 > Author: Bastien Guerry > Date: Sat Feb 23 13:47:44 2013 +0100 > Fix typo: an headline -> a headline. > > Please fix. Thanks. > hjh > Yes, the same thing happened to me too, and yes, there was a change recently, and here is a link to the discussion about it: http://comments.gmane.org/gmane.emacs.orgmode/68011 I believe you can do the following to get what you were expecting: #+ATTR_LaTeX: :width 6cm I hope this helps, -- Jay