# Configuring &frescobaldi;

This chapter documents how to configure &frescobaldi; for your needs.

## The Settings Menu

The Settings 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.

The Tool Views 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.)

Finally, &frescobaldi; has the usual menu entries Configure Shortcuts..., Configure Toolbars... and Configure &frescobaldi;....

## The Settings Dialog

### General Preferences

Here you can set some general preferences to influence the behaviour of &frescobaldi;.

Session to load if &frescobaldi; is started without arguments

  Here you can choose if you want &frescobaldi; to load documents by default. You can let &frescobaldi; start up empty, with the last used session or with a specific session. See Sessions for more information.

When saving documents
  Remember cursor position, bookmarks, etc.

    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.

  Default folder

    Here you can configure a default folder that is displayed when saving a new document for the first time.

Warnings and notifications

  Here you can check which warnings and notifications you want to get. Usually, warning messages have a checkbox "Don't show this message again" (or "Don't ask this question again"). When you enable a warning here, its dialog will be shown on the next occurrence.

Point and Click

  Click this button if Point & Click does not work, i.e. when clicking a note in the PDF preview does not move the cursor in the text editor. See also Configuring Point & Click.

### &lilypond; Preferences

Here you can you configure all &lilypond;-related things.

&lilypond; versions to use

  This list normally shows just one item, "lilypond". But if you have multiple versions of &lilypond; installed you can add them to the list by clicking the Add button. Existing entries can be configured by clicking Configure.

  In the dialog that opens you can specify the exact path to &lilypond;. If you just enter `lilypond`, the first &lilypond; instance in your `PATH` environment variable is used. You can also enter the paths to related commands such as `convert-ly` and `lilypond-book`. But if you don't specify the paths, these commands will be searched for in the same directory as the `lilypond` command was found.

  Check Set as default to make the current &lilypond; entry the default, i.e. the one that is run for all actions (also the Blank Staff Paper tool, etc.). The other checkbox, Include in automatic version selection, if checked, will include the current &lilypond; entry in the automatic version selection (see below). The Download button lets you download and install binary packages from the &lilypond; website.

  Below the list of installed &lilypond; instances, there is a checkbox Enable automatic version selection. If checked, &frescobaldi; will check the `\version` statement in your document and choose the most suitable &lilypond; version from your installed list to run. This is the lowest available version number that's still higher than or equal to the document's version. You can exclude particular instances (e.g. development or testing versions) by unchecking the option Include in automatic version selection of that &lilypond; entry.

&lilypond; version number to use for new documents

  Here you can set which version number you want &frescobaldi; to insert by default with the Insert &lilypond; Version command or the Score Wizard. Choose one of three options:

  Use version number of installed &lilypond;

    &frescobaldi; will use the version number of the installed &lilypond; by default.

    (&frescobaldi; determines the version by running `lilypond` `-v` and looking at the first line of the output.)

  Use version number of last convert-ly rule

    &frescobaldi; will use the version number of last rule of the installed `convert-ly` 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.

    This makes document exchange easier. E.g. when you use `\version "2.12.2"`, 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.

    (&frescobaldi; determines the last convert-ly rule version by running `convert-ly` `--show-rules` and looking at the last line that starts with a version number.)

  Use custom version number

    Enables you to explicitly specify the version number you want to use by default for new documents.

  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.

Running &lilypond;

  Here you can adjust how &lilypond; is run.

  Let &lilypond; delete intermediate files

    If checked, &frescobaldi; will run &lilypond; with the `delete-intermediate-files` option, so that e.g. PostScript files are deleted after the PDF file has been generated.

  Run &lilypond; with verbose output

    If checked, &frescobaldi; will run &lilypond; with the `verbose` option, displaying more information during the compile process.

  &lilypond; include path

    Here you can enter a list of directories that are searched for files that are included via the &lilypond; `\include` command.

### Paths

Here you can specify the paths to use for different commands.

Helper applications

  Here you can specify paths to your favorite viewers for PDF and MIDI. If you leave the paths empty, the preferences set in KDE's System Settings are used.

&lilypond; Documentation

  You can also provide the URL or path to the documentation for the built-in &lilypond; documentation browser.

Hyphenation settings

  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 lyrics into syllables.

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

  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 `locate` 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:

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

  or:

      locate '*/hyph_*.dic' | xargs -n1 dirname | sort -u

### Editor Component

In this page you can configure the looks and behaviour of the documents tab bar.

Below this page, 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 KWrite and Kate.

## Configuring Point & Click

Point & 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.

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

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

In KDE 4.2, the Point & 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 & Click URL is clicked. But if for some reason this didn't happen, you can configure Okular manually to run &frescobaldi;. The easiest way to do this is just clicking the button on the first page in the Settings Dialog. But you can also right-click the PDF preview tab and choose Configure Okular... (or use Settings Tool Views Configure Okular... ) to open the Okular settings dialog. There, under Editor, you can configure a custom editor command. Enter the following command and click Ok:

    frescobaldi --smart --line %l --column %c

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

Point & 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.

In KDE 4.2, Okular's built-in Point & 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.

## Highlighting and indenting

&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.

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 Editor component settings.

Setting variables in the document is described here in the Kate manual. Setting variables globally for a specific file type (or Kate mode) is described in the Kate manual under "Modes & Filetypes." Select the Other/&lilypond; mode to enter settings that affect &lilypond; files. (Kate and KWrite will also use the settings configured here.)

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.

## Download LilyPond packages

&frescobaldi; can automatically download and install binary &lilypond; packages (.sh packages) from the &lilypond; website.

To install e.g. a new development version of &lilypond;, go to &menu.settings.lilypond; and click Add. In the dialog that appears (to configure the path to a &lilypond; instance), click Download. Again a small dialog opens, where you can select the &lilypond; version you want to download and a destination directory, which will be created if it doesn't exist.

Then click Install. After downloading and unpacking, the dialog will disappear and the path to the newly installed &lilypond; will be set in the underlying dialog. Click Ok to add the new &lilypond; instance to the list and then Ok to close the Settings dialog and apply your changes.

In the Download dialog, you can also click Details to change the website where the releases are downloaded from, or to manually browse to an already downloaded package.

Inside the destination directory another directory will be created with the version number of the &lilypond; version to be installed, so different versions of &lilypond; can coexist in the same destination directory.

If you install the same version of &lilypond; again, &frescobaldi; will warn you and offer the choice to remove and re-install it, or to just use it instead of overwriting it.

When you remove versions of &lilypond; from the list in the settings dialog, they are not removed from your file system. If you really want to uninstall one of more &lilypond; versions, you can just remove the directory of that version from the place where you installed it.