📄 manual.html
字号:
<br />It is distributed under the GNU General Public License.</p><p>Feel free to contact me with bug reports and suggestions; I apologizein advance if I am unable to respond properly to some requests.</p><p>If you find a sequence of operations which crashes Xournal in a reproduciblemanner, please send detailed instructions on how to reproduce the crash. A core file may also be helpful.</p><p>Bug reports and suggestions can also be submitted on Xournal's<a href="http://www.sourceforge.net/projects/xournal/">SourceForge page.</a></p><hr /><a name="changelog"></a><h2 class="subtitle">Version history</h2><p>Version 0.4 (August 15, 2007):<ul> <li>text tool (handles most TrueType and Type1 fonts)</li> <li>font selection dialog and button</li> <li>keyboard mappings (arrow keys)</li> <li>menu mnemonics and shortcuts (suggestions by Jean-Baptiste Rouquier)</li> <li>more responsive hand tool</li> <li>bugfix for GTK+ 2.11 XInput behavior (thanks to Robert Gerlach)</li> <li>various minor bugfixes and enhancements</li></ul></p><p>Version 0.3.3 (January 31, 2007):<ul> <li>bugfix: upon loading a new file, zoom is set to default startup zoom</li> <li>config option to allow input from a mouse or other core pointer device</li> <li>config file entry to specify a default location for open/save (patch contributed by Andy Neitzke)</li> <li>config file entries to customize visibility and position of toolbars</li> <li>icon (thanks to Michele Codutti)</li></ul></p><p>Version 0.3.2 (November 25, 2006):<ul> <li>preferences file and Save Preferences command</li> <li>extra customization (via preferences file)</li> <li>minor UI changes (patch contributed by Eduardo de Barros Lima)</li> <li>hand tool (partially contributed by Vincenzo Ciancia)</li> <li>a few bugfixes in rendering of bitmap backgrounds</li></ul><p>Version 0.3.1 (August 3, 2006):<ul> <li>fixed a file format bug on systems with non-standard numeric locale (bug reported by Gert Renckens)</li></ul></p><p>Version 0.3 (July 23, 2006):<ul> <li>new PDF rendering engine: export to PDF generates optimized files (smaller and more accurate)</li> <li>export to PDF handles PDF backgrounds (up to PDF-1.4) natively (without conversion to bitmap)</li> <li>default thickness of erasers and highlighters slightly increased</li> <li>zoom dialog box with input box and "fit to page height" option</li> <li>file format documentation added to the user's manual</li></ul></p><p>Version 0.2.2 (June 5, 2006):<ul> <li>mapping of tools to stylus buttons (the options menu has new entries to allow the mapping of buttons 2 and 3 to arbitrary tools; the tools menu and toolbar affect the settings for button 1) (see <a href="manual.html#mappings">here</a>)</li> <li>moving selection by drag-and-drop works across page boundaries</li> <li>vertical space tool can move items to next page (only when the entire block being moved has crossed the page boundary; items on the new page are not moved)</li> <li>"apply to all pages" is now a toggle button affecting the behavior of paper size, color, and style commands</li> <li>change in the behavior of the selection upon switching between tools</li></ul></p><p>Version 0.2.1 (June 3, 2006):<ul> <li>recently used files listed in file menu</li> <li>can change color or thickness of pen strokes in selection</li> <li>function to apply paper style to all pages</li> <li>can specify on command line a PDF file to annotate</li> <li>suggest a derived file name for PDF annotation</li> <li>speed up switching between pages</li> <li>fixed a bug in XInput initialization (thanks to Luca de Cicco)</li> <li>fixed a bug in print ranges (thanks to Mathieu Bouchard)</li> <li>fixed a refresh bug in rescaling bitmap backgrounds</li></ul></p><p>Version 0.2 (January 29, 2006):<ul> <li>PDF file annotation using xpdf's pdftoppm (PDF backgrounds updated asynchronously at all resolutions)</li> <li>PS/PDF backgrounds (as bitmaps at fixed resolution) using ghostscript</li> <li>option to antialias and filter bitmap backgrounds when zooming</li> <li>option to emulate eraser tip with right mouse button</li> <li>binary installer allows non-root installation without compiling</li> <li>full-screen mode (patch contributed by Luca De Cicco)</li></ul></p><p>Version 0.1.1 (January 5, 2006):<ul> <li> two bugfixes </li> <li> backward compatibility with GTK+ 2.4 </li></ul></p><p>Version 0.1 (January 2, 2006): initial release.</p><hr /><a name="file-format"></a><h2 class="subtitle">The file format</h2><h3 class="subsub">Overall structure</h3><p>Xournal stores its data in gzipped XML-like files. The gzipped data consistsof a succession of XML tags describing the document. By convention, thefile header and trailer look like this:<pre><?xml version="1.0" standalone="no"?><xournal version="..."><title>Xournal document - see http://math.mit.edu/~auroux/software/xournal/</title>... sequence of pages ...</xournal></pre>The <title> and <xournal> tags may only appear within the fileheader (not within the pages of the document). The <i>version</i> attribute ofthe <xournal> tag indicates which version of Xournal was used tocreate the document; it is currently ignored, but may be used in a laterrelease if the file format changes in an incompatible manner.(Following a suggestion of Matteo Abrate, starting with version 0.4 the<xournal> tag is the document's root tag, and encloses all other tags).</p><p>The rest of the file is a sequence of pages, specified by a<page> tag, whose attributes <i>width</i> and <i>height</i> specify thephysical size of the page in points (1/72 in). The width and heightparameters are floating point values. The format of a page is therefore:<pre><page width="..." height="...">... page contents ...</page></pre></p><h3 class="subsub">Page background</h3><p>The first entry within a page describes the page background.It consists of a <background> tag followed by several mandatoryXML attributes. The first attribute is always <i>type</i>, whichcan take three possible values: "solid" for a solid background, "pixmap"for a bitmap background, and "pdf" if the background is a page of a PDFdocument. The rest of the attributes depends on the type of background.<ul><li><p> Solid background: <tt><background type="solid" color="..."style="..." /></tt> <br />The <i>color</i> attribute takes one ofthe standard values "white", "yellow", "pink", "orange", "blue", "green",or can specify a hexadecimal RGBA value in the format "#rrggbbaa". The<i>style</i> attribute takes one of the standard values "plain", "lined","ruled", or "graph".</p></li><li><p> Bitmap background: <tt><background type="pixmap" domain="..."filename="..." /></tt> <br />The <i>domain</i> attribute takes one of the standard values "absolute","attach", or "clone". A value of "absolute" indicates that the bitmap isfound in the file specified by <i>filename</i>. The bitmap can be in anyformat recognized by the gdk-pixbuf library; this includes most of thecommon bitmap formats (JPEG, PNG, BMP, GIF, PCX, PNM, TIFF, ...).<br />A valueof "attach" indicates that the bitmap is an attachment to the Xournal file.The bitmap is in PNG format, and resides in a file whose name is derivedfrom that of the main Xournal file by appending to it a dot and the contentsof the <i>filename</i> attribute. For example, if the Xournal file is in<tt>file.xoj</tt> and the <i>filename</i> attribute is <tt>"bg_1.png"</tt>then the bitmap file is <tt>file.xoj.bg_1.png</tt> (Xournal saves attachedbitmaps sequentially in files ...bg_1.png, ...bg_2.png, etc.)<br />A value of "clone" indicates that the bitmap is identical to thebackground of a previous page of the journal; the <i>filename</i> attributethen specifies the page number, starting with 0 for the first page. Forexample, if a <i>filename</i> value of <tt>"1"</tt> indicates that thebackground bitmap is identical to that of the second page.</p></li><li><p> PDF background: <tt><background type="pdf" domain="..."filename="..." pageno="..." /></tt> or<tt><background type="pdf" pageno="..." /></tt><br />The <i>domain</i> and <i>filename</i> attributes must be specifiedfor the first page of the journal that uses a PDF background, and mustbe omitted subsequently for every other page that uses a PDF background.The <i>domain</i> attribute takes one of the standard values"absolute" and "attach"; the PDF document is to be found in the filespecified by <i>filename</i> (if <i>domain</i> is "absolute"), or in thefile whose name is obtained by appending a dot and the contents of the<i>filename</i> attribute to the name of the main Xournal file (if<i>domain</i> is "attach"). The <i>pageno</i> attribute specifies whichpage of the PDF file is used as background, starting with 1 for the firstpage of the PDF file.</p></li></ul></p><h3 class="subsub">Layers and strokes</h3><p>After the line specifying the background, the remainder of a <page>section is occupied by one or more layer sections<pre><layer> ... </layer></pre>describing the various items within a layer. Every page mustcontain at least one layer; a layer may be empty. The successive layersare listed in their stacking order, from bottom to top.</p><p>A layer consists of a collection of items, listed in the order in whichthey should be drawn(from bottom-most to top-most).Up to version 0.3.3, the only legal contents within a layer are strokes. The format of a stroke is:<pre><stroke tool="..." color="..." width="...">... list of coordinates ...</stroke></pre>The <i>tool</i> attribute can take the values "pen", "highlighter", or"eraser" depending on the tool used to create the stroke (pen, highlighter,or whiteout eraser); a value of "highlighter" indicates that the strokeshould be painted in a partially transparent manner (Xournal uses an alphacoefficient of 0.5).The <i>color</i> attribute can take one of the standard values "black","blue", "red", "green", "gray", "lightblue", "lightgreen", "magenta","orange", "yellow", "white", or can specify a hexadecimal RGBA value inthe format "#rrggbbaa". The <i>width</i> attribute is a floating-pointnumber and specifies the width of the stroke in points (1/72 in).</p><p>The list of coordinates is simply a succession of floating-point values,separated by whitespace.The number of given values must be even; consecutive pairs of values givethe <i>x</i> and <i>y</i> coordinates of each point along the stroke.These values are expressed in points (1/72 in). The coordinates (0,0)represent the top-left corner of the page: hence x is measured from the leftof the page, and y is measured from the top of the page.</p><p>Every stroke must contain at least two points (four floating point values).Moreover, two consecutive points on the stroke should be spaced no morethan 5 units apart or so; longer line segments should be subdivided asappropriate (otherwise the eraser tool will not interact properly with thestroke). The default precision used by Xournal for the x,y coordinates is0.01 unit (1/7200 in).</p><p>Starting with version 0.4, layers also contain text items.The format of a text item is:<pre><text font="..." size="..." x="..." y="..." color="...">... text ...</text></pre>The <i>font</i> attribute contains the font name, for example "Serif BoldItalic"; if the font is not available, another font will be substituted.The <i>size</i> attribute specifies the font size in points. The <i>x</i>and <i>y</i> attributes specify the coordinates of the top-left cornerof the text box in page coordinates (measured in points from the top-leftcorner of the page). Finally, the <i>color</i> attribute contains eitherthe name of a standard color or a hexadecimal RGBA value (see above).</p><p>The contents of the text are encoded in UTF-8, with the characters
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -