Skip to main content
1-Visitor
February 28, 2018
Solved

Odd-Even page in FOSI

  • February 28, 2018
  • 2 replies
  • 3033 views

I want to set the titles for a paragraph quad right on even pages and quad right on odd pages. How do I determine odd/even pages in a FOSI, I am not good at ACL? Thanks

Best answer by SuzanneNapoleon

Here is an example of the FOSI coding. Also see Figure 106 in my book.

 

Note that the id and quadding attributes or pseudo-attributes do not have to be on the title element, they could be on the parent element (XXX in the example below). In that case, be sure to specify the attloc and xrefidtag characteristics on the savetext category.

 

In the title e-i-c:

 

<att>
<fillval attname="id" attloc="XXX" fillcat="savetext" fillchar="conrule">
<charsubset>
<savetext textid="title-id.txt" xrefidtag="XXX">
<savetext textid="quadding.app" conrule="section-id.txt,\ \,folioct.txt[BO],\&#RE;\" append="1">
</charsubset>
</att>

 

On the top tag in the document, code the usetext that writes the external ASCII file:

 

<usetext source="quadding.app" placemnt="after" userule="1"></usetext>

 

In this example, the ASCII file is called quadding.exp and looks like this:

a1 1
a2 1
a3 2
a4 2
a5 3
a6 3

 

The next step is to run the ACL to find each id, determine if the page is right (odd) or left (even), and fill the quadding attribute or pseudo-attribute accordingly. Then the ACL should format the document again.

 

Note that the title e-i-c also needs the following attribute tests:

 

<att>
<specval attname="quadding" attval="left">
<charsubset>
<quadding inherit="1" quad="left" lastquad="lleft">

</charsubset>
</att>

<att>
<specval attname="quadding" attval="right">
<charsubset>
<quadding inherit="1" quad="right" lastquad="lright">

</charsubset>
</att>

 

Good luck!

Suzanne

2 replies

12-Amethyst
March 2, 2018

I did some testing with strings and pseudo-elements, but I could not get consistent and correct output.

I think the way to do this is:

1. Add an id attribute or pseudo-attribute to the title element.
2. In the title e-i-c, code a usetext userule=1 that writes the id and the page number to an external ASCII file.
3. The title element also needs an attribute or pseudo-attribute for the desired quadding.
4. Use ACL to read the ASCII file and go through the document and find each title id to set the quadding attribute or pseudo-attribute on the title element to left or right.  [I defer to the ACL experts to describe the necessary ACL.]
5. The title e-i-c needs a specval that tests the quadding attribute or pseudo-attribute and specifies the appropriate quadding.
6. Format the document again.

Good luck!
Suzanne Napoleon

SuzanneNapoleon@FOSIexpert.com
"WYSIWYG is last-century technology!"

12-Amethyst
March 3, 2018

Here is an example of the FOSI coding. Also see Figure 106 in my book.

 

Note that the id and quadding attributes or pseudo-attributes do not have to be on the title element, they could be on the parent element (XXX in the example below). In that case, be sure to specify the attloc and xrefidtag characteristics on the savetext category.

 

In the title e-i-c:

 

<att>
<fillval attname="id" attloc="XXX" fillcat="savetext" fillchar="conrule">
<charsubset>
<savetext textid="title-id.txt" xrefidtag="XXX">
<savetext textid="quadding.app" conrule="section-id.txt,\ \,folioct.txt[BO],\&#RE;\" append="1">
</charsubset>
</att>

 

On the top tag in the document, code the usetext that writes the external ASCII file:

 

<usetext source="quadding.app" placemnt="after" userule="1"></usetext>

 

In this example, the ASCII file is called quadding.exp and looks like this:

a1 1
a2 1
a3 2
a4 2
a5 3
a6 3

 

The next step is to run the ACL to find each id, determine if the page is right (odd) or left (even), and fill the quadding attribute or pseudo-attribute accordingly. Then the ACL should format the document again.

 

Note that the title e-i-c also needs the following attribute tests:

 

<att>
<specval attname="quadding" attval="left">
<charsubset>
<quadding inherit="1" quad="left" lastquad="lleft">

</charsubset>
</att>

<att>
<specval attname="quadding" attval="right">
<charsubset>
<quadding inherit="1" quad="right" lastquad="lright">

</charsubset>
</att>

 

Good luck!

Suzanne

12-Amethyst
March 4, 2018

Whoops! I skipped a step. The ASCII file is named quadding.exp only if you code a usetext on the top tag that calls a pseudo-element: 

 

<usetext source="<quadding>,</quadding>" placemnt="after"></usetext>

 

The usetext with userule=1 is coded in the pseudo-element:

 

<e-i-c gi="quadding">
<charlist inherit="1">
<usetext source="quadding.app" userule="1"></usetext>
</charlist>
</e-i-c>

 

Otherwise, the .exp file is named for the top tag.