\input texinfo @c -*-texinfo-*- @tex \input defs @end tex @c %**start of header @setfilename FAQ @settitle FAQ @c %**end of header @c @c Un-comment this if you want A4 output @c @c @afourpaper @node Top, , , (dir) @chapter SM's Frequently Asked Questions @menu * Coloured Postscript:: How do I generate coloured postscript plots? * Mac:: Is SM available for macs? * PC:: Is SM available for PCs? * input:: Why does @code{x != y} fail if I @code{input} a file? * reference:: How Should I Refer to SM in a Paper? @end menu @node Coloured Postscript, , Mac, Top @subsection How do I generate coloured postscript plots? One frequent problem that people meet is that they generate beautiful colour postscript plots, but when they send them to their colour postscript printer they come out in black and white. This is due to the the printer lying to SM when asked politely, ``do you know about colour?''. The question that SM asks has changed in version 2.3.28, and should be more robust. Fortunately it's easily worked around. Here's the procedure: Generate a colour postscript file; with modern SMs that's any postscript file (e.g. device postfile). Now look at it with e.g. ghostview --- is it coloured? If so, good. If not, this answer won't solve your problem; you probably have an old version of SM. Now print it on your coloured printer. Is it coloured? I'd guess not, judging from the fact that you are reading this. What should you do? You have two options; either @enumerate @item Edit the file to make it coloured whatever the printer may claim to support. How to do this depends on what version of SM you have. If your version is newer than 2.3.27, you can do this with the (unix) command @example sed -e 's/processcolors where/sub where/' -e 's/processcolors/2/' file.ps > file.colour.ps @end example If your version is 2.3.27 or older, the command is @example sed -e 's/processcolors known/sub known/' -e 's/processcolors/2/' file.ps > file.colour.ps @end example You might consider either updating SM, or adding the following entries to your local graphcap file: @example postscript|POSTSCRIPT:SM 2.4 coloured postscript:\ :OY=/SET_COLOUR statusdict begin /processcolors where\n\ ' @{pop processcolors 1 gt@} @{false@} ifelse\n\ ' @{'(setrgbcolor')@} @{'(pop pop pop')@} ifelse cvx end def\n:\ :TC=postscript: postland|POSTLAND:SM 2.4 Coloured postscript to a landscape file:\ :OY=/SET_COLOUR statusdict begin /processcolors where\n\ ' @{pop processcolors 1 gt@} @{false@} ifelse\n\ ' @{'(setrgbcolor')@} @{'(pop pop pop')@} ifelse cvx end def\n:\ :TC=postland: postport|POSTPORT:SM 2.4 Coloured postscript to a portrait file:\ :OY=/SET_COLOUR statusdict begin /processcolors where\n\ ' @{pop processcolors 1 gt@} @{false@} ifelse\n\ ' @{'(setrgbcolor')@} @{'(pop pop pop')@} ifelse cvx end def\n:\ :TC=postport: @end example @item Add graphcap devices to your graphcap.local that look like: @example postfile_colour|postfile_color:Coloured postscript to a file:\ :OY=/SET_COLOUR @{ setrgbcolor @} def\n:\ :TC=postfile: postlandfile_colour|postlandfile_color:Coloured postscript to a landscape file:\ :OY=/SET_COLOUR @{ setrgbcolor @} def\n:\ :TC=postlandfile: postportfile_colour|postportfile_color:Coloured postscript to a portrait file:\ :OY=/SET_COLOUR @{ setrgbcolor @} def\n:\ :TC=postportfile: @end example @end enumerate @node Mac, Coloured Postscript, PC, Top @subsection Is SM available for macs? It wouldn't be too hard to port SM to run on a mac, and there are persistent rumours that the port has been done, but I've never seen it myself. I don't have a mac, and don't want one, so I'm not going to do it myself, but if you want to cover yourself in glory send me the patches and you'll get a Personal Lifetime SM license, and a tee shirt if ever I get around to actually printing some. @node PC, Mac, input, Top @subsection Is SM available for PCs? SM runs fine on PCs running linux, of course, so I imagine that you want to know about machines running dos/windows 3.1. We have built SM on both dos and windows (but not windows 95 as we don't have such a machine), but the ports are not of very high quality. The standard source code is used, so anyone wanting to work on the device drivers is welcome to do so... We currently make available executable for both platforms from the Usual Place. @node input, PC, reference, Top @subsection Why does @code{x != y} fail if I @code{input} a file? If you have the file: @example define z 1 if($z != 2) @{ echo hello @} @end example and try to @code{input} it, you get a syntax error: @example : input test.sm Syntax error at "\n" in macro input if ( 1 \n ^^ @end example The problem lies in the macro @code{input}. If you say @code{help input} you'll see the comment @code{read and execute a Mongo (not SM) file}, and the main body contains the command @code{READ OLD}; i.e. it reads files intended for John Tonry's mongo, not SM at all. @emph{And} Mongo used ! as a comment character. Hence the problem. There are two solutions: you can recompile SM not to recognise ! as a comment in @code{READ OLD} (edit @file{options.h}), or you can use the command @code{read_new}. If you get tired of typing @code{input_new}, you can redefine input; this is most easily done by a line like @example input # don't use OLD MONGO when inputting commands input_new @end example @noindent in the file @code{$macro2/default} (where @code{macro2} is set in your @file{.sm} file). @node reference, input, , Top @subsection How Should I Refer to SM in a Paper? We are sometimes asked how to refer to SM in a published paper. The best answer is that you should be sure to call it SM, and if you want to include it in your references, use @example The SM Reference Manual, Robert H. Lupton and Patricia Monger (1997). (URL: http://www.astro.princeton.edu/~rhl/sm/sm.html) @end example @bye