🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #4480

postscript back-slash escapes

#4480
From: paynter ann m.
Date: Wed, 16 Jan 1991 20:10
77 lines
2482 bytes
I am having trouble with PostScript when using certain escape sequences (\).
The ones that don't work for me are \b, \r, and \n.  Also, when I print a
multi-line string, it all ends up on one line.  I have looked in numerous
PostScript books (including pages 22 - 24 of the red book - possibly first
addition, copyright 1985).  I'd like to know if anyone else has had this
problem, and if so how it was solved.  Or, if anyone knows the solution to my
mystery.

Thanks in advance for the help!
      
The following is my file and the results.

MY POSTSCRIPT:

%!

/Courier findfont 12 scalefont setfont

%----- Translate Origin to Upper Left Corner -----
0 792 translate

%----- Translate Origin to Inside Corner of Margins -----
22.000000 -18.000000 translate

%----- End Page Initialization -----

43.200001 -72.000000 moveto
(This is testing \nthe back-slash n \nas a means of creating new lines)
show

43.200001 -110.000000 moveto
(This is testing 
the return 
as a means of creating new lines)
show

43.200001 -150.000000 moveto
(This is testing \rthe carriage return)
show

43.200001 -270.000000 moveto
(This is testing\
the return with a backslash\
as a means of connecting lines)
show

43.200001 -310.000000 moveto
(This is testing the occurance of a \backslash b in the string)
show

43.200001 -330.000000 moveto
(This is testing\nthe slash n\nas a means of creating new lines)
show

showpage


MY RESULTS:

This is testing  the back-slash n  as a means of creating new lines

This is testing  the return  as a means of creating new lines

This is testing  the carriage return

This is testingthe return with a backslashas a means of connecting lines

This is testing the occurance of a  ackslash b in the string

This is testing the slash n as a means of creating new lines




---------------------------------------------------------------------
ann paynter				paynter@ast.dsd.northorp.com 
---------------------------------------------------------------------
Technical Details
Message-ID: <663@ast.dsd.northrop.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!julius.cs.uiuc.edu!psuvax1!rutgers!mcdchg!ast!paynter

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!julius.cs.uiuc.edu!psuvax1!rutgers!mcdchg!ast!paynter
From: paynter@ast.dsd.northrop.com (paynter ann m.)
Newsgroups: comp.lang.postscript
Subject: postscript back-slash escapes
Message-ID: <663@ast.dsd.northrop.com>
Date: 16 Jan 91 20:10:15 GMT
Organization: Northrop ESD, Rolling Meadows, IL
Lines: 77