我想从 musixtex 的 Tablature 记谱系统中受益。不幸的是,数字显示为方块。
\documentclass{article}
\usepackage{musixtex}
\begin{document}
\begin{music}
\Largemusicsize
\setlines16
\setstaffs1{1}
\setclefsymbol1{\tabclef}
\nobarnumbers
\let\extractline\leftline
\startextract
\Notes \tab{5}{3} \tab{4}{0} \tab{4}{2} \en
\bar
\Notes \tab{4}{3} \tab{3}{0} \tab{3}{2} \en
\bar
\Notes \tab{2}{0} \tab{3}{2} \tab{2}{0} \en
\endextract
\end{music}
\end{document}
将编译如下
我究竟做错了什么??
答案1
我希望回答我的解决方案还不算太晚。和约翰一样,我也遇到了同样的问题。但我也把musixtex
和songs
包混在一起了。似乎用编译不起作用pdflatex
,但用编译起作用latex
。这是我的music.tex
示例代码:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[spanish]{babel}
\usepackage{geometry}
\usepackage[chorded]{songs}
\usepackage{musixtex}
\usepackage{graphicx}
\usepackage{etex}
% for "songs" package
\noversenumbers
% \songcolumns{2}
\begin{document}
\renewcommand{\lyricfont}{\small}
\renewcommand{\printchord}{\it\small}
\afterpreludeskip=-18pt
\beforepostludeskip=-8pt
\songsection{Canciones para Guitarra}
\begin{songs}{}
\beginsong{Sin tu latido}[by={\small Fernando delgadillo},
cr={Powered by LaTeX and Songs & MusiXTeX packages, transcribed in 2020}]
% From "musixtex" package
% Some guitar tablature notation:
\begin{music}
\smallmusicsize
\instrumentnumber{1}
\setclefsymbol1{\small\tabclef} % and a TAB clef
\setstaffs1{1}
\nobarnumbers
\setname1{\tabstringfnt\baselineskip=1.5\internote%
\vbox{
\hbox to\parindent{\hss e\hss}%
\hbox to\parindent{\hss B\hss}%
\hbox to\parindent{\hss G\hss}%
\hbox to\parindent{\hss D\hss}%
\hbox to\parindent{\hss A\hss}%
\hbox to\parindent{\hss E\hss}}}
% \let\extractline\leftline % left aligned
% \generalmeter{\meterC} % Puts the metric type in the tablature diagram
\startextract
\notes \tab{4}{3} \tab{3}{0} \tab{3}{2}\en
\bar
\notes \tab{2}{0} \tab{3}{2} \tab{2}{0}\en
\bar
\notes \tab{2}{1} \qp \qp\en
\endextract
\end{music}
% From "songs" package
% Some chords diagrams:
\gtab{A}{1:X02220} \gtab{E}{1:022100} \gtab{D}{1:XX2320}
\gtab{Bm}{1:X(24432)} \gtab{C#m}{4:X(13321)} \gtab{E7}
{1:020100} \gtab{Bm7}{1:X(24232)} \gtab{F}{1:(133211)}
% Some lyrics:
\beginverse\newchords{verso}\memorize[verso]
\[A]Hay algunos que d\[E]icen
bla bla bla...
\endverse
\beginverse\newchords{estribillo}\memorize[estribillo]
Ay, amor \[Bm]mío, \[C#m] qué terriblemente abs\[E7]urdo es estar v\[A]ivo, bla bla bla..
\endverse
\beginverse
{\nolyrics Final chords: \[A] \[Bm7] \[A] \[D] \[F] \[A]}
\endverse
\endsong
\end{songs}
\end{document}
为了正确编译并获得 pdf 输出,我从控制台运行以下命令:
latex music.tex
dvips music.dvi
ps2pdf music.ps
我在 Windows 10 中使用 MikTeX (v2.9.62) 和 TeXMaker (v5.0.3),但我制作了一个简单的musixcompiler.bat
批处理文件以加快进程并删除辅助文件,这样我就可以从控制台 > 运行musixcompiler.bat music.tex
(两个文件必须位于同一个文件夹中)。
musixcompiler.bat
@echo off
cls
echo MusiXTeX Compiling
latex %1.tex
dvips %1.dvi
ps2pdf %1.ps
DEL /F /Q *.mx1
DEL /F /Q *.dvi
DEL /F /Q *.ps
DEL /F /Q *.log
DEL /F /Q *.aux
echo Finished!!!!
希望对你有帮助。这是我的结果:
答案2
我将示例保存为 test.ltx 并执行
musixtex 测试.ltx
并且运行良好。所以我认为你没有正确“编译”。