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

Headers and Footers #27

Open
bennyboer opened this issue May 24, 2023 · 0 comments
Open

Headers and Footers #27

bennyboer opened this issue May 24, 2023 · 0 comments

Comments

@bennyboer
Copy link
Owner

Headers and footers should be separate "Template" files. Templates are *.lsc files that can be applied multiple times.

For example a file for a footer with the current date at the left, the current page in the middle and the authors name at the end.

<table>
  <table-row>
    <table-cell><var name="CURRENT_DATE"/></table-cell>
    <table-cell><var name="CURRENT_PAGE"/></table-cell>
    <table-cell><var name="AUTHOR_NAME"/></table-cell>
  </table-row>
</table>

The headers and footers are configured within the stylesheet. The following example applies the above footer template to each second page:

page:number(1..*, skip=1) {
  footer: "templates/footer.lsc";
}

Technical information

Headers and footers are always laid out first when creating a new page. This is needed as the size of the header and footer may vary for each page. Only after headers and footers are properly typeset can the page layout proceed as usual.

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

1 participant