Linux command
lilypond 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Compile a score
lilypond [score.ly]
Explicitly select PDF output
lilypond --pdf [score.ly]
Output PNG images
lilypond --png [score.ly]
Output PostScript
lilypond --ps [score.ly]
Output SVG
lilypond -dbackend=svg [score.ly]
Write output to a directory
lilypond -o [output/name] [score.ly]
Add an include path
lilypond -I [/path/to/includes] [score.ly]
Disable point-and-click
lilypond -dno-point-and-click [score.ly]
Typeset a score found inside LaTeX
lilypond-book [document.lytex]
说明
LilyPond compiles a plain-text description of music into engraved sheet music of publication quality. It was inspired by TeX's approach to typography: the user writes logical content (notes, rhythms, lyrics, dynamics) and LilyPond handles spacing, beaming, page breaks, and collision avoidance. The same source file can target PDF, PostScript, SVG, or PNG. Backends are chosen via `-dbackend=`. Related tools: - lilypond-book — embed `.ly` snippets inside LaTeX/HTML/DocBook and render them inline. - midi2ly / abc2ly / musicxml2ly — convert other formats into LilyPond source. - convert-ly — upgrade older `.ly` syntax to match the current compiler.
参数
- Generate PDF output (default when no backend is specified).
- --png
- Generate PNG images (one per page).
- --ps
- Generate PostScript. Implied by `--pdf`.
- -f, --format=_FORMAT_
- Alternative syntax for output format (`pdf`, `ps`, `png`, `svg`).
- -o, --output=_FILE_
- Output file prefix (or directory). `.pdf`/`.png`/`.ps` is appended.
- -I, --include=_DIR_
- Add _DIR_ to the include search path. Can be repeated.
- -d_SETTING_=_VALUE_
- Set a `ly:set-option` program option. Examples: `-dbackend=svg`, `-dno-point-and-click`, `-dpreview`, `-ddelete-intermediate-files`, `-dcrop`, `-dembed-source-code`.
- -e, --evaluate=_EXPR_
- Evaluate _EXPR_ as Scheme before reading the `.ly` file.
- -j, --jail=_USER,GROUP,JAIL,DIR_
- Run in a chroot jail (useful for server deployments).
- -s, --silent
- Suppress progress messages.
- -V, --verbose
- Verbose output (prints each file being read).
- -w, --warranty
- Show warranty / GPL info.
- -v, --version
- Show version.
- -h, --help
- Show help.
FAQ
What is the lilypond command used for?
LilyPond compiles a plain-text description of music into engraved sheet music of publication quality. It was inspired by TeX's approach to typography: the user writes logical content (notes, rhythms, lyrics, dynamics) and LilyPond handles spacing, beaming, page breaks, and collision avoidance. The same source file can target PDF, PostScript, SVG, or PNG. Backends are chosen via `-dbackend=`. Related tools: - lilypond-book — embed `.ly` snippets inside LaTeX/HTML/DocBook and render them inline. - midi2ly / abc2ly / musicxml2ly — convert other formats into LilyPond source. - convert-ly — upgrade older `.ly` syntax to match the current compiler.
How do I run a basic lilypond example?
Run `lilypond [score.ly]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --pdf do in lilypond?
Generate PDF output (default when no backend is specified).