诵读五芒星需要用Beamer软件进行编码,基本代码如下:
\documentclass[aspectratio=169]{beamer}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage{musixtex}
\input{musixlyr}
\begin{document}
\begin{frame}[t,fragile]
\frametitle{?`Qué es \underline{Musixtex}?}
\begin{music}
\font\A=phvb8t at 10pt
\generalmeter{\meterC}
\parindent10mm
\instrumentnumber{2}
\setstaffs1{2}
\setclef16
\setclef2\treble
\setname1{\A Piano}
\setname2{\A Canto}
\setinterstaff{1}{13}%Dist. Sistemas
\nobarnumbers
\resetlyrics
\setlyrics{Letras}{Ma-nca so-lle-ci-ta pi\`u de-ll'u-sa-to, a-nco-rch\`e}
\setsongraise2{-1.8mm}
\startpiece\addspace\afterruleskip%
\A\assignlyrics2{Letras}
\znotes|\zchar{10}{\hspace*{-0.7cm}\A Adagio.}&\zchar{10}{\hspace*{-0.7cm}\A Adagio.}\en
\NOtes\hp|\islurd0c\hu{c}&\hu{c}\en
\NOtes\qp|\qu{d}&\qu{d}\en
\NOtes\isluru1P\ql{_P}|\tslur0{c}\zq{c}\qu{e}&\qu{e}\en\bar
%2do
\NOtes\ql{O}|\islurd2c\hl{c}\bsk\isluru3l\qu{f}&\qu{f}\en
\NOtes\ql{L}|\qu{g}&\qu{g}\en
\NOtes\tslur1{M}\ql{M}|\tslur2{c}\ql{c}\bsk\tslur3{n}\qu{h}&\qu{h}\en
\NOtes\qp|\qp&\qp\en\bar
%3er
\NOtes\hp|\islurd0d\hu{d}&\hu{d}\en
\NOtes\qp|\qu{e}&\qu{e}\en
\NOtes\isluru1Q\ql{Q}|\tslur0{d}\zq{d}\qu{^f}&\qu{^f}\en\bar
%4to
\NOtes\ql{_P}|\islurd2d\hl{d}\bsk\isluru3m\qu{g}&\beginmel\islurd0g\qu{g}\en
\NOtes\ql{^M}|\qu{h}&\tslur0{h}\endmel\qu{h}\en
\NOtes\tslur1{N}\ql{N}|\tslur2{d}\ql{d}\bsk\tslur3{o}\qu{_i}&\qu{_i}\en
\NOtes\qp|\qp&\qp\en\bar
%5to
\NOtes\qp|\zh{_i}\isluru0k\hl{k}&\hl{k}\en
\NOtes\isluru1L\ql{L}|&\en
\NOtes\ql{M}|\zq{h}\qu{j}&\ql{j}\en
\NOtes\tslur1{O}\qu{_I}|\tslur0{o}\zq{g}\qu{i}&\ql{_i}\en
\endpiece
\end{music}
\end{frame}
\end{document}
答案1
首先:您同时应该知道:请不要将问题的改进作为答案发布。
第二:MusixTeX 不喜欢括号后有空格。所以在我的回答中,我在括号后放置了准强制性的 %。据我所知,\centering
然后插入一个\hspace
是没有意义的。我停用了\centering
。我添加了一个积极的\hspace
。编译时,由于缩放,您应该收到一条错误消息,例如“框过满”。
在 XeLaTeX(在 TeXShop 中)和 musixflx 中进行编译,然后再次编译,此代码给出所附结果:
\documentclass[aspectratio=169]{beamer}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
%\usepackage{showframe}%
\usepackage{musixtex}%
\input{musixlyr}%
\usepackage{tikz}%
\usetikzlibrary{arrows.meta, calc, bending, decorations.markings}%
\begin{document}
\begin{frame}[t,fragile]%
\frametitle{?`Qué es \underline{Musixtex}?}%
%\centering
\begin{tikzpicture}
\node[anchor=south west,inner sep=0,scale=1] (image) at (0,0) {%
\hspace*{0.5cm}%
\begin{music}%
\font\A=phvb8t at 10pt
\font\B=phvb8t at 7pt
\generalmeter{\meterC}%
\parindent10mm
\instrumentnumber{2}%
\setstaffs1{2}%
\setclef16
\setclef2\treble
\setname1{\A Piano}%
\setname2{\A Canto}%
\setinterstaff{1}{13}%Dist. Sistemas
\nobarnumbers
\resetlyrics
\setlyrics{Letras}{Ma-nca so-lle-ci-ta pi\`u de-ll'u-sa-to, a-nco-rch\`e}%
\setsongraise2{-1.8mm}%
\startpiece\addspace\afterruleskip%
\B\assignlyrics2{Letras}%
\znotes|\zchar{10}{\hspace*{-0.7cm}\A Adagio.}&\zchar{10}{\hspace*{-0.7cm}\A Adagio.}\en
\NOtes\hp|\islurd0c\hu{c}&\hu{c}\en
\NOtes\qp|\qu{d}&\qu{d}\en
\NOtes\isluru1P\ql{_P}|\tslur0{c}\zq{c}\qu{e}&\qu{e}\en\bar
%2do
\NOtes\ql{O}|\islurd2c\hl{c}\bsk\isluru3l\qu{f}&\qu{f}\en
\NOtes\ql{L}|\qu{g}&\qu{g}\en
\NOtes\tslur1{M}\ql{M}|\tslur2{c}\ql{c}\bsk\tslur3{n}\qu{h}&\qu{h}\en
\NOtes\qp|\qp&\qp\en\bar
%3er
\NOtes\hp|\islurd0d\hu{d}&\hu{d}\en
\NOtes\qp|\qu{e}&\qu{e}\en
\NOtes\isluru1Q\ql{Q}|\tslur0{d}\zq{d}\qu{^f}&\qu{^f}\en\bar
%4to
\NOtes\ql{_P}|\islurd2d\hl{d}\bsk\isluru3m\qu{g}&\beginmel\islurd0g\qu{g}\en
\NOtes\ql{^M}|\qu{h}&\tslur0{h}\endmel\qu{h}\en
\NOtes\tslur1{N}\ql{N}|\tslur2{d}\ql{d}\bsk\tslur3{o}\qu{_i}&\qu{_i}\en
\NOtes\qp|\qp&\qp\en\bar
%5to
\NOtes\qp|\zh{_i}\isluru0k\hl{k}&\hl{k}\en
\NOtes\isluru1L\ql{L}|&\en
\NOtes\ql{M}|\zq{h}\qu{j}&\ql{j}\en
\NOtes\tslur1{O}\qu{_I}|\tslur0{o}\zq{g}\qu{i}&\ql{_i}\en
\endpiece%
\end{music}%
};%
\end{tikzpicture}%
%
\end{frame}
%
\end{document}
答案2
为了解决 Beamer 上的这个问题,我使用了 Tikz 包,如下所示:
\documentclass[aspectratio=169]{beamer}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage{musixtex}
\input{musixlyr}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, calc, bending, decorations.markings}
\begin{document}
\begin{frame}[t,fragile]
\frametitle{?`Qué es \underline{Musixtex}?}
\centering
\begin{tikzpicture}
\node[anchor=south west,inner sep=0,scale=1.1] (image) at (0,0) {
\hspace*{-0.6cm}\begin{music}
\font\A=phvb8t at 10pt
\font\B=phvb8t at 7pt
\generalmeter{\meterC}
\parindent10mm
\instrumentnumber{2}
\setstaffs1{2}
\setclef16
\setclef2\treble
\setname1{\A Piano}
\setname2{\A Canto}
\setinterstaff{1}{13}%Dist. Sistemas
\nobarnumbers
\resetlyrics
\setlyrics{Letras}{Ma-nca so-lle-ci-ta pi\`u de-ll'u-sa-to, a-nco-rch\`e}
\setsongraise2{-1.8mm}
\startpiece\addspace\afterruleskip%
\B\assignlyrics2{Letras}
\znotes|\zchar{10}{\hspace*{-0.7cm}\A Adagio.}&\zchar{10}{\hspace*{-0.7cm}\A Adagio.}\en
\NOtes\hp|\islurd0c\hu{c}&\hu{c}\en
\NOtes\qp|\qu{d}&\qu{d}\en
\NOtes\isluru1P\ql{_P}|\tslur0{c}\zq{c}\qu{e}&\qu{e}\en\bar
%2do
\NOtes\ql{O}|\islurd2c\hl{c}\bsk\isluru3l\qu{f}&\qu{f}\en
\NOtes\ql{L}|\qu{g}&\qu{g}\en
\NOtes\tslur1{M}\ql{M}|\tslur2{c}\ql{c}\bsk\tslur3{n}\qu{h}&\qu{h}\en
\NOtes\qp|\qp&\qp\en\bar
%3er
\NOtes\hp|\islurd0d\hu{d}&\hu{d}\en
\NOtes\qp|\qu{e}&\qu{e}\en
\NOtes\isluru1Q\ql{Q}|\tslur0{d}\zq{d}\qu{^f}&\qu{^f}\en\bar
%4to
\NOtes\ql{_P}|\islurd2d\hl{d}\bsk\isluru3m\qu{g}&\beginmel\islurd0g\qu{g}\en
\NOtes\ql{^M}|\qu{h}&\tslur0{h}\endmel\qu{h}\en
\NOtes\tslur1{N}\ql{N}|\tslur2{d}\ql{d}\bsk\tslur3{o}\qu{_i}&\qu{_i}\en
\NOtes\qp|\qp&\qp\en\bar
%5to
\NOtes\qp|\zh{_i}\isluru0k\hl{k}&\hl{k}\en
\NOtes\isluru1L\ql{L}|&\en
\NOtes\ql{M}|\zq{h}\qu{j}&\ql{j}\en
\NOtes\tslur1{O}\qu{_I}|\tslur0{o}\zq{g}\qu{i}&\ql{_i}\en
\endpiece
\end{music}
};
\end{tikzpicture}
\end{frame}
\end{document}
但是某种原因,在最后的栏目中有一个小小的空格……