Presentations - otfried/ipe-wiki GitHub Wiki
This information is rather outdated. You can read more about presentations in Ipe in Chapter 8 of the manual.
Ipe is perfect for making presentations. You can insert PNG/BMP/JPEG/EPS/PDF images (with ipelets), insert LaTeX equations, add annotations (lines, arrows, circles, etc.) easily.
If your document's stylesheets define a symbol named Background, it will be displayed automatically on all pages. You can create and use symbols using the Symbols ipelet. Here is a (silly) example of a style sheet that defines such a background:
<ipestyle name="background">
<symbol name="Background" xform="yes">
<text pos="10 10" stroke="black" size="LARGE">
Background text
</text>
</symbol>
</ipestyle>
Note the use of the xform attribute--it ensures that the background is embedded only once into PDF document. This can make a huge difference if your background is a complicated object. To suppress the automatic display of the background symbol, create a layer named "BACKGROUND" on the page, and set it to be invisible. Note that the background symbol is not shown in Postscript output!
See the manual page. You can create and use symbols using the Symbols ipelet.
You can turn the page numbering on by checking Edit -> Document Properties -> Number Pages.
To change the style of the page numbers, use the element. According to the manual page:
The <pagenumberstyle> element
It defines the appearance of page numbers on the page.
Attributes
pos
(required) The position of the page number on the page.
color
(required) The color of the page number as an absolute color.
size
(required) The font size as a number.
The default is as follows:
<pagenumberstyle pos="10 10" size="10" color="black"/>
Also check out the ipelet for making presentation boxes.
If the image is a bitmap (BMP,PNG,JPEG, etc), it can be inserted using "Insert Image".
If it is PDF, it can be converted to Ipe using pdftoipe and then open the Ipe file, and copy and paste. The text will be extracted from PDF and regenerated using Ipe. Hopefully everything still looks good. Otherwise, if exact appearance is desired, there is one ipelet (check the list of ipelets on the main page) that can insert the PDF faithfully. The catch is that all text is converted to path, and hence no long text any more (though they look exactly as before).
For EPS files, it can be converted to PDF and then inserted as stated above, or can be inserted directly using the ipelet mentioned in the above paragraph.
For SVG files, there is a program that converts it to Ipe format, which can then be included.
Suppose you want to print notes for your presentation. If what you want is to print everything that can be seen on screen but use the least number of printed pages, then the following may be helpful. It removes any view whose layers are a subset of another view's layers. So incremental views are not shown. (The same can also be done by marking views in Ipe manually, but this script does it automatically.)
#!/usr/bin/env ipescript
-- -*- lua -*-
----------------------------------------------------------------------
-- Weed out views that are subsets of other views
--
-- Run this script as "ipescript ipe-weed <input-presentation> <handouts.pdf>"
----------------------------------------------------------------------
if #argv ~= 2 then
io.stderr:write("Usage: ipescript ipe-weed <input-presentation> <handouts.pdf>\n")
return
end
local inname = argv[1]
local outname = argv[2]
if not outname then
io.stderr:write("Usage: ipe-weed <inputfile> <outputfile>\n")
return
end
doc = assert(ipe.Document(inname))
-- test T's in a is a subset of T's in b
function subset(a,b)
for i=1,#a do
if a[i] and not b[i] then return false end
end
return true
end
-- weed out views that are subsets of other views
for ip,p in doc:pages() do
nv=p:countViews()
layers=p:layers()
vis={}
for iv=1,nv do
vis[iv]={}
for il,layer in pairs(layers) do
vis[iv][il]=p:visible(iv,layer)
end
end
-- find out the views whose layers are subsets of those of other views
has_weed=false
weeds={}
for i=1,nv do weeds[i]=nil end
for i=1,nv do
for j=1,nv do
if j~=i and subset(vis[i], vis[j]) and (i>j or not subset(vis[j], vis[i])) then
-- from a set of equal views, keep the first view
weeds[i]=i
has_weed=true
break
end
end
end
if has_weed then
io.write(string.format('Page %d views removed:',ip))
for i=nv,1,-1 do
if weeds[i] then
p:removeView(i)
io.write(string.format(' %d',i))
end
end
io.write('\n')
end
end
doc:runLatex()
doc:save(outname)
To use the code, save it to a file called ipe-weed.lua
, store that file in one of your Ipe script directories (e.g. ~/.ipe/scripts
),
then run
ipescript ipe-weed inputfile output.pdf
where inputfile
can be any valid ipe file.