Skip to content

bncummings/vs-lytex

Repository files navigation

LyTeX Language Support

Language support for LyTeX — LaTeX with embeded LilyPond — providing syntax highlighting for documents that combine musical notation and typeset text.

Features

  • Syntax Highlighting for LyTeX files (.lytex):

Planned Features:

  • Error highlighting for LaTeX and LilyPond code.
  • IntelliSense and autocompletion for commands and environments.

Example Lytex Snippet

\documentclass{article}
\usepackage{lilypond}

\begin{document}
    Here’s a simple melody:

    \begin{lilypond}
        \relative c' { c d e f g a b c }
    \end{lilypond}

\end{document}

Lytex Preview: LaTeX + LilyPond Rendering

Render LaTeX documents with embedded LilyPond snippets directly to PDF, all from within VS Code.

Prerequisites

NOTE: This extension is currently MacOS exclusive. LyTeX Compilation depends requires the following tools to be installed:

  • lilypond - includes lilypond-book which can embed lilypond in LaTeX.
  • latexit - For rendering latex.
  brew install lilypond
  brew install --cask latexit

How to use

  • Render LaTeX with LilyPond - Embed LilyPond in a LaTeX and save the file with a .lytex extension.

    \documentclass{article}
    \usepackage{lilypond}
    
    \begin{document}
      Here’s a simple melody:
      
      \begin{lilypond}
        \relative c' { c d e f g a b c }
      \end{lilypond}
      
    \end{document}

    See lilypond-book documentation for more information.

  • Compile Straight To PDF — Compile .lytex files containing lilypond environments directly to PDF.

    LyTeX compile demo
  • Lytex Preview Session — Recompile automatically on save.

LyTeX preview demo

About

VS code extension for lytex (lilypond-book) syntax highlighting and pdf preview.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published