Re: [users] Reverse Page Styles when second page is triggered?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Charles Marcus wrote:
On 12/7/2009, Charles Marcus (CMarcus@xxxxxxxxxxxxxxxxx) wrote:
COND_STYLE1
{
If document1 has more than one page, use style1, else

  If document has more than 2 pages, use style2, else

    use style3
}

That should be:

COND_STYLE1
{
If document1 has more than one page, use style2, else

  If document has more than 2 pages, use style3, else

    use style4
use style1
}

No, sorry. I'm assuming there's an implied exit from COND_STYLE1 with each "use" (or style1 would always be used) -- but even so, this will have the following result:

   * For a one-page document, use style4.
   * For a two-page document, use style2..
   * For a three or more page document, use style2.

I think what you're after is to use style1 for a one-page document, style2 for a two-page document, and probably style3 for a three-page and style4 for more than three pages -- right? Perhaps you're sure the documents will never be more than four pages, and that each of your "stylen" definitions is actually a set of page styles, with each specifying the name of the next page style in its own set. Let's call the possible page styles Page1, Page2, Page3, and FinalPage. A one-page document should use FinalPage, a two-page document would start with Page1, which flows to FinalPage. A three-page document would start with Page1, which flows to Page2, which flows to FinalPage. A four-page document would start with Page1, which flows to Page2, which flows to Page3, which flows to FinalPage. More than four pages would use FinalPage for the fourth page, but I'm not sure what would happen then. All but FinalPage have the simpler footer and probably no other differentiation. So assuming that case is not possible, your conditional statements could be expressed like this:

COND_STYLE1
{
If document1 has more than 3 pages, use style4, else

 If document has more than 2 pages, use style3, else

   If document has more than 1 page, use style2, else use style1
}

All this is a very cumbersome mechanism; I showed one that needs one condition (is this the last page?) and two page styles (I used Default and Final Page) that accomplishes the same thing and can handle any number of pages. That one seems as if it might have a reason to exist, but I see no particular reason for anything that introduces these new mechanisms (naming page style sets, either using no page styles at all until the final document length is known or overriding whatever was used, and providing the conditional logic structure with its implied exit).

If I'm misunderstanding what you're after, please explain further.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxx

_______________________________________________
gnome-list mailing list
gnome-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gnome-list

[Index of Archives]     [Fedora Desktop]     [Trinity Users]     [KDE]     [Gimp]     [Yosemite News]

  Powered by Linux