Document ClassesProblem with package abc

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
ChiNo
Posts: 5
Joined: Mon Nov 05, 2007 11:00 pm

Problem with package abc

Post by ChiNo »

Hi, I am using texniccenter and miktek distribution and I am trying to configure it to be able to compile abc music files within my latex file with the abc package,

I think I solve all the problems but the thing still doesn't work, meaning that there are still problems but I don't know where to look...
after runing once latex on the main file, it generats ps files, then it generates .eps figures and finally I should rerun latex on the .tex file again in order to obtain the final pdf file with the embeded eps figures (music sheets). The thing is that this last part does not work. Can someone help me please? I am completely lost!

-------------------- >>>The error looks like this

Runaway argument?
eps)]\setbox \z@ \hbox {\csname Ginclude@eps\endcsname {\Gin@base \Gin@ext \ETC
.
! File ended while scanning use of \Gread@parse@bb.
<inserted text>
\par
<*> tunebook-sample.tex

? x


--------------------- >>> here is the complete log file:

This is pdfeTeX, Version 3.141592-1.30.6-2.2 (MiKTeX 2.5) (preloaded format=latex 2007.11.5) 27 FEB 2008 22:13
entering extended mode
**tunebook-sample.tex
(tunebook-sample.tex
LaTeX2e <2005/12/01>
Babel <v3.8g> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, catalan, french, loaded.
("C:\Program Files\MiKTeX 2.5\tex\latex\base\article.cls"
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
("C:\Program Files\MiKTeX 2.5\tex\latex\base\size12.clo"
File: size12.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files\MiKTeX 2.5\tex\latex\abc\abc.sty"
Package: abc 2006/03/22 v1.0 Enrico Gregorio

("C:\Program Files\MiKTeX 2.5\tex\latex\tools\verbatim.sty"
Package: verbatim 2003/08/22 v1.5q LaTeX2e package for verbatim enhancements
\every@verbatim=\toks14
\verbatim@line=\toks15
\verbatim@in@stream=\read1
)
("C:\Program Files\MiKTeX 2.5\tex\latex\graphics\keyval.sty"
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks16
)
("C:\Program Files\MiKTeX 2.5\tex\latex\graphics\graphicx.sty"
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)

("C:\Program Files\MiKTeX 2.5\tex\latex\graphics\graphics.sty"
Package: graphics 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)

("C:\Program Files\MiKTeX 2.5\tex\latex\graphics\trig.sty"
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
("C:\Program Files\MiKTeX 2.5\tex\latex\00miktex\graphics.cfg"
File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
)
Package graphics Info: Driver file: dvips.def on input line 90.

("C:\Program Files\MiKTeX 2.5\tex\latex\graphics\dvips.def"
File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
("C:\Program Files\MiKTeX 2.5\tex\generic\oberdiek\ifpdf.sty"
Package: ifpdf 2007/12/12 v1.6 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in pdf mode not detected.
)
\abc@out=\write3
\abc@outsh=\write4
)
(tunebook-sample.aux)
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <20.74> on input line 18.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <14.4> on input line 18.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 18.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line 18.
(tunebook-sample.toc)
\tf@toc=\write5
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 26.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 26.
)
Runaway argument?
eps)]\setbox \z@ \hbox {\csname Ginclude@eps\endcsname {\Gin@base \Gin@ext \ETC
.
! File ended while scanning use of \Gread@parse@bb.
<inserted text>
\par
<*> tunebook-sample.tex

? x

Here is how much of TeX's memory you used:
697 strings out of 95378
7796 string characters out of 1186879
54238 words of memory out of 1056870
3855 multiletter control sequences out of 60000
9147 words of font info for 33 fonts, out of 1000000 for 2000
40 hyphenation exceptions out of 8191
32i,6n,21p,236b,221s stack positions out of 5000i,500n,10000p,200000b,32768s
No pages of output.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
ChiNo
Posts: 5
Joined: Mon Nov 05, 2007 11:00 pm

Re: Problem with package abc

Post by ChiNo »

Hi again,...

does none can help me on this?

I would be incredibly happy and grateful if someone could help me in setting up texniccenter to correctly compile files with the abc package.

I installed the abcm2ps but I don't know what extra options I should put in the build profile in order to work properly.
I can only use the noshelescape package option, and so I have to transform the abc files to eps myself. I would like to have everything integrated in TXC but I found no way of doing it :( . But I have still another problem, even if I create myself the eps files with a command line, when I latex again the file it will not see the eps files and thus not include them.

I am preparing a minimum example and a case by case description for the various choices of package options I have tried, and I will post everything here if you don't mind, but if someone has it running under windows, please tell me how you did it! :lol:

Thanks again,
Al.
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Re: Problem with package abc

Post by Juanjo »

I have tried to run the abc package with only a partial success. I'll coment this a bit.
First, one needs to activate the \write18 feature. So, in TXC, go to Build > Define output profiles... and choose a profile. There is a box with the following content: -interaction=nonstopmode "%pm".
Change it to -interaction=nonstopmode "%pm" -enable-write18
So, the shellescape option of the abc package can now be used. Since this is one of the default options, it is not necessary to specify it.

After that, I can compile and directly get the abc files and the corresponding ps files (thanks to abcm2ps). Then I run into problems. One has to choose a way to convert the ps files either with the ps2eps or ps2epsi programs. In MikTeX 2.7 I have only found ps2epsi. So I have to use the options ps2epsi or ps2epsidos of the abc package. However, the this package calls ps2epsi with a syntax that seems invalid. It has the form:

ps2epsi file.ps

However, the correct usage in the DOS console seems to be:

ps2epsi file.ps file.epi

or

ps2epsi file.ps file.epsi

In other words, it is mandatory to specify the output file.

I have tried to hack this in the package with no success. If I use the command line to get the epi files and then the pdf files through epstopdf, a new compilation of the tex file yields the correct document.

It is also possible to reduce the steps ps --> epi (or epsi or eps) --> pdf to only ps -->pdf by using the ps2pdf program. But in this case, I have not managed to get the pdf files at the correct size.

I'm sorry for being unable to provide a complete solution. Maybe you can try to contact the author of the abc package.
ChiNo
Posts: 5
Joined: Mon Nov 05, 2007 11:00 pm

Re: Problem with package abc

Post by ChiNo »

Wow!
thank you very much for your efforts,

I hadn't been able to get the write18 thing working under TXC (didn't know where and how to put the option) so I forgot about this and tried instead to configure texniccenter postprocessors or custom buttons to run the shell script that abc package generates when in noshellescape mode, but I didn't succeed even when I tried to get ps2eps and install it (a perl script for wich I had to install a perl interpreter :S).
In the end I was able to create a button that run the shell script with the cygwin bash, but was unable to get the ps2eps work or any other so I had no eps or pdf files for latex to take...

I will try to repeat what you describe and see if playing with it I can improve it any further (i doubt that :P )

And if anyone else want to join us in the quest, you are very welcome ;)

Thanks again!
Al.
PS: Yeah, probably if I don't get it running properly in some time I'll try to contact the author. But I have the feeling that this package has been created and tested under linux (note that the script I was talking about before is .sh, that's why I had to use cygwin...), and I don't know if this can bring any basic incompatibilities :S.
ChiNo
Posts: 5
Joined: Mon Nov 05, 2007 11:00 pm

Re: Problem with package abc

Post by ChiNo »

Hi again,

It worked for me!!!
I wrote the option as you told (I tried the option at first long time ago but It didn't work the first time,... I don't know why)
Now it works, it generates the .ps, AND ALSO THE EPS!!! (probably because in my previous trials I installed the ps2eps perl script in so many directories, installed the perl interpreter, and added so many directory paths to the path environment variable that one of them must lead abcm2ps to the right thing :D)
That means that after only one tex run I have the pdf file with the compiled and included music sheets...

Thanks very much for your help and sorry about not being more specific about what did I install before asking for help,... I can look closer into the directories I touched if you are curious though,... I will of course try to work it out if anybody else is having the same problem.

Thanks again,
Al.
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Problem with package abc

Post by Juanjo »

ChiNo wrote:Hi again,

It worked for me!!!
I'm very glad to read that.
ChiNo wrote: I can look closer into the directories I touched if you are curious though,... I will of course try to work it out if anybody else is having the same problem.
I 've managed to make it work in Mac OS X, which is the operating system I primarily use, and also in Kubuntu. But perhaps you may post more detail instructions to help other Windows users.

Thanks to this thread I've known a bit about the ABC system to write music. So thanks to you for bringing this to my attention.
Post Reply