From 26b67dcb49a98fa770e9b4ed29398b24975061b5 Mon Sep 17 00:00:00 2001 From: Julien Rioux Date: Thu, 3 Jan 2013 02:32:48 +0100 Subject: [PATCH] Update the lilypond module to use the Argument machinery. --- lib/examples/lilypond.lyx | 56 +++++++++++++++++++++++++++++-------- lib/layouts/lilypond.module | 13 +++++++++ 2 files changed, 57 insertions(+), 12 deletions(-) diff --git a/lib/examples/lilypond.lyx b/lib/examples/lilypond.lyx index 89da3bfdd6..09df0a3fc5 100644 --- a/lib/examples/lilypond.lyx +++ b/lib/examples/lilypond.lyx @@ -1,5 +1,5 @@ -#LyX 2.0 created this file. For more info see http://www.lyx.org/ -\lyxformat 413 +#LyX 2.1 created this file. For more info see http://www.lyx.org/ +\lyxformat 459 \begin_document \begin_header \textclass article @@ -15,13 +15,13 @@ lilypond \font_roman lmodern \font_sans lmss \font_typewriter lmtt +\font_math auto \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 - \graphics default \default_output_format default \output_sync 0 @@ -44,15 +44,23 @@ lilypond \pdf_quoted_options "linkcolor=blue,urlcolor=blue,pdfstartview=XYZ" \papersize default \use_geometry true -\use_amsmath 1 -\use_esint 1 -\use_mhchem 1 -\use_mathdots 1 +\use_package amsmath 1 +\use_package amssymb 1 +\use_package esint 1 +\use_package mathdots 1 +\use_package mathtools 0 +\use_package mhchem 1 +\use_package stackrel 0 +\use_package stmaryrd 0 +\use_package undertilde 0 \cite_engine basic +\cite_engine_type numerical +\biblio_style plain \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date true +\justification true \use_refstyle 0 \index Index \shortcut idx @@ -88,7 +96,7 @@ The LyX Team \end_layout \begin_layout Date -Version 2.0.x +Version 2.1.x \end_layout \begin_layout Abstract @@ -226,7 +234,16 @@ status open \begin_layout Plain Layout -[staffsize=28] +\begin_inset Argument 1 +status open + +\begin_layout Plain Layout +staffsize=28 +\end_layout + +\end_inset + + \end_layout \begin_layout Plain Layout @@ -259,11 +276,11 @@ The previous LyX inset produces the following LaTeX-lookalike code: \begin_layout LyX-Code \backslash -begin{lilypond} +begin{lilypond}[staffsize=28] \end_layout \begin_layout LyX-Code -[staffsize=28] + \end_layout \begin_layout LyX-Code @@ -288,6 +305,11 @@ end{lilypond} \begin_layout Standard What appear first inside square brackets are options to pass to LilyPond-book. + This is inserted in LyX from the +\family sans +Insert +\family default + menu, in the same way that the LilyPond inset itself is inserted. Here, we set the dimension of the staff to 28 \begin_inset space \thinspace{} \end_inset @@ -337,7 +359,17 @@ status open \begin_layout Plain Layout -[staffsize=12] +\begin_inset Argument 1 +status open + +\begin_layout Plain Layout + +staffsize=12 +\end_layout + +\end_inset + + \backslash markup { \backslash diff --git a/lib/layouts/lilypond.module b/lib/layouts/lilypond.module index d3f22606ba..adc5becdc2 100644 --- a/lib/layouts/lilypond.module +++ b/lib/layouts/lilypond.module @@ -32,4 +32,17 @@ InsetLayout "Flex:LilyPond" ParbreakIsNewline true ForceLTR true Spellcheck false + Argument 1 + LabelString "Options" + MenuString "LilyPond Options" + Tooltip "A comma-separated option list (see the LilyPond documentation for available options)." + Decoration Conglomerate + Font + Color black + Family typewriter + EndFont + LabelFont + Color black + EndFont + EndArgument End -- 2.39.2