Is there a way, within a .ly file to conditionally include sections
based on command line options?
Specifically, I would like to have \paper settings go one way for
"lilypond --pdf" and another way for "lilypond --svg".
Kevin,
don't know of a way with inspecting commandline options, but if environment variables will do for your case: I have the following pattern in use to switch between two page layouts that mainly differ in the \paper block
myLayout = #(string-append "layout/" (getenv "MY_BASE") "PageSetup.ily")
\include \myLayout