# org Images in LaTeX export set default width

By default these org lines:

my image:
[[./figure1.png]]


are exported into these ones in latex:

\includegraphics[width=.9\linewidth]{./figure1.png}


How can I change the default value of width \width=.9\linewidth?

I know that it is possible to change locally just before each picture, but it is possible to set another default value?

#+ATTR_LATEX: :width 0.98\linewidth
[[./figure1.png]]


## 2 Answers

You can customize this via the variable org-latex-image-default-width.

To set just for the current file, you could put the following at the top of the file:

#+BIND: org-latex-image-default-width "0.98\\linewidth"

• Good answer, just note that org-export-allow-bind-keywords needs to be non-nil for this to work. I also found that quotes and escaping the backslash was necessary. – user2699 Aug 11 '19 at 15:21

To put in .emacs (emacs config file) :

(setq org-export-allow-bind-keywords t)


To put in org file header :

#+BIND: org-latex-image-default-width ".98\\linewidth"