# 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; and &lilypond;:

Save Document when &lilypond; is run

- If checked, &frescobaldi; will save the document (if modified) before running &lilypond;.

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.

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.

Disable the built-in PDF preview

- If checked, the built-in PDF preview will be disabled. This is useful if you prefer an external PDF viewer (e.g. Okular).

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

### Paths

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.

If you change the path to the `lilypond` command, be sure to also point the `convert-ly` command to the same directory.

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 &lilypond; documentation browser.

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

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