8

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 2

8

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" 
1
  • 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. Commented Aug 11, 2019 at 15:21
2

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" 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.