[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Re: groff + mp
From: |
Werner LEMBERG |
Subject: |
[Groff] Re: groff + mp |
Date: |
Fri, 10 Feb 2006 17:01:24 +0100 (CET) |
> > . The definition of /RE belongs into the %%BeginSetup
> > ... %%EndSetup section.
>
> Or, maybe, to %%BeginProlog %%BeginResource: procset
> ... %%EndResource %%EndProlog?
Yes, but probably overkill for just a single function.
> > . A `%%BeginProlog' declaration is missing.
>
> An old metapost version. [...] May be it is the result of DSC ver
> 1 conformance from prehistoric times.
It seems so.
> Time to make a bug report to metapost people?
Please do.
> I see a difference in approaches. You are after metapost for groff
> (metapost pictures in groff document), while I am after groff for
> metapost (groff-made labels in metapost output).
Exactly. Thus my remark to merge both approaches into a single
script. To make such a script user-friendly is probably the most
work...
> I want us to try to push groff support into the next metapost
> version. I do not think that it is possible to make some "contrib"
> set of files to make groff work with output of arbitrary TeX setup.
I don't understand what you want to say. Please reformulate.
> BTW. why your sed script downloads groffEncoding into the ps file?
> Since the ps file is bound to end up as a part of groff document,
> ENC0 may be used.
Right! Thanks for the pointer. Below you can find a new version of
the `fixmp' sed script.
> why reencoding is done in 2 steps:
> /Times-Roman-groff groffEncoding /Times-Roman RE
> /groftr /Times-Roman-groff def
It only works this way! The first line defines the font, the second a
command which accesses the font. MetaPost says, for example,
(\244) groftr 10.00005 fshow
If this line were
(\244) /groftr 10.00005 fshow
instead, with a slightly modified `fshow' command, defining a command
`groftr' wouldn't be necessary. Maybe there is a more elegant
solution, but the above is quite easy to understand.
Werner
======================================================================
#! /bin/sed -f
/^%%DocumentFonts: / {
s/^%%DocumentFonts://
: loop1
h
N
s/\n%%+//
t loop1
x
s/^ //
s/ /\
%%+ font /g
s/^/%%DocumentNeededResources: font /
s/$/\
%%EndComments/
p
s/^.*Symbol-Slanted.*$/&\
%%IncludeResource: font Symbol-Slanted/
s/^.*ZapfDingbats-Reverse.*$/&\
%%IncludeResource: font ZapfDingbats-Reverse/
s/^.*FreeEuro.*$/&\
%%IncludeResource: font FreeEuro/
s/^.*%%EndComments\n//
w fixmp.tmp
g
D
}
/^%%BeginProlog/ {
a\
%%BeginSetup
r fixmp.tmp
d
}
/^ \/grofeuro/ b
/^ \/grofs/ b
/^ \/grofss/ b
/^ \/grofzd/ b
/^ \/grofzdr/ b
/^ \/grof/ {
s/^ //
s/ def$//
h
s/\([^ ][^ ]*\) \([^ ][^ ]*\)$/ \2-groff ENC0 \2 RE/
p
g
s/\([^ ][^ ]*\) \([^ ][^ ]*\)$/ \1 \2-groff def/
}
/^%%EndProlog/ {
a\
%%EndSetup
d
}
- [Groff] Re: groff + mp, Werner LEMBERG, 2006/02/03
- [Groff] Re: groff + mp, Michail Vidiassov, 2006/02/09
- [Groff] Re: groff + mp,
Werner LEMBERG <=
- [Groff] Re: groff + mp, Michail Vidiassov, 2006/02/10
- [Groff] Re: groff + mp, Werner LEMBERG, 2006/02/14
- [Groff] Re: groff + mp, Michail Vidiassov, 2006/02/21
- [Groff] Re: groff + mp, Werner LEMBERG, 2006/02/21
- Re: [Groff] Re: groff + mp, Larry Kollar, 2006/02/24
- Message not available
- Fwd: [Groff] Re: groff + mp, Pedro A. López-Valencia, 2006/02/21
- [Groff] Re: groff + mp, Michail Vidiassov, 2006/02/10
- [Groff] Re: groff + mp, Werner LEMBERG, 2006/02/11
- [Groff] Re: groff + mp, Michail Vidiassov, 2006/02/12
- [Groff] Re: groff + mp, Werner LEMBERG, 2006/02/12