Bỏ qua đến nội dung

LilyPond Integration (Sheet Music Typesetter) for Anki 2.1.x

Chờ xử lý #anki #addon #lilypond #integration #sheet #music #typesetter
https://github.com/girasole123/LilyPond-Integration-Sheet-Music-Typesetter-for-Anki-2.1.x
4/1/2023

Cách tải addon LilyPond Integration (Sheet Music Typesetter) for Anki 2.1.x

Bạn có thể tải addon bằng một trong hai cách sau:

Click nút Copy bên dưới để copy code vào clipboard

123418104

Sau đó mở Anki → Tools → Add-ons → Get Add-ons → Dán code → OK

Mở trang addon trên AnkiWeb và tìm mã code ở cuối trang

Mở trên AnkiWeb

Cuộn xuống cuối trang AnkiWeb, tìm dòng có mã code 123418104 và copy

1
2

Mô tả chi tiết

LilyPond - music notation for everyone - http://lilypond.org/ With this addon, you can add sheet music snippets to your deck, wrapped in [lilypond]c d e[/lilypond] tags. For this addon to work, you have to install LilyPond first. For Windows and Mac, please follow the installation instructions for running LilyPond on the command line. (lilypond executable needs to be in your PATH).

LilyPond homepage: http://lilypond.org LilyPond download: http://lilypond.org/download.html LilyPond tutorial: http://lilypond.org/doc/v2.16/Documentation/learning/index.html

This addon is hosted on GitHub: https://github.com/girasole123/LilyPond-Integration-Sheet-Music-Typesetter-for-Anki-2.1.x. Original addon for Anki 2.1.x on GitHub: https://github.com/GydeonMylls/Anki-LilyPond. Unlike the original module, this one has a menu to edit templates.

How to use This addon understands [lilypond] tags: [lilypond]c d e[/lilypond] Alternatively, you can create fields dedicated to LilyPond, e.g. front-lilypond or back-lilypond, and omit the [lilypond] tags for them: c d e With lilypond in the field name, it will act as if the entire field content was wrapped in [lilypond][/lilypond] tags. This addon allows the creation of custom templates (see below), and specifying which template to use:[lilypond=default]c d e[/lilypond] [lilypond=yourtemplate]c d e[/lilypond] The name of the default template is default, so [lilypond=default] is identical to [lilypond]. You can also use templates in lilypond fields by giving them names like front-lilypond-yourtemplate, back-lilypond-yourtemplate.

Mobile/Web support Anki addons are desktop only, so by default, LilyPond images won’t appear on other platforms since those platforms won’t know what to make of a [lilypond] tag or how to treat a lilypond field. However, if you are using lilypond fields, and for each field create another field called lilypondimg, the desktop plugin will autofill it with the [image] tag. For example, if your field is front-lilypond, with content c d e, and you have another field front-lilypondimg, and use only the front-lilypondimg field in your card template, the image will appear on all platforms (provided that the desktop plugin generated the image once and the images were synced to the other platforms as well). Note: Please do not add any other text to a lilypondimg field, as it will be overwritten and discarded by the addon.

LilyPond Templates The addons21/123418104/lilypond directory holds template files for LilyPond. Templates can be created and edited from Anki, using the Tools->lilypond menu. An external editor is used. The default editor is xed, but you surely must adapt it for your specific setup: menu Tools->Addons, select this addon in the list, then click on Config. Modify the JSON config with the editor command (it may be necessary to include the path). Please restart Anki when you change templates. The default template is default.ly and used by: [lilypond]code[/lilypond] [lilypond=default]code[/lilypond] somefield-lilypond All other templates have to be specified by name: [lilypond=templatename]code[/lilypond] somefield-lilypond-templatename In the template, %ANKI% will be replaced with code. Multiple codes can be specified, by separating them with %%%: [lilypond] code1 %%% code2 [/lilypond] In the template, the first occurence of %ANKI% will be replaced with code1, the second occurence of %ANKI% with code2. The number of %ANKI% in the template has to match the number of codes used for this template always, otherwise the remaining occurences of %ANKI% will not be replaced, or the surplus specified codes will not be inserted. The default template looks like this: \paper{ indent=0\mm line-width=120\mm oddFooterMarkup=##f oddHeaderMarkup=##f bookTitleMarkup = ##f scoreTitleMarkup = ##f } \relative c” { %ANKI% } Please refer to the LilyPond homepage and documentation for details on how to write LilyPond code.


Liên kết hỗ trợ


Reviews (3)

👍 2023-01-03

Perfect, thank you!

👍 2020-11-25

Doesn’t work. I downloaded the things, put them in my PATH variable, tried using the formatting ([lilypond] [/lilypond]) and it just spits it right back out at me. Comment from author I suppose you put the add-on in the add-on directory of anki (somewhere in you HOME directory) and Lilypond somewhere in your PATH. Could you please give me the error message or output?

Maybe the error is because the add-on could be no more compatible with the new version of anki. I didn’t update recently the add-

👍 2020-07-29

Doesn’t work when lyrics contain special characters (like ż or ä), so no use for learning songs in most languages.

With the latest Anki update (somewhere between 2.1.15 through 2.1.29) it does not work at all.

No way to contact the author. Comment from author Have you tried with HTML entities? Lookup online for HTML entities (for instance, ä is ä and ż is ż).

https://www.w3schools.com/charsets/ref_html_entities_4.asp

I didn’t update recently the add-on and with newer versions of an