[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference vaxuum::document_ft

Title:DOCUMENT T1.0
Notice:**New notesfile (DOCUMENT.NOTE) now available (see note 897)**
Moderator:CLOSET::ADLER
Created:Mon Feb 09 1987
Last Modified:Thu Oct 31 1991
Last Successful Update:Fri Jun 06 1997
Number of topics:897
Total number of notes:4397

344.0. "Automatic change bar <MARK> generation" by IJSAPL::KLERK (Theo de Klerk) Tue May 05 1987 17:01

 
  To maintain several documents (with CMS) and indicate differences
  between the current and previous version, I always used the 
  change bar option of Runoff. A similar hack is available for LaTeX
  if you specify \documentstyle[overhead], if the TEX$INPUTS:OVERHEAD.STY
  of Greg Waters is present.
  With <MARK> <ENDMARK> this is also possible in Document.

  Rather than adding/removing these tags all the time, I made a two-hour
  hack (which survived all tests sofar) for having the two original texts
  be compared with one another to produce a third document, identical
  to the most recent one, but with the necessary change bar commands.
  
  It's implemented as a DCL command:

       CHANGEBAR oldfileversion  [newfileversion] [/output=filespec]
                                 [/type=(DOCUMENT|LATEX|RUNOFF)]

  If the "newfileversion" is omitted, it uses the highest two versions
  of the "oldfileversion" filespec for comparison, if the /TYPE is
  omitted, it inspects the GNC, TEX or RNO extention, if the output
  is omitted, it uses the name of the "newfileversion" where the
  type is extended with "_CBAR"  (e.g. TRY.GNC --> TRY.GNC_CBAR)
  
  It functions by SPAWNing a process which performs the DIFFERENCE/SLP
  command, and then  modifies the SUMSLP output by adding the <MARK>s.
  Afterwards, the final file is composed by a spawned command
      EDIT/SUMSLP oldfile/UPDATE=diff_file
  Hence the detection of differences is as good (or bad) as the
  DIFFERENCE utility...


  For those interested, you may find it in 
      IJSAPL::PRIVATE:[KLERK.TEMP]BARS.EXE and BARS.CLD and BARS.HLP
  (modify the CLD file for the proper location of the image).
  Wildcard copying doesn't work due to the W:E protection of the directory.

  Because the source uses a lot of home-grown Pascal inherit files,
  the sources are not yet useful for distribution.

  Any comments on the utility are welcomed. 


Theo
T.RTitleUserPersonal
Name
DateLines
344.1great idea! (and a one-plus suggestion)VAXUUM::DEVRIESThose are features, not bugsWed May 06 1987 12:0713
    On the matter of file extensions:
    
    As of baselevel 8 (field test update), VAX DOCUMENT will "prefer"
    a file extension of .SDML (although, if you don't have one of those,
    it will then look for a .GNC file).  So you might want to make the
    corresponding addition to your program.
    
    -----
    
    This sounds like a really good tool.  I hope it gets a lot of use
    "out there".
    
    Mark
344.2Some more feedback neededIJSAPL::KLERKTheo de KlerkThu May 07 1987 04:0230
 Some more feedback might be useful. I made the tool (from a DCL equivalent
 I've been using some time already) to maintain some "books" and "manuals"
 in use here.

 The Runoff MEMs have a problem with the .BEGIN/END BAR in as much that 
 when modifications occur within a literal environment, the command is not
 seen, rather it is printed in the final output. 

 The same is probably true for DOCUMENT (en LaTeX between the {verbatim}s).
 I'd like to know where you have found that <MARK>s are either not seen
 or cause TeX to get confused (e.g. possibly when a table row is modified?)
 If I can get a list of "dangerous areas" within the text where <MARK>s
 might not work the way they are supposed to work, I could try and work
 around these by SCANning the input file first.

 Also input on where modifications cross "undangerous" and "dangerous" areas
 are crossing: what to do? E.g. if one line in a table is modified, would
 you prefer a change bar along the entire table (since only on one line
 causes TeX to protest) or to "forget" those modification indications?

 The possible spanning/crossing situations are (M=<MARK>, E=<ENDMARK>)

    safe        | <........ dangerous area .......>  |      safe

   M-------E                                             M----------E
        M--------------E                     M----------------E
                          M------------E
        M-----------------------------------------------------E

 Theo
344.3will make a listCLOSET::ANKLAMFri May 08 1987 12:555
    Will try to work on such a list. Essentially what you want are
    restrictions on the use of <mark> and <endmark>?
    
    
344.4Yes, that's what I wantIJSAPL::KLERKTheo de KlerkSat May 09 1987 09:1120
 Re. -1:   Right on the head!

  1. The restrictions of <MARK> and related tags

  2.  (From the users:) what to do to work around them, if possible.
      Options are: forget the changes in the restricted areas,
      span the entire area if only part of it is modified etc.
      (at the moment I'm inclined to the easy way out: don't makr
      those areas, but there is a challence in getting it right...)

Thanks.

Theo


P.S.
the changebar program at the moment now also recognizes .SDML files.
I cannot remember from the documentation that this is the new default.
If I remember right most examples used the GNC type (cannot check at
the moment as I'm working from home)
344.5CMS Support now availableIJSAPL::KLERKTheo de KlerkThu May 14 1987 17:5522
  The Changebar utility has been expanded to support CMS support too.
  Either specify one or two filenames:
 
    CHANGEBAR olderfile newerfile    /type=  /output=

  or use a valid element name from the current CMS library:

    CHANGEBAR elementname /CMS=(older_gen, newer_gen) /type=  /output=

  It will fetch both generations mentioned or will take the most
  recent two when the values are omitted. Using /CMS prohibits the
  use the the 2nd command parameter.

  Current files:

   IJSAPL::PRIVATE:[KLERK.TEMP]CHANGEBAR.EXE, .HLP, .CLD

 Sources will become available in due course. Meanwhile, the document
 scanning routine will remove possible nested bars and will also
 recognize removed text with <MARK_DELETION>.

Theo
344.6some rulesCLOSET::ANKLAMWed Jun 24 1987 16:5039
    
    Having spent much of the last several weeks tracking how revision
    bars are handled and in which contexts, I have to confess that there
    are no hard-and-fast rules to follow. In general, you will get the
    best results turning the marks on/off:
    
    1. Within a short range of text. If a page break occurs in a nested
       table with marks turned on, for example, the mark may not be
       properly restored on the next page.
    
    2. Using tag start/end pairs to group <endmark> and <mark>. In general,
       the depth of the mark is better if you put the marks inside,
       for instance 
    
       <figure>(<mark>This is a new caption<endmark>) 
    
    3. It's useful to remember that when you have something like:
    
       end of last sentence.
       <mark>
       <p>Start a new paragraph.
    
       the revision bar is enabled and 'bound' to the last sentence,
       because that's the position TeX was in when it came across the
       mark. So the bar will appear to start before you really wanted
       it.
    
    4. The same rule we apply to index tags should be applied: put the
       tags as close as possible to the important word or words.
    
    There will still be some problems, but we have managed to make sure
    that if it looks like there will be a problem you will get an
    informational message from the text formatter or from the device
    converter in cases when the crossing of a page boundary gets things
    mixed up. There will be an E-level message from the tag translator
    in cases where the mixup would cause severe problems in the text
    formatter.
    
    -patti
344.7Sources availableIJSAPL::KLERKTheo de KlerkTue Jun 30 1987 05:2313
 Re -1: Thanks. When needed, I'll try to modify the Document part of the
 bar generator to take the above into account.

 As for the generator itself: you can copy sources/exes from

   IJSAPL::PSQ:[PUBLIC.SOURCES.CHANGEBAR]*.* 

 An MMS build file is included there, and some smaller errors have been
 corrected. There is one restriction so we found: due to a bug in the
 SUMSLP editor (it doesn't like longfilenames.withlongfiletypes) you 
 may bomb out - an error message to this extend is now generated.

Theo
344.8V1.1 also processes plain textIJSAPL::KLERKTheo de KlerkFri Aug 28 1987 16:2110
  A V1.1 OF changebar is now available.

  -  A LaTeX error on omitting \documentstyle options is corrected
  -  It will now also process plain text (/TYPE=TEXT or filetype .TXT)
  -  Announces itself as V1.1

  Updated sources and EXE (+HLP and CLD) files are found at the old
  spot:  IJSAPL::PSQ:[PUBLIC.SOURCES.CHANGEBAR]*.*

Theo