]> git.donarmstrong.com Git - xournal.git/blob - html-doc/manual.html
Add a hand tool
[xournal.git] / html-doc / manual.html
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head><title>Xournal User's manual</title></head>
5 <style>
6  .subtitle {
7   font-family: Helvetica, Arial, sans-serif;
8   font-weight: bold;
9   font-size: 1.3em;
10   color: rgb(0,150,0);
11  }
12  .subsub {
13   font-family: Helvetica, Arial, sans-serif;
14   font-weight: bold;
15   font-size: 1em;
16   color: rgb(0,150,0);
17  }
18  a { color: rgb(0,0,255); text-decoration: none; }
19  a:hover { text-decoration: underline; }
20 </style>
21 <body bgcolor="#ffffff" style="background: rgb(255,255,255)">
22
23 <h2 class="subtitle" style="text-align: center; color: rgb(0,0,200)">
24   Xournal User's Manual
25 </h2>
26 <p style="font-size: 0.95em; text-align: center; color: rgb(0,0,0)">
27  Version 0.3.1
28 </p>
29 <hr />
30 <p>
31  Xournal is an application for notetaking, sketching, keeping
32  a journal using a stylus. It is free software (GNU GPL) and runs
33  on Linux (recent distributions) and other GTK+/Gnome platforms.
34  It is similar to Microsoft Windows Journal or
35  to other alternatives such as 
36  <a href="http://www.dklevine.com/general/software/tc1000/jarnal.htm">Jarnal</a>
37  and <a href="http://www.adebenham.com/gournal/">Gournal</a>.
38 </p>
39 <p>
40 Xournal can be downloaded at
41 <a href="http://math.mit.edu/~auroux/software/xournal/">http://math.mit.edu/~auroux/software/xournal/</a>
42 </p>
43 <p>
44  Xournal aims to provide superior graphical quality (subpixel resolution) and overall
45  functionality; however it lacks the collaborative features of Jarnal.
46  Since Xournal is still in its early development stages, it may not
47  be fully stable, and some features have not been implemented yet.
48 </p>
49 <h2 class="subtitle">Table of contents</h2>
50 <p>
51  <ul>
52   <li> <a href="manual.html#getting-started">Getting started</a> </li>
53   <li> <a href="manual.html#tools">The drawing and selection tools</a> </li>
54   <li> <a href="manual.html#pages-layers">Pages, layers, and backgrounds</a> </li>
55   <li> <a href="manual.html#printing">Printing</a> </li>
56   <li> <a href="manual.html#author">Author information, license, bug-reports</a> </li>
57   <li> <a href="manual.html#changelog">Version history</a> </li>
58   <li> <a href="manual.html#file-format">The file format</a> </li>
59   <li> <a href="manual.html#installation">Installation issues</a> and
60        <a href="manual.html#calibration">tablet calibration issues</a> </li>
61  </ul>
62 </p>
63 <hr />
64 <a name="getting-started"></a>
65 <h2 class="subtitle">Getting started</h2>
66 <p>
67  Xournal's user interface is (hopefully) intuitive, and if you don't run
68  into <a href="manual.html#installation">installation</a> or
69  <a href="manual.html#calibration">tablet calibration</a> issues, you'll
70  probably be able to start taking notes without referring to this manual.
71  <br />
72  Here is a screenshot of the user interface (click to enlarge):
73 </p>
74 <p style="text-align: center">
75  <a href="screenshot.png">
76    <img src="screenshot.png" style="width: 321px; height: 176px" />
77  </a>
78 </p>
79 <p>
80 Refer the next few sections of this manual for more information about
81 the various functionalities.
82 </p>
83 <hr />
84 <a name="tools"></a>
85 <h2 class="subtitle">The drawing and selection tools</h2>
86 <h3 class="subsub"><img src="pixmaps/pencil.png"> The pen</h3>
87 <p>
88 The pen is the default drawing tool in Xournal. It comes in a variety
89 of colors (see the color toolbar buttons and the Color submenu of the
90 Tools menu) and thicknesses (see the 
91 <a href="manual.html#thicknesses">thickness</a> toolbar buttons and
92 the Pen Options submenu of the Tools menu).
93 </p>
94 <h3 class="subsub"><img src="pixmaps/eraser.png"> The eraser</h3>
95 <p>
96 The eraser lets you erase what you have drawn. 
97 By default, stylus buttons 2 and 3 (mouse middle or right buttons) are
98 mapped to the eraser tool.
99 <br />
100 The eraser comes in three different thicknesses (selected using the
101 <a href="manual.html#thicknesses">thickness</a> toolbar buttons),
102 and can operate in three different modes (Eraser Options submenu of
103 the Tools menu):
104 <ul>
105  <li>
106    Standard mode (default): the eraser deletes portions
107    of strokes previously drawn using the pen or the highlighter. 
108    In this mode, if you erase in the middle of a stroke, the remaining 
109    portions of the stroke are automatically split into shorter strokes.
110    The background of the page (and the lower layers) are not erased.
111  </li>
112  <li>
113    Whiteout: the eraser is actually a thick white pen, and simply covers
114    whatever lies underneath, including the background of the page.
115  </li>
116  <li>
117    Delete strokes: whenever the eraser comes in contact with a previously
118    drawn stroke, the entire stroke is deleted.
119   </li>
120 </ul>
121 </p>
122 <h3 class="subsub"><img src="pixmaps/highlighter.png"> The highlighter</h3>
123 <p>
124   Like the pen, the highlighter comes in a variety of colors (the default
125   is yellow) and thicknesses. Use the color and thickness toolbar buttons
126   to change these settings.
127 </p>
128 <h3 class="subsub"><img src="pixmaps/ruler.png"> The ruler</h3>
129 <p>
130   The ruler is not a tool by itself, but rather a special operating mode
131   of the pen and highlighter tools. When it is enabled, these tools paint
132   line segments instead of curvy strokes. For simplicity, selecting the
133   ruler when not in pen or highlighter mode automatically selects the pen.
134 </p>
135 <h3 class="subsub"><img src="pixmaps/recycled.png"> Default tools</h3>
136 <p>
137   Each drawing tool (pen, eraser, highlighter) has a default setting
138   (color, thickness, ...) associated to it.
139   The "Default Pen", "Default Eraser", and "Default Highlighter" entries of
140   the Tools menu select the appropriate tool and reset its settings to
141   the defaults. The toolbar also includes a "Default" button which
142   resets the currently selected drawing tool to its default settings,
143   and a "Default Pen" button. <br />
144   The "Set As Default" entry of the Tools menu takes the current settings
145   of the currently selected drawing tool and makes them the new default.
146 </p>
147 <a name="thicknesses"></a>
148 <h3 class="subsub"><img src="pixmaps/thin.png"> <img src="pixmaps/medium.png">
149   <img src="pixmaps/thick.png"> Thickness buttons</h3>
150 <p>
151   These three buttons control the thickness of the current drawing tool
152   (pen, eraser, or highlighter). The thickness can also be adjusted using
153   the appropriate sub-menu of the Tools menu.
154 </p>
155 <h3 class="subsub"><img src="pixmaps/rect-select.png"> Rectangle selection</h3>
156 <p>
157   This tool lets you select a rectangular region of the current layer.
158   All the strokes which are entirely contained within the rectangular region
159   are selected.
160   The selection can be moved within its page by clicking inside the
161   selection rectangle and dragging the cursor. If the cursor is dragged
162   to a different page, the selection will be moved to the topmost layer of
163   that page.
164 </p>
165 <p>
166   The selection can be cut, duplicated, etc. (including to a different page
167   or to a different journal) using the copy-paste toolbar buttons or the
168   corresponding entries of the Edit menu.
169 </p>
170 <h3 class="subsub"><img src="pixmaps/stretch.png"> Vertical space</h3>
171 <p>
172   This tool lets you insert or remove vertical space within the page:
173   all the items of the current layer which lie entirely between the cursor
174   position and the end of the page are moved up or down.
175 </p>
176 <p>
177   Note that the background, and items on other layers, are not affected.
178   Also, if you insert too much vertical space, some items may fall below
179   the bottom of the page and become invisible. These items are not lost:
180   to retrieve them, either use
181   the vertical space tool again to remove the excess vertical
182   space, or change the page height to an appropriate value (using the
183   "Paper Size" entry in the Journal menu).
184 </p>
185 <p>
186   If you drag the cursor below the bottom of the page (so that the
187   entire block being moved has become invisible), the items will be moved
188   to the next page (topmost layer); however, any items that were already
189   present on the next page are left unchanged. Similarly, dragging the
190   cursor above the top of the page so that the entire block being moved
191   becomes invisible results in the items being moved to the previous page.
192 </p>
193 <h3 class="subsub">Undo and redo</h3>
194 <p>
195   All operations performed on the currently open journal (drawing, erasing,
196   cut-and-paste; adding, deleting, and reformatting pages; etc.) can be
197   undone and redone at will using the Undo and Redo toolbar buttons or
198   the corresponding entries in the Edit menu.<br />
199   There is no limit to the depth of the undo/redo stack. It is cleared only
200   when you quit the application or open a new journal.
201 </p>
202 <a name="mappings"></a>
203 <h3 class="subsub">Button mappings</h3>
204 <p>
205   Stylus buttons 2 and 3 (mouse middle and right buttons) can be mapped
206   to different tools using the appropriate submenus in the Options menu
207   (whereas the Tools menu and the toolbar buttons affect the primary tool
208   assigned to button 1). The default mapping is the eraser.
209 </p>
210 <p><b>Advanced configuration:</b>
211   if a secondary button is mapped to a drawing tool (pen, eraser, or
212   highlighter), the default is to "dynamically link" its settings to those
213   of the primary tool, which means that each drawing tool has common
214   settings (color, thickness, etc.) for all buttons.
215   Dynamic linking of brush settings
216   can be disabled by selecting the "Copy of current brush" option in the
217   "Button mapping" submenu. The settings of the tool for button 2 or 3 are
218   copied from the button 1 settings at the time when you select the option,
219   and afterwards they are no longer updated when the button 1 settings are
220   modified, thus making it possible to assign pens of different colors or
221   thicknesses to different buttons.
222 </p>
223 <p>
224   Another option that affects button mappings is the "Eraser tip" option.
225   If this option is turned on and the XInput extensions are enabled, then
226   the eraser tip of your tablet's stylus will automatically be remapped to
227   the eraser tool. This behavior, which overrides all other button mappings,
228   is most useful if your X server is configured to map the eraser tip of
229   your tablet's stylus to button 1.
230 </p>
231 <hr />
232 <a name="pages-layers"></a>
233 <h2 class="subtitle">Pages, layers, and backgrounds</h2>
234 <p>
235 A journal is composed of one or more pages, whose characteristics can be
236 modified independently of each other. Each page consists of a background
237 and one or more layers stacked on top of the background. All drawing
238 operations take place within a single layer, and do not affect the background
239 or the other layers. You can think of the layers as transparent overlays:
240 drawing and erasing always takes place on the topmost visible overlay.
241 <br />
242 Layers are a convenient mechanism to add temporary annotations on top of a
243 journal page: because of the logical separation between layers, erasing
244 in the top layer will not affect the contents of the other layers, and
245 the top layer can be easily discarded.
246 </p>
247 <h3 class="subsub">Navigating the journal</h3>
248 <p>
249 The user interface either displays all pages in the journal below each other
250 ("continuous mode") or a single page ("one-page mode"). You can switch
251 between the two modes by using the "Continuous" and "One page" entries in
252 the View menu. The default is the
253 continuous mode, best adapted to note-taking on multiple pages. The one-page
254 mode is more appropriate if your journal is a scrapbook in which the pages
255 have different characteristics (in particular, if you are annotating a
256 series of pictures of different sizes).
257 </p>
258 <p>
259 You can navigate the journal pages in several different ways:
260 <ul>
261  <li> using the navigation toolbar buttons (or the corresponding entries
262   in the View menu) to go back or forward one page, or to jump to the first
263   or last page of the journal;
264  </li>
265  <li> in continuous mode, scrolling down to the desired page;
266  </li>
267  <li> entering a value or using the +/- buttons in the page selection box
268   at the lower-left corner of the Xournal window.
269  </li>
270 </ul>
271 As a convenient shortcut, going forward one page (or pressing the + button
272 in the selection box) when already at the end of the journal creates a new
273 page at the end of the journal.
274 </p>
275 <p>
276 Note: jumping to a page automatically selects the top-most layer in
277 that page.
278 </p>
279 <p>
280 To navigate the layers of a page, either use the layer selection box at
281 the bottom of the Xournal window, or use the "Show Layer" and "Hide Layer"
282 entries in the View menu. The basic rule to remember is that the display
283 shows all the layers underneath the currently select one, and while those
284 above it are hidden.
285 </p>
286 <p>
287 Note: the background layer cannot be drawn on; any attempt to draw on the
288 background will generate an error message and switch back to the first
289 layer.
290 </p>
291 <h3 class="subsub">Managing pages and layers</h3>
292 <p>
293 Pages can be added to the journal by using the "New Page ..." entries in
294 the Journal menu. The newly created page has the same format and background as the
295 current page (for the "New Page Before" and "New Page After" commands), or
296 as the last page of the journal (for "New Page At End"). Additionally,
297 jumping to the next page when already on the last page creates a new page
298 at the end of the journal.
299 </p>
300 <p>
301 The "Delete Page" entry in the Journal menu removes the current page from
302 the journal. (Remember that you can always undo this operation if you
303 deleted a page by accident).
304 </p>
305 <p>
306 The "New Layer" entry in the Journal menu creates a new layer immediately
307 above the current one, while "Delete Layer" removes the current layer and
308 its contents (if you attempt to delete the only layer of a page, a new
309 empty layer will be automatically created).
310 </p>
311 <h3 class="subsub">Paper formats and backgrounds</h3>
312 <p>
313 The size of the current page can be modified using the "Paper Size" entry
314 in the Journal menu. Standard and custom sizes are available.
315 </p>
316 <p>
317 The background is either one of several kinds of standard paper types, or a
318 bitmap image, or a page of a PDF file.
319 </p>
320 <p>
321 To select a <b>standard paper type</b> as background for the current page, use
322 the "Paper Style" submenu of the Journal menu. The paper color can also
323 be changed using the "Paper Color" submenu of the Journal menu.
324 </p>
325 <p>
326 To use a <b>PDF file</b> as the background for a journal, see the paragraph
327 on <a href="manual.html#pdfannotate">PDF annotation</a> below.
328 </p>
329 <p>
330 To load a <b>bitmap image file</b> for use as background for the current page, use
331 the "Load Background" entry of the Journal menu. This automatically
332 resizes the current page according to the size of the bitmap image, and
333 resets the zoom level to 100%. If <i>ghostscript</i> is installed on your
334 system, you can also use this method to import a fixed-resolution bitmap
335 version of a Postscript or PDF file; in that case, all pages will be
336 imported sequentially as backgrounds into consecutive pages (this is not the
337 recommended method; PDF annotation is better in many respects).
338 </p>
339 <p>
340 To capture a <b>screenshot</b> of a window or the entire screen and make it
341 the background of the current page, use the "Background Screenshot" entry of
342 the Journal menu. This will iconify the Xournal window; click in any window
343 (after ensuring it is fully visible) to capture its contents, or click on
344 the desktop (or screen background) to capture the entire screen.
345 </p>
346 <p><b>Important note:</b> by default, bitmap images loaded using the "Load
347 Background" command will not be saved with the journal; instead, the journal
348 file will contain a reference to the absolute location of the image file.
349 This means that the background will become unavailable if the image file
350 is moved or deleted. To avoid this, check the option "Attach file to the
351 journal" at the bottom of the file selection dialog box.<br />
352 This option only applies to bitmap image files loaded from disk;
353 screenshot backgrounds (and bitmaps converted from PS/PDF files using
354 ghostscript) are automatically "attached" to the journal file: when the
355 journal is saved, they will be saved (in PNG format) along with it
356 (using file names of the form *.xoj.bg_*.png).
357 </p>
358 <p>
359 <b>Rescaling and anti-aliasing:</b> by default,
360 bitmap backgrounds are rescaled and anti-aliased as needed when the zoom
361 level is changed, to ensure their appearance always remains acceptable.
362 Because this consumes a lot of memory and CPU resources, by default this
363 rescaling is performed on-demand as each page becomes visible. This means
364 that you will occasionally notice bitmap backgrounds being smoothed while
365 you are scrolling inside the document (at large zoom levels, this can slow
366 down the screen refresh rate noticeably). If you'd prefer all backgrounds to
367 be rescaled immediately upon changing the zoom level (slower but maybe more
368 intuitive), disable the "Progressive Backgrounds" option in the Options
369 menu.<br />
370 If you are handling large bitmaps, you can save memory and CPU resources (at the
371 expense of quality) by disabling the "Antialiased Bitmaps" option in the Options menu.
372 </p>
373
374 <a name="pdfannotate"></a>
375 <h3 class="subsub">PDF annotation</h3>
376 <p>
377 Xournal can be used to annotate PDF files, by loading the pages of a PDF
378 file as backgrounds for a journal. This feature requires the
379 <i>pdftoppm</i> converter to be installed (this is part of the <i>xpdf</i>
380 &nbsp;PDF file viewer).
381 </p>
382 <p>
383 The "Annotate PDF" command in the File menu can be used to load a PDF file
384 into a new (empty) journal. The page backgrounds and page sizes correspond
385 to the contents of the PDF file. (Most unencrypted PDF files should be
386 supported).
387 </p>
388 <p>
389 By default, the PDF file used to generate the backgrounds
390 will not be saved with the journal; instead, the journal
391 file will contain a reference to the absolute location of this file.
392 This means that all backgrounds will become unavailable if the PDF file
393 is moved or deleted (although Xournal will let you specify
394 the updated location of the PDF file when opening the journal
395 file). To avoid this, check the option "Attach file to the journal"
396 at the bottom of the dialog box when opening the PDF file. The PDF file will
397 then be saved along with the journal (using a file name of the form
398 *.xoj.bg.pdf).
399 <p>
400 Upon zooming, the page backgrounds are asynchronously updated
401 to fit the current display resolution. Since this process is quite slow and
402 memory-intensive, the pages are normally updated only as needed, when they
403 become visible on the screen (unless you disable the "Progressive
404 Backgrounds" option in the Options menu). This means that you will
405 occasionally notice the page backgrounds being updated while you are
406 scrolling inside the document (at large zoom levels, it can take a while
407 for the updated background to appear). However, since the backgrounds are
408 generated asynchronously by a separate Unix process, you can keep drawing in the journal
409 while the update process is still in progress.
410 </p>
411 <p>
412 It is strongly recommended that you do not resize PDF pages (using the
413 "Paper Size" command). This will result in extremely ugly rendering, as
414 the PDF converter is unable to render bitmaps with
415 non-standard aspect ratios.
416 </p>
417 <p>
418 While you can perform all sorts of page operations on a journal file
419 that was created from a PDF file (such as duplicating or deleting pages,
420 inserting pages with blank or bitmapped backgrounds, ...), it is not
421 possible to include pages from more than one PDF file into a single journal
422 document. If you need to annotate two or more PDF files inside a same
423 journal document, please consider using an external utility for merging
424 PDF files (for example <i>pdfmerge</i>).
425 <hr />
426 <a name="printing"></a>
427 <h2 class="subtitle">Printing</h2>
428 <p>
429 Xournal uses the gnome-print architecture for printing. While it is very
430 powerful, some aspects of the API leave to be desired. As of version 0.3,
431 Xournal also includes a native PDF printing feature.
432 </p>
433 <h3 class="subsub">Printing via gnome-print</h3>
434 <p>
435 The "Printer" tab of the print dialog box lets you select a printer
436 (either one of the printers installed on your system, or the generic
437 Postscript printer, or the PDF virtual printer). The "Job" tab lets you
438 select a range of pages to print (the default is to print the entire
439 journal). The "Paper" tab lets you select the paper size. Each page
440 of the journal is automatically rescaled so as to fit the paper size.
441 (minus a 5% margin all around).
442 </p>
443 <p>
444 The settings are currently not saved properly from one print job to
445 the next, so make sure to select the appropriate printer and verify
446 the paper size. When printing to a file (Postscript or PDF), Xournal
447 attempts to pre-fill the output file name (for the Postscript driver
448 this often fails due to gnome-print API issues).
449 </p>
450 <p>
451 Note that the PDF virtual printer produces files that are very large
452 and far from optimal, so its use is not recommended.
453 The gnome-print architecture also forces page backgrounds (bitmaps
454 and PDF) to be generated as uncompressed bitmaps, which leads to gigantic
455 print job files. A better alternative is to export a PDF file, and
456 print the PDF file.
457 </p>
458 <h3 class="subsub">Exporting to PDF</h3>
459 <p>
460 Starting with version 0.3, Xournal provides its own PDF rendering
461 engine. The "Export to PDF" command (in the File menu) produces a
462 PDF-1.4 file from the currently loaded document. The resulting PDF
463 file is much more compact than those produced via gnome-print, and
464 its pages have the same size as in Xournal. Highlighter strokes
465 are rendered in a partially transparent manner (note however that
466 applications such as xpdf and ghostview do not always handle
467 PDF transparency properly).
468 </p>
469 <p>
470 Xournal also includes a PDF file parser compatible with PDF format
471 version 1.4; the compression features of PDF 1.5 (Acrobat 6) are
472 not supported. When exporting a document that uses PDF
473 backgrounds, Xournal attempts to preserve most of the structure of
474 the original PDF file (however, auxiliary data such as thumbnails, hyperlinks,
475 and annotations are lost). If Xournal is unable to parse the PDF
476 file, the backgrounds are converted to (compressed) bitmaps and a new
477 PDF file is generated from scratch.
478 </p>
479 <hr />
480 <a name="author"></a>
481 <h2 class="subtitle">Author information, license, bug-reports</h2>
482 <p>
483 Xournal is written by Denis Auroux
484 (aur<!--despam-->oux<span>&#x40;</span><span>math</span>&#x2e;<span>mit&#x2e;edu).
485 <br />It is distributed under the GNU General Public License.
486 </p>
487 <p>Feel free to contact me with bug reports and suggestions; I apologize
488 in advance if I am unable to respond properly to some requests.
489 </p><p>
490 If you find a sequence of operations which crashes Xournal in a reproducible
491 manner, please send detailed instructions on how to reproduce the crash. 
492 A core file may also be helpful.
493 </p>
494 <p>
495 Bug reports and suggestions can also be submitted on Xournal's
496 <a href="http://www.sourceforge.net/projects/xournal/">SourceForge page.</a>
497 </p>
498 <hr />
499 <a name="changelog"></a>
500 <h2 class="subtitle">Version history</h2>
501 <p>
502 Version 0.3.1 (August 3, 2006):
503 <ul>
504  <li>fixed a file format bug on systems with non-standard numeric locale
505      (bug reported by Gert Renckens)</li>
506 </ul>
507 </p>
508 <p>
509 Version 0.3 (July 23, 2006):
510 <ul>
511  <li>new PDF rendering engine: export to PDF generates optimized files
512    (smaller and more accurate)</li>
513  <li>export to PDF handles PDF backgrounds (up to PDF-1.4) natively
514     (without conversion to bitmap)</li>
515  <li>default thickness of erasers and highlighters slightly increased</li>
516  <li>zoom dialog box with input box and "fit to page height" option</li>
517  <li>file format documentation added to the user's manual</li>
518 </ul>
519 </p>
520 <p>
521 Version 0.2.2 (June 5, 2006):
522 <ul>
523  <li>mapping of tools to stylus buttons (the options menu has new entries
524     to allow the mapping of buttons 2 and 3 to arbitrary tools; the tools
525     menu and toolbar affect the settings for button 1)
526     (see <a href="manual.html#mappings">here</a>)</li>
527  <li>moving selection by drag-and-drop works across page boundaries</li>
528  <li>vertical space tool can move items to next page (only when the entire
529     block being moved has crossed the page boundary; items on the new page
530     are not moved)</li>
531  <li>"apply to all pages" is now a toggle button affecting the behavior of
532     paper size, color, and style commands</li>
533  <li>change in the behavior of the selection upon switching between tools</li>
534 </ul>
535 </p>
536 <p>
537 Version 0.2.1 (June 3, 2006):
538 <ul>
539  <li>recently used files listed in file menu</li>
540  <li>can change color or thickness of pen strokes in selection</li>
541  <li>function to apply paper style to all pages</li>
542  <li>can specify on command line a PDF file to annotate</li>
543  <li>suggest a derived file name for PDF annotation</li>
544  <li>speed up switching between pages</li>
545  <li>fixed a bug in XInput initialization (thanks to Luca de Cicco)</li>
546  <li>fixed a bug in print ranges (thanks to Mathieu Bouchard)</li>
547  <li>fixed a refresh bug in rescaling bitmap backgrounds</li>
548 </ul>
549 </p>
550 <p>
551 Version 0.2 (January 29, 2006):
552 <ul>
553  <li>PDF file annotation using xpdf's pdftoppm
554       (PDF backgrounds updated asynchronously at all resolutions)</li>
555  <li>PS/PDF backgrounds (as bitmaps at fixed resolution) using ghostscript</li>
556  <li>option to antialias and filter bitmap backgrounds when zooming</li>
557  <li>option to emulate eraser tip with right mouse button</li>
558  <li>binary installer allows non-root installation without compiling</li>
559  <li>full-screen mode (patch contributed by Luca De Cicco)</li>
560 </ul>
561 </p>
562 <p>
563 Version 0.1.1 (January 5, 2006):
564 <ul>
565  <li> two bugfixes </li>
566  <li> backward compatibility with GTK+ 2.4 </li>
567 </ul>
568 </p>
569 <p>
570 Version 0.1 (January 2, 2006): initial release.
571 </p>
572 <p>
573 Features yet to be implemented:
574 <ul>
575  <li>freeform selection tool</li>
576  <li>preferences file; persistent printer settings</li>
577  <li>various functionalities (flatten layers, ...)</li>
578 </ul>
579 </p>
580 <hr />
581 <a name="file-format"></a>
582 <h2 class="subtitle">The file format</h2>
583 <h3 class="subsub">Overall structure</h3>
584 <p>
585 Xournal stores its data in gzipped XML-like files. The gzipped data consists
586 of a succession of XML tags describing the document. By convention, the
587 first few lines contain a header in the following format:
588 <pre>
589 &lt;?xml version="1.0" standalone="no"?&gt;
590 &lt;title&gt;Xournal document - see http://math.mit.edu/~auroux/software/xournal/&lt;/title&gt;
591 &lt;xournal version="..."/&gt;
592 </pre>
593 The &lt;title&gt; and &lt;xournal&gt; tags may only appear within the file
594 header (not within the pages of the document). The <i>version</i> attribute of
595 the &lt;xournal&gt; tag indicates which version of Xournal was used to
596 create the document; it is currently ignored, but may be used in a later
597 release if the file format changes in an incompatible manner.
598 </p>
599 <p>
600 The rest of the file is a sequence of pages, specified by a
601 &lt;page&gt; tag, whose attributes <i>width</i> and <i>height</i> specify the
602 physical size of the page in points (1/72 in). The width and height
603 parameters are floating point values. The format of a page is therefore:
604 <pre>
605 &lt;page width="..." height="..."&gt;
606 ... page contents ...
607 &lt;/page&gt;
608 </pre>
609 </p>
610 <h3 class="subsub">Page background</h3>
611 <p>
612 The first entry within a page describes the page background.
613 It consists of a &lt;background&gt; tag followed by several mandatory
614 XML attributes. The first attribute is always <i>type</i>, which
615 can take three possible values: "solid" for a solid background, "pixmap"
616 for a bitmap background, and "pdf" if the background is a page of a PDF
617 document. The rest of the attributes depends on the type of background.
618 <ul>
619 <li><p> Solid background: <tt>&lt;background type="solid" color="..."
620 style="..." /&gt;</tt> <br />The <i>color</i> attribute takes one of
621 the standard values "white", "yellow", "pink", "orange", "blue", "green",
622 or can specify a hexadecimal RGBA value in the format "#rrggbbaa". The
623 <i>style</i> attribute takes one of the standard values "plain", "lined",
624 "ruled", or "graph".</p>
625 </li>
626 <li><p> Bitmap background: <tt>&lt;background type="pixmap" domain="..."
627 filename="..." /&gt;</tt> <br />
628 The <i>domain</i> attribute takes one of the standard values "absolute",
629 "attach", or "clone". A value of "absolute" indicates that the bitmap is
630 found in the file specified by <i>filename</i>. The bitmap can be in any
631 format recognized by the gdk-pixbuf library; this includes most of the
632 common bitmap formats (JPEG, PNG, BMP, GIF, PCX, PNM, TIFF, ...).
633 <br />A value
634 of "attach" indicates that the bitmap is an attachment to the Xournal file.
635 The bitmap is in PNG format, and resides in a file whose name is derived
636 from that of the main Xournal file by appending to it a dot and the contents
637 of the <i>filename</i> attribute. For example, if the Xournal file is in
638 <tt>file.xoj</tt> and the <i>filename</i> attribute is <tt>"bg_1.png"</tt>
639 then the bitmap file is <tt>file.xoj.bg_1.png</tt> (Xournal saves attached
640 bitmaps sequentially in files ...bg_1.png, ...bg_2.png, etc.)
641 <br />A value of "clone" indicates that the bitmap is identical to the
642 background of a previous page of the journal; the <i>filename</i> attribute
643 then specifies the page number, starting with 0 for the first page. For
644 example, if a <i>filename</i> value of <tt>"1"</tt> indicates that the
645 background bitmap is identical to that of the second page.
646 </p>
647 </li>
648 <li><p> PDF background: <tt>&lt;background type="pdf" domain="..."
649 filename="..." pageno="..." /&gt;</tt> or
650 <tt>&lt;background type="pdf" pageno="..." /&gt;</tt>
651 <br />The <i>domain</i> and <i>filename</i> attributes must be specified
652 for the first page of the journal that uses a PDF background, and must
653 be omitted subsequently for every other page that uses a PDF background.
654 The <i>domain</i> attribute takes one of the standard values
655 "absolute" and "attach"; the PDF document is to be found in the file
656 specified by <i>filename</i> (if <i>domain</i> is "absolute"), or in the
657 file whose name is obtained by appending a dot and the contents of the
658 <i>filename</i> attribute to the name of the main Xournal file (if
659 <i>domain</i> is "attach"). The <i>pageno</i> attribute specifies which
660 page of the PDF file is used as background, starting with 1 for the first
661 page of the PDF file.
662 </p>
663 </li>
664 </ul>
665 </p>
666 <h3 class="subsub">Layers and strokes</h3>
667 <p>
668 After the line specifying the background, the remainder of a &lt;page&gt;
669 section is occupied by one or more layer sections
670 <pre>&lt;layer&gt; ... &lt;/layer&gt;</pre>
671 describing the various strokes within a layer. Every page must
672 contain at least one layer; a layer may be empty. The successive layers
673 are listed in their stacking order, from bottom to top.
674 </p>
675 <p>
676 A layer consist of a collection of items, listed in the order in which
677 they should be drawn
678 (from bottom-most to top-most).
679 As of the current version, the only legal contents within a layer are 
680 strokes. The format of a stroke is:
681 <pre>&lt;stroke tool="..." color="..." width="..."&gt;
682 ... list of coordinates ...
683 &lt;/stroke&gt;
684 </pre>
685 The <i>tool</i> attribute can take the values "pen", "highlighter", or
686 "eraser" depending on the tool used to create the stroke (pen, highlighter,
687 or whiteout eraser); a value of "highlighter" indicates that the stroke
688 should be painted in a partially transparent manner (Xournal uses an alpha
689 coefficient of 0.5).
690 The <i>color</i> attribute can take one of the standard values "black",
691 "blue", "red", "green", "gray", "lightblue", "lightgreen", "magenta",
692 "orange", "yellow", "white", or can specify a hexadecimal RGBA value in
693 the format "#rrggbbaa". The <i>width</i> attribute is a floating-point
694 number and specifies the width of the stroke in points (1/72 in).
695 </p>
696 <p>
697 The list of coordinates is simply a succession of floating-point values,
698 separated by whitespace.
699 The number of given values must be even; consecutive pairs of values give
700 the <i>x</i> and <i>y</i> coordinates of each point along the stroke.
701 These values are expressed in points (1/72 in). The coordinates (0,0)
702 represent the top-left corner of the page: hence x is measured from the left
703 of the page, and y is measured from the top of the page.
704 </p>
705 <p>
706 Every stroke must contain at least two points (four floating point values).
707 Moreover, two consecutive points on the stroke should be spaced no more
708 than 5 units apart or so; longer line segments should be subdivided as
709 appropriate (otherwise the eraser tool will not interact properly with the
710 stroke). The default precision used by Xournal for the x,y coordinates is
711 0.01 unit (1/7200 in).
712 </p>
713 <hr />
714 <a name="installation"></a>
715 <h2 class="subtitle">Installation issues</h2>
716 <h3 class="subsub">Dependencies</h3>
717 <p>
718 The following libraries are required to run Xournal (they are standard on
719 modern Linux distributions such as Fedora Core 3 or later, or RHEL 4 or
720 later):
721 <ul>
722  <li> the <b>gtk+</b> libraries, version <b>2.4</b> or later 
723        (2.6 recommended) &nbsp; (package gtk2 and dependencies)</li>
724  <li> <b>libgnomecanvas</b> version <b>2.4</b> or later &nbsp;
725        (package libgnomecanvas and dependencies)</li>
726  <li> <b>libgnomeprint</b> and <b>libgnomeprintui</b> version <b>2.2</b> or later &nbsp;
727        (packages libgnomeprint22, libgnomeprintui22, and dependencies) </li>
728 </ul>
729 </p>
730 <p>
731  Additionally:
732 <ul>
733  <li> <b>xpdf</b> (more precisely, <b>pdftoppm</b>) is required for PDF file
734 annotation</li>
735  <li> <b>ghostscript</b> (optional: used to import PS/PDF files as bitmap 
736  backgrounds)</li>
737 </ul>
738 <p>
739 To compile Xournal, you also need the <b>development packages</b> for the above
740 libraries (packages gtk2-devel, libgnomecanvas-devel, libgnomeprint22-devel,
741 libgnomeprintui22-devel, and dependencies), as well as <b>autoconf</b> and
742 <b>automake</b>.
743 </p>
744 <h3 class="subsub">Compilation and installation procedure</h3>
745 <p>
746 Download the Xournal distribution tar.gz file, and any needed dependencies.
747 </p>
748 <p>
749 <b>Binary installation in /usr/local:</b><br />
750 Run (as root) the installer script
751 <pre>./install-binary</pre> (and upgrade GTK+ and the other libraries if needed).
752 </p>
753 <p>
754 <b>Binary installation in home directory:</b><br />
755 Run (as any user) the installer script
756 <pre>./install-binary</pre> (and hope that the required libraries are
757 installed on your system).
758 </p>
759 <p>
760 <b>Compilation and installation in /usr/local:</b>
761 <pre>
762 ./autogen.sh
763 make
764 (as root) make install
765 </pre>
766 </p>
767 <p>
768 <b>Compilation and installation in $HOME:</b>
769 <pre>
770 ./autogen.sh
771 ./configure --prefix=$HOME
772 make
773 make install
774 </pre>
775 </p>
776 <p><b>Configure error message:</b> <br />
777 If autogen.sh generates the error message
778 &nbsp; &nbsp; <tt><i>
779 configure: error: Library requirements (gtk+-2.0 >= 2.4.0 libgnomecanvas-2.0 >= 2.4.0 libgnomeprintui-2.2 >= 2.0.0) not met
780 </i></tt> &nbsp; &nbsp; 
781 even though you have sufficiently recent versions of these libraries on your
782 system, then you need to install some missing development packages.
783 </p>
784 <hr />
785 <a name="calibration"></a>
786 <h2 class="subtitle">Tablet calibration issues</h2>
787 <p>
788 Configuring the tablet devices properly is unfortunately not as simple as it
789 ought to be. This is a subject worthy of a detailed how-to document;
790 meanwhile, here are some hints about how to configure your tablet.
791 </p>
792 <h3 class="subsub">Basics</h3>
793 <p>
794 Xournal uses the XInput extension to obtain high-resolution coordinates for
795 strokes drawn using the stylus. If you decide that getting just the right
796 XInput configuration isn't worth the effort, you can disable XInput features
797 by unsetting the "Use XInput" option in the Options menu. The price to pay
798 is a lower graphics quality, as the resolution of all strokes then drops to
799 1 pixel (instead of the native resolution of the tablet device, which can
800 be higher by several orders of magnitude).
801 </p>
802 <p>
803 The configuration of tablet devices is controlled in the X server's
804 configuration file (usually <b>XF86Config</b> or <b>xorg.conf</b> depending on your
805 distribution). The ServerLayout section should contain lines like:
806 <pre>
807 Section "ServerLayout"
808         ...
809         InputDevice    "cursor" "SendCoreEvents"
810         InputDevice    "stylus" "SendCoreEvents"
811         InputDevice    "eraser" "SendCoreEvents"
812 EndSection
813 </pre>
814 (the last one only if your stylus has an eraser tip), and your configuration
815 file should include sections such as
816 <pre>
817 Section "InputDevice"
818         Identifier "cursor"
819         Driver "wacom"
820         Option "Device" "/dev/ttyS0"
821         Option "Type" "cursor"
822         Option "ForceDevice" "ISDV4"
823         Option "BottomX" "28800"
824         Option "BottomY" "21760"
825         Option "Mode" "absolute"
826 EndSection
827
828 Section "InputDevice"
829         Identifier "stylus"
830         Driver "wacom"
831         Option "Device" "/dev/ttyS0"
832         Option "Type" "stylus"
833         Option "ForceDevice" "ISDV4"
834         Option "BottomX" "28800"
835         Option "BottomY" "21760"
836         Option "Mode" "absolute"
837 EndSection
838
839 Section "InputDevice"
840         Identifier "eraser"
841         Driver "wacom"
842         Option "Device" "/dev/ttyS0"
843         Option "Type" "eraser"
844         Option "ForceDevice" "ISDV4"
845         Option "BottomX" "28800"
846         Option "BottomY" "21760"
847         Option "Mode" "absolute"
848 EndSection
849 </pre>
850 The actual settings will depend on your hardware; look on the web for Linux
851 installation instructions specific to your model: for example, the
852 "Device" settings above correspond to a serial port protocol, many tablets
853 use USB instead; the BottomX and BottomY values correspond to the physical
854 resolution of the tablet and will vary from one model to another.
855 </p>
856 <h3 class="subsub">The cursor doesn't appear in the right place...</h3>
857 <p>
858 If the mouse pointer does not follow accurately the position of the stylus,
859 this is an indication that your tablet is not properly calibrated. If you
860 have the linuxwacom package, you can try modifying the tablet calibration
861 using <b>xsetwacom</b>. The relevant parameters are named TopX, BottomX,
862 TopY, BottomY, and need to be set separately for the stylus and for the
863 eraser. For example:
864 <pre>
865     xsetwacom set stylus TopX 270
866     xsetwacom set stylus BottomX 28510
867     ...
868 </pre>
869 (the TopX and TopY parameters default to 0 if you haven't set them in your
870 X server's configuration file). Experiment with these parameters until you
871 find the right calibration settings for your tablet (i.e., the mouse pointer
872 appears right under the tip of the stylus).
873 </p>
874 <p>
875 Once you have found the perfect settings for your tablet, update your X
876 server's configuration file (due to issues with some versions of the
877 linuxwacom driver, the tablet calibration information is often not updated
878 properly when using xsetwacom).
879 </p>
880 <p>
881 <b>Important:</b> due to issues with the linuxwacom driver, it is important
882 to either upgrade your driver to a <a href="manual.html#wacompatch">patched
883 version</a>, or restrict your choice of settings as follows:
884 <ul>
885 <li> your calibration settings should not be changed at runtime (i.e.,
886 insert your settings directly into your X server configuration file.
887 Do not add a list of xsetwacom commands to your startup files).
888 </li>
889 <li> TopX and TopY values should always be 0.
890 </li>
891 </ul>
892 </p>
893 <h3 class="subsub">Strokes aren't drawn under the cursor...</h3>
894 <p>
895 This is due to misfeatures in the linuxwacom driver. Typically, this
896 will happen in all of the following cases:
897 <ul>
898 <li> the calibration settings have been changed after the X server was
899 started (using xsetwacom) </li>
900 <li> the calibration TopX or TopY values are not 0 </li>
901 <li> the display has been rotated </li>
902 </ul>
903 Future versions of the driver may fix these issues. Meanwhile, you can
904 either disable XInput support in Xournal (in the Options menu), at a
905 price of a severe loss of resolution (and the eraser tip won't be detected
906 anymore), or apply this <a href="manual.html#wacompatch">patch</a>
907 to the wacom driver.
908 </p>
909 <p>
910 I have also had a report that one of the workarounds used by Xournal to
911 bypass a calibration bug in GTK+ can actually entirely prevent strokes
912 from being drawn. If you are being unsuccessful at drawing in Xournal
913 with XInput enabled, try recompiling after changing the first line of
914 <tt>src/main.c</tt> to
915 <pre>#define ENABLE_XINPUT_BUGFIX 0</pre>
916 If this modification does improve things for you, and if you have a bit
917 of spare time to help investigate the causes of this problem, please
918 contact me.
919 </p>
920 <h3 class="subsub">On-the-fly display rotation</h3>
921 <p> 
922 You need an X server that supports the RANDR extension, and a
923 <a href="manual.html#wacompatch">patched</a> version of the linuxwacom
924 driver to support on-the-fly rotation.
925 </p>
926 <p>
927 To set the tablet in portrait mode:
928 <pre>
929   xrandr -o 3
930   xsetwacom set stylus Rotate cw
931 </pre>
932 To return to landscape mode:
933 <pre>
934   xrandr -o 0
935   xsetwacom set stylus Rotate none
936 </pre>
937 <b>Note:</b> you should not rotate the display while Xournal is running,
938 otherwise the tablet calibration in Xournal may (and most likely will)
939 become incorrect.
940 Exit Xournal and restart it after the display has been rotated.
941 </p>
942 <a name="wacompatch"></a>
943 <h3 class="subsub">Linuxwacom patch for calibration and rotation</h3>
944 <p>
945 This patch fixes rotation and calibration issues with the linuxwacom driver
946 version 0.7.0.
947 <ul>
948 <li>The <a href="http://math.mit.edu/~auroux/software/xournal/linuxwacom-0.7.0-rotate-patch">patch
949 file</a> for the linuxwacom source code (also included with the Xournal
950 distribution).</li>
951 <li>The <a href="http://math.mit.edu/~auroux/software/xournal/linuxwacom-rotate-patch.tar.gz">patched
952 binaries</a> for the X.org X server.</li>
953 </ul>
954 </p>
955 </body>
956 </html>