代码:
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\begin{document}
First variant
\begin{lilypond}
\version "2.17.27"
\language "english"
D = \relative d {d4 <f a d>}
A = \relative a, {a4 <a' c e>}
BassOne = {\D \A | \D \D |}
\new PianoStaff <<
\new Staff \relative f''{
\time 2/2
<f a>4 <f a> <e g> <e g> | <d f>4 <d f> <d f> <e g> |
}
\new Staff \relative{
\time 2/2
\clef bass
\BassOne
}
>>
\end{lilypond}
Second variant
\begin{lilypond}
\version "2.17.27"
\language "english"
D = \relative d {d4 <f a d>}
A = \relative a, {a4 <a' c e>}
BassOne = {\D \A | \D \D |}
\new PianoStaff <<
\new Staff \relative f''{
\time 2/2
f4 f e e | d d d e |
}
\new Staff \relative{
\time 2/2
\clef bass
\BassOne
}
>>
\end{lilypond}
\end{document}
输出:
由于有 2 个 lilypond 块,我必须复制此代码:
D = \relative d {d4 <f a d>}
A = \relative a, {a4 <a' c e>}
BassOne = {\D \A | \D \D |}
可以重复使用吗?