3

I try to compile my score (prepared with MusiXTeX package) by following the three-pass system as described here (pt. 1.3). Accordingly, I run etex on my .tex file, then I run musixflx on the .mx1 file created in the previous step and then I run etex again. The problem is, it yields no result (I mean the pdf output remains unchanged). I think that it may have something to do with the fact that the .mx2 file produced by executing the second pass (running musixflx) seems to be empty. I use TeXStudio editor and TeXLive distribution.

Here's my MWE:

\documentclass[a4paper,12pt]{article}
\usepackage{musixtex,etex}

\begin{document} \begin{music} \nobarnumbers \setstaffs1{2} \setclef1\bass \generalsignature{-1}

    \startextract

        \notesp
        {\zql{`f}}\qu{`h} {\zql{f}}\qu{h} {\zql{f}}\qu{h} {\zw f}\isluru0i\hu{i*} \tslur0{'c}\hu{c*} \qu{`f*} \caesura
        \wh{f**} {\lql f}\qu{g} {\zql f}\qu{h} {\zhl f}\hu{i*} {\zwh f}\wh{i**}
        | 
        \qu{fff} {\lw f}\ibsluru0g\hu{g*} \tslur0h\hu{h*} \qu{f*} \caesura
        \wh{f**} {\lql f}\qu{g} {\zql f}\qu{h} {\zhl f}\hu{i*} {\zwh f}\wh{i**}
        \en\bar

        \notesp
        {\zwqq{c}}\wqq{`f****} {\zhu{i}}\hl{c*} {\zw{h}}\wh{f**}
        | 
        {\zwqq{f}}\wqq{h****} {\zhl{e}}\hu{g*} {\zw{d}}\wh{f**}
        \en
        \Endpiece

    \zendextract
\end{music}

\end{document}

Ingmar
  • 6,690
  • 5
  • 26
  • 47
A.P.
  • 31
  • Welcome to TeX.SE. Colud add, please, your \documentclass and the other packages? – Sebastiano Aug 23 '18 at 07:56
  • Sorry, I omitted them as I copied the code. I've just added it by editing the original post. – A.P. Aug 23 '18 at 08:53
  • If I run your example, the produced mx1 file contains just two lines: first line 83, second line * 0 0. Running musixflx with the d flag, I get the message “Corrupted apflx.mx1” (apflx is the file name I used for your example). – egreg Aug 23 '18 at 09:15
  • Thank you. There's apparently something wrong with my example - I tried processing this example: https://tex.stackexchange.com/questions/373446/musixtex-problem-with-format/373447#373447 with the three-pass system and it worked perfectly for me. At least I got to know I need to fix something in the example itself ;) – A.P. Aug 23 '18 at 09:29
  • You can compile your document via pdflatex document.tex... – Paul Gaborit Aug 23 '18 at 10:00
  • @A.P. Don't worry :-). – Sebastiano Aug 23 '18 at 19:36

2 Answers2

1

I tried your sample with latex musixflx and latex process, for me it seems the sample itself produces no .mx2 file.

The documentation says the best example is the documentation itself, why not you have a try?

Here, I attach to you a useful tool makefile, it could be super easy with command line.

# Author: c275633094@gmail.com
# Date: 05-04-2018
# MusiXTeX musixdoc tutorial example makefile
## First, set the main filename = YOUR_TEX_FILE_NAME_WITHOUT_.TEX
# $ make, to run commands in this file
# $ make read, to read the pdf file
# $ make clean, to clean the inter file

filename=YOUR_TEX_FILE_NAME

all:
    latex ${filename}
    musixflx ${filename}
    bibtex ${filename}||true
    latex ${filename}
    makeindex ${filename}
    latex ${filename}
    latex ${filename}
    dvips -e0 ${filename}
    ps2pdf ${filename}.ps

read:
    evince ${filename}.pdf &

oread:
    okular ${filename}.pdf

clean:
    -rm -f *.aux
    -rm -f *.ps
    -rm -f *.dvi
    -rm -f *.idx
    -rm -f *.ilg
    -rm -f *.ind
    -rm -f *.mx1
    -rm -f *.mx2
    -rm -f *.log
    -rm -f *.toc
    -rm -f *.bbl
    -rm -f *.blg
    -rm -f *.out
    -rm -f make/bib
0

I suggest to use the Visual Studio Code for just one click compile using latexmkrc file:

$xelatex = 'internal musixlatex %R %O %S';
push @generated_exts,"mx2";
push @generated_exts,"mx1";

sub musixlatex { my $root = shift;

Define root filename for the mx1 and mx2 files

Note that $aux_dir1 includes directory separator

and it equals $out_dir1 if only the out_dir is set.

my $mx = "$aux_dir1$root"; my @args = @_; if ( $pass{$rule} <= 1 ) { print "======= FIRST PASS: Deleting '$mx.mx2' =======\n"; unlink "$mx.mx2"; print "==== Generating '$mx.mx1' then '$mx.mx2' ===\n"; my $ret = system( "xelatex @args" ); if ($ret) { return $ret; } $ret = system( "musixflx $mx" ); if ($ret) { return $ret; } } return system( "xelatex @args" ); }

Also, I reconfigured your file as follow:

\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{polyglossia}
\setmainlanguage{spanish}

\usepackage{musixtex} \input{musixlyr} \input{musixlyr} \input {musixcho} \input {musixdat}%fecha \input {musixfll} \input {musixgre}%gregoriano \input {musixper}%percusión \input {musixppff} \input {musixstr} \input {musixvbm} % experimental vectorized beams \input {musixdbr} % lineas de barras punteadas, discontinuas y arbitrariamente discontinuas \input {musixbm} % compatibilidad garrapateas con ganchos o con barras \input {musixbbm} % compatibilidad semi garrapateas con ganchos o con barras

\begin{document} \begin{music} \nobarnumbers \setstaffs1{2} \setclef1\bass \generalsignature{-1} \startextract \notesp {\zql{f}}\qu{h} {\zql{f}}\qu{h} {\zql{f}}\qu{h} {\zw f}\isluru0i\hu{i} \tslur0{'c}\hu{c} \qu{`f} \caesura \wh{f} {\lql f}\qu{g} {\zql f}\qu{h} {\zhl f}\hu{i} {\zwh f}\wh{i} | \qu{fff} {\lw f}\ibsluru0g\hu{g} \tslur0h\hu{h} \qu{f*} \caesura \wh{f} {\lql f}\qu{g} {\zql f}\qu{h} {\zhl f}\hu{i} {\zwh f}\wh{i*} \en\bar

        \notesp
        {\zwqq{c}}\wqq{`f****} {\zhu{i}}\hl{c*} {\zw{h}}\wh{f**}
        | 
        {\zwqq{f}}\wqq{h****} {\zhl{e}}\hu{g*} {\zw{d}}\wh{f**}
        \setdoubleBAR\en\setdoubleBAR
    \endextract
\end{music}

\end{document}

The output is as follow:

output

ABV
  • 611