1

This is one of my slides:

** Test image width

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

#+ATTR_LATEX: width=0.4\textwidth
#+RESULTS:
[[file:images/hello-world-round.png]]
*** 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?

1 Answer 1

6

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

1
  • Thanks a lot! I don't know why the documentation is messed up everywhere...
    – Pouya
    Commented Jul 1, 2020 at 9:14

Your Answer

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

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