cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Use XPATH string to get current page number and add blank page if it finishes in odd page

rrodrigues
4-Participant

Use XPATH string to get current page number and add blank page if it finishes in odd page

Dear community,

I'm a newbie in Arbortext Styler and Xpath.

What I want to do:

(1) after a tag, using the "Gentext" "Add after element Context" feature, test if it is an even page;

(2) if I get an even page, insert an ufe (user formatting element), with a blank page;

I was wondering if I can insert a XPathString in order to do this test.

Detailed instructions how to do that will be very welcome!

Thank you in advance,

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Rogerio--

This is not how blank pages are usually handled in Styler. This is usually done using Page Sets, and by specifying break settings for the elements that define your chunks, like chapters.

For example, if you want every <chapter> element in your document to start on an odd page (right-hand or "recto" page), with a blank page preceding it in the case where the previous chapter ends on an odd page, you would set it up something like this:

  1. In your Page Set, define page layouts for your right and left pages, and also for blank right and blank left pages (which might have different headers or footers, or might include "THIS PAGE INTENTIONALLY LEFT BLANK" or something similar).
  2. For the "chapter" element, in Styler select the "Breaks" tab, and set "Start new:" to "Odd page".

This will ensure that every chapter starts on an odd (right) page, and in cases where the previous chapter ends on an odd page, an even blank page will be inserted automatically.

--Clay

View solution in original post

3 REPLIES 3

Hi Rogerio--

This is not how blank pages are usually handled in Styler. This is usually done using Page Sets, and by specifying break settings for the elements that define your chunks, like chapters.

For example, if you want every <chapter> element in your document to start on an odd page (right-hand or "recto" page), with a blank page preceding it in the case where the previous chapter ends on an odd page, you would set it up something like this:

  1. In your Page Set, define page layouts for your right and left pages, and also for blank right and blank left pages (which might have different headers or footers, or might include "THIS PAGE INTENTIONALLY LEFT BLANK" or something similar).
  2. For the "chapter" element, in Styler select the "Breaks" tab, and set "Start new:" to "Odd page".

This will ensure that every chapter starts on an odd (right) page, and in cases where the previous chapter ends on an odd page, an even blank page will be inserted automatically.

--Clay

Thanks Clay, I promise I will try to implement that way. Right now I had another problem that I have just opened another thread.

 

https://community.ptc.com/t5/Windchill/Safe-reverting-to-a-previous-version/td-p/88076

 

Rogerio,

   Have you been able to implement Clay's suggestions?

If so, and they were successful, then could you mark his response as "Correct Answer"?

Doing so will help the community know that there is a solution, and help the community grow because they when and where solutions are given.

Thanks

Top Tags