I am doing some work in LaTeX and I am using package musixtex but I don't know how to write some commands. This is model of notes that I need to transfer into LaTeX.
wanted.jpg (85.91 KiB) Viewed 15717 times
but there is five problems that I need to solve.
For the "align" of notes I need same length.
The number at the beginning of notes in red circle.
The underscore behind the text in green circle.
The symbol at the end of notes.
In the yellow rectangle I don't know how can I put "bar" symbol between two notes.
for now I have this:
have.jpg (110.7 KiB) Viewed 15717 times
I found some solution but it doesn´t work so I hope that somebody could help me with this.
bar numbers only at the beginning of a line can be achieved by calling \systemnumbers
lyrics are best set up loading and using the musixlyr extension; my example below should give you an idea how to use it. You'll see that in the lyrics there are - and _ used to indicate where a word must be broken or be extended to the next note.
one should delete the aux files ending mx1 and mx2 before finally typesetting the whole piece and then run pdflatex, musixflx and pdflatex on the file again to get proper alignment.
Thank you for your help but I have another problem. I rewrote my old code into LaTeX by using MusiXTeX package but I don´t know how can I write some notes or text of song to separated note line. It means that these two lines
15582906-note.jpg (25.24 KiB) Viewed 15671 times
I need merge into one line.
Thanks for your help.
Last edited by localghost on Mon Jan 14, 2013 9:51 pm, edited 1 time in total.
Can you please post a minimal working example, i.e., some code starting with \documentclass and ending with \end{document} that is compilable? Maybe you could simply post the code that you used to produce the image you posted?
Your image looks as if you haven't run »musixflx« on your document or have forgotten to delete the .mx1 and .mx2 files before doing so. Otherwise it would look like this:
musix1.png (13.65 KiB) Viewed 15664 times
You may have observed that the texts starts with the second instead of with the first note. The reason for this is the endofline in
If you want the whole piece in one line you can use \startextract and \endextract instead of \startpiece and \stoppiece. Beware that then the music line exceeds into the margin without warning. You might want to use the smallest music size and smaller margins then:
Ok, let's make this a little bit like a tutorial, just because I'm in the mood to.
First of all: as I understand it you're trying to typeset a whole piece and not a series of extracts. For this case \startextract and \endextract are the wrong choice. The whole piece should be placed inside \startpiece and \endpiece (or \stoppiece or the uppercase variants \Endpiece or \Stoppiece for the double bar that terminates a piece). (Using more that one of the ending commands will double the bar lines which is what causes your problem at the end of the piece.) The breaking into lines should be left to TeX or more precisely the program musixflx. Most of your problems will be solved following this rationale.
Creating a piece normally has the following routine. Suppose your main file is called mycoolmusic.tex. Now, after typing the piece you run pdflatex mycoolmusic as you would normally do. Additional to the usual mycoolmusic.aux and mycoolmusic.log files a file named mycoolmusic.mx1 is created. This file serves as input for musixflx. So you now have to run musixflx mycoolmusic. This will create an additional file named mycoolmusic.mx2. This serves as help file for the next latex run to get the right alignment and spacing. So you need to run pdflatex mycoolmusic another time.
If you now see that you have to change details of the piece you have go through this whole routine again. In order to get it right you should delete both mycoolmusic.mx1 and mycoolmusic.mx2 before doing so or you might observe strange displacements and the like.
Now, just like with LaTeX and normal text one sometimes has to help musixflx to get the line breaking right. Every \bar (\barre is an alias) is considered as potential break point. If you want to prohibit this for a certain \bar you can use \xbar instead. You can also insert a potential break point without creating a bar line with \zbar. If you want to force a line break you can use \alaligne (as equivalent to \bar) or \zalaligne (as equivalent to \zbar).
The next problem: I guess you want to insert some tempo information above the first bar. As you have noticed \qu{<pitch>} won't help here. Raising it with a box will at best lead to strange effects. Specifically \qu{p} creates a quarter note with a stem pointing up at pitch p. Pitch p corresponds to b'' which is exactly what you're getting. I'll present a better solution later using a combination of \metron, \Uptext and \qu. A little more on \qu{<pitch>} first. There are to siblings, \ql{<pitch>} which creates a quarter note with a lower stem and \qa{<pitch>} which creates a quarter note with automatic stem placement.
The \qu in \metron below unfortunately is not hidden from musixlyr. In order to get it ignored we have to remove the % I suggested in my last posting. So at the beginning we'll place something like
Hiding the system bar number at the beginning can be done via a conditional. In the following code I test if the number is 1. It will only be printed if otherwise:
Last but not least: it really is worth reading through the whole documentation of musixtex. Admittedly: it is rather long. Also, it is in English which is not perfect for us non-native speakers. And third, since musixtex is a generic package the syntax often is more plainTeX- than LaTeX-like. Nevertheless it pays off!
Finally, I have it. Big thanks cgnieder. I don´t understood how to create .mx2 file but I download "musixflx" and run .mx1 file with this musixflx and .mx2 file was created. Then when I start .tex file all was align like I need I have to make some details like title,autor but it wouldn´t be a problem. I read many pdf and another literature about musixtex and I found some useful commands which could helped me but I didn´t know how to used them so they didn´t worked and very often literature was very extensive for me as a beginner of Latex Thank you for your time and help.
Liben wrote:Finally, I have it. Big thanks cgnieder.
You're welcome!
Liben wrote:I don´t understood how to create .mx2 file but I download "musixflx" and run .mx1 file with this musixflx and .mx2 file was created.
I don't know which TeX distribution you're using but musixflx is part of TeX Live and of MiKTeX so I assumed you must have it installed already...
Liben wrote:I read many pdf and another literature about musixtex and I found some useful commands which could helped me but I didn´t know how to used them so they didn´t worked and very often literature was very extensive for me as a beginner of Latex Thank you for your time and help.
Well, at the beginning TeX and LaTeX and all the details can be quite confusing and it takes quite some time to learn good practices and the like. Just ask again if you have another question.