groff
[Top][All Lists]
Advanced

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

[Groff] meta macro package


From: David Given
Subject: [Groff] meta macro package
Date: 12 Jul 2002 11:58:02 +0100

In an extended moment of madness I've been working on a macro package
for groff, dubbed meta. It's currently still only partially working, but
if you care it's at:

        http://www.cowlark.com/meta.html

...including a sample document and output PDF.

meta's main claim to fame is that it supports a reasonable syntax (no
two-character macros *anywhere*) and proper, named, user-definable
paragraph styles:

.STYLE EXAMPLESTYLE
.  FONT SERIF
.  FONTSIZE 20
.  ALIGNMENT CENTER
.  FACE B
.  LEFTINDENT 2c
.  RIGHTINDENT 2c
.  FIRSTINDENT 4c
.  LINESPACEING 1.3
.  PARASPACING 0.5
./STYLE

.EXAMPLESTYLE
This is in the ExampleStyle paragraph style.
./EXAMPLESTYLE

You can do character styles as well, and styles can be defined and used
hierarchically.

Basic text output currently works pretty well. However, I'm having some
trouble getting some of the fancier features to work. One thing I want
to implement is minipages; where the user can mark off a section of the
page and flow text into it. The sample document does this to implement a
footer. It all seems to work, but I'm not particularly happy.

For example, I get an awful lot of warnings when the document renders;
'Can't break line' is the major one. But I can't find out why, and the
document appears to have been rendered correctly. Any suggestions as
what to look for for this?

Another problem is that occasionally I want to turn off the end-of-page
trap. For example, when rendering the footer, I want to create a
minipage below the end of text, which means that any text output is
going to trigger the trap, right? So I do a .vpt 0, but then I get lots
of warnings about 'Page ejection could not proceed because vertical
traps are disabled' and it doesn't work. There's something here I'm not
fully grasping.

And my final problem is that I want to be able to manually steer the
cursor around and draw text in nf mode. I'm currently using this to set
the location:

.de SETX
\h'|(u;\\$1)'\c
..

.de SETY
.  sp |(u;\\$1)
..

However, as you can see from the sample document, the graticules around
the footer minipage are in the wrong place (they've been offset to the
right for some reason). But the text appears in the right place. Any
suggestions?

And finally: I've been mainly targeting Postscript and DVI, and they
work fine. However, I also want it to work with plain text and HTML.
Plain text nearly works, but HTML produces a horrible hash of embedded
tables. Presumably grohtml is trying to do margins, but it's failing
miserably. Can I fix this?

Any advice gratefully appreciated.

-- 
+- David Given --McQ-+ "Why should we put ourselves out of our way to
|  address@hidden    | serve posterity? For what has posterity ever done
| (address@hidden) | for us?" --- Sir Boyle Roche
+- www.cowlark.com --+ 

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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