[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Where is .PSPIC documented now ?
From: |
Heinz-Jürgen Oertel |
Subject: |
Re: [Groff] Where is .PSPIC documented now ? |
Date: |
Fri, 24 Sep 2004 21:01:54 +0200 |
User-agent: |
KMail/1.7 |
Hi Gaius,
First (besides the .align-image requests)
the given syntax of the
.IMG [-R|-L|-C] filename [width] [height]
is _wrong_
the first macro argument must be the filename, followed by an mandatory
alignment. Look at lines like:
. ie '\\$2'-R' \
expecting the alignment as second argument, and
. HTML <img src="\\$1" width=\\n[www-width] height=\\n[www-height]>
expecting the image file name as first.
We agreed already to have the implementation according the current
groff_www(7) with the alignment as _optional_ first argument.
Something must have changed between your first implementation and rewriting
the man pages.
The second is the function:
Look at the following example. It should work according the macro
implementation, not the documentation:
-----------------------------------------
.LP
Lets see how .IMG works.
With -L
.LP
.IMG university.png -L
.LP
With -C
.LP
.IMG university.png -C
.LP
With -R
.LP
.IMG university.png -R
-----------------------------------------
using
$ groff -ms -mwww -Thtml imgtest.t2 > imgtest.html
The result:
-----------------------------------------
<!-- Creator : groff version 1.19.2 -->
<!-- CreationDate: Fri Sep 24 20:53:16 2004 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<title></title>
</head>
<body>
<hr>
<p>Lets see how .IMG works. With -L</p>
<p><img src="university.png" width=100 height=100></p>
<p>With -C</p>
<p><img src="university.png" width=100 height=100></p>
<p>With -R</p>
<p><img src="university.png" width=100 height=100></p>
<hr>
</body>
</html>
-----------------------------------------
What I'm doing wrong? All images are left-aligned
Hope this helps to see the problem, or to tell me what I'm doing wrong.
Thanks
Heinz
PS.
For most of my work I now use -ms as many others listening here. From
experience, it works best if I use .MPIMG picture.png for both cases,
creating HTML and PS output. Having .IMG working is not really importand,
but .PIMG is.
Am Freitag, 24. September 2004 13:38 schrieben Sie:
> 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
--
with best regards / mit freundlichen Grüßen
Heinz-Jürgen Oertel
+===================================================================
| Heinz-Jürgen Oertel port GmbH http://www.port.de
| mailto:address@hidden
| phone +49 345 77755-0 fax +49 345 77755-20
| Regensburger Str. 7b, D-06132 Halle/Saale, Germany
| CAN Wiki http://www.CAN-Wiki.info
| Newsletter: http://www.port.de/engl/company/content/abo_form.html
+===================================================================