engrave_file
Convert LilyPond .ly files into cropped music notation assets (PDF, SVG, EPS, PNG) for placement in page-layout software.
Instructions
Engrave a LilyPond (.ly) source file into publication-quality music notation assets. Cropped assets are sized to the music, ready to place in page-layout software. Use PDF for InDesign placement (fonts embedded the way Adobe accepts, crop/bleed/trim/art boxes all defined); SVG has glyphs as outlines for the web; EPS embeds fonts in a form Ghostscript accepts but InDesign ignores. On failure, errors carries the LilyPond diagnostics, including line numbers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crop | No | Crop assets to the music itself instead of a full page. Required for EPS; what you want for assets placed in a layout. | |
| name | No | Basename for the assets; defaults to the source filename without .ly | |
| source | Yes | Path to the .ly file, relative to the project root or absolute | |
| formats | No | Asset formats to generate. PDF is the format to place in InDesign (fonts embedded the way Adobe accepts, all PDF boxes defined); EPS embeds fonts in a form InDesign ignores. | |
| preview | No | Attach the preview PNG to the result as an image, so the engraving is visible inline without reading a file. Turn off for batch runs. | |
| output_dir | No | Directory the generated assets are written to (created if missing) | build |
| include_dirs | No | Directories searched by \include, e.g. a shared settings library |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| errors | No | LilyPond diagnostics when compilation fails | |
| outputs | Yes | Absolute path per generated format | |
| previewPng | No | Cropped PNG of the engraved music — read this file to inspect the result |