Wanted - Simple section numbering prog for HTML document

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Wanted - Simple section numbering prog for HTML document

    I maintain various specs and FAQs in manually edited HTML documents,
    and I'd very much like some simple way of automatic section numbering
    as in 2.1, 2.1.1, 2.1.2, 2.2 etc, with table of contents generation
    plugged into the start of the document so that each section can be
    accessed via a link (and also maybe automatic footnote numbering).

    It doesn't seem too much to ask, and I could probably whump up a
    script myself in a couple of days. But to save reinventing the
    whell, I was wondering if there is anything already available,
    short of using Word for Windows and "Saving as HTML". (As I said,
    I'd prefer to maintain the documents by hand.)

    P.S. Also, I'm not sure if SSI is suitable, as the files should be
    viewable locally via "Explore".

    Thanks in advance for any suggestions or pointers.


    Cheers

    John Ramsden (john_ramsden@N-O-S-P-A-Msagitta-ps.com)
    John Ramsden Guest

  2. Similar Questions and Discussions

    1. Creating PDF from Word document with section breaks
      Hello, I am using Word 2004 and have a document that contains several section breaks. When I try to print the document to PDF, a separate PDF file...
    2. IDCS2: Numbering Section and Inbooklet problem
      I've created a booklet and fixed up the Numbering and Section Options so the Auto Numbering begins after the first two pages (by creating a Section)...
    3. InDEsign Newbie - Consecutive numbering of figures in a document. How?
      I've placed text and graphics from a MS Word version of a User Manual that includes consecutively numbered figures for the graphics (eg: Figure 1,...
    4. New section causes reverse numbering
      In ID CS, I wanted to select the first half of an existing section and designate it a new section. In the Pages palette, I selected the range of...
    5. Seeking critique of simple file line numbering code.
      I realize that grep performs some of this same functionality, but I just wanted to create the tool on my own for the experience. To that end, I'm...
  3. #2

    Default Re: Wanted - Simple section numbering prog for HTML document


    > I maintain various specs and FAQs in manually edited HTML documents,
    > and I'd very much like some simple way of automatic section numbering
    > as in 2.1, 2.1.1, 2.1.2, 2.2 etc, with table of contents generation
    > plugged into the start of the document so that each section can be
    > accessed via a link (and also maybe automatic footnote numbering).
    >
    > It doesn't seem too much to ask, and I could probably whump up a
    > script myself in a couple of days. But to save reinventing the
    > whell, I was wondering if there is anything already available,
    > short of using Word for Windows and "Saving as HTML". (As I said,
    > I'd prefer to maintain the documents by hand.)
    See my page at
    [url]www.geog.cam.ac.uk/~mvl22/javascript/toc.html[/url]

    Assuming you are using structural headings (which it sounds as if you
    should be..) then this will generate a table of contents automatically
    using this javascript file. It's very simple to use. Just put in

    <body onload="generate_TOC('toc');">
    instead of your <body> tag and

    <div id="toc"></div>
    where you want the TOC to appear.

    Based on an article in Evolt as referenced.

    > P.S. Also, I'm not sure if SSI is suitable, as the files should be
    > viewable locally via "Explore".
    Clearly this has to be client-side, then. PHP will be of no use for this
    if you require local viewing.


    Martin Lucas-Smith [url]www.geog.cam.ac.uk/~mvl22[/url]
    [url]www.lucas-smith.co.uk[/url]

    Senior Computing Technician (Web Technician) [email]webmaster@geog.cam.ac.uk[/email]
    Department of Geography, University of Cambridge (01223 3)33390

    & Webmaster, SPRI [email]webmaster@spri.cam.ac.uk[/email]
    Scott Polar Research Institute, University of Cambridge


    Martin Lucas-Smith Guest

  4. #3

    Default Re: Wanted - Simple section numbering prog for HTML document

    Hi!

    On 15 Sep 2003 02:45:28 -0700, [email]john_ramsden@sagitta-ps.com[/email] (John
    Ramsden) wrote:
    >I maintain various specs and FAQs in manually edited HTML documents,
    >and I'd very much like some simple way of automatic section numbering
    >as in 2.1, 2.1.1, 2.1.2, 2.2 etc, with table of contents generation
    >plugged into the start of the document so that each section can be
    >accessed via a link (and also maybe automatic footnote numbering).
    >
    >It doesn't seem too much to ask, and I could probably whump up a
    >script myself in a couple of days. But to save reinventing the
    >whell, I was wondering if there is anything already available,
    >short of using Word for Windows and "Saving as HTML". (As I said,
    >I'd prefer to maintain the documents by hand.)
    >
    >P.S. Also, I'm not sure if SSI is suitable, as the files should be
    >viewable locally via "Explore".
    LaTeX and LaTeX2HTMl do that, but it was quite a hassle to get the
    HTMl part going. Also maybe tex4ht with LaTeX. You can also produce
    PDF and PS easily from LaTeX.

    HTH, Jochen
    --
    Jochen Daum - CANS Ltd.
    PHP DB Edit Toolkit -- PHP scripts for building
    database editing interfaces.
    [url]http://sourceforge.net/projects/phpdbedittk/[/url]
    Jochen Daum Guest

  5. #4

    Default Re: Wanted - Simple section numbering prog for HTML document

    Martin Lucas-Smith <mvl22@cam.ac.uk> wrote in message news:<Pine.SOL.4.44.0309151109440.23180-100000@green.csi.cam.ac.uk>...
    > > I maintain various specs and FAQs in manually edited HTML documents,
    > > and I'd very much like some simple way of automatic section numbering
    > > as in 2.1, 2.1.1, 2.1.2, 2.2 etc, with table of contents generation
    > > plugged into the start of the document so that each section can be
    > > accessed via a link (and also maybe automatic footnote numbering).
    > >
    > > [...]
    >
    > See my page at
    > [url]www.geog.cam.ac.uk/~mvl22/javascript/toc.html[/url]
    >
    > [...]
    >
    > > P.S. Also, I'm not sure if SSI is suitable, as the files should be
    > > viewable locally via "Explore".
    >
    > Clearly this has to be client-side, then. PHP will be of no use for this
    > if you require local viewing.
    Many thanks, Martin. This server-side solution is certainly of some use,
    and hopefully if I have php installed on my PC it might work also for
    client-side viewing. Well, I guess there's only one way to find out..


    Cheers

    John Ramsden (john_ramsdenNO@SPAMsagitta-ps.com)
    John Ramsden Guest

  6. #5

    Default Re: Wanted - Simple section numbering prog for HTML document



    > > Clearly this has to be client-side, then. PHP will be of no use for
    > > this if you require local viewing.
    >
    > Many thanks, Martin. This server-side solution is certainly of some use,
    > and hopefully if I have php installed on my PC it might work also for
    > client-side viewing. Well, I guess there's only one way to find out..
    Erm, it's client side, as you presumably meant to say. It's a javascript
    solution, not PHP..


    Martin

    Martin Lucas-Smith Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139