需要使用 Beamer 实现专业萨克斯手指记谱的 Musixtex 图表,当我尝试使用来自的代码模板时使用 Tikz 制作的专业萨克斯手指记谱法 Musixtex 图表,不知什么原因坐标错误,基本代码如下:
% !TeX program = txs:///arara
% arara: xelatex: {synctex: on, interaction: nonstopmode, shell: yes}
\documentclass[aspectratio=169]{beamer}
\usepackage[T1]{fontenc}
\usepackage{emerald}
\usepackage[spanish]{babel}
\usepackage{musicography}
\usepackage{musixtex}
\usepackage{multicol}
\usepackage{tikz}
\usepackage{float} %Paquete para posicionar Tablas
\usepackage{hyperref} %Referencias a las tablas
\usepackage{tabularx} %Tabla con ajuste de ancho
\usepackage{colortbl} %Color a tablas
\usepackage{xcolor}
\xdefinecolor{gray-undar}{RGB}{52,52,52}
\xdefinecolor{red-undar}{RGB}{179,35,79}
\begin{document}
\begin{frame}[fragile,t]
\frametitle{\LARGE Partes de una Partitura}
\begin{table}[H]
\caption{Registro grave}
\label{tab:RegistroGrave}
\begin{tikzpicture}
\node[rotate=0,transform shape,scale=0.7]{
\centering\centering\renewcommand*{\arraystretch}{1.1}
\begin{tabular}{!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}}
\arrayrulecolor{red-undar}\hline
\begin{music}
\parindent0mm
\setclef1\treble % Clave de Sol para el Instrumento 1
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\notes \en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \sh{a} \wh a \zcharnote{10}{\footnotesize \hspace*{-0.5cm} A\musSharp{}}
\sk\sk \fl{b} \wh b \zcharnote{10}{\footnotesize \hspace*{-0.55cm} B\musFlat{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \wh b \zcharnote{10}{\footnotesize \hspace*{-0.41cm} B}
\sk\sk \fl{c} \wh c \zcharnote{10}{\footnotesize \hspace*{-0.55cm} C\musFlat{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music}
& \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \wh c \zcharnote{10}{\footnotesize \hspace*{-0.4cm} C}
\sk\sk \sh{b} \wh b \zcharnote{10}{\footnotesize \hspace*{-0.55cm} B\musSharp{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \sh{c} \wh c \zcharnote{10}{\footnotesize \hspace*{-0.5cm} C\musSharp{}}
\sk\sk \fl{d} \wh d \zcharnote{10}{\footnotesize \hspace*{-0.55cm} D\musFlat{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
%\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
%\scale{0.45}
\NOtes \wh d \zcharnote{10}{\footnotesize \hspace*{-1.1cm} D}\en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \sh{d} \wh d \zcharnote{10}{\footnotesize \hspace*{-0.54cm} D\musSharp{}}
\sk\sk \fl{e} \wh e \zcharnote{10}{\footnotesize \hspace*{-0.55cm} E\musFlat{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \wh e \zcharnote{10}{\footnotesize \hspace*{-0.41cm} E}
\sk\sk \fl{f} \wh f \zcharnote{10}{\footnotesize \hspace*{-0.55cm} F\musFlat{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \wh f \zcharnote{10}{\footnotesize \hspace*{-0.41cm} F}
\sk\sk \sh{e} \wh e \zcharnote{10}{\footnotesize \hspace*{-0.55cm} E\musSharp{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music} \\
\arrayrulecolor{red-undar}\hline
\begin{tikzpicture}[scale=3.8]
%\node[anchor=south west,inner sep=0] (image) at (0,0) {
%};
\begin{scope}[x=3cm,y=1.3cm]
%\begin{scope}[xshift=0cm]
%Código para grillas
%\draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);
%\foreach \x in {0,1,...,9} { \node [anchor=north] at (\x/10,0) {0.\x}; }
%\foreach \y in {0,1,...,9} { \node [anchor=east] at (0,\y/10) {0.\y}; }
%Código para dibujar el Saxophone
\draw [fill=blue] (0.67,1.0) ellipse (0.04cm and 0.09cm);
\draw [fill=green] (0.685,0.95) ellipse (0.03cm and 0.13cm);
\draw [fill=green] (0.69,0.90) ellipse (0.03cm and 0.13cm);
\draw [fill=green] (0.68,0.85) ellipse (0.03cm and 0.13cm);
\draw [fill=blue] (0.67,0.9) circle[radius=0.08cm];
%\draw [fill=purple] (0.65,0.9) circle[radius=0.08cm];
\draw[fill=purple] (0.65,0.9) ++(-0.05cm,0.1cm) to[bend left] ++(0.1cm,-0.25cm) to[bend right] ++(-0.1cm,0.05cm) to[bend right] cycle;
\draw [fill=blue] (0.67,0.8) circle[radius=0.06cm];
\draw [fill=gray] (0.67,0.7) circle[radius=0.08cm];
\draw [fill=yellow] (0.67,0.6) circle[radius=0.08cm];
\draw [fill=yellow] (0.69,0.6) ellipse (0.1cm and 0.03cm);
\draw [fill=yellow,rounded corners=0.025cm] (0.683,0.54) rectangle (0.688,0.58);
\draw [fill=yellow,rounded corners=0.025cm] (0.690,0.54) rectangle (0.695,0.58);
\draw [fill=yellow] (0.69,0.52) ellipse (0.1cm and 0.03cm);
\draw[] (0.635,0.6) -- ++(0.07,-0.2);
\draw [fill=blue] (0.67,0.4) circle[radius=0.08cm];
\draw [fill=gray] (0.67,0.3) circle[radius=0.08cm];
\draw [fill=yellow] (0.67,0.2) circle[radius=0.08cm];
\draw [fill=gray] (0.65,0.2) ellipse (0.1cm and 0.05cm);
\draw [fill=green,rounded corners=0.025cm] (0.64,0.39) rectangle (0.645,0.44);
\draw [fill=green,rounded corners=0.025cm] (0.64,0.32) rectangle (0.645,0.37);
\draw [fill=green,rounded corners=0.025cm] (0.64,0.25) rectangle (0.645,0.3);
\draw [fill=gray,rounded corners=0.025cm] (0.655,0.25) rectangle (0.66,0.35);
\draw [fill=yellow,rounded corners=0.05cm] (0.64,0.15) rectangle (0.66,0.1);
\draw [fill=yellow,rounded corners=0.05cm] (0.64,0.08) rectangle (0.66,0.03);
\end{scope}
\end{tikzpicture} & & & & & & & & \\
\arrayrulecolor{red-undar}\hline
\end{tabular}
};
\end{tikzpicture}
\end{table}
\end{frame}
\end{document}
答案1
您可以调整第 123 行和第 126 行中的缩放比例,直到获得想要的结果(嵌套 tikzpictures 是一个非常糟糕的主意):
% !TeX program = txs:///arara
% arara: xelatex: {synctex: on, interaction: nonstopmode, shell: yes}
\documentclass[aspectratio=169,xcolor=table]{beamer}
\usepackage[T1]{fontenc}
\usepackage{emerald}
\usepackage[spanish]{babel}
\usepackage{musicography}
\usepackage{musixtex}
\usepackage{multicol}
\usepackage{tikz}
%\usepackage{float} %Paquete para posicionar Tablas
%\usepackage{hyperref} %Referencias a las tablas
\usepackage{tabularx} %Tabla con ajuste de ancho
%\usepackage{colortbl} %Color a tablas
%\usepackage{xcolor}
\xdefinecolor{gray-undar}{RGB}{52,52,52}
\xdefinecolor{red-undar}{RGB}{179,35,79}
\begin{document}
\begin{frame}[fragile,t]
\frametitle{\LARGE Partes de una Partitura}
\begin{table}%[H]
\caption{Registro grave}
\label{tab:RegistroGrave}
\scalebox{0.7}{%
% \begin{tikzpicture}
% \node[rotate=0,transform shape,scale=0.7]{
\centering\renewcommand*{\arraystretch}{1.1}
\begin{tabular}{!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}m{1.6cm}!{\color{red-undar}\vrule}}
\arrayrulecolor{red-undar}\hline
\begin{music}
\parindent0mm
\setclef1\treble % Clave de Sol para el Instrumento 1
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\notes \en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \sh{a} \wh a \zcharnote{10}{\footnotesize \hspace*{-0.5cm} A\musSharp{}}
\sk\sk \fl{b} \wh b \zcharnote{10}{\footnotesize \hspace*{-0.55cm} B\musFlat{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \wh b \zcharnote{10}{\footnotesize \hspace*{-0.41cm} B}
\sk\sk \fl{c} \wh c \zcharnote{10}{\footnotesize \hspace*{-0.55cm} C\musFlat{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music}
& \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \wh c \zcharnote{10}{\footnotesize \hspace*{-0.4cm} C}
\sk\sk \sh{b} \wh b \zcharnote{10}{\footnotesize \hspace*{-0.55cm} B\musSharp{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \sh{c} \wh c \zcharnote{10}{\footnotesize \hspace*{-0.5cm} C\musSharp{}}
\sk\sk \fl{d} \wh d \zcharnote{10}{\footnotesize \hspace*{-0.55cm} D\musFlat{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
%\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
%\scale{0.45}
\NOtes \wh d \zcharnote{10}{\footnotesize \hspace*{-1.1cm} D}\en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \sh{d} \wh d \zcharnote{10}{\footnotesize \hspace*{-0.54cm} D\musSharp{}}
\sk\sk \fl{e} \wh e \zcharnote{10}{\footnotesize \hspace*{-0.55cm} E\musFlat{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \wh e \zcharnote{10}{\footnotesize \hspace*{-0.41cm} E}
\sk\sk \fl{f} \wh f \zcharnote{10}{\footnotesize \hspace*{-0.55cm} F\musFlat{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music} & \begin{music}
\parindent0mm
\afterruleskip-7pt
\setclefsymbol1\empty
\nobarnumbers % Omite la numeración en los compases
\nostartrule % Inicia sin barra vertical
\startextract % Se inicia el fragmento musical
\scale{0.45}\notes \wh f \zcharnote{10}{\footnotesize \hspace*{-0.41cm} F}
\sk\sk \sh{e} \wh e \zcharnote{10}{\footnotesize \hspace*{-0.55cm} E\musSharp{}}\en
\zendextract % Se finaliza el fragmento musical
\end{music} \\
\arrayrulecolor{red-undar}\hline
\begin{tikzpicture}[scale=2]
%\node[anchor=south west,inner sep=0] (image) at (0,0) {
%};
\begin{scope}[x=12cm,y=1.8cm]
%\begin{scope}[xshift=0cm]
%Código para grillas
%\draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);
%\foreach \x in {0,1,...,9} { \node [anchor=north] at (\x/10,0) {0.\x}; }
%\foreach \y in {0,1,...,9} { \node [anchor=east] at (0,\y/10) {0.\y}; }
%Código para dibujar el Saxophone
\draw [fill=blue] (0.67,1.0) ellipse (0.04cm and 0.09cm);
\draw [fill=green] (0.685,0.95) ellipse (0.03cm and 0.13cm);
\draw [fill=green] (0.69,0.90) ellipse (0.03cm and 0.13cm);
\draw [fill=green] (0.68,0.85) ellipse (0.03cm and 0.13cm);
\draw [fill=blue] (0.67,0.9) circle[radius=0.08cm];
%\draw [fill=purple] (0.65,0.9) circle[radius=0.08cm];
\draw[fill=purple] (0.65,0.9) ++(-0.05cm,0.1cm) to[bend left] ++(0.1cm,-0.25cm) to[bend right] ++(-0.1cm,0.05cm) to[bend right] cycle;
\draw [fill=blue] (0.67,0.8) circle[radius=0.06cm];
\draw [fill=gray] (0.67,0.7) circle[radius=0.08cm];
\draw [fill=yellow] (0.67,0.6) circle[radius=0.08cm];
\draw [fill=yellow] (0.69,0.6) ellipse (0.1cm and 0.03cm);
\draw [fill=yellow,rounded corners=0.025cm] (0.683,0.54) rectangle (0.688,0.58);
\draw [fill=yellow,rounded corners=0.025cm] (0.690,0.54) rectangle (0.695,0.58);
\draw [fill=yellow] (0.69,0.52) ellipse (0.1cm and 0.03cm);
\draw[] (0.635,0.6) -- ++(0.07,-0.2);
\draw [fill=blue] (0.67,0.4) circle[radius=0.08cm];
\draw [fill=gray] (0.67,0.3) circle[radius=0.08cm];
\draw [fill=yellow] (0.67,0.2) circle[radius=0.08cm];
\draw [fill=gray] (0.65,0.2) ellipse (0.1cm and 0.05cm);
\draw [fill=green,rounded corners=0.025cm] (0.64,0.39) rectangle (0.645,0.44);
\draw [fill=green,rounded corners=0.025cm] (0.64,0.32) rectangle (0.645,0.37);
\draw [fill=green,rounded corners=0.025cm] (0.64,0.25) rectangle (0.645,0.3);
\draw [fill=gray,rounded corners=0.025cm] (0.655,0.25) rectangle (0.66,0.35);
\draw [fill=yellow,rounded corners=0.05cm] (0.64,0.15) rectangle (0.66,0.1);
\draw [fill=yellow,rounded corners=0.05cm] (0.64,0.08) rectangle (0.66,0.03);
\end{scope}
\end{tikzpicture} & & & & & & & & \\
\arrayrulecolor{red-undar}\hline
\end{tabular}
% };
% \end{tikzpicture}
}
\end{table}
\end{frame}
\end{document}