File: manual_2.html

package info (click to toggle)
ipe 6.0pre30-5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 5,100 kB
  • ctags: 5,419
  • sloc: cpp: 30,430; ansic: 1,045; xml: 845; makefile: 78; sh: 5
file content (160 lines) | stat: -rw-r--r-- 9,132 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- XML file produced from file: manual.tex
     using Hyperlatex v 2.6 (c) Otfried Cheong
     on Emacs 21.4.1, Sun Dec 24 00:03:18 2006 -->
<head>
<title>Ipe Manual -- 2 About Ipe files</title>

<style type="text/css">
.maketitle { align : center }
div.abstract { margin-left: 20%; margin-right: 10%; }
h3.abstract  { align : center }
div.verse, div.quote, div.quotation {
  margin-left : 10%; 
  margin-right : 10%;
}
</style>

<meta http-equiv="Content-Type" 
        content="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffe6">
<table width="100%" cellpadding=0 cellspacing=2><tr><td bgcolor="#99ccff"><a href="manual_3.html"><img border="0" alt="3 Command line options, auxiliary programs, and environment variables" src="next.png"></a></td><td bgcolor="#99ccff"><a href="manual.html"><img border="0" alt="Top" src="up.png"></a></td><td bgcolor="#99ccff"><a href="manual_1.html"><img border="0" alt="1 Introduction" src="previous.png"></a></td><td align="center" bgcolor="#99ccff" width="100%"><b>2 About Ipe files</b></td></tr></table>
<h1>2 About Ipe files</h1>

<p>Ipe&nbsp;6.0 creates (Encapsulated) Postscript or PDF files.  These files
can be used in any way that PDF or Postscript files are used, such as
viewed with Ghostview, with Acrobat Reader or Xpdf, edited with
Acrobat, or included in Latex/Pdflatex documents.  However, Ipe cannot
read arbitrary Postscript or PDF files, only files it has created
itself.  This is because files created by Ipe contain a special hidden
stream that describes the Ipe objects.  (So if you edit your
Ipe-generated PDF file in a different program such as Adobe Acrobat,
Ipe will not be able to read the file again afterwards.)
<p>You decide in what format to store a figure when saving it for the
first time. Ipe gives you the option of saving with extensions "eps"
(Encapsulated Postscript), "ps" (Postscript), "pdf" (PDF), and
"xml" (XML).  Note that only documents of a single page can be
stored in Encapsulated Postscript format, as this format doesn't
support multi-page documents.  Files saved with extension "xml"
are--obviously--XML files and contain no Postscript of PDF
information.  The precise XML format used by Ipe is documented
<a href="manual_35.html">later in this manual</a>.  XML files can be read by any
XML-aware parser, and it is easy for other programs to generate XML
output to be read by Ipe.  You probably don't want to keep your
figures in XML format, but it is excellent for communicating with
other programs, and for converting figures between programs.  
<p><hr />
<p>There are perhaps two major uses for Ipe documents.  The first is for
inclusion into Latex documents, the second is for making
presentations.  There isn't much to be said about the second use: You
create a PDF file with Ipe, and either print it on transparencies or
present it using a laptop with Acrobat Reader.  You should read the
section on <a href="manual_29.html">page views</a> if you plan to make
on-line presentations, as Ipe allows you to create pages that are
displayed incrementally in Acrobat Reader.
<p>So let's concentrate on the first and original use of Ipe documents,
inclusion in Latex documents.   Most Latex installations support the
inclusion of figures in Encapsulated Postscript (EPS) format (the
"Encapsulated" means that there is only a single Postscript page and
that it contains a bounding box of the figure).
<p>The standard way of including EPS figures is using the <code>graphicx</code>
package. If you are not familiar with it, here is a quick overview.
In the preamble of your document, add the declaration:
<pre>
  \usepackage{graphicx}
</pre>
One useful attribute to this declaration is <code>draft</code>, which stops
LaTeX from actually including the figures--instead, a rectangle
with the figure filename is shown:
<pre>
  \usepackage[draft]{graphicx}
</pre>
<p>To include the figure "figure1.eps", you use the command:
<pre>
  \includegraphics{figs/figure1}
</pre>
Note that it is common <em>not</em> to specify the file extension
".eps".  The command <code>\includegraphics</code> has various options to
scale and rotate the figure.  For instance, to scale the same figure
to 50&#37;, use:
<pre>
  \includegraphics[scale=0.5]{figs/figure1}
</pre>
To scale such that the width of the figure becomes 5&nbsp;cm:
<pre>
  \includegraphics[width=5cm]{figs/figure1}
</pre>
Instead, one can specify the required height with <code>height</code>.
<p>Here is an example that scales a figure to 200&#37; and rotates it by
45&nbsp;degrees counter-clockwise.  Note that the scale argument should be
given <em>before</em> the <code>angle</code> argument.
<pre>
  \includegraphics[scale=2,angle=45]{figs/figure1}
</pre>
<p>Let's stress once again that these commands are the standard commands
for including EPS files in a LaTeX document.  Unlike in previous
versions of Ipe, Ipe files neither require nor support any special
treatment.<sup><a href="manual_44.html#id1">1</a></sup>  If you are used to other commands
for EPS inclusion, such as the old-fashioned <code>epsfig</code>
package,<sup><a href="manual_44.html#id2">2</a></sup>
you can use them as well for Ipe figures.  If you want to know more
about the LaTeX packages for including graphics and producing
colour, check the <code>grfguide.tex</code> document that is probably
somewhere in your TeX installation.
<p><hr />
<p>If you are a user of Pdflatex (a version of Latex that produces PDF
instead of DVI output), you cannot include EPS files.  Instead, save
your Ipe figures in PDF format, and include them in the way described
above.  
<p>There is a slight complication here: Each page of a PDF document can
carry several "bounding boxes", such as the <em>MediaBox</em> (which
indicates the paper size), the <em>CropBox</em> (which indicates how the
paper will by cut), or the <em>ArtBox</em> (which indicates the extent
of the actual contents of the page).  Ipe automatically saves, for
each page, the paper size in the <em>MediaBox</em>, and a bounding box
for the drawing in the <em>ArtBox</em>.  Ipe also puts the bounding box
in the <em>CropBox</em> if you have ticked the <em>Use CropBox</em>
checkbox in the <em>Document properties</em> (in the <em>Edit</em> menu).
<p>Now, when including a PDF figure, Pdflatex will (by default) first
look at the CropBox, and, if that is not set, fall back on the
MediaBox.  It does not inspect the ArtBox, and so it is important that
you have <em>Use CropBox</em> ticked when making figures for inclusion
in Pdflatex.  On the other hand, when making presentations or
full-page documents, you will want to untick <em>Use CropBox</em>, as
otherwise Acrobat Reader will not display full pages (Acrobat Reader
actually crops each page to the CropBox).
<p>If you have a recent version of Pdflatex (1.20 or higher), you can
actually ask Pdflatex to inspect the ArtBox by saying 
<code>\pdfoptionalwaysusepdfpagebox5</code>.  (But in Pdflatex&nbsp;1.30, the
primitive was renamed to <code>\pdfforcepagebox5</code>.)  This will result
in a warning message during the Pdflatex run, so it is probably
simpler to keep using CropBoxes--you'll have less explaining to do to
co-authors and publishers.
<p><p>You can save all your figures in both EPS and PDF format, so that you
can run both Latex and Pdflatex on your document--when including
figures, Latex will look for the EPS variant, while Pdflatex will look
for the PDF variant. (Here it comes in handy that you didn't specify
the file extension in the <code>\includegraphics</code> command.)
<p>It would be cumbersome to have to save an Ipe figure in both formats
each time you modify it.  What you should do instead, is to always
save in one format--let's say EPS.  You can then write a shell script
or batch file that calls <a href="manual_3.html">ipetoipe</a> to
do the conversion to PDF.  Alternatively, you can enable
auto-exporting from EPS to PDF in Ipe.
<p><hr />
<p>On the other hand, if you <em>only</em> use Pdflatex, you might opt to
exploit a feature of Pdflatex: You can keep all the figures for a
document in a single, multi-page Ipe document, with one figure per
page.  You can then include the figures one by one into your document
by using the <code>page</code> argument of <code>\includegraphics</code>.
<p>For example, to include page&nbsp;3 from the PDF file "figures.pdf"
containing several figures, you could use
<pre>
  \includegraphics[page=3]{figs/figures}
</pre>
<hr />
<table width="100%" cellpadding=0 cellspacing=2><tr><td bgcolor="#99ccff"><a href="manual_3.html"><img border="0" alt="3 Command line options, auxiliary programs, and environment variables" src="next.png"></a></td><td bgcolor="#99ccff"><a href="manual.html"><img border="0" alt="Top" src="up.png"></a></td><td bgcolor="#99ccff"><a href="manual_1.html"><img border="0" alt="1 Introduction" src="previous.png"></a></td><td align="center" bgcolor="#99ccff" width="100%"><b>2 About Ipe files</b></td></tr></table></body></html>