This file is for scribling down rough notes about the requirements for text handling


background
---------
scribus inline graphics:
surrounding text can flow around....
 use the width, but not height. bounding box is used for flow for lines other than current


requirements:
------------
stream/story editor -> probably easily exportable to html

inserting inline graphics:
right click->insert reference->limbo n->obj1
right click->insert object->limbo n->obj1

menu:insert
  character
  text  ->textobj1, ...
  sample text
  object reference -> limbo1->obj1, ...
  object copy (dup an existing object

math mode, basically latex formatting:
-------------------------------------
$blah blah$ set as span
$$blah blah$$ set as div
superscript: 2^3
subscript:  a_3
latex, 4 modes: inline math, eqnarray (equation numbers auto inserted on right), displaymath, equation


inline objects:
------------
objects anchored in text stream, positions:
 stay in stream, use bbox as glyph box, define alignment, 
		v and h baseline (default baseline proportional to surrounding font)
 stay in stream, use bbox as conditional wrap area
 layout object somewhere in stream containing object (flowRegion), or a dynamically specified container (ie page or parent)
    footnotes
	images that float off to one side: v and h gravity
	  if positioning float causes text reflow to have the text anchor on next page, have offset
      flag for whether to keep the float on current page, or force to next page
 tex can automatically collect figures, and put them on a special page, auto numbering of figures


-----------------------------------------
Essential stream/text features
----------------------------
initial characters: initial quotes hang out, number of lines long, wrap to box or to glyph/area
	"1st" char, then some number of next chars.. apply to 1st pp of a section??
research: find compromise between tex, css, svg, scribus layout mechanisms
research: what really does latex, context, metapost, metafont add, what requirements to support
tab stops are arbitrary paths
streams lay out in sections/pages
streams composed of any level of parts/chapters/sections/subsections
toc
index
bibliography
  bib id (ie ch1, ch2, article 1, article 2, etc)
notes
  notes id-> figure list
		  -> table list
 		  -> foot notes
hyphenation, soft breaks, hyphens optionally hang past at eol
word spacing
leading, char spacing
glyph sizing
math mode -> lots of extra rules for formatting, access to lots of special symbols
character styles
paragraph styles
tagging, to signal urls, colors, special behavior or cataloging, dynamic content, etc
short words (Mr. Mrs. etc, that must bind to following word)
language switches:
  sometimes one sees things like
   <i18n>
    <en>thing</en>
	<es>cosa</es>
   </i18n>


drop caps
lists, bullet or numbered
Baseline grid across columns, anchor points across streams to line up translations
hanging punctuation
bibliography, toc, footnotes
section/subsection control
continued on page ?? <- auto update

character substitution, like for elipses, dashes, ff, other ligatures, etc

"Math equations support"
"Story Editor"                            
"Tabstops that lie on arbitrary paths, not just vertical and horizontal lines"
"Text on a line"                            
"Convert Text to editable path"                            
Tables that can optionally span multiple pages
"Automatic Hyphenation and justification"                            
"Insert sample gibberish text!! Yeah!"                            
"The power of <a href=\"http://www.tug.org\">TeX</a>"



text direction
--------------
Arabic can use Kashidas to justif text, not stretching whitespace. These are basically extra stretch marks
span direction versus larger flow direction across columns, for instance



line breaking:
------------
choose strategy:
  first fit: fast, considers only 1 line at a time
  surrounding fit: sort of fast, define how big a section of text to consider
  total fit: consider the entire stream when figuring breaks





Streams divided into chunks:
---------------------------
bgp chunk,  a squishybox
---------
width
glue width, only used if not eol
shrink
grow
penalty

pg chunk
--------
penalty
width (at eol only) , such as hanging punctuation
width (not at eol only) , such as spaces
shrink
grow
flag

tab chunk

font chunk
font with auto-hyphen chunk

linebreak chunk

region break chunk

section break chunk: depth of break, biggest is page break?? chapter break??

page break chunk

object chunk
floating object chunk


----- STYLE vvvv   ^^^^^ METRICS ----------

blocks of text and objects
each block can maybe be subdivided.
along each subdivision, there are special cases for hanging punctuation, and hyphens
each block points to a single style block.
each style block can point to many stream blocks
style blocks can be temporary, or stored somewhere in the stylemanager
links to biblio, footnotes, toc, index are instances of style blocks
each style block points to style info
all style blocks cascade based on what of style info each style block says to use
each stream block has extra potential metric info
each stream block has specific coordinates of layout info, which need to be regenerated on any text change
		--may not immediately update metrics, or use a faster line breaker until user says to 
		  do it all


breaks: line, section, chapter, page



---------------------------
Font styles
------------------------
----char styles:
underline
word underline
strikethrough
custom decoration
small caps
all caps
no caps
font size
outline (artificial stroking of contour)
bold   (artificial growing and filling of contour, or selection of bold font of same type)
italic (artificial shearing)
color, including alpha
bg color (highlighting)
drop shadow

----spacing styles:
char horizontal scaling
kerning before
kerning after
allowing hyphens
hyphen width,s,g, penalty
space w,s,g  (as percent of overriding font size)
inner word shrink, grow
before pp
after pp
inside pp
left margin 1st
left margin normal
right margin
tab lines
drop caps at front of pp: num lines to span, how to wrap, hang initial punc..
justification (0..100) left=0, right=100, center=50, full justify
text flow direction
