hier ein wunderbares Beispiel eines Griffbretts aus Stack Overflow. Ich experimentiere seit einger Zeit für meinen Gitarrenunterricht, kann mir das mit der Makrodefinition zumindest ein wenig vorstellen. Mir ist jedoch nicht klar, wie die unterschiedliche Breite der Bundstäbchen (senkrechte Linien in pythagoräischem Abstand) des Griffbretts zustande kommen. Meines Erachtens müsste es eine einfache Möglichkeit geben, die Bundbreite auch kontant halten zu können (1 cm zum Beispiel) bei weiterhin insgesamt 24 Bünden. Für mein Lehrmaterial würe ich eine konstante Breite vermutlich bevorzugen...
Freue mich über Hilfe!
VG
BX
\documentclass{article} % Language setting % Replace `english' with e.g. `spanish' to change the document language \usepackage[english]{babel} % Set page size and margins % Replace `letterpaper' with `a4paper' for UK/EU standard size \usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry} % Useful packages \usepackage{amsmath} \usepackage{graphicx} \usepackage[colorlinks=true, allcolors=blue]{hyperref} % GUITAR SPECIFI MODULES \usepackage{tikz} \usetikzlibrary{calc,arrows} \title{Charts} \author{Byxx} \begin{document} \maketitle \section{Introduction} \begin{tikzpicture}[ ynode/.style={draw=red!50,circle,fill=red!50,scale=.35,inner sep=1pt,minimum size=1.7em}] %%%% Draw the base and set coordinates %%%% \begin{scope}[xscale=-20,yscale=.5,line width=.5] \xdef\x{1} %% Left line \draw[line width=1.5] (1,1) -- (1,6); \foreach \fret in {1,...,24}{ %% Set coordinate for each string \foreach \str in {1,...,6}{ \coordinate (\str-\fret) at (0.97193715634*\x,\str); } %% Set coordinate for the text above \coordinate (Top-\fret) at (0.97193715634*\x,7); %% Compute the position of the fret \pgfmathsetmacro\x{\x * 0.94387431268} \xdef\x{\x} %% Draw the fret \draw (\x,1) -- (\x,6); } %% Draw each string \foreach \str in {1,...,6}{ \draw (1,\str) -- (0.97153194115*\x,\str); \coordinate (start\str) at (1,\str); } \end{scope} %% Draw the mark on the guitare \foreach \f in {3,5,7,9,15,17}{ \draw[black!20,fill=black!10] ($(3-\f)!.5!(4-\f)$) circle (.08); } \draw[opacity=.20,fill,fill opacity=.10] (2-12) circle (.08) (5-12) circle (.08); \end{tikzpicture} \end{document}