[pmwiki-users] Bibliographies

John Rankin john.rankin at affinity.co.nz
Sun Sep 10 21:48:01 CDT 2006


On Saturday, 9 September 2006 11:43 PM, christian.ridderstrom at gmail.com wrote:
>On Fri, 8 Sep 2006, John Rankin wrote:
>
>> >What I really would want to have is some procedure that:  Given a set 
>> >of pages in PmWiki in a predefined sequence containing images, tables, 
>> >and references to entries in BibTex database:  Produce a Lyx type of 
>> >file with all the required elements for a book.  I accept the need for 
>> >final adjustments, but that is the basic goal.  How is that goal 
>> >accomplished?
>> 
>> I think there are 3 options:
>> 
>> - use wikipublisher (the PublishPDF recipe); this does everything
>>   you specify except:
><snip>
>
>I think this is probably the best way forward at the moment. There is 
>quite a bundle of files that is need though, but you already know this of 
>course.
>
>> When Lyx moves to an XML-based format, which I believe is in the future 
>> plan, you will have a fourth option: teach PmWiki to output LyXML 
>> directly. Christian may be able to comment on that. To my mind, this 
>> would be ideal, but at the moment, it's future-ware.
>
>Yes, LyX will get an XML-based format someday but now it is future-ware:-) 
>LyX 1.5 will use unicode internally, then it is XML-time. I'll check on 
>the LyX developers'.
>
>However, I'm not sure it will actually be that much easier to make PmWiki 
>output LyXML compared to the current LyX format (which isn't that 
>difficult by the way).

I bow to your knowledge in this area. When we looked at whether to turn 
wiki markup into LaTeX directly or use an intermediate XML format, we
observed the following:
- it's not the markup that gets you, but the tables (sometimes these
  have to go into separate LaTeX files), the HTML entities, the images
  (these all have to be converted), the print metadata (what font to use,
  whether the document is single or double sided, and so on), the
  equations, and such like
- wikistyles are really, really hard to handle -- mapping styles
  to their LaTeX equivalents is a challenge that we only partially
  overcame (example: coloured text that contains a url can in some
  cases cause LaTeX to die)
- using an xml format means that you can detect (and discard) any
  spurius html tags that you didn't manage to catch (we use a
  namespace to qualify all the tags we insert, then remove any
  tags without a namespace, then remove the namespace) -- this is
  especially important when using third party cookbook recipes, which
  may insert hard-coded html tags

In the end we decided that pmwiki was designed to output xml and
we were on safer ground by choosing to output xml. But I'm aware
that this was a judgement made with very imperfect information
and there may be a better way.

I thought of yet another option: take the wikibook xml that we
generate and use xsl to transform it to Lyx. I suspect that it
would be relatively straightforward (if time-consuming) to 
modify the .xsl that converts the xml to LaTeX.


-- 
JR
--
John Rankin







More information about the pmwiki-users mailing list