[Ipe-discuss] Script to export all views from all pages of the Ipe drawing

Otfried Cheong otfried at ipe.airpost.net
Sun Sep 16 18:17:14 CEST 2018


My apologies for not looking into this earlier, I was very busy (moving to Europe) during the last few months.

It seems quite wasteful that we first need to decompose the Ipe animation into one file per view, before we can then include those into the presentation.   After all, pdflatex and the \includegraphics command already have the ability to include a given page from a PDF file.

The problem here was that the xmpmulti.sty package and the \multiinclude command that it defines cannot do this, it really needs the animation split over 30 files.

I think the most elegant solution to this issue is to make an alternative \multiinclude command that will include a sequence of pages from a  single PDF file.    I'm attaching a file "pdfmulti.sty" that does exactly this.   Instead of including abc-1.pdf, abc-2.pdf, etc., it will include page 1, page 2, etc from file abc.pdf.

I'm also attaching a small example presentation that includes Wojciech's nice Heapsort animation.

-----

As to the question why the PDF files exported by Ipe are so large, this is caused by the PDF resources that Ipe copies from the pdflatex run on the text objects into the output PDF file.   In the current version,  Ipe simply includes ALL such resources, even if they are not used on the view being exported.    I need to investigate how this can be fixed (as resources form a dag of dependencies).

Cheers,
  Otfried



On Mon, May 14, 2018, at 01:11, Wojciech Zabolotny via Ipe-discuss wrote:
> I often use Ipe to prepare animated (i.e., incrementally displayed on
> subsequent slides)
> drawings for my presentations in beamer.
> The "iperender" tool allows exporting a single view.
> However, I need an automatic tool, that is able to export all the
> views in the separate files,
> located in another directory. That allows me to use it in a Makefile
> prepared for conversion
> of the figures, as shown below:
> 
> In the Makefile:
> [...]
> .ipe.pdf: *.ipe
>         ipescript expallviews $*.ipe ../figures_processed
> [...]
> 
> If I have a figure "my_figure.ipe", that contains a few views in the
> page 1, then I can include it in my presentation as shown below
> 
> In the presentation.tex file:
> 
> \usepackage{xmpmulti}
> \graphicspath{{./figures_processed/}}
> [...]
> 
> \multiinclude[format=pdf,start=1,graphics={width=0.9\linewidth}]
> {my_figure-p-1-v}
> 
> At the end of that message I attach the source code of my
> "expallviews.lua" script.
> 
> The code is published as PUBLIC DOMAIN or under Creative Commons
> CC0 license, whatever better suits your needs.
> The code is published without any warranty. You use it on your own risk.
> 
> -- 
> With best regards,
> Wojtek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pdfmulti.sty
Type: text/x-tex
Size: 6270 bytes
Desc: not available
URL: <https://mailman.science.uu.nl/pipermail/ipe-discuss/attachments/20180917/8ea2aa3b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sort-with-heap.tex
Type: text/x-tex
Size: 420 bytes
Desc: not available
URL: <https://mailman.science.uu.nl/pipermail/ipe-discuss/attachments/20180917/8ea2aa3b/attachment-0001.bin>


More information about the Ipe-discuss mailing list