[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

695.0. "How to change the default case of <tag>?" by COOKIE::JOHNSTON () Mon Jul 20 1987 20:55

We are writing a document that has lots of BNF syntax within sentences and
paragraphs, for example: "When using a <for statement>..."

I've figured out how to define <for> to generate <FOR STATEMENT>, but 
how do I override <tag> so that it will print exactly as typed, usually in 
lowercase, and not default to uppercase?

Here's the simple <define> statement I am using:

<DEFINE>(for\|<tag>(for statement)&)

This is the <for>.


There are about 250 statements we must define in this manner, and the list 
is expected to grow.  Using <literal> or <tag> for every instance just wasn't
cutting it.

Can I define the case in the define statement?  Or do you recommend 
modifying a doctype or something else?  I'd like the least painful path
in anticipation of things continuing to work with V1.



Thanx

Rose
T.RTitleUserPersonal
Name
DateLines
695.1create a tag for the left angle bracketVAXUUM::KOHLBRENNERTue Jul 21 1987 10:4627
    I think I would take the approach of trying to get the tag
    translator to ignore the "<for statement>", rather than trying
    to make it look like <tag>(for statement) and then trying
    to modify the definition of the <tag> tag.
    
    What if you define a local tag such as <l> which you use in
    place of the left angle bracket, where you want the tag translator
    to ignore the left angle bracket?
    
    So you can type "<l>for statement>"   instead of "<for statement>"?
    
    You would define <l> with something like:
    
    <define>(l\|<literal>(<)&\\\\\|<literal>(<)&)
               ^^^^^^^^^^^^^^     ^^^^^^^^^^^^^^
                 pass 2 def          pass 1 def
    
    Once you get the tag translator to read past the left angle bracket,
    you are safe.  That is, it completely ignores right angle brackets,
    except where it is trying to form a tag reference, so there is never
    any need to make the "whole tag" into a literal argument.
    
      <literal>(<)for statement>         is sufficient,
      <literal>(<for statement>)         is overkill,
      <l>for statement>                  may be simplest solution
    
    bill