[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

600.0. "Creating <REFERENCE> labels" by IJSAPL::KLERK (Theo de Klerk) Tue Jul 07 1987 05:27

 Is there any way to make reference labels within a text to be refered to
 by the <REFERENCE> tag? I know labels are made within arguments for
 <CHAPTER> etc, but I'd like to be able to refer to something like
 "this is discussed in more detail on page <reference>(topic)" where
 on that page something like <label>(topic) is written (� la LaTeX's
 \label and \pageref commands). Being able to refer to tables, sections,
 figures etc. fulfills 90% of my needs, I'm now asking for the other 10%...

Theo

T.RTitleUserPersonal
Name
DateLines
600.1references get resolved before page layoutVAXUUM::KOHLBRENNERTue Jul 07 1987 08:2613
    Unfortunately, there is no way to refer to page numbers.
    
    Currently all symbol definition and all resolution of symbol
    references takes place in the tag translator, before any 
    page layout has taken place.
    
    The references to page numbers that do occur (in the table of
    contents and in the index) take place during page layout of the
    body of the document.  However, those references get formatted 
    on separate pages.  Once TeX has formatted a page, it never has
    to return to that page in order to insert a page number.
    
    I don't know if TeX can do such a "fix up" operation.
600.2Let TeX do the workCUPOLA::HAKKARAINENThis too shall passTue Jul 07 1987 09:0611
    If Document could get TeX to write out a symbol table, containing
    reference markers and the appropriate page numbers, then TeX could
    re-read that table on a second pass. Accurate page-based
    cross-references will require at least two passes through the text
    formatter. Those additional passes need not occur during the same
    session. DSRplus, for example, checks to see if its symbol table
    (.brn file) is older than the main (.rno) file; if so, it updates
    the symbol table.
    
    This feature would also permit numbering such as ``Page 1 of 5,
    Page 2 of 5'' and so on.
600.3coding for disasterVAXUUM::KOHLBRENNERTue Jul 07 1987 10:2318
    It seems to me that it is still a little messy.  In order to make
    up the page the first time around, TeX has to estimate the space
    that will be taken by the reference to the page number.  It
    doesn't know if the page number is 5 or 555.  If there are
    many such references on a page, then the amount of "stretch"
    that will be required could be quite large.
    
    Then on the second time around, TeX will be replacing references
    to symbols with the actual page numbers and it has to keep all
    the page breaks at exactly the same place that they were the
    first time through.  THus it has to squeeze or stretch its initial
    layout of each page to accomodate the new material on that page.
    One could easily build a pathological case that would produce a
    page with a lot of white space on it or a page with everything
    crammed together.  Granted, most real-life situations would not
    cause a problem.  But the algorithm has to handle ALL situations,
    not just the simple ones.  I think the code to handle the patho-
    logical situation might dwarf the rest of the code.
600.4LaTeX can do it, TeX does it, why not Document?IJSAPL::KLERKTheo de KlerkWed Jul 08 1987 04:2915
Re .1:

  Yes, TeX can do this, in fact LaTeX does it and that's why I started
  to use this feature and appreciate it.

  Every \label{symbol} creates an entry in the .AUX file, that is read
  on the second pass through the source. Admitted, this means processing
  the document twice. On second pass round it uses the .AUX file to
  resolve any \ref{symbol} or \pageref{symbol}. 

  The table of contents entries are written in a .TOC file and processed
  the same way on second pass. Idem for figures and tables. This functionally
  is the same as with Document.

Theo
600.5wishlistCLOSET::ANKLAMWed Jul 08 1987 12:184
    
    This came up quite a long time ago in the old DOCUMENT NOTES file,
    and it is on the list to look at for a future release.
    
600.6Bounded iterationsBUNSUP::LITTLETodd Little NJCD SWS 323-4475Thu Jul 09 1987 00:5315
    Just as an aside for future consideration, an approach that is
    almost guaranteed to work in ALL cases but work slowly in the pathalogical
    cases is to recalculate the symbol values on the second pass.  If
    any one of them changes due to TeX making new page boundries, you
    run yet another pass.  I say almost because I suppose its possible
    to get into a pathalogical case that causes oscillation, but I'm
    not sure you could create such a case, and you could punt if you
    didn't get convergence within say 3-4 passes.  In most cases, you'd
    get convergence on the second pass and only in the most bizarre
    cases would it take more than 2 (like 100's of references on a single
    page to a page number that went from N to N+1 digits, and even then
    thats only adding 100's of characters to the current page which
    still might fit.)
    
    -tl
600.7let's try that again...VAXUUM::KOHLBRENNERThu Jul 09 1987 09:237
    re: .6
    
    Maybe we could get TeX to emit beeps and type @#$%^&%$^ words
    on the terminal as it began the 2nd, 3rd and 4th iterations...
    
    bill
    
600.8You're very welcomeBUNSUP::LITTLETodd Little NJCD SWS 323-4475Fri Jul 10 1987 01:2215
    re: .7
    
    I can only tell you that as a user of the documentation DIGITAL
    produces, I find the lack of page number references distinctly
    annoying.  Nothing like having to thumb around through the pages to
    find what you've been asked to look at, or turn back to the TOC and
    scan for what you were looking for just to get the page number.
    
    If you have a better suggestion or method that will generate page
    references properly, go right ahead, I was only trying to suggest a
    method that has been used before for similar problems.  For that
    matter, does anyone know offhand how LaTeX does it and whether it
    handles the bizarre cases. 
    
    -tl
600.9how will the wizard feel on the Nth pass?VAXUUM::KOHLBRENNERFri Jul 10 1987 10:3722
    I think what TeX will have to do is exactly what you specified in
    reply .6.  And probably 99% of the cases would not result in
    additional passes beyond the second pass.
    
    I think I may be over identifying with the executing code in TeX.
    
    I was imagining that code
    going through the second pass and discovering that another
    pass would be needed, gnashing its teeth, looking at the clock,
    sensing the drumming of the user's fingers on the edge of the
    keyboard, while s/he waited for output, and beginning to mutter
    about how hard it is to satisfy these users...  Then when the
    next pass came around and yet another pass was needed...
    
    With all those wacko error messages that TeX used to put out,
    you have to admit it does seem to have a personality...  I can
    imagine it getting a bit miffed at having to repeat itself just
    for a simple page reference.  Most "wizards" that I have met
    do not seem to have a lot of patience with repetitive tasks.
    
    :-)
    
600.10So father so sonIJSAPL::KLERKTheo de KlerkFri Jul 10 1987 11:285
>    wacko error messages that TeX used to put out,

What do you mean? Doesn't the child talk like his father?

Theo
600.11DECspeak, not TeXspeakVAXUUM::KOHLBRENNERFri Jul 10 1987 12:433
    Well, David has been working very hard to have the child
    merely mumble the parent's comments (inaudibly).
    In the meantime, the child has been taking a crash course in DECspeak...
600.12Sell it as a "feature".BUNSUP::LITTLETodd Little, New York Area SWS, 323-4475Mon Jul 13 1987 11:518
    When this ever gets done in DOCUMENT, you can make a note in the
    release notes about the sensible use of page references and mention
    that DOCUMENT in an attempt to prevent bad writing goes out of its way
    to punish you for excessive page references!
    
    -tl
    
    PS  I've got a bottle of valium earmarked for the wizard.
600.13A different side of the problem.VAXUUM::CORMANTue Aug 11 1987 15:5411
    In the meantime, the writers in the Layered Products group have
    been told that, not only should we not reference the page number
    of information in VMS manuals, but we should not reference the
    specific VMS *book* itself. This is NOT because VAX DOC doesn't
    yet offer the page referencing feature... it's because the
    VMS docset is so big and transient that the referenced book might
    not be there tomorrow. 
    
    Of course, that's a discussion for a different notesfile... 
    
    Barbara
600.14So what?IJSAPL::KLERKTheo de KlerkTue Aug 25 1987 10:3321
 Simply because VMS does such a lousy job in sticking to titles,
 divisions etc. it does not mean other documents, more stable than
 the VMS set, should not be able to reference to pages.

 I want to be able to do that, even if VMS doc doesn't. 

Theo



Footnote:
 Having been in the field for quite a while + stood in front of classes
 for 4 years I know customers find VMS docs increasingly difficult to
 find all the information on a certain topic. It's getting spread all over
 the place with a master index that is often wrong. Perhaps as well we
 don't mention particular page numbers. 

 "Any resemblance to existing pages is purely coincidential since they
  do not yet exist"
 (paraphrased end credit title to "Thunderbirds are Go!" feature film)