emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] new beamer exporter always adds default width to graphics
@ 2013-03-12 13:25 James Harkins
  2013-03-12 14:38 ` Jay Kerns
  0 siblings, 1 reply; 7+ messages in thread
From: James Harkins @ 2013-03-12 13:25 UTC (permalink / raw)
  To: Emacs-orgmode

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 <bzg@altern.org>
Date:   Sat Feb 23 13:47:44 2013 +0100
    Fix typo: an headline -> a headline.

Please fix. Thanks.
hjh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [bug] new beamer exporter always adds default width to graphics
  2013-03-12 13:25 [bug] new beamer exporter always adds default width to graphics James Harkins
@ 2013-03-12 14:38 ` Jay Kerns
  2013-03-12 14:59   ` Suvayu Ali
  2013-03-13  8:30   ` James Harkins
  0 siblings, 2 replies; 7+ messages in thread
From: Jay Kerns @ 2013-03-12 14:38 UTC (permalink / raw)
  To: jamshark70; +Cc: Emacs-orgmode

Dear James,

On Tue, Mar 12, 2013 at 9:25 AM, James Harkins <jamshark70@gmail.com> 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 <bzg@altern.org>
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [bug] new beamer exporter always adds default width to graphics
  2013-03-12 14:38 ` Jay Kerns
@ 2013-03-12 14:59   ` Suvayu Ali
  2013-03-12 18:40     ` Aaron Ecay
  2013-03-13  8:30   ` James Harkins
  1 sibling, 1 reply; 7+ messages in thread
From: Suvayu Ali @ 2013-03-12 14:59 UTC (permalink / raw)
  To: emacs-orgmode

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 <jamshark70@gmail.com> 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 <bzg@altern.org>
> > 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [bug] new beamer exporter always adds default width to graphics
  2013-03-12 14:59   ` Suvayu Ali
@ 2013-03-12 18:40     ` Aaron Ecay
  2013-03-12 22:17       ` Suvayu Ali
  0 siblings, 1 reply; 7+ messages in thread
From: Aaron Ecay @ 2013-03-12 18:40 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [bug] new beamer exporter always adds default width to graphics
  2013-03-12 18:40     ` Aaron Ecay
@ 2013-03-12 22:17       ` Suvayu Ali
  2013-03-13  2:55         ` Aaron Ecay
  0 siblings, 1 reply; 7+ messages in thread
From: Suvayu Ali @ 2013-03-12 22:17 UTC (permalink / raw)
  To: emacs-orgmode

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [bug] new beamer exporter always adds default width to graphics
  2013-03-12 22:17       ` Suvayu Ali
@ 2013-03-13  2:55         ` Aaron Ecay
  0 siblings, 0 replies; 7+ messages in thread
From: Aaron Ecay @ 2013-03-13  2:55 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: emacs-orgmode

Hi Suvayu,

2013ko martxoak 12an, Suvayu Ali <fatkasuvayu+-ek idatzi zuen:
> 
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [bug] new beamer exporter always adds default width to graphics
  2013-03-12 14:38 ` Jay Kerns
  2013-03-12 14:59   ` Suvayu Ali
@ 2013-03-13  8:30   ` James Harkins
  1 sibling, 0 replies; 7+ messages in thread
From: James Harkins @ 2013-03-13  8:30 UTC (permalink / raw)
  To: Jay Kerns; +Cc: Emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 593 bytes --]

On Mar 12, 2013 10:38 PM, "Jay Kerns" <gjkernsysu@gmail.com> 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

[-- Attachment #2: Type: text/html, Size: 870 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-03-13  8:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 13:25 [bug] new beamer exporter always adds default width to graphics James Harkins
2013-03-12 14:38 ` Jay Kerns
2013-03-12 14:59   ` Suvayu Ali
2013-03-12 18:40     ` Aaron Ecay
2013-03-12 22:17       ` Suvayu Ali
2013-03-13  2:55         ` Aaron Ecay
2013-03-13  8:30   ` James Harkins

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).