an ipe tutorial

85
An IPE Tutorial Soeren Nickel Seminar in Algorithms Graphs and Geometry · WS2021 Algorithmic Geometry · WS2021 ...and the rest

Upload: others

Post on 15-Jul-2022

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An IPE Tutorial

An IPE Tutorial

Soeren NickelSeminar in Algorithms Graphs and Geometry · WS2021

Algorithmic Geometry · WS2021...and the rest

Page 2: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

IPE

Page 3: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

IPE

What is IPE?

Page 4: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

IPE

What is IPE?Vector editorUseful for creating precise, scalable and easy tointegrate figures for papers, exercises presentations,sketches, etc.

Page 5: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

IPE

How to control Ipe

Creating things

How thing look

Interface Overview

Page 6: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The ToolsIf you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 7: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

Grid & Snapping

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 8: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

Grid & Snapping

Manipulation of objects

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 9: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

Grid & Snapping

Manipulation of objects

Text objects & Marks

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 10: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

Grid & Snapping

Manipulation of objects

Text objects & Marks

Creation of Objects

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 11: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 12: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 13: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

?

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 14: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

Snapping!

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 15: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 16: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 17: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

A circle segment around green, staring on red ending on the line

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 18: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

A circle segment around green, staring on red ending on the line

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 19: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

A circle segment around green, staring on red ending on the line

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 20: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

A circle segment around green, staring on red ending on the line

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 21: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

A circle segment around green, staring on red ending on the line

?

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 22: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

A circle segment around green, staring on red ending on the line

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 23: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

A circle segment around green, staring on red ending on the line

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 24: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools

An Example:

A line between blue points

A circle segment around green, staring on red ending on the line

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 25: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The PropertiesIf you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 26: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties

Stroke Colour

Fill Colour

Stroke Width

Stroke Style

Text Size

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 27: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties

Stroke Colour

Fill Colour

Stroke Width

Stroke Style

Text Size

How does Ipe think?Changing color (or something) changes the selected object!Therefore: Create and then style!

If you are working through these slides onyour own, you might want to consult theextended version of this slide at the end

Page 28: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Demo I

The angle at the midpoint M is double the sizeof the angle at P (α = 2β)

∼ 5 minutes

P

A

B

M

α

β

Page 29: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Demo I

The angle at the midpoint M is double the sizeof the angle at P (α = 2β)

∼ 5 minutes

Some useful shortcuts:

[S] Select[E] Scale[R] Rotate[T] Translate[M] Marks[G] Minipage Text

P

A

B

M

α

β

Page 30: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Text, LATEX and the .ipe File

An .ipe file is XML format

Page 31: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Text, LATEX and the .ipe File

An .ipe file is XML format

Text objects and labels are interpreted as LaTeX

Page 32: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Text, LATEX and the .ipe File

An .ipe file is XML format

Text objects and labels are interpreted as LaTeX

<page title="Text, \LaTeX\ and the .ipe File">

<layer name="alpha"/>

<view layers="alpha" active="alpha"/>

<text layer="alpha" transformations="translations" pos="16

496" stroke="black" type="minipage" width="880"

height="19.3928" depth="5.404" valign="top" style="

item">An .ipe file is XML format</text>

</page>

Page 33: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Text, LATEX and the .ipe File

An .ipe file is XML format

Text objects and labels are interpreted as LaTeX

An ipe File has a preamble for packages, definitions, newcommands etc.

Page 34: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Text, LATEX and the .ipe File

An .ipe file is XML format

Text objects and labels are interpreted as LaTeX

An ipe File has a preamble for packages, definitions, newcommands etc.

Page 35: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Demo I.5

Theorem 1 The angle at the midpoint M isdouble the size of the angle at P (α = 2β)

∼ 2 minutes

P

A

B

M

ααααααααααααααααα

βββββββββββββββββ

Page 36: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Demo I.5

Theorem 1 The angle at the midpoint M isdouble the size of the angle at P (α = 2β)

∼ 2 minutes

Make this a theorem(environment)

P

A

B

M

ααααααααααααααααα

βββββββββββββββββ

Page 37: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Demo I.5

Theorem 1 The angle at the midpoint M isdouble the size of the angle at P (α = 2β)

∼ 2 minutes

Make this a theorem(environment)

P

A

B

M

ααααααααααααααααα

βββββββββββββββββ

Give α and β acolour contour

Page 38: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Demo I.5

Theorem 1 The angle at the midpoint M isdouble the size of the angle at P (α = 2β)

∼ 2 minutes

Make this a theorem(environment)

P

A

B

M

ααααααααααααααααα

βββββββββββββββββ

Give α and β acolour contour

\usepackage{contour}\newtheorem{thm}{Theorem}\contour{COLOURNAME}{TEXT}\begin{thm} [...]

\end{thm}

This is what you need

Page 39: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Edit Mode

Page 40: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Edit Mode

In edit mode you can:Move vertices of polygons/control points of bezier curves independentlyCut polygons at vertices → polylineCut polylines at vertices → 2 sub-paths, STILL 1 object (!)Duplicate and delete vertices/control points

Page 41: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Edit Mode

In edit mode you can:Move vertices of polygons/control points of bezier curves independentlyCut polygons at vertices → polylineCut polylines at vertices → 2 sub-paths, STILL 1 object (!)Duplicate and delete vertices/control points

Group objects to move, rotate, scale them as one

Page 42: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Edit Mode

In edit mode you can:Move vertices of polygons/control points of bezier curves independentlyCut polygons at vertices → polylineCut polylines at vertices → 2 sub-paths, STILL 1 object (!)Duplicate and delete vertices/control points

Group objects to move, rotate, scale them as one

How does Ipe think?

Transformation tools change the appearance of an object(theres a transformation matrix for these).Edit mode changes its structure (number of vertices and the like).

Page 43: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Layers, Views & Pages

1

2

3

4

5

6

LayerEvery object lies onexactly one layer

Page 44: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Layers, Views & Pages

1

2

3

4

5

6

LayerEvery object lies onexactly one layer

How does Ipe think?Layers and Z-Order are not related!Different from Photoshop etc.

Page 45: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Layers, Views & Pages

1

2

3

4

5

6

LayerEvery object lies onexactly one layer

Views

Every view can showany number andcombination of layers

Page 46: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Layers, Views & Pages

1

2

3

4

5

6

LayerEvery object lies onexactly one layer

Views

Every view can showany number andcombination of layers

Page 47: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Layers, Views & Pages

1

2

3

4

5

6

LayerEvery object lies onexactly one layer

Views

Every view can showany number andcombination of layers

Page 48: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Layers, Views & Pages

PAGE

1

2

3

4

5

6

LayerEvery object lies onexactly one layer

Views

Every view can showany number andcombination of layers

All layers and viewsbelong to one page

Page 49: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Layers, Views & Pages

PAGE

1

2

3

4

5

6

LayerEvery object lies onexactly one layer

Views

Every view can showany number andcombination of layers

All layers and viewsbelong to one page

One document canhave many pages

Use for variations onfigures or animationsin presentations

Page 50: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Demo II

P

A

B

β

1. Create 2 new views with a new layer each ([CTRL + SHIFT + I])

∼ 5+ minutes

Page 51: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Demo II

P

A

B

β

1. Create 2 new views with a new layer each ([CTRL + SHIFT + I])

∼ 5+ minutes

2. Leave things, which are in both images on the first layer. Move therest to the second layer.

Page 52: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Demo II

P

A

B

β

3. Copy quadrilateral to third layer and useedit mode to change the shape of the quadri-lateral (where do you need to snap?)

[CTRL + E] → Edit mode

1. Create 2 new views with a new layer each ([CTRL + SHIFT + I])

∼ 5+ minutes

2. Leave things, which are in both images on the first layer. Move therest to the second layer.

Page 53: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Demo II

P

A

B

β

3. Copy quadrilateral to third layer and useedit mode to change the shape of the quadri-lateral (where do you need to snap?)

Bonus:

Use join to create “angle pizza slices”(what are the basic components?)Add styling

[CTRL + E] → Edit mode

1. Create 2 new views with a new layer each ([CTRL + SHIFT + I])

∼ 5+ minutes

2. Leave things, which are in both images on the first layer. Move therest to the second layer.

Page 54: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Demo II

P

A

B

β

3. Copy quadrilateral to third layer and useedit mode to change the shape of the quadri-lateral (where do you need to snap?)

Bonus:

Use join to create “angle pizza slices”(what are the basic components?)Add styling

[CTRL + E] → Edit mode

1. Create 2 new views with a new layer each ([CTRL + SHIFT + I])

∼ 5+ minutes

Objects are added to highlighted layer(click on layer name to change)

2. Leave things, which are in both images on the first layer. Move therest to the second layer.

Page 55: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Ipelets

Plugins written in Lua (like IPE itself)

Page 56: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Ipelets

Plugins written in Lua (like IPE itself)

handy and often used functions (align, center, distribute, move objects)

very specific functionality (Voronoi Diagrams/Delaunay Triangulations)

Utility functions (triangular/custom grids)

geometric features (mirroring, generating regular k-gons, incircles, etc.)

Page 57: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Ipelets

Plugins written in Lua (like IPE itself)

handy and often used functions (align, center, distribute, move objects)

very specific functionality (Voronoi Diagrams/Delaunay Triangulations)

Utility functions (triangular/custom grids)

geometric features (mirroring, generating regular k-gons, incircles, etc.)

There is a CGAL ipelet (this is advanced in setup and usage)

Page 58: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Tipps, Trick & Space for Notes

[F10] gives you a box spanning the whole page, useful forpresentations

templates for presentations exist

Pagenumbers are built into ipe (but sometimes tricky)

Decorations ipelet allows for automatically boxed text(I haven’t checked compatibility for some versions)

Page 59: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Tipps, Trick & Space for Notes

[F10] gives you a box spanning the whole page, useful forpresentations

templates for presentations exist

Grouped objects can be clipped by a path (e.g. crop images)

Pagenumbers are built into ipe (but sometimes tricky)

Decorations ipelet allows for automatically boxed text(I haven’t checked compatibility for some versions)

There is a tool to move graph edges together with nodes(use marks and single polylines to create the graph)

Page 60: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Tipps, Trick & Space for Notes

[F10] gives you a box spanning the whole page, useful forpresentations

templates for presentations exist

Grouped objects can be clipped by a path (e.g. crop images)

Pagenumbers are built into ipe (but sometimes tricky)

Decorations ipelet allows for automatically boxed text(I haven’t checked compatibility for some versions)

There is a tool to move graph edges together with nodes(use marks and single polylines to create the graph)

Almost everything you see can be changed throughstyle-files

Page 61: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools [EXTENDED VERSION]

Page 62: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools [EXTENDED VERSION]

Grid & Snapping

Page 63: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools [EXTENDED VERSION]

Grid & SnappingGrid

Intersection

Lines

Enpoints & Marks

Centers (Objects), Corners of Text

Page 64: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools [EXTENDED VERSION]

Grid & Snapping

Manipulation of objects

Page 65: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools [EXTENDED VERSION]

Grid & Snapping

Manipulation of objects

Theres a radius of selection

Page 66: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools [EXTENDED VERSION]

Grid & Snapping

Manipulation of objects

Theres a radius of selection

Page 67: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools [EXTENDED VERSION]

Grid & Snapping

Manipulation of objects

Theres a radius of selection

left → right =⇒ select included

Page 68: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools [EXTENDED VERSION]

Grid & Snapping

Manipulation of objects

Theres a radius of selection

left → right =⇒ select includedright → left =⇒ select intersected

Page 69: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools [EXTENDED VERSION]

Grid & Snapping

Manipulation of objects

Text objects & Marks

Page 70: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools [EXTENDED VERSION]

Grid & Snapping

Manipulation of objects

Text objects & Marks

Minipage (multiline, fixed width)

Just adds $ [TEXT] $ to label

Meant for labels in figures (no Linebreaks, some commands don’twork, adaptive width)

Page 71: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools [EXTENDED VERSION]

Grid & Snapping

Manipulation of objects

Text objects & Marks

Creation of Objects

Page 72: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Tools [EXTENDED VERSION]

Grid & Snapping

Manipulation of objects

Text objects & Marks

Creation of Objects

1.2.

3.4.

Rectangle by opposing cornersPolylines/-gons, Curves

Circle by center and size

Circle segments bycenter, start, end

Page 73: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties [EXTENDED VERSION]

Page 74: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties [EXTENDED VERSION]

Stroke Colour

Fill Colour

Stroke Width

Stroke Style

Page 75: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties [EXTENDED VERSION]

Stroke Colour

Fill Colour

Stroke Width

Stroke Style

Page 76: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties [EXTENDED VERSION]

Stroke Colour

Fill Colour

Stroke Width

Stroke Style

×1

(Line is still there, butwithout contour)

Page 77: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties [EXTENDED VERSION]

Stroke Colour

Fill Colour

Stroke Width

Stroke Style

×2

Page 78: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties [EXTENDED VERSION]

Stroke Colour

Fill Colour

Stroke Width

Stroke Style

×3

Page 79: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties [EXTENDED VERSION]

Stroke Colour

Fill Colour

Stroke Width

Stroke Style

Page 80: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties [EXTENDED VERSION]

Stroke Colour

Fill Colour

Stroke Width

Stroke Style

Text Size

Page 81: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties [EXTENDED VERSION]

Stroke Colour

Fill Colour

Stroke Width

Stroke Style

Text Size

Mark Style (Box, Disk, Cross, etc.)

Mark Size

Page 82: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties [EXTENDED VERSION]

Stroke Colour

Fill Colour

Stroke Width

Stroke Style

Text Size

Mark Style (Box, Disk, Cross, etc.)

Mark Size

Opacity(Stroke Opacity != Opacity)

Page 83: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties [EXTENDED VERSION]

Stroke Colour

Fill Colour

Stroke Width

Stroke Style

Text Size

Mark Style (Box, Disk, Cross, etc.)

Mark Size

Opacity(Stroke Opacity != Opacity)

Layers and Views (later)

Page 84: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

The Properties [EXTENDED VERSION]

Stroke Colour

Fill Colour

Stroke Width

Stroke Style

Text Size

Mark Style (Box, Disk, Cross, etc.)

Mark Size

Opacity(Stroke Opacity != Opacity)

Layers and Views (later)

Exact input is possible(colour picker, enter size in points)

Page 85: An IPE Tutorial

Soeren Nickel · An IPE Tutorial

Shortcuts

Manipulation:[S] Select[E] Scale[Shift + E] Scale (keep aspect ratio)[R] Rotate[CTRL + R] Exact Rotate[T] Translate[ALT/CTRL/{ALT+CTRL} + NUMPAD 2/4/6/8] Translate by steps[CTRL + E] Edit mode/Change text[CTRL + G] Group objectsManipulation:

[S] Select[E] Scale[Shift + E] Scale (keep aspect ratio)[R] Rotate[CTRL + R] Exact Rotate[T] Translate[M] Marks[P] Polyline[Shift + P] Polygon[G] Minipage Text[ALT/CTRL/{ALT+CTRL} + NUMPAD 2/4/6/8] Translate by steps[CTRL + E] Edit mode/Change text[CTRL + G] Group objects

[SHIFT+V] Center vertically (on horizontal line)[SHIFT+H] Center horizontally (on vertical line)

[SHIFT+ALT+V] Distribute vertically (No horizontal version)[ALT+NP 2/4/6/8] Translate by small steps

[CTRL+NP 2/4/6/8] Translate by medium steps[ALT+CTRL+NP 2/4/6/8] Translate by big steps

[CTRL+G] Group objects

Extras

[S] Select[E] Scale

[Shift+E] Scale (keep aspect ratio)[R] Rotate

[CTRL+R] Exact rotate[T] Translate

[CTRL+E] Edit mode/Change text[CTRL + B] Push object back[CTRL + F] Pull object on top

Manipulation[M] Marks[P] Polyline

[Shift+P] Polygon[G] Minipage text

[F10] Width-spanning text

Objects