THE WELCH COMPANY
440 Davis Court #1602
San Francisco, CA 94111-2496
415 781 5700
rodwelch@pacbell.net


S U M M A R Y


DIARY: April 10, 1999 11:56 AM Saturday; Rod Welch

Improve convert editor file to HTML with outline structure.

1...Summary/Objective
2...Test Cases
3...01220 Outline and List Format for Documents
........Outlines All in 1 File and Requires Ending Narrative Text
4...0122 Paragraphs - Improve algorithm
5...0112 Letterhead
6...0122 Subjects and References, Increase Font Size


..............
Click here to comment!

CONTACTS 

SUBJECTS
Save to HTML Directory for Web Site
Editor, F02
Convert Documents, 0122
OL start=n
Outline Rules with Segmented Files for HTML

0707 -
0707 -    ..
0708 - Summary/Objective
0709 -
070901 - Follow up ref SDS 16 0000, ref SDS 15 0000.
070902 -
070903 - Modified method of adding html to editor files, so it is simpler but
070904 - handles nested outline structures better.  Formerly the code was okay
070905 - to handle a variety of different outline types, but it did not handle
070906 - a document that used all of them together.
070908 -  ..
070909 - Improved the way paragraphs are handled and changed format for
070910 - correspondence to make subject and reference fields larger font.
070911 -
070912 -            [On 040714 segmenting large files for HTML processing was
070913 -            developed, and explain these outlining requirements.
070914 -            ref SDS 21 RL4L
070915 -
070917 -  ..
0710 -
0711 -
0712 - Problem
0713 -
071301 - We are having a problem converting a file, ref OF 6, in the record on
071302 - 990407, which is at ref SDS 17.
071304 -  ..
071305 - Using lists in nested structures was not working well.
071307 -  ..
071308 - The problem was the dumb algorithm created on 981005. ref SDS 15 2972
071310 -  ..
071311 - The general explanation of the process on 981005 is correct, but the
071312 - underlying code to accomplish objectives was not good.  It is another
071313 - case of creating something that seemed to work, but was dumb.  Then
071314 - compounding the dumbness over and over again, until it gave the
071315 - illusion of working.
071317 -  ..
071318 - Today, I think I figured out an algorithim to handle conventional
071319 - outling with less code that runs faster than what we have been doing.
071321 -  ..
071322 - The new method examines the outline level column.  It uses two columns
071323 - so it will not pass a space between two words from a higher outline
071324 - level. ref SDS 0 3908  This permitted deleting a lot of code that was
071325 - created on 981005.
071326 -
071328 -  ..
071329 - One part of the solution is that it helps to process different outline
071330 - forms in descending order.
071331 -
071332 -
071334 -  ..
071335 - Test Cases
071336 -
071337 - Follow up ref SDS 16 2286.
071338 -
071339 - We have it working okay on this problem file, but need to test on
071340 - complicated documents.
071341 -
071342 -    1.  USACE Comm Metrics report, 970338. ref DRP 2
071344 -         ..
071345 -    2.  USACE Comm Metrics report, 971007. ref DRP 3
071347 -         ..
071348 -    3.  POIMS paper. ref OF 3
071350 -         ..
071351 -    4.  NWO paper. ref OF 4
071353 -         ..
071354 -    5.  Welch letter format. ref DIP 1
071356 -         ..
071357 -    6.  NSF research scope. ref OF 6
071358 -
071359 -
071361 -  ..
0714 -
0715 -
0716 - Progress
0717 -
071701 - 01220  Outline and List Format for Documents
071702 -
071703 - Follow up ref SDS 16 0089, ref SDS 15 1844.
071704 -
071705 - Line 370, ref OF 1 3200, -label lfbtc, Order List commands for outline
071706 - structure begins here.
071708 -  ..
071709 - Currently we do...
071710 -
071711 -                   •    4 = 4
071712 -                   A    4 = 1
071713 -                   1    4 = 2
071714 -                   a    4 = 3
071716 -  ..
071717 - My feeling is that we need to do this stuff in the correct order for
071718 - nested lists.  The new code created today that uses the outline column
071719 - for control rather than text lines and spaces, is more forgiving, but
071720 - there is a potential for the html code itself to be encountered and
071721 - mistaken for text.
071723 -                    ..
071724 -                   A 1 a •
071726 -      ..
071727 -     The work today did not really solve the problem.
071729 -             ..
071730 -            [On 990507 developed code to jump past an anchor, and also
071731 -            an ordered list command. ref SDS 19 8599 and ref SDS 19
071732 -            5328  This seems to be a stronger solution than what is
071733 -            accomplished today.
071735 -  ..
071736 - Line 540, ref OF 1 5695, -label keepit, about 60 lines below, first
071737 - look for outline levels that start in the middle, for example when
071738 - the thing is split up between web page files.
071739 -
071740 -            [On 000305 updated Help to include this stuff. ref SDS 20
071741 -            0001
071743 -  ..
071744 - For this to work, the User needs to enter in the document beginning
071745 - on column 1 on the line above the outline level...
071746 -
071747 -           (OL start=5>
071748 -               5.  This is an outline level starting at 5.
071749 -           (OL start=h>
071750 -                   h.  This is an outline level starting at h.
071751 -
071752 -   ...etc., on the line immediately above the intermediate outline
071753 -   level.  This allows the User to enter text that is readable that
071754 -   can easily be converted into HTML.
071756 -  ..
071757 - Line 630, ref OF 1 1161, -label ulok, this is where the list type is
071758 - established based on the value of 4.
071760 -  ..
071761 - Line 610, ref OF 1 6210, -label ulok, this is the main code that
071762 - enters an outline command.
071764 -  ..
071765 - Today, I changed this to simplify the code.  Removed a bunch of stuff
071766 - that was dumb, created on 981005. ref SDS 15 0147
071768 -  ..
071769 - Line 640, ref OF 1 3460, -label ulok, about 40 lines below, use find
071770 - right (fr) to identify the outline column and store it in counter 1.
071772 -  ..
071773 - This is tested against counter 9 per ref SDS 0 9638.
071774 -
071776 -  ..
071777 - Line 1770, ref OF 1 RB8L, -label lpfbe in 0122
071778 -
071779 -    -label lpfbe
071780 -    z @12 @13
071781 -    loc_cur 0 1
071782 -    nb
071783 -    z 1 25
071784 -    -if @0 > 0 -goto nmblt1
071786 -         ..
071787 -        Create a two column zone for nb command.  This is needed
071788 -        because the code enters (li) to identify an outline.  There is
071789 -        a space between the command and the next word.  On some outline
071790 -        levels, this space can be the one column for the outline level
071791 -        above, and so processing with nb on a single column jumps to
071792 -        the line below, rather than stop on correct line.  Using two
071793 -        columns should prevent this.
071794 -
071795 -
0718 -

SUBJECTS
Outline Rules with Segmented Files for HTML

0803 -
080401 -         ..
080402 -        Outlines All in 1 File and Requires Ending Narrative Text
080403 -
080404 -        nb command is tricky.
080406 -         ..
080407 -        Years after creating this code, on 040714 macro file 0122 was
080408 -        revised to process small files into large files with HTML for
080409 -        display in a browser. ref SDS 21 0001  This "virtual memory"
080410 -        design resolved Medit memory limits in producing required work.
080411 -
080412 -            [On 040714 segmenting large files for HTML processing was
080413 -            developed, and later about 060920 added explanation of
080414 -            these outlining requirements. ref SDS 21 LL9Q
080416 -             ..
080417 -            [On 051113 greatly expanded NWO, which changed the way that
080418 -            NWO files applied the segmenting process developed on
080419 -            040714. ref SDS 22 8H5K
080421 -             ..
080422 -            [On 060116 changed the content of file segments for NWO in
080423 -            a manner that met size requirements for Medit memory
080424 -            limitations, ref SDS 23 135H, but ignored rules to
080425 -            accomodate mechanics of outling in macro file 0122, per
080426 -            below. ref SDS 0 0V8N
080428 -             ..
080429 -            [On 060920 accumulation of changes induced small errors,
080430 -            which came into alignment bringing major problem to
080431 -            attention; solved with synergy between collaboration and
080432 -            reviewing the record. ref SDS 24 4O9J
080434 -         ..
080435 -        Note, the code created today corrected previous "dumb" work,
080436 -        reported above. ref SDS 0 XH57  Similarly, the code on 040714
080437 -        was somewhat dumb.  It works, so long as a coulple of simple
080438 -        rules are followed.  Like today, the issue was not presented by
080439 -        conditions at the time the code was created and put into
080440 -        production on 040714, because the rules shown below, were not
080441 -        violated.  Only after starting work to greatly expand NWO with
080442 -        background on previous transformations, reported on 051113,
080443 -        ref SDS 22 8H5K, were enabling forces moved into alignment that
080444 -        eventually revealed the "truth." Sounds like Andy Grove's
080445 -        explanation of risks CEOs experience when big problems sneak up
080446 -        silently with "little cat feet," reviewed on 980307.
080447 -        ref SDS 4 6148
080449 -         ..
080450 -        This part of the code adding HTML for outlining is tricky.  The
080451 -        nb command looks for standard narrative at the end.  If it is
080452 -        not there, then an ending outline code is entered incorrectly
080453 -        and the display in the browser is incorrect.  There are two
080454 -        basic rules...
080455 -
080456 -            1.  All of the elements of an out line level must be
080457 -                construced in the same file segment.  If an outline
080458 -                level is broken between two file segments, the code in
080459 -                0122 fails.
080461 -                 ..
080462 -            2.  Narrative is required at the end of an outline
080463 -                structure in order for the nb command to find the
080464 -                bottom and enter the ending outline code.
080465 -
080467 -  ..
080468 - Line 670, ref OF 1 9483, -label lpfbe, use nb on the outline level
080469 - column.  Check to see if the next line is an anchor, and if so, do nb
080470 - again to keep processing this outline level.
080471 -
080472 -        [On 990507 developed code to jump past an anchor, and also an
080473 -        ordered list command. ref SDS 19 8599 and ref SDS 19 5328  This
080474 -        seems to solve the problem of the order that outlining is used,
080475 -        discussed above. ref SDS 0 1290]
080477 -  ..
080478 - Line 700, ref OF 1 7000, -label lpfbe after nb, we test for an outline
080479 - structure by looking for a bullet or a dot (.), we have to test this
080480 - position to see if the column is the same as the current outline level
080481 - being processed, and if not, cycle back to do another nb instead of
080482 - entering an outline command (li).
080484 -  ..
080485 - Counter 1 has the initial position and counter 9 has the current
080486 - position that is tested against 1. ref SDS 0 3908
080487 -
080488 -
080489 -
080490 -
0805 -

SUBJECTS
Para <P> Commands

0903 -
090401 -  ..
090402 - 0122  Paragraphs - Improve algorithm
090403 -
090404 - Follow up ref SDS 16 2024.
090405 -
090406 - Line 1070, ref OF 1 2612, -label epstbt, decided to change the
090407 - paragraph function, so it puts a para on every blank line, unless it
090408 - is between a pre command.
090410 -  ..
090411 - May, also, need to avoid putting the para on lines that are part of a
090412 - table.
090414 -  ..
090415 - Considered looking for a space in column 1, but we need also to put
090416 - para on lines with anchors where is outline structure.
090418 -  ..
090419 - So, we have to evaluate every line.
090421 -  ..
090422 - This seems like it pretty much elminates the need for the function
090423 - created on 981219 to add a para in debug. ref SDS 3 1333
090424 -
090425 -     [On 990418 was able to eliminate menu function to enter a para in
090426 -     an editor file. ref SDS 18 6523]
090427 -
090428 -
090429 -
090430 -
090431 -
0905 -

SUBJECTS
Letterhead

1003 -
100401 -  ..
100402 - 0112  Letterhead
100403 -
100404 - Line 1170, ref OF 1 9360, -label addr
100405 -
100406 - Today, this seems to be messed up a bit for military memos.
100407 -
100408 - Since we are putting para commands on all blank lines, execept when
100409 - the lines are beween pre and /pre commands, we need to move the code
100410 - that centers letterheads above the para code.
100412 -  ..
100413 - Line 1060, ref OF 1 9360, -label addr this code enters a command line
100414 - below a letterhead that has a pre command which the para code can use
100415 - to jump to below the next /pre command.
100417 -  ..
100418 - I moved this code so it executes before the para code.
100420 -  ..
100421 - Line 1180, ref OF 1 2612, -label epstbt moved this code below the
100422 - letterhead code.
100423 -
100424 -
100425 -
1005 -

SUBJECTS
References
Subjects, Re

1204 -
120501 -  ..
120502 - 0122   Subjects and References, Increase Font Size
120503 -
120504 - Line 920, ref OF 1 6090, -label splT, decided to make the subject a
120505 - larger font, so had to move the second line subject descriptions over
120506 - two more columns so they line up with the first line subject.
120507 -
120508 - Line 570, ref OF 1 3528, -label refAa references are actually part of
120509 - the outline processing.  Made References a larger font also, so it is
120510 - the same as Subjects.
120511 -
120512 -
120513 -
120514 -
120515 -
120516 -
120517 -
120518 -
120519 -
120520 -
120521 -
120522 -
120523 -
1206 -