emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Default attributes for images in beamer export
@ 2022-05-19 17:17 edgar
  2022-05-19 18:29 ` Eric S Fraga
  0 siblings, 1 reply; 7+ messages in thread
From: edgar @ 2022-05-19 17:17 UTC (permalink / raw)
  To: emacs-orgmode

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!  


^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Default attributes for images in beamer export
@ 2022-05-20 20:18 edgar
  2022-05-23  9:06 ` Eric S Fraga
  0 siblings, 1 reply; 7+ messages in thread
From: edgar @ 2022-05-20 20:18 UTC (permalink / raw)
  To: Org Mode List

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!  


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-05-24 12:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19 17:17 Default attributes for images in beamer export edgar
2022-05-19 18:29 ` Eric S Fraga
2022-05-20 19:50   ` edgar
  -- strict thread matches above, loose matches on Subject: below --
2022-05-20 20:18 edgar
2022-05-23  9:06 ` Eric S Fraga
2022-05-23 10:59   ` Timothy
2022-05-24 11:10     ` edgar

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).