[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Little PDF hack
From: |
Michael Piotrowski |
Subject: |
Little PDF hack |
Date: |
Sat, 28 Mar 1998 20:31:43 +0100 (MET) |
Hi,
Since there was some discussion about producing PDF from Lout some time ago, I
thought this little hack might be of interest.
I put this in mydefs:
def @WebLink left label right url
{
{
"["
"/Rect [ 0 0 xsize ysize ]"
"/Action << /Subtype /URI /URI ("url") >>"
"/Border [0 0 36]"
"/Color [.929 .658 .439]"
"/Subtype /Link"
"/ANN pdfmark"
address@hidden/0.1f {|0.1f label |0.1f} /0.1f}
}
and can now say in my document:
{Lorem address@hidden"http://www.adobe.com/"}
If I distill the resulting PostScript, I get a PDF file with a nice clickable
link. Of course, I'd like to have even more: The title, author, date
information should go into the info dictionary, the sectioning commands should
produce bookmarks, the @Tag option should create a named destination, and the
entries in the table of contents and the index should link to these.
Unfortunately, although this is really quite easy to do with the pdfmark
operator, I'm not yet as fluent in Lout as I'm in LaTeX, so, for the time
being,
the above will have to do.
By the way, what would be the right way to implement this? Would you make
versions of docf, reportf, bookf, and slidesf (say, docf_pdf, etc.)?
Greetings
--
Michael Piotrowski <address@hidden>
Department of Computational Linguistics --- University of Erlangen, Germany
You know, basically, I'm no good at either linguistics or computer science.
--Larry Wall
- Little PDF hack,
Michael Piotrowski <=