![记忆和弦在 leadsheets 包中不起作用](https://linux22.com/image/361353/%E8%AE%B0%E5%BF%86%E5%92%8C%E5%BC%A6%E5%9C%A8%20leadsheets%20%E5%8C%85%E4%B8%AD%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
所以我尝试使用该leadsheets
软件包,但无法使其正常remember-chords
工作。我查看了文档(http://ctan.sharelatex.com/tex-archive/macros/latex/contrib/leadsheets/leadsheets_en.pdfp.24),却找不到我的错误。
我尝试手动插入和弦(不使用快捷方式^
)并且它可以起作用,但是会将和弦插入到文本上方和文本中。
运行此代码时出现的错误是,Extra }, or forgotten \endgroup. \end{song}
它尝试通过在第 19 行插入各种字符来解决问题,但失败了。
下面是我的例子。
\documentclass{article}
\usepackage{leadsheets}
\setleadsheets{align-chords={l}}
\begin{document}
\begin{song}[remember-chords]{title={Piano Man}, music={Billy Joel}}
\begin{verse}
It's ^{C}nine O' ^{G}clock on a ^*{F}Satur ^{C}day \\
The ^{F}regular ^{C}crowd shuffles ^{D7}in ^{G} \\
There's and ^{C}old man ^{G}sitting ^{F}next to ^{C}me \\
Making ^{F}love to his ^{G}tonic and ^{C}gin ^{G}
\end{verse}
\begin{verse}
He says, ^"Son, can you ^play me a ^*memo ^ry \\
I'm ^not really ^sure how it ^goes ^ \\
But it's ^sad and it's ^sweet and I ^knew it com ^plete \\
When I ^wore a ^younger man's ^clothes." ^
\end{verse}
\end{song}
\end{document}
答案1
remember-chords
如果替换标记是一行中的最后一个标记,则会出现问题^
。这是一个已知的限制(至少目前如此)。只需在它后面添加一个空组即可:
\documentclass{article}
\usepackage{leadsheets}
\setleadsheets{align-chords={l}}
\begin{document}
\begin{song}[remember-chords]{title={Piano Man}, music={Billy Joel}}
\begin{verse}
It's ^{C}nine o'^{G}clock on a ^*{F}Satur ^{C}day \\
The ^{F}regular ^{C}crowd shuffles ^{D7}in ^{G} \\
There's and ^{C}old man ^{G}sitting ^{F}next to ^{C}me \\
Making ^{F}love to his ^{G}tonic and ^{C}gin ^{G}
\end{verse}
\begin{verse}
He says, ^``Son, can you ^play me a ^*memo ^ry \\
I'm ^not really ^sure how it ^goes ^ {} \\ % <<<
But it's ^sad and it's ^sweet and I ^knew it com^plete \\
When I ^wore a ^younger man's ^clothes.'' ^ {} % <<<
\end{verse}
\end{song}
\end{document}