예제 #1
0
    def body():
        from . import ScoreWizard
        d = {}
        action = ScoreWizard.instances()[0].actionCollection.scorewiz
        d['key'] = help.shortcut(action)
        d['menu'] = help.menu(_("menu title", "Tools"), _("Setup New Score..."))
        return _("""\
<p>
The Score Setup Wizard ({key}) in {menu} is designed
to quickly setup a LilyPond music score.
</p>

<p>
In the first tab, <em>Titles and Headers</em>, you can enter titling
information.
</p>

<p>
In the second tab, <em>Parts</em>, you can compose your score out of many
available part types.
Doubleclick a part type to add it to your score (or click Add).
Select the part in the score list to change some settings for the selected part,
if desired.
Many parts, especially Choir, have powerful options to set up the score the way
you want it.
</p>

<p>
In the third tab, <em>Score settings</em>, global score properties and
preferences can be set.
</p>

<p>
Click the Preview button to get a preview with some example music filled in.
Click OK to copy the generated LilyPond source text to the editor.
</p>

<h3>Multiple pieces or movements</h3>

<p>
A special and powerful feature of the <em>Parts</em> tab is hidden in the 
"Containers" category in the part types list.
</p>

<p>
This category contains the Score, Book and Bookpart types, with which you
can setup a LilyPond document containing multiple scores or even books.
You may add Score, Bookpart or Book entries to the score view.
They can be nested: a Score can be added to a Bookpart or Book but you can't
add a Book to a Bookpart or a Score.
</p>

<p>
Then you can add musical parts.
If you want to create multiple scores with exact the same parts, you can just
add the parts to the top level of the score view, and then the scores, without
adding musical parts to the scores.
The scores will then use the parts in the top level of the score.
</p>
""").format(**d)
예제 #2
0
    def body():
        return _("""\
<p>
Frescobaldi offers the following pitch-manipulating functions,
all in the menu {menu}:
</p>

<dl>

<dt>Pitch language</dt>
<dd>
This translates pitch names in the whole document or a selection.
</dd>

<dt>Convert relative music to absolute</dt>
<dd>
This converts all <code>\\relative</code> music parts to absolute pitch names.
It removes, but honours, octave checks.
</dd>

<dt>Convert absolute music to relative</dt>
<dd>
Checks all toplevel music expressions, changing them into
<code>\\relative</code> mode as soon as the expression contains a pitch.
If you want to make separate sub-expressions relative, it may be necessary to
select music from the first expression, leaving out higher-level opening
braces.
</dd>

</dl>
""").format(menu=help.menu(_("menu title", "Tools"), _("submenu title", "Pitch")))
예제 #3
0
    def body():
        return _("""\
<p>
The rhythm functions of Frescobaldi alter the durations written after notes,
chords, rests, etcetera. Using those functions, all in menu {menu}, it
is possible to double or halve the length of notes, to add or remove dots
and to remove scaling factors.
</p>

<p>
Also it is possible to change the way rhythm is specified: for every note
(explicit), or only when the duration changes (implicit). Some users may prefer
the option implicit per line, which always specifies the duration for the first
note, chord or rest on a line.
</p>

<p>
The last three menu commands can copy, paste or apply a rhythm that is entered
in a dialog.
</p>

<p>
In the "Apply Rhythm" dialog you can enter a series of durations, e.g.:
</p>

<p>
<code>4. 8 4 16 16 8 2</code>
</p>

<p>
which will then, repetitively, be applied to a selection of notes.
</p>
""").format(menu=help.menu(
    _("menu title", "Tools"), _("submenu title", "Rhythm")))
예제 #4
0
 def body():
     return ''.join(map('<p>{0}</p>\n'.format, (
     _("Snippets can be imported from and exported to XML files."),
     _("To export snippets, either select them in the snippet manager, "
       "or filter the snippets using the search bar and select none, so "
       "that all the snippets visible in the snippet manager are exported. "
       "Export the snippets by selecting {menu}, and then choose a file "
       "name, preferably ending in <code>.xml</code>.").format(
         menu=help.menu(_("&Menu"), _("E&xport..."))),
     _("To import snippets, select {menu} and choose the file you want to "
       "import. You may also drop an XML file on the snippet manager. "
       "A dialog will be displayed where you can select which snippets you "
       "want to import.").format(
         menu=help.menu(_("&Menu"), _("&Import..."))),
     _("The XML format of the snippet library files is simple and "
       "documented inside the XML file."),
     )))
예제 #5
0
    def body():
        text = []
        text.append(_(
        "<p>Here you can edit the text of the snippet.</p>"
        "<p>If you start the first line(s) with '<code>-*- </code>' (note the space), "
        "the remainder of that line(s) defines variables like <code>name: value;</code> or "
        "simply <code>name;</code> which influence the behaviour of the snippet. "
        "The following variables can be used:</p>"))
        
        text.append("<dl>")
        text.extend(map("<dt><code>{0[0]}</code></dt><dd>{0[1]}</dd>".format, (
            ('menu',
                _("Place the snippet in the insert menu, grouped by the (optional) value.")),
            ('template',
                _("Place the snippet in the menu {file_new_from_template}, "
                  "grouped by the (optional) value. "
                  "When triggered via the menu, the snippet is inserted into a "
                  "new document.").format(file_new_from_template = help.menu(
                    _("menu title", "File"), 
                    _("menu subtitle", "New from Template")))),
            ('name',
                _("The mnemonic to type to select the snippet.")),
            ('indent: no;',
                _("Do not auto-indent the snippet after inserting.")),
            ('icon',
                _("The icon to show in menu and snippet list.")),
            ('symbol',
                _("The symbol to show in menu and snippet list. Symbols are "
                  "icons that use the default text color and can be found in "
                  "{directory}.").format(directory="'frescobaldi_app/symbols'")),
            ('python',
                _("Execute the snippet as a Python script. See {link}.").format(
                    link=python_snippets_help.link())),
            ('selection',
                _("One of more of the following words (separated with spaces or commas):") + " " +
                "\n".join(map("<code>{0[0]}</code>: {0[1]}".format, (
                ('yes',
                    _("Requires text to be selected.")),
                ('strip',
                    _("Adjusts the selection to not include starting and trialing whitespace.")),
                ('keep',
                    _("Selects all inserted text.")),
            )))),
        )))
        text.append("</dl>")

        text.append(_(
        "<p>The other lines of the snippet define the text to be inserted in the editor. "
        "Here, you can insert variables prefixed with a $. A double $ will be replaced with "
        "a single one. The following variables are recognized:</p>"))
        
        text.append("<dl>")
        text.extend(map("<dt><code>${0[0]}</code></dt><dd>{0[1]}</dd>".format,
            expand.documentation(expand.Expander)))
        text.append("</dl>")
        return ''.join(text)
예제 #6
0
    def body():
        import lyrics
        ac = lyrics.Lyrics.instances()[0].actionCollection
        d = {
            'hyphen': "<code>&nbsp;--&nbsp;</code>",
            'example': "<code>a&nbsp;--&nbsp;men</code>",
            'key_hyphen': help.shortcut(ac.lyrics_hyphenate),
            'menu_hyphen': help.menu(_("menu title", "Tools"), _("Lyrics")),
            'menu_settings': help.menu(_("menu title", "Edit"), _("Preferences")),
        }
        return _("""\
<p>
Frescobaldi can automatically place hyphens '{hyphen}' inside texts to make
those texts usable as lyrics.
It can use hyphenation dictionaries of OpenOffice.org, Scribus, etc.
</p>

<p>
To use this feature you must first select the text you want to hyphenate. Then
press {key_hyphen} or choose {menu_hyphen}.
In the dialog that appears, select the language.
Click OK or press Enter to have the hyphenation take place. 
</p>

<p>
A small limitation is that word processor hyphenation dictionaries often don't
want to break a word right after the first letter (e.g. '{example}'), because that
does not look nice in word processor texts. So it can happen that you
have to add some hyphens after the first letter of such lyrics. 
</p>

<p>
There is also a command to remove hyphenation. This can be useful if you have a
stanza of lyrics that you just want to display as a markup below the music.
Under {menu_settings} you can enter a list of directories to search for
hyphenation pattern files.
</p>
""").format(**d)
예제 #7
0
    def body():
        import panelmanager
        ac = panelmanager.PanelManager.instances()[0].snippettool.actionCollection
        key_snippets = help.shortcut(ac.snippettool_activate)
        return _("""\
<p>
With the snippets manager you can store often used pieces of text called
"snippets", and easily paste them into the text editor.
</p>

<p>
The snippets manager can be activated via the menu {menu_snippets} or
by pressing {key_snippets}.
</p>

<p>
Snippets can be searched by browsing the list or by typing some characters
in the search entry.
Snippets can also have keyboard shortcuts applied to them.
Some snippets have a special mnemonic (short name) which you can also type
in the search entry to select the snippet. Pressing the Return key will then
apply the snippet to the text editor and hide the snippets manager.
</p>

<p>
Add new snippets using {key_add}. Edit the selected snippet with {key_edit}.
Remove selected snippets using {key_delete}. Warning: this cannot be undone!
</p>

<p>
Snippets can also be put in the menu (see {link}).
And finally, there are snippets which can include or alter selected text.
Some snippets do this by using special variables, while others are small
scripts written in Python.
</p>
""").format(link = edit.snippet_edit_help.link(),
            menu_snippets = help.menu(_("menu title", "Insert"), _("Snippets...")),
            key_snippets = key_snippets,
            key_add = help.shortcut(QKeySequence(Qt.Key_Insert)),
            key_edit = help.shortcut(QKeySequence(Qt.Key_F2)),
            key_delete = help.shortcut(QKeySequence(Qt.CTRL + Qt.Key_Delete)))