Document Classesabc music package (again)

Information and discussion about specific document classes and how to create your own document classes.
User avatar
LaTeXitty
Posts: 21
Joined: Mon Jan 12, 2009 11:13 pm

abc music package (again)

Post by LaTeXitty »

I had a look to see if anyone had encountered the same problem previously, and found ChiNo's thread which looks like a similar problem, but since I'm using TexNic Center 1.0 rather than the previous beta release I'm not sure if the same resolution would help.

If I post the output log, can somebody please help me? (I have extracted the lines which I think are the root of the problem)

Code: Select all

Package abc Warning: You have set the `shellescape' option, but you ran
(abc)                (pdf)latex without the `-shell-escape' command line
(abc)                option. Fix it either with the `noshellescape' option
(abc)                in your document or the correct call of (pdf)latex.
Thank you.
Attachments
LaTeX1.log
The according log file
(8.1 KiB) Downloaded 376 times
WindowsME / MikTeX 2.7 / TeXnic Center 1.0
You're right, David. That's exactly what I have. - All the time in the world!... ever since we were all together five days ago, the last day of Eighteen Hundred Ninety Nine.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

abc music package (again)

Post by localghost »

Obviously you did something wrong in calling the compiler. Make sure you add the right command line arguments in the according build profile of TeXnicCenter (TXC).

Code: Select all

pdflatex --enable-write18 -interaction=nonstopmode "%pm"
Juanjo gave exactly the same hint in the mentioned topic.


Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
User avatar
LaTeXitty
Posts: 21
Joined: Mon Jan 12, 2009 11:13 pm

abc music package (again)

Post by LaTeXitty »

I'm sorry localghost. I'm trying to make sense of this, but now LaTeX tells me it doesn't recognize the external utilities:
  • abcm2ps
  • ps2eps
  • abcm2ps
:cry:
and it's still throwing the same warning I originally highlighted.

BTW thank you for the kind welcome! 8-)
WindowsME / MikTeX 2.7 / TeXnic Center 1.0
You're right, David. That's exactly what I have. - All the time in the world!... ever since we were all together five days ago, the last day of Eighteen Hundred Ninety Nine.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

abc music package (again)

Post by localghost »

I did some research and browsed the manual of the abc package. You will find some explanations there. But things will become a little bit complicated since the demanded software is not part of the MiKTeX distribution. You can find abcm2ps on its homepage [1]. The ps2eps Perl script can be found on CTAN. I will try to work out some kind of recipe to make it work.

[1] The ABC Plus project
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
User avatar
LaTeXitty
Posts: 21
Joined: Mon Jan 12, 2009 11:13 pm

abc music package (again)

Post by LaTeXitty »

The story so far...
I have installed
  • abcm2ps
  • perl
  • ps2eps perl script
I have checked that the system can find abcm2ps and perl using the DOS console

The good news is that the postscript images for the music have been generated (but not included in the final document)

After abcm2ps reports:
Output written on poll.ps
Input files: -
Processing: -
Calculating Bounding Box...'gswin32c' is not recognized as an internal or external command, operable program or batch file.
Error: could not determine bounding box!

The bad news is that I am still getting a message from TexNic Center that it can't find the ps2eps script, and a curious, not-very-helpful error message:

Cannot execute the command :(

Plus of course, the -shell-escape thing remains unresolved.
Attachments
LaTeX1.log
latest output log
(8.29 KiB) Downloaded 530 times
WindowsME / MikTeX 2.7 / TeXnic Center 1.0
You're right, David. That's exactly what I have. - All the time in the world!... ever since we were all together five days ago, the last day of Eighteen Hundred Ninety Nine.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

abc music package (again)

Post by localghost »

Very good. Now that you have done most of the work on your own, it seems that we are only a few steps away from getting it working.

Until now, we didn't talk about Ghostscript. If not done yet, install it. This is the executable gwin32c.exe that is demanded by abcm2ps. It is responsible for the conversion of the images from PS to PDF.

Concerning the ps2eps script, you didn't write where you saved it. I suggest to create the directory ps2eps in the path

Code: Select all

C:\Program Files\MiKTeX 2.7\scripts
and move the script into that new directory. Don't forget to refresh the file name database (Start -> Programs -> MikTeX -> Settings). In the case all has been done right, it should work now. In the other case I'm sure we will meet here again.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
User avatar
LaTeXitty
Posts: 21
Joined: Mon Jan 12, 2009 11:13 pm

Re: abc music package (again)

Post by LaTeXitty »

I checked, and gswin32c and gswin32 are present in C:/program files/gs/bin (I thought it was installed as part of the MikTex installation?)

PATH=C:\Program files\MiKTeX 2.7\miktex\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\strawberry\c\bin;C:\strawberry\perl\bin

Do I need to edit the PATH variable to point to the gswin32c directory as well? or is the solution more complex than that?
WindowsME / MikTeX 2.7 / TeXnic Center 1.0
You're right, David. That's exactly what I have. - All the time in the world!... ever since we were all together five days ago, the last day of Eighteen Hundred Ninety Nine.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

abc music package (again)

Post by localghost »

LaTeXitty wrote: Do I need to edit the PATH variable to point to the gswin32c directory as well? [...]
That's what I would also suggest. Add the path you mentioned to the PATH environment variable.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
User avatar
LaTeXitty
Posts: 21
Joined: Mon Jan 12, 2009 11:13 pm

abc music package (again)

Post by LaTeXitty »

Woe is me! Having added the gswin32c directory to the PATH environment variable, the situation remains unchanged.

Also, having verified that the postscript files are being generated there are two things I need to check:
  • Postscript file format
    the log says: could not identify begin of postscript code in file -, please check header line!
    First line should start with %!. No output generated.
    The postscript file does in fact begin with %!PS-Adobe-2.0 , followed by 7 lines of commentary (starting %% ...) then a blank newline followed by %%BeginSetup
    It's been a long time since I studied Postscript, but it suggests to me that the interpreter is not waiting to reach the %EOF command, and is trying to start a new file after the blank line.
  • I tried invoking ps2eps on the command line using both -h and --help options (remember, this is Vista, not Linux/Unix) but ps2eps doesn't seem to have any help option.
Your help is very much appreciated. Thank you.
WindowsME / MikTeX 2.7 / TeXnic Center 1.0
You're right, David. That's exactly what I have. - All the time in the world!... ever since we were all together five days ago, the last day of Eighteen Hundred Ninety Nine.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

abc music package (again)

Post by localghost »

LaTeXitty wrote:Woe is me! Having added the gswin32c directory to the PATH environment variable, the situation remains unchanged. [...]
A restart of the system might be necessary to accept the modifications.
LaTeXitty wrote:[...] I tried invoking ps2eps on the command line using both -h and --help options (remember, this is Vista, not Linux/Unix) but ps2eps doesn't seem to have any help option. [...]
Since this is a Perl script, functionality is not depending on the operating system. I typed ps2eps --help in a shell on my Linux system² and got the following output.

Code: Select all

thorsten@localghost:~> ps2eps --help
ps2eps - convert PostScript to EPS (Encapsulated PostScript) files
(C)opyright 1998-2006 Roland Bless

Version: 1.61
Operation:
 Without any argument, ps2eps reads from standard input
 and writes to standard output.
 If filenames are given as arguments they are processed
 one by one and output files are written to filenames
 with extension '.eps'. If input filenames have the extension
 '.ps' or '.prn', this extension is replaced with '.eps'.
 In all other cases '.eps' is appended to the input filename.
 Please note that PostScript files for input should contain
 only one single page.

 If BoundingBox in output seems to be wrong, please try options --size or --ignoreBB.

Syntax:
 ps2eps [-f] [-q] [-N] [-O] [-n] [-P] [-c] [-C] [-m] [-B] [-E] [-s <pagedim>] [-R +|-|^] [-t <x,y>] [-l] [-g] [-d] [-H] [-h|--help] [-g] [-W] [-L] [-V|--version] [--] [psfile1] [psfile2] [...]
Options:
 -f, --force                force overwriting existing files
 -q, --quiet                quiet operation (no output while processing files)
 -N, --noinsert             do not insert any postscript code
 -O, --preserveorientation  do not filter Orientation: header comment
 -n, --nofix                do not try to fix postscript code
 -P, --removepreview        remove preview image (smaller file, but no preview)
 -F, --fixps                fix postscript code unconditionally
 -c, --comments             preserve document structure comments
 -C, --clip                 insert postscript code for clipping
 -m, --mono                 use black/white bitmap as base for calculation
 -s, --size=<pagedim>       page size (a0-a10,letter,...) or in format XxY[cm|in] (default:cm), where X and Y are numbers
                            use --size=list to list pre-defined page sizes
 -R, --rotate=<direction>   rotate resulting EPS. <direction>: +=+90 (clockw.),-=-90 (counter-clockw.) ^=180 degrees
 -t, --translate            specify x,y offset (may be negative) in postscript points (1/72 dpi)
 -r, --resolution           specify dpi resolution to render with ghostscript (default 144) -l, --loose                expand the original bounding box by one point in each direction
 -B, --ignoreBB             do not use existing bounding box as page size for rendering
 -E, --ignoreEOF            do not use %%EOF as hint for end of file
 -g, --gsbbox               use internal bbox device of ghostscript
 -H, --no-hires             do not use a HiResBoundingBox
 -h, --help                 help information
 -L, --license              show licensing information
 -V, --version              show version information
 -d, --debuggs              show ghostscript call
 -W, --warnings             show warnings about sanity of generated eps file
 --     all following arguments are treated as files
        (allows filenames starting with -)

Arguments:
 One or more names of PostScript files for input

Author: Roland Bless (roland@bless.de)
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply