Debian Codegraph @

debian/patches/debian_1130442

raw
1 From 30b0e8c96eada8592b63333c614d2f0420fc0ef6 Mon Sep 17 00:00:00 2001
2 From: Bruno Loff <[email protected]>
3 Date: Sun, 12 Jan 2020 11:12:42 +0000
4 Subject: [PATCH] Fix bug after pgf change
5
6 Origin: https://github.com/sfranzen/chordbox/pull/2
7 Bug: https://github.com/sfranzen/chordbox/issues/4
8 Bug-Debian: https://bugs.debian.org/1130442
9
10 the pgf package changed the foreach loop so that the [count=\n] option went from defining a global variable to a local variable, breaking chordbox. Fixed this.
11 ---
12 chordbox.sty | 7 ++++---
13 1 file changed, 4 insertions(+), 3 deletions(-)
14
15 diff --git a/chordbox.sty b/chordbox.sty
16 index b008c01..d3c0561 100644
17 --- texlive.orig/texmf-dist/tex/latex/chordbox/chordbox.sty
18 +++ texlive/texmf-dist/tex/latex/chordbox/chordbox.sty
19 @@ -117,19 +117,20 @@
20 % Put coordinates at finger positions and above the frets (index 0),
21 % store string count, then draw the string grid and decorations
22 \foreach[count=\n] \fretposition in {#3} {
23 + \global\let\chordbox@n\n
24 \foreach \fret in {0,...,\numfrets}
25 \coordinate (\n\fret) at (\n - 1, 0.5 - \fret);
26 % Extra coordinate for text below each string
27 \coordinate (\n) at (\n - 1, -\numfrets);
28 }
29 - \draw grid (\n - 1, -\numfrets);
30 + \draw grid (\chordbox@n - 1, -\numfrets);
31 \ifthenelse{\isempty{#1}\or#1<2}{% Draw the "nut"
32 - \fill rectangle (\n - 1, .2);
33 + \fill rectangle (\chordbox@n - 1, .2);
34 }{% Draw the position indicator
35 \node[left] at (11) {\pgfkeys{base fret={#1}}};
36 }
37 % Center chord name over strings
38 - \pgfmathparse{0.5 * (\n - 1)}
39 + \pgfmathparse{0.5 * (\chordbox@n - 1)}
40 \node[above] at (\pgfmathresult, 1.25) {\pgfkeys{name={#2}}};
41 % Draw the string symbols according to argument #3
42 \foreach[count=\s] \fret in {#3} {