Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > d3881c03665158ce9e2a625eef938207 > files > 194

frescobaldi-1.0.2-1mdv2010.1.noarch.rpm

<chapter id="configuring">
<title>Configuring &frescobaldi;</title>

<para>This chapter documents how to configure &frescobaldi; for your needs.</para>

<sect1 id="settings-menu">
<title>The Settings Menu</title>

<para>
The <guimenu>Settings</guimenu> menu has options to show the full path of the
file currently being edited in the window title bar or just the filename, to
show or hide the toolbar and to switch the &frescobaldi; window to full screen
mode.
</para>

<para>
The <guisubmenu>Tool Views</guisubmenu> sub menu lets you alter some settings of
the tools in the sidebar docks of the &frescobaldi; window. (Note that you can
right-click on the tabs in the sidebar docks for more tool options.)
</para>

<para>
Finally, &frescobaldi; has the usual menu entries
<guimenuitem>Configure Shortcuts...</guimenuitem>,
<guimenuitem>Configure Toolbars...</guimenuitem> and
<link linkend="settings-dialog"><guimenuitem>Configure &frescobaldi;...</guimenuitem></link>.
</para>

</sect1>

<sect1 id="settings-dialog">
<title>The Settings Dialog</title>

<sect2 id="settings-general-preferences">
<title>General Preferences</title>

<para>
Here you can set some general preferences to influence the behaviour of
&frescobaldi; and &lilypond;:
</para>

<variablelist>

<varlistentry>
<term><guilabel>Save Document when &lilypond; is run</guilabel></term>
<listitem>
  <para>
  If checked, &frescobaldi; will save the document (if modified) before running
  &lilypond;.
  </para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Let &lilypond; delete intermediate files</guilabel></term>
<listitem>
  <para>
  If checked, &frescobaldi; will run &lilypond; with the
  <option>delete-intermediate-files</option> option, so that e.g. PostScript
  files are deleted after the PDF file has been generated.
  </para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Run &lilypond; with verbose output</guilabel></term>
<listitem>
  <para>
  If checked, &frescobaldi; will run &lilypond; with the
  <option>verbose</option> option, displaying more information during the
  compile process.
  </para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Remember cursor position, bookmarks, etc.</guilabel></term>
<listitem>
  <para>
  If checked, &frescobaldi; will save the cursor position, bookmarks and some
  view settings for a document when it is closed. This meta-information is
  retained for one month.
  </para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Disable the built-in PDF preview</guilabel></term>
<listitem>
  <para>
  If checked, the built-in PDF preview will be disabled. This is useful if you
  prefer an external PDF viewer (e.g. <productname>Okular</productname>).
  </para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>&lilypond; version number to use for new documents</guilabel></term>
<listitem>
  <para>
  Here you can set which version number you want &frescobaldi; to insert by
  default with the <guilabel>Insert &lilypond; Version</guilabel> command or the
  Score Wizard. Choose one of three options:
  </para>
  <variablelist>
    <varlistentry>
    <term><guilabel>Use version number of installed &lilypond;</guilabel></term>
    <listitem>
      <para>
      &frescobaldi; will use the version number of the installed &lilypond; by
      default.
      </para>
      
      <para>
      (&frescobaldi; determines the version by running
      <command>lilypond</command> <option>-v</option> and looking at the first
      line of the output.)
      </para>
    </listitem>
    </varlistentry>
    
    <varlistentry>
    <term><guilabel>Use version number of last convert-ly rule</guilabel></term>
    <listitem>
      <para>
      &frescobaldi; will use the version number of last rule of the installed
      <command>convert-ly</command> program by default. This is useful if you
      just want your document to conform to the latest &lilypond; syntax without
      requiring the most recent available version.
      </para>
      
      <para>
      This makes document exchange easier.
      E.g. when you use <userinput>\version "2.12.2"</userinput>, another user's
      &lilypond; version 2.12.0 might complain about your document's version
      being to new, even though there are no syntax changes and the older
      &lilypond; would just compile the document fine.
      </para>
      
      <para>
      (&frescobaldi; determines the last convert-ly rule version by running
      <command>convert-ly</command> <option>--show-rules</option> and looking at
      the last line that starts with a version number.)
      </para>
    </listitem>
    </varlistentry>
    
    <varlistentry>
    <term><guilabel>Use custom version number</guilabel></term>
    <listitem>
      <para>
      Enables you to explicitly specify the version number you want to use by
      default for new documents.
      </para>
    </listitem>
    </varlistentry>
  </variablelist>
</listitem>
</varlistentry>

</variablelist>

<note><para>
Note that the Score Wizard is able to adjust its output depending on the version
you specify in the Score Wizard. It is therefore possible to write documents for
older &lilypond; versions, although in general using the most recent stable
&lilypond; release is recommended.
</para></note>

</sect2>

<sect2 id="settings-paths">
<title>Paths</title>

<para>
Here you can specify the paths to use for different commands. Normally you would
just leave the defaults, but if you have multiple versions of &lilypond;
installed, you can specify which one to run by entering the exact path.
</para>

<note><para>
If you change the path to the <command>lilypond</command> command, be sure to
also point the <command>convert-ly</command> command to the same directory.
</para></note>

<para>
You can also set a default directory for all your &lilypond; documents, and
provide the URL or path to the documentation for the built-in
<link linkend="lilydoc">&lilypond; documentation browser</link>.
</para>

<para>
Finally, at the bottom of the Paths section, you can configure a list of
directories to search for hyphenation pattern files that can be used to break
<link linkend="lyrics">lyrics</link> into syllables.
</para>

<para>
&frescobaldi; currently does not include hyphenation pattern files by itself,
but it can use the hyphenation patterns that are often installed with programs like
<productname>OpenOffice.org</productname>, <productname>KOffice</productname>,
<productname>Scribus</productname> or in specialized packages like <productname>myspell</productname>.
</para>

<para>
If &frescobaldi; doesn't find any hyphenation files,
while you're sure you installed some of the software mentioned above,
try to find out where those files are in your file system, and list the paths
in the text entry.
If your operating system supports the <command>locate</command> command, you can open
a terminal and use a command like this to get a list of paths that you can simply paste in the
text entry to have &frescobaldi; find all installed pattern files:
</para>

<programlisting>locate *hyph_*.dic | sed s,/[^/]*$,, | sort -u</programlisting>

<para>or:</para>

<programlisting>locate *hyph_*.dic | xargs -n1 dirname | sort -u</programlisting>

</sect2>

<sect2 id="settings-editor-component">
<title>Editor Component</title>

<para>
Here configuration options can be set for the KatePart editor component that is used by &frescobaldi;.
Documentation for the editor component can be found in the manuals for
<ulink url="help:/kwrite/pref-dialog.html">KWrite</ulink> and
<ulink url="help:/kate/config-dialog-editor.html">Kate</ulink>.
</para>

</sect2>

</sect1>


<sect1 id="point-and-click">
<title>Configuring Point &amp; Click</title>

<para>
Point &amp; Click is a &lilypond; feature that embeds clickable URLs in the PDF output.
Those URLs contain the source file path and line and column numbers. Clicking on those
clickable objects lets the cursor in &frescobaldi; jump to the corresponding position
in the source document.
</para>

<para>
If all is well, Point &amp; Click should <trademark>"Just Work"</trademark>.
But this section is here to help you setting it up in the case it doesn't work
by default. Point &amp; Click in &frescobaldi; is handled differently in KDE 4.1 and KDE 4.2.
</para>

<para>
In KDE 4.1, you need to install the <literal>lilypond-kde4</literal> package.
This contains a program that handles the <literal>textedit:</literal> service.
If point and click still does not work, check if &frescobaldi; is tied to the
<literal>text/x-lilypond</literal> MIME type in the KDE System Settings
(File Associations).
</para>

<para>
In KDE 4.2, the Point &amp; Click URLs are handled by Okular itself.
When you install &frescobaldi;, on its first run it autoconfigures the Okular part
to run &frescobaldi; when a Point &amp; Click URL is clicked.
But if for some reason this didn't happen, you can configure Okular manually
to run &frescobaldi;.
Right-click the PDF preview tab and choose <guimenuitem>Configure Okular...</guimenuitem>
(or use
<menuchoice>
  <guimenu>Settings</guimenu>
  <guisubmenu>Tool Views</guisubmenu>
  <guimenuitem>Configure Okular...</guimenuitem>
</menuchoice>) to open the Okular settings dialog.
There, under <guilabel>Editor</guilabel>, you can configure a custom editor command.
Enter the following command and click <guibutton>Ok</guibutton>:
</para>

<programlisting>frescobaldi --smart --line %l --column %c</programlisting>

<para>
(The <option>smart</option> option tells &frescobaldi; to translate cursor positions according
to changes in the document. This way, Point &amp; Click URLs remain working, even if you
change the document without updating the PDF preview.)
</para>

<note><para>
Point &amp; Click URLs enlarge the PDF output documents significantly.
It is therefore better to build PDF documents in publish mode when you
want to distribute them (via e-mail or the World-wide Web) to others.
</para></note>

<warning><para>
In KDE 4.2, Okular's built-in Point &amp; Click support sometimes doesn't work
if the path of your &lilypond; source document contains spaces or accented characters.
This is due to Okular not fully understanding the way &lilypond; encodes URLs.
</para></warning>

</sect1>

<sect1 id="syntax">
<title>Highlighting and indenting</title>

<para>
&frescobaldi; uses the &lilypond; syntax highlighting and indenting algorithm from KDE's 
editing component KatePart. By default, indenting is switched on, using spaces,
and the indent-width is 2 spaces.
</para>

<para>
You can configure other indentation settings using kate variables in your document,
by setting kate variables in the &lilypond; Kate mode, or by simply adjusting the
default indentation in the
<link linkend="settings-editor-component">Editor component settings</link>.
</para>

<para>
Setting variables in the document is described
<ulink url="help:/kate/config-variables.html">here in the Kate manual</ulink>.
Setting variables globally for a specific file type (or Kate mode) is described
in the Kate manual under
&quot;<ulink url="help:/kate/config-dialog-editor.html#pref-open-save-modes-filetypes"
>Modes &amp; Filetypes</ulink>.&quot;
Select the <guilabel>Other/&lilypond;</guilabel> mode to enter settings that affect
&lilypond; files. (Kate and KWrite will also use the settings configured here.)
</para>

<para>
The default indentation settings will only have effect if they are not overridden
by variables set in the &lilypond; Kate mode or in the current document.
</para>

</sect1>

</chapter>