![歌词中的吉他和弦](https://linux22.com/image/369907/%E6%AD%8C%E8%AF%8D%E4%B8%AD%E7%9A%84%E5%90%89%E4%BB%96%E5%92%8C%E5%BC%A6.png)
我正在写歌本,想添加吉他和弦。我认为它们比实际歌词更重要,并且不希望它们干扰正常阅读或占用太多垂直空间。
我用歌曲包并且知道它可以在单词上方显示和弦。我想要和弦后每行,向左调整。
本网站可以显示两个版本。默认情况下,它会像歌曲包一样显示和弦,但如果您单击顶部的“Zmień styl”,它会显示我想要的样子。
在乳胶中怎样实现这种效果?
使用歌曲包的示例文件
\documentclass[a5paper, portrait, 10pt]{article}
\usepackage[chorded, onesongcolumn]{songs}
\noversenumbers
\begin{document}
\songsection{Worship Songs}
\begin{songs}{}
\beginsong{Doxology}[by={Louis Bourgeois and Thomas Ken}]
\beginverse
\[G]Praise God, \[D]from \[Em]Whom \[Bm]all \[Em]bless\[D]ings \[G]flow;
\[G]Praise Him, all \[D]crea\[Em]tures \[C]here \[G]be\[D]low;
\[Em]Praise \[D]Him \[G]a\[D]bove, \[G]ye \[C]heav'n\[D]ly \[Em]host;
\[G]Praise Fa\[Em]ther, \[D]Son, \[Am]and \[G/B G/C]Ho\[D]ly \[G]Ghost.
\[C]A\[G]men.
\endverse
\beginverse
% pretend there is second verse; chords are the same, so don't repeat them
Praise God, from Whom all blessings flow;
Praise Him, all creatures here below;
Praise Him above, ye heav'nly host;
Praise Father, Son, and Holy Ghost.
Amen.
\endverse
\endsong
% second song
\beginsong{Second song}[]
\beginverse
\[G]Praise God, \[D]from \[Em]Whom \[Bm]all \[Em]bless\[D]ings \[G]flow;
\[G]Praise Him, all \[D]crea\[Em]tures \[C]here \[G]be\[D]low;
\[Em]Praise \[D]Him \[G]a\[D]bove, \[G]ye \[C]heav'n\[D]ly \[Em]host;
\[G]Praise Fa\[Em]ther, \[D]Son, \[Am]and \[G/B G/C]Ho\[D]ly \[G]Ghost.
\[C]A\[G]men.
\endverse
\endsong
\end{songs}
\end{document}
答案1
请参见我对类似问题的回答。我认为这个解决方案也适合您,但是如果您在那里放置全尺寸的制表符,则必须仔细配置行距以避免边注重叠。
\usepackage[chorded]{songs}
% Create lengths for the width of the chord area and its left margin
\newlength\chordswidth\setlength\chordswidth{1in}
\newlength\chordsmargin\setlength\chordsmargin{3pt}
\newbox\chbox
\newcommand\clist[1]{\ifchorded
\ifvmode\leavevmode\fi
\setbox\chbox\vtop{\raggedright
\leftskip=\hsize\advance\leftskip-\chordswidth\advance\leftskip\chordsmargin
\printchord{\transposehere{#1}}\par
}\vadjust{\vbox{\kern-2pt\kern-\ht\chbox\box\chbox}}\fi\ignorespaces}
\let\oldjustifyleft=\justifyleft
\renewcommand\justifyleft{\oldjustifyleft
\ifchorded\advance\rightskip\chordswidth\fi}
%no need to have wide spacing between lines if chords above never used:
\newcommand\pausechords{}
\newcommand\resumechords{}
\ifchorded
\renewcommand\pausechords{\setlength\baselineadj{0pt}\chordsoff}
\renewcommand\resumechords{\setlength\baselineadj{-10pt}\chordson}
\fi
\begin{document}
\songsection{Worship Songs}
\begin{songs}{}
\beginsong{Doxology}
\beginverse
\clist{G Em G} Praise God, from Whom all blessings flow;
\clist{G Em D} Praise Him, all creatures here below;
\clist{Em D C Em} Praise Him above, ye heav'nly host;
\clist{G D G} Praise Father, Son, and Holy Ghost.
\clist{C G} Amen.
\endverse
\pausechords % second verse without chords
\beginverse
Praise God, from Whom all blessings flow;
Praise Him, all creatures here below;
Praise Him above, ye heav'nly host;
Praise Father, Son, and Holy Ghost.
Amen.
\endverse
\resumechords
\endsong
\end{songs}
\end{document}