publisher icon indicating copy to clipboard operation
publisher copied to clipboard

[FEATURE REQUEST] ClearPage that applyes also for spread masters

Open Cicorione opened this issue 1 year ago • 1 comments

Hi @pgundlach

I've noticed this situation that is a little bit counter-intuitive if you come from a DTP software like InDesign.

I have my default odd & even master which apply fine to the layout until I need to introduce a new master and it doesn't work nicely anymore because, for what I understood, you can only assign one master at the time, e.g.:

<ClearPage pagetype="Special" />

Once, you showed that I can use switch cases in the master pages to apply a different layout based on odd or even pages, which is fine but has a noticeable limit: you can't put <Margin> into a case; therefore you can use that master only if your layout has same margins for both odd & even.

Now I am wondering if you can consider to add to <ClearPage> the ability to read two parameters for pagetype instead of just one, so when it has two parameters it assumes that are for left & right pages:

<ClearPage pagetype="left,right" />.

Does my request make sense?

Best regards, Cicorione

Cicorione avatar Aug 21 '24 13:08 Cicorione

Interesting, that makes sense. I will think about that after my vacation.

Meanwhile, you can simulate a similar setup by setting a variable and make the master page dependant on it:

<Pagetype test="$pagetype = 'mypage' and sd:even(sd:current-page())">
    ...
</Pagetype>

<Pagetype test="$pagetype = 'mypage' and sd:odd(sd:current-page())">
    ...
</Pagetype>

and

<SetVariable variable="pagetype" select="'mypage'" />

(untested)

pgundlach avatar Aug 21 '24 15:08 pgundlach

The margin in the Pagetype now has inner and outer settings, this should handle most of the cases. Also it is currently possible add an XPath expression (if even page then a else b).

I close this feature request. If you think that this is not good, please re-open it...

pgundlach avatar Feb 02 '25 15:02 pgundlach

Thank you Patrick, I need to look into this, but it is a great feature nonetheless. Did you already update the documentation?

Cicorione avatar Feb 07 '25 15:02 Cicorione

The documentation is updated in the regard that the Margin command has the inner/outer margin mentioned. But not in any other sense. I will do that.

pgundlach avatar Feb 07 '25 16:02 pgundlach