                                    DDF2Html
                                    ~~~~~~~~

  ..                
  |.  /'/ |      
  |  |_\/ / | |      vsn 159 16th April 2020
  |==  | / _/ |.     
  |= = |/_/   |     |          
  |=== /     |     V          Converts Impression
  '/.    Publisher DDF files
       |      |   =====   |    (Save text story
       |      |_ ---------|     with styles)  to
       '>|*. ======|    an HTML document.
              |**\ =====|    
              |***| ====|    Please read instructions!
              ''    

  Purpose of program
  Creating DDF files
  The main window: saving out HTML files
  Progress window
  Conversion of standard Impression styles\/effects
  Special styles which affect DDF2Html
  HTML tags recognised
  Mapping other styles to specific HTML tags
  Mapping characters to specific entities

  Authorship
  History
  ----------------------------------------------------------------------------
  A text version of this manual is available
  (last updated 16/4/2020).
  ============================================================================

                                Purpose of program
                                ~~~~~~~~~~~~~~~~~~

       DDF2Html is a program to make it easy to convert Impression documents
        into HTML format, either for use as Web pages or simply in order to
        send them to PC-owning friends.   Simply use the 'Save text with
        styles' option from within Impression and run the resulting output
        through DDF2Html  to translate Impression styles/effects into HTML
        mark-up.
       The program also incorporates the features of John Alldred's
        Text2Html, importing plain text files, converting any characters
        which are illegal in HTML, and making a spirited attempt to preserve
        any paragraph formatting present in the original  again, useful as a
        way of circumventing different character set/line-ending conventions
        when sending files to Mac/PC owners.
       Finally, it can be used to 'tidy-up' existing HTML files by
        converting any illegal characters it finds which ought to be entities
        but aren't!   (Note that it assumes the [RISC OS default] Latin-1
        character set, however, so can't be used to fix files using
        Windows-specific quote characters.)

    DDF2Html should run as supplied on all computers with RISC OS 31 to RISC
    OS 5 (it may well work under RISC OS 2, but I have been unable to test
    whether this is still the case!), and requires about 128K of free RAM.
    It can be run from a read-only medium such as CD-ROM without errors.

    Impression owners may find Mike Williams' /UnHTML/ (available on the
    Datafile's PDCD4 and from the Internet) a useful companion program.
    This performs a similar process in reverse, allowing the import of basic

                                                                        Page 1
    HTML formatting into Impression.
    ==========================================================================

                                Creating DDF files
                                ~~~~~~~~~~~~~~~~~~

    DDF2Html will attempt to convert any file that can be saved out as DDF
    from Impression.   Note that the DDF format does *not* include frame
    information nor embedded graphics, so these will not appear in the output
    HTML.

                          To create a DDF file, make sure the cursor is in
                          the main frame of your Impression document and
                          press CTRL-F3 (Ctrl-Shift-T in Impression II), or
                          Adjust-click on the Save icon.

                          The 'With styles' icon should be selected;  the
                          'Linefeeds' and 'Returns' icons should be *clear*.
                          (You should not need to alter the default settings
                          as provided by Impression.)

                          Save the file to disc or directly into DDF2Html.
    ==========================================================================

                     The main window:  saving out HTML files
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    When you drag a DDF file to the DDF2Html iconbar icon, the main window
    will open, allowing you to set various options before saving out the
    corresponding HTML file.

                                          The Input section gives details on
                                          the file that has just been loaded
                                           filename, size and type (DDF,
                                          HTML or plain Text).
                                          The Output section allows you to
                                          edit the text that will be
                                          displayed in the titlebar of the
                                          browser window (if processing an
                                          existing HTML file, the
                                          currently-defined page title will
                                          be supplied here;  otherwise it
                                          defaults to 'Untitled').

                                          An option allows you to override
                                          the automatic paragraphing
                                          detection and ensure that the
                                          output is always formatted with <P>
                                          tags, whatever the BaseStyle
                                          settings.   If the input is plain
                                          text and not a DDF file, this icon
                                          will be greyed out. 

                                          Below this, a pair of radio icons
                                          allow you to select which set of
                                          entities will be used to translate
                                          characters outside the basic ASCII
                                          set.

    The suggested save leafname is based on the input leafname plus the
    extension '/html' (automatically truncated to '/htm' on filing systems
    not supporting long filenames).   Edit it as required, then drag the file
    icon to save out the converted file.

                                                                        Page 2
    The progress window will then open, allowing you to abort the conversion.
    ==========================================================================

                      Mapping characters to specific entities
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      All reserved characters and top-bit-set characters in the original text
      are
      replaced by entities (such as &lt; for < and &copy for ).   These
      substitutions are defined by two configuration files, Glyphs3 and
      Glyphs4, which are used to look up the
      entity names and/or what to substitute for illegal characters.

      The setting of the radio icons on the main window controls which set of
      entities will be used for a given input file   the old HTML 32 set,
      as supplied with original versions of DDF2Html, or the newer HTML 4
      set, which adds 'smart' quotes and characters such as the bullet point,
      long em-dash and ellipsis.  (Note that some browsers may only support
      only a subset of the HTML 4 entities.)

      These radio icons take the place of the 'Bullet' settings panel in
      earlier versions of the program, since HTML 4 defines a specific
      "&bull;" character!   The default now used to represent bullet points
      under the HTML 32 setting is the bold asterisk, "<B>*</B>":   to alter
      this, edit the string at character position 143 in the Glyphs3 file.

      The setting of these icons will also affect which <DOCTYPE is declared
      at the head of the output page.
      ========================================================================

                                  Progress window
                                  ~~~~~~~~~~~~~~~

      Depending on the speed of your computer, what other background
      processes are going on, and the size of the source file, it can take
      DDF2Html a relatively long time to save out an HTML file.

      The program displays a progress window while multitasking to indicate
      how the conversion is progressing.   The green bar shows what point in
      the file it has currently reached.   (In the case of DDF files, which
      contain a large 'prologue' defining the various styles, the progress
      window may open with the green bar apparently indicating that it has
      started converting halfway through the file.   This is quite normal!)

      A small menu can be brought up from this window with the single entry
      'Cancel'.   Selecting this will abort the process, leaving you with a
      truncated (but if possible still valid) HTML file.
      ========================================================================

                               What gets converted
                               ~~~~~~~~~~~~~~~~~~~

    Global definitions
    ~~~~~~~~~~~~~~~~~~
       Base text size and colour
       Heading alignment
       Paragraphing

    Style conversions
    ~~~~~~~~~~~~~~~~~
       Standard Impression styles
       Styles corresponding to HTML tag names
       Mapping other styles to specific HTML tags

                                                                        Page 3
       Special styles which affect DDF2Html
       Impression lists

    Effects conversions
    ~~~~~~~~~~~~~~~~~~~
       Tab characters
       Font size\/colour
       Other font effects
       Alignment
       Nextframe


       Styles whose names correspond to a suitable HTML tag become the tag
        of that name, i.e. a region to which a "Blockquote" style has been
        applied will be enclosed in <BLOCKQUOTE> tags.

       A horizontal ruleoff will be inserted at the *start* of any "HR"
        region.

       Support for nested lists - any styles starting <UL_1>, <OL_2>, <UL_3>
        etc will be recognised and treated as occurrences of <UL> or <OL>.
        This allows you to work around the problem that identical occurrences
        of an Impression style cannot be nested.

    The 'standard' styles (as found in the default Impression document) are
    converted as follows:

       "Main Heading" and "Sub-Heading" become <H1> and <H2>

       "1in indent" becomes <BLOCKQUOTE>

       "Hanging indent" becomes <DL>, but not very successfully (better
        results will often be obtained by using Impression's own
        numbered\/bulleted list handling)

       "Table" becomes <TABLE>

       "Bold" and "Italic" (ImpressionII) become <STRONG> and <EM>

    The point size and colour of text in Normal/BaseStyle *only* are noted.

    The colour is used to set the base colour in the document's BODY tag, and
    the size is used to translate any subsequent {fontsize} effects into BIG
    or SMALL according to whether they are larger or smaller than this 'base'
    size.

    The alignment (right/left/centre) of any 'heading' styles ("Main Heading",
    "Sub-Heading", plus styles "H1""H6", if present) are noted, and
    reproduced
    thereafter throughout the document using the <H1 ALIGN="CENTER"> syntax.

    If the Normal/BaseStyle has the 'space above' and/or 'space below'
    paragraph
    attributes set, then all Impression paragraphs become <P> save for list
    items  this can be locally overridden via a "UseBR" special style.
    Otherwise the program assumes that you are using blank lines to
    indicate separation between paragraphs;  single newlines become <BR> and
    double newlines become <P>.

    The setting of the Always use <P> tags icon on the main window can
    override this, forcing the program to use <P> when processing DDF files no
    matter what the BaseStyle settings are.   It does not affect the
    processing

                                                                        Page 4
    of plain text files.

    {tab} becomes <TD> if within a 'Table' style, <DD> if within a 'DL'
    style, or "&nbsp; &nbsp;" otherwise.

       {fontsize} becomes <BIG> or <SMALL>, relative to the 'base' size.

       {fontcolour} becomes <FONTCOLOR=...>.

       {font} is ignored unless it specifies Corpus.* or *.Monospaced or
        *.Fixed, when it inserts either <TT> or <PRE> according to whim.

       {bold} and {italic} (Impression Publisher/Style)
        become <B> and <I>

       {superscript} and {subscript} become <SUP> and <SUB>

    "justify left/centre/right" becomes <DIVALIGN=LEFT/CENTER/RIGHT>.

    {nextframe} (often indicating the end of
    a column/section) becomes <HR>.
    ==========================================================================

                           DDF2Html and Impression lists
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      Later versions of Impression contain support for auto-numbered/bulleted
      lists, where if you add or delete entries the remaining numbers will
      adjust.   DDF2Html can recognise and convert these lists into HTML list
      entries of the relevant type, although you will still need to apply a
      <UL> or <OL> style to the list as a whole.   (Numbered lists are often
      indented from the main text using a special ruler style in any case.)

      In order to create a numbered list in Impression, either
         select a region of text and choose Insert=>Number region
          (Ctrl-Shift-F10) from the menu, specifying the correct number
          sequence (1,2,3;a,b,c;i,ii,iii;,,;A,B,C;I,II,III), which will
          assign consecutive numbers to each paragraph
         or choose Insert=>Initial number from the menu to insert the start
          of a new sequence, and Insert=>Subsequent number (Ctrl-Shift-F9)
          every time you want the next number in the sequence.

      To create a nested sub-list:
       A. 1)           Use Insert=>Initial number again with a different
               numbering type, when
          2)           a new sequence will be started.
          3)   
       B.              To resume the old sequence, use Insert=>Subsequent
               number but specify
       C. 1)           the previous numbering type, and Impression will
               insert the next number
          2)           in /that/ sequence.
       D. 

      Note that Impression does not allow you to overlay more than one
      occurrence of the same style  for example, a second instance of an
      <OL> style to signify a sub-list  so DDF2Html checks OL and UL tags in
      a special way.   It will treat any occurrence of a tag whose name
      consists of "OL_" or "UL_" plus a number as if it were a plain OL or UL
      tag.

      You can thus define UL_1, UL_2, etc., with successive degrees of
      indentation, and apply UL_1 to the whole list, UL_2 to each subsection,

                                                                        Page 5
      and UL_3 (for example) to a sub-list of points within that, and obtain
      a similar appearance to that desired within the Web browser.
      ------------------------------------------------------------------------
      (This last feature has been somewhat superseded in versions 1.50+ by a
      more generalised facility for converting multiple similar styles of
      *any* name to a single output tag - see Style mappingStylemap>)
      ========================================================================

                                HTML tags recognised
                                ~~~~~~~~~~~~~~~~~~~~

      The style-names currently recognised as tags, upper or lower case, with
      or without <>, are:

      B           CENTER  EM  H3  H6  OL     STRIKE  SUP  UL 
      BIG         CITE    H1  H4  HR  PRE    STRONG  TT   VAR
      BLOCKQUOTE  CODE    H2  H5  I   SMALL  SUB     U       

      Two other styles, shown in green on the tags menu in the Style map
      window, are also recognised by DDF2Html, but these have a slightly more
      drastic effect:

         Within a region defined as a <TABLE> style, tab characters will be
          replaced by <TD> and <TR> be placed at the start of every line.
         Within a region defined as a <DL> (definition list) style, the
          first part of the line will receive a <DT> tag, and any section
          following a tab will receive a <DD> tag.
      ========================================================================

                       Mapping styles to specific HTML tags
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    When converting an existing Impression document, it is often not
    practical or desirable to edit the names of all your styles in order to
    match them with the tag names to which you wish them to be converted.

    As of DDF2Html version 150, there is a new facility to 'map' specific
    styles present in a given DDF file to HTML tags  either via the menus
    provided, or, by typing them into the writable menu entry, from *any*
    style to *any* tag.

    Select 'Styles...' from the iconbar menu to open the style map window.
    By default, this window will be empty.   If you click on the pop-up menu
    icon attached to an icon in the right-hand column, you can select from a
    menu of HTML tags;  if you click on a menu icon attached to the left-hand
    column, you can select from the currently-available DDF styles.

    Unless you have already loaded a DDF file, this menu will initially
    contain only the two default entries, 'delete line' followed by a
    writable menu item at the bottom of the menu.  You may type any style
    name you choose here  but if you drag a DDF file directly to the window,
    or if one has already been loaded for conversion, you will instead be
    presented with a menu of all the styles available in that document.
    Dragging a different DDF file to this window will alter the contents of
    the menu rather than converting that file, but will not affect the
    contents of any icons that have already been defined.   Case is not
    significant.

    Any style name appearing in the left-hand column will be converted into
    the corresponding tag name on the same row.   You may enter style and tag
    names either by selecting them from the menu or by typing them into their
    respective writable menu entries.    The window will enlarge as necessary
    up to a maximum of 60 rows.   Selecting the 'delete row' entry from the

                                                                        Page 6
    DDF style menu will blank out that entire row, removing the definition 
    blank rows are ignored when translating files.

    Clicking MENU over this window will bring up the Mappings menu, allowing
    you to control the contents of the window as a whole.

    Note that the 'default' Impression styles  'Main heading',
    'Sub-Heading', '1in indent', 'Hanging indent' and 'Table'  are already
    mapped by default to <H1>, <H2>, <BLOCKQUOTE>, <DL> and <TABLE>
    respectively.   If you specify a different mapping in this window, this
    will replace the default.

    Styles with the 'reserved' names 'Tag', 'Link', 'Name', 'Comment' and
    'UseBR' are interpreted as special cases by DDF2Html.   They cannot be
    remapped, and even if present in the document will not appear on this
    menu.

     By convention, DDF styles are displayed 'as defined' in the style menu
    and in lowercase with a leading capital letter in the display icons,
    while HTML tags are displayed in uppercase in the tag menu and all in
    lowercase in the display icons (to avoid the need for an enormously wide
    window!)

    However, all style/tag data is stored in uppercase internally for
    comparison purposes, and appears as such in the output.
    ==========================================================================

                                   Mappings menu
                                   ~~~~~~~~~~~~~

      It can be convenient to have separate sets of style->tag mappings
      defined for use with different documents, and it is certainly
      convenient not to have to re-enter your mappings every time you run the
      program!   DDF2Html allows you to save sets of mappings, either as the
      default setting (within Boot\:Choices or inside the program) or as
      separate files, which can be stored alongside the documents to which
      they refer and reloaded at a later stage.


         'Save' leads to a savebox which can be used to save out the current
          mappings as a mappings file to any convenient location.
         'Save as default' will overwrite the old default mappings (if any)
          with the current settings, after asking for confirmation.

      The other two entries allow you to change the contents of the whole
      window without redefining each icon one by one:
         'Reload default' reloads the saved default from disc (useful if you
          have been customising it for a specific purpose and wish to revert
          without restarting the program)
         'Delete all' deletes *all* current mappings and leaves you with a
          blank window ready for new entries.
      ========================================================================

                                    Mappings files
                                    ~~~~~~~~~~~~~~

        Mappings files consist of a single line reading "!Mappings", followed
        by one or more lines containing a DDF style name, followed by a tab
        character and then an HTML tag name.
        Example:

            !Mappings
            ATTRIBUTION|--|CITE

                                                                        Page 7
            QUOTES|-------|BLOCKQUOTE
            SUPERSCRIPT|--|SUP

        The case of the entries is not significant.

        DDF2Html checks the initial line of any text file dragged to one of
        its windows;  if it appears to be a mappings file, instead of
        offering to convert it to HTML it will use the mappings defined there
        to replace any style mappings currently present, and then open the
        Style map window to show the contents of the file.
        ======================================================================

                        Special styles which affect DDF2Html
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      Five /special/ styles have significance to DDF2Html, although they do
      not correspond literally to HTML tags:

         Tag  Any section of text to which a style called "Tag" has been
               applied will be inserted *verbatim*, save that 'smart quotes'
               will be converted into plain ones. This allows you to maintain
               a few literal HTML tags in your Impression document,
               *provided* you know what you are doing!
         Link If you apply a style called "Link" to text that looks like an
               absolute URL, an HTML link will be generated.
         Name Any text to which a style "Name" is applied will be converted
               into an "<A name=" tag, allowing you to reference subsections
               of your document from other pages.
         Comment   Text in a "Comment" style will be inserted as an HTML
                    comment.
         UseBR     A block with a "UseBR" style applied to it will not be
                    paragraphed, irrespective of the BaseStyle setting; <BR>
                    tags will be inserted at the line ends instead.

      Examples

      The *Tag* style allows you to type literal HTML tags as necessary.
      The typed string  in Impression, with this style applied, would be
      exported as DDF in the form
       {"Tag" on}<BR clear={\148}left{\149}>{"Tag" off}
      and converted back into  in the output HTML file (note the correction
      of the unwanted curly quotes).

      The *Link* style applied to the string  would produce the output
       <AHREF="http://news.fornost.com">http://news.fornost.com</A>
      However, applying the Link style to the string  would produce
      , with the URL left blank.

      The *Name* style applied to the last word of  would produce
       The Wild <A name="Bunch">Bunch</A>

      The *Comment* style, if detected, will simply enclose the relevant text
      in ""
       <!--This is a comment-->

      Finally, the *UseBR* allows you to keep a block of text (i.e. an
      address or verse of poetry) within a paragraphed document together
      without converting each line into a separate paragraph:   what would
      otherwise be rendered as
      <P>As I was walking up the stair</P>
      <P>I saw a man who wasn't there </P>
      <P>He wasn't there again today  </P>
      <P>I wish that man would go away</P>

                                                                        Page 8
      will instead appear in a single block as
      <P>As I was walking up the stair<BR>
      I saw a man who wasn't there<BR>
      He wasn't there again today<BR>
      I wish that man would go away</P>
      ========================================================================

                 The somewhat complicated authorship of DDF2Html
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    DDF2Html was first released by John Alldred in December 1997, and was
    developed by him during the next two years.

    In March 2001, two years after the last released update to version 013,
    I first encountered the program and made some significant changes
    (auto-lists, adjusting the Wimpslot as necessary to fit larger files) in
    order to meet my own needs.   I contacted the original author, who
    approved the alterations and suggested this version should bear the
    provisional number 013h.   It was some months before his reason for
    picking this initial dawned upon me... by which time I had already
    implemented a 013i!

    I continued to add extra features from time to time as I found I required
    them, and contacted John Alldred again to let him know what I had been
    doing.   He proposed that the then updated version should be made
    available on his website, but as I discovered later, this never actually
    happened.   Although I didn't know it, he was already seriously ill at
    the time;  and when I tried to notify him of my latest version, now
    013o, I learned that he had subsequently died.


    My public attempts to get in contact had, however, served the unintended
    purpose of revealing to the world at large the existence of what was by
    this time a very considerably enhanced version of the program.   I had a
    number of requests to make it publicly available, and after several
    months' failed attempts to contact John Alldred's heirs to get proper
    authorisation to take over the rights to the program, took the step of
    uploading the latest version to my own website as release 100.

    However, some six months or so after my original attempts at contact, I
    was subsequently surprised and pleased to be contacted out of the blue by
    John's former employer  my letter to her had finally resurfaced.   She
    indicated that since he had been aware of my work, and had himself
    intended to release it as a new version of the program, she would be only
    too pleased for me to take over as maintainer and developer of
    DDF2Html... making version 150 the first 'official' release since
    version 013-beta3 of 30th August 1999!
    --------------------------------------------------------------------------
    Any bug reports or requests for new features should be sent to me via the
    following contact addresses: 

                                                           Miss Harriet Bazley
                              144 Merton Hall Road, Wimbledon, London SW19 3PZ
                                                    harriet@bazleyfamily.co.uk
            http://starfighter.acornarcade.com/mysite/utilities.htm#ddf2html  

                                              The old licence continues below:

                                                                  _Authorship_
      The Authorship and "Intellectual Property Rights" remain with me  (which
        means, I suppose, that if anything goes wrong, it's all my fault  ;-).

                                                                       _Usage_

                                                                        Page 9
       This software is "Freeware", so it can be used at any time without need
                                   for payment or application for a "Licence".

                                                                _Distribution_
      (a) This software may be freely distributed providing no charge is made.
     (b) By arrangement with the Author, this software may be distributed in a
                 manner whereby the only charge made is a nominal one to cover the
                                      cost of the medium (eg disk) which holds it.

                                                                  _Suggestion_
            Having declared this software as Freeware, it's too late for me to
              mention terms like "Shareware" or "Careware";  but . . . . may I
         therefore suggest a couple of other concepts to think about: "Pass it
      on"-ware and/or "Gratitude in action"-ware; by these, I'm thinking that:
        if you have got any benefit out of this software (even only a little),
      why not consider doing something that will benefit someone else (if only
                                                                    a little)?
               Doing that, you'll feel good, and so will someone else too  :-)
                                        John Alldred  <john@protovale.co.uk>  
                                            http://www.protovale.co.uk/john/  
                          http://www.argonet.co.uk/users/protovale/john.html  
    ==========================================================================

    DDF2Html  version changes
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

       Versions prior to 100
       Summary of all changes between 013 and 100
       Versions 101110
       Version 150
       Versions 151155
       Versions 157159
    ==========================================================================

                       History of early versions of DDF2Html
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      vsn 0.03 21Dec97   First working version for Publisher DDF.

      vsn 0.04     22Dec97   ImpressionII supported, and plain-text;
                              uploaded.

      vsn 0.05     23Dec97   Add icon for DDF;  correct missing icon-bar
                              icon!
               Align table central;  uploaded.

      vsn 0.06     23Dec97   Implement [Cancel] button in main window

      vsn 0.07     02Jan98   DragSprite icon now &FAF (was &FFF!)

      vsn 0.08 16Jan98   Replace GCOL with ColourTrans to work on RO3.0

      vsn 0.09 03Apr98   Add BORDER to TABLEs;
      vsn 0.10 05Apr98   Correct innumeracy in bullet-options (text mode).

      vsn 0.11 15Aug98   Correct </SUP> bug (ta to Andrew Harmsworth).

      vsn 0.12     14Feb99   Correct K allowance in CMYK->RGB conversion;
               ImpII Bold/Italic styles become STRONG/EM;
               recognises HTML tags as StyleNames (for Jim Nagel).
      vsn 0.12 20Mar99   Seems stable, so release.

      vsn 0.13     14Aug99   Now accepts HTML files, checking for

                                                                       Page 10
                              top-bit-set and missing prologue  (for
                              Stewy@argonet).
      0.132   20Aug99   Make DDF prologue-parsing more robust/tolerant?
      0.133   30Aug99   Get closer to achieving the above!
                             Harriet Bazley's versions

              0.13h    23Mar01   *Harriet Bazley*   Support added for:
                            Publisher/Style's auto-numbered lists
                            automatic insertion of <UL>/<OL> tags
                              automatic creation of HTML links
                        detection of auto-spacing between paragraphs
                  dynamic memory management (files now loaded into Wimpslot
                                   which is increased as necessary)
                      vsn 0.13i     May 01    *Harriet Bazley*
                Use of <P> and <BR> tags tidied up considerably. All opening
                                 <P>s should now be closed correctly.
                    Patched button icons to avoid crashes in RISC OS 31.
                          Alignment for H1-H6 tags now implemented.
                     Implemented multitasking during actual conversion.
                      Added <UL_1>, <UL_2> etc. to provide nested lists

                      vsn 0.13j     Oct 01    *Harriet Bazley*
                No longer inserts '?' at end of text if it does not end with
                                            a blank line.
                  {font} tags no longer give 'Unknown or missing variable'
                                                error!

       vsn 0.13k           Added support for a "TAG" style that switches off
                                       normal character translation, allowing me to
                                   maintain tags such as <BR clear="left"> in sensitive
                                    areas without having to reinsert them every time I
                                                   edit the document...
                  Fixed some problems with <P> being placed in between list
                                              elements.
                 LINK can now be applied to non-absolute URLs - the supplied
                    display text is used, but the link itself is left blank, to be
                              filled in by hand.  Not terribly useful...
                Changed DOCTYPE to HTML 4.0 Transitional due to use of extra
                                  glyphnames not supported in HTML 3

      vsn 0.13l     May 02     Stopped program swallowing keypresses such as
                                                                F12.
                       Added a "COMMENT" style to insert HTML comments
                 Cleaned up implementation of 'special' case styles; added a
                     hack to translate high-ASCII characters back and straighten
                     smart quotes, making it easier to maintain TAG and LINK data
                                    despite Impression's sabotage!

       vsn 0.13m     Jul 02     The Help files stated that style names could
                                           contain angle brackets  '<tag>', '<EM>'  but
                                           this had not actually been true for some time!
                                                          Now works again.

            vsn 0.13n     Sep 02     No longer inserts <P>/<BR> tags in
                                                        <PRE>formatted text.
                 Altered the translation of 'Hanging indent' style into <DL>
                     - everything up to the first tab character in each paragraph
                       (normally the 'hanging' section) is now taken to be the
                       'definition term' <DT>, and the rest of the paragraph is
                     placed under the 'definition body' <DD> The results seem to
                     correspond better with the normal use of hanging indents....
                 Altered icon definitions in main window to allow the use of
                                tab/arrow keys to move between icons.

                                                                       Page 11
                     Added Cancel/OK key shortcuts for overwrite prompt.
                     Attempted to eliminate all empty <P></P> tag pairs.

         vsn 0.13o     Nov 02     Now deletes brackets or full stops after
                                             auto-numbered list items (the browser will
                                            usually add a special character after these
                                           anyway, which makes extra brackets look daft).
                      This also fixes the problem with tab characters.
                  Added an automatic META date field 'Published' to header.

                                   Later versions
      ========================================================================

                        Summary of changes for version 1.00
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      23rd February 2003: New maintainer (Miss H. Bazley)
           Version 1.00 released; major rewrite and update, as detailed
            below.

        New features since version 0.133 (30Aug99  last public release):
           Improved memory management  the Wimpslot will increase as
            required.   Much larger DDF files can now be processed.
           Program now multi-tasks during conversion  long files no longer
            lock up the computer.
           Handling of <P> and <BR> tags vastly improved.  Output is both
            more human-readable and infinitely more valid as HTML  should
            pass through HTMLtidy with no errors reported. <P> tags are now
            automatically used if paragraph 'space before' or 'space after'
            are set in the base style of the Impression document  it is no
            longer necessary to go through inserting extra blank lines to get
            it to paragraph properly. <P> and <BR> tags are no longer
            inserted inside lists and <PRE>formatted sections of text.
           Improved list management.  Publisher/Style's auto-numbered lists
            are recognised and converted into appropriate HTML list types
            (a,A,iv,IV,1,bullet).   Nested lists can be created in Impression
            by defining styles as "OL_1", "UL_2" etc with different indents 
            these will all be translated into nested occurrences of <OL>,
            <UL>, etc.   Extra ")" or "." characters inserted after the
            number will be removed (almost all browsers insert these for an
            ordered list anyway, making extra characters here look daft).
           Altered hanging indent -> definition list translation. Everything
            up to the first tab character in each paragraph (normally the
            'hanging' section) is now taken to be the 'definition term' <DT>,
            and the rest of the paragraph is placed under the 'definition
            body' <DD>. This produces results more consonant with the normal
            use of hanging indents in Impression.
           Added an automatic META field 'Published' to <HEAD> section of
            output HTML, recording the date on which the file was created.
           Changed output DOCTYPE to HTML 4.0 Transitional due to use of
            extra glyphnames not supported in HTML 3  most files now
            validate correctly.
           Various windows changed  improved key handling for main window
            (no longer swallows F12 keypresses, tab/arrow keys can be used to
            move between icons).   Patched button icons to avoid crashes
            under RISC OS 31 bug.   Added Escape/Return as key shortcuts for
            warning window.
           "{tag}text {tag off}" (as generated by double-clicking to select
            words in Impression) is now automatically translated to
            "<TAG>text</TAG> " since many browsers swallow spaces before
            closing tags in HTML.
           Any left/right/centre paragraph alignment in the definitions of
            styles <H1> to <H6> is now recognised.

                                                                       Page 12
           {nextframe} tags are converted to <HR>
           Four 'special' styles added  if the following style names are
            defined in the source Impression document, they will be handled
            thus:
               COMMENT: any text to which this style is applied will be
                inserted as an HTML comment.
               NAME: any text to which this style is applied will be
                inserted as an "<A name=" tag.   More useful than it sounds!
               LINK: this style can be applied to a URL (defined as any
                string starting "http://"), in which case a 'live' HTML link
                to that URL will be generated, or optionally to any other
                string, in which case an 'empty' link using that string as
                display text will be generated in the output to serve as a
                place-marker for you to fill in, e.g. <A
                HREF="">Authorship</A>.
               TAG: this style allows you to maintain literal snippets of
                HTML in an Impression document, e.g. "mailto:" links.
                Anything to which this style is applied will be inserted
                verbatim in the output  save only that any quotation marks
                sabotaged by Impression into 'smart' quotes will be converted
                back into plain ones for the sake of your sanity!
            (Impression is not a sensible website development tool, but the
            above 'special' styles make it practical to use it to maintain a
            single complex page referred to from other parts of your site.)
         The current complete list of recognised tag-names  upper or lower
          case, with or without <>  is: ACRONYM ADDRESS B BIG BLOCKQUOTE
          CENTER CITE CODE COMMENT DEL DFN EM H1 H2 H3 H4 H5 H6 I INS KBD
          LINK NAME OL PRE S SMALL STRIKE STRONG SUB SUP TAG TT U UL VAR
                          Earlier versions Later versions
      ========================================================================

                               Versions 1.01 to 1.10
                               ~~~~~~~~~~~~~~~~~~~~~

      1st March 2003  v101
         When reprocessing existing HTML files, DDF2Html now tries to
          display the current page title in the <TITLE> icon instead of the
          default 'Untitled'.   (If you try to edit this value, it will still
          be ignored in favour of the original title, but you can at least
          see what the latter is!)
         Program now reports an error if new files are dragged to the
          iconbar during processing, instead of silently ignoring them.

      17th March 2003  v102
         Added support for an <HR> style - horizontal rules can now be
          maintained in a document by defining a style using Impression's own
          rule-off facilities.
         Included a 'template' Impression document containing some
          predefined HTML styles in the download archive.
         Fixed a nasty bug which caused a *second* header to be attached
          when reprocessing existing HTML files.
         DDF2Html can now cope with DOS-type (CR-LF) line endings.
         The text in  the <TITLE> icon will now be used to replace the
          existing title of HTML files

      14th April 2003  v110
         DDF2Html can now load data saved directly from Impression (or any
          other application)
         Fixed bug in error handling which could cause endless loop if two
          errors occurred in succession.
         Fixed new-introduced bug that could cause program to crash if the
          first file loaded was *not* an existing HTML file!
         Program no longer quits after complaining that input is an

                                                                       Page 13
          Impression document or is not a text file.
         Input filetype now represented in textual format rather than by
          showing file sprite, to stop people from trying to drag it(!)
                          Earlier versions Later versions
      ========================================================================

                                    Version 1.50
                                    ~~~~~~~~~~~~

      6th July 2003  v150 *MAJOR UPGRADE*
         Added Style mapping - facility to 'map' a given Impression DDF
          style to a given HTML tag without having to rename it in the
          original document, including mapping to TABLE and DL styles.   Took
          advantage of this to remove the special-case handling for default
          mappings ("Main Heading", "Sub-heading", "1in indent", "Hanging
          indent", "Table", "Bold" and "Italic") :-)
         Removed recognition by default for some of the more obscure tags -
          ACRONYM, ADDRESS, DEL, DFN, INS, KBD, S - in order to make the
          pop-up menu more manageable!
         Removed old radio icons giving a choice of fake bullet styles from
          main window (far less of an issue since DDF2Html started supporting
          the native Impression list format), and replaced with radio icons
          giving a choice between mapping to HTML 3.2 entities or to HTML 4
          entities (which include a true "&bull;" character!).   Provided
          *two* Glyphs files corresponding to the two mappings.   The
          selection is reflected in the DOCTYPE header.   (The default 3.2
          'fake bullet' is now the asterisk -- edit Glyphs3 to change
          this....)
         Glyphs and Mappings files will be searched for in and saved to
          Choices:DDF2Html, if Choices$Path exists.
         Fixed message handling somewhat;  DDF2Html can now save directly
          into other applications, although most Web browsers don't seem to
          support this....
         Added Sliding Heap support, to make possible dynamically resizing
          number of icons in Style map window and entries in DDF style menu.
          Much data moved into sliding blocks from static DIMs.
         Detection for special treatment of the "Main Heading",
          "Sub-heading", "1in indent", "Hanging indent", "Table", "Bold" and
          "Italic" Impression default styles is no longer case-sensitive.
         Rationalised window creation code somewhat (removed duplicated
          procedures, unnecessary use of global variables to pass parameters)
         Dragging file icons from the Pinboard could crash the program - the
          Pinboard gives an estimated size of 1 instead of -1 for "unknown",
          and DDF2Html was mindlessly believing this!
                          Earlier versions Later versions
      ========================================================================

                                 Versions 1.51-1.56
                                 ~~~~~~~~~~~~~~~~~~

      30th August 2003  v151
         Due to an error in a hard-coded data table, the program was not in
          fact translating a named "Italic" style (italic *effects* have
          always worked as advertised...) to <EM> as the help file claimed!
          Corrected.
      15th November 2003 v152
         Program now recognises (and ignores) Impression Publisher Plus
          colour/tint mapping information when constructing a menu of DDF
          styles for the style window.   Blank lines in style definitions are
          also ignored (since Impression does so).
         Updated version of Sliding Heap module supplied to v212.
      12th December 2004 v153
         Added new special style "UseBR"

                                                                       Page 14
      29th January 2005 v154
         Program no longer crashes if input leafname is too long.
         Program no longer crashes if file has no <Head> or <Body> tags(!)
      20th February 2005 v155
         Ancient bug patched:   styles or effects at the start of a table
          row no longer cause the first cell on that row to be ignored.
      5th May 2005 v156
         Fixed bug causing the paragraph count to go negative after the end
          of an ordered list if paragraphing was not taking place (and bug
          causing any non-zero value of  to be interpreted as switching
          paragraphing on!)
         Fixed feature where tables were almost invariably intepreted as
          ending with a blank row.
                          Earlier versions Later versions
      ========================================================================

                                 Versions 1.57158
                                 ~~~~~~~~~~~~~~~~~~

      26th April 2008 v157
         Added new option (set by default) to ignore any paragraph settings
          in the BaseStyle and always attempt to use <P> tags.
         In the process, also cleaned up icon definitions slightly,
          revealing some ancient bugs in icon sizing!
         Right-aligned display icons so that you could actually see file
          leafnames (more helpful than the middle of a file path).
         Increased maximum length of output leafname to prevent unnecessary
          truncation - proposed name no longer cut off at 6 letters to add
          '\/html'.
         Automatically restores icon settings on start-up - no longer sets
          DDF2Html$HTMLver in !Run.
         Main window no longer reverts to default settings if you click
          'Cancel' to close it.
      20th May 2008 v158
         Fixed bug in writable icon definition - output leafname no longer
          truncates to eight characters as soon as you attempt to edit it!
      16th April 2020 v159
         Tweaked 'Link' style to recognise https: as a link.
                                  Earlier versions
      ========================================================================
























                                                                       Page 15
                                C o n t e n t s
                                ~~~~~~~~~~~~~~~


             DDF2Html                                            1

             Purpose of program                                  1

             Creating DDF files                                  2

             The main window:  saving out HTML files             2
               Mapping characters to specific entities           3
               Progress window                                   3

             Conversion of standard styles/effects               3
               DDF2Html and Impression lists                     5
               HTML tags recognised                              6

             Mapping styles to specific HTML tags                6
               Mappings menu                                     7
                 Mappings files                                  7
               Special styles which affect DDF2Html              8

             The somewhat complicated authorship of DDF2Html     9

             History                                            10
                 History of early versions of DDF2Html          10
               Summary of changes for version 1.00              12
               Versions 1.01 to 1.10                            13
               Version 1.50                                     14
               Versions 1.51-1.56                               14
               Versions 1.57158                               15




















    +----------------------------------------------------------------------+
    |                                                                      |
    | This text file was converted from a StrongHelp manual on 16 Apr 2020 |
    |                                                                      |
    |             using !StHlp2Txt version 1.10 (8 June 2001)              |
    |                           by Chris Morison                           |
    |                                                                      |
    |               email: organizer@morison.net                           |
    |                 web: http://www.organizer.morison.net/               |
    |                                                                      |
    +----------------------------------------------------------------------+

                                                                       Page 16
