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] Creator: Set chapter title into header #384

Open
gunnsth opened this issue Jun 30, 2020 · 0 comments
Open

[FEATURE] Creator: Set chapter title into header #384

gunnsth opened this issue Jun 30, 2020 · 0 comments
Labels
creator enhancement New feature or request

Comments

@gunnsth
Copy link
Contributor

gunnsth commented Jun 30, 2020

Is your feature request related to a problem? Please describe.
I would like to put information about the current chapter such as chapter number and chapter title into
the page header, for example "1. Intro..." or something like that.

Currently when using

// Draw a header on each page.
c.DrawHeader(func(block *creator.Block, args creator.HeaderFunctionArgs) {
	// Draw the header on a block. The block size is the size of the page's top margins.
	block.Draw(this.logoImg)
})

there is no way to access the current chapter.

Describe the solution you'd like
An easy way to access the current chapter which occurs on the page so one can get the chapter number and title.

Describe alternatives you've considered
I tried accessing parameters in args and on the c creator instance, but did not find any parameters that could give the current context with the "current" chapter or "primary" chapter that applies to that page.

Should be consistent with outlines etc.

Additional context
This is commonly done in reports to give more context in multi page documents where user might have forgotten what section they are reading.

@gunnsth gunnsth added creator enhancement New feature or request labels Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
creator enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant