吉他和弦图

吉他和弦图

我想显示吉他的和弦图。我找到了该gchords软件包,但它显示了一些令人不悦的小故障:

在此处输入图片描述

\documentclass{article}
\usepackage{gchords}
\thispagestyle{empty}
\begin{document}
\def\numfrets{4}
\chords{ 
    \chord{t}{n,n,p2,p2,p1,n}{Am}
}
\end{document}

我可以使用什么替代方案或者如何摆脱这个问题?

答案1

我更改了一行,使顶栏向左移动 0.04 个单位,长度增加 0.08 个单位(值由眼睛选择)

在此处输入图片描述

\documentclass{article}
\usepackage{gchords}
\makeatletter
\renewcommand\chord[3]{\vbox{\hbox{\ascale=\chordsize
\truewidth=\strings\advance\truewidth by -1
\advance\truewidth by \xoff
\topline=\numfrets
\advance\topline by \yoff
\advance\topline by 2

%%% The Diagram itself %%%%%%%%%
\unitlength\ascale
\begin{picture}(\truewidth,\topline)
\advance\topline by -1
\advance\truewidth by -\xoff
\myvpos=\yoff\advance\myvpos by \numfrets
%%% Parse the modifier string %%
\newcommand\topbar{n}
\@tfor\modstr:=#1\do 
   { \def\ttest{t}%
     \ifx\modstr\ttest{\linethickness{\topfretsiz}\put(1.96,\myvpos){\chline{\the\truewidth .08}}\thinlines}%CHANGE HERE
     \else {\advance\topline by -1%
            \put(\xoff,\topline){\hbox to 0pt{\hss\fretposfont\modstr~}}%
           }%
     \fi%
   }
% \@tfor\modstr:=#1\do 
%    { \if\modstr t{\thicklines\put(\xoff,\myvpos){\chline{\truewidth}}\thinlines}%
%      \else {\advance\topline by -2%
%             \put(\xoff,\topline){\hbox to 0pt{\hss\fretposfont\modstr\ }}%
%            }%
%      \fi%
%    }

%%% Horizontal lines (frets)%%%%
\mylength=0
\myvpos=\yoff
\advance\myvpos by 1  % first fret starts a bit higher
\@whilenum \mylength<\numfrets \do {  
  \put(\xoff,\myvpos){\chline{\truewidth}}
  \advance\mylength by 1
  \advance\myvpos   by 1}

%%% The Dots %%%%%%%%%%%%%%%%%%%
\newcommand\fnow{n}
\newcommand\pnow{n}
\newcommand\snow{n}
\newcommand\Lnow{n}

\edef\notelabel{}

\putdots{#2}{\chordsize}
\put(\xoff,0){\hbox to \truewidth\ascale{\hss\namefont #3\hss}}
\end{picture}
}}}
\makeatother
\thispagestyle{empty}
\begin{document}
\def\numfrets{4}
\chords{ 
    \chord{t}{n,n,p2,p2,p1,n}{Am}
}
\end{document}

相关内容