summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-09-15 22:57:22 +0000
committerKarl Berry <karl@freefriends.org>2014-09-15 22:57:22 +0000
commit720ab6d5bd9c366793fd8f03c58aec9b4348bf4d (patch)
tree82056343b04f7f5ec1101a536dccfb5ab316c783
parentd2fd2a3b5c16b8291823a204b10077dc0bfa0ce2 (diff)
guitarchordschemes (15sep14)
git-svn-id: svn://tug.org/texlive/trunk@35179 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/guitarchordschemes/README6
-rw-r--r--Master/texmf-dist/doc/latex/guitarchordschemes/guitarchordschemes_en.pdfbin116509 -> 415450 bytes
-rw-r--r--Master/texmf-dist/doc/latex/guitarchordschemes/guitarchordschemes_en.tex633
-rw-r--r--Master/texmf-dist/tex/latex/guitarchordschemes/guitarchordschemes.sty325
4 files changed, 471 insertions, 493 deletions
diff --git a/Master/texmf-dist/doc/latex/guitarchordschemes/README b/Master/texmf-dist/doc/latex/guitarchordschemes/README
index 0397df22b11..16e8d67dcf3 100644
--- a/Master/texmf-dist/doc/latex/guitarchordschemes/README
+++ b/Master/texmf-dist/doc/latex/guitarchordschemes/README
@@ -1,15 +1,15 @@
--------------------------------------------------------------------------
-the GUITARCHORDSCHEMES package v 0.4
+the GUITARCHORDSCHEMES package v 0.6
Guitar Chord and Scale Tablatures with TikZ
-2013/08/25
+2014/09/15
--------------------------------------------------------------------------
Clemens Niederberger
Web: https://bitbucket.org/cgnieder/guitarchordschemes/
E-Mail: contact@mychemistry.eu
--------------------------------------------------------------------------
-Copyright 2013 Clemens Niederberger
+Copyright 2013-2014 Clemens Niederberger
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/Master/texmf-dist/doc/latex/guitarchordschemes/guitarchordschemes_en.pdf b/Master/texmf-dist/doc/latex/guitarchordschemes/guitarchordschemes_en.pdf
index 87c0de8bbaf..2f94bd693a2 100644
--- a/Master/texmf-dist/doc/latex/guitarchordschemes/guitarchordschemes_en.pdf
+++ b/Master/texmf-dist/doc/latex/guitarchordschemes/guitarchordschemes_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/guitarchordschemes/guitarchordschemes_en.tex b/Master/texmf-dist/doc/latex/guitarchordschemes/guitarchordschemes_en.tex
index 18891ca9c46..4ad227ba4bf 100644
--- a/Master/texmf-dist/doc/latex/guitarchordschemes/guitarchordschemes_en.tex
+++ b/Master/texmf-dist/doc/latex/guitarchordschemes/guitarchordschemes_en.tex
@@ -1,7 +1,7 @@
-% arara: xelatex
-% !arara: biber
-% !arara: xelatex
-% !arara: xelatex
+% arara: pdflatex
+% arara: biber
+% arara: pdflatex
+% arara: pdflatex
% --------------------------------------------------------------------------
% the GUITARCHORDSCHEMES package
%
@@ -35,63 +35,44 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-\documentclass[toc=index,toc=bib]{cnpkgdoc}
-\docsetup{
- pkg = [use-rbc]guitarchordschemes ,
- subtitle = Guitar Chord and Scale Tablatures with \TikZ ,
- code-box = {
- backgroundcolor = gray!7!white ,
- skipbelow = .6\baselineskip plus .5ex minus .5ex ,
- skipabove = .6\baselineskip plus .5ex minus .5ex ,
- roundcorner = 3pt ,
+\documentclass[load-preamble+]{cnltx-doc}
+\usepackage{guitarchordschemes}
+\usepackage[chordnames]{leadsheets}
+
+\setcnltx{
+ package = guitarchordschemes ,
+ authors = Clemens Niederberger ,
+ email = contact@mychemistry.eu ,
+ url = https://bitbucket.org/cgnieder/guitarchordschemes/ ,
+ info = guitar chord schemes and fingering scales with \TikZ ,
+ add-cmds = {
+ chordscheme,
+ setchordscheme,
+ scales
} ,
- gobble = 1
-}
-\usepackage{polyglossia}
-\setmainlanguage{english}
-\usepackage[oldstyle,proportional]{libertine}
-\usepackage{libertinehologopatch}
-\cnpkgusecolorscheme{friendly}
-
-\setmonofont[Ligatures=TeX,Scale=MatchLowercase]{Bitstream Vera Sans Mono}
-
-\usepackage{fnpct}
-\pagestyle{headings}
-
-\usepackage[biblatex]{embrac}[2013/03/22]
-\ChangeEmph{[}[,.02em]{]}[.055em,-.08em]
-\ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em]
-
-\renewcommand*\othersectionlevelsformat[3]{%
- \textcolor{main}{#3\autodot}\enskip}
-\renewcommand*\partformat{%
- \textcolor{main}{\partname~\thepart\autodot}}
-
-\addcmds{
- chordscheme,
- setchordscheme,
- scales,
- textsuperscript
+ add-silent-cmds = textsuperscript ,
+ abstract = {%
+ \centering
+ \chordscheme[
+ name = Gmi7 ,
+ position = II ,
+ barre = {2/2-4:3} ,
+ show-root = {4/4} ,
+ root = {2/6:2} ,
+ mute = {1,5}
+ ]%
+ } ,
+ index-setup = {
+ othercode = \footnotesize ,
+ level = \addsec ,
+ noclearpage
+ } ,
+ makeindex-setup = {
+ columns = 3 ,
+ columnsep = 1em
+ }
}
-\usepackage{filecontents}
-\usepackage{imakeidx}
-\begin{filecontents*}{\jobname.ist}
- heading_prefix "{\\bfseries "
- heading_suffix "\\hfil}\\nopagebreak\n"
- headings_flag 1
- delim_0 "\\dotfill\\hyperpage{"
- delim_1 "\\dotfill\\hyperpage{"
- delim_2 "\\dotfill\\hyperpage{"
- delim_r "}\\textendash\\hyperpage{"
- delim_t "}"
- suffix_2p "\\nohyperpage{\\,f.}"
- suffix_3p "\\nohyperpage{\\,ff.}"
-\end{filecontents*}
-\indexsetup{othercode=\footnotesize}
-\makeindex[options={-s \jobname.ist},intoc,columns=3,columnsep=1em]
-
-\usepackage[backend=biber,style=alphabetic]{biblatex}
\addbibresource{\jobname.bib}
\begin{filecontents}{\jobname.bib}
@online{web:pietsch:fonts,
@@ -100,36 +81,6 @@
url = {http://notation.jochenpietsch.de/index_e.html} ,
urldate = {2012-05-10}
}
-@package{pkg:etoolbox,
- title = {\paket*{etoolbox}},
- author = {Philipp Lehman},
- date = {2011-01-21},
- version = {2.1},
- url = {http://mirror.ctan.org/macros/latex/contrib/etoolbox}
-}
-@package{pkg:pgfopts,
- title = {\paket*{pgfopts}},
- author = {Joseph Wright},
- date = {2011-06-02},
- version = {2.1},
- url = {http://mirror.ctan.org/macros/latex/contrib/pgfopts}
-}
-@package{pkg:realbookchords,
- title = {\paket*{realbookchords}},
- author = {Clemens Niederberger},
- date = {2013-04-29},
- version = {0.1},
- url = {https://bitbucket.org/cgnieder/guitarchordschemes/}
-}
-@package{pkg:tikz,
- author = {Till Tantau and Mark Wibrow and Christian Feuersänger},
- title = {Ti\textit{k}Z/pgf},
- sorttitle = {TikZ},
- version = {2.10},
- date = {2010-02-25},
- url = {http://sourceforge.net/projects/pgf/},
- urldate = {2013-04-18}
-}
@book{leavitt:mmfg:1,
author = {William G. Leavitt},
title = {A Modern Method for Guitar},
@@ -139,304 +90,276 @@
}
\end{filecontents}
-
-\let\verb\lstinline
-\makeatletter
-\def\TikZ@logo{Ti\textit{k}Z}
-\renewrobustcmd\TikZ{\TikZ@logo\index{TikZ@\TikZ@logo}}
-\makeatother
-
\usepackage{ccicons}
-\usepackage{acro,accsupp}
-\DeclareAcronym{ctan}{
- short = ctan ,
- long = the \textsc{Comprehensive \TeX{} Archive Network} ,
- short-format = \scshape ,
- pdfstring = CTAN ,
- accsupp = CTAN
-}
-\acsetup{first-style=footnote}
-
\setchordscheme{
- finger-format+=\biolinumLF ,
- name-format+=\libertineLF
+ finger-format+ = \biolinumLF ,
+ name-format+ = \libertineLF ,
+ chord-name-cs = \chordname
}
-\TitlePicture{%
-\chordscheme[
- name = Gmi7 ,
- position = II ,
- barre = {2/2-4:3} ,
- show-root = {4/4} ,
- root = {2/6:2} ,
- mute = {1,5}
-]}
+\newcommand*\TikZ{Ti\textit{k}Z}
+
\begin{document}
\section{License and Requirements}
-\guitarchordschemes is placed under the terms of the \LaTeX{} Project Public License,
-version 1.3 or later (\url{http://www.latex-project.org/lppl.txt}).
-It has the status “maintained”.
+\license
+
+\guitarchordschemes{} loads the packages \TikZ~\cite{pkg:pgf},
+\pkg{etoolbox}~\cite{pkg:etoolbox} and \pkg{pgfopts}~\cite{pkg:pgfopts}. It
+also loads the \TikZ{} libraries \code{shapes.misc}, \code{arrows} and
+\code{calc}.
-\guitarchordschemes loads the packages \TikZ~\cite{pkg:tikz},
-\paket*{etoolbox}~\cite{pkg:etoolbox} and \paket*{pgfopts}~\cite{pkg:pgfopts}.
-It also loads the \TikZ{} libraries \code{shapes.misc}, \code{arrows} and \code{calc}.
-Depending on an option it also loads \paket*{realbookchords}~\cite{pkg:realbookchords}.
-This package is not yet published on \ac{ctan} and thus not part of any \TeX{}
-distribution. Until it is you can find it at
-\url{https://bitbucket.org/cgnieder/realbookchords/}.
-See section~\ref{sec:realbookchords} for details on this option.
+% Depending on an option it also loads
+% \pkg{realbookchords}~\cite{pkg:realbookchords}. This package is not yet
+% published on \CTAN{} and thus not part of any \TeX{} distribution. Until it is
+% you can find it at \url{https://bitbucket.org/cgnieder/realbookchords/}. See
+% section~\ref{sec:realbookchords} for details on this option.
\section{The Commands}
This package more or less provides a single command:
-\begin{beschreibung}
- \Befehl{chordscheme}[<options>]
- \Befehl{scales}[<option>]
-\end{beschreibung}
+\begin{commands}
+ \command{chordscheme}[\oarg{options}]
+ Typeset a guitar chord scheme.
+ \command{scales}[\oarg{option}]
+ Typeset a fingering scale.
+\end{commands}
These commands set the frame for the chord and scale tablatures and can be used
to create sheets for manually writing down tablatures:
-\begin{beispiel}
- \chordscheme
-\end{beispiel}
-
-Similarly \cmd{scales} creates a frame with two more frets:
-\begin{beispiel}[below]
- \scales
-\end{beispiel}
-
-\subsection{Options for \cmd*{chordscheme}}
-The \oa{options} argument is where the actual details for a chord happen. These
-are the available ones for \cmd{chordscheme}:
-\begin{beschreibung}
- \Option{name}{<chordsymbol>}\newline
- Set the chord symbol. This option accepts a list of entries.
- \Option{position}{<position>}\newline
- Set the position for the first of the four frets.
- \Option{finger}{<fret>/<string>:<label>}\newline
- Specify the finger positions for a chord. This option accepts a list of entries.
- The \code{:<label>} is optional.
- \Option{root}{<fret>/<string>:<label>}\newline
- The same as finger but uses a square instead of a circle to indicate that
- this finger is playing the root of the chord. This option accepts a list of
- entries. The \code{:<label>} is optional.
- \Option{show-root}{<fret>/<string>}\newline
- Specify positions of the root that are \emph{not} part of the actual chord
- but are somewhere in the vicinity of it on the guitar neck. This option
- accepts a list of entries.
- \Option{barre}{<fret>/<string range>:<label>}\newline
- Specify a barr\'e position for a chord. The \code{<string range>} part must
- contain a two string numbers separated with a dash. This option accepts a list
- of entries. The \code{:<label>} is optional.
- \Option{ring}{<string>}\newline
- Specify open strings. This option accepts a list of entries.
- \Option{mute}{<string>}\newline
- Specify muted/un-played strings This option accepts a list of entries.
-\end{beschreibung}
+\begin{example}[side-by-side]
+ \chordscheme
+\end{example}
+
+Similarly \cs{scales} creates a frame with two more frets:
+\begin{example}
+ \scales
+\end{example}
+
+\subsection{Options for \cs*{chordscheme}}
+The \meta{options} argument is where the actual details for a chord
+happen. These are the available ones for \cs{chordscheme}:
+\begin{options}
+ \keyval{fret-number}{number}\Default{4}
+ \sinceversion{0.6}The number of frets that are drawn. This number must be
+ at least 4. The option should be set as first option since it influences
+ other options.
+ \keyval{name}{chordsymbol}
+ Set the chord symbol. This option accepts a comma separated list of
+ entries.
+ \keyval{position}{position}
+ Set the position for the first of the four frets.
+ \keychoice{finger}{\meta{fret}/\meta{string}:\meta{label}}
+ Specify the finger positions for a chord. This option accepts a comma
+ separated list of entries. The \code{:\meta{label}} is optional.
+ \keychoice{root}{\meta{fret}/\meta{string}:\meta{label}}
+ The same as finger but uses a square instead of a circle to indicate that
+ this finger is playing the root of the chord. This option accepts a comma
+ separated list of entries. The \code{:\meta{label}} is optional.
+ \keychoice{show-root}{\meta{fret}/\meta{string}}
+ Specify positions of the root that are \emph{not} part of the actual chord
+ but are somewhere in the vicinity of it on the guitar neck. This option
+ accepts a comma separated list of entries.
+ \keychoice{barre}{\meta{fret}/\meta{string range}:\meta{label}}
+ Specify a barr\'e position for a chord. The \meta{string range} part must
+ contain a two string numbers separated with a dash. This option accepts a
+ list of entries. The \code{:\meta{label}} is optional.
+ \keyval{ring}{string}
+ Specify open strings. This option accepts a comma separatedlist of
+ entries.
+ \keyval{mute}{string}
+ Specify muted/un-played strings. This option accepts a comma separated
+ list of entries.
+\end{options}
Let's take a look at a few examples:
-\setchordscheme{use-rbc=false}
-\begin{beispiel}
- \chordscheme[
- name = G ,
- position = I ,
- finger = {2/5:1} ,
- root = {3/6:2, 3/1:4} ,
- ring = {2,3,4}
- ]
-\end{beispiel}
+\begin{example}[side-by-side]
+ \chordscheme[
+ name = G ,
+ position = I ,
+ finger = {2/5:1} ,
+ root = {3/6:2, 3/1:4} ,
+ ring = {2,3,4}
+ ]
+\end{example}
+\makeatletter
+\setchordscheme{chord-name-cs=\@firstofone}
+\makeatother
-Or a more “jazzy” chord:
-\begin{beispiel}
- \chordscheme[
- name = G\textsuperscript{6} ,
- position = II ,
- finger = {1/4:1, 3/3:4, 2/2:3} ,
- root = 2/6:2 ,
- show-root = 4/4 ,
- mute = {1,5}
- ]
-\end{beispiel}
+Or a more "`jazzy"' chord:
+\begin{example}[side-by-side]
+ \chordscheme[
+ name = G\textsuperscript{6} ,
+ position = II ,
+ finger = {1/4:1, 3/3:4, 2/2:3} ,
+ root = 2/6:2 ,
+ show-root = 4/4 ,
+ mute = {1,5}
+ ]
+\end{example}
One with a barr\'e:
-\begin{beispiel}
- \chordscheme[
- name = Gmi\textsuperscript{7} ,
- position = II ,
- barre = 2/2-4:3 ,
- show-root = 4/4 ,
- root = 2/6:2 ,
- mute = {1,5}
- ]
-\end{beispiel}
-
-\subsection{Options for \cmd*{scales}}
-The \oa{options} argument for \cmd{scales} are similar to the ones for
-\cmd{chordscheme}:
-\begin{beschreibung}
- \Option{name}{<title>}\newline
- Set a title for the scale.
- \Option{position}{<position>}\newline
- Set the position for the first of the six frets.
- \Option{finger}{<fret>/<string>:<label>}\newline
- Specify the finger positions for the scale. This option accepts a list of entries.
- The \code{:<label>} is optional.
- \Option{root}{<fret>/<string>:<label>}\newline
- The same as finger but uses a square instead of a circle to indicate that
- this finger is playing the root of the scale. This option accepts a list of
- entries. The \code{:<label>} is optional.
- \Option{fret number}{<integer>}\Default{6}
- The number of frets displayed for a scale. The minimum number is 6.
- \Option{fingering}{type 1|type 1A|type 2|type 3|type 4}\newline
- Set a whole predefined fingering. The types correspond to ones taught
- in \citeauthor{leavitt:mmfg:1}'s \citetitle{leavitt:mmfg:1}~\cite{leavitt:mmfg:1}.
- This option assumes an ionic scale a places the roots correspondingly.
- \Option{fingering*}{type 1|type 1A|type 2|type 3|type 4}\newline
- The same as \key{fingering} but not scale is assumed and no roots are
- indicated.
- \Option{fingering?}{type 1|type 1A|type 2|type 3|type 4}\newline
- The same as \key{fingering*} but also no labels for the fingers are given.
-\end{beschreibung}
+\begin{example}[side-by-side]
+ \chordscheme[
+ name = Gmi\textsuperscript{7} ,
+ position = II ,
+ barre = 2/2-4:3 ,
+ show-root = 4/4 ,
+ root = 2/6:2 ,
+ mute = {1,5}
+ ]
+\end{example}
+
+\subsection{Options for \cs*{scales}}
+The \meta{options} argument for \cs{scales} are similar to the ones for
+\cs{chordscheme}:
+\begin{options}
+ \keyval{fret-number}{number}\Default{6}
+ \sinceversion{0.6}The number of frets that are drawn. This number must be
+ at least 6. The option should be set as first option since it influences
+ other options.
+ \keyval{name}{title}
+ Set a title for the scale.
+ \keyval{position}{position}
+ Set the position for the first of the six frets.
+ \keychoice{finger}{\meta{fret}/\meta{string}:\meta{label}}
+ Specify the finger positions for the scale. This option accepts a comma
+ separated list of entries. The \code{:\meta{label}} is optional.
+ \keychoice{root}{\meta{fret}/\meta{string}:\meta{label}}
+ The same as finger but uses a square instead of a circle to indicate that
+ this finger is playing the root of the scale. This option accepts a comma
+ separated list of entries. The \code{:\meta{label}} is optional.
+ \keyval{fret number}{integer}\Default{6}
+ The number of frets displayed for a scale. The minimum number is 6.
+ \keychoice{fingering}{type 1,type 1A,type 2,type 3,type 4}
+ Set a whole predefined fingering. The types correspond to ones taught
+ in \citeauthor{leavitt:mmfg:1}'s
+ \citetitle{leavitt:mmfg:1}~\cite{leavitt:mmfg:1}. This option assumes an
+ ionic scale a places the roots correspondingly.
+ \keychoice{fingering*}{type 1,type 1A,type 2,type 3,type 4}
+ The same as \option{fingering} but not scale is assumed and no roots are
+ indicated.
+ \keychoice{fingering?}{type 1,type 1A,type 2,type 3,type 4}
+ The same as \option{fingering*} but also no labels for the fingers are given.
+\end{options}
Let's see an example:
-\begin{beispiel}[below]
- \scales[
- name = F-major (Fingering Type~1A) ,
- position = I ,
- fingering = type 1A
- ]
-\end{beispiel}
-
-An example for \key{fingering*}:
-\begin{beispiel}[below]
- \scales[
- name = Fingering Type~3 ,
- fingering* = type 3
- ]
-\end{beispiel}
-
-Now an example for \key{fingering?}:
-\begin{beispiel}[below]
- \scales[
- name = Fingering Type~2 ,
- fingering? = type 2
- ]
-\end{beispiel}
+\begin{example}
+ \scales[
+ name = F-major (Fingering Type~1A) ,
+ position = I ,
+ fingering = type 1A
+ ]
+\end{example}
+
+An example for \option{fingering*}:
+\begin{example}
+ \scales[
+ name = Fingering Type~3 ,
+ fingering* = type 3
+ ]
+\end{example}
+
+Now an example for \option{fingering?}:
+\begin{example}
+ \scales[
+ name = Fingering Type~2 ,
+ fingering? = type 2
+ ]
+\end{example}
At last an example for an explicitly set scale:
-\begin{beispiel}[below]
- \scales[
- finger = {
- 2/1:1, 5/1:4,
- 2/2:1, 5/2:4,
- 2/3:1, 4/3:3, 5/3:4,
- 2/4:1, 4/4:3,
- 2/5:1, 3/5:2, 4/5:3,
- 2/6:1, 5/6:4
- }
- ]
-\end{beispiel}
-
+\begin{example}
+ \scales[
+ finger = {
+ 2/1:1, 5/1:4,
+ 2/2:1, 5/2:4,
+ 2/3:1, 4/3:3, 5/3:4,
+ 2/4:1, 4/4:3,
+ 2/5:1, 3/5:2, 4/5:3,
+ 2/6:1, 5/6:4
+ }
+ ]
+\end{example}
\section{Options}
There are quite a number of options determining the layout of the tablatures.
They can either be set as package options or via the setup command:
-\begin{beschreibung}
- \Befehl{setchordscheme}{<options>}
-\end{beschreibung}
+\begin{commands}
+ \command{setchordscheme}{options}
+ The setup command for \guitarchordschemes.
+\end{commands}
Below every option and its corresponding default setting is described.
-\begin{beschreibung}
- \Option{x-unit}{<dim>}\Default{.8cm}
- The basic $x$ unit for the \TikZ{} picture the chord scheme is set in.
- \Option{y-unit}{<dim>}\Default{.8cm}
- The basic $y$ unit for the \TikZ{} picture the chord scheme is set in.
- \Option{finger-format}{<TeX code>}\Default{\cmd*{sffamily}\cmd*{small}}
- The format the numbers for the fingers are typeset with.
- \Option{finger-format+}{<TeX code>}\Default{}
- Code to be appended to \key{finger-format}.
- \Option{position-format}{<TeX code>}\Default{\cmd*{sffamily}}
- The format the number for the position is typeset with.
- \Option{position-format+}{<TeX code>}\Default{}
- Code to be appended to \key{position-format}.
- \Option{name-format}{<TeX code>}\Default{\cmd*{large}}
- The format the chord name/symbol is typeset with.
- \Option{name-format+}{<TeX code>}\Default{}
- Code to be appended to \key{name-format}.
- \Option{string-name-format}{<TeX code>}\Default{\cmd*{sffamily}\cmd*{small}}
- The format the names of the strings are typeset with.
- \Option{string-name-format+}{<TeX code>}\Default{}
- Code to be appended to \key{string-name-format}.
- \Option{line-width}{<dim>}\Default{1pt}
- The line width used for all lines drawn in the chord scheme.
- \Option{finger-radius}{<dim>}\Default{.1875}
- The radius of the circles that represent the fingers in multiples of
- \key{x-unit}. Also determines the size of the root markers and the barr\'e.
- \Option{finger-x-offset}{<dim>}\Default{.375}
- The $x$ offset of the number with respect to the circle in multiples of
- \key{x-unit}.
- \Option{finger-y-offset}{<dim>}\Default{.375}
- The $y$ offset of the number with respect to the circle in multiples of
- \key{y-unit}.
- \Option{finger-style}{<tikz style>}\Default{fill}
- The \TikZ{} style the circles representing the fingers are drawn with.
- This is equivalent to\linebreak \cmd{tikzset}{finger style/.style=\{<tikz style>\}}.
- \Option{root-style}{<tikz style>}\Default{fill}
- The \TikZ{} style the squares representing the roots are drawn with.
- This is equivalent to\linebreak \cmd{tikzset}{root style/.style=\{<tikz style>\}}.
- \Option{show-root-style}{<tikz style>}\Default{draw}
- The \TikZ{} style the squares representing the “ghost roots” are drawn with.
- This is equivalent to \cmd{tikzset}{show root style/.style=\{<tikz style>\}}.
- \Option{ringing-style}{<tikz style>}\Default{draw}
- The \TikZ{} style the circles representing the open string markers are drawn
- with. This is equivalent to \cmd{tikzset}{ringing style/.style=\{<tikz style>\}}.
- \Option{muted-style}{<tikz style>}\Default{\{cross out,draw\}}
- The \TikZ{} style the nodes representing muted strings are drawn with.
- This is equivalent to \cmd{tikzset}{muted style/.style=\{<tikz style>\}}.
- \Option{tuning}{<comma list of string names>}\Default{\{E,B,G,D,A,E\}}
- The tuning.
- \Option{use-rbc}{\default{true}|false}\Default{false}
- If set to true the \key{name} will be set in the command \cmd{rbc} from the
- \paket*{realbookchords}. If this option is not used as a package option
- then make sure you also load \paket*{realbookchords}~\cite{pkg:realbookchords}.
- Please be aware that the latter requires \XeLaTeX{} or \LuaLaTeX. See
- section~\ref{sec:realbookchords} for details.
-\end{beschreibung}
-
-\section{Using \paket*{realbookchords}}\label{sec:realbookchords}
-Setting \cmd{setchordscheme}{use-rbc=true} or using the same as package option
-will set the chord names/symbols in \paket*{realbookchords}' command \cmd{rbc}.
-
-In order to use this option you need to install the \paket*{realbookchords}
-package~\cite{pkg:realbookchords}. I expect it to go to \ac{ctan} eventually but
-until then you can get it at \url{https://bitbucket.org/cgnieder/realbookchords/}.
-The package uses Jochen Pietsch's “New Real Book” font~\cite{web:pietsch:fonts}
-for typesetting the chord symbols which you can get at
-\url{http://notation.jochenpietsch.de/} or from me. I published it here: \url{http://www.niederberger.com.de/gitarren-akkorde-und-skalen-mit-latex}.
-It is placed under the Creative Commons Attribution-Noncommercial-Share Alike~3.0
-Unported License \ccbyncsaeu.
-
-\paket*{realbookchords} requires that you compile your document with \XeLaTeX{}
-or \LuaLaTeX.
-
-Here is an example of how the chord symbol looks with \paket*{realbookchords}:
-\begin{beispiel}
- \setchordscheme{use-rbc=true}
- \chordscheme[
- name = Gmi7(\b5) ,
- position = II ,
- finger = {1/2:1, 2/3:4, 2/4:3} ,
- show-root = {4/4} ,
- root = {2/6:2} ,
- mute = {1,5}
- ]
-\end{beispiel}
-
-\printbibliography
-
-\printindex
+\begin{options}
+ \keyval{x-unit}{dim}\Default{.8cm}
+ The basic $x$ unit for the \TikZ{} picture the chord scheme is set in.
+ \keyval{y-unit}{dim}\Default{.8cm}
+ The basic $y$ unit for the \TikZ{} picture the chord scheme is set in.
+ \keyval{finger-format}{\TeX{} code}\Default{\cs*{sffamily}\cs*{small}}
+ The format the numbers for the fingers are typeset with.
+ \keyval{finger-format+}{\TeX{} code}\Default
+ Code to be appended to \option{finger-format}.
+ \keyval{position-format}{\TeX{} code}\Default{\cs*{sffamily}}
+ The format the number for the position is typeset with.
+ \keyval{position-format+}{\TeX{} code}\Default
+ Code to be appended to \option{position-format}.
+ \keyval{name-format}{\TeX{} code}\Default{\cs*{large}}
+ The format the chord name/symbol is typeset with.
+ \keyval{name-format+}{\TeX{} code}\Default
+ Code to be appended to \option{name-format}.
+ \keyval{chord-name-format}{cs}\Default{\cs*{@firstofone}}
+ \sinceversion{0.5}The command that is used to parse the chord name.
+ \meta{cs} needs to be a command that takes a mandatory argument.
+ \keyval{scales-name-format}{cs}\Default{\cs*{@firstofone}}
+ \sinceversion{0.5}The command that is used to parse the scales name.
+ \meta{cs} needs to be a command that takes a mandatory argument.
+ \keyval{string-name-format}{\TeX{} code}\Default{\cs*{sffamily}\cs*{small}}
+ The format the names of the strings are typeset with.
+ \keyval{string-name-format+}{\TeX{} code}\Default
+ Code to be appended to \option{string-name-format}.
+ \keyval{chord-frets}{number}\Default{4}
+ \sinceversion{0.6}The default number of frets of a chord scheme.
+ \meta{number} must be at least 4.
+ \keyval{scales-frets}{number}\Default{6}
+ \sinceversion{0.6}The default number of frets of a scales scheme.
+ \meta{number} must be at least 6.
+ \keyval{line-width}{dim}\Default{1pt}
+ The line width used for all lines drawn in the chord scheme.
+ \keyval{finger-radius}{num}\Default{.1875}
+ The radius of the circles that represent the fingers in multiples of
+ \option{x-unit}. Also determines the size of the root markers and the
+ barr\'e.
+ \keyval{finger-x-offset}{num}\Default{.375}
+ The $x$ offset of the number with respect to the circle in multiples of
+ \option{x-unit}.
+ \keyval{finger-y-offset}{num}\Default{.375}
+ The $y$ offset of the number with respect to the circle in multiples of
+ \option{y-unit}.
+ \keyval{finger-style}{\TikZ{} style}\Default{fill}
+ The \TikZ{} style the circles representing the fingers are drawn with.
+ This is equivalent to \cs*{tikzset}\Marg{finger
+ style/.style=\{\meta{\TikZ{} style}\}}.
+ \keyval{root-style}{\TikZ{} style}\Default{fill}
+ The \TikZ{} style the squares representing the roots are drawn with.
+ This is equivalent to \cs*{tikzset}\Marg{root style/.style=\{\meta{\TikZ{}
+ style}\}}.
+ \keyval{show-root-style}{\TikZ{} style}\Default{draw}
+ The \TikZ{} style the squares representing the "`ghost roots"' are drawn
+ with. This is equivalent to \cs*{tikzset}\Marg{show root
+ style/.style=\{\meta{\TikZ{} style}\}}.
+ \keyval{ringing-style}{\TikZ{} style}\Default{draw}
+ The \TikZ{} style the circles representing the open string markers are
+ drawn with. This is equivalent to \cs*{tikzset}\Marg{ringing
+ style/.style=\{\meta{\TikZ{} style}\}}.
+ \keyval{muted-style}{\TikZ{} style}\Default{cross out,draw}
+ The \TikZ{} style the nodes representing muted strings are drawn with.
+ This is equivalent to \cs*{tikzset}\Marg{muted style/.style=\{\meta{\TikZ{}
+ style}\}}.
+ \keyval{tuning}{comma separated list of string names}\Default{E,B,G,D,A,E}
+ The tuning.
+\end{options}
\end{document}
diff --git a/Master/texmf-dist/tex/latex/guitarchordschemes/guitarchordschemes.sty b/Master/texmf-dist/tex/latex/guitarchordschemes/guitarchordschemes.sty
index 8e6f9e75a61..7caf6de3ac4 100644
--- a/Master/texmf-dist/tex/latex/guitarchordschemes/guitarchordschemes.sty
+++ b/Master/texmf-dist/tex/latex/guitarchordschemes/guitarchordschemes.sty
@@ -8,7 +8,7 @@
% Web: https://bitbucket.org/cgnieder/guitarchordschemes/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2013 Clemens Niederberger
+% Copyright 2013-2014 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -34,29 +34,24 @@
%
% package info and requirements:
\NeedsTeXFormat{LaTeX2e}
-\def\gcs@date{2013/08/25}
-\def\gcs@version{v0.4}
+\def\gcs@date{2014/09/15}
+\def\gcs@version{v0.6}
\def\gcs@description{Guitar Chord and Scale Tablatures with TikZ (CN)}
\ProvidesPackage{guitarchordschemes}[\gcs@date\space \gcs@version\space \gcs@description]
-\RequirePackage{tikz,etoolbox,pgfopts}
+\RequirePackage{tikz,cnltx-base}
\usetikzlibrary{shapes.misc,arrows,calc}
% --------------------------------------------------------------------------
% message handling
-\def\gcs@create@message#1{%
- \ifstrequal{#1}{Error}
- {%
- \lowercase{\csdef{gcs@#1}}##1##2{%
- \csuse{Package#1}{guitarchordschemes}{##1}{##2}}%
- }{%
- \lowercase{\csdef{gcs@#1}}##1{%
- \csuse{Package#1}{guitarchordschemes}{##1}}%
- }}
-\gcs@create@message{Error}
-\gcs@create@message{Warning}
-\gcs@create@message{WarningNoLine}
-\gcs@create@message{Info}
+\newcommand*\gcs@error@message{%
+ For details have a look at the `guitarchordschemes' manual.%
+}
+
+\cnltx@create@generic@message{gcs}{guitarchordschemes}{Error}{\gcs@error@message}
+\cnltx@create@generic@message{gcs}{guitarchordschemes}{Warning}{}
+\cnltx@create@generic@message{gcs}{guitarchordschemes}{WarningNoLine}{}
+\cnltx@create@generic@message{gcs}{guitarchordschemes}{Info}{}
\def\gcs@missing@date@error#1#2{%
\gcs@error
@@ -64,23 +59,39 @@
{#1: It seems you didn't specify the #2}%
}
-\def\gcs@cs@new{\protected\def}
+\newrobustcmd*\gcs@def[1]{%
+ \ifdef{#1}
+ {%
+ \gcs@error
+ {The macro \string#1\space is already defined}
+ {%
+ The macro \string#1\space is already defined. Please let the package
+ author know%
+ }%
+ }
+ {\protected\def#1}%
+}
+
+\gcs@def\gcs@deprecated@option#1#2{%
+ \gcs@warning{Since version #1 the option `#2' has been dropped}%
+}
% --------------------------------------------------------------------------
% package options and setup:
-\newbool{gcs@rbc}
+\newcommand*\gcs@finger@font{\sffamily\small}
+\newcommand*\gcs@position@font{\sffamily}
+\newcommand*\gcs@name@font{\large}
+\newcommand*\gcs@string@name@format{\sffamily\small}
-\def\gcs@finger@font{\sffamily\small}
-\def\gcs@position@font{\sffamily}
-\def\gcs@name@font{\large}
-\def\gcs@string@name@format{\sffamily\small}
+\newcommand*\gcs@x@unit{.8cm}
+\newcommand*\gcs@y@unit{.8cm}
+\newcommand*\gcs@line@width{1pt}
+\newcommand*\gcs@finger@radius{.1875}
+\newcommand*\gcs@finger@x@offset{.375}
+\newcommand*\gcs@finger@y@offset{.275}
-\def\gcs@x@unit{.8cm}
-\def\gcs@y@unit{.8cm}
-\def\gcs@line@width{1pt}
-\def\gcs@finger@radius{.1875}
-\def\gcs@finger@x@offset{.375}
-\def\gcs@finger@y@offset{.275}
+\newcommand*\gcs@chordscheme@fret@number{4}
+\newcommand*\gcs@scales@fret@number{6}
\pgfkeys{
guitarchordschemes/.cd ,
@@ -98,10 +109,26 @@
name-format+/.code =
\expandafter\def\expandafter\gcs@name@font
\expandafter{\gcs@name@font#1} ,
+ chord-name-cs/.code = {\let\gcs@chord@name@command=#1} ,
+ scales-name-cs/.code = {\let\gcs@scales@name@command=#1} ,
string-name-format/.code = \def\gcs@string@name@format{#1} ,
string-name-format+/.code =
\expandafter\def\expandafter\gcs@string@name@format
\expandafter{\gcs@string@name@format#1} ,
+ chord-frets/.code =
+ \ifnumless{#1}{4}
+ {%
+ \gcs@warning{You cannot use less than 4 frets for a chord!}%
+ \def\gcs@chordscheme@fret@number{4}%
+ }
+ {\def\gcs@chordscheme@fret@number{#1}} ,
+ scales-frets/.code =
+ \ifnumless{#1}{6}
+ {%
+ \gcs@warning{You cannot use less than 6 frets for a scale!}%
+ \def\gcs@scales@fret@number{6}%
+ }
+ {\def\gcs@scales@fret@number{#1}} ,
line-width/.code = \def\gcs@line@width{#1} ,
finger-radius/.code = \def\gcs@finger@radius{#1} ,
finger-x-offset/.code = \def\gcs@finger@x@offset{#1} ,
@@ -112,14 +139,14 @@
ringing-style/.code = \tikzset{ringing style/.style={#1}} ,
muted-style/.code = \tikzset{muted style/.style={#1}} ,
tuning/.code = \gcs@chord@tuning{#1} ,
- use-rbc/.is if = gcs@rbc
+ use-rbc/.code = \gcs@deprecated@option{0.5}{use-rbc}
}
% the setup command:
\newrobustcmd*\setchordscheme[1]{\pgfqkeys{/guitarchordschemes}{#1}}
\newcounter{gcs@string@number}
-\newcommand\gcs@chord@tuning[1]{%
+\newrobustcmd*\gcs@chord@tuning[1]{%
\setcounter{gcs@string@number}{0}%
\foreach \string@name in {#1}
{%
@@ -141,10 +168,6 @@
\ProcessPgfOptions*
% --------------------------------------------------------------------------
-% are we using `realbookchords'?
-\ifbool{gcs@rbc}{\RequirePackage{realbookchords}}{}
-
-% --------------------------------------------------------------------------
% settings for the whole scheme:
\tikzset{
gcs/finger/.style =
@@ -165,7 +188,14 @@
show-root/.code = \gcs@chord@show@root{#1} ,
mute/.code = \gcs@chord@mute{#1} ,
ring/.code = \gcs@chord@ring{#1} ,
- barre/.code = \gcs@chord@barre{#1}
+ barre/.code = \gcs@chord@barre{#1} ,
+ fret-number/.code =
+ \ifnumless{#1}{4}
+ {%
+ \gcs@warning{You cannot use less than 4 frets for a chord!}%
+ \def\gcs@chordscheme@fret@number{4}%
+ }
+ {\def\gcs@chordscheme@fret@number{#1}}
}
% setting a scale:
@@ -175,7 +205,7 @@
position/.code = \def\gcs@scales@position{#1} ,
finger/.code = \gcs@scales@finger{#1} ,
root/.code = \gcs@scales@root{#1} ,
- fret number/.code =
+ fret-number/.code =
\ifnumless{#1}{6}
{%
\gcs@warning{You cannot use less than 6 frets for a scale!}%
@@ -332,68 +362,72 @@
% placing fingers:
% <fret>/<string>:<finger>
-\gcs@cs@new\gcs@chord@finger#1{%
+\newrobustcmd*\gcs@chord@finger[1]{%
\foreach \gcs@finger@spec in {#1}
{
\expandafter\gcs@get@finger@data\gcs@finger@spec::\q@stop
- \ifdefvoid\finger@x
+ \ifdefvoid\gcs@finger@x
{\gcs@missing@date@error{finger}{position}}
{
- \pgfmathsetmacro\finger@fret{1.5*\finger@x-0.75}
- \ifdefvoid\finger@y
+ \pgfmathsetmacro\gcs@finger@fret{1.5*\gcs@finger@x-0.75}
+ \ifdefvoid\gcs@finger@y
{\gcs@missing@date@error{finger}{string}}
{
- \pgfmathsetmacro\finger@string{(6-\finger@y)*4/5}
+ \pgfmathsetmacro\gcs@finger@string{(6-\gcs@finger@y)*4/5}
\draw[finger style]
- (\finger@fret,\finger@string) circle (\gcs@finger@radius*\gcs@x@unit) ;
- \node[gcs/finger] at (\finger@fret,\finger@string) {\finger@number} ;
+ (\gcs@finger@fret,\gcs@finger@string)
+ circle
+ (\gcs@finger@radius*\gcs@x@unit) ;
+ \node[gcs/finger]
+ at (\gcs@finger@fret,\gcs@finger@string)
+ {\gcs@finger@number} ;
}
}
}
}
\let\gcs@scales@finger\gcs@chord@finger
-\gcs@cs@new\gcs@get@finger@data#1/#2:#3:#4\q@stop{%
- \def\finger@x{#1}%
- \def\finger@y{#2}%
- \def\finger@number{#3}%
+\gcs@def\gcs@get@finger@data#1/#2:#3:#4\q@stop{%
+ \def\gcs@finger@x{#1}%
+ \def\gcs@finger@y{#2}%
+ \def\gcs@finger@number{#3}%
}
% placing a barre:
% <fret>/<string>-<string>:<finger>
-\gcs@cs@new\gcs@chord@barre#1{%
+\newrobustcmd*\gcs@chord@barre[1]{%
\foreach \gcs@barre@spec in {#1}
{
\expandafter\gcs@get@barre@data\gcs@barre@spec::\q@stop
- \ifdefvoid\barre@x
+ \ifdefvoid\gcs@barre@x
{\gcs@missing@date@error{barre}{position}}
- {\pgfmathsetmacro\barre@fret{1.5*\barre@x-0.75}}
- \ifdefvoid\barre@fromto
+ {\pgfmathsetmacro\gcs@barre@fret{1.5*\gcs@barre@x-0.75}}
+ \ifdefvoid\gcs@barre@fromto
{\gcs@missing@date@error{barre}{string range}}
{
- \expandafter\gcs@barre@getstrings\barre@fromto--\q@stop
- \pgfmathsetmacro\barre@lower@string{(6-\barre@lower@y)*4/5}
- \pgfmathsetmacro\barre@upper@string{(6-\barre@upper@y)*4/5}
+ \expandafter\gcs@barre@getstrings\gcs@barre@fromto--\q@stop
+ \pgfmathsetmacro\gcs@barre@lower@string{(6-\gcs@barre@lower@y)*4/5}
+ \pgfmathsetmacro\gcs@barre@upper@string{(6-\gcs@barre@upper@y)*4/5}
\draw[finger style,round cap-round cap,line width=2*\gcs@finger@radius*\gcs@x@unit]
- (\barre@fret,\barre@lower@string) node[gcs/finger] {\barre@finger}
+ (\gcs@barre@fret,\gcs@barre@lower@string) node[gcs/finger] {\gcs@barre@finger}
++ (0,\gcs@finger@radius*\gcs@x@unit)
--
- ($(\barre@fret,\barre@upper@string)+(0,-\gcs@finger@radius*\gcs@x@unit)$)
+ ($(\gcs@barre@fret,\gcs@barre@upper@string)+(0,-\gcs@finger@radius*\gcs@x@unit)$)
;
}
}
}
-\gcs@cs@new\gcs@get@barre@data#1/#2:#3:#4\q@stop{%
- \def\barre@x{#1}%
- \def\barre@fromto{#2}%
- \def\barre@finger{#3}%
+\gcs@def\gcs@get@barre@data#1/#2:#3:#4\q@stop{%
+ \def\gcs@barre@x{#1}%
+ \def\gcs@barre@fromto{#2}%
+ \def\gcs@barre@finger{#3}%
}
-\gcs@cs@new\gcs@barre@getstrings#1-#2-#3\q@stop{%
+\gcs@def\gcs@barre@getstrings#1-#2-#3\q@stop{%
\ifx#3-\relax
- \def\barre@lower@y{#1}%
- \def\barre@upper@y{#2}%
+ \def\gcs@barre@lower@y{#1}%
+ \def\gcs@barre@upper@y{#2}%
\else
\gcs@error
{barre: wrong string range syntax}
@@ -403,21 +437,23 @@
% placing root fingers:
% <fret>/<string>:<finger>
-\gcs@cs@new\gcs@chord@root#1{%
+\newrobustcmd*\gcs@chord@root[1]{%
\foreach \gcs@finger@spec in {#1}
{
\expandafter\gcs@get@finger@data\gcs@finger@spec::\q@stop
- \ifdefvoid\finger@x
+ \ifdefvoid\gcs@finger@x
{\gcs@missing@date@error{root}{position}}
{
- \pgfmathsetmacro\finger@fret{1.5*\finger@x-0.75}
- \ifdefvoid\finger@y
+ \pgfmathsetmacro\gcs@finger@fret{1.5*\gcs@finger@x-0.75}
+ \ifdefvoid\gcs@finger@y
{\gcs@missing@date@error{root}{string}}
{
- \pgfmathsetmacro\finger@string{(6-\finger@y)*4/5}
- \node[minimum size=2*\gcs@finger@radius*\gcs@x@unit,root style]
- at (\finger@fret,\finger@string) {} ;
- \node[gcs/finger] at (\finger@fret,\finger@string) {\finger@number} ;
+ \pgfmathsetmacro\gcs@finger@string{(6-\gcs@finger@y)*4/5}
+ \node[minimum size=2*\gcs@finger@radius*\gcs@x@unit,inner sep=0pt,root style]
+ at (\gcs@finger@fret,\gcs@finger@string) {} ;
+ \node[gcs/finger]
+ at (\gcs@finger@fret,\gcs@finger@string)
+ {\gcs@finger@number} ;
}
}
}
@@ -426,27 +462,30 @@
% placing ghost roots:
% <fret>/<string>
-\gcs@cs@new\gcs@chord@show@root#1{%
+\newrobustcmd*\gcs@chord@show@root[1]{%
\foreach \gcs@finger@spec in {#1}
{
\expandafter\gcs@get@finger@data\gcs@finger@spec::\q@stop
- \ifdefvoid\finger@x
+ \ifdefvoid\gcs@finger@x
{\gcs@missing@date@error{show-root}{position}}
{
- \pgfmathsetmacro\finger@fret{1.5*\finger@x-0.75}
- \ifdefvoid\finger@x
+ \pgfmathsetmacro\gcs@finger@fret{1.5*\gcs@finger@x-0.75}
+ \ifdefvoid\gcs@finger@x
{\gcs@missing@date@error{show-root}{string}}
{
- \pgfmathsetmacro\finger@string{(6-\finger@y)*4/5}
- \node[minimum size=2*\gcs@finger@radius*\gcs@x@unit,show root style]
- at (\finger@fret,\finger@string) {} ;
+ \pgfmathsetmacro\gcs@finger@string{(6-\gcs@finger@y)*4/5}
+ \node[
+ minimum size=2*\gcs@finger@radius*\gcs@x@unit,
+ inner sep=0pt,
+ show root style]
+ at (\gcs@finger@fret,\gcs@finger@string) {} ;
}
}
}
}
% muted strings:
-\gcs@cs@new\gcs@chord@mute#1{%
+\newrobustcmd*\gcs@chord@mute[1]{%
\foreach \muted@string in {#1}
{
\pgfmathsetmacro\muted@string@pos{(6-\muted@string)*4/5}
@@ -455,7 +494,7 @@
}
% ringing strings:
-\gcs@cs@new\gcs@chord@ring#1{%
+\newrobustcmd*\gcs@chord@ring[1]{%
\foreach \ringing@string in {#1}
{
\pgfmathsetmacro\ringing@string@pos{(6-\ringing@string)*4/5}
@@ -465,65 +504,74 @@
}
% the chord name:
-\gcs@cs@new\gcs@chord@name#1{%
- \node[above,yshift=4ex] at (3,4) {%
- \foreach \gcs@chord@name@variant in {#1}
- {%
- \gcs@name@font
- \space
- \ifbool{gcs@rbc}
- {\expandafter\rbc\expandafter{\gcs@chord@name@variant}}
- {\gcs@chord@name@variant}%
- \space
- }%
+\newrobustcmd*\gcs@chord@name[1]{%
+ \node[above,yshift=4ex] at (.75*\gcs@chordscheme@fret@number,4) {%
+ \gcs@name@font
+ \foreach \gcs@chord@name@variant in {#1}
+ {%
+ \space
+ \expandafter\gcs@chord@name@command
+ \expandafter{\gcs@chord@name@variant}%
+ \space
+ }%
} ;
}
+\newrobustcmd*\gcs@chord@name@command[1]{#1}
+
% the scale name:
-\gcs@cs@new\gcs@scales@name#1{%
- \node[above,yshift=4ex] at (4.5,4) {%
- \foreach \gcs@scales@name@variant in {#1}
- {%
- \gcs@name@font
- \space
- \gcs@scales@name@variant
- \space
- }%
+\newrobustcmd*\gcs@scales@name[1]{%
+ \node[above,yshift=4ex] at (.75*\gcs@scales@fret@number,4) {%
+ \gcs@name@font
+ \foreach \gcs@scales@name@variant in {#1}
+ {%
+ \space
+ \expandafter\gcs@scales@name@command
+ \expandafter{\gcs@scales@name@variant}%
+ \space
+ }%
} ;
}
+\newrobustcmd*\gcs@scales@name@command[1]{#1}
+
% --------------------------------------------------------------------------
% the chord scheme command:
-\gcs@cs@new\gcs@chordscheme#1{%
-\begingroup
-\begin{tikzpicture}[
- x=\gcs@x@unit,
- y=\gcs@y@unit,
- line width=\gcs@line@width,
- baseline=(6thstring)
- ]
- \coordinate (6thstring) at (0,0) ;
- \foreach \fret in { 0,1.5,3,4.5,6 }
- { \draw (\fret,0) -- (\fret,4) ; }
- \foreach \string@pos/\string@number in
- { 0/6, 0.8/5, 1.6/4, 2.4/3, 3.2/2, 4/1, 0 }
- {
- \draw (0,\string@pos) node[left,minimum width=2em]
- {\gcs@string@name@format\csuse{guitar@string@\string@number}} -- (6,\string@pos) ;
- }
- \pgfqkeys{/gcs/chord}{#1}%
- \ifdefvoid\gcs@chord@position
- {}
- {\node[above,yshift=1ex,font=\gcs@position@font] at (.75,4) {\gcs@chord@position} ;}
-\end{tikzpicture}
-\endgroup
+\newrobustcmd*\gcs@chordscheme[1]{%
+ \begingroup
+ \begin{tikzpicture}[
+ x=\gcs@x@unit,
+ y=\gcs@y@unit,
+ line width=\gcs@line@width,
+ baseline=(6thstring)
+ ]
+ \coordinate (6thstring) at (0,0) ;
+ \pgfqkeys{/gcs/chord}{#1}%
+ \foreach \fret in {0,1,...,\gcs@chordscheme@fret@number}
+ { \draw (1.5*\fret,0) -- (1.5*\fret,4) ; }
+ \foreach \gcs@string@pos/\gcs@string@number in
+ { 0/6, 0.8/5, 1.6/4, 2.4/3, 3.2/2, 4/1, 0 }
+ {
+ \draw
+ (0,\gcs@string@pos)
+ node[left,minimum width=2em]
+ {\gcs@string@name@format\csuse{guitar@string@\gcs@string@number}}
+ --
+ (1.5*\gcs@chordscheme@fret@number,\gcs@string@pos) ;
+ }
+ \ifdefvoid\gcs@chord@position
+ {}
+ {
+ \node[above,yshift=1ex,font=\gcs@position@font]
+ at (.75,4) {\gcs@chord@position} ;
+ }
+ \end{tikzpicture}
+ \endgroup
}
% --------------------------------------------------------------------------
-% the scalescommand:
-\def\gcs@scales@fret@number{6}
-
-\gcs@cs@new\gcs@scales#1{%
+% the scales command:
+\newrobustcmd*\gcs@scales[1]{%
\begingroup
\begin{tikzpicture}[
x=\gcs@x@unit,
@@ -535,18 +583,21 @@
\coordinate (6thstring) at (0,0) ;
\foreach \fret in { 0,1,...,\gcs@scales@fret@number }
{ \draw (1.5*\fret,0) -- (1.5*\fret,4) ; }
- \foreach \string@pos/\string@number in
+ \foreach \gcs@string@pos/\gcs@string@number in
{ 0/6, 0.8/5, 1.6/4, 2.4/3, 3.2/2, 4/1, 0 }
{
- \draw (0,\string@pos) node[left,minimum width=2em]
- {\gcs@string@name@format\csuse{guitar@string@\string@number}}
- -- (1.5*\gcs@scales@fret@number,\string@pos) ;
+ \draw
+ (0,\gcs@string@pos)
+ node[left,minimum width=2em]
+ {\gcs@string@name@format\csuse{guitar@string@\gcs@string@number}}
+ --
+ (1.5*\gcs@scales@fret@number,\gcs@string@pos) ;
}
\ifdefvoid\gcs@scales@position
{}
{%
- \node[above,yshift=1ex,font=\gcs@position@font] at (.75,4)
- {\gcs@scales@position} ;
+ \node[above,yshift=1ex,font=\gcs@position@font]
+ at (.75,4) {\gcs@scales@position} ;
}
\end{tikzpicture}
\endgroup
@@ -560,7 +611,7 @@
% --------------------------------------------------------------------------
% the symbols for use outside of a scheme:
-\newrobustcmd*\fingersymbol{%
+\newrobustcmd*\gcs@fingersymbol{%
\tikz\draw[finger style] (0,0) circle (\gcs@finger@radius*\gcs@x@unit);}
\newrobustcmd*\rootsymbol{%
@@ -592,3 +643,7 @@
2013/05/01 v0.3 - added \scales command
2013/05/01 v0.3a - set all lengths as multiples of the base unit
2013/08/25 v0.4 - added scale option that allows variable number of frets
+2014/07/16 v0.5 - add `inner sep=0pt' to `root' and `show root' styles
+2014/09/15 v0.6 - new options `chord-frets', `scales-frets' and `fret-number'
+
+TODO: