I am delighted to see how well XeLaTeX can handle Tibetan script and want to use it for the typesetting engine for my software.
The first thing I want to do is to create a simple documentclass, with the certain rules I shall describe below. I have included a picture with colour coded rectangles to show what I need to do.
First of all I need each page of the document properly aligned so that for an A4/legal sized paper page, the text boxes are printed on the exact place on both sides of the paper. The back side of the paper needs to be flipped upside down, since traditional Tibetan manuscripts are turned on the horizontal axis, whereas Western books are turned on the vertical axis. For A4/legal size paper, there should be a single Tibetan page centered on each side of the paper, but an A3 sized paper should have two Tibetan pages on each side of the paper sheet in order to not waste paper.
the pages must be in landscape orientation.
Each Tibetan page should have three text boxes as one can see on the image: The box to the far left (yellow and purple) is rotated 90 degree clockwise, but the one to the far right (orange) is rotated 90 degrees counter clockwise.
The text box marked with purple is the title of the manuscript and should be printed on every even numbered page.
The text box marked with red, shows some characters that can be represented with Unicode and should be printed on every odd numbered page as well as on title pages. It should be followed by a long blank space, marked by the blue rectangle.
Each stanza is normally marked with vertical lines. These lines have spaces in between them (green rectangle), but these spaces can vary in length depending on certain circumstances. Looking at the light blue rectangles on both the top page and the bottom page, the top one is a bit shorter due to the line breaking. This word consists of two columns, while the word marked by the bottom light blue rectangle only has one column, hence allowing a full length space between the vertical bars separating the stanzas.
I mainly need your help to learn how to create the framed text boxes that have a fixed position on the printed page, with the text box on the backside of the paper sheet being printed upside down. However, any other tips with regards to what I'm trying to accomplish is greatly appreciated.