[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] What's valid in \X?
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] What's valid in \X? |
Date: |
Sun, 23 Jun 2002 00:09:34 +0200 (CEST) |
More than two and a half year ago you wrote:
> Adobe has defined a special PostScript operator -- pdfmark -- that
> allows you to embed PDF file metadata like bookmarks, notes, links,
> info directory entries, etc. into PostScript files. For example, to
> create a bookmark, you can do:
>
> [ /Title (1. Introduction) /OUT pdfmark
>
> When that PostScript file is distilled into a PDF file, the list of
> bookmarks will contain one called "1. Introduction" that you can
> click on to go to the page of the document that contained the
> pdfmark (there are also lots of other ways to specify the
> destination, but that's not really important).
>
> For a structured document, you probably want a bookmark for each
> numbered section heading. I'm using the mm macros which even have
> very convenient hooks for doing this:
>
> .de HY
> \\X'ps: exec [ /Title (\\*(}0\\$3) /OUT pdfmark'\c
> ..
>
> Unfortunately, \*(}0 (the section number) also contains the
> separating space so it's something like "1.2\ \ " and $3 (the
> section title) may well contains something like "The \&\fInew\fP
> features". What groff does now is object to the nonbreaking space
> and the zero-width space and ignore them so I get three warnings and
> the output is:
>
> [ /Title (1.2The new features) /OUT pdfmark
>
> whereas what I'd like is to get no warnings and:
>
> [ /Title (1.2 The new features) /OUT pdfmark
>
> The fundamental idea is that you ought to be able to use formatted
> text in \X and get reasonable results. groff already does a pretty
> good job (it's happy to ignore font and size changes), but I think
> it needs to go just a bit farther.
I've finally implemented this. In \X, both `\ ' and `\~' are
converted to single space characters, and \%, \&, \), and \% are
ignored without a warning.
Sorry for the short delay :-)
Werner
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Groff] What's valid in \X?,
Werner LEMBERG <=