groff
[Top][All Lists]
Advanced

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

Re: [Groff] ds in tmac


From: Ted Harding
Subject: Re: [Groff] ds in tmac
Date: Mon, 08 Sep 2003 17:20:51 +0100 (BST)

On 08-Sep-03 Erich Hoffmann wrote:
> On Friday 05 September 2003 21:56, you wrote:
> Still there is one small problem.
> 
> When I define the special char like you wrote:
> 
>> .char \[WNBsq] \Z'\X'ps: import WNBsq.eps \
>> llx lly urx ury \\n[SqSize]u''\&\h'\\n[.ps]u'
>                     ^^^^^^^^^^^^
>                              ^               ^
> my groff (1.17.2 on a Debian Woody) complains that there are no scaling
> factors allowed.  I have to type \\n[SqSize]', without the unit, then
> it works.  OK I'm happy with it; or am I doing something wrong?

You are right and it was my mistake in typing! In fact, when you set up
\n[SqSize] with a command like

.nr SqSize 15p   \" To set it in points, or
.nr SqSize 0.4c  \" To set it in cm

the scaling factor ("p" or "c") ensures that the register \n[SqSize]
contains this quantity scaled to machine units, so you do not need to
put "u" after it when you want to use the register as a number of "u".

You can test this with something like

.nr SqSize 15p
15 points is the same as \n[SqSize] machine units

and you will find it interpolates 15000 which is correct for PostScript.

Since the width of the imported graphic (the 5th argument in the command
\X'ps: import ... ') must be given in "u" anyway, there is no problem
here!

Good luck with all your explorations! I think people find that getting
to know groff is an alternation between two activities: deciding to
do something, and investigating how to do it. The more complex the
things you decide to do, the more you will learn about groff.

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 08-Sep-03                                       Time: 17:20:51
------------------------------ XFMail ------------------------------

reply via email to

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