Date: Friday, 31 October 1986 12:31:12 EST From: Harry.Bovik@k.cs.cmu.edu To: bovik@k.cs.cmu.edu Subject: Comment,Transparent,Invisible Message-ID: <1986.10.31.17.28.47.Harry.Bovik@k.cs.cmu.edu> 30-Oct-86 14:19 David.Zubrow Comment and Toggling Output From: David.Zubrow Does anyone know how to selectively display portions of a document? I was thinking about something akin to redefining @comment() that would display the text within this command. I know it is a command and not an environment, but is there an environment attribute that will turn off the inclusion of text in the output file? What exactly does "transparent" do? Where is the definition of @comment()? I can't seem to find it in the database. Thanks for your help. ________________________________________ 30-Oct-86 18:08 Scott.Robinson Toggling text From: Scott.Robinson@ohm.ECE.CMU.EDU How about some type of conditional scribing (something like conditional compilation.) ------------------------------------ @make(text) @string(AMode="No") @string(ernie="more") There is @value(ernie). @case(AMode, Yes <@string[oink="snort"]>, No <@string[oink="rootle"]>, else <@string[oink="Neither"]>) The string chosen for @value(AMode) is @i<@value(oink)>. ------------------------------------ A more Detailed example: @Comment[ @Ox(text) puts an bar over the text. This should replace @OverLineCap in Mathdisplay. This environment should work in nearly any environment. (I hope.) ] @Case{Device, Imagen300 <@TextForm[Ox "@Begin(Transparent,MathArea,Spacing 1.5em,ScriptPush Off) @MathBar @Parm(Text)@MarkBaseLine @End(Transparent)"]>, Imprint10 <@TextForm[Ox "@Begin(Transparent,MathArea,Spacing 1.5em,ScriptPush Off) @MathBar @Parm(Text)@MarkBaseLine @End(Transparent)"]>, else <@TextForm[Ox "@Begin(Transparent,MathArea,Spacing 1.2em,ScriptPush Off) @MathBar @Parm(Text)@MarkBaseLine @End(Transparent)"]>} ------------------------------------ Yet another example: @Comment[ @Sm(text) places 'text' in the document if SkipMarker = YES, otherwise 'text' is omitted. In this case, we use this to indicate what sections and chapters of the thesis can be skipped. ] @Comment(Enable markings in text that denote what text to skip) @String(SkipMarker="Yes") @;@;@;@Comment(Force scribe to finish parse before using SkipMarker.) @Case{SkipMarker, Yes <@TextForm[Sm "@Parm(Text)"]>, Else <@TextForm[Sm "@;"]> } --------------------------------- Sample invocation using @Sm() command defined above: @SubSection(Control Strategy Requirements @sm[***]) Blah blah blah....... I suppose longer chunks of text could be included in the @sm[] braces. shr ________________________________________ 31-Oct-86 01:18 Michael Shamos@A.CS.CMU.EDU Comment/Transparent/Invisible Comment is a command, which means that the text inside @Comment( . . . ) is not processed but is only scanned for the right delimiter. A long time ago, people queried why you couldn't say @Begin(Comment) . . . @End(Comment), which is a very convenient thing to be able to say and were not satisfied with the answer, "Well, Comment is a command, not an environment." So a special bit of hackery was added to make Comment be a command that can look like an environment only in that it can be used in @Begin. A sure test to prove that Comment is not really an environment is that you can't say @Modify(Comment, . . .). There is a big difference between Comment, the environment Transparent and the environment attribute Invisible. Comment does not process the text inside the comment at all, so @Comment[@String(a="b")I just set a equal to b] does NOT have the effect of defining and initializing the string named a. If I use the attribute Invisible, however, the text in the environment is processed normally, just not printed in the output. So @Modify(Quotation, Invisible) @Quotation[@String(a="b")I just set a equal to b] DOES have the effect of setting string a. The text "I just set a equal to b" is lost, however, because of the Invisible attribute. The standard environment Transparent is just a null shell -- an environment with no attributes. Its definition is @Define(Transparent). The word "Transparent" here does not mean with respect to text, but with respect to inheritance of environment attributes. If in running text I suddenly want a character raised 0.2 inches from the baseline, an easy way to express this is @Begin(Transparent,Script 0.2in)p@End(Transparent). Then the letter "p" will be raised. If you find the word "Transparent" to be too lengthy, roll your own: @Define(D). While Transparent has no attributes of its own, since Scribe environment attributes are inherited from the outer enclosing environment, in an actual document any text inside Transparent will have all of the attributes of the document at large, except for those changed in the @Begin or @Modify command. If you follow all of this you will understand why it makes sense to say, @Begin(Transparent,Invisible) This text will not appear in the document. @Comment(Nor will the comment) @End(Transparent) ________________________________________ 31-Oct-86 09:13 Karen.Brown@sei.cmu.edu Transparent, Invisible, etc. First, Mike Shamos was right. I think you want to use the transparent environment with the invisible attribute (which, thanks to this board, I found out WAS an attribute a couple of weeks ago) in order to get something to not print out. BUT, I have found that the transparent environment, despite all I've been told that it mirrors its surrounding environments, leaves extra space above and below it. That tells me that it must be defined somewhere -- but I can't find it in the database. Therefore, I always have to modify it (with above 0, below 0) when I use it. I've discovered there are a lot of crummy things in the environments. For example, if you use itemize, which has a below attribute specified, but your spread is, e.g., 1, you will not get the correct spread below the environment! I'm doing new .mak files for the SEI and trying to correct some of these glitches in our stuff. Then let me complain about the heading and subheading environments! Ah, well.