groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Where is .PSPIC documented now ?


From: Gaius Mulley
Subject: Re: [Groff] Where is .PSPIC documented now ?
Date: 24 Sep 2004 12:38:43 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Werner LEMBERG <address@hidden> writes:

> > Another question, and I really hope for an answer:
> > What are the Request 
> > .left-image
> > .right-image
> > .centered-image
> > doing ?
> 
> This is something for Gaius...

Hi,

the code:

.\" --------------------------------------------------------------------
.\" IMG [-R|-L|-C] filename [width] [height]
.\"
.\"   Include an image of any type (will only work for -Thtml).
.\"
.\"   Alignment is centered by default (-C).
.\"   Default value for WIDTH is 1i.
.\"   If HEIGHT is not given, WIDTH is used as the height.
.\"
.de IMG
.  ie \\n[www-html] \{\
.    ie '\\$2'-R' \
.      HTML-TAG ".right-image"
.    el \{\
.      ie '\\$2'-L' \
.        HTML-TAG ".left-image"
.      el \
.        HTML-TAG ".centered-image"
.    \}
.    nr www-width 100
.    if !'\\$3'' \
.      nr www-width \\$3
.    nr www-height \\n[www-width]
.    if !'\\$4'' \
.      nr www-height \\$4
.    HTML <img src="\\$1" width=\\n[www-width] height=\\n[www-height]>
.  \}
.  el \
.    nop \[la]\f[C]\\$1\f[]\[ra]
..

emits a series of `html-tag's to post-grohtml. The first tag in the
context of this macro is the alignment the next paragraph must take.
So when the:

.    HTML <img src="\\$1" width=\\n[www-width] height=\\n[www-height]>

is interpreted it generates an html-tag containing raw
html. post-grohtml now checks so see if the paragraph alignment has
changed. If so it shuts down the previous paragraph and opens up the
requested aligned paragraph. After which it emits the html image.

hope this helps,

Gaius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]