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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Page Set Edit

cleccese
10-Marble

Page Set Edit

I created a page set in Styler and then added source edits. I originally set "First Page Header" to None, but now I want to change that to "Same". Is there a quicker way to change that other than recreating the page set from scratch? (And if so, what if I wanted to make the same change for the footer?)


I assume I need a different page set per section if the headers or footers are going to be different?

5 REPLIES 5

Hi Caroline,
In reverse order, yes, you will need a page set per section if the headers
/ footers are going to be different. Note that "different" does not include
changing the title to match the new title of the section ... different
would imply that instead of the title of the section, you'd want to replace
it (in the header and/or footer) with the first and last occurrence of an
h1 title as in a dictionary.

It's hard to answer your first question without knowing how much change you
have made in source edits and how much effort it was to create the page set
before you began making source edits. Further, I haven't personally done
source edits on page sets. Plenty on elements, though. Also, you don't say
what version of Styler you're working with ... conceivably that would make
a difference.

Going forward, create as much of your page set as you can within the Styler
interface and before starting on the source edits, make a copy the page
set. If you ever have to "start over" again at the source edit stage, you
can simply make a copy of the copy and dive in. Also, you might consider
digging into any file backups of your stylesheet. Maybe you can grab a copy
of the page set from one of those.


On Thu, Dec 1, 2011 at 9:20 AM, Caroline Leccese <caroline@thecodesource.net<br/>> wrote:

> I created a page set in Styler and then added source edits. I originally
> set "First Page Header" to None, but now I want to change that to "Same".
> Is there a quicker way to change that other than recreating the page set
> from scratch? (And if so, what if I wanted to make the same change for the
> footer?)
>
> I assume I need a different page set per section if the headers or
> footers are going to be different?
>
bibach
1-Visitor
(To:cleccese)

To put what Paul said another way, whether you need another page set
for a different section depends on how the pages are "different". If
you can give us some more detail, we can make a more specific
suggestion.

As for changing the first-page header and footer to "same" in your
source-edited page set, the FOSI code generated by Styler for the page
set would have two <rectopg> elements. The first one would be for the
first page in the sequence, when it is recto (right-hand or odd), the
second would be for the rest of the recto pages. Styler only
generates the first one if you specify something that needs to be
different about the first page. To my knowledge, at least in older
versions of Styler and the most common types of layout even in newer
versions, this only happens when you opt to have different headers or
footers. So, the likely fix to your source-edits is to just remove
the first <rectopg>.

That shot-in-the-dark having been fired, I'll suggest a method for a
more careful approach. Duplicate your page set, then delete the
source edits from the new copy. Make a copy of this new copy and do
your changes (setting first page header to "same", etc.). Export the
FOSI (File->Export->FOSI) and compare the FOSI code generated for the
two copies, ideally with a text editor or other tool that can do an
automated comparison and show you the results. The difference between
the two is the set of changes you'd need to make to your source-edited
page set. Hopefully, this would be just removing the first <rectopg>,
but this method should help highlight any quirks that might arise.

Hope this helps...

-Brandon 🙂


Thanks, Brandon, that's exactly what I was looking for.


I'm using Styler 5.3 and the source edits were only variables in the headers which I formatted for font-weight and alignment. Not that big of a deal. I didn't think I could use a text variable in the Styler headers.

bibach
1-Visitor
(To:cleccese)

Particularly in pre-5.4 Styler, where the level of source-edit
granularity is not as good, source edits are a necessary evil, by
which I mean that they are an evil which should be used only when
absolutely necessary.  If you can describe what you need to do that
drove you to use a source edit, perhaps we can suggest an alternative.

Otherwise, consider putting a UFE into your header and applying the
source edit to that, or even to a property set that gets applied to
the appropriate element.  This will localize the source edit to the
smallest possible piece of code.  It's worth the extra layer or two to
avoid disabling part of the Styler UI that is responsible for several
hundred lines of FOSI code, just to add or change a handful of lines.

-Brandon 🙂


On Thu, Dec 1, 2011 at 1:20 PM, Caroline Leccese
<caroline@thecodesource.net> wrote:
> Thanks, Brandon, that's exactly what I was looking for.
>
> I'm using Styler 5.3 and the source edits were only variables in the headers
> which I formatted for font-weight and alignment. Not that big of a deal. I
> didn't think I could use a text variable in the Styler headers.
>
> ----------

The text variables in the header are holding the content of a couple of elements, one of which could be hardcoded anyway. I tried using the Styler Interface for that but my headers came up blank. I couldn't get the XPATH to work either, trying both of the suggestions I received in an earlier thread (the wpno element)


I am using two text variables in one of the footers: one is holding the figure count, and the other is holding the sheet number for multi-sheet foldouts. I am using the XPATH that you gave me for my figure counts in the document itself. So my foldout and title elements have a few source edits also. I think the only time I use a source edit is to add or reset a variable, or when I need to make a title inline.

Announcements

Top Tags