9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] mpictures and ms: text before is gone
@ 2008-04-26 22:34 Pietro Gagliardi
  2008-04-27 16:43 ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Pietro Gagliardi @ 2008-04-26 22:34 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello. I decided to take advantage of mpicture's wrapping text.
However, when I do so, the text before the picture and the wrapped
text disappears, leaving space. I tried prefixing with .fl to flush
everything, but to no avail. What's going on?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] mpictures and ms: text before is gone
  2008-04-26 22:34 [9fans] mpictures and ms: text before is gone Pietro Gagliardi
@ 2008-04-27 16:43 ` Russ Cox
  2008-04-27 20:54   ` Pietro Gagliardi
  0 siblings, 1 reply; 6+ messages in thread
From: Russ Cox @ 2008-04-27 16:43 UTC (permalink / raw)
  To: 9fans

> Hello. I decided to take advantage of mpicture's wrapping text.
> However, when I do so, the text before the picture and the wrapped
> text disappears, leaving space. I tried prefixing with .fl to flush
> everything, but to no avail. What's going on?

"I did something and it doesn't work.  Why?"
is far less useful than a detailed concrete example.
For example, narrow the broken file down to
ten lines or so of troff and a small EPS file
and then post that.

My first guess would be that your EPS file is
non-conforming and is covering all the
text that came before it, even outside the
bounding box.  But it's hard to say anything
without details.

Russ



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] mpictures and ms: text before is gone
  2008-04-27 16:43 ` Russ Cox
@ 2008-04-27 20:54   ` Pietro Gagliardi
  2008-04-28  8:32     ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Pietro Gagliardi @ 2008-04-27 20:54 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

/n/sources/contrib/pietro/saturn.tar has an example of what I mean.

	troff -ms -mpictures tmac.colors saturnhd.ms history.ms

On Apr 27, 2008, at 12:43 PM, Russ Cox wrote:

>> Hello. I decided to take advantage of mpicture's wrapping text.
>> However, when I do so, the text before the picture and the wrapped
>> text disappears, leaving space. I tried prefixing with .fl to flush
>> everything, but to no avail. What's going on?
>
> "I did something and it doesn't work.  Why?"
> is far less useful than a detailed concrete example.
> For example, narrow the broken file down to
> ten lines or so of troff and a small EPS file
> and then post that.
>
> My first guess would be that your EPS file is
> non-conforming and is covering all the
> text that came before it, even outside the
> bounding box.  But it's hard to say anything
> without details.
>
> Russ
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] mpictures and ms: text before is gone
  2008-04-27 20:54   ` Pietro Gagliardi
@ 2008-04-28  8:32     ` Russ Cox
  2008-04-28 10:14       ` Pietro Gagliardi
  0 siblings, 1 reply; 6+ messages in thread
From: Russ Cox @ 2008-04-28  8:32 UTC (permalink / raw)
  To: 9fans

> /n/sources/contrib/pietro/saturn.tar has an example of what I mean.
>
> 	troff -ms -mpictures tmac.colors saturnhd.ms history.ms

cpu% tar xf /n/sources/contrib/pietro/saturn.tar
cpu% for (i in *.ps) echo $i `{sed 1q $i}
pioneer11.ps %!PS-Adobe-2.0 div 112 page header - research!pg
saturnsymbol.ps %!PS-Adobe-2.0 div 112 page header - research!pg
cpu%

Each of these files begins with an lp-style banner page.
That postscript code reinitializes the postscript interpreter,
among other things, clearing the page.

Things will work better if you generate the files without
the banner pages.  Running

  aux/p9bitpost file.bit > file.ps

will produce postscript without the banner page.

I'm quite confused as to how they could have gotten there.

Russ



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] mpictures and ms: text before is gone
  2008-04-28  8:32     ` Russ Cox
@ 2008-04-28 10:14       ` Pietro Gagliardi
  2008-04-30 18:29         ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Pietro Gagliardi @ 2008-04-28 10:14 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Probable bug in lp? I did

	hget ... | jpg -9 | lp -dstdout -pp9bitpost > ... # this is a school
project
	hget | lp -dstdout -pjpgpost > ... # when I realized it existed

However, there is one GIF in my project and that didn't cause any
problems, so it makes me wonder...

The only postscript I know is the color changing code (which I learned
from your talk slides); this problem confused me.

On Apr 28, 2008, at 4:32 AM, Russ Cox wrote:

>> /n/sources/contrib/pietro/saturn.tar has an example of what I mean.
>>
>> 	troff -ms -mpictures tmac.colors saturnhd.ms history.ms
>
> cpu% tar xf /n/sources/contrib/pietro/saturn.tar
> cpu% for (i in *.ps) echo $i `{sed 1q $i}
> pioneer11.ps %!PS-Adobe-2.0 div 112 page header - research!pg
> saturnsymbol.ps %!PS-Adobe-2.0 div 112 page header - research!pg
> cpu%
>
> Each of these files begins with an lp-style banner page.
> That postscript code reinitializes the postscript interpreter,
> among other things, clearing the page.
>
> Things will work better if you generate the files without
> the banner pages.  Running
>
>  aux/p9bitpost file.bit > file.ps
>
> will produce postscript without the banner page.
>
> I'm quite confused as to how they could have gotten there.
>
> Russ
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] mpictures and ms: text before is gone
  2008-04-28 10:14       ` Pietro Gagliardi
@ 2008-04-30 18:29         ` Russ Cox
  0 siblings, 0 replies; 6+ messages in thread
From: Russ Cox @ 2008-04-30 18:29 UTC (permalink / raw)
  To: 9fans

> Probable bug in lp? I did
>
> 	hget ... | jpg -9 | lp -dstdout -pp9bitpost > ... # this is a school
> project
> 	hget | lp -dstdout -pjpgpost > ... # when I realized it existed
>
> However, there is one GIF in my project and that didn't cause any
> problems, so it makes me wonder...

It turns out that using -p does in
fact tickle a bug in lp that ignores
the "nohead" setting for -dstdout.
I've submitted a patch.

Until then, you don't need the -p options
anyway.  Lp can figure out what kind of
input you're giving it.

Russ



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-04-30 18:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-26 22:34 [9fans] mpictures and ms: text before is gone Pietro Gagliardi
2008-04-27 16:43 ` Russ Cox
2008-04-27 20:54   ` Pietro Gagliardi
2008-04-28  8:32     ` Russ Cox
2008-04-28 10:14       ` Pietro Gagliardi
2008-04-30 18:29         ` Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).