
我究竟做錯了什麼?只是為了澄清,我的困惑源於缺乏明顯的行號和位置,這些行號和位置會指向範例文件內發生錯誤的位置。
我從 p 借了一個 PMX bat 檔案。手冊的 11 部分Typesetting music with PMX, Version 2.821 / May 2013 by Cornelius C. Noack
並針對我的 MikTex 設定路徑進行了調整。
:::::::::::::::::::::::: runpmx.bat ::::::::::::::::::::::::
Call "D:\Program Files (x86)\MiKTeX 2.9\miktex\bin\pmxab.exe" %1.pmx
if errorlevel 1 goto pmxerr
if exist %1.pml del %1.pml
if exist %1.mx2 del %1.mx2
if exist %1.mx1 del %1.mx1
if exist pmxaerr.dat del pmxaerr.dat
::
Call "D:\Program Files (x86)\MiKTeX 2.9\miktex\bin\etex.exe" %1.tex
if errorlevel 1 goto texerr
::
Call "D:\Program Files (x86)\MiKTeX 2.9\miktex\bin\musixflx.exe" %1.mx1
::
Call "D:\Program Files (x86)\MiKTeX 2.9\miktex\bin\etex.exe" %1.tex
if errorlevel 1 goto texerr
if exist %1.log del %1.log
::
Call "D:\Program Files (x86)\MiKTeX 2.9\miktex\bin\dvips.exe" %1.dvi
if errorlevel 1 goto dvierr
if exist %1.log del %1.log
::
@rem Call C:\Programme\GhostScript\Ghostgum\gsview\gsview32.exe %1.ps
::
goto :end
:::::::::::::::::::
:: error exits :
::
:pmxerr
echo.
echo PMX has found errors when processing %1.pmx !
echo.
pause
goto :end
::
:texerr
echo.
echo TeX has found errors when processing %1.tex !
echo check %1.log for details.
echo.
pause
goto :end
::
:dvierr
echo.
echo *** dvips had errors ! ***
echo.
pause
::
:end
:::::::::::::::::::: end of runpmx.bat ::::::::::::::::::::
然後我從 p 複製/貼上了海頓樣本。將同一手冊的 14 個內容haydn.pmx
以 ANSI 編碼放入文件中:
F.J.\ Haydn, Quartet op.76, no.2, bars 1--4
PREAMBLE:
nstaves ninstr mtrnuml mtrdenl mtrnump mtrdenp
4 4 4 4 0 6
npickup nkeys
0 -1
npages nsystems musicsize fracindent
1 1 16 .08
Violoncello
Viola
Violin II
Violin I
batt
./
% BODY:
% HEADER:
Tc
F.J. Haydn
Tt
String Quartet op. 76, No.2
h
Allegro
Abep
w170m
% begin of music input -
% bar 1
d82 Df o. d+ o. d o. d o. r d o. d o. d o. /
f83 Df o. f o. f o. f o. r f o. f o. f o. /
r8 a83 Df o. a o. a o. r a o. a o. a o. /
a24 Df d- /
% bar 2
r8 d o. d o. d o. r e o. e o. e o. /
r8 g o. g o. g o. r g o. g o. g o. /
r8 b o. b o. b o. r cs o. c o. c o. /
e2 a- /
% bars 3-4
f8 s e f cs s d4 a | b2 s a4 s o. r Rb /
a2 t a4 t .cs- | d8 s e f d s e4 o. r /
d8 s cs d e s e s d c s a1+ s g s | f s g f e s d8 o. d o. cs4 r /
d8 s cs d e s g s f e s a | d4- zd+ cn1 s b a gs s a4 o. r /
% end of PMX source file
最後針對該樣本執行bat 檔案。這導致了以下錯誤:
I:\LaTeX\MusixTex\work>pmx.cmd haydn
I:\LaTeX\MusixTex\work>Call "D:\Program Files (x86)\MiKTeX 2.9\miktex\bin\pmxab.exe" haydn.pmx
This is PMX, Version 2.7 , 3 Apr 13
Opening haydn.pmx
Starting first PMX pass
forrtl: severe (64): input conversion error, unit -5, file Internal Formatted Read
I:\LaTeX\MusixTex\work>if errorlevel 1 goto pmxerr
I:\LaTeX\MusixTex\work>if exist haydn.pml del haydn.pml
I:\LaTeX\MusixTex\work>if exist haydn.mx2 del haydn.mx2
I:\LaTeX\MusixTex\work>if exist haydn.mx1 del haydn.mx1
I:\LaTeX\MusixTex\work>if exist pmxaerr.dat del pmxaerr.dat
I:\LaTeX\MusixTex\work>Call "D:\Program Files (x86)\MiKTeX 2.9\miktex\bin\etex.exe" haydn.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9)
entering extended mode
! I can't find file `haydn.tex'.
<*> haydn.tex
Please type another input file name:
! Emergency stop.
<*> haydn.tex
No pages of output.
Transcript written on texput.log.
Terminate batch job (Y/N)? y
該過程完成後,haydn.pml
將建立以下文件:
This is PMX, Version 2.7 , 3 Apr 13
Opening haydn.pmx
Starting first PMX pass
pmxaerr.dat
以及一個僅包含一行且0
後面有 5 個空格的檔案:
0
答案1
這個例子確實是錯誤的,它在前幾行缺少一些註解字元。期望pmx
在文件中看到的第一件事是數字列表,對應於變數nstaves
等。4 4 4 4 0 6
在此之前的所有行都需要用 註解掉,以和%
開頭的行也是如此。這是一個正確的文件及其輸出npickup
npages
% F.J.\ Haydn, Quartet op.76, no.2, bars 1--4
% PREAMBLE:
% nstaves ninstr mtrnuml mtrdenl mtrnump mtrdenp
4 4 4 4 0 6
% npickup nkeys
0 -1
% npages nsystems musicsize fracindent
1 1 16 .08
Violoncello
Viola
Violin II
Violin I
batt
./
% BODY:
% HEADER:
Tc
F.J. Haydn
Tt
String Quartet op. 76, No.2
h
Allegro
Abep
w170m
% begin of music input -
% bar 1
d82 Df o. d+ o. d o. d o. r d o. d o. d o. /
f83 Df o. f o. f o. f o. r f o. f o. f o. /
r8 a83 Df o. a o. a o. r a o. a o. a o. /
a24 Df d- /
% bar 2
r8 d o. d o. d o. r e o. e o. e o. /
r8 g o. g o. g o. r g o. g o. g o. /
r8 b o. b o. b o. r cs o. c o. c o. /
e2 a- /
% bars 3-4
f8 s e f cs s d4 a | b2 s a4 s o. r Rb /
a2 t a4 t .cs- | d8 s e f d s e4 o. r /
d8 s cs d e s e s d c s a1+ s g s | f s g f e s d8 o. d o. cs4 r /
d8 s cs d e s g s f e s a | d4- zd+ cn1 s b a gs s a4 o. r /
% end of PMX source file
我建議您聯繫教程的作者指出此錯誤。一般來說,如果pmx
文件和介紹性資料有一些非常簡短的簡單範例,人們可以先嘗試一下,就像 @darthbin 在評論中所要求的那樣,那就太好了。也許這樣的例子可能是
1 1 4 4 4 4 0 0
1 1 20 0.12
Violin
t
./
% Bars 1
c2 g4+ e /
% End of file
在哪裡
1 1 4 4 4 4 0 0
表示每個系統一名樂譜,一台樂器,4/4 拍子印為 4/4,拾音條和調號中的拍子為 0 0
,表示沒有升號或降號。 2號線
1 1 20 0.12
表示 1 頁有 1 個系統、音樂大小和第一個系統的20
縮排。 第 3 行是樂器的名稱,第 4 行表示它是高音譜號。該行表示將輸出放入目前目錄。最後是音樂小節,從最小的 C 開始,上升到 G chrochet,然後是 E chrochet。0.12
t
./
c2 g4+ e /
我的安裝(texlive)附帶一個命令pmx2pdf
,可以將其處理為pdf
檔案。