Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] ClearPage that applyes also for spread masters #608

Open
Cicorione opened this issue Aug 21, 2024 · 1 comment
Open

[FEATURE REQUEST] ClearPage that applyes also for spread masters #608

Cicorione opened this issue Aug 21, 2024 · 1 comment

Comments

@Cicorione
Copy link

Cicorione commented Aug 21, 2024

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

@pgundlach
Copy link
Member

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants