:- ['/usr/local/lib/prolog/html.pl'].

main :- 
  tell('html_demo.html'),
  output_html([
    start, nl,
    comment('This document was generated from Prolog'),
    title('Sample HTML document generated from Prolog'),
    heading(1,'Sample HTML document'),
    --,
    heading(2,'Miscellaneous'),
    'This is a ',ref('#label',it(reference)),' to ',nl,
    bf(['another ',it(point)]),' in this document.',$,
    'Let''s be ',nl,
    image('http://www.clip.dia.fi.upm.es/images/smile.happy.gif',[alt=':-)']),
    '!',
    preformatted(['These lines',
      ['are ',b(preformatted),'.'],
      'See?']),
    'We have left here a ',strong(free),' variable:',nl,X,$,
    'This is in verbatim: ',nl,
    samp(verbatim('<NOTE> write "&amp;" to insert an &')),\\,
    'But this is not:',
    samp('<NOTE> write "&amp;" to insert an &'),$,
    label(label,['This is the point referenced ',it('above.')]),
    heading(2,'Lists'),
    heading(3,tt(itemize)),
    itemize([one,two,['and ',3]]),
    heading(3,tt(enumerate)),
    enumerate([b(red),i(green),tt(blue)]),
    heading(3,tt(description)),
    description([
      (one,b(two),'Description of one and two'),
      (three,'Idem of three'),
      ['This ',b(also)]]),
    heading(3,'Nice itemize'),
    nice_itemize([pretty,bf(fancy),nice]),
    --,
    address('clip@dia.fi.upm.es'),
    end
  ]),
  told.

