Hello, I am trying to set the default height (or width) of all pictures for my Beamer slides (ox-beamer) for a single file. How can I do it? I am currently trying this: #+begin_src org #+BIND: org-latex-image-default-width 0.5\textwidth #+property: :latex-image-default-width 0.6\regheight * Test ** Slide :B_block: :PROPERTIES: :BEAMER_env: block :END: #+name: testing #+caption: this figure [[file:../some.png]] #+begin_src emacs-lisp (org-version) #+end_src #+RESULTS: : 9.5.2 #+begin_src emacs-lisp (emacs-version) #+end_src #+RESULTS: : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6) : of 2022-04-20 #+end_src and I get this #+begin_src latex % Created 2022-05-19 Thu 19:12 % Intended LaTeX compiler: pdflatex \documentclass[presentation]{beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{longtable} \usepackage{wrapfig} \usepackage{rotating} \usepackage[normalem]{ulem} \usepackage{amsmath} \usepackage{amssymb} \usepackage{capt-of} \usepackage{hyperref} \usetheme{default} \date{\today} \title{} \hypersetup{ pdfauthor={}, pdftitle={}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 28.1 (Org mode 9.5.2)}, pdflang={English}} \begin{document} \begin{frame}{Outline} \tableofcontents \end{frame} \begin{frame}[label={sec:orgaf83f29},fragile]{Test} \begin{block}{Slide} \begin{figure}[htbp] \centering \includegraphics{../some.png} \caption{\label{fig:orga0f8614}this figure} \end{figure} \begin{verbatim} (org-version) \end{verbatim} \begin{verbatim} (emacs-version) \end{verbatim} \end{block} \end{frame} \end{document} #+end_src ------------------------------------------------- This free account was provided by VFEmail.net - report spam to abuse@vfemail.net ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!
On Thursday, 19 May 2022 at 17:17, edgar@openmail.cc wrote:
> #+BIND: org-latex-image-default-width 0.5\textwidth
Try
#+BIND: org-latex-image-default-width "0.5\\textwidth"
and make sure org-export-allow-bind-keywords is set to t.
--
: Eric S Fraga, with org release_9.5.3-507-g4f0f24 in Emacs 29.0.50
On 2022-05-19 18:29, Eric S Fraga wrote:
> On Thursday, 19 May 2022 at 17:17, wrote:
>> #+BIND: org-latex-image-default-width 0.5\textwidth
>
> Try
>
> #+BIND: org-latex-image-default-width "0.5\\textwidth"
>
> and make sure org-export-allow-bind-keywords is set to t.
Oh, ok! That works. Thank you!
-------------------------------------------------
This free account was provided by VFEmail.net - report spam to abuse@vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!
On 2022-05-20 19:50, edgar@openmail.cc wrote:
> On 2022-05-19 18:29, Eric S Fraga wrote:
>> On Thursday, 19 May 2022 at 17:17, wrote:
>>> #+BIND: org-latex-image-default-width 0.5\textwidth
>>
>> Try
>>
>> #+BIND: org-latex-image-default-width "0.5\\textwidth"
>>
>> and make sure org-export-allow-bind-keywords is set to t.
>
> Oh, ok! That works. Thank you!
Actually, if I have this (The =org-latex-image-default-option= is
applied everywhere, but =org-latex-image-default-width= is not):
#+begin_src org
* Example
#+attr_latex: :height 0.5\regheight
file:example.png
file:example.png
* Configuration :ARCHIVE:noexport:
#+BIND: org-latex-image-default-width "0.98\\textwidth"
#+BIND: org-latex-image-default-height "\\regheight"
#+BIND: org-latex-image-default-option "keepaspectratio"
#+end_src
#+caption: Excerpt of results when exporting with Beamer LaTeX
#+begin_latex
\begin{frame}[label={sec:org22d94b4}]{Example}
\begin{center}
\includegraphics[keepaspectratio,height=0.5\regheight]{example.png}
\end{center}
\begin{center}
\includegraphics[keepaspectratio,width=0.98\textwidth,height=\regheight]{example.png}
\end{center}
\end{frame}
#+end_latex
But I was expecting
#+caption: Excerpt of results when exporting with Beamer LaTeX
#+begin_latex
\begin{frame}[label={sec:org22d94b4}]{Example}
\begin{center}
\includegraphics[keepaspectratio,width=0.98\textwidth,height=0.5\regheight]{example.png}
\end{center}
\begin{center}
\includegraphics[keepaspectratio,width=0.98\textwidth,height=\regheight]{example.png}
\end{center}
\end{frame}
#+end_latex
Is this the expected behaviour? Thanks again :) .
-------------------------------------------------
This free account was provided by VFEmail.net - report spam to abuse@vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!
On Friday, 20 May 2022 at 20:18, edgar@openmail.cc wrote:
> Is this the expected behaviour? Thanks again :) .
Well, looking at the code, if any of the :height or :width attributes
have been specified explicitly, the defaults for height and width are
ignored. If you want to specify both, you will need to do so
explicitly.
But given that you also want to keep the aspect ratio, I am curious as
to why you would need/want to specify both?
--
: Eric S Fraga, with org release_9.5.3-508-ge268e4 in Emacs 29.0.50
[-- Attachment #1: Type: text/plain, Size: 234 bytes --] Hi Eric, > But given that you also want to keep the aspect ratio, I am curious as > to why you would need/want to specify both? Just on this, the `keepaspectratio' option of `graphicx' could be relevant here. All the best, Timothy
On 2022-05-23 10:59, Timothy wrote:
> Hi Eric,
>
>> But given that you also want to keep the aspect ratio, I am curious as
>> to why you would need/want to specify both?
>
> Just on this, the `keepaspectratio' option of `graphicx' could be
> relevant here.
>
> All the best,
> Timothy
Thanks. Yes, I think that Eric is asking about why I have the three
options set already: width, height and keepaspectratio.
In my experience, sometimes, my slide is too narrow (as compared to
wide) and other times, it is too short (as compared to high). Since I
don't want to be dealing with which one is going to work the best, I
just set the three options to forget about them (as a default), and
usually the smallest size will kick in (which is the safest for my
slides). So, for example, even if I explicitly say that I want a
specific width, it may be that the height works better and LaTeX
(Beamer) is lenient with me. I am not saying that it makes sense, it's
just what I use :P .
-------------------------------------------------
This free account was provided by VFEmail.net - report spam to abuse@vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!