Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create PDF using typst #10

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ node_modules/*
_book

# eBook build output
*.epub
*.mobi
*.pdf
# *.epub
# *.mobi
# *.pdf

# upload script
upload.sh
296 changes: 296 additions & 0 deletions Lilypond.sublime-syntax
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
# src https://github.com/spyder-ide/pysyntect/blob/master/syntect/grammars/Lilypond.sublime-syntax
name: LilyPond
comment: |
This bundle is, as can easily be seen, far from complete,
but it should still be as useful as the Lilypond.app pyobjc
application, which has no syntax coloring, no way to do
snippets, and pretty much no interesting functionality at
all, other than a "Run" menu option. :)
file_extensions:
- ly
- lily
- ily
scope: source.lilypond
contexts:
main:
- include: comments
- include: g_header
- include: groupings
- include: strings
- include: scheme
- include: functions
comments:
- match: "%{"
captures:
0: punctuation.definition.comment.lilypond
push:
- meta_scope: comment.block.lilypond
- match: "%}"
captures:
0: punctuation.definition.comment.lilypond
pop: true
- match: '(^[ \t]+)?(?=%)'
captures:
1: punctuation.whitespace.comment.leading.lilypond
push:
- match: (?!\G)
pop: true
- match: "%"
captures:
0: punctuation.definition.comment.lilypond
push:
- meta_scope: comment.line.percentage.lilypond
- match: \n
pop: true
f_clef:
- match: |-
(?x)
((\\) clef) \s+ # backslash + "clef" + spaces (groups 1-2)
(?:
("?) # beginning quotes (group 3)
(?:
( (?: # group 4
treble | violin | G | french | # G clefs
alto | C | tenor | (?:mezzo)?soprano | baritone | # C clefs
(?:sub)?bass | F | varbaritone | # F clefs
percussion | tab | # percussion / tablature clefs

(?:neo)?mensural-c[1-4] | mensural-[fg] | # Ancient clefs
petrucci-(?: [fg] | c[1-5] ) |
(?: vaticana | medicaea | hufnagel ) - (?: do[1-3] | fa[12] ) |
hufnagel-do-fa
)
([_^](?:8|15)?)? # optionally shift 1-2 octaves ↑/↓ (group 5)
) |
( (?:\w+) ([_^](?:8|15))? ) # unknown clef name (groups 6-7)
)
(\3) # closing quotes (group 8)
)?

comment: |
This looks something like: \clef mezzosoprano_8
Or maybe: \clef neomensural-c3^15
scope: meta.element.clef.lilypond
captures:
1: support.function.element.lilypond
2: punctuation.definition.function.lilypond
3: punctuation.definition.string.lilypond
4: constant.language.clef-name.lilypond
5: constant.other.modifier.clef.lilypond
6: meta.fixme.unknown-clef-name.lilypond
7: constant.other.modifier.clef.lilypond
8: punctuation.definition.string.lilypond
f_generic:
- match: '(\\)[a-zA-Z-]+\b'
scope: support.function.general.lilypond
captures:
1: punctuation.definition.function.lilypond
f_key-signature: []
f_keywords:
- match: |-
(?x)
(?: (\\)
(?: set | new | override | revert)\b
)
scope: keyword.control.lilypond
captures:
1: punctuation.definition.function.lilypond
f_time-signature:
- match: |-
(?x)
((\\) time) \s+ # backslash + "time" + spaces (groups 1-2)
([1-9][0-9]*/[1-9][0-9]*)?
scope: meta.element.time-signature.lilypond
captures:
1: support.function.element.lilypond
2: punctuation.definition.function.lilypond
3: constant.numeric.time-signature.lilypond
functions:
- include: f_clef
- include: f_time-signature
- include: f_key-signature
- include: f_keywords
- include: f_generic
g_header:
- match: '((\\)header)\s*({)'
captures:
1: support.function.section.header.lilypond
2: punctuation.definition.function.lilypond
3: punctuation.section.group.begin.lilypond
push:
- meta_scope: meta.header.lilypond
- match: "}"
captures:
0: punctuation.section.group.end.lilypond
pop: true
- include: comments
- include: strings
- include: scheme
- include: g_markup
- match: "="
scope: punctuation.separator.key-value.lilypond
- match: |-
(?x)
dedication | title | subtitle | subsubtitle | poet |
composer | meter | opus | arranger | instrument |
piece | breakbefore | copyright | tagline | enteredby
scope: support.constant.header.lilypond
- match: |-
(?x)
mutopiatitle | mutopiacomposer | mutopiapoet |
mutopiaopus | mutopiainstrument | date | source |
style | maintainer | maintainerEmail |
maintainerWeb | lastupdated
scope: support.constant.header.mutopia.lilypond
g_m_group:
- match: "{"
captures:
0: punctuation.section.group.begin.lilypond
push:
- meta_scope: meta.group.lilypond
- match: "}"
captures:
0: punctuation.section.group.end.lilypond
pop: true
- include: f_generic
- include: strings
- include: comments
- include: scheme
- include: g_m_group
g_markup:
- match: |-
(?x)
((\\) markup) \s+ # backslash + "markup" + spaces
(?={)
captures:
1: support.function.element.markup.lilypond
2: punctuation.definition.function.markup
push:
- meta_scope: meta.element.markup.lilypond
- match: "(?<=})"
pop: true
- include: g_m_group
g_relative:
- match: '((\\)relative)\s*(?:([a-h]['',]*)\s*)?(?={)'
captures:
1: support.function.section.lilypond
2: punctuation.definition.function.lilypond
3: storage.type.pitch.lilypond
push:
- match: "(?<=})"
pop: true
- include: group
g_system:
- match: "<<"
captures:
0: punctuation.section.system.begin.lilypond
push:
- meta_scope: meta.system.lilypond
- match: ">>"
captures:
0: punctuation.section.system.end.lilypond
pop: true
- include: main
g_times:
- match: '((\\)times)\s*(?:([1-9][0-9]*/[1-9][0-9])\s*)(?={)'
captures:
1: support.function.section.lilypond
2: punctuation.definition.function.lilypond
3: constant.numeric.fraction.lilypond
push:
- match: "(?<=})"
pop: true
- include: group
group:
- match: "{"
captures:
0: punctuation.section.group.begin.lilypond
push:
- meta_scope: meta.music-expression.lilypond
- match: "}"
captures:
0: punctuation.section.group.end.lilypond
pop: true
- include: music-expr
groupings:
- include: g_system
- include: g_relative
- include: g_times
- include: group
music-expr:
- include: comments
- include: groupings
- include: strings
- include: functions
- include: scheme
- include: notes
n_articulations:
- match: |-
(?x)
([_^-])
(?:[.>^+|_-])
scope: storage.modifier.articulation.accent.lilypond
- match: |-
(?x)
(\\)
(?: accent | markato | staccatissimo | # basic accents
espressivo | staccato | tenuto | portato |
(?:up|down)bow | flageolet | thumb |
[lr](?:heel|toe) | open | stopped |
(?:reverse)?turn | trill |
prall(?: prall | mordent | down | up)? | # pralls
(?: up | down | line ) prall | # and
(?: up | down )? mordent | # mordents
signumcongruentiae |
(?: (?:very)? long | short)?fermata(Markup)? | # fermatas
segno | (?:var)?coda
)
scope: storage.modifier.articulation.named.lilypond
captures:
1: punctuation.definition.function.lilypond
- match: |-
(?x)
(\\) # backslash
(?:
p{1,5} | m[pf] | f{1,4} | fp | # forte, piano, etc.
[sr]fz | sff? | spp? |
< | > | ! | espressivo # (de)crescendo
)

scope: storage.modifier.articulation.dynamics.lilypond
- match: '\[|\]'
scope: storage.modifier.beam.lilypond
- match: \(|\)
scope: storage.modifier.slur.lilypond
- match: \\\(|\\\)
scope: storage.modifier.slur.phrasing.lilypond
notes: []
scheme:
- match: '(^[ \t])?(?=#)'
captures:
0: punctuation.whitespace.embedded.leading.scheme
push:
- match: (?!\G)
pop: true
- match: "#"
push:
- meta_scope: meta.embedded.line.scheme
- meta_content_scope: source.scheme
- match: '(?=[\s%])|(?<=\n)'
pop: true
- include: scope:source.scheme
strings:
- match: '"'
captures:
0: punctuation.definition.string.lilypond
push:
- meta_scope: string.quoted.double.lilypond
- match: '"'
captures:
0: punctuation.definition.string.lilypond
pop: true
- match: \\.
scope: constant.character.escape.lilypond
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Understanding Scheme In LilyPond

### Urs Liska
## Urs Liska

[GNU LilyPond](http://lilypond.org) is an extremely powerful and versatile text
based music notation system with a strong focus on traditional craftsmanship and
Expand Down
Binary file added book.pdf
Binary file not shown.
Loading