On 31 Jan 2003 Robert Inder wrote:
> I've been using perlpoint for a while now, to generate fairly complex
> suites of HTML pages, and also documents that I can both print via
> LaTeX and distribute via the web.
>
> There were a few places where I could not get it to do what
> I wanted, so I've hit it with a hammer until I have something
> that does what I want.
You are encouraged to do so ;-)
> In the process, I came to the conclusion that someone has missed a
> trick at the fairly low level design stage, ....
Yes, that's me. When I started writing pp2latex I was not an expert in
LaTeX and I fear that is still true.
> I see two specific problems.
> ...
> I think the correct behaviour is that if users do not specify a prolog
> file of their own, pp2latex should use a standard prolog taken from
> a file that is distributed with it. This will make it easier for users to
> create their own prolog by customising the standard one.
Perfectly right! I had the intention to change that and will do in the
next release.
> Second: in "handleHeadline" there is a cascaded "elsif" which
> converts section depth into the corresponding "latex" section name:
> 0 => chapter, 1 => section and so forth. ...
> ....
> The right thing to do is to give pp2latex
> an extra option which tells it whether to have "chapters", or just
> start with "section". The same option should then be used
> to choose one of TWO default prologs (one based on report, one on
> article).
Yes, I agree.
> So, rather than just dump a changed version of the tool on the table
> and say "take it or leave it", I have also described
> my intention.
Your suggestions are highly appreciated :-)
> First off, I didn't like was the way URLs were being formatted ...
Yes, hard coded formatting should be avoided.
> ... So I modified pp2latex so that instead
> of it trying to decide how the URL should look, it simply puts it, and the
> text of the anchor (body of the \L) as arguments to a latex command "\PPurl".
>
> I did the same trick for references to named labels. pp2latex was
> planting a LaTeX "ref" tag. I changed this to plant a call to
> a command that I defined, which in turn displayed the reference in the
> way I like (e.g. "Page 12"). But again, anyone who doesn't like it...
This is a good idea. The combination of PerlPoint tags and LaTeX commands
(which can be adopted in the prolog) provide a high level of flexibility.
> Then I realised that other cross-references were not working properly.
> I wanted to adopt a similar strategy, based on writing simple but
> configurable wrappers around LaTeX's own reference mechanism.
>
> So first, I modified handleHeadLine to explicitly put a LaTeX label ....
Thank you very much for your work and the posting via perlpoint@perl.org.
I will try to integrate your fixes into the next release.
Best regards,
Lorenz
--