[FEATURE REQUEST] ClearPage that applyes also for spread masters
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
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)
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...
Thank you Patrick, I need to look into this, but it is a great feature nonetheless. Did you already update the documentation?
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.