Expert Consulting for Arbortext's Epic Editor
All Caps Alphabet
Latin Alphabet
Printing Registration Mark

Style sets as comments.  The Suppress category changes how other categories in
the e-i-c and child e-i-c's behave. To make it immediately obvious an e-i-c is suppressed,
use a SUPPRESS style set/charsubset.

Text variable names as comments.  A title saved to recto.txt implies it will appear in
the header or footer on recto pages with different information appearing on verso pages.
If both pages are the same, save the title to
header.txt or footer.txt.

Start the e-i-c style panel from the document.
If you make formatting changes, but
don't see the change, start the e-i-c panel from the document to be sure you have the
right context.

Viewing table markup. If users are able to see table tags, code <row> and other
container elements with
textbrk startln=1 endln=1 for Edit window display.

Streamline attribute testing. There is no need to test for #ANY in conjunction with a
fillval. If the attribute is not set  in the document, a fillval in the FOSI will have no effect.

Facilitate ASCII searching. The unit of measurement defaults to points, which means
you can skip "pt." However, including  "pt" makes it easier to search the FOSI in an ASCII
Match individual words in an attribute

#ITEM# is used to match literal text coded in the FOSI with individual words in an attribute.
This is useful for elements such as <emphasis> that have an attribute in which users enter the
desired formatting. Tthis example shows the Edit window with a <highlight> element with a
attribute that specifies all supported types of formatting.

FOSI fragment

<e-i-c gi="highlight">
<charlist inherit="1"></charlist>
<specval attname="role" attloc="highlight"
<font inherit="1" weight="bold">
<specval attname="role" attloc="highlight"
<font inherit="1" posture="italic">
<specval attname="role" attloc="highlight"
<highlt inherit="1" scoring="1" scorespc="1">
<specval attname="role" attloc="highlight"
<highlt inherit="1" allcap="1">
Keeping track of delimiters

You can use line breaks in an ASCII editor to help keep track of gentable delimiters in a
savetext conrule or usetext source, as shown in the following code fragment:

<usetext source='
!<table><tgroup cols="1"><colspec colname="col1" colwidth="*/>
Footnote elements can output symbols instead of numbers or letters, using the following
FOSI code.

Note: the number of symbols coded must be sufficient for the maximum number of footnotes.
If the number of footnotes exceeds the number of symbols coded, the remaining footnotes
will have the same symbol.

<e-i-c gi="footnote-symbols.psu">
<charlist inherit="1"></charlist>
<specval attname="footnotect" attloc="#FOSI" attval="1">
<charsubset><savetext textid="footnotect.txt"
<specval attname="footnotect" attloc="#FOSI" attval="2">
<charsubset><savetext textid="footnotect.txt"
<specval attname="footnotect" attloc="#FOSI" attval="3">
<charsubset><savetext textid="footnotect.txt"
<specval attname="footnotect" attloc="#FOSI" attval="4">
<charsubset><savetext textid="footnotect.txt"
<specval attname="footnotect" attloc="#FOSI" attval="5">
<charsubset><savetext textid="footnotect.txt"
<specval attname="footnotect" attloc="#FOSI" attval="6">
<charsubset><savetext textid="footnotect.txt"
<specval attname="footnotect" attloc="#FOSI" attval="7">
<charsubset><savetext textid="footnotect.txt"
<e-i-c gi="footnote">
<charlist inherit="1">
<enumerat increm="1" enumid="footnotect">
<usetext source="<footnote-symbols.psu>,</footnote-symbols.psu>"
<usetext source="1pt,footnotect.txt" placemnt="before"></usetext>
<usetext source="footnotect.txt" placemnt="before">
Hanging quotes in a title

Hanging quotes in a title can be supported with FOSI and a three-line ACL function. First,
determine the amount of the negative indent. Format the document, click on the relevant
quote character in the Preview window, and type the letter
a to see the Character Attributes.
Use the Width value for the firstln characteristic in the indent category:

FOSI fragment

<e-i-c gi="title" context="chapter">
<charlist inherit="1">...</charlist>
<specval attname="hanging_quote" attloc="SYSTEM-FUNC" attval="1">
<indent inherit="1" leftind="0pt" firstln="*-7.1pt">

Similar coding is needed in the ei-cs for titles in other contexts.

The following function must be sourced when Arbortext Editor is started:

ACL function

function hanging_quote(window,oid)
if (s=="&ldquo;") {return 1};

NOTE:  Character Attributes in Preview shows the x,y position of the character. Compare the
x position of the first letters in each line of the title to verify they are all the same.
Expert FOSI Consulting for Arbortext
World expert on applied FOSI
Expert FOSI Consulting             941-312-7636         2015
Rotated text

You can use the following TeX pass-thru in a FOSI to rotate text for print/PDF:

<usetext source="%\hbox{\special{pub: rotate 45}%,66pt,

You can change:

  • the degree of rotation (45 in the example)
  • the size of the rotated text (66pt in the example)
  • the rotated text (YOUR TEXT HERE in the example).  

In addition to a hard-coded string, you can output a text variable:

<usetext source="%\hbox{\special{pub: rotate 39}%,pt,

You can code suppress sup="1" and output rotated #CONTENT -- even from a
table cell:

<usetext source="%\hbox{\special{pub: rotate 39}%,10pt,

The rotated text is displayed in Preview. In the Edit window, the text is displayed, but it
is not rotated.

In Epic 4 and above, you can code all table markup in a savetext conrule and usetext source
using the exclamation point (!) as the delimiter. Unlike authored tables, FOSI-generated tables
are always perfectly and consistently formatted. And they display in the Edit window.

Note: Tables take longer to process and format than flowing text. Also, vertical justification is
available in flowing text but not in tables.

Following is an example that outputs regular elements as a FOSI gentable. Note that the
DTD and DCF must support the CALS table model.

DTD Fragment

<!ELEMENT partlist (part)+ >
<!ELEMENT part (partno, partdesc, qty, unit-price) >
<!ELEMENT (partno | partdesc | qty | unit-price) (#PCDATA) >

XML Fragment

<title>Regular Elements Output as a Table</title>

FOSI Fragment

<e-i-c gi="partno">
<charlist inherit="1">
<suppress sup="1">
<savetext textid="partno.txt" conrule="#CONTENT">
<e-i-c gi="partdesc">
<charlist inherit="1">
<suppress sup="1">
<savetext textid="partdesc.txt" conrule="#CONTENT">
<e-i-c gi="qty">
<charlist inherit="1">
<suppress sup="1">
<savetext textid="qty.txt" conrule="#CONTENT">
<e-i-c gi="unit-price">
<charlist inherit="1">
<suppress sup="1">
<savetext textid="unit-price.txt" conrule="#CONTENT">
<e-i-c gi="part">
<charlist inherit="1" charsubsetref="Block">
<savetext textid="" placemnt="after" append="1"
conrule='!<row><entry colsep="0" align="left">!,partno.txt,!</entry>
<entry colsep="0" align="center">!,partdesc.txt,!</entry>
<entry colsep="0" align="right">!,qty.txt,!</entry>
<entry colsep="0" align="char" char="."
<e-i-c gi="partlist">
<charlist inherit="1" charsubsetref="Block">
<usetext source='!<table><title>Parts List</title>
<tgroup cols="4">
<colspec colname="col1" colwidth="1in"/>
<colspec colname="col2" colwidth="1in"/>
<colspec colname="col3" colwidth="1in"/>
<colspec colname="col4" colwidth="1in"/>
<entry colsep="0" align="center">
<?Pub _cellfont Weight="bold" Shading="green"?>Number</entry>
<entry colsep="0"align="center">
<?Pub _cellfont Weight="bold" Shading="green"?>Description</entry>
<entry colsep="0"align="center">
<?Pub _cellfont Weight="bold" Shading="green"?>Quantity</entry>
<entry colsep="0"align="center">
<?Pub _cellfont Weight="bold" Shading="green"?>Unit Price</entry>
!</tbody></tgroup></table>!' placemnt="after"></usetext>
<e-i-c gi="title" context="table">
<charlist inherit="1" charsubsetref="title SpaceBeforeLarge
SpaceAfterMedium AlignLeft">

You may find it helpful to create the table first in Arbortext Editor and then copy the markup
into the FOSI in an ASCII editor. This helps eliminate problems from typos in the syntax.

The exclamation point delimiter used to generate table markup can also be used to
generate structured HTML markup for block elements. The result is written to an external
ASCII file with
usetext  userule="1". The HTML is quickly generated when the
document is formatted. An XSLT post process is then used to transform inline elements
to the desired HTML inline elements. This approach enables custom HTML and
print/PDF to be output from the same FOSI.

Like any FOSI-generated external ASCII file, the HTML file is named for the element or
pseudo-element with the
usetext  userule="1". The default .exp file name extension
can be set to .htm or .html using the APTEXPORTEXT environment variable.