4

I'm facing this problem that when I include some LaTeX specific attributes for my image, then the image doesn't display inside org-mode (although it is displayed fine in my exported LaTeX PDF).

For example, if I include an image like this, the image stop showing inside org-mode:

#+ATTR_LATEX: :width 7cm
[[img/img2.png]] 

However if I remove that LaTeX attribute, then it is displaying fine inside org-mode.

2

Try adding:

+ATTR_ORG: :width 300

below the #+ATTR_LATEX: :width 7cm line.

I guess org is showing your image scaled to 7 pixels wide, and it is invisible.

  • Thanks. This works absolutely fine. Except that I had to add the suggested attribute +ATTR_ORG: :width 300 BEFORE the LaTeX attribute #+ATTR_LATEX: :width 7cm. Then only it was working. Don't know why it was behaving this way. Could be some problem with my setup. – shivams Dec 10 '16 at 4:20
  • ok, I got it backwards. It is not a problem with your setup, org must take the first one, and it uses a regexp to get the width in pixels. it doesn't have any scaling or recognition of units. – John Kitchin Dec 10 '16 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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