[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

523.0. "Stamp out ug-ly headers" by PNEUMA::ILSLEY (Yoyodyne consultant....) Thu Jun 18 1987 14:31

This is a continuation of the discussion about the <line> tag (notes 164
and 352, I think).

I'd like to use <line> with <chapter>, <headx>, <figure>, and <table>,
to avoid hyphenation and poor line breaks in titles. You can do this
with <figure> and <table>, but the text following the <line> tag does
not wrap under the first line (at least in the Hardware doctype). In
previous releases, you could use <line> with <chapter>, but in your running
footer you'd get extra spaces between the two words separated by <line>.

I realize that using <line> creates problems in the TOC. I hope you
can find a fix for these problems in the next release.

PS: No, I don't advocate long headers -- but they do occur, and I want some
control over them.
T.RTitleUserPersonal
Name
DateLines
523.1Have you tried <KEEP>?CRAYON::GENTParty gone out of bounds -- B52&#039;sThu Jun 18 1987 15:414
    If you only want to avoid bad hyphenation, won't <KEEP> be sufficient?
    
    --Andrew
    
523.2<KEEP> the responses comingPSYCHE::ILSLEYYoyodyne consultant....Fri Jun 19 1987 14:5011
--    If you only want to avoid bad hyphenation, won't <KEEP> be sufficient?
    
That's part of the answer, but I also want to correct bad line 
breaks. For example, I don't want to end the line of a title with 
"And," or with an article ("The," etc).

Can you use several <KEEP>s to define line breaks? For example

  <head1>(<keep>(the first line of text)<keep>(the second line of 
text))    

523.3Yes, but...CRAYON::GENTParty gone out of bounds -- B52&#039;sFri Jun 19 1987 15:2015
    Yes, I don't see why you couldn't do that.
    
    However, you must give TeX some leeway or else it will probably
    complain about lines to long or short. I suggest you use <KEEP>
    sparingly and for as short a text string as possible. For example,
    if you have something like "...How to Use the Foo Utility..."
    and do not want the line broken after "How", "to", or "the", you
    can use:
    
    	"...<KEEP>(How to Use) <KEEP>(the Foo) Utility..."

    Using <KEEP> for entire lines will quickly get you into trouble
    when you process the file for different output devices.
    
    --Andrew    
523.4Not quite there..PSYCHE::ILSLEYYoyodyne consultant....Fri Jun 19 1987 18:0717
 --  I suggest you use <KEEP>
    sparingly and for as short a text string as possible. For example,
    if you have something like "...How to Use the Foo Utility..."
    and do not want the line broken after "How", "to", or "the", you
    can use:
    
    	"...<KEEP>(How to Use) <KEEP>(the Foo) Utility..."


I tried using short text strings with <keep>, but all the strings ended up
on the first line, and I did get TeX errors for long lines. I didn't space
before the <keep> tag -- I'll try again.

You can also use <final_cleanup>(line_break) to break <chapter> and <head> 
titles. However, this method also breaks the titles in the TOC. If you use
<final_cleanup>(line_break) with <figure> captions, the first line is
right-justified  in text, but not in the TOC (at least in the Hardware doctype).
523.5<NOKEEP>(KEEP)BUNSUP::LITTLETodd Little NJCD SWS 323-4475Tue Jun 23 1987 16:447
    Are there hard and fast rules that can be applied here?  It seems
    that if this is the case, then possibly DOCUMENT should handle this
    just as TeX handles hyphenation.  The idea of having to load up
    your headers with <KEEP> seems pretty messy, and bound to cause
    another whole set of problems.
    
    -tl
523.6<KEEP> is no substitutePNEUMA::ILSLEYYoyodyne consultant....Wed Jun 24 1987 15:338
<KEEP> doesn't work as a replacement for <line> in headers. Document tends
to cram everything on the first line, causing TeX error messages. In other
words if the part of a <Keep> text string fits on the current line, Document
tries to cram the complete string on that line, not wrap the string to the
next line.

I'll probably use <final_cleanup>(line_break) in chapter and head tags, then
edit the contents .tex file.
523.7what doctype?CLOSET::ANKLAMWed Jun 24 1987 16:0613
    
    I would like to know what doctype you are using. Most headings are
    set using the control sequence \rrag which usually does a pretty
    good job of wrapping, both in the body of text and in the table
    of contents. Note that a big problem with using <keep> is that the
    attribute is passed to the table of contents (as would a <line>
    if we were to make that work) so you'd get breaks you wouldn't
    want in the table of contents.
    
    Maybe we can approach the problem on a doctype basis.
    
    patti
    
523.8Hardware doctypePNEUMA::ILSLEYYoyodyne consultant....Thu Jun 25 1987 15:084
I'm using the Hardware doctype. Do you mean most doctypes do a good job
of wrapping when you use <KEEP>? That would help. As for the TOC, I don't
mind cleaning up the .tex file.