[CHANGESET] updated print.m
Benjamin Lindner
lindnerben at gmx.net
Sun May 24 03:12:53 CDT 2009
Ben Abbott wrote:
>
> On May 22, 2009, at 9:43 AM, Benjamin Lindner wrote:
>
>>> I've pushed this changeset. If anyone has trouble printing let me
>>> know (particularly on Windows).
>>
>> I did a check using print.m on mingw32 (not printing to hardware)
>> using this simple test sequence:
>>
>> plot(0:0.1:10, sin(0:0.1:10), "@-;sin;", 0:0.1:10, cos(0:0.1:10),
>> "@-;cos;");
>> print -depsc2 test.eps
>> print -dpsc2 test.ps
>> print -dpng test.png
>> print -demf test.emf
>> print -dpdf test.pdf
>>
>> and all work except the pdf output.
>>
>> I suggest the attached two changesets for the windows users:
>> 1) ensure that gnuplot_binary is quoted when used, because it may
>> contain spaces (this sadly happens quite frequently under windows).
>>
>> 2.a) in print.m, for the same reason, ensure that ghostscript_binary
>> is always quoted when used.
>> 2.b) use double quotes, since cmd.exe does not seem to understand
>> single quotes.
>> 2.c) the windows binary of ghostscript uses the environment variable
>> GSC as location for the console ghostscript binary. I added code in
>> print.m to test for %GSC% and use it, and default to "gswin32c"
>> otherwise.
>> 2.d) single-quote the output file name in gnuplot_drawnow.m to allow
>> for backslash file separators. Otherwise
>> print("-demf","t:\\temp\\test.emf") will not work, while
>> print("-demf","t:/temp/test.emf") works.
>>
>> With this I get working output for all 5 file formats.
>>
>> Somethig else I realized: gnuplot's pdfcairo terminal is not
>> recognized, so even while gnuplot has a direct pdf output terminal,
>> print.m uses the indirect way ps->pdf via ghostscript.
>>
>
> Ben,
>
> I tried to import your changesets using "hg import ..." and "patch -p1 <
> your.patch", but they do not apply for me.
>
> I assume there are some EOL problems ... which might be introduced by
> my email client.
>
> Can you resend them as attachements, and if you create them using "hg
> import ..." please include the hg header as well. Also John has
> committed a patch since you last pulled. That needs to be corrected as
> well.
>
Sorry, I mixed up changesets with mq patches.
I updated my 3.1.x repos and corrected my changes.
I have now attached the exported changesets.
benjamin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ghostscript-print-mingw.changeset
Url: https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20090524/9f9cf4e5/attachment.ksh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ensure-quoted-gnuplot-binary.changeset
Url: https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20090524/9f9cf4e5/attachment-0001.ksh
More information about the Octave-maintainers
mailing list