This is one of my slides:

** Test image width

*** First sub                                          :B_block:BMCOL:
:BEAMER_env: block
:BEAMER_col: 0.5
#+header: :exports results
#+BEGIN_SRC ditaa :file images/hello-world-round.png :cmdline -r
|              |
| Hello World! |
|              |

#+ATTR_LATEX: width=0.4\textwidth
*** Second sub                                          :B_block:BMCOL:

The #+ATTR_LATEX: width=0.4\textwidth does not work. I still get image with width=\textwidth.

How do I set width for the image exported by the SRC block?


Dang! This line #+ATTR_LATEX: width=0.4\textwidth has got wrong syntax. It should be: #+ATTR_LATEX: :width 0.4\textwidth

| improve this answer | |
  • Thanks a lot! I don't know why the documentation is messed up everywhere... – Pouya Jul 1 at 9:14

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.