19

I used to be able to scale down an inline image in org-mode with

#+attr_html: :width 650 px
[[file:~/org/def/202a3-9.jpeg]]

But now it doesn't work anymore, presumably because of an update to 8.3.5. What to do?

1
  • What you have will scale the images in HTML exports, not in the org buffer. Your lack of info on the org/emacs versions when things worked and the same when things did not work cannot help anyone help you on this. Aug 18, 2016 at 12:48

2 Answers 2

27

set option in your emacs init file:

(setq org-image-actual-width nil)

And add this property upon image link:

#+NAME: fig:figure name
#+CAPTION: figure name
#+ATTR_ORG: :width 200
#+ATTR_LATEX: :width 2.0in
#+ATTR_HTML: :width 200
[[file:./file.png]]

The width value 200 and 2.0in can be any inch number value if you want.

10
  • I sometimes set the org-image-actual-width on a per-file basis.
    – dmg
    Dec 18, 2016 at 4:53
  • 2
    Is it not possible to set the :width attribute for all formats at once? Jan 30, 2018 at 7:12
  • #+NAME does not do anything for me. The label of the figure is still automatically generated... Jan 30, 2018 at 7:19
  • You can use Buffer local scope attribute. I don't know is there any option can do this. But you can explore the source code. Jan 30, 2018 at 16:06
  • It's #+NAME: not #+NAME, don't emit the :. Jan 30, 2018 at 16:07
-2

Some testing seem to show that just adding a space before the # solve the problem. It look like a bug. May be you should report it to the org-list.

3
  • Oddly that doesn't work for me.
    – Toothrot
    Aug 18, 2016 at 14:15
  • -- with version 8.3.5.
    – Toothrot
    Aug 18, 2016 at 14:21
  • I've version 8.3.4
    – Rémi
    Aug 18, 2016 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.