⍝ Wrap text paragraphs in note vector:                                          
                                                                                
    30 wrapnote notes.wrapnote                                                
note ← {new←⎕pw {old←⎕pw}} ##.wrapnote note     ⍝ Wrap text paras in note vect. 
                                                                                
Paragraphs  of  text  in notes                                                  
such  as these, may be wrapped                                                  
to  be more easily readable in                                                  
an edit window of a particular                                                  
size.  Such  wrapping might be                                                  
advantageous for example, on a                                                  
"phablet",  where edit windows                                                  
are much narrower.                                                              
                                                                                
"Flowing"  text paragraphs are                                                  
identified   as  having  lines                                                  
that   are   left   and  right                                                  
justified.   That   is,   they                                                  
extend from the _first_ to the                                                  
_last_  column,  possibly with                                                  
some   extra  padding  between                                                  
words.  The value of _last_ is                                                  
taken  to  be the width of the                                                  
first non-blank line following                                                  
the title sequence.                                                             
                                                                                
To  avoid mutilating pictures,                                                  
rows   containing  box-drawing                                                  
characters   are  exempt  from                                                  
wrapping:                                                                       
                                                                                
┌──────────────────────────────────────────────────────────────────────────────┐
│ This picture will not be wrapped, as each row contains at least one of the   │
│ special box-drawing characters. ┌────────────────────────────────────────────┘
└─────────────────────────────────┘                                             
                                                                                
Notice  in  the example below,                                                  
that   [wrapnote]   recombines                                                  
words split by hyphenation.                                                     
                                                                                
Example:                                                                        
                                                                                
      30 wrapnote notes.wrapnote                                                
note ← {new {old}} ##.wrapnote note     ⍝ Wrap text paragraphs in note vector.  
                                                                                
Paragraphs  of  text  in notes                                                  
such  as these, may be wrapped                                                  
to  be more easily readable in                                                  
an edit window of a particular                                                  
size.  Such  wrapping might be                                                  
advantageous for example, on a                                                  
"phablet",  where edit windows                                                  
are much narrower.                                                              
                                                                                
"Flowing"  text paragraphs are                                                  
identified   as  having  lines                                                  
that   are   left   and  right                                                  
justified.   That   is,   they                                                  
extend  from  the  _first_  to                                                  
the  _last_  column,  possibly                                                  
with    some   extra   padding                                                  
between  words.  The  value of                                                  
_last_  is  taken  to  be  the                                                  
width  of  the first non-blank                                                  
line   following   the   title                                                  
sequence.                                                                       
                                                                                
To  avoid mutilating pictures,                                                  
rows  containing   box-drawing                                                  
characters   are  exempt  from                                                  
wrapping:                                                                       
                                                                                
┌──────────────────────────────────────────────────────────────────────────────┐
│ This picture will not be wrapped, as each row contains at least one of the   │
│ special box-drawing characters. ┌────────────────────────────────────────────┘
└─────────────────────────────────┘                                             
                                                                                
Notice  in  the example below,                                                  
that   [wrapnote]   recombines                                                  
words split by hyphenation.                                                     
                                                                                
See also: Line_vectors justify wrap squeeze                                     
See also: vtrim refmt                                                           
                                                                                
Index:words|text|line vector|box-drawing characters                             

Back to: code

Back to: Workspaces