perl.perlpoint http://www.nntp.perl.org/group/perl.perlpoint/ ... Copyright 1998-2014 perl.org Thu, 17 Apr 2014 20:12:31 +0000 ask@perl.org Package 0.43, Pod::PP 0.06, new API for standard import filters by Jochen Stenzel Hello,<br/><br/>updates for PP::Package and Pod::PP have entered both SourceForge and<br/>CPAN. The Windows all-in-one distribution is updated, the Linux<br/>all-in-one distribution shall follow.<br/><br/>These updates are compatible with their previous versions.<br/><br/>Besides smaller updates, these versions bring a new API to install<br/>*standard* import filters. A standard filter is a filter from a standard<br/>format, which should not be rewritten or imported explicitly to every<br/>source that includes or embeds those standard files. For example, with<br/>the new releases one now can include and embed POD this way:<br/><br/> \INCLUDE{import=1 file=&quot;file.pod&quot;}<br/><br/> \INCLUDE{import=pod file=&quot;podfile&quot;}<br/><br/> \EMBED{import=pod}<br/><br/> This is written in B&lt;POD&gt;.<br/><br/> \END_EMBED<br/><br/>Additionally, one can import sources directly by using the new prefix<br/>&quot;IMPORT:&quot;, if the file has an extension that can be used to find out its<br/>format:<br/><br/> perlpoint ... IMPORT:file.pod<br/><br/><br/>As a help to find out which versions are installed, the perlpoint script<br/>and all generator based converters now support a -version option. Thanks<br/>to Achim Grolms for this suggestion.<br/><br/>Enjoy<br/><br/> Jochen<br/><br/><br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2006/04/msg84.html Sat, 22 Apr 2006 15:35:20 +0000 Several updates by Jochen Stenzel Hello,<br/><br/>the German Perl Workshop often is a kick to PerlPoint development, so<br/>now that it took place for this year I just updated a bunch of PerlPoint<br/>distributions both on CPAN and SF, including both all-in-one binary<br/>packages for Windows and Linux. The focus of these updates is better<br/>(strict) XHTML produced with the XHTML formatters (and PerlPointCD which<br/>we use for the Workshops CD production).<br/><br/>There should be no compatibility issues, but I recommend to make *all*<br/>updates as they work together (or to choose one of the binary packages).<br/><br/>On this occurence I synced PerlPoint::Converters, so now it has version<br/>1.0205 both on CPAN and at SF.<br/><br/>Enjoy<br/><br/> Jochen<br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2006/03/msg83.html Sat, 11 Mar 2006 15:55:25 +0000 Windows binary package repacked by Jochen Stenzel Hello,<br/><br/>due to a non common Zip format version (6.0) 0.01 could not be read by<br/>all archivers. If you cannot unpack it please try the free 7Zip to<br/>handle it.<br/><br/>For new downloads I just released a 0.01a distribution, with the only<br/>difference of an older Zip format hopefully readable for common archive<br/>programs.<br/><br/> Jochen<br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2006/01/msg82.html Sat, 21 Jan 2006 17:25:18 +0000 Binary package for Linux available by Jochen Stenzel Hello,<br/><br/>after a few days the binary package is available for Linux now as well,<br/>named PerlPoint-binary-lin and available at SourceForge (due to its size<br/>I don&#39;t think it is welcome on CPAN, but that&#39;s just an assumption).<br/>Similar to the Windows package the binary is built with pp from PAR. The<br/>build run on Suse 9.3 but I expect the result to run on most distributions.<br/><br/>As for the Windows package restrictions apply for the converters<br/>included. As I don&#39;t know yet how to make several scripts available in<br/>one binary made by pp only perlpoint is included. For pp2html, pp2latex<br/>and pp2sdf at the moment a full installation via modules is required.<br/><br/>Enjoy<br/><br/> Jochen<br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2006/01/msg81.html Fri, 20 Jan 2006 02:39:36 +0000 Windows binary package allows one step installation by Jochen Stenzel Hello,<br/><br/>a new package, PerlPoint-binary-win, is available at SourceForge. It<br/>contains a perlpoint.exe built with PAR&#39;s pp that can be used out of the<br/>box, without installation of perl or additional modules, for users that<br/>just want to start. (The PerlPoint::styles package might be added to get<br/>some styles to begin with, like the new S5.) perlpoint is the (new name<br/>of the formerly pp2tdo) converter from PerlPoint::Package that can<br/>produce various target formats.<br/><br/>The downside of this solution is that it does not contain pp2html,<br/>pp2latex and pp2sdf (the converters that do not use the new generator<br/>part of the framework). I&#39;d like to add them but at the moment I need to<br/>figure out how to achieve this in one archive. If anyone knows how to do<br/>this please let me know. As a fallback solution, it would be possible to<br/>release them in own binary packages but most of such files would contain<br/>the same that&#39;s in the perlpoint.exe already.<br/><br/> Jochen<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2006/01/msg80.html Sat, 14 Jan 2006 04:27:57 +0000 Updates, new module, TT2 and S5 support by Jochen Stenzel Hello,<br/><br/>I just released several updates both on CPAN and SourceForge.<br/><br/>Updates for PP::Package, PP::Generator::XML and<br/>PP::Generator::XML::XHTML besides fixes most importantly bring these<br/>changes:<br/><br/> * all XML based generators now encode entities where necessary,<br/> * XHML formatted output can be produced using templates (was<br/> documented before but impossible),<br/> * nested tables are allowed for XHTML output;<br/> * the multiple target converter was renamed from pp2tdo to<br/> perlpoint, as a preparation for a precompiled package built with<br/> PAR utilities (all the pp2... converters are supported without<br/> change! This is just for users looking for a simple to install<br/> utility with a memorable tool name);<br/><br/>Please see the change logs for more details.<br/><br/>More, styles can be written using Template Toolkit now, with the new<br/>support layer PP::Template::TT2. It is considered a beta due to lacking<br/>tests and docs. Nevertheless, it can be *used* and works, as shown by<br/>the new demo style S5 in the updated styles package. This style, as the<br/>name suggests, allows to produce S5 presentations with PerlPoint. Please<br/>see the overview.pp file in the docs directory of the S5 style in the<br/>styles distribution for details how to do that. (In short, use this<br/>style, produce into a separate target directory and copy an S5 ui<br/>directory to there.)<br/><br/> Jochen<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2006/01/msg79.html Sun, 08 Jan 2006 12:42:56 +0000 Homepage by Jochen Stenzel Hello,<br/><br/>SourceForge provides a homepage for each project. The PerlPoint project <br/>homepage at http://perlpoint.sourceforge.net/ now has real content: an <br/>overview, a quick start section, the tutorial, API docs etc. It&#39;s mostly <br/>a collection of documents that exist in the various packages, but <br/>presented together.<br/><br/>Greetings<br/><br/> Jochen<br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2005/11/msg78.html Mon, 14 Nov 2005 02:40:34 +0000 PerlPoint::Package 0.40 and related new distributions released by Jochen Stenzel Hello,<br/><br/>last week I released a bunch of modules which grew up in silence for a <br/>while.<br/><br/>First, there is the new PP::Package 0.40. It has a few new features, <br/>most of them in the API for converter authors, and a few cleanups. Among <br/>the changes for *users* are the new optional dot prefix for text <br/>paragraphs, the requirement for a headline for the very first chapter, <br/>and fixes in variable handling - empty variables are treated as literal <br/>text now according to the docs, and backslashes before variables are <br/>handled more correctly. Please see the changelog for a full list.<br/><br/>0.40 has a few API incompatibilities, but nevertheless pp2html and <br/>pp2latex should continue to run with them.<br/><br/>And, there are two new components in the package. One is an tutorial, <br/>incomplete yet but with many chapters already about basic and advanced <br/>themes.<br/><br/>The second new part is an extended framework, designed to simplify the <br/>writing of new converters. It is built on top of the existing model (so <br/>traditional converters continue to work and will continue to be <br/>supported) and has three components: generators, formatters, and <br/>template engines, all plugged in via module installations and invoked by <br/>*one* converter which comes with 0.40, named pp2tdo. The concept is <br/>described in the &quot;writing converters&quot; documents in the package, but the <br/>base ideas are these:<br/><br/>There&#39;s a four layer backend model. The first level comes with the <br/>framework and performes all actions on the parsers output that are <br/>common to all converters. The second level is a *generator*, a module <br/>loaded according to option -target. A generator basically produces the <br/>target language. But one and the same language can be formatted in <br/>various ways, and that&#39;s why on the next level a *formatter* is linked <br/>in. Formatters are modules loaded according to option -formatter. <br/>Finally, formatters might want to use templates. As there are several <br/>engines around the new framework has a general interface to template <br/>engines (think DBI) and can load specific &quot;drivers&quot; which translate the <br/>template requests to whatever a specific template system needs. Again, <br/>specific template modules are loaded dynamically by pp2tdo, according to <br/>options.<br/><br/>How does this affect a user? Well, here are a few points:<br/><br/>* PPP 0.40 comes with a generator and formatter for SDF which resample <br/>the entire functionality of pp2sdf.<br/>* Several new distributions were released with a generator to XML <br/>(PP::Generator::XML), XML formatters<br/> to XHTML (one page and multiple pages, PP::Generator::XMML::XHTML) <br/>and a template driver providing<br/> the traditional template syntax of pp2html templates, in an extended <br/>version (PP::Template::Traditional).<br/>* Styles, introduced with pp2html, are generally available now. They <br/>have a new design, too. Two examples<br/> for XHTML are provided in the new package PP::styles. Styles can <br/>include own generators, formatters<br/> and template drivers.<br/>* If you like, you can use one converter for all target formats.<br/><br/>After installation of these packages, you can try the new interface, <br/>e.g. by a call like<br/><br/> pp2tdo -target XML -format XHTML::Pages<br/> -doctitle Test -prefix test -suffix .html<br/> -targetdir slides<br/> -styledir .../PerlPoint-styles/demo/styles<br/> -style GPW7-PPGenerator-01<br/> -contents_header TOC test.pp<br/><br/>(As usual, all options can be stored in an option file.)<br/><br/>Again, the traditional converters will continue to be supported.<br/><br/>The new modules and packages still lack some tests and docs, and <br/>possibly a finish in the API, but a base documentation is already there <br/>(try -help with the call above) and are successfully used in various <br/>internal projects. So, I declare the new distributions beta but they can <br/>be considered to work well.<br/><br/>Greetings<br/><br/> Jochen<br/><br/><br/><br/><br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2005/11/msg77.html Mon, 14 Nov 2005 02:40:32 +0000 PerlPointCD 3.00 released by Jochen Stenzel <br/>Hello,<br/><br/>a first PerlPoint application was released today. PerlPoint<br/>applications are programs written in form of PerlPoint documents.<br/><br/>PerlPointCD allows to easily build and maintain conference CDs, as<br/>well as Web sites that provide conference proceedings.<br/><br/>The tool was initially written to build CDs of the German Perl<br/>Workshop (www.perlworkshop.de). After the workshop 2003, and as one<br/>result of a very fruitful discussion with J&uuml;rgen Christoffel - thanks,<br/>J&uuml;rgen! -, I generalized the interface. So now it should be applicable<br/>to any conference.<br/><br/>To demonstrate the usage by example, and to show how results can look<br/>like, the documentation is provided in form of a &quot;demo CD&quot;. Just open<br/>build/index.html to start reading.<br/><br/>The official distribution name is<br/>&quot;PerlPoint::Applications::PerlPointCD&quot;. The package is available both<br/>from CPAN and SourceForge.<br/><br/>Comments appreciated!<br/><br/>Greetings<br/><br/> Jochen<br/><br/> <br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2004/01/msg76.html Sun, 18 Jan 2004 11:54:17 +0000 Package 0.39 released by Jochen Stenzel <br/>Hello,<br/><br/>I just released version 0.39 of the package.<br/><br/>This is a feature release. Documents do not need to be adapted. On the<br/>other hand, to make use of the new features, you need adapted<br/>converters. For pp2html, a patch is provided on the project site<br/>(www.sourceforge.net/projects/perlpoint) to work with Package 0.39.<br/><br/>Besides a few bugfixes and improved Emacs highlighting, this release<br/>makes \X a base tag and introduces the new feature of automatic<br/>linkage between pages, based on index entries.<br/><br/>The idea is that index entries point to documents/chapters with<br/>substantial information about the index entry. Documents/chapters<br/>matching in their index entries are probably content related. In<br/>linking to other documents or chapters speaking about the same indexed<br/>issues, or to a relevant percentage of the base documents (indexed)<br/>issues, one can build cross references automatically.<br/><br/>Greetings<br/><br/> Jochen<br/><br/> <br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2004/01/msg75.html Sun, 18 Jan 2004 11:38:35 +0000 Re: Changes to pp2latex by Lorenz.Domke <br/>On 31 Jan 2003 Robert Inder wrote:<br/><br/> &gt; I&#39;ve been using perlpoint for a while now, to generate fairly complex<br/> &gt; suites of HTML pages, and also documents that I can both print via<br/> &gt; LaTeX and distribute via the web.<br/> &gt;<br/> &gt; There were a few places where I could not get it to do what<br/> &gt; I wanted, so I&#39;ve hit it with a hammer until I have something<br/> &gt; that does what I want.<br/><br/>You are encouraged to do so ;-)<br/><br/> &gt; In the process, I came to the conclusion that someone has missed a<br/> &gt; trick at the fairly low level design stage, ....<br/><br/>Yes, that&#39;s me. When I started writing pp2latex I was not an expert in<br/>LaTeX and I fear that is still true.<br/><br/> &gt; I see two specific problems.<br/> &gt; ...<br/> &gt; I think the correct behaviour is that if users do not specify a prolog<br/> &gt; file of their own, pp2latex should use a standard prolog taken from<br/> &gt; a file that is distributed with it. This will make it easier for users to<br/> &gt; create their own prolog by customising the standard one.<br/><br/>Perfectly right! I had the intention to change that and will do in the<br/>next release.<br/><br/> &gt; Second: in &quot;handleHeadline&quot; there is a cascaded &quot;elsif&quot; which<br/> &gt; converts section depth into the corresponding &quot;latex&quot; section name:<br/> &gt; 0 =&gt; chapter, 1 =&gt; section and so forth. ...<br/> &gt; ....<br/> &gt; The right thing to do is to give pp2latex<br/> &gt; an extra option which tells it whether to have &quot;chapters&quot;, or just<br/> &gt; start with &quot;section&quot;. The same option should then be used<br/> &gt; to choose one of TWO default prologs (one based on report, one on<br/> &gt; article).<br/><br/>Yes, I agree.<br/><br/> &gt; So, rather than just dump a changed version of the tool on the table<br/> &gt; and say &quot;take it or leave it&quot;, I have also described<br/> &gt; my intention.<br/><br/>Your suggestions are highly appreciated :-)<br/><br/> &gt; First off, I didn&#39;t like was the way URLs were being formatted ...<br/><br/>Yes, hard coded formatting should be avoided.<br/><br/> &gt; ... So I modified pp2latex so that instead<br/> &gt; of it trying to decide how the URL should look, it simply puts it, and the<br/> &gt; text of the anchor (body of the \L) as arguments to a latex command &quot;\PPurl&quot;.<br/> &gt;<br/> &gt; I did the same trick for references to named labels. pp2latex was<br/> &gt; planting a LaTeX &quot;ref&quot; tag. I changed this to plant a call to<br/> &gt; a command that I defined, which in turn displayed the reference in the<br/> &gt; way I like (e.g. &quot;Page 12&quot;). But again, anyone who doesn&#39;t like it...<br/><br/>This is a good idea. The combination of PerlPoint tags and LaTeX commands<br/>(which can be adopted in the prolog) provide a high level of flexibility.<br/><br/> &gt; Then I realised that other cross-references were not working properly.<br/> &gt; I wanted to adopt a similar strategy, based on writing simple but<br/> &gt; configurable wrappers around LaTeX&#39;s own reference mechanism.<br/> &gt;<br/> &gt; So first, I modified handleHeadLine to explicitly put a LaTeX label ....<br/><br/>Thank you very much for your work and the posting via perlpoint@perl.org.<br/>I will try to integrate your fixes into the next release.<br/><br/>Best regards,<br/><br/> Lorenz<br/><br/>-- <br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2003/02/msg74.html Wed, 05 Feb 2003 13:36:27 +0000 PerlPoint to be found at SourceForge by Jochen Stenzel Hello,<br/><br/>in the occasion of Roberts mail we decided to announce that PerlPoint<br/>became a SourceForge project. It is to be found at<br/>www.sourceforge.net/projects/perlpoint.<br/><br/>We started the site a while ago but did not &quot;launch&quot; it yet because we<br/>planned to install a homepage first and to master the CVS interface<br/>before ;-). But even without a homepage, I think it is a well suited<br/>and well equipped place to work on the software and its docs.<br/>Addionally, it is intended to be a user platform to share patches,<br/>improvements, examples, layouts, macros, code, filters, converters,<br/>PerlPoint applications and so on in a central place. And, of course,<br/>to introduce the software, to list sites made with its help etc.. Your<br/>opinion and ideas are most welcome!<br/><br/>By the way - because a project needs a logo, doesn&#39;t it? ;-) - we now<br/>even have logo drafts. They are not to be found at SourceForge yet but<br/>should be provided there as well.<br/><br/>Software releases shall continue to be published both at CPAN and<br/>SourceForge. As for the mailing list, there is no plan to switch it<br/>over to SourceForge, so everything should continue to work.<br/><br/>Greetings<br/><br/> Jochen<br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2003/01/msg73.html Fri, 31 Jan 2003 16:33:51 +0000 Changes to pp2latex by Robert Inder <br/>I&#39;ve been using perlpoint for a while now, to generate fairly complex<br/>suites of HTML pages, and also documents that I can both print via<br/>LaTeX and distribute via the web.<br/><br/>There were a few places where I could not get it to do what<br/>I wanted, so I&#39;ve hit it with a hammer until I have something<br/>that does what I want. <br/><br/> ((Anyone interested should look at http://www.interactive.co.uk <br/> and http://information.overlaid.com. Both sites, and the case<br/> studies accessible from them, are Perlpoint. And no, they<br/> don&#39;t say that at the moment, and yes, the probably should. Some<br/> time...))<br/><br/>In the process, I came to the conclusion that someone has missed a<br/>trick at the fairly low level design stage, and built a fair bit of<br/>formatting into pp2latex itself. Given that the whole point of latex<br/>is to let you specify how things should be formatted, I think this was<br/>a mistake...<br/><br/>I see two specific problems.<br/><br/>First: users are allowed to specify a &quot;prolog&quot; file. If they <br/>do not do this, pp2latex currently uses a latex skeleton that is<br/>included as a &quot;here&quot; document within the perl code. This means<br/>it is effectively hidden away!<br/><br/>I think the correct behaviour is that if users do not specify a prolog<br/>file of their own, pp2latex should use a standard prolog taken from<br/>a file that is distributed with it. This will make it easier for users to<br/>create their own prolog by customising the standard one. You&#39;ll<br/>see why I think this is important below...<br/><br/>Second: in &quot;handleHeadline&quot; there is a cascaded &quot;elsif&quot; which<br/>converts section depth into the corresponding &quot;latex&quot; section name:<br/>0 =&gt; chapter, 1 =&gt; section and so forth. However, the system counts<br/>depths from 1, so &quot;chapter&quot; is forever inaccessible! This is okay<br/>for the default style of &quot;article&quot;, which does not have chapters, but<br/>it means that you can&#39;t produce a &quot;report&quot;, with a table of contents<br/>and the like. <br/><br/>I got round this by simply subtracting &quot;1&quot; from the<br/>depth argument. But that means I&#39;ll ALWAYS get chapters, so I can&#39;t<br/>use an &quot;article&quot; style. The right thing to do is to give pp2latex<br/>an extra option which tells it whether to have &quot;chapters&quot;, or just<br/>start with &quot;section&quot;. The same option should then be used<br/>to choose one of TWO default prologs (one based on report, one on<br/>article).<br/><br/>Now, as well as pontificating about how the pp2latex could be better,<br/>I did in fact change things to get the functionality I needed for<br/>the job in hand. I&#39;m sure I&#39;ve improved functionality, <br/>but I&#39;m not sure I&#39;ve done it in the &quot;right&quot; way for pp2latex.<br/><br/>So, rather than just dump a changed version of the tool on the table<br/>(which I have done, at the end of this message), <br/>and say &quot;take it or leave it&quot;, I have also described<br/>my intention. So that if anyone wants to do the same thing some other<br/>way, they can...<br/><br/>First off, I didn&#39;t like was the way URLs were being formatted<br/>--- small italics in square brackets, I think it was. But I couldn&#39;t<br/>change it because this was hard wired somewhere deep inside pp2latex.<br/><br/>Which to my mind is the wrong place! The whole point of LaTeX is that<br/>it lets you change formatting! So I modified pp2latex so that instead<br/>of it trying to decide how the URL should look, it simply puts it, and the<br/>text of the anchor (body of the \L) as arguments to a latex command &quot;\PPurl&quot;.<br/><br/>This, of course, has to be defined. Which I do in the prolog file...<br/>But now, hey presto, I can have URLs appear exactly the way I want....<br/><br/>I did the same trick for references to named labels. pp2latex was<br/>planting a LaTeX &quot;ref&quot; tag. I changed this to plant a call to<br/>a command that I defined, which in turn displayed the reference in the<br/>way I like (e.g. &quot;Page 12&quot;). But again, anyone who doesn&#39;t like it...<br/><br/>Then I realised that other cross-references were not working properly.<br/>I wanted to adopt a similar strategy, based on writing simple but<br/>configurable wrappers around LaTeX&#39;s own reference mechanism.<br/><br/>So first, I modified handleHeadLine to explicitly put a LaTeX label <br/>at the start of each Section, named by something based on the sections<br/>PerlPoint page ID. Then, it is &quot;simply&quot; a matter of getting the various<br/>PerlPoint cross reference commands to plant LaTeX references to those<br/>labels. <br/><br/>Then, I modified the behaviour of the XREF and SECTIONREF tags to<br/>plant the target of the reference within calls to these wrapper<br/>commands. This lets me produce LOCALTOCS that look like...<br/><br/> This document<br/><br/> - Reviews the background material (Section 2, Page 5)<br/> - Summarises the current problems (Section 3, Page 10)<br/> - Outlines possible new solutions (Section 4, Page 12)<br/><br/>and so forth. See how the section references include the section<br/>number and page in the way I like...<br/><br/>I&#39;ve attached a revised version here. To use it, you HAVE to<br/>use a LaTeX &quot;prolog&quot; file and specify it in your &quot;.opt&quot; file.<br/><br/>I&#39;m afraid I&#39;m not in a position to release a sample document!<br/><br/>The prolog file must be based on report or book style, and<br/>it must define four new LaTeX commands. The file I use follows.<br/><br/>I&#39;ve not documented the changes in the file, or updated the change<br/>log, or anything like that. If anyone wants to make these changes<br/>part of the real system, and wants some more information, let me<br/>know... <br/><br/>Enjoy....<br/><br/>Robert.<br/><br/>P.S. I&#39;ve got a comparable batch of changes for pp2html, but I&#39;ll have<br/>to merge them in to the latest release before posting them...<br/><br/>--<br/>Robert Inder Interactive Information, 07770 30 40 52 (general)<br/>07808 492 213 3, Lauriston Gardens, 0131 229 1052 (fax)<br/> Edinburgh EH3 9HH<br/> SCOTLAND UK<br/><br/>------------------------------------------------------------------------<br/>My LaTeX prolog...<br/>------------------------------------------------------------------------<br/><br/>\documentclass [11pt] {report} % <br/>\parindent0pt % no indentation of first line<br/>\parskip1ex % white space between chapters<br/>\pagestyle{headings} %<br/>\usepackage{epsf}<br/>\usepackage{makeidx}<br/><br/>% setup for DIN A4<br/>\oddsidemargin3cm<br/>\evensidemargin3cm<br/>\setlength{\hoffset}{-1in} % compensation of<br/>\setlength{\voffset}{-2cm} % printer offset<br/>\title{Interactive Information Limited: Business Plan}<br/>\author{Robert Inder}<br/>\def\chaptername{Section}<br/><br/>\textwidth15cm<br/>\topmargin1cm<br/>\headheight3ex<br/>\headsep12pt<br/>\textheight23cm<br/>\setlength{\footskip}{1.5cm}<br/><br/>\makeindex<br/><br/>\newcommand{\PPurl}[2]{\ifx#1#2{\tt #1}\else{#1\protect\footnote{url: {\tt #2}}}\fi}<br/><br/>\newcommand{\PPSref}[2]{#1 (Section \ref{#2}, Page \pageref{#2})}<br/><br/>\newcommand{\PPXref}[2]{#1 (Section \ref{#2}, Page \pageref{#2})}<br/><br/>\newcommand{\PPPageref}[1]{Page \pageref{#1}}<br/><br/><br/><br/>\begin{document}<br/>\maketitle<br/><br/>\tableofcontents<br/><br/>\begin{flushleft}<br/><br/><br/><br/>------------------------------------------------------------------------<br/>My modified version pp2latex follows....<br/>------------------------------------------------------------------------<br/><br/>#!/usr/bin/perl -w<br/><br/>eval &#39;exec /usr/bin/perl -w -S $0 ${1+&quot;$@&quot;}&#39;<br/> if 0; # not running under some shell<br/>#<br/># $Id: pp2latex,v 1.14 2001/12/19 21:04:43 lorenz Exp $<br/># $Revision: 1.14 $<br/># $Date: 2001/12/19 21:04:43 $<br/>#<br/># $Author: lorenz $<br/>#<br/># Revision History: See end of file<br/>#===================================================================<br/><br/># declare script package<br/>package PerlPoint::Converter::pp2latex;<br/><br/>use Pod::Text;<br/>use Getopt::ArgvFile qw(argvFile);<br/>use Getopt::Long;<br/>use Data::Dumper;<br/> <br/><br/># pragmata<br/>use strict;<br/>use subs &quot;flush&quot;, &quot;push_page&quot;, &quot;pp_warn&quot;;<br/><br/># load modules<br/>use File::Basename;<br/>use Carp;<br/>use Safe;<br/>use PerlPoint::Tags;<br/>use PerlPoint::Tags::Basic;<br/>use PerlPoint::Tags::HTML;<br/>use PerlPoint::Tags::LaTeX;<br/>use PerlPoint::Backend;<br/>use PerlPoint::Parser 0.34;<br/>use PerlPoint::Constants;<br/>use PerlPoint::Converters qw(replace_keywords copy_file update_file mk_abs_path);<br/><br/>my $me = basename($0);<br/><br/>my $VERSION = sprintf(&quot;%d.%02d&quot;, q/$Revision: 1.14 $/ =~ /(\d+)\.(\d+)/);<br/>my $PACK_VERSION = $PerlPoint::Converters::VERSION;<br/>$main::VERSION = $VERSION;<br/><br/>my $nix = &quot;&quot;; # for using RCS keys in Usage, ...<br/>my $Date = &quot;Date &quot;;<br/><br/><br/>#============================================================= Usage<br/><br/>sub Usage {<br/> no strict;<br/> $^W = 0;<br/> my $tmpfile = &quot;/tmp/$me.$$_help&quot;;<br/> open(ME, &quot;&lt; $0&quot;) or die &quot;Can&#39;t open $me: $!\n&quot;;<br/> open(TMP, &quot;&gt; $tmpfile&quot;) or die &quot;Can&#39;t open $tmpfile: $!\n&quot;;<br/> while(&lt;ME&gt;){<br/> s/PROGRAM/$me/g;<br/> s/P_VERSION/$VERSION/g;<br/> print TMP $_;<br/> }<br/> close(TMP);<br/> pod2text( $tmpfile );<br/> unlink $tmpfile;<br/> exit; # we&#39;re done<br/>} # Usage<br/><br/>#==================================================== Parameter Loop<br/><br/>my %OPT = (<br/><br/> slide_dir =&gt; &quot;.&quot;,<br/> no_index =&gt; 0,<br/><br/>);<br/><br/>argvFile( home =&gt; 1, default =&gt; 1);<br/><br/>if (defined $ARGV[0] and $ARGV[0] =~ /-v$/){<br/> @ARGV =(&quot;-version&quot;); # to avoid ambiguities<br/>}<br/>my $verbose = 1;<br/><br/>GetOptions( \%OPT,<br/><br/> &quot;activeContents&quot;,<br/> &quot;cache&quot;,<br/> &quot;cacheCleanup&quot;,<br/> &quot;double_lines&quot;,<br/> &quot;filter=s&quot;,<br/> &quot;no_index&quot;,<br/> &quot;nocopyright&quot;,<br/> &quot;noinfo&quot;,<br/> &quot;nowarn&quot;,<br/> &quot;quiet&quot;,<br/> &quot;safeOpcode=s@&quot;,<br/> &quot;set=s@&quot;,<br/> &quot;slide_dir=s&quot;,<br/> &quot;trace:i&quot;,<br/> &quot;prolog=s&quot;,<br/> &quot;help&quot;,<br/> &quot;version&quot;,<br/><br/>);<br/><br/># propagate options as necessary<br/>@OPT{qw(nocopyright noinfo nowarn)}=(1,1,1) if exists $OPT{quiet};<br/>$OPT{trace}=$ENV{SCRIPTDEBUG} if not exists $OPT{trace} and exists $ENV{SCRIPTDEBUG};<br/><br/><br/>#======================================================= Script Body<br/>Usage(1) if ($OPT{help});<br/>print STDERR &quot;This is $me, build $VERSION from PerlPoint::Converters $PACK_VERSION\n&quot; unless $OPT{quiet};<br/>print STDERR &quot;$Date: 2001/12/19 21:04:43 $nix\n&quot; unless $OPT{quiet};<br/>print STDERR &quot;(c) Lorenz Domke &lt;lorenz.domke\@gmx.de&gt; 2001.\n\n&quot; unless $OPT{nocopyright};<br/>exit if $OPT{version};<br/><br/><br/>$verbose = 0 if ($OPT{quiet} or $OPT{noinfo});<br/><br/>my ($li_start, $li_end);<br/>$li_start = &quot;\\item &quot;;<br/>$li_end = &quot;\n&quot;;<br/><br/># declare variables<br/># Data Structures<br/># 000000000000000<br/>my $embedded_latex = 0;<br/><br/>my (@streamData);<br/>my $verbatim_flag = 0;<br/><br/>my $page_ref; # pointer to current page buffer<br/><br/>my @PAGES; # Array of pointers to PAGE structures<br/># $PAGES[ $m ] = {<br/># BODY =&gt; [ ... ],<br/># LEVEL =&gt; ...,<br/># HD =&gt; ...,<br/># PREV =&gt; ...,<br/># NEXT =&gt; ...,<br/># UP =&gt; ...,<br/># DOWN =&gt; ...,<br/># }<br/>my $page_cnt = -1;<br/>my %ANCHOR; # $ANCHOR{a_name} = $page_cnt<br/><br/>my %INDEX;<br/>my $idx_cnt = 0;<br/><br/><br/><br/># declare list of tag openers<br/># some are only needed for compatibility with pp2htm<br/><br/># build parser<br/>my ($parser)=new PerlPoint::Parser;<br/><br/><br/># build and configure a Safe object<br/>my $safe = new Safe;<br/>if (exists $OPT{safeOpcode}){<br/> unless (grep($_ eq &#39;ALL&#39;, @{$OPT{safeOpcode}})) {<br/> # configure compartment<br/> $safe-&gt;permit(@{$OPT{safeOpcode}});<br/> } else {<br/> # simply flag that we want to execute active contents<br/> $safe=1;<br/> }<br/>}<br/><br/># and call it<br/>$parser-&gt;run(<br/> stream =&gt; \@streamData,<br/> files =&gt; \@ARGV,<br/> safe =&gt; exists $OPT{activeContents} ? $safe : undef,<br/> filter =&gt; exists $OPT{filter} ? $OPT{filter} : &quot;perl|latex&quot;,<br/> activeBaseData =&gt; {<br/> targetLanguage =&gt; &#39;SDF&#39;,<br/> userSettings =&gt; {map {$_=&gt;1} exists $OPT{set} ? @{$OPT{set}} : ()},<br/> },<br/> vispro =&gt; 1,<br/> nestedTables =&gt; 1,<br/> var2stream =&gt; 1,<br/> predeclaredVars =&gt; {<br/> CONVERTER_NAME =&gt; basename($0),<br/> CONVERTER_VERSION =&gt; $main::VERSION,<br/> },<br/> trace =&gt; TRACE_NOTHING<br/> + ((exists $OPT{trace} and $OPT{trace} &amp; 1) ? TRACE_PARAGRAPHS : 0) <br/> + ((exists $OPT{trace} and $OPT{trace} &amp; 2) ? TRACE_LEXER : 0)<br/> + ((exists $OPT{trace} and $OPT{trace} &amp; 4) ? TRACE_PARSER : 0)<br/> + ((exists $OPT{trace} and $OPT{trace} &amp; 8) ? TRACE_SEMANTIC : 0)<br/> + ((exists $OPT{trace} and $OPT{trace} &amp; 16) ? TRACE_ACTIVE : 0),<br/> display =&gt; DISPLAY_ALL<br/> + (exists $OPT{noinfo} ? DISPLAY_NOINFO : 0) <br/> + (exists $OPT{nowarn} ? DISPLAY_NOWARN : 0),<br/> cache =&gt; (exists $OPT{cache} ? CACHE_ON : CACHE_OFF)<br/> + (exists $OPT{cacheCleanup} ? CACHE_CLEANUP : 0),<br/> ) or exit 1;<br/><br/><br/># build a backend<br/>my $backend=new PerlPoint::Backend(<br/> name =&gt; $me, <br/> trace =&gt; TRACE_NOTHING,<br/> display =&gt; DISPLAY_ALL<br/> + (exists $OPT{noinfo} ? DISPLAY_NOINFO : 0)<br/> + (exists $OPT{nowarn} ? DISPLAY_NOWARN : 0),<br/> vispro =&gt; 1,<br/>);<br/>#my $backend=new PerlPoint::Backend(name=&gt;$me, trace=&gt;TRACE_BACKEND);<br/><br/># register backend handlers<br/>$backend-&gt;register(DIRECTIVE_BLOCK, \&amp;handleBlock);<br/>$backend-&gt;register(DIRECTIVE_COMMENT, \&amp;handleComment);<br/>$backend-&gt;register(DIRECTIVE_DOCUMENT, \&amp;handleDocument);<br/>$backend-&gt;register(DIRECTIVE_HEADLINE, \&amp;handleHeadline);<br/>$backend-&gt;register(DIRECTIVE_LIST_LSHIFT, \&amp;handleLShift);<br/>$backend-&gt;register(DIRECTIVE_LIST_RSHIFT, \&amp;handleRShift);<br/>$backend-&gt;register(DIRECTIVE_ULIST, \&amp;handleList);<br/>$backend-&gt;register(DIRECTIVE_UPOINT, \&amp;handlePoint);<br/>$backend-&gt;register(DIRECTIVE_OLIST, \&amp;handleList);<br/>$backend-&gt;register(DIRECTIVE_OPOINT, \&amp;handlePoint);<br/>$backend-&gt;register(DIRECTIVE_DLIST, \&amp;handleList);<br/>$backend-&gt;register(DIRECTIVE_DPOINT, \&amp;handleDPoint);<br/>$backend-&gt;register(DIRECTIVE_DPOINT_ITEM, \&amp;handleDPointItem);<br/>$backend-&gt;register(DIRECTIVE_SIMPLE, \&amp;handleSimple);<br/>$backend-&gt;register(DIRECTIVE_TAG, \&amp;handleTag);<br/>$backend-&gt;register(DIRECTIVE_TEXT, \&amp;handleText);<br/>$backend-&gt;register(DIRECTIVE_VERBATIM , \&amp;handleVerbatim);<br/><br/>my @BUFFER;<br/>my @ERRBUFFER; # buffer for context of error <br/>my $box_bg_color= &quot;blue&quot;;<br/>my $box_fg_color= &quot;white&quot;;<br/><br/># and run it<br/>$backend-&gt;run(\@streamData,<br/>);<br/><br/>begin_doc();<br/><br/>## Now do your job: output the pages ...<br/>for (my $i = 0; $i &lt;= $page_cnt; $i++){<br/> print STDERR &quot;New Page $i: Level &quot;,<br/> $PAGES[$i]-&gt;{LEVEL}, &quot; ===&gt; &quot;,<br/> $PAGES[$i]-&gt;{HD},<br/> , &quot; &lt;===\n&quot; if $verbose;<br/><br/> # print page body<br/> foreach my $line ( @{$PAGES[$i]-&gt;{BODY}} ){<br/> # Replace _INTERNAL_SECTION with correct hyperlink<br/> while ($line =~ /_INTERN_SECTION:(.*?):_END/){<br/> my $a_name = $1;<br/> if (! defined $ANCHOR{$a_name}) {<br/> warn &quot;**** SECTIONREF with undefined anchor name &#39;$a_name&#39; detected\n&quot;;<br/> $line =~ s/_INTERN_SECTION:.*?:_END/_UNDEF_/; # will flag an error while processing with latex !<br/> next;<br/> }<br/> my $hd = $PAGES[$ANCHOR{$a_name}] -&gt; {HD};<br/> my $ref = &quot;PPPage$ANCHOR{$a_name}&quot;; <br/> $line =~ s/_INTERN_SECTION:.*?:_END/$hd}{$ref/; # two arguments, text and ID<br/> }<br/><br/> # Replace _INTERNAL_PAGE with correct hyperlink<br/> while ($line =~ /_INTERNAL_PAGE:(.*?):_END/){<br/> my $a_name = $1;<br/><br/> if (! defined $ANCHOR{$a_name}) {<br/> warn &quot;**** PAGE with undefined anchor name &#39;$a_name&#39; detected\n&quot;;<br/> $line =~ s/_INTERNAL_PAGE:.*?:_END/_UNDEF_/; # will flag an error while processing with latex !<br/> next;<br/> }<br/> my $anch= $ANCHOR{$a_name};<br/> my $ref=&quot;PPPage$ANCHOR{$a_name}&quot;;<br/> $line =~ s/_INTERNAL_XREF:.*?:_END/$ref/;<br/> }<br/><br/> # Replace _INTERNAL_XREF with correct hyperlink<br/> while ($line =~ /_INTERNAL_XREF:(.*?):_END/){<br/> my $a_name = $1;<br/><br/> if (! defined $ANCHOR{$a_name}) {<br/> warn &quot;**** XREF with undefined anchor name &#39;$a_name&#39; detected\n&quot;;<br/> $line =~ s/_INTERNAL_XREF:.*?:_END/_UNDEF_/; # will flag an error while processing with latex !<br/> next;<br/> }<br/> my $ref=&quot;PPPage$ANCHOR{$a_name}&quot;;<br/> $line =~ s/_INTERNAL_XREF:.*?:_END/$ref/;<br/> }<br/><br/><br/> print $line;<br/> } # loop over body lines<br/><br/>}<br/><br/>gen_index() unless $OPT{no_index};<br/>end_doc();<br/><br/>exit 0;<br/><br/># SUBROUTINES ##############################################################<br/><br/># helper function<br/>#----------------------------------------------------------<br/>sub begin_doc{<br/> print &quot;% Created by $me, build $VERSION from PerlPoint-Converters $PACK_VERSION\n&quot;;<br/> if (defined $OPT{prolog}) {<br/> # get prolog definitions from file<br/> my $prolog_file = $OPT{prolog};<br/> if (-e $prolog_file) {<br/> open(PR, &quot;&lt; $prolog_file&quot;) or die &quot;Cannot open prolog file $prolog_file: $!\n&quot;;<br/> } else {<br/> die &quot;Cannot find prolog file $prolog_file\n&quot;;<br/> }<br/> while(&lt;PR&gt;){<br/> print;<br/> }<br/> close(PR);<br/> } else {<br/><br/> print &lt;&lt;&#39;EOT&#39;;<br/>\documentclass [11pt] {article} % <br/>\usepackage{german} % ISO-Latin-Zeichensatz (&auml;&ouml;&uuml;&szlig;)<br/>\usepackage{isolatin1} % ISO-Latin-Zeichensatz (&auml;&ouml;&uuml;&szlig;)<br/>\parindent0pt % no indentation of first line<br/>\parskip1ex % white space between chapters<br/>\pagestyle{headings} %<br/>\usepackage{epsf}<br/>\usepackage{makeidx}<br/><br/>% setup for DIN A4<br/>\oddsidemargin3cm<br/>\evensidemargin3cm<br/>\setlength{\hoffset}{-1in} % compensation of<br/>\setlength{\voffset}{-2cm} % printer offset<br/><br/>\textwidth15cm<br/>\topmargin1cm<br/>\headheight3ex<br/>\headsep12pt<br/>\textheight23cm<br/>\setlength{\footskip}{1.5cm}<br/><br/>\makeindex<br/><br/>\begin{document}<br/><br/>\begin{flushleft}<br/><br/>EOT<br/> }<br/>} # begin_doc<br/><br/># flushleft ist fix alex<br/><br/>#----------------------------------------------------------<br/>sub end_doc{<br/><br/># fix alex<br/>print &quot;\n\n\\end{flushleft}\n&quot;;<br/><br/>print &quot;\n\n\\end{document}\n&quot;;<br/>} # end_doc<br/><br/><br/>#----------------------------------------------------------<br/>sub gen_index {<br/># print &quot;\n\\section{INDEX}\n\n&quot;;<br/># foreach my $idx (sort keys %INDEX) {<br/># print &quot;$idx \\textbf{ \\pageref{$INDEX{$idx}}}\\\\\n&quot;;<br/># }<br/> print &quot;\n\\printindex\n\n&quot;;<br/>} # gen_index<br/><br/>#----------------------------------------------------------<br/><br/><br/>#----------------------------------------------------------<br/>sub start_new_page {<br/> my ($level, @BF) = @_;<br/> $page_cnt ++;<br/> $PAGES[$page_cnt] = {<br/> BODY =&gt; [],<br/> LEVEL =&gt; $level,<br/> HD =&gt; join(&quot;&quot;, @BF),<br/><br/> };<br/> $page_ref = $PAGES[$page_cnt] -&gt; {BODY};<br/> my $hd = $PAGES[$page_cnt] -&gt; {HD};<br/> $ANCHOR{$hd} = $page_cnt; # insert anchor for this page<br/> #push @{$PAGES[$page_cnt]-&gt;{BODY}}, &quot;&lt;a name=\&quot;$hd\&quot;&gt;&quot;;<br/>} # start_new_page<br/><br/>#----------------------------------------------------------<br/># simple directive handlers<br/>sub handleSimple {<br/> push @BUFFER, escapes($_[2]);<br/>} # handleSimple<br/><br/>#----------------------------------------------------------<br/>sub handleHeadline {<br/> # $_[2] contains the level number of this header<br/> if ($_[1]==DIRECTIVE_START) {<br/> flush;<br/> } else {<br/> start_new_page($_[2], @BUFFER);<br/> my $section;<br/> $_[2]--;<br/> if ($_[2] == 0){<br/> $section = &#39;chapter&#39;;<br/> } elsif ($_[2] == 1){<br/> $section = &#39;section&#39;;<br/> } elsif ($_[2] == 2){<br/> $section = &#39;subsection&#39;;<br/> } elsif ($_[2] == 3){<br/> $section = &#39;subsubsection&#39;;<br/> } elsif ($_[2] == 4){<br/> $section = &#39;paragraph&#39;;<br/> } elsif ($_[2] == 5){<br/> $section = &#39;subparagraph&#39;;<br/> } else {<br/> $section = &#39;\\textbf&#39;;<br/> }<br/> push_page $page_ref, &quot;\n\n\\$section\{&quot;;<br/> flush;<br/> push_page $page_ref, &quot;}\n&quot;;<br/> push_page $page_ref, &quot;\\label{PPPage$page_cnt}\n&quot;;<br/> }<br/>} # handleHeadline<br/><br/>#----------------------------------------------------------<br/>sub handleList {<br/> flush;<br/> my $LIST;<br/> if ($_[0]==DIRECTIVE_ULIST){<br/> $LIST = &quot;itemize&quot;;<br/> } elsif ($_[0]==DIRECTIVE_OLIST){<br/> $LIST = &quot;enumerate&quot;;<br/> } elsif ($_[0]==DIRECTIVE_DLIST){<br/> $LIST = &quot;itemize&quot;;<br/> }<br/> if ($_[1]==DIRECTIVE_START){<br/> push_page $page_ref, &quot;\n\\begin{$LIST}\n&quot;;<br/> } else {<br/> push_page $page_ref, &quot;\\end{$LIST}\n&quot;;<br/> @BUFFER = ();<br/> }<br/> <br/>} # handleList<br/><br/>#----------------------------------------------------------<br/>sub handlePoint {<br/> flush;<br/> if ($_[1]==DIRECTIVE_START){<br/> push_page $page_ref, $li_start;<br/> } else {<br/> push_page $page_ref, $li_end;<br/> @BUFFER = ();<br/> }<br/>} # handlePoint<br/><br/>#----------------------------------------------------------<br/>sub handleDPoint {<br/> flush;<br/> if ($_[1]==DIRECTIVE_START){<br/> push_page $page_ref, &quot;\\item &quot;;<br/> } else {<br/> push_page $page_ref, &quot;\n\n&quot;;<br/> @BUFFER = ();<br/> }<br/>} # handleDPoint<br/><br/>#----------------------------------------------------------<br/>sub handleDPointItem {<br/> flush;<br/> if ($_[1]==DIRECTIVE_START){<br/> # no action<br/> } else {<br/> push_page $page_ref, &quot;\n\n&quot;;<br/> @BUFFER = ();<br/> }<br/>} # handleDPointItem<br/><br/>#----------------------------------------------------------<br/>sub handleText {<br/> flush;<br/> if ($_[1]==DIRECTIVE_START){<br/> push_page $page_ref, &quot;\n&quot;;<br/> } else {<br/> push_page $page_ref, &quot;\n&quot;;<br/> }<br/>} # handleText<br/><br/>#----------------------------------------------------------<br/>sub handleBlock { # code block with TAG recognition<br/>#TODO Es muessen alle PerlPoint tags aus dem BUFFER des<br/># Blocks entfernt werden, da Latex in \begin{verbatim} ...<br/># keine Ersetzungen wie \textbf etc. vornehmen kann !!<br/> handleVerbatim( $_[0], $_[1], $_[2]);<br/>} # handleBlock<br/><br/>#----------------------------------------------------------<br/>sub handleLShift {<br/> if ($_[1]==DIRECTIVE_START){<br/> push_page $page_ref, &quot;\n\% Shift &lt;\n&quot;;<br/> }<br/>} # handleLShift<br/><br/>#----------------------------------------------------------<br/>sub handleRShift {<br/> if ($_[1]==DIRECTIVE_START){<br/> push_page $page_ref, &quot;\n\% Shift &gt;\n&quot;;<br/> }<br/>} # handleRShift<br/><br/>#----------------------------------------------------------<br/>sub handleVerbatim { # verbatim block without TAG recognition<br/> flush;<br/> if ($_[1]==DIRECTIVE_START){<br/> $verbatim_flag = 1;<br/># push_page $page_ref, &quot;\n\\rule{\\textwidth}{1pt}\n&quot;;<br/> push_page $page_ref, &quot;\\begin{verbatim}\n&quot;;<br/> } else {<br/> push_page $page_ref, &quot;\\end{verbatim}&quot;;<br/># push_page $page_ref, &quot;\\rule{\\textwidth}{1pt}\n&quot;;<br/> $verbatim_flag = 0;<br/> }<br/>} # handleVerbatim<br/><br/>#----------------------------------------------------------<br/>sub handleComment {<br/> @BUFFER = (); # skip buffer contents<br/>} # handleComment<br/><br/>#----------------------------------------------------------<br/>sub e_escapes{<br/> my ($flag) = @_;<br/> if ($flag eq &quot;micro&quot;){<br/> return &quot;\$\\mu\$&quot;;<br/> } elsif ($flag eq &quot;uuml&quot;){<br/> return &quot;&uuml;&quot;;<br/> } elsif ($flag eq &quot;Uuml&quot;){<br/> return &quot;&Uuml;&quot;;<br/> } elsif ($flag eq &quot;auml&quot;){<br/> return &quot;&auml;&quot;;<br/> } elsif ($flag eq &quot;Auml&quot;){<br/> return &quot;&Auml;&quot;;<br/> } elsif ($flag eq &quot;ouml&quot;){<br/> return &quot;&ouml;&quot;;<br/> } elsif ($flag eq &quot;Ouml&quot;){<br/> return &quot;&Ouml;&quot;;<br/> } elsif ($flag eq &quot;szlig&quot;){<br/> return &quot;&szlig;&quot;;<br/> } elsif ($flag eq &quot;nbsp&quot;){<br/> return &quot; &quot;;<br/> } else {<br/> return &quot;__ this was HTML escape: $flag __&quot;; # --&gt; syntax error in latex<br/> }<br/>} # e_escapes<br/><br/>#----------------------------------------------------------<br/>sub handleTag {<br/><br/> # special tags<br/><br/> if ($_[2] eq &quot;C&quot;) { # special HTML escapes<br/> flush;<br/> if ($_[1]==DIRECTIVE_COMPLETE) {<br/> push_page $page_ref, &quot;}&quot;;<br/> } else {<br/> push_page $page_ref, &quot;\\texttt{&quot;;<br/> }<br/> return;<br/> }<br/> if ($_[2] eq &quot;E&quot;) { # special HTML escapes<br/> if ($_[1]==DIRECTIVE_COMPLETE) {<br/> push_page $page_ref, e_escapes( &quot;@BUFFER&quot;);<br/> @BUFFER = ();<br/> } else {<br/> flush;<br/> }<br/> return;<br/> }<br/><br/> # character formatting Tags: handle B I U SUP SUB<br/> if ($_[2] eq &quot;B&quot;){<br/> flush;<br/> return if $verbatim_flag;<br/> if ($_[1]==DIRECTIVE_START){<br/> push_page $page_ref, &quot;\\textbf{&quot;;<br/> } else {<br/> push_page $page_ref, &quot;}&quot;;<br/> }<br/> return;<br/> }<br/><br/> if ($_[2] eq &quot;I&quot;){<br/> flush;<br/> return if $verbatim_flag;<br/> if ($_[1]==DIRECTIVE_START){<br/> push_page $page_ref, &quot;\\textit{&quot;;<br/> } else {<br/> push_page $page_ref, &quot;}&quot;;<br/> }<br/> return;<br/> }<br/><br/> if ($_[2] eq &quot;U&quot;){<br/> flush;<br/> return if $verbatim_flag;<br/> if ($_[1]==DIRECTIVE_START){<br/> push_page $page_ref, &quot;\\underline{&quot;;<br/> } else {<br/> push_page $page_ref, &quot;}&quot;;<br/> }<br/> return;<br/> }<br/><br/> if ($_[2] eq &quot;SUP&quot;){<br/> flush;<br/> return if $verbatim_flag;<br/> if ($_[1]==DIRECTIVE_START){<br/> push_page $page_ref, &quot;\$^{&quot;;<br/> } else {<br/> push_page $page_ref, &quot;}\$&quot;;<br/> }<br/> return;<br/> }<br/><br/> if ($_[2] eq &quot;SUB&quot;){<br/> flush;<br/> return if $verbatim_flag;<br/> if ($_[1]==DIRECTIVE_START){<br/> push_page $page_ref, &quot;\$_{&quot;;<br/> } else {<br/> push_page $page_ref, &quot;}\$&quot;;<br/> }<br/> return;<br/> }<br/><br/> if ($_[2] eq &quot;PRINT_TOC&quot;){<br/> flush;<br/> if ($_[1]==DIRECTIVE_START){<br/> push_page $page_ref, &quot;\n\\tableofcontents\n\n\\newpage\n&quot;;<br/> }<br/> return;<br/> }<br/><br/> if ($_[2] eq &quot;MBOX&quot;){<br/> flush;<br/> if ($_[1]==DIRECTIVE_START){<br/> push_page $page_ref, &quot;\\mbox{&quot;;<br/> } else {<br/> push_page $page_ref, &quot;}\$&quot;;<br/> }<br/> return;<br/> }<br/><br/> if ($_[2] eq &quot;LINE_BREAK&quot; or $_[2] eq &quot;BR&quot;) { # line break<br/> if ($_[1]==DIRECTIVE_COMPLETE) {<br/> @BUFFER = ();<br/> push_page $page_ref, &quot;\\linebreak &quot;;<br/> } else {<br/> flush;<br/> }<br/> return;<br/> }<br/>#TODO anpassen; linie malen<br/> if ($_[2] eq &quot;HR&quot; ) { # horizontal line<br/> if ($_[1]==DIRECTIVE_COMPLETE) {<br/> @BUFFER = ();<br/> push_page $page_ref, &quot;\n\n----------------------------------------------------------\n\n&quot;;<br/> } else {<br/> flush;<br/> }<br/> return;<br/> }<br/> if ($_[2] eq &quot;BOXCOLORS&quot;) { # box color<br/> return<br/> }<br/><br/> if ($_[2] eq &quot;BOXCOLOR&quot;) { # box color<br/> if ($_[1]==DIRECTIVE_COMPLETE) {<br/> $box_bg_color = $BUFFER[0];<br/> @BUFFER = ();<br/> } else {<br/> flush;<br/> }<br/> return;<br/> }<br/> if ($_[2] eq &quot;BOXTEXT&quot;) { # box text color<br/> if ($_[1]==DIRECTIVE_COMPLETE) {<br/> $box_fg_color = $BUFFER[0];<br/> @BUFFER = ();<br/> } else {<br/> flush;<br/> }<br/> return;<br/> }<br/><br/>#TODO anpassen<br/> if ($_[2] eq &quot;IMAGE&quot;) { # image<br/> flush;<br/> if ($_[1]==DIRECTIVE_COMPLETE) {<br/> if ( !defined $_[3]-&gt;{&#39;src&#39;}) {<br/> die &quot;*** ERROR: Image without &#39;src&#39; parameter\n&quot;;<br/> }<br/> my $file = $_[3]-&gt;{&#39;src&#39;};<br/> my $opt = &quot;&quot;;<br/> push_page $page_ref, &quot;\n\n \% cool image from file $file \n\n&quot;;<br/> push_page $page_ref, &quot;\n \\begin{center}\n&quot;;<br/> if ( defined $_[3]-&gt;{&#39;epsfysize&#39;}) {<br/> my $ysize = $_[3]-&gt;{&#39;epsfysize&#39;};<br/> push_page $page_ref, &quot;\n\n \\epsfysize=$ysize\n&quot;;<br/> }<br/> if ( defined $_[3]-&gt;{&#39;epsfxsize&#39;}) {<br/> my $xsize = $_[3]-&gt;{&#39;epsfxsize&#39;};<br/> push_page $page_ref, &quot;\n\n \\epsfxsize=$xsize\n&quot;;<br/> }<br/> my $ps_file = $file;<br/> $ps_file =~ s/\.[^.]*$/.eps/;<br/> print STDERR &quot; ... image: $ps_file\n&quot;;<br/> if (-e $ps_file) {<br/> push_page $page_ref, &quot;\n\n\\epsffile{$ps_file}\n\n&quot;;<br/> } else {<br/> push_page $page_ref, &quot;\n\n (image from file $file) \n\n&quot;;<br/> }<br/> push_page $page_ref, &quot;\n \\end{center}\n&quot;;<br/> }<br/> return;<br/> }<br/><br/>#TODO anpassen<br/> if ($_[2] eq &quot;F&quot; ) { # set color and size<br/> flush;<br/> if ($_[1]==DIRECTIVE_START){<br/> my $params = &quot;&quot;;<br/> if ( defined $_[3]-&gt;{&#39;color&#39;}) {<br/> $params = &quot;$params color=$_[3]-&gt;{&#39;color&#39;}&quot;;<br/> }<br/> if ( defined $_[3]-&gt;{&#39;size&#39;}) {<br/> $params = &quot;$params size=$_[3]-&gt;{&#39;size&#39;}&quot;;<br/> }<br/> push_page $page_ref, &quot;&quot;;<br/> } else {<br/> push_page $page_ref, &quot;&quot;;<br/> }<br/> return;<br/> }<br/><br/> if ($_[2] eq &quot;A&quot;) { # Anchor Tag<br/> flush;<br/> # print STDERR &quot;@_\n&quot; if $verbose;<br/> # print STDERR Dumper($_[3]) if $verbose;<br/> if ($_[1]==DIRECTIVE_COMPLETE) {<br/> if ( !defined $_[3]-&gt;{&#39;name&#39;}) {<br/> die &quot;*** ERROR: Anchor without &#39;name&#39; parameter\n&quot;;<br/> }<br/> my $a_name = $_[3]-&gt;{&#39;name&#39;};<br/> push_page $page_ref, &quot;\\label{$a_name}&quot;;<br/> # Remember page number for later reference:<br/> if (defined $ANCHOR{$a_name}){<br/> warn &quot;**** anchor name $a_name used twice !!\n&quot;;<br/> } else {<br/> $ANCHOR{$a_name} = $page_cnt;<br/> }<br/> }<br/> return;<br/> }<br/># TODO: \URL<br/><br/> if ($_[2] eq &quot;L&quot;) { # general URL<br/> if ($_[1]==DIRECTIVE_COMPLETE) {<br/> if ( !defined $_[3]-&gt;{&#39;url&#39;}) {<br/> warn &quot;*** ERROR: Hyperlink \L without &#39;url&#39; parameter\n&quot;;<br/> }<br/> my $link_text = join(&quot;&quot;,@BUFFER);<br/><br/># fix alex!! 2001-04-17<br/><br/> my $url = $_[3]-&gt;{&#39;url&#39;};<br/> push_page $page_ref, &quot;\\PPurl{&quot; . $link_text . &quot;}{&quot; . escapes($url) . &quot;}&quot;;<br/> @BUFFER=();<br/><br/> } else {<br/> flush;<br/> }<br/> return;<br/> }<br/> if ($_[2] eq &quot;PAGEREF&quot;) { # page reference<br/> if ($_[1]==DIRECTIVE_COMPLETE) {<br/> if ( !defined $_[3]-&gt;{&#39;name&#39;}) {<br/> warn &quot;*** ERROR: PAGEREF without &#39;name&#39; parameter\n&quot;;<br/> }<br/> my $a_name = $_[3]-&gt;{&#39;name&#39;};<br/> push_page $page_ref, &quot;\\PPPageref{_INTERNAL_PAGE:$a_name:_END}&quot;; # to be replaced later ...<br/> } else {<br/> flush;<br/> }<br/> return;<br/> }<br/> if ($_[2] eq &quot;SECTIONREF&quot;) { # section header reference<br/> if ($_[1]==DIRECTIVE_COMPLETE) {<br/> if ( !defined $_[3]-&gt;{&#39;name&#39;}) {<br/> warn &quot;*** ERROR: PAGEREF without &#39;name&#39; parameter\n&quot;;<br/> }<br/> my $a_name = $_[3]-&gt;{&#39;name&#39;};<br/> push_page $page_ref, &quot;\\PPSref{_INTERN_SECTION:$a_name:_END}&quot;; # to be replaced later ...<br/> } else {<br/> flush;<br/> }<br/> return;<br/> }<br/> if ($_[2] eq &quot;XREF&quot;) { # internal cross reference<br/> if ($_[1]==DIRECTIVE_COMPLETE) {<br/> if ( !defined $_[3]-&gt;{&#39;name&#39;}) {<br/> warn &quot;*** ERROR: XREF without &#39;name&#39; parameter\n&quot;;<br/> }<br/> my $ref_text = join(&quot;&quot;,@BUFFER);<br/> my $a_name = $_[3]-&gt;{&#39;name&#39;};<br/> push_page $page_ref, &quot;\\PPXref{$ref_text}{_INTERNAL_XREF:$a_name:_END}&quot;;<br/> @BUFFER = ();<br/> } else {<br/> flush;<br/> }<br/> return;<br/> }<br/><br/> if ($_[2] eq &quot;X&quot;) { # index entry<br/> if ($_[1]==DIRECTIVE_COMPLETE) {<br/> my $idx = join(&quot;&quot;,@BUFFER);<br/> $idx_cnt ++;<br/> my $index_anchor = &quot;index:$page_cnt&quot; . &quot;:$idx_cnt&quot;;<br/> $INDEX{$idx} = $index_anchor;<br/> push_page $page_ref, &quot;\\label{$index_anchor}&quot;;<br/><br/> push_page $page_ref, &quot;\\index{$idx}&quot;;<br/><br/> if ( defined $_[3]-&gt;{&#39;mode&#39;} and $_[3]-&gt;{&#39;mode&#39;} eq &quot;index_only&quot;){<br/> @BUFFER = ();<br/> }<br/> } else {<br/> flush;<br/> }<br/> return;<br/> }<br/><br/> if ($_[2] eq &quot;TABLE&quot;) { # TABLE<br/> flush;<br/> if ($_[1]==DIRECTIVE_START) {<br/> my $cols = &quot;|c|c|c|c|&quot;;<br/> if ( defined $_[3]-&gt;{&#39;columns&#39;}) {<br/> $cols = $_[3]-&gt;{&#39;columns&#39;};<br/> }<br/> push_page $page_ref, &quot;\n\n\\vspace{1ex}\n\\begin{tabular}{$cols}\n&quot;;<br/> push_page $page_ref, &quot;\\hline\n&quot; unless $OPT{double_lines};<br/> } else {<br/> push_page $page_ref, &quot;\n\n\\end{tabular}\n\n&quot;;<br/> }<br/> return;<br/> }<br/><br/> if ($_[2] eq &quot;TABLE_HL&quot;) { # TABLE<br/> flush;<br/> if ($_[1]==DIRECTIVE_START) {<br/> push_page $page_ref, &quot;\\bf &quot;;<br/> } else {<br/> push_page $page_ref, &quot; &amp; &quot;; # &amp;<br/> }<br/> return;<br/> }<br/><br/> if ($_[2] eq &quot;TABLE_ROW&quot;) { # TABLE<br/> flush;<br/> if ($_[1]==DIRECTIVE_START) {<br/> push_page $page_ref, &quot;\\hline\n&quot; if $OPT{double_lines};<br/> } else {<br/> pop (@$page_ref); # to remove extra &#39;&amp;&#39;<br/> push_page $page_ref, &quot;\\\\\\hline\n&quot;;<br/> }<br/> return;<br/> }<br/><br/> if ($_[2] eq &quot;TABLE_COL&quot;) { # TABLE<br/> flush;<br/> if ($_[1]==DIRECTIVE_START) {<br/> push_page $page_ref, &quot;&quot;;<br/> } else {<br/> push_page $page_ref, &quot; &amp; &quot;; # &amp;<br/> }<br/> return;<br/> }<br/><br/><br/> if ($_[2] eq &quot;EMBED&quot;) { # embeded LaTeX<br/> flush;<br/> if ($_[1]==DIRECTIVE_START) {<br/> if ( !defined $_[3]-&gt;{&#39;lang&#39;}) {<br/> pp_warn &quot;ERROR: EMBED without &#39;lang&#39; parameter\n&quot;;<br/> }<br/> elsif ($_[3]-&gt;{&#39;lang&#39;} =~ /latex/i){<br/> $embedded_latex = 1;<br/> }<br/> } else {<br/> $embedded_latex = 0;<br/> }<br/> @BUFFER=();<br/> return;<br/> }<br/><br/> if ($_[2] eq &#39;LOCALTOC&#39;) { # ste, ldo<br/> # act mode dependend - we only need to handle this once, there is no tag body<br/> if ($_[1]==DIRECTIVE_START)<br/> {<br/> # get local toc<br/> my $toc=$backend-&gt;toc(<br/> $backend-&gt;currentChapterNr,<br/> exists $_[3]-&gt;{depth} ? $_[3]-&gt;{depth} : 0,<br/> );<br/><br/> # anything found?<br/> if (@$toc)<br/> {<br/> # make it into a list<br/> push_page $page_ref, &quot;\n\n\\begin{itemize}\n&quot;;<br/> push_page $page_ref, &#39; \\item &#39;, &#39; &#39;, $_-&gt;[1], &quot;\n&quot; for @$toc;<br/> push_page $page_ref, &quot;\n\\end{itemize}\n\n&quot;;<br/> }<br/> }<br/><br/> # ok, well done<br/> return;<br/> }<br/><br/> warn &quot;**** $me: unkown or not yet implemented tag: $_[2]\n&quot;;<br/>} # handleTag<br/><br/>#----------------------------------------------------------<br/>sub handleDocument {<br/> if ($_[1]==DIRECTIVE_START) {<br/> warn &quot;\n[Info] Document start ($_[2]).\n&quot; if $verbose;<br/><br/> }<br/> else {<br/><br/> warn &quot;\n[Info] Document end ($_[2]).\n&quot; if $verbose;<br/> }<br/>} # handleDocument<br/><br/>#----------------------------------------------------------<br/>sub flush {<br/> push_page $page_ref, @BUFFER;<br/> push @ERRBUFFER, @BUFFER;<br/> @BUFFER = ();<br/> # trim ERRBUFFER:<br/> @ERRBUFFER = grep (!/^\s*$/ ,@ERRBUFFER);<br/> for (my $k=1;$k&lt;scalar(@ERRBUFFER)-6;$k++){<br/> shift @ERRBUFFER;<br/> }<br/>}<br/><br/>#----------------------------------------------------------<br/>sub push_page {<br/> # push $text to current page buffer<br/> my ($page_ref, @text) = @_;<br/> push @$page_ref, @text;<br/>} # push_page<br/><br/>#---------------------------------------------------------------<br/>sub save {<br/> my $it = $_[0];<br/> $it =~ y/\000-\177/\200-\377/;<br/> return $it;<br/>} # save<br/>#----------------------------------------------------------<br/>sub escapes {<br/> my $line = shift;<br/> return $line if $embedded_latex;<br/> return $line if $verbatim_flag;<br/> $line =~ s!\334!save(&#39;&quot;U&#39;)!ge; #&quot;<br/> $line =~ s!\374!save(&#39;&quot;u&#39;)!ge; #&quot;<br/> $line =~ s!\326!save(&#39;&quot;O&#39;)!ge; #&quot;<br/> $line =~ s!\366!save(&#39;&quot;o&#39;)!ge; #&quot;<br/> $line =~ s!\304!save(&#39;&quot;A&#39;)!ge; #&quot;<br/> $line =~ s!\344!save(&#39;&quot;a&#39;)!ge; #&quot;<br/> $line =~ s!\337!save(&#39;&quot;s&#39;)!ge; #&quot;<br/> $line =~ s!\$!save(&quot;\\\$&quot;)!ge;<br/> $line =~ s!\\!\$\\backslash\$!g;<br/> $line =~ s!&amp;!\\&amp;!g;<br/> $line =~ s!#!\\#!g;<br/> $line =~ s!%!\\%!g;<br/> $line =~ s!~!\\char126!g;<br/> $line =~ s!_!\\_!g;<br/> $line =~ s!\^!\\char94!g;<br/> $line =~ s!{!\\{!g;<br/> $line =~ s!}!\\}!g;<br/> $line =~ s!&gt;!{\\tt&gt;}!g;<br/> $line =~ s!&lt;!{\\tt&lt;}!g;<br/> $line =~ s!&quot;!{\\char34}!g; #&#39;<br/> $line =~ y/\200-\377/\000-\177/;<br/><br/> return $line;<br/>} #&quot; escapes<br/><br/>#----------------------------------------------------------<br/>sub insert_template {<br/> my ($f, $page_no, $what) = @_;<br/>} # insert_template<br/>#----------------------------------------------------------<br/><br/>#----------------------------------------------------------<br/>sub pp_warn {<br/> my ($message) = @_;<br/> print STDERR &quot;*** $me: $message\n&quot;;<br/> print STDERR &quot;context: ------\n@ERRBUFFER\n---------------\n&quot;;<br/>} # pp_warn<br/><br/><br/>__END__<br/><br/><br/><br/># = POD SECTION ============================================================<br/><br/>=head1 NAME<br/><br/>B&lt;pp2latex&gt; - PerlPoint to LaTeX converter<br/><br/>=head1 VERSION<br/><br/>This man page describes $Revision: 1.14 $<br/>from PerlPoint::Converters Package 1.01<br/><br/><br/>=head1 SYNOPSIS<br/><br/> pp2latex --help<br/> pp2latex [@options_file] [options] slide_text <br/><br/>=head1 DESCRIPTION<br/><br/>C&lt;pp2latex&gt; creates a LaTeX file from a PerlPoint input file.<br/><br/><br/>=head1 SYNTAX of PerlPoint Files<br/><br/>For a detailed description of the PerlPoint language please refer to the<br/>excellent POD documentation of the B&lt;PerlPoint::Parser&gt; Module by Jochen Stenzel.<br/>There you will find everything you ever wanted to know about PerlPoint ;-)<br/><br/><br/>=head1 OPTIONS<br/><br/>=over 4<br/><br/>=item --filter=regexp<br/><br/>This specifies a regular expression C&lt;regexp&gt; which should match<br/>all allowed languages for EMBEDed code. The expression is evaluated<br/>caseinsensitively.<br/><br/>Example: --filter=&quot;perl|latex&quot;<br/><br/>=item --prolog=filename<br/><br/>Specifies a file which must contain the LaTeX Declarations for the document.<br/>C&lt;\documentclass&gt; and C&lt;\begin{document}&gt; must be defined there.<br/><br/>=item --activeContents<br/><br/>PerlPoint sources can embed Perl code which is evaluated while the source is parsed. For<br/>reasons of security this feature is deactivated by default. Set this option to active<br/>it. You can use I&lt;--safeOpcode&gt; to fine tune which operations shall be permitted.<br/><br/>=item --double_lines<br/><br/>This option has the effect that all horizontal Lines in Tables are<br/>doubled.<br/><br/>=item --cache<br/><br/>parsing of one and the same document several times can be accelerated by activating the<br/>PerlPoint parser cache by this option. The performance boost depends on your document<br/>structure.<br/><br/>Cache files are written besides the source and named &quot;.&lt;source file&gt;.ppcache&quot;.<br/><br/>It can be useful to (temporarily) deactivate the cache to get correct line numbers in<br/>parser error messages (currently numbers cannot always reported correctly with activated<br/>cache because of a special perl behaviour).<br/><br/>=item --cacheCleanup<br/><br/>PerlPoint parser cache files grow (with every modified version of a source parsed)<br/>because they store expressions for every parsed variant of a paragraph. This is usually<br/>uncritical but you may wish to clean up the cache occasionally. Use this option to<br/>perform the task (or remove the cache file manually).<br/><br/><br/>=item -nocopyright<br/><br/>suppresses the copyright message;<br/><br/>=item -noinfo<br/><br/>supresses runtime informations;<br/><br/>=item --nowarn<br/><br/>supresses warnings;<br/><br/>=item --quiet<br/><br/>a shortcut for &quot;--nocopyright --noinfo --nowarn&quot;: all non critical runtime messages are suppressed;<br/><br/>=item --safeOpcode &lt;opcode&gt;<br/><br/>If active contents is enabled (I&lt;--activeContents&gt;), Perl code embedded into the translated PerlPoint sources will be<br/>evaluated. To keep security this is done via an object of class B&lt;Safe&gt; which restricts code<br/>to permitted operations. By this option you can declare which opcode (or opcode tag) is<br/>permitted. Please see the B&lt;Safe&gt; and B&lt;Opcode&gt; manual pages for further details. (These modules<br/>come with perl.)<br/><br/>This option can be used multiply.<br/><br/>You may want to store these options in default option files, see below for details.<br/><br/><br/>For the examples used in I&lt;ppdoc.pp&gt; you should use<br/><br/> --safeOpcode=:filesys_open --safeOpcode=:still_to_be_decided --safeOpcode=:browse<br/><br/><br/>=item --set &lt;flag&gt;<br/><br/>This option allows you to pass certain settings - of your choice - to active contents<br/>(like conditions) where it can be accessed via the $PerlPoint hash reference. For<br/>example, your PerlPoint code could contain a condition like<br/><br/> ? $PerlPoint-&gt;{userSettings}{special}<br/><br/> Special part.<br/><br/> ? 1<br/><br/>. The special part enclosed by the two conditions would then be processed I&lt;only&gt; if you<br/>call C&lt;pp2html&gt; with<br/><br/> --set special<br/><br/>- and if active contents was enabled by I&lt;-active&gt;, of course.<br/><br/>This option can be used multiply.<br/><br/>=item --trace [&lt;level&gt;]<br/><br/>activates traces of the specified level. You may use the environment variable SCRIPTDEBUG<br/>alternatively (but an option overwrites environment settings). The following levels are<br/>defined (use the I&lt;numeric&gt; values) - if a description sounds cryptic to you, just ignore<br/>the setting:<br/><br/>=item --help<br/><br/>Output of usage.<br/><br/>=item --version<br/><br/>Output of version information.<br/><br/>=back<br/><br/>=head1 FILES<br/><br/>Configuration file $HOME/.pp2latex<br/><br/>=head1 ENVIRONMENT<br/><br/>The following environment variables have influence on the program:<br/><br/>=over 4<br/><br/>=item SCRIPTDEBUG<br/><br/>may be set to a numeric value to activate certain trace levels. You can use option I&lt;-trace&gt;<br/>alternatively (note that a used option overwrites an environment setting). The several levels<br/>are described with this option.<br/><br/>=back<br/><br/><br/>=head1 SEE ALSO<br/><br/>C&lt;pp2html&gt;<br/><br/>=head1 AUTHOR<br/><br/>Lorenz Domke (lorenz.domke@gmx.de), 2001. All rights reserved.<br/><br/>=cut<br/><br/><br/># = HISTORY SECTION ========================================================<br/><br/># --------------------------------------------------------------------------<br/># version | date | author | changes<br/># --------------------------------------------------------------------------<br/># 0.02 |12.10.99| ste | added a simple backend;<br/># 0.01 |09.10.99| ste | derived from the PP::Parser draft.<br/># --------------------------------------------------------------------------<br/><br/>$Log: pp2latex,v $<br/>Revision 1.14 2001/12/19 21:04:43 lorenz<br/>Final commit for Version 1.001<br/><br/>Revision 1.13 2001/12/18 22:51:07 lorenz<br/>Checkin for version 1.01<br/><br/>Revision 1.12 2001/12/06 21:38:06 lorenz<br/>more tests<br/><br/>Revision 1.11 2001/11/30 00:46:22 lorenz<br/>new cvs version<br/><br/>Revision 1.10 2001/10/02 08:47:56 lorenz<br/>LOCALTOC<br/><br/>Revision 1.12 2001/08/16 04:06:46 lorenz<br/>checkin for/after 0.11.01<br/><br/>Revision 1.11 2001/06/15 15:56:02 lorenz<br/>ci for Release 0.10 (final)<br/><br/>Revision 1.10 2001/06/14 12:00:56 lorenz<br/>checkin for version 0.10_05<br/><br/>Revision 1.9 2001/03/11 11:55:11 lorenz<br/>checkin for version 0.009<br/><br/>Revision 1.8 2001/03/06 21:21:28 lorenz<br/>checkin for 0.009<br/><br/>Revision 1.7 2001/01/17 22:24:16 lorenz<br/>checkin for version 0.008<br/><br/>Revision 1.6 2000/12/10 22:48:37 lorenz<br/>check in for firest CPAN version<br/><br/>Revision 1.5 2000/11/02 19:37:48 lorenz<br/>checkin for 0.006<br/><br/>Revision 1.4 2000/10/25 20:02:39 lorenz<br/>support eps<br/><br/>Revision 1.3 2000/08/04 19:56:52 lorenz<br/>check<br/><br/>Revision 1.2 2000/08/04 17:29:42 lorenz<br/>sub save<br/><br/>Revision 1.1 2000/07/11 20:02:59 lorenz<br/>Initial revision<br/><br/>Revision 1.1 2000/04/27 21:28:36 lorenz<br/>Initial revision<br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2003/01/msg72.html Thu, 30 Jan 2003 16:35:26 +0000 Updates: PerlPoint::Package 0.38, Pod::PerlPoint 0.03 by jochen.stenzel Hello,<br/><br/>I just releaed these two packages, PerlPoint::Package 0.38 and<br/>Pod::PerlPoint 0.03.<br/><br/>PerlPoint::Package fixes a few bugs, especially in the paragraph filter<br/>implementation. I used pfilters in a large presentation project and so I<br/>recognized the bugs ;-) Now, with the fixes, they work pretty well for me.<br/><br/>Besides other fixes and small improvements, there is a new feature called<br/>&quot;input filters&quot;. In preparation of another project which will combine sources<br/>by a significant number of authors which might be probably new to PerlPoint, I<br/>thought it might be helpful to integrate POD sources directly, as POD is<br/>very common. In a first step, I thought of a general solution for any language a<br/>user might have sources at hand in. So finally input filters are there. (And<br/>now you know why I wrote Pod::PerlPoint ;-)<br/><br/>Using input filters is pretty straight forward. First one has to define the<br/>function to use:<br/><br/> \EMBED{lang=perl}<br/><br/> use Pod::PerlPoint 0.03;<br/><br/> sub pod2pp<br/> {<br/> my ($pod2pp, $result)=(new Pod::PerlPoint());<br/> $pod2pp-&gt;output_string(\$result);<br/> $pod2pp-&gt;parse_string_document(@main::_ifilterText);<br/> $result;<br/> }<br/><br/> \END_EMBED<br/><br/><br/>Then, you can refer to it when embedding or including sources. Like so:<br/><br/> \EMBED{ifilter=pod2pp lang=pp}<br/><br/> =head1 POD headline<br/><br/> POD text.<br/><br/> \END_EMBED<br/><br/><br/>and so:<br/><br/> \INCLUDE{file=&quot;source.pod&quot; ifilter=pod2pp type=pp}<br/><br/><br/>If you are interested, take a look at the new demo file demo/perlpods.pp<br/>which processes all POD&#39;s of your running perl. (Make sure to use -active and<br/>-safe ALL, and deactivate the cache.)<br/><br/>As always, I&#39;m interested in any feedback.<br/><br/>Greetings<br/><br/> Jochen<br/><br/><br/>-- <br/>+++ GMX - Mail, Messaging &amp; more http://www.gmx.net +++<br/>NEU: Mit GMX ins Internet. Rund um die Uhr f&uuml;r 1 ct/ Min. surfen!<br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2003/01/msg71.html Sat, 04 Jan 2003 15:08:47 +0000 Pod::PerlPoint 0.02 released by Jochen Stenzel Hello,<br/><br/>I just released a first public version of Pod::PerlPoint, a<br/>supplementary package that provides a POD =&gt; PerlPoint translator<br/>module and a ready to run translator pod2pp.<br/><br/>It was successfully tested with POD docs from the perl 5.8.0<br/>distribution. Currently, list level shifts are ignored, but except of<br/>this it should be fairly complete. I hope ;-)<br/><br/>Greetings<br/><br/> Jochen<br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/12/msg70.html Fri, 20 Dec 2002 04:28:55 +0000 Re: lists by Robert Inder <br/>&gt;&gt;&gt;&gt;&gt; Jerrad Pierce writes:<br/> &gt; To: perlpoint@perl.org<br/> &gt; Subject: lists<br/> &gt; Date: Wed, 07 Aug 2002 14:01:57 -0400<br/><br/> &gt; pp2html claims to support deifntion lists,<br/> &gt; and the parser seems to have some code for it...<br/> &gt; but nowhere is the syntax for marking up definition lists given.<br/><br/>It is given in the reference manual for pp2html.<br/><br/>It is also documented in a file parser-paragraphs.pp in the<br/>&quot;doc&quot; directory of PerlPoint-Package.<br/><br/>The answer is...<br/><br/>:Item 1:Here is the description of the first item.<br/><br/>:Item 2:Here is the description of the second item.<br/><br/> &gt; It seems the ability to embed lists would be useful, somehthing like:<br/><br/> &gt; * Foo<br/><br/> &gt; * * Bar<br/><br/> &gt; giving<br/><br/> &gt; &lt;ul&gt;<br/> &gt; &lt;li&gt;Foo&lt;ul&gt;<br/> &gt; &lt;li&gt;Bar&lt;/li&gt;<br/> &gt; &lt;/ul&gt;&lt;/li&gt;<br/> &gt; &lt;/ul&gt;<br/><br/><br/>This is sort-of there:<br/><br/> * One<br/><br/> * Two<br/><br/> &gt;<br/><br/> * Two A<br/><br/> * Two B<br/><br/> &lt;<br/><br/> * Three<br/><br/>could (indeed should) produce what you want, though in fact it<br/>actually produces...<br/><br/> &lt;UL&gt;<br/> &lt;LI&gt;One&lt;/LI&gt;<br/> &lt;LI&gt;Two&lt;/LI&gt;<br/> &lt;/UL&gt;<br/> &lt;UL&gt;<br/><br/> &lt;UL&gt;<br/> &lt;LI&gt;Two A&lt;/LI&gt;<br/> &lt;LI&gt;Two B&lt;/LI&gt;<br/> &lt;/UL&gt;<br/> &lt;/UL&gt;<br/><br/> &lt;UL&gt;<br/> &lt;LI&gt;Three&lt;/LI&gt;<br/> &lt;/UL&gt;<br/><br/>Robert.<br/><br/>-- <br/>Robert Inder Interactive Information, 07770 30 40 52 (general)<br/>07808 492 213 3, Lauriston Gardens, 0131 229 1052 (fax)<br/> Edinburgh EH3 9HH <br/> SCOTLAND UK<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/08/msg69.html Wed, 07 Aug 2002 13:53:33 +0000 lists by Jerrad Pierce <br/>pp2html claims to support deifntion lists,<br/>and the parser seems to have some code for it...<br/>but nowhere is the syntax for marking up definition lists given.<br/><br/>It seems the ability to embed lists would be useful, somehthing like:<br/><br/>* Foo<br/><br/>* * Bar<br/><br/>giving<br/><br/>&lt;ul&gt;<br/>&lt;li&gt;Foo&lt;ul&gt;<br/>&lt;li&gt;Bar&lt;/li&gt;<br/>&lt;/ul&gt;&lt;/li&gt;<br/>&lt;/ul&gt;<br/><br/>-- <br/>H4sICNoBwDoAA3NpZwA9jbsNwDAIRHumuC4NklvXTOD0KSJEnwU8fHz4Q8M9i3sGzkS7BBrm<br/>OkCTwsycb4S3DloZuMIYeXpLFqw5LaMhXC2ymhreVXNWMw9YGuAYdfmAbwomoPSyFJuFn2x8<br/>Opr8bBBidccAAAA=<br/>--<br/>MOTD on Prickle-Prickle, the 73rd of Confusion, in the YOLD 3168:<br/>No man is an island, but then no man is a potato salad, either.<br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/08/msg68.html Wed, 07 Aug 2002 11:13:51 +0000 Net::Telnet Module by Ramasubramaniam, Narayan Hi All,<br/><br/>I am using the Net::Telnet module from NT to telnet to unix boxes<br/>successfully.<br/><br/>We are migrating to SSH and wondering if there is any Perl Module which can<br/>do the same trick. Or can I use the same Net::Telnet module with some<br/>tweaks.<br/><br/>Much appreciate any help.<br/><br/>Regards,<br/><br/>Narayan R.<br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/05/msg67.html Tue, 28 May 2002 13:47:52 +0000 pp2html: template thoughts by Jochen Stenzel Hello,<br/><br/>for the templates of pp2html, I had a look at the HTML::Template<br/>module. I think it is definitely one of the modules to be taken into<br/>account and only needs a few prerequisites.<br/><br/>But there might be other options like the Template::Toolkit which seems<br/>to be the most powerful alternative, providing even the evaluation of<br/>embedded Perl code. So I suggest the following (first thoughts for<br/>discussion, by no means final or complete):<br/><br/>* Let&#39;s abstract the current pp2html output generator code in order to<br/> establish a clear, documented, generic API. We&#39;ll have to figure out<br/> what data needs to be passed to a generic generator.<br/><br/>* A pp2html option should configure which backend to use. For styles,<br/> it can be set in the style option files.<br/><br/>* The current implementation could become the first API backend, both<br/> as a proof of concept and to provide backwards compatibility.<br/><br/>* Another new API backend could use HTML::Template, another one<br/> Template::Toolkit, etc., so everyone can use what he prefers.<br/> Users will not even have to know which template system is used,<br/> they still chose a style by -style.<br/><br/>HTML::Template backend in particular:<br/><br/>* It seems to be small, fast and powerful. If it&#39;s not fast enough,<br/> according to CPAN there&#39;s even a JIT compiler around, and if I<br/> understood it correctly, precompiled templates can be used even<br/> without an installation of HTML::Template.<br/><br/>* Several additional modules add further features like regular<br/> expression support.<br/><br/>* It is mostly based on variable substitution, right like the current<br/> template system. Migration of existing styles should be pretty<br/> straightforward. Everything possible today should be possible<br/> with HTML::Template as well.<br/><br/>* Ease of use: in my opinion it is important that users can set up and<br/> adapt layout styles without long studies. HTML::Template could<br/>provide<br/> this.<br/><br/>* I&#39;m not sure yet how to support docstreams, possibly by loops and<br/> conditions?<br/><br/>What do you think?<br/><br/> Jochen<br/><br/><br/><br/><br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/04/msg66.html Sat, 27 Apr 2002 05:41:10 +0000 PerlPoint::Package 0.37 released by Jochen Stenzel Hello,<br/><br/>I just published a new version of PerlPoint::Package via CPAN. It is a<br/>maintenance update that does not require new converters - so documents<br/>and converters do not need to be updated. (Incompatible changes are<br/>just extensions not affecting existing software.)<br/><br/>0.37 was tested successfully both with perl 5.005 and perl 5.6.<br/><br/>What&#39;s new? Here are the highlights:<br/><br/>* \INCLUDE takes care of *search pathes* now. For easy use<br/> with existing converters, pathes can be set up by an environment<br/> variable PERLPOINTLIB. Adapted converters will provide a new<br/> option &quot;-includelib&quot; as well.<br/><br/> This feature will allow to use a central repository of base<br/> and example files, code and macro libs and filters. It is also<br/> intended to be a step to a modular PerlPoint doc which is built<br/> on base of parts installed (and updated) with PerlPoint::Package<br/> while converters add their own frame documents.<br/><br/>* Paragraph filters hopefully are really usable now. They still<br/> had bugs but should work much better with 0.37. Lots of tests<br/> added for the filters. Filter API slightly extended.<br/><br/>* Cache bugs fixed - the cache can be used with \REF and \SEQ<br/> now as well.<br/><br/>* As usual, pp2sdf supports the new features as a reference<br/> converter.<br/><br/>* Docs updated.<br/><br/><br/>So ... oh, wait a moment, that&#39;s not all yet. ;-) I delayed the results<br/>of our discussions:<br/><br/><br/>* Headline shortcuts. Robert asked for them, and now you can write<br/><br/> =A very long headline, it might be shortened<br/> ~ Long headline<br/><br/> The &quot;~&quot; starts the shortcut. Unfortunately, this definitely needs<br/> adapted converters, so be patient ;-)<br/><br/>* Document Streams. Do you remember the layout discussion initiated<br/> by Robert? Now a PerlPoint document can be composed by several<br/> threads in parallel. Have a look at a new source:<br/><br/> =Main stream<br/><br/> Every headline switches back to it.<br/><br/> ~A first Document Stream<br/><br/> The stream includes everything before the next stream<br/> entry point or headline, whatever comes first.<br/><br/> ~Another docstream<br/><br/> One can use as many as necessary, named as one prefers.<br/><br/> =Back to the main stream<br/><br/> ...<br/><br/> It&#39;s up to a converter how to deal with those streams.<br/> Nevertheless, the parser directly supports several methods:<br/> it can transform stream titles into subheadlines, or<br/> ignore all stream contents, or just process the streams.<br/> It can also *ignore* certain streams selectively<br/> (by title) if requested.<br/><br/>* Several conditions, one call of flagSet(). Helmut Steinbach<br/> asked for an easier use of flagSet() for complex conditions,<br/> and so I allowed<br/><br/> flagsSet(qw(a b all))<br/><br/> as a shortcut of<br/><br/> flagSet(&#39;a&#39;) or flagSet(&#39;b&#39;) or flagSet(&#39;all&#39;)<br/><br/><br/>All feedback is appreciated.<br/><br/>Enjoy!<br/><br/> Jochen<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/04/msg65.html Sat, 27 Apr 2002 04:53:26 +0000 Re: Is perl5.005 still a need? by Jochen Stenzel Hello,<br/><br/>a few answers I got privately indicate that in business environments<br/>perl 5.005 ist still in use. So ok, we&#39;ll try to continue 5.005<br/>support.<br/><br/>Fortunately, I figured out why the tests failed under 5.005 ;-)<br/><br/>Greetings<br/><br/> Jochen<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/04/msg64.html Wed, 17 Apr 2002 15:36:03 +0000 Re: DocBook converter (was: Is perl5.005 still a need?) by Jochen Stenzel <br/>&gt;By the way, I&#39;m starting to look into DocBook. Is there already a<br/>&gt;pp2docbook around?<br/><br/>Not yet. I&#39;ll post this part back to the list as well, as it might be<br/>of interest for other people, too. I&#39;m not using DocBook yet, but if<br/>someone is interested in implementing such a converter, I&#39;d be glad to<br/>support this.<br/><br/>Greetings<br/><br/> Jochen<br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/04/msg63.html Wed, 17 Apr 2002 01:54:45 +0000 Is perl5.005 still a need? by Jochen Stenzel Hello,<br/><br/>I&#39;m working on a new (and almost ready) package version and just<br/>recognized that the test suite fails under 5.005. ;-( The code seems to<br/>work slightly different in perl 5.6 and perl 5.005.<br/><br/>That&#39;s the background of my question: we are still trying to support<br/>perl 5.005, and I&#39;d really like to continue this. On the other hand, it<br/>becomes more and more difficult and expensive to do so. So what do you<br/>think: while perl 5.8 is already announced, is version 5.005 still a<br/>need? What versions are you using PerlPoint with? If 5.005, would it be<br/>hard or impossible to install 5.6?<br/><br/>Thanks in advance<br/><br/> Jochen<br/><br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/04/msg62.html Tue, 16 Apr 2002 15:58:08 +0000 Re: Tree Applet by Jochen Stenzel <br/>&gt;Is the source for the tree applet available anywhere?<br/>&gt;<br/>&gt;I&#39;m finding it is horribly unstable in Netscape (4.7): it will<br/>&gt;only run for a few minutes before locking<br/>&gt;Netscape up completely.<br/><br/>I noticed this under Linux as well. Under Solaris, it runs for weeks<br/>(and then Netscape usually crashes for unknown reasons, possibly the<br/>applet is involved as well because it is typically running multiply<br/>....)<br/><br/>So, the source can be grabbed from www.naturallyj.com. The old tree<br/>applet provided in PerlPoint::Converters was renamed to JExplorer.<br/>There are newer versions, both of the old and of a new 2.0 release.<br/>Possibly a version switch increases stability.<br/><br/>For 2.0, I assume that PerlPoint::Package has to be extended to support<br/>it.<br/><br/>As I remember, sources are provided for download - at least for version<br/>1.2. When using a newer version possibly the applet has to be unbundled<br/>from PerlPoint::Package because it is shipped under GPL now. This would<br/>be no problem as long as the original or modified applet package will<br/>be available publically (we bundled it because it was temporarily<br/>unavailable).<br/><br/> Jochen<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/04/msg61.html Sat, 06 Apr 2002 11:58:51 +0000 Tree Applet by Robert Inder <br/>Is the source for the tree applet available anywhere?<br/><br/>I&#39;m finding it is horribly unstable in Netscape (4.7): it will<br/>only run for a few minutes before locking<br/>Netscape up completely.<br/><br/>Java in Netscape 4.7 (Unix) is hardly stable, but this is<br/>so bad as to be unusable. <br/><br/>Since a colleague and I have developed a number of applets<br/>which are less bad than this, I&#39;d like to look at what<br/>is going on to see if we can sort it out...<br/><br/>Robert.<br/><br/>------------------------------------------------------------------------<br/>Robert Inder Interactive Information Limited, 07770 30 40 52<br/> 3, Lauriston Gardens, Edinburgh EH3 9HH SCOTLAND<br/>------------------------------------------------------------------------<br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/04/msg60.html Sat, 06 Apr 2002 07:47:45 +0000 Re: Bug Report (sublists in pp2latex) by Jochen Stenzel <br/>Sorry,<br/><br/>&gt;But of course, the *result* of this parsing could be streamed in a<br/>&gt;*nested* manner, and possibly this is a better approach then the chain<br/>&gt;I implemented. I see no reason for changing the stream format<br/>&gt;appropriately.<br/><br/>this was intended to be<br/><br/>.... I see no reason *against* changing ...<br/><br/> Jochen<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/03/msg59.html Mon, 25 Mar 2002 15:04:19 +0000 Re: Bug Report (sublists in pp2latex) by Jochen Stenzel Hello, Robert and Lorenz,<br/><br/>sorry for my long silence. I&#39;m privately swamped at the moment but hope<br/>to get a rest soon.<br/><br/>Yes, the parser deals with lists as you investigated, mostly to make<br/>usage as simple and intuitive as possible. So a list end is detected<br/>whenever another paragraph type starts. This implies that lists do not<br/>need to be closed explicitly, regardless of their nesting level. The<br/>parser closes them implicitly.<br/><br/>The internal grammar of nested lists is a *chain*: a sequence of lists<br/>separated by nothing or a shift paragraph.<br/><br/>But of course, the *result* of this parsing could be streamed in a<br/>*nested* manner, and possibly this is a better approach then the chain<br/>I implemented. I see no reason for changing the stream format<br/>appropriately. As you suggested:<br/><br/>&gt; &gt; Probably the Parser should implement a stack of lists.<br/>&gt;<br/>&gt;Indeed. And expect backends to do so.<br/><br/>(Note: The shift paragraph, by the way, is restricted to lists because<br/>I doubt there is a general meaning of paragraph shifts in *all* (or<br/>most) target languages. That&#39;s why I hesitated to implement an old idea<br/>of Jeffrey who suggested to make paragraph shifts generally available.<br/>If there are ideas how to translate them a general way, we could make<br/>them a &quot;usual&quot; paragraph.)<br/><br/><br/>&gt; &gt; Another problem is the continuation of numbered lists, which may be<br/>&gt; &gt; interrupted by an example (verbatim) block.<br/>&gt;<br/>&gt;I think the opposite: if the parser expects back-ends to deal with<br/>&gt;nested lists, the continuation will solve itself.<br/><br/>This is a parsing issue. For example, it is difficult to recognize<br/>whether the following is a verbatim paragraph in a list or a sequence<br/>of a list, an example and another list:<br/><br/> * a<br/><br/> * b<br/><br/> example code<br/><br/> * c<br/><br/> * d<br/><br/>If shifts remain restricted to lists, things would be clear if<br/>something is embedded into a sublevel list, but it would be hard for<br/>users to learn that &quot;embedding is allowed except in first level lists&quot;.<br/>In my opinion, usage should remain as intuitive as possible, and the<br/>syntax is designed as a sequence of paragraphs.<br/><br/>Another parsing difficulty is that I would have to delay list<br/>completion (and handling of all subsequent paragraphs) until the end of<br/>a chapter where I could finally say: &quot;whatever came after the last list<br/>was not embedded because every list ends with the chapter&quot;.<br/><br/>So we would need extra syntax to say that embedded elements follow<br/>&quot;continuing&quot; the list - a kind of glue that combines list and non-list<br/>elements. Can we find an intuitive way to establish something like<br/>that?<br/><br/>Illustration (not intended to be imple,ented this way):<br/><br/> * a<br/><br/> * b<br/><br/> |<br/><br/> example code<br/><br/> |<br/><br/> * c<br/><br/> * d<br/><br/>The second &quot;glue part&quot; would be redundant, of course.<br/><br/><br/>&gt;What you&#39;ll need is<br/>&gt;a way to start a NEW numbered list right after the old one!<br/><br/>I&#39;m not sure what you meant here - the same problem as described above?<br/><br/>&gt;But maybe that is best solved by a way of setting the list counter.<br/>&gt; #=&lt;1&gt;<br/>&gt;This would then allow you to continue numbered lists across<br/>&gt;a number of slides...<br/><br/>Ah, hm, I see. Let me think about this.<br/><br/>Because shift paragraphs can take a number immediately after the<br/>startup character, maybe<br/><br/> #1<br/><br/>would be consistent.<br/><br/>But it would imply that an ordered list point cannot begin with a<br/>number, or that spaces after the intro sequence become mandatory.<br/><br/>Good luck with your presentation, Robert!<br/><br/>Greetings<br/><br/> Jochen<br/><br/><br/><br/><br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/03/msg58.html Mon, 25 Mar 2002 15:04:06 +0000 pp2html: subtle bug by Robert Inder <br/>I&#39;ve found a problem with pp2html. <br/><br/>pp2html tries to detect empty table cells, and plant an &quot;&amp;nbsp;&quot; <br/>in them to make them look sensible when the HTML is rendered.<br/><br/>Unfortunately, the way it detects empty cells is too simplistic.<br/>It just looks for text pending in @BUFFER.<br/><br/>But some things --- for instance \IMAGE tags --- do not put their<br/>text in @BUFFER. So pp2html inserts a spurious &amp;nbsp;, and this<br/>can make table cells too big.<br/><br/>I don&#39;t understand why some things go in @BUFFER and others don&#39;t,<br/>so I&#39;m not sure what should be changed to make it right.<br/><br/>For now, I&#39;ve just disabled this behaviour completely --- I have<br/>a presentation tomorrow! If I need the spaces, I&#39;ll define<br/>\EMPTYCELL to embed them explicitly in HTML.<br/><br/>But I think it deserves some attention...<br/><br/>Robert.<br/><br/>------------------------------------------------------------------------<br/>Robert Inder Interactive Information Limited, 07770 30 40 52<br/> 3, Lauriston Gardens, Edinburgh EH3 9HH SCOTLAND<br/>------------------------------------------------------------------------<br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/03/msg57.html Mon, 25 Mar 2002 03:12:52 +0000 Re: pp2Latex "bug" and question by lorenz Please see attached text<br/><br/>Lorenz<br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/03/msg56.html Mon, 25 Mar 2002 01:01:32 +0000 pp2Latex "bug" and question by Robert Inder <br/>I&#39;ve found a misfeature of pp2latex that is so severe that I&#39;d<br/>call it a bug! A link like...<br/><br/> \L{url=foo}&lt;bah&gt;<br/><br/>translates into commands that typeset the URL in small<br/>font, and then put the body. <br/><br/>This is a very strange decision -- it certainly is not how I would<br/>want to format/handle a link/URL. <br/><br/>I believe the right thing to do is to instead plant a LaTeX command which<br/>will handle a url/link. Something like...<br/> \ppointURL{foo}{bah}<br/><br/>Perhaps the default could be the current behaviour, but <br/>the end-user is free to re-define it in LaTeX so as to typeset the URL<br/>however they choose.<br/><br/>I can supply diffs or a patched pp2latex if anyone is interested.<br/><br/>Now the question:<br/><br/>pp2latex translates description lists <br/><br/> :foo:all about a foo<br/><br/> :bar:all about bars and things<br/><br/>into a latex itemize list, with a short first paragraph.<br/><br/> \begin{itemize}<br/><br/> \item foo<br/><br/> all about a foo<br/><br/> \item bar<br/><br/> all about bars and things<br/><br/> \end{itemize}<br/><br/>WHY?? Latex has a description list, so why is it not used?<br/><br/>I&#39;d have expected it to be ranslated as...<br/><br/> \begin{description}<br/><br/> \item [foo] all about a foo<br/><br/> \item [bar] all about bars and things<br/><br/> \end{description}<br/><br/>Is there a strong reason why not?<br/><br/>Robert.<br/><br/><br/>------------------------------------------------------------------------<br/>Robert Inder Interactive Information Limited, 07770 30 40 52<br/> 3, Lauriston Gardens, Edinburgh EH3 9HH SCOTLAND<br/>------------------------------------------------------------------------<br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/03/msg55.html Sat, 23 Mar 2002 04:25:03 +0000 Re: Bug Report (sublists in pp2latex) by Robert Inder <br/>&gt;&gt;&gt;&gt;&gt; lorenz writes:<br/> &gt; Date: Tue, 19 Mar 2002 11:20:46 +0100<br/> &gt; To: perlpoint@perl.org<br/> &gt; Subject: Re: Bug Report (sublists in pp2latex)<br/><br/> :<br/><br/> &gt; It works for simple lists, but you get into trouble with nested<br/> &gt; lists, especially if the last list item is not on top level, for<br/> &gt; example a list like<br/><br/> &gt; * Item 1 of outer list<br/> &gt; * Item 2 of outer list<br/> &gt; o item one of inner list<br/> &gt; o item two of inner list (and that&#39;s it!)<br/><br/> &gt; In HTML this woud be implemented as<br/><br/> &gt; &lt;ul&gt;<br/> &gt; &lt;li&gt; Item 1 of outer list<br/> &gt; &lt;li&gt; Item 2 of outer list<br/> &gt; &lt;ul&gt;<br/> &gt; &lt;li&gt; item one of inner list<br/> &gt; &lt;li&gt; item two of inner list (and that&#39;s it!)<br/> &gt; &lt;/ul&gt;<br/> &gt; &lt;/ul&gt;<br/><br/><br/> &gt; The problem is, as you pointed out, that the parser does not allow<br/> &gt; a &lt; (shift back) at the end of a list. <br/><br/>I think that is only the SECONDARY problem.<br/><br/>The primary problem is that the parser reports an end-of-list<br/>when it finds the &quot;&gt;&quot;, and everything after that is just trying<br/>to minimise the consequences of this mistake! So although<br/>you give the HTML for how your example SHOULD be done in HTML,<br/>it is ACTUALLY handled as....<br/><br/> &lt;ul&gt;<br/> &lt;li&gt; Item 1 of outer list<br/> &lt;li&gt; Item 2 of outer list<br/> &lt;/ul&gt;<br/> &lt;ul&gt;<br/> &lt;ul&gt;<br/> &lt;li&gt; item one of inner list<br/> &lt;li&gt; item two of inner list (and that&#39;s it!)<br/> &lt;/ul&gt;<br/> &lt;/ul&gt;<br/><br/> &gt; In pp2latex the implementation is totally buggy (it just ignores<br/> &gt; sublists).<br/><br/>I&#39;ve fudged pp2latex to deal with a single nested sublist, much<br/>as pp2html does. This is what I need right now...<br/><br/> :<br/> :<br/> &gt; Probably the Parser should implement a stack of lists.<br/><br/>Indeed. And expect backends to do so. This will simplify both HTML<br/>and LaTeX.<br/><br/> &gt; Another problem is the continuation of numbered lists, which may be<br/> &gt; interrupted by an example (verbatim) block.<br/><br/>I think the opposite: if the parser expects back-ends to deal with<br/>nested lists, the continuation will solve itself. What you&#39;ll need is<br/>a way to start a NEW numbered list right after the old one!<br/><br/>But maybe that is best solved by a way of setting the list counter.<br/> #=&lt;1&gt;<br/>This would then allow you to continue numbered lists across<br/>a number of slides...<br/><br/> &gt; I will discuss this further with Jochen, who knows the details about<br/> &gt; the parser. Hopefully we will soon come up with a solution.<br/><br/>I&#39;ve attached the diffs for what I&#39;ve done.<br/><br/>I&#39;ve also made another change. pp2latex starts a new slide<br/>with a standard LaTeX sectioning command. This may not be<br/>what is wanted. So I have added a new option, &quot;newslide&quot;,<br/>which is the name of the LaTeX command to be called. If the<br/>option is set, the named latex command is called with two<br/>arguments: the depth of nesting (an integer), and the<br/>title. So putting <br/><br/> --newslide=slidestart<br/><br/>makes <br/><br/> ==Foo Bar Wub<br/><br/>generate<br/><br/> \slidestart{2}{Foo Bar Wub}<br/><br/>((As I write this, I realise that some way of choosing<br/> whether to include the depth argument would make things like<br/> --newslide=subsection<br/> work as expected....))<br/><br/> &gt; Reards,<br/><br/> &gt; Lorenz<br/><br/>Robert.<br/><br/>------------------------------------------------------------------------<br/>Robert Inder Interactive Information Limited, 07770 30 40 52<br/> 3, Lauriston Gardens, Edinburgh EH3 9HH SCOTLAND<br/>------------------------------------------------------------------------<br/><br/>THE DIFFS<br/><br/>50a51,52<br/>&gt; my $insublist = 0;<br/>&gt; <br/>102a105<br/>&gt; &quot;newslide=s&quot;,<br/>388c391,393<br/>&lt; if ($_[2] == 0){<br/>---<br/>&gt; if (defined $OPT{newslide}) {<br/>&gt; $section=$OPT{newslide} . &quot;{$_[2]}&quot;;<br/>&gt; } elsif ($_[2] == 0){<br/>405a411<br/>&gt; $insublist=0;<br/>466c472,479<br/>&lt; push_page $page_ref, &quot;\n&quot;;<br/>---<br/>&gt; if ($insublist) {<br/>&gt; push_page $page_ref, &quot;\n\\end{quote}\n&quot;;<br/>&gt; $insublist=0;<br/>&gt; }<br/>&gt; else {<br/>&gt; push_page $page_ref, &quot;\n&quot;;<br/>&gt; }<br/>&gt; <br/>483c496,497<br/>&lt; push_page $page_ref, &quot;\n\% Shift &lt;\n&quot;;<br/>---<br/>&gt; $insublist--;<br/>&gt; push_page $page_ref, &quot;\n\\end{quote}\n\% Shift &lt; ($insublist)\n&quot;;<br/>490c504,505<br/>&lt; push_page $page_ref, &quot;\n\% Shift &gt;\n&quot;;<br/>---<br/>&gt; $insublist++;<br/>&gt; push_page $page_ref, &quot;\n\% Shift &gt; ($insublist)\n\\begin{quote}\n&quot;;<br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/03/msg54.html Tue, 19 Mar 2002 05:55:38 +0000 Re: Bug Report (sublists in pp2latex) by lorenz (see attached text)<br/><br/>Regard,<br/>Lorenz<br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/03/msg53.html Tue, 19 Mar 2002 02:26:16 +0000 Bug Report by Robert Inder <br/>I&#39;ve found a bug in pp2latex.<br/><br/>The code....<br/><br/> =Background<br/><br/> *Blah<br/><br/> *Blah<br/><br/> *A Sublist<br/><br/> &gt;<br/><br/> *Foo<br/><br/> *Bar<br/><br/> *Wub<br/><br/>Generates<br/><br/> \section{Example}<br/><br/> \begin{itemize}<br/> \item Blay<br/> \item Blah<br/> \item A Sublist<br/> \end{itemize}<br/><br/> % Shift &gt;<br/><br/> \begin{itemize}<br/> \item Foo<br/> \item Bar<br/> \item Wub<br/> \end{itemize}<br/><br/>Note that the outer &quot;itemize&quot; is incorrectly ended, so the<br/>inner list is not a sublist, but appears to be a continuation.<br/><br/>I&#39;ve had a quick look, and the problem looks horribly<br/>deep inside PerlPoint. It looks to me that the document<br/>is being parsed and fed to the backend as...<br/><br/> ListItem....<br/> ListItem...<br/> --&gt; EndList<br/> Shift<br/> BeginImisedList<br/> ListItem...<br/><br/>I believe the problem is in the &quot;EndItemize&quot;. <br/><br/>The natural interpretation of &quot;&gt;&quot; is &quot;start a sub-list of this item&quot;.<br/>And the fact that you can only use it within a list re-inforces<br/>this idea somewhat.<br/>And if you planted a new &quot;list start&quot;, this is what both HTML and<br/>Latex would do. And since Latex works very hard to get spacings<br/>right, telling it to do a sublist is the &quot;right thing to do&quot;.<br/><br/>But once the parser has signaled the end of the outer list,<br/>&quot;&gt;&quot; collapses to just &quot;move over a bit&quot;.<br/><br/>pp2html does this by opening<br/>a null &lt;UL&gt;, and keeping track of how many &quot;bits&quot; it has moved<br/>over, so it can unwind the right amount at the right time.<br/><br/>And pp2latex simply ignores it --- for, I suspect, because almost<br/>any way of telling LaTeX to start &quot;moving over a bit&quot; will fail<br/>horribly unless there is a corresponding something to tell it to stop.<br/>And that is tricky if <br/>the indented list happens to be the last thing on a slide/page,<br/>there won&#39;t be a corresponding &quot;&lt;&quot; (the parser prohibits it), thus<br/>obliging the back end to keep track of indentation. AAAAARGH!<br/><br/>I&#39;ve fudged soemthing in pp2latex that does the minimum<br/>I need, but it is a hack. Someone should sort this properly!<br/><br/>Robert.<br/><br/>------------------------------------------------------------------------<br/>Robert Inder Interactive Information Limited, 07770 30 40 52<br/> 3, Lauriston Gardens, Edinburgh EH3 9HH SCOTLAND<br/>------------------------------------------------------------------------<br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/03/msg52.html Sat, 16 Mar 2002 06:07:31 +0000 ask help(cant telnet with perl-module) by henry Dear List:<br/><br/> My cpan-module is not well-installed :<br/> &lt;procedures to install &gt;<br/> 1. choose full_install to install linux ( Redhat or slackware), <br/> type &quot;rpm -q perl&quot; to make sure it&#39;s well_installed .<br/><br/> 2. download Net-telnet-3.02.tar.gz from www.cpan.org <br/> 3. a. untar it <br/> b. perl Makefile.PL<br/> c. make test<br/> l <br/>Then I got<br/><br/>PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/i386-linux -I/usr/lib/perl5 -e &#39;use Test::Harness qw(&amp;runtests $verbose); $verbose=0; runtests @ARGV;&#39; t/*.t<br/>t/select............FAILED test 3<br/> Failed 1/3 tests, 66.67% okay<br/>Failed Test Status Wstat Total Fail Failed List of Failed<br/>--------------------------------------------------------------------------------<br/>t/select.t 3 1 33.33% 3<br/><br/> Neglect the fail, I still &quot;make install&quot; , then execute script as follows :<br/><br/> use Net::Telnet ();<br/> $t = new Net::Telnet (Timeout =&gt; 20,<br/> Prompt =&gt; &#39;/bash\$ $/&#39;);<br/> $t-&gt;open(&quot;sparky&quot;);<br/> $t-&gt;login($username, $passwd); &lt;----------Then I got time out for waiting at line 5 ,but I can telnet the host normally(not use perl-script) <br/> @lines = $t-&gt;cmd(&quot;/usr/bin/who&quot;);<br/> print @lines;<br/> <br/>Could you perl-fans shed some light on it ? <br/> <br/><br/><br/>BestRegards<br/>Henry<br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/02/msg51.html Wed, 20 Feb 2002 21:39:06 +0000 Re: Building user designed links (was: Another "simple" problem) by Jochen Stenzel <br/>&gt;My perl at run-time does not know what the name of the slide/file<br/>&gt;is going to be. But it can NAME that filename: it can plant a<br/>&gt;tag that will be turned into it. So the perl could return<br/>&gt;<br/>&gt; &lt;A HREF=&#39;\REFID{name=&quot;Section 2&quot;}&#39; <br/>&gt; onmouseover=&quot;alert(&#39;Read this first&#39;)&quot;&gt;The Second Section&lt;/A&gt;<br/>&gt;<br/>&gt;knowing that it would turn into...<br/>&gt;<br/>&gt; &lt;A HREF=&#39;slide0012&#39; onmouseover=&quot;alert(&#39;Read this first&#39;)&quot;&gt;The Second Section&lt;/A&gt;<br/>&gt;<br/>&gt;or whatever...<br/><br/>Hm, I never wrote HTML into a source directly, but yes, it should work<br/>.... and then, you could include such a tag and the results would be as<br/>described, indeed.<br/><br/>Nevertheless, as you might expect ;-), I&#39;m searching for a more common<br/>solution not restricted to HTML ...<br/><br/>If the HTML code would be embedded by \EMBED, an included PerlPoint tag<br/>would *not* be solved (because it would not be parsed and detected).<br/>That&#39;s what I thought of. If we embed it directly, the tag is parsed,<br/>but the HTML goes into all target formats (unless it is placed in<br/>conditional parts or a \HIDE tag with a condition which is always true<br/>except for the target format HTML). So what if we&#39;d combine those<br/>approaches and pp2html would provide wildcard replacement within<br/>embedded HTML? Something like:<br/><br/> \EMBED{lang=html}<br/> &lt;A HREF=&#39;REFID(Section 2)&#39;&gt;<br/> onmouseover=&quot;alert(&#39;Read this first&#39;)&quot;&gt;The<br/> Second Section&lt;/A&gt;<br/> \END_EMBED<br/><br/>But reading this, I notice that we can already combine \EMBED *and* tag<br/>usage. Just by joining several elements:<br/><br/> \EMBED{lang=html}&lt;A HREF=&quot;\END_EMBED<br/> \REFID{name=&quot;Section 2&quot;}<br/> \EMBED{lang=html}&quot; onmouseover=<br/> &quot;alert(&#39;Read this first&#39;)&quot;&gt;The<br/> Second Section&lt;/A&gt;<br/> \END_EMBED<br/><br/>This way we get the greatest flexibility: the target code is marked as<br/>such, *and* we can use tags. All we need is a new tag \REFID or/and a<br/>new \REF option &quot;id&quot;.<br/><br/>Of course, there are several ways to do things - but if HTML (or<br/>another language) is &quot;embedded&quot; directly into a document, I strongly<br/>recommend to make it detectable by conditions or \HIDE.<br/><br/><br/><br/>&gt;<br/>&gt; &gt; Ways I currently see to achieve what you are looking for, links build<br/>&gt; &gt; according to personal preferences:<br/>&gt;<br/>&gt; &gt; * pp2html templates provide a keyword/syntax ...<br/>&gt; <br/>&gt; &gt; * pp2html implements certain wished configurations ...,<br/><br/>&gt;So I, of course, want both of these:-)<br/><br/><br/>Let&#39;s see what Lorenz says. Implementing several more link types<br/>directly seems possible to me. In the long term, however, a generic<br/>solution would relieve him more.<br/><br/><br/>&gt;Perhaps something like:<br/>&gt; Any unknown tag &quot;\FOO&quot; <br/>&gt; causes PerlPoint to call the function FOO with two arguments:<br/>&gt; a hash of the arguments given to the tag, and<br/>&gt; the body of the tag.<br/>&gt; The string returned by the tag is taken as its expansion. <br/><br/>This would imply that everything looking like a tag has to be treated<br/>as a tag, different to the current approach where only declared tags<br/>are recognized and document authors are free to use any other<br/>\UPPERCASED constructs.<br/><br/>It also implies that a document author can deal with a complex body<br/>structure.<br/><br/>But I like the idea of user defined handlers. To keep things simple and<br/>documents interchangable, those definitions must be part of the source<br/>- it is hard for a document author to rely on a certain library added<br/>to a local PerlPoint installation. So the functions should not be<br/>passed to a converter but be placed within a document. (They may be<br/>hidden in a library included via \INCLUDE.)<br/><br/>So I suggest a new basic tag \FREESTYLE (name may be changed) that may<br/>be invoked like this:<br/><br/> // define your own backend handling<br/> \EMBED{lang=perl}<br/> <br/> sub privateTagHandler {...}<br/><br/> \END_EMBED<br/><br/> \FREESTYLE{callback=privateTagHandler more=options}&lt;body&gt;<br/><br/>The callback handler could then be invoked by the backend framework<br/>automatically - so it would be transparent to converter authors.<br/><br/>The most difficult part in my eyes is the definition of a clear and<br/>flexible interface. An (even advanced) document author does not<br/>necessarily know how a converter works, and this is a PerlPoint design<br/>rule - he does not need to. But to write such a handler, he needs to<br/>access and provide data.<br/><br/>The handler, by the way, needs to be able to handle two situations: the<br/>opening and the completion of a \FREESTYLE tag (because the<br/>intermediate format is a stream).<br/><br/>Well, that&#39;s a fruitful discussion! ;-)<br/><br/> Jochen<br/><br/><br/><br/><br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/01/msg50.html Thu, 31 Jan 2002 17:15:36 +0000 Re: Near miss that might be a bug by Jochen Stenzel <br/>&gt;I defined LLINK to be macro that expanded to EMBEDed Perl to generate<br/>&gt;the HTML for the link, and then generated an XREF with that HTML<br/>&gt;as an &quot;EMBED&quot; in the body. Thus...<br/>&gt;<br/>&gt; +LLINK:<br/>&gt; \EMBED{lang=perl}<br/>&gt; $name = &quot;__name__&quot;;<br/>&gt; $gif = &quot;__gifname__&quot;;<br/>&gt; $img = &quot;Images/&quot; . $gif . &quot;.gif&quot;;<br/>&gt; return(&quot;\\XREF{name=\&quot;$name\&quot;}&lt;\\EMBED{lang=html}&lt;IMG SRC=&#39;$img&#39; border=3&gt;\\END_&quot; . &quot;EMBED &gt;&quot;);<br/>&gt; \END_EMBED<br/>&gt;<br/>&gt; \LLINK{name=Contact gifname=contact}<br/>&gt;<br/>&gt;<br/>&gt;I had to split the inner &quot;END_EMBED&quot;: otherwise the embedded <br/>&gt;perl got truncated...<br/><br/>This should be documented I suppose. The parser searches for the first<br/>\END_EMBED and assumes it closes the embedded part.<br/><br/><br/>&gt;The final HTML that I got was about the closest near miss I can imagine...<br/>&gt;<br/>&gt; &lt;IMG SRC=&#39;Images/contact.gif&#39; border=3&gt;&lt;A HREF=&quot;page0003.html#Contact&quot;&gt; &lt;/A&gt;<br/>&gt;<br/>&gt;...<br/>&gt;Only thing is, the image comes BEFORE the link, not as its body!<br/>&gt;<br/>&gt;Is this a bug? Or have I missed or misunderstood something?<br/><br/>I think you found a parser bug. I need to investigate a parser trace to<br/>see what went wrong.<br/><br/> Jochen<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/01/msg49.html Wed, 30 Jan 2002 15:53:28 +0000 Internals (was: Another "simple" problem) by Jochen Stenzel <br/>&gt;That is what I&#39;m after: how to peep at the &quot;innards&quot; of<br/>&gt;PerlPoint. Then I could generate my whole menu in Perl.<br/><br/>There are two types of PerlPoint innards. The frameset (Package)<br/>innards are described in &quot;How to write a converter&quot; which comes with<br/>the parser package. Of course, this is intended to be read by converter<br/>authors, not PerlPoint users. It might give one an impression of the<br/>architecture, but most details are of best use if one plans to<br/>write/update/patch a converter.<br/><br/>The second type of internals is related to each converter. Besides the<br/>use of frameset methods and conventions described in &quot;How to write a<br/>converter&quot;, it&#39;s completely up to a converter author how to implement<br/>things. As I know, there&#39;s only a converters inline documentation to<br/>help with these details - and talking with the authors (and this list<br/>;-)<br/><br/> Jochen<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/01/msg48.html Wed, 30 Jan 2002 15:53:17 +0000 Building user designed links (was: Another "simple" problem) by Jochen Stenzel <br/>&gt;In fact, in an ideal world, I&#39;d like to plant a very &quot;full featured&quot;<br/>&gt;link, with javascript mouseovers and all sorts. I could generate<br/>&gt;the link very easily in Perl, if only I knew the file names<br/>&gt;to link to. PerlPoint must be able to find the information I need, so<br/>&gt;it can do \XREF. So some way to get the bare XREF information in<br/>&gt;Perl... <br/>&gt;<br/>&gt;Something like...<br/>&gt; xref_destination(&quot;foo&quot;)<br/>&gt;returning the URL/filename of the relevant page. The function must<br/>&gt;exist, surely: I just don&#39;t know its name!<br/><br/>The problem is that embedded Perl ist executed at parsing time, and the<br/>parser doesn&#39;t know about any results. HTML results are pages, SDF<br/>results are chapters in a one-in-all document (currently), PPresenter<br/>results are parts of an XML structure. So address resolution is up to a<br/>converter and happens at backend runtime.<br/><br/>Nevertheless, we could pass a tag. A tag *is* intended to be resolved<br/>by a backend. So if we would introduce a new tag ... hm, assumed such a<br/>tag would be there, the problem would remain to be unsolved - something<br/>provided at backend runtime does not help you in Perl code executed at<br/>parsing time.<br/><br/>Ways I currently see to achieve what you are looking for, links build<br/>according to personal preferences:<br/><br/> * pp2html templates provide a keyword/syntax to<br/> include the address of a certain destination.<br/> As part of the template system, this would not<br/> help in slide contents.<br/> <br/> * pp2html implements certain wished configurations,<br/> e.g. JavaScript links as suggested, maybe by<br/> settings passed to \...REF tags.<br/><br/> * A very general interface to let users define<br/> how a tag should be resolved by a converter.<br/> This is the most flexible but most difficult<br/> (if ever possible) approach and would need<br/> additional design.<br/><br/>All if these ideas are currently unimplemented. Maybe there are more or<br/>better ones?<br/><br/> Jochen<br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/01/msg47.html Wed, 30 Jan 2002 15:53:05 +0000 Placing HTML slide titles arbitrarily (was: Another "simple" problem) by Jochen Stenzel <br/>&gt; &gt; This sounds (to me) as if it was built using templates (for header,<br/>&gt; &gt; slide contents and footer).<br/>&gt;<br/>&gt;Yes. The HTML for a slide was something close to...<br/>&gt;<br/>&gt;&lt;TABLE&gt;<br/>&gt;&lt;TR&gt;<br/>&gt;&lt;TD ALIGN=CENTER VALIGN=TOP&gt;<br/>&gt;&lt;!--Navigation Menu, with tailored buttons for key sections --&gt;<br/>&gt;&lt;A HREF=&quot;slide0003.html&quot;&gt;&lt;IMG SRC=&quot;Images/services.gif&quot;&gt;&lt;/A&gt;&lt;BR&gt;<br/>&gt; :<br/>&gt; :<br/>&gt;&lt;A HREF=&quot;slide0019.html&quot;&gt;&lt;IMG SRC=&quot;Images/contact.gif&quot;&gt;&lt;/A&gt;&lt;BR&gt;<br/>&gt;&lt;!--End of menu--&gt;<br/>&gt;&lt;/TD&gt;<br/>&gt;&lt;TD VALIGN=TOP&gt;&lt;H1&gt;Slide Title&lt;/H1&gt;<br/>&gt;<br/>&gt; Here is the body of slide 1<br/>&gt; &lt;P&gt;<br/>&gt; Blah blah blah<br/>&gt;<br/>&gt;&lt;/TD&gt;<br/>&gt;&lt;TD VALIGN=TOP&gt;<br/>&gt;&lt;IMG SRC=&quot;Images/Logo&quot;&gt;<br/>&gt;&lt;/TD&gt;<br/>&gt;&lt;/TR&gt;<br/>&gt;&lt;/TABLE&gt;<br/><br/>&gt;Where the indented lines were the slide body, and the two blocks<br/>&gt;of unindented lines come from the top and bottom templates. So<br/>&gt;the header &quot;opens&quot; a table environment, and the footer closes it.<br/><br/>Ah! That&#39;s a clever solution!<br/><br/>&gt;The problem, of course, is doing the mapping from &quot;contact&quot; to &quot;slide0019&quot;...<br/><br/>I see. Each slide should be presented by a certain link in the menu.<br/>That&#39;s easy to specify in a source but<br/><br/>&gt;If I build the navigation menu in the slide body, the slide title from<br/>&gt;the header will alway come out ahead of it....<br/><br/>If pp2html could provide a -no_headers option to suppress page title<br/>display on a slide (but not for navigation) ...<br/><br/>&gt; &gt; Hm. Maybe there should be an optional wildcard for the title as well<br/>&gt;You mean one that is visible within the body of the slide:<br/>&gt; \SLIDETITLE<br/>&gt;or some such? That would do...<br/><br/>.... in combination with a -no_headers setting to avoid headlines<br/>displayed twice.<br/><br/> Jochen<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/01/msg46.html Wed, 30 Jan 2002 15:52:59 +0000 Re: Building user designed links (was: Another "simple" problem) by Robert Inder <br/>&gt;&gt;&gt;&gt;&gt; Jochen Stenzel writes:<br/> &gt; To: &quot;Robert Inder&quot; &lt;robert@interactive.co.uk&gt;<br/> &gt; Cc: &quot;perlpoint@perl.org&quot; &lt;perlpoint@perl.org&gt;<br/> &gt; Date: Wed, 30 Jan 2002 22:00:02 +0100<br/> &gt; Subject: Building user designed links (was: Another &quot;simple&quot; problem)<br/><br/> :<br/> :<br/> &gt; Nevertheless, we could pass a tag. A tag *is* intended to be resolved<br/> &gt; by a backend. So if we would introduce a new tag ... hm, assumed such a<br/> &gt; tag would be there, the problem would remain to be unsolved - something<br/> &gt; provided at backend runtime does not help you in Perl code executed at<br/> &gt; parsing time.<br/>Yes it does.<br/><br/>My perl at run-time does not know what the name of the slide/file<br/>is going to be. But it can NAME that filename: it can plant a<br/>tag that will be turned into it. So the perl could return<br/><br/> &lt;A HREF=&#39;\REFID{name=&quot;Section 2&quot;}&#39; <br/> onmouseover=&quot;alert(&#39;Read this first&#39;)&quot;&gt;The Second Section&lt;/A&gt;<br/><br/>knowing that it would turn into...<br/><br/> &lt;A HREF=&#39;slide0012&#39; onmouseover=&quot;alert(&#39;Read this first&#39;)&quot;&gt;The Second Section&lt;/A&gt;<br/><br/>or whatever...<br/><br/> &gt; Ways I currently see to achieve what you are looking for, links build<br/> &gt; according to personal preferences:<br/><br/> &gt; * pp2html templates provide a keyword/syntax to<br/> &gt; include the address of a certain destination.<br/> &gt; As part of the template system, this would not<br/> &gt; help in slide contents.<br/> <br/> &gt; * pp2html implements certain wished configurations,<br/> &gt; e.g. JavaScript links as suggested, maybe by<br/> &gt; settings passed to \...REF tags.<br/>So I, of course, want both of these:-)<br/><br/><br/> &gt; * A very general interface to let users define<br/> &gt; how a tag should be resolved by a converter.<br/> &gt; This is the most flexible but most difficult<br/> &gt; (if ever possible) approach and would need<br/> &gt; additional design.<br/>Indeed.<br/><br/>Perhaps something like:<br/> Any unknown tag &quot;\FOO&quot; <br/> causes PerlPoint to call the function FOO with two arguments:<br/> a hash of the arguments given to the tag, and<br/> the body of the tag.<br/> The string returned by the tag is taken as its expansion. <br/> <br/> &gt; All if these ideas are currently unimplemented. Maybe there are more or<br/> &gt; better ones?<br/><br/> &gt; Jochen<br/><br/>Robert.<br/><br/>------------------------------------------------------------------------<br/>Robert Inder Interactive Information Limited, 07770 30 40 52<br/> 3, Lauriston Gardens, Edinburgh EH3 9HH SCOTLAND<br/>------------------------------------------------------------------------<br/> http://www.nntp.perl.org/group/perl.perlpoint/2002/01/msg45.html Wed, 30 Jan 2002 15:32:34 +0000