## LaTeX forum ⇒ General ⇒ MusixTex: line breaking doesn't work

LaTeX specific issues not fitting into one of the other forums of this category.
Posts: 5
Joined: Mon Jul 18, 2016 7:48 pm

### MusixTex: line breaking doesn't work

Hi guys!

So I tried to use \alaligne today. Manual instructions are pretty straightforward: 'You can force a line or page break by replacing \bar with \alaligne or \alapage respectively'. But it just didn't work for me.

Here is my code:

\begin{music}\nostartrule\nobarnumbers\parindent0pt\generalmeter{\meterfrac44}\startextract\NOtes\zcharnote{16}{\textbf{2}}\qu{b}\en\NOtes\zcharnote{16}{\textbf{1}}\qu{a}\en\NOtes\zcharnote{16}{\textbf{4}}\qu{d}\en\NOtes\zcharnote{16}{\textbf{3}}\qu{c}\en\bar\NOtes\zcharnote{16}{\textbf{6}}\qu{f}\en\NOtes\zcharnote{16}{\textbf{5}}\qu{e}\en\NOtes\zcharnote{16}{\textbf{7}}\qu{g}\en\NOtes\zcharnote{16}{\textbf{8}}\qu{h}\en\alaligne\NOtes\zcharnote{16}{\textbf{7}}\qu{h}\en\NOtes\zcharnote{16}{\textbf{8}}\qu{g}\en\NOtes\zcharnote{16}{\textbf{6}}\qu{f}\en\NOtes\zcharnote{16}{\textbf{5}}\qu{e}\en\bar\NOtes\zcharnote{16}{\textbf{4}}\qu{d}\en\NOtes\zcharnote{16}{\textbf{3}}\qu{c}\en\NOtes\zcharnote{16}{\textbf{2}}\qu{b}\en\NOtes\zcharnote{16}{\textbf{1}}\qu{a}\en\endpiece\zendextract\end{music}\vspace{3mm}

I wanted to start a new line after two bars. But here's what I get:

Does anyone have any ideas about why is this happening?
Last edited by cgnieder on Wed Jul 20, 2016 12:09 pm, edited 1 time in total.

Tags:

cgnieder
Site Moderator
Posts: 1990
Joined: Sat Apr 16, 2011 7:27 pm
Did you run musixflx on your file?
site moderator & package author

Posts: 5
Joined: Mon Jul 18, 2016 7:48 pm
I believe I didn't.

How do I do that?

I'm using sharelatex.com.

cgnieder
Site Moderator
Posts: 1990
Joined: Sat Apr 16, 2011 7:27 pm
You run it on the command line, please refer to section 1.3 The three pass system of the musixtex manual.

I have no idea how to use it with ShareLaTeX, though.

Regards
site moderator & package author

Posts: 5
Joined: Mon Jul 18, 2016 7:48 pm
Thanks, cgnieder.

I've read about it in the manual, but I must confess that I have an extremely limited understanding of how this all works. It's good I've been able to achieve even this level)

But how would you do this if you needed to use musixflx? I've browsed the internet and read the manual, but I can't understand how to use musixflx. I suppose I have to run the .mx1 file through it. I've been able to export output.mx1 from sharelatex that contains my whole work. What do I do next?

Sorry for this rookie question. I wouldn't ask them if I didn't spend hours trying to get hold of it myself.

cgnieder
Site Moderator
Posts: 1990
Joined: Sat Apr 16, 2011 7:27 pm
Well, you open the command line and browse to your working directory. Then you type in
musixflx myfile

(supposing your tex file is called myfile.tex) hit enter and that's it. The program comes with your TeX distribution (MiKTeX or TeX Live) so it should already be installed.

Regards
site moderator & package author

Posts: 5
Joined: Mon Jul 18, 2016 7:48 pm
So, I've done all that. Downloaded Tex Live, processed my .tex file through the 3 pass system (pdflatex - musixflx - pdflatex).

And this is what I got:

On the left is the pdf file I got. On the right is the document compiled by sharelatex.com
It definitely had some effect, but something didn't go as planned. Besides continuing the lines after the last bar, it also aligned all the musical pieces to the right:

Do you have any idea where I went wrong?

cgnieder
Site Moderator
Posts: 1990
Joined: Sat Apr 16, 2011 7:27 pm
For centering stuff there is the {center} environment.

The continuing lines might be because you seem to end the music two times:
\endpiece\zendextract

I am not sure, though. I am no MusixTeX expert.

Regards
site moderator & package author

Posts: 5
Joined: Mon Jul 18, 2016 7:48 pm
Oh, God, it's finally working!

The problem was indeed in \startextract and \zendextract.
And also, I was running the three-pass system a little bit wrong.

I've got just final tiny question about all this. After running my file through the three pass system, the musical piece got all stretched to the whole page. And what's interesting musixflx did that, because after the first pdflatex, it looked exactly the same as the file compiled by sharelatex.

{center} environment doesn't have any effect. As well as \mulooseness.

I understand that you're probably fed up with me already, but maybe you can help me for this last time?

Thanks