uberED format specification   

© RedTitan Technology 2018
 
uberED II version 5.1 August 2018 
 
uberED supports a strictly defined subset of HTML5, CSS3 and SVG. This format is supported by all browsers, EscapeE and the uberED editor itself. 
 
GENERAL LAYOUT - HTML
 
The DOCTYPE and the following comment line are used as flags to indicate uberED format HTML 
 
<!DOCTYPE html>
<!-- RedTitan Technology HTML5/CSS3 uberED --> 

  
The TITLE element and the META statements must be present in the body of the HEAD element  

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta charset="utf-8" http-equiv="X-UA-Compatible" content="IE=edge" /> 
  

 

Although HTML has a weak concept of a "page", uberED imposes a notional page layout so that a WYSIWG impression can be given in the browser, RedTitan EscapeE or ADOBE PDF of a paginated document. The BODY element is an array of DIV elements of attribute CLASS "PAGE" - one for each "page" of the document.
(see below)

 
static CSS (see below)
</style> 
</head> 
<body>
document pages content (see below)
</body> 
</html
<!DOCTYPE html>
<!-- RedTitan Technology HTML5/CSS3 uberED -->
<html>
<head>
<title>
uberEd format general layout
</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta charset="utf-8" http-equiv="X-UA-Compatible" content="IE=edge" />
<style>
CSS3 standard style definitions.
The CSS in the HEAD section is largely static. The "box-sizing" model is specified so that the padding and the entire border width are within the specified width of the container. Other CSS selectors are used to give a paged appearance in a browser .

 The width and height in the .PAGE selector defines the notional page size and is parsed by uberED and EscapeE. They must be present.   
 
 

Typically an uberED document author should only change the .PAGE selector page dimensions
Arrow from 600 166 to 170 446; width:10.000px;
<style>
@page :first {margin-top: -2px; }
@media print
{
.PAGE {
page-break-after:always;
}
}
@media screen
{
.PAGE {
border: 1px solid silver;
margin: 14px;
box-shadow: 10px 10px 5px #888888;
line-height: 1.0;
}
}
line,path
{stroke-linecap:round}
@media screen,print
{
.PAGE {
width:11.690in;
height:8.267in;
position:relative;
top: 0.10in;
left: 0.0in;
}
}
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
hr {width: 100%; height:2px; margin:0 auto; border:0 none; background-color:black;}
</style>
 Page Element 

 Page Element

 Page Element

 Page Element

 Page Element
Position Element

Position Element

Position Element

Position Element

Position Element
Image 
Element
Position 
Element 
(SVG alternate)
Note 
 
(1)SVG (Scaleable Vector Graphic) Position Elements are static and located at the parent page origin. The children of svg elements are g or text (caption) elements.

 
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"height="8.267in" width="11.690in"style="position:absolute; top: 0; left: 0;">  
 
(2) Image Element may only be the single child of a class "COLUMN" position element and the image width (scaling) is derived solely from the parent width. 
 
<img src="arrow.bmp" style="width:100%;height:auto;" id="PAGE1IMAGE1" class="IMAGE" alt="arrow.bmp"/> 
 
(3) In general, a white fill is treated as the transparent colour. If you wish the background to be obscured use a suitable replacement (e.g. Cream)

 
HTML DOCUMENT
<div class="PAGE"..
<div class="COLUMN".. 
<img class="IMAGE"..
SVG LINE STYLE
SVG LINE STYLE
 SVG LINE STYLE

<body..
Paragraph Element

Paragraph Element

Paragraph Element
<div class="PARAGRAPH"..
<svg..
Font selector

Font selector
Font selector
<span class="TEXT"..
Document Text
Document Text
Document Text
Document Text
<hr.. 
or  
<br/> 
or  
& entity ;  
or  
<a..  
or
utf8 encoded text...
COMPOSED TEXT
<g..
IMAGES
uberEd - Document pages content model
SVG Text Caption

SVG Text Caption
<text..
SCALEABLE 
VECTOR 
GRAPHICS
SVG Object

SVG Object

SVG Object
<rect 
or 
<line 
or 
<circle 
or 
<path 
<div  
   class="PAGE"  
 
| id=" alphanumeric "  
 
| style="background-image: url( imageuri );" 
 
| data-background-source=" filepath "; 
 
| data-background-page=" number
>
Page Element
Items marke with a sideline "|" are optionall 
 
Each page in the document is introduced by the page element class PAGE div. It is a child of the html body element. 
 
The optional STYLE backgound-image selector may refer to an image that is to be displayed as a background on the page. 
 
If the optional meta attributes data-background-source and data-backgound-page specifies a PDF document EscapeE engages special processing to preserve original content when exporting the file to a new PDF
 
e.g. 
 
<div class="page">   
 
e.g. 
 
<div class="PAGE"  
id="PAGE1"  
style="background-image: url('');" 
data-background-source="C:\Users\Pete\FS\FRANCIS_SANCFORD.PDF" 
 data-background-page="2" 
>
Position Element
<div 
   style="position:absolute; 
 
| Background-color: colour
 
| border-top: dimension linestylecolour
 
| border-right: dimension linestylecolour
 
| border-bottom: dimension linestyle colour
 
| border-left: dimension colour
 
|  padding: dimension dimension dimension dimension
  width:
dimension
  top:
dimension ;  
  left:
dimension ;" 
  class="COLUMN" 
 
| id=" alphanumeric
>
The class COLUMN div element gives position information relative to the page origin of a container of defined width. Background colour, borders and padding may be optionally specified. The style designators conform to CSS3 syntax. 
 
dimension = number unittype  

unittype
= px | cm | in 
 
linestyle = solid | dashed | dotted 
 
e.g. 
 
<div style="Background-color: #0000A0;border-top:3.000px solid green;border-right:3.000px solid green;border-bottom:3.000px solid yellow;border-left:3.000px solid green;padding: 0.000in 0.000in 0.100in 0.000in;width: 8.000in; position:absolute; top: 2.06in; left: 2.96in;" class="COLUMN" id="PAGE1COLUMN1"> 
 
<div style="width: 8.000in; position:absolute; top: 4.01in; left: 2.56in;" class="COLUMN" id="PAGE1COLUMN2"> 
 
<div style="border:1.000px solid black;width: 8.000in; position:absolute; top: 4cm; left: 3cm;" class="COLUMN" id="PAGE1COLUMN12">
Paragraph Element
<div 
  style="line-height:8px; 
  text-align:
justifification ;"  
  class="PARAGRAPH" 
 
| id=" alphanumeric
>
The class PARAGRAPH div element gives the text alignment treatment for enclosed text. This element is the child of a class COLUMN element. 
 
justification = left | right | center | justify
 
Font selector
<span  
  style=" 
  font:
fontstyle fontweight fontsize 'facename'
  color:
color
 
| text-decoration:underline;"  
  class="TEXT"  
 
| id="alphanumeric" 
>
The class TEXT span element engages a specified font for the enclosed literal text. This element is a child of the PARAGRAPH element.
 
fontstyle = normal | italic 
 
fontweight = normal | bold 
 
e.g 
 
<span style="font: normal normal 8pt 'Arial';color:black;" class="TEXT" id="TEXT2">
Document Text
utf8 encoded literal text
In addition to plain text, the format also supports the horizontal rule element 
 
e.g. 
 
<hr style="height: 24px; background-color:olive"/> 
 
<hr/> 
 
An empty break element "<br/>" is used to specify a hard break. Multiple spaces or line ends are otherwise treated as a single space. If you wish additional spacing to be preserved used the NON BREAKING SPACE &nbsp; entity.
 
An anchor element may be used to introduce a hyperlink. 
 
e.g. 
 
<span style="font: normal normal 12pt 'Arial';color:black;" class="TEXT" id="TEXT1">The <a href="http://www.redtitan.com" >RedTitan</a> website</span> 
 

Data-* attributes added to anchor elements may be used for private data. (e.g. mail merge markup)
Notes: The text appearance and properties are defined by the immediate parent elements style attributes. It is not assumed that style selectors will "cascade". This simplifies source level editing. 
 
Literal text must be "escaped" to exclude characters that are reserved by xml using pre-defined entities &amp; for "&" and &lt; for "<" 
 
Character entity numbers are imported 
 
e.g. 
 
&#8364; == €
Image Element
<img  
  src="
urilocation "  
  style="width:100%;height:auto;"  
 
| id=" alphanumeric "  
  class="IMAGE"  
  alt="
alternatetext
/>
 The img element is the single child of class COLUMN div position element. The COLUMN width defines the rendered width of the image. 
 
The uri location may be relative to the source of the document as an HTTP url, FILE or intrinsic resource
 
e.g. file
 
<img src="file:///C:/Users/John/merchant/cart.png" style="width:100%;height:auto;" id="PAGE1IMAGE1" class="IMAGE" alt="cart.png"/>   
 
e.g. intrinsic
 
<div style=" position:absolute; top: 2.87in; left: 4.41in; width: 0.500in;" class="COLUMN" id="PAGE1COLUMN4"> 

<img src="data:image/png;base64, 
iVBORw0KGgoAAAANSUhEUgAAADAAAAAgCAYAAABU1PscAAAACXBIWXMAAA6cAAAOnAEHlFPdAAAE
Z0lEQVRYw82YTWhcVRTHf+e9SWZMTFvapo21sdUIuiu6UFurG2sWQVsQjeAH0oVVqRZJC7pxKbgQ
VCo2tKFqoIgFwU0XUhBRlKKgVoUqjVTbUqnfoUnrfLz7d+F54XXMJJlJJsnZvHe/z/+ec//n3GuS
mKkMDQ1hZsxGJBFFEe3t7ZgZ1eub2RJgC9ADtACjwJH+/v6fJpsvxwKJpFqbsQ94wJVPpR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8zsYzPbNx8AdkmK
gD6v/t0vKC3TjO0ArvRb1xhwP3CdNx8BtjXy6tdIMndKUlbZNuDdOI5HJnsqrJFTmaTtmaqNTrXn
5yMStwB3VQHoDSGMpJQ63VNKCOEmT0NS6TSzrqYD8N0tAwPuNgBfAIckUS6XaW1tral8CIFKpYKZ
fQm8DTzmzQclHW96LpSR1yXlgC6/SY3OxH2q6HZA0mkH90rDD2SNhO/FJP8CeOIUUG3N61sAAAAA
SUVORK5CYII=
" style="width:100%;height:auto;" id="PAGE6IMAGE1" class="IMAGE" alt="cart.png"/> 
 
</div>
cart.png
Position 
Element 
(SVG alternate )
<svg  
  xmlns="http://www.w3.org/2000/svg"  
  version="1.1"  
  height="
dimension "  
  width="
dimension "  
  style="position:absolute; top: 0; left: 0;" 

 
 
<text  
  x="
dimension "  
  y="
dimension
  transform="rotate(
degrees , xposdots , yposdots )"  
  style=" 
    fill:
fillcolor
    stroke:
strokecolor
    font:
fontspec
    text-anchor:
anchorposition
  "  
>
The SVG element is a child of a PAGE div element. It introduces the drawing canvas for Scaleable Vector Graphic and is at a fixed position top and left relative to the page. The width and height should be defined the same as the page size. 
 
e.g. for A4 Landscape  
 
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="8.267in" width="11.690in" style="position:absolute; top: 0; left: 0;">

 
SVG GRAPHICS
SVG Text Caption
Text captions
The text element is a child of an SVG element. It is used to add rotated captions or text labels at a defined point. XPOS and YPOS must be expressed in units of dots (96 per inch is the SVG standard). X and Y dimension and XPOS and YPOS dimension must correspond. (Offset rotation origin points are not supported). 
 
anchorposition = start | middle | end 
 
e.g. 
 
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="8.267in" width="11.690in" style="position:absolute; top: 0; left: 0;">
<text x="0.38in" y="3.53in" transform="rotate(-45,36,338)" style="fill:black;stroke:none;font:12pt 'Arial';text-anchor:start;" >
Text captions
</text>
</svg>
SVG Line Style
<g  
  style=" 
   stroke:
color ;  
   stroke-width:
dimension
|   stroke-dasharray: dotdash
  " 
>
The G element is a child of an SVG element. It is used to set the line style of enclosed RECT LINE CIRCLE or PATH elements. The optional STROKE-DASHARRAY style selector is used to emulate CSS3 dotted and dashed styles.
 
dotdash = 2,0,2 | 2,8
 
e.g. 
 
<g style="stroke:black; stroke-width:2.000px;">
SVG Object
<rect...
<rect  
  x="
dots "  
  y="
dots "  
  width="
dots "  
  height="
dots "  
  rx="
dimension "  
fill=" fillcolorselection
/>
The RECT element is a child of a G element. It is used to construct rectangle with radiused corners specified by the RX attribute.  
 
fillcolorselection = # hexliteral | RGB( n , n , n ) | colorname | none 
 
If the FILL attribute is omitted a BLACK fill is assumed
  
e.g. 
 
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="8.267in" width="11.690in" style="position:absolute; top: 0; left: 0;">
<g style="stroke:red; stroke-width:6.000px;">
<rect x="189" y="246" width="281" height="98" rx="0.300in" fill="#919100"/>
</g>
</svg>
SVG Object
<circle..
<circle  
  cx="
dimension "  
  cy="
dimension "  
|  fill=" fillcolorselection "  
  r="
dimension
/>
The CIRCLE element is a child of a G element. It is used to construct a circle of a defined radius. (see SVG Object RECT for FILL attributes) 
 
e.g. 
 
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="8.267in" width="11.690in" style="position:absolute; top: 0; left: 0;">
<g style="stroke:red; stroke-width:4.000px;">
<circle cx="3.03in" cy="6.98in" fill="#919100" r="0.500cm"/>
</g>
</svg>
SVG Object
<line..
<line  
  x1="
dimension "  
  y1="
dimension "  
  x2="
dimension "  
  y2="
dimension
/>
The LINE element is a child of a G element. It is used to construct a line. 
 
e.g. 
 
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="8.267in" width="11.690in" style="position:absolute; top: 0; left: 0;">
<g style="stroke:blue; stroke-width:4.000px;stroke-dasharray:2,8;">
<line x1="5.83in" y1="0.59in" x2="4.60in" y2="1.07in"/>
</g>
</svg>
SVG Object
<path..
<path  
  fill="
fillcolor "  
  d="M
dots , dots  
  C
dots , dots  
  
dots , dots  
  
dots , dots..... "  
/> 
 
 
<path  
  fill="
fillcolor "  
  d="M
dots , dots  
  L
dots , dots  
  
dots , dots  
  
dots , dots.... "  
/>
The PATH element is a child of a G element. It is used to construct a curved or a polyline graphic. 
 
A BEZIER CURVE segment consists of a start point , two control points, and an end point. The end point may form the start point of a further segment so the curve may be extended by repeatedly adding three additional coordinates to the list (The M and C directives are not repeated). 
 
e.g.  
 
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="8.267in" width="11.690in" style="position:absolute; top: 0; left: 0;">
<g style="stroke:red; stroke-width:4.000px;">
<path fill="yellow" d="M128,395 C65,425 202,485 102,393 " />
</g>
</svg>  
 
Replacing the C (curve) directive with an L (line) directive may be used contstruct a shape with straight lines. 
 
e.g. 

 <path fill="none" d="M108,710 L170,690 172,643 129,634 132,597 87,586 63,647 108,710 " />
Program support 
 
The uberED HTML subset is a regular tree structure as shown on page 3 it is intended to be parsed as simple XML. uberED.exe is a simple WYSIWYG editor that will also interact with external tools like U TREE.EXE or the text editor assigned to open .TXT files (normally NOTEPAD). uberED will detect changes to a source document and refresh the WYSIWYG view. 
 
uberED HTML subset is encoding in UTF8.
AUTOCLICK.EXE provides a way to add characters from the higher UNICODE planes.
 
It is assumed files with the extension .HTML will normally be opened by an appropriate browser. EscapeE will open a uberED HTML subset source document provided the extension
RTHTMLIN.DLL is installed. An advanced extension called RS3.EXE may be deployed to engage LUA script support.