[Top][All Lists]

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

Re: [PATCH] ob-R output file with graphics parameter

From: Berry, Charles
Subject: Re: [PATCH] ob-R output file with graphics parameter
Date: Tue, 6 Jul 2021 17:58:27 +0000

> On Jul 6, 2021, at 8:04 AM, Jack Kamm <jackkamm@gmail.com> wrote:
> Hello again,
>>> A user might like to construct a figure consisting of various subfigures 
>>> such as in a subfloat environment.
>>> Will this be reasonably simple to accomplish if `:results graphics' (with 
>>> no `file' element) automatically inserts a link?
>>> Currently, omitting the file element leaves the link out, which I believe 
>>> is the most direct way to approach subfloats.
>> Thanks for bringing up this use case, it hadn't occurred to me before.
> Thinking about this more, it occurred to me that the ":exports code" or
> ":exports none" header should already handle this.
> When that header is set, the graphics result won't be added to the latex
> document, and the user can construct the subfigure separately in latex.
> Then we wouldn't need to support the use-case of ob-R creating a graphic
> but not producing a result from it...which still feels a little strange
> to me, to be honest.
> Or am I missing something still?

Well, if the src blocks export nothing, the graphics results are not produced 
and no files are created. 

Here is an ECM that when exported with `C-c C-e l o y y` (or 'yes RET' for each 
`y' depending on your setup)

1) Produces two graphics files:
   - fig1.png
   - fig2.png

2) Produces file `subfigures.pdf` with a page with one figure containing those
   subfigures rendered side-by-side.

If you modify the ECM to change `:exports results' to `:exports none' and clean 
older fig[12].png's from the  directory, the export fails.

Of course, there are workarounds to having Type=file implied by 
Format=graphics. So if everyone else is determined to make this change I can 
live with it.



reply via email to

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