emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #+include vs. resizing & centrering [SOLUTION]


From: Guillaume MULLER
Subject: Re: #+include vs. resizing & centrering [SOLUTION]
Date: Wed, 30 Mar 2022 11:26:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

Sorry, I finally found a solution by myself :)

Using a minipage instead of a scalebox tolerates the \begin{center} that is 
automatically inserted:

#+LATEX: \center \begin{minipage}[c]{.85\textwidth}
#+INCLUDE: ./test.dot src dot :file test.png
#+LATEX: \end{minipage}

However, if someone has a pure/clean org-mode solution, I would love to learn 
it :)

On 3/30/22 11:07, Guillaume MULLER wrote:
> Dear all,
> 
> Thanks for org-mode, it is so perfect :)
> 
> I'm currently fighting with a problem that I cannot find a solution to 
> (either on my own or with help on the web). If someone could help me, I would 
> be very thankful.
> 
> I have an org-mode file that "includes" ane xternally generated image, like 
> so:
> 
> #+INCLUDE: ./test.dot src dot :file test.png
> 
> The thing is the resulting image is too big. So I want to resize it.
> 
> I've tried several things that did not work:
> - add #+ATTR_LATEX: :width xxx before the #+INCLUDE
> - add :width xxx or :scale xxx on the #+INCLUDE line itself
> - ...
> 
> Thus I resolved to use plain LaTeX code with something like:
> #+LATEX: \center \scalebox{.85}{%
> #+INCLUDE: ./test.dot src dot :file test.png
> #+LATEX: }
> 
> Then the problem is that #+INCLUDE adds a \begin{center}\end{center} around 
> the image inclusion, and \scalebox{} does not like that, making the resulting 
> .tex file not compile ("perhaps missing \item").
> 
> Again, I've tried several unsuccessful things :
> - add #+ATTR_LATEX: :center nil before the #+INCLUDE
> - add :center nil on the #+INCLUDE line itself
> - ...
> 
> If anyone has an idea how a can solve the problem of resizing a #+INCLUDE'd 
> image, either in plain org or with a LaTeX "warkaround", I would be very 
> grateful.
> 
> Thanks !
>  
> Guillaume MULLER, PhD

-- 
Guillaume MULLER, PhD

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]