 <chapter id="file-operations">
  <title>File Operations</title>
  
  <!-- ============= File operations: Creating a new file === -->
  <sect1 id="creating-files">
   <title>Creating a new file and inserting text</title>
    <sect2 id="new-file">
    <title>Creating a New File</title>
     <para>
     To create a new file, choose <menuchoice><guisubmenu>File</guisubmenu>
     <guimenuitem>New</guimenuitem></menuchoice> from the menu bar, or click on the 
     <guibutton>New File</guibutton> button on the main toolbar. A new page will 
     appear in the editor (or a new window if the parent document is windowed). 
     New documents will be named <filename>newfile#1</filename>, 
     <filename>newfile#2</filename>, <filename>newfile#3</filename> and 
     so on. 
     </para>
	   <important>
	   <title>Save file</title>
	   <para>
		You should save new documents as soon as possible to avoid any data 
		loss in case of a crash.
	   </para>
	   </important>
    </sect2>
    <sect2 id="file-wizard">
    <title>File Wizard</title>
     <para>
      A wizard can also be used to create a new file. To create a new file, choose
      <menuchoice><guisubmenu>File</guisubmenu><guisubmenu>New</guisubmenu> 
      <guimenuitem>File</guimenuitem></menuchoice> from the menu bar.
      This will open the New File dialog. Select the file type. Enter the filename. 
      The suffix will be automatically added. 
      You can add license information (according to your license choice) and a header.
      In case of a C/C++ header file, you can also add an header template.
      Click <guibutton>OK</guibutton> to validate the creation.
      <figure id="new-file-wizard">
       <title>New File Wizard</title>
       <screenshot>
        <screeninfo>The Open File dialog</screeninfo>
        <graphic fileref="figures/new_file_wizard.png" format="PNG" srccredit="jnoel"></graphic>
       </screenshot>
      </figure>
     </para>
     <para>
       <application>Anjuta</application> occasionally also creates new file windows during some
        operations. For example, some Subversion operations such as <command>Diff</command> and
        <command>View Log</command>
        create new file windows and add the output there. You can save the contents of these windows
        to real files if you like.
     </para>
     </sect2>
     <sect2 id="inserting-macros">
      <title>Inserting Macros</title>
       <para>
         You can use <emphasis>macros</emphasis> to quickly edit repetitive sequences of text.
       </para>
       <important>
       <para>
        The Macro plugin must be activated.
       </para>
       </important>
      <sect3 id="inserting">
       <title>Inserting</title>
       <para>
        Two types of macros are available: Anjuta macros and user macros (displayed as "My macros"). Anjuta macros 
        are not modifiable, but you can define and modify your own user macros.
       </para>
       <para>
        To insert a macro, move the cursor to the desired place. Select  
        <menuchoice><guisubmenu>Edit</guisubmenu><guisubmenu>Macros</guisubmenu>
        <guimenuitem>Macros...</guimenuitem></menuchoice>. A dialog window appears. Select the 
        desired macro in the list. The result of the macro expansion is displayed in the window and a
        summary is shown in the dialog window. Choose <guibutton>Insert</guibutton>. The expanded macro
        text is inserted at the cursor position.
       </para>
       <para>
        Another way to insert a macro is to select <menuchoice><guisubmenu>Edit</guisubmenu>
        <guisubmenu>Macros</guisubmenu><guimenuitem>Insert Macro...</guimenuitem></menuchoice>, 
        then to press the desired macro shortcut.
        <figure id="display-macro">
         <title>Macro</title>
          <screenshot>
           <screeninfo>The Macro dialog</screeninfo>
           <graphic fileref="figures/display_macro.png" format="PNG" srccredit="jnoel"></graphic>
          </screenshot>
        </figure>
       </para>
       </sect3>
       <sect3 id="defining-macro">
        <title>Defining Macros</title>
        <para>
          From the Insert Macro window, choose <guibutton>Add</guibutton> or select <menuchoice>
          <guisubmenu>Edit</guisubmenu><guisubmenu>Macros</guisubmenu><guimenuitem>Add Macro...
          </guimenuitem></menuchoice>. The Add/Edit window appears. Enter the macro name, choose or 
          define a category and enter a shortcut. Then edit text relative to your macro. The character 
          ' | ' will indicate the cursor position after the macro insertion. Choose
          <guibutton>OK</guibutton>. The macro is added to the list.
        </para>
        <para>
          You can also erase a macro by selecting it in the list and choosing
          <guibutton>Remove</guibutton>.  This only works for user macros (My Macros), of course.
        </para>
        <para>
          Similarly, you can edit and modify a macro by selecting it in the list and choosing
         <guibutton>Edit</guibutton>.
         <figure id="add-edit-macro">
          <title>Add/Edit Macro</title>
          <screenshot>
           <screeninfo>Add Edit dialog</screeninfo>
           <graphic fileref="figures/add_edit_macro.png" format="PNG" srccredit="jnoel"></graphic>
          </screenshot>
         </figure>	
        </para>
       </sect3>
       <sect3 id="macro-keyword">
        <title>Macro Keywords</title>
        <para>
          Macro keywords are available. They can be included in macro definitions.
          These macro keywords start and finish with the character ' @ '.
        </para>
        <para>
         Available macro keywords are @DATE_TIME@, @DATE_YMD@, @DATE_Y@, @USER_NAME@, @FILE_NAME@,
         @FILE_NAME_UP@, @FILE_NAME_UP_PREFIX@, @EMAIL@, @TABSIZE@, @INDENTSIZE@, and @USETABS@.
         <figure id="keyword-macro">
         <title>Keyword Macro</title>
          <screenshot>
           <screeninfo>The Keyword macro</screeninfo>
           <graphic fileref="figures/keyword_macro.png" format="PNG" srccredit="jnoel"></graphic>
          </screenshot>
         </figure>	
        </para>
      </sect3>
     </sect2>
  </sect1>

 <!-- ============= File operations: Opening and saving files === -->
  <sect1 id="open-save-files">
   <title>Opening and Saving Files</title>
   <para>
    <orderedlist>
     <listitem>
      <para>
       <emphasis>Opening a file:</emphasis> 
	   To open an existing file, choose <menuchoice><guisubmenu>File</guisubmenu>
	   <guimenuitem>Open</guimenuitem></menuchoice> from the menu bar, click on 
	   the <guibutton>Open</guibutton> button on the toolbar, or press 
	   <keycombo><keycap>Ctrl</keycap><keycap>O</keycap></keycombo>. This will 
	   display the <interface>Open File</interface> dialog.
       <figure id="open-file">
        <title>Open File dialog</title>
        <screenshot>
		<screeninfo>The Open File dialog</screeninfo>
         <graphic fileref="figures/open_file.png" format="PNG" srccredit="jnoel"></graphic>
        </screenshot>
       </figure>
       Select or enter the name of file you want to open, then click 
	   <guibutton>Open</guibutton>. To open more than one file at once, select multiple files
	   to open by holding down the <keycap>Ctrl</keycap> key and clicking each file in turn; then
	   press <guibutton>Open</guibutton>. If you change your mind, click 
	   <guibutton>Cancel</guibutton> to dismiss the dialog without opening 
	   the file.
      </para>
	  <para>
	   <figure id="open-file-multiple">
        <title>Open Multiple File dialog</title>
        <screenshot>
		<screeninfo>The Open File dialog in multiple-select mode</screeninfo>
         <graphic fileref="figures/open_file_multiple.png" format="PNG" srccredit="jnoel"></graphic>
        </screenshot>
       </figure>
	  </para>
	  <para>
	   You can enable the <emphasis>Show Hidden Files</emphasis> option through the pop-up menu
       that appears when you right-click in the Open File dialog.  This option will make hidden
	   files (files starting with ".") visible in the file list. Clear the option to hide hidden files.
       The Open File dialog also has a built-in
	   file type filter. Select the appropriate file type filter in the dialog and the file
	   list will be limited to the files of the selected type only.
	  </para>
     </listitem>
     
     <listitem>
      <para>
       <emphasis>Saving a file:</emphasis> 
	   To save a file, choose <menuchoice><guisubmenu>File</guisubmenu>
	   <guimenuitem>Save</guimenuitem></menuchoice> from the menu bar, click on 
	   the <guibutton>Save</guibutton> button on the toolbar, or press 
	   <keycombo><keycap>Ctrl</keycap><keycap>S</keycap></keycombo>. This will 
	   save the file. If the file is new, a <interface>Save As</interface> dialog will 
	   appear. Enter a filename and click <guibutton>Save</guibutton> to save the new file 
	   with the name supplied.
	   <screenshot>
	    <screeninfo>The Save As File</screeninfo>
            <graphic fileref="figures/save_as_file.png" format="PNG" srccredit="jnoel"></graphic>
           </screenshot>
      </para>
	   <note>
	   <title>File autosave</title>
		<para>
		If you have enabled autosave, Anjuta will not autosave any new files. 
		You must first save them manually. The same applies to the 
		<guimenuitem>Save All</guimenuitem> option: Anjuta will not save new files, 
		if you haven't saved them first manually. <emphasis>You must save a file manually 
		before autosave or <guimenuitem>Save All</guimenuitem> will work with it.</emphasis>    
		</para>
	   </note>
     </listitem>

     <listitem>
      <para>
      <emphasis>Saving a file with a different name:</emphasis> 
	  You can explicitly save a file with a new filename. To do this, choose 
	  <menuchoice><guisubmenu>File</guisubmenu><guimenuitem>Save As</guimenuitem></menuchoice> 
	  from the menu bar. A <interface>Save As</interface> dialog will appear prompting you to 
	  enter the new filename. Enter the name and click <guibutton>Save</guibutton>.
      </para>
      <note>
       <title>File save as overwrite</title>
       <para>
        When you use <guimenuitem>Save As</guimenuitem> with an existing file, 
		the original is not deleted. It is left unchanged since the last save. 
		If a file with the new filename already exists, a confirmation dialog 
		will appear to ensure that you want to overwrite it. Clicking 
		<guibutton>Yes</guibutton> will overwrite the file with the file you 
		are saving.
       </para>
      </note>
     </listitem>
     
     <listitem>
      <para>
      <emphasis>Closing a file:</emphasis> 
	  To close a file, choose <menuchoice><guisubmenu>File</guisubmenu>
	  <guimenuitem>Close</guimenuitem></menuchoice> from the menu bar, or click on the 
	  <guibutton>Close</guibutton> button on the toolbar. (You can also close a file
	  by clicking the X in its filename tab.) This will close
	  the current file. If the file is not saved, or is a new file, then 
	  <application>Anjuta</application> will prompt you to save the file before 
	  closing it.
      </para>
     </listitem> 
    </orderedlist>
   </para>
  </sect1>
 
 <!-- ============= File operations: Editing files === -->
  <sect1 id="editing-files">
   <title>Editing Files</title>
   <para>
    <application>Anjuta</application> has a number of features which help you
    edit and work with source files. The following sections describe how to use 
	some of the interesting features available.
   </para>
   <sect2 id="editor-margins-sec">
   <title>Editor Margins</title>
      <para><emphasis>Editor Margins:</emphasis> Editor margins appear to the
	   left of the editor and are used for some special purposes. There are three editor margins available:
       the <emphasis>line number margin</emphasis>, the <emphasis>marker margin</emphasis>
       and the <emphasis>code fold margin</emphasis>.
       By default (that is, when you run <application>Anjuta</application> for the first time) only
       the code fold margin will be visible. The rest can be made visible via
       <menuchoice><guimenu>View</guimenu><guisubmenu>Editor</guisubmenu></menuchoice>.
       <figure id="editor-margins">
        <title>Editor Margins</title>
        <screenshot>
         <screeninfo>The Tags toolbar</screeninfo>
         <graphic fileref="figures/editor_margins.png" format="PNG" srccredit="naba"></graphic>
        </screenshot>
       </figure>
       </para>
       <para>
	   The <emphasis>line number margin</emphasis> is largest of all the three margins (and is slightly
	   darker then rest) and displays a document's line numbers.
	   The <emphasis>line number margin</emphasis> can be shown or hidden
	   by toggling <menuchoice><guimenu>View</guimenu><guisubmenu>Editor</guisubmenu>
	   <guimenuitem>Line Numbers Margin</guimenuitem></menuchoice>. Left-clicking on this margin
	   will select an entire line (including the trailing newline, if present). You can set font
	   properties for the line number margin in the preferences.
      </para>
	  <para>The <emphasis>marker margin</emphasis> can be shown or hidden
	   via <menuchoice><guimenu>View</guimenu><guisubmenu>Editor</guisubmenu>
	   <guimenuitem>Markers Margin</guimenuitem></menuchoice>. This margin displays graphical icons
	   to mark the given line. The margin may display bookmark markers
	   (blue and rectangular), breakpoint markers (red and circular)
       and line indicator markers (which look like a yellow pointed arrow).
       A bookmark marker indicates a bookmarked line, and can
	   be toggled via <menuchoice><guimenu>Goto</guimenu><guisubmenu>Bookmark</guisubmenu><guimenuitem>
	   Toggle Bookmark</guimenuitem></menuchoice>
	   with the cursor placed on that line. A breakpoint marker is used in the debugger to indicate a
	   debugging breakpoint (see the Debugging section for more details). A line indicator
	   marker is used to indicate the current program position in the debugger.
       </para>
       <para>
        The <emphasis>code fold margin</emphasis> is where the folding tree is visible. Clicking 
        on folding tree nodes will fold or unfold code blocks. An underline will also
        be drawn below a folded line to make it more obvious that a block of code has been 
        folded below the line. For more details on code folding, see the section <emphasis>Code Folding</emphasis>
        below.
       </para>
       <note>
       <title>Invisible margin marker</title>
        <para>
         If the marker margin is not visible, Anjuta displays markers by changing the
         background color of a line. For example, if a breakpoint marker is set in 
         a line and the marker margin is not visible, that line will be displayed with a red
         background. Similarly, for a bookmark marker and a line indicator marker the background
         color of the line will be sky blue and yellow, respectively. If you do not like this
         (perhaps due to some contrasting themes), enable the marker margin
         via <menuchoice><guimenu>View</guimenu><guisubmenu>Editor</guisubmenu>
         <guimenuitem>Marker Margin</guimenuitem></menuchoice>.
         <figure id="editor-markers">
          <title>Editor markers when the marker margin is invisible</title>
          <screenshot>
           <screeninfo>The Tags toolbar</screeninfo>
           <graphic fileref="figures/editor_markers.png" format="PNG" srccredit="naba"></graphic>
          </screenshot>
         </figure>
        </para>
       </note>
      </sect2>
      <sect2 id="editor-guides-sec">
      <title>Editor Guides</title>
      <para>The editor can be set to display certain document information which is
      normally invisible, including <emphasis>indentation guides</emphasis>, <emphasis>white space</emphasis>
      and <emphasis>line end characters</emphasis>. They can be make
      visible or invisible by toggling the menu items in <menuchoice><guimenu>View</guimenu>
      <guisubmenu>Editor</guisubmenu></menuchoice>. Indentation guides are small dotted lines 
      drawn to connect matching braces in source code. When the cursor is over a
      matching brace, its dotted indentation guide is highlighted to emphasize the indentation level visually.
      </para>
       <figure id="editor-guides">
        <title>Editor with guides</title>
        <screenshot>
         <screeninfo>Editor with guides</screeninfo>
         <graphic fileref="figures/editor_guides.png" format="PNG" srccredit="naba"></graphic>
        </screenshot>
      </figure>
    </sect2>
   <sect2 id="highlighting">
   <title>Syntax highlighting</title>
   <para>
    <application>Anjuta</application> can highlight the syntax of many different languages. 
	This is usually done automatically by determining the type of a file from its 
	extension. If <application>Anjuta</application> cannot determine the type of 
	a file, there will be no syntax highlighting. You can explicitly force a particular 
	highlight style by selecting the style from the menu 
	<menuchoice><guimenu>View</guimenu><guisubmenu>Editor</guisubmenu><guisubmenu>
	Highlight Mode</guisubmenu></menuchoice>.
   </para>
    <note>
     <para>
	Anjuta uses a properties file named
	<filename>$prefix/share/anjuta/properties/anjuta.properties</filename>,
	which has the same format as a SciTE properties file but does not use
	all properties. The style of each element for all languages is
	defined in a file named 
	<filename>$prefix/share/anjuta/properties/styles.properties</filename>.
	It uses some common properties defined by Anjuta in the file
	<filename>$home/.config/anjuta/scintilla/editor-style.properties</filename>.
     </para>
   </note>
   </sect2>
   <sect2 id="codefolding">
    <title>Code folding</title>
    <para>
     Anjuta can display <emphasis>code folds</emphasis> for source files in block-structured
     languages (such as C, C++, Pascal, and Java).
     All code blocks in a source file can be folded or unfolded by clicking on the
     fold points in the code fold margin of the <interface>Editor</interface> window
	 (usually a +/- symbol or up/down arrow). These fold points automatically appear for 
	 source files which use code blocks.
    </para>
    <para>
     Code folding is especially useful when editing large source files with
     thousands of lines. Once the folds are closed, a document appears to become 
	 smaller, facilitating easy browsing and editing of the file.
    </para>
    <note>
     <para>
	  Please note that code folding and editor guides are only available in
      the Scintilla-based editor.
	 </para>
	</note>
   </sect2>
   <sect2 id="autoformat">
    <title>Auto-formatting source code</title>
    <para>
      Anjuta can automatically indent (auto-format) C or C++ source or header files. This gives a clean look to
      the source code, increases legibility, reduces the likelihood of syntax errors,
      and above all saves time. To auto-indent the current source file, choose
      <menuchoice><guimenu>Edit</guimenu><guimenuitem>Auto Indent
      </guimenuitem></menuchoice> on the menu bar. You can change the style of formatting by customizing the 
      choices in the preferences.
    </para>
   </sect2>
  </sect1>

 <!-- ============= File operations: Browsing with the tags browser ===   -->
  <sect1 id="browsing-files">
   <title>The Symbol Browser</title>
   <para>
    You can browse C and C++ source and header files using <emphasis>tags</emphasis> in the files. 
	A tag (or <emphasis>symbol</emphasis>) refers to a named entity such as a function definition, structure, or macro.
    Anjuta scans open C and C++ source and header files for available tags.
   </para>
   <para>
    <application>Anjuta</application> will automatically scan for tags 
    in all of the source and header files of any open project. You can
	jump to any function definition, structure definition, class definition or other tag 
	without manually opening the containing file. You don't even have to know which file the
	tag is found in. The symbol browser
    lists all available symbols in the project.
    <figure id="symbol-browser">
     <title>Symbol browser</title>
     <screenshot>
      <screeninfo>Symbol browser</screeninfo>
      <graphic fileref="figures/symbol_browser.png" format="PNG" srccredit="jhs"></graphic>
     </screenshot>
    </figure>
    </para>
   <tip>
    <title>Tag synchronization</title>
    <para>
     You don't have to worry about the synchronization and update of the tag 
     database. <application>Anjuta</application> will take care of everything. 
	 You just have to decide which tag you want to go to!
    </para>
   </tip>
   
  </sect1>

  <!-- ============= File operations: Searching and replacing in files === -->
  <sect1 id="search-replace-files">
   <title>Searching for and Replacing text in files</title>
    <sect2 id="searching">
    <title>Searching</title>
      <para>
       To search for a <emphasis>string</emphasis> or <emphasis>regular expression</emphasis>
       in the current file, choose <menuchoice><guimenu>Edit</guimenu>
       <guisubmenu>Search</guisubmenu><guimenuitem>Find</guimenuitem></menuchoice>
       or press <keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>F</keycap></keycombo>.
       This will open the <interface>Find</interface> dialog. 
      </para>
      <para>
       Use the text box to specify the string to search for, and select whether it is a normal 
       string or a regular expression. You can also specify the direction of 
       search, whether the search is case-sensitive or not, and the scope of the search. Click 
       <guibutton>Search</guibutton> to start searching.
      </para>
      <para>
       If the search is successful, Anjuta will jump to the matched text or perform another action
       (according to the <guilabel>Search Action</guilabel> you choose in the <guilabel>Search Target</guilabel> tab). If the search is not successful, Anjuta will display 
       a message indicating that the search text was not found.
      </para>
      <para>
       If you want to search again, click the <guibutton>Search</guibutton> button again
       or press <keycombo><keycap>Ctrl</keycap><keycap>G</keycap></keycombo>. This will 
       find the next match (use <keycombo><keycap>Shift</keycap><keycap>Ctrl</keycap>
       <keycap>G</keycap></keycombo> for the previous match). You can even 
       change the search text when you do this; enter the new string in the 
       <guilabel>Search Expression</guilabel> text box in the search dialog.
      </para>
      <figure id="search-expr">
      <title>Search Text dialog</title>
        <screenshot>
        <graphic fileref="figures/search_expr.png" format="PNG" srccredit="jhs"></graphic>
        </screenshot>
      </figure>
	  <para>
	    To stop a long search, press the <guibutton>Stop</guibutton> button.
	  </para>
    </sect2>
    <sect2 id="search-range">
    <title>Specifying Search Range</title>
      <para>
        In the <interface>Search Target</interface> tab, define the search location and the action 
		to be performed if the search succeeds.
      </para>
      <para>
        You can define the maximum number of actions to be performed.
      </para>
      <figure id="search-target">
      <title>Search Target dialog</title>
        <screenshot>
        <graphic fileref="figures/search_target.png" format="PNG" srccredit="jhs"></graphic>
        </screenshot>
      </figure>
      <para>
        You can select which text will be searched.
      </para>
      <figure id="search-target-in">
      <title>Search Target In choice</title>
       <screenshot>
       <graphic fileref="figures/search_target_in.png" format="PNG" srccredit="jhs"></graphic>
       </screenshot>
      </figure>
      <sect3 id="search-file">
      <title>Searching in Files</title>
       <para>
         To find text in your project, set <guilabel>Search In</guilabel> to
	     All Project Files.
       </para>
       <para>
         In the <guilabel>Search Expression</guilabel> tab, enter the text you want to search for and specify search options, such as the <guilabel>Match case</guilabel>
         or <guilabel>Match complete words</guilabel> options.
         Click <guibutton>Search</guibutton> to start searching.
       </para>
       <para>
         To find text in a set of files, set <guilabel>Search In</guilabel> to
	     Specify File Patterns. Define the search variables.  
         Click <guibutton>Search</guibutton> to start searching.		 
       </para>	 
         <figure id="search-file-pattern">
         <title>Search File Pattern</title>
          <screenshot>
          <graphic fileref="figures/search_file_pattern.png" format="PNG" srccredit="jhs"></graphic>
          </screenshot>
       </figure>

      </sect3>		 

	</sect2>
    <sect2 id="search-action">
    <title>Specifying a Search Action</title>
      <para>
        You can select which action will be performed when a search succeeds.
      </para>
      <para>
        Depending on the previous selections (<guilabel>Search In</guilabel>, <guilabel>Search Direction</guilabel>
        , and so on),
		some actions may be unavailable.
      </para>
      <figure id="search-target-action">
      <title>Search Target Action choice</title>
       <screenshot>
       <graphic fileref="figures/search_target_action.png" format="PNG" srccredit="jhs"></graphic>
       </screenshot>
      </figure>
  
    </sect2>
    <sect2 id="replacing">
    <title>Replacing</title>
      <para>
       Searching and replacing is similar to just finding text, except that you 
       also specify the replacement text in the <guilabel>Replace With</guilabel> text box, 
       and also specify whether or not you want to be prompted before each replacement takes place
	   (Replace First Match or Replace All Matches).
      </para>
      <figure id="replace">
      <title>Replacing</title>
        <screenshot>
        <graphic fileref="figures/search_replace.png" format="PNG" srccredit="jhs"></graphic>
        </screenshot>
      </figure>
	  <para>
	    Choose <guibutton>Replace</guibutton> to replace the matched text or 
		<guibutton>Forward</guibutton> to jump to the next matched text.
	  </para>

	</sect2>
    <sect2 id="search-setting">
    <title>Search Setting</title>
      <para>
        You may also save search options.
      </para>
      <para>
        The item highlighted in red is the active item. The default item specifies search
		settings which are loaded when Anjuta launches.
      </para>
      <figure id="search-setting-fig">
      <title>Search Setting dialog</title>
        <screenshot>
        <graphic fileref="figures/search_setting.png" format="PNG" srccredit="jhs"></graphic>
        </screenshot>
       </figure>
    </sect2>

  </sect1>

 <!-- ============= File operations: Printing Files === -->
   <sect1 id="printing">
    <title>Printing a file</title>
    <para>
     You can perform a print preview by selecting 
	 <menuchoice><guisubmenu>File</guisubmenu><guimenuitem>Print Preview</guimenuitem></menuchoice>.
	 This will render the current file and present a preview of the print. Source code which
	 is highlighted in the editor is also highlighted similarly in the preview (and subsequent print).  The
	 <guilabel>Printing</guilabel> tab of your editor plugin preferences contains additional
	 options which let you print with line numbers, wrapped lines and/or headers.
	 <figure>
       <title>Print preview of a C file</title>
       <screenshot>
       <screeninfo>Print preview</screeninfo>
        <graphic fileref="figures/print_preview.png" format="PNG" srccredit="jhs"></graphic>
       </screenshot>
     </figure>
	</para> 
    <para>
	 <figure>
       <title>Print Preferences</title>
       <screenshot>
	   <screeninfo>Print preferences</screeninfo>
        <graphic fileref="figures/prefs_print.png" format="PNG" srccredit="jhs"></graphic>
       </screenshot>
     </figure>
	</para>
	<para>
	When you are ready to print and satisfied with the preview, select 
	<menuchoice><guisubmenu>File</guisubmenu><guimenuitem>Print</guimenuitem></menuchoice>
	or <guibutton>Print</guibutton> from the print preview window. This will bring up the
	actual print dialog as shown below. Select the appropriate print parameters and press
	<guibutton>Print</guibutton> to print the file.
	</para>
	<para>
	You can also set landscaped or portrait page layout and the paper size, page orientation
	and paper type. Remember to set them up properly according to your printer,
	otherwise printing may not look correct.
	</para>
	<para>
	 <figure>
       <title>Print Dialog</title>
       <screenshot>
	   <screeninfo>Print Dialog</screeninfo>
        <graphic fileref="figures/print_dlg.png" format="PNG" srccredit="jhs"></graphic>
       </screenshot>
     </figure>
	</para>
   </sect1>
 </chapter>

