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

Full-page Table-of-Contents #304

Open
calculuschild opened this issue Jan 26, 2017 · 7 comments

Comments

Projects
None yet
3 participants
@calculuschild
Copy link
Member

commented Jan 26, 2017

So, after taking a look at the request for dot leaders in the table of contents, I found a solution that seemed to work. Now, I've extended the toc class to work with the PHB full-page table of contents if you would like to add as a snippet (or not). In this case it would probably make sense to create a separate toc class as the one I use has to override a few things to make it work. Hope this is helpful in some way.

Share Link : http://homebrewery.naturalcrit.com/share/Sy-z2DBve

image

@stolksdorf

This comment has been minimized.

Copy link
Collaborator

commented Jan 26, 2017

The original TOC was just hacked together one morning. In v3 there will be a nice TOC class with generator. Thanks for the code, I'll use it as a base

@DoctorDan1986

This comment has been minimized.

Copy link

commented Jan 28, 2017

Here's a thought - why not add a function to tie pages together with a page number so that whatever page they are linked to will auto-update the page number in the TOC...or wherever page numbers are referenced?

I'm working on some pretty big brews at the moment, and sometimes due to formatting or inspiration, page numbers change for references...which means that I have to go through the entire brew hunting page numbers to change them.

@stolksdorf

This comment has been minimized.

Copy link
Collaborator

commented Jan 28, 2017

@DoctorDan1986 you can already do this. You can wrap whatever title or block of code you want in a div with an id, and use that for the link instead of the page number.

@DoctorDan1986

This comment has been minimized.

Copy link

commented Jan 28, 2017

Is there a page with all the available commands for the brewery somewhere?

@stolksdorf

This comment has been minimized.

Copy link
Collaborator

commented Jan 28, 2017

The snippets are there to show some things you can do, mostly things specific to Homebrewery. Other than that, there really isn't commands, this is just HTML.

@DoctorDan1986

This comment has been minimized.

Copy link

commented Jan 29, 2017

You've mistaken my meaning a bit. Okay, so I can wrap headings with a div id, and I can jump to that, which is super helpful for a web-only book, but what I really want is a dynamically updating TOC page number - so that if I, for example, have an enemy bestiary start on page 100, but add a new section between the TOC and page 100 that adds two new pages in the middle of the book, the page number as shown on the TOC for the bestiary will dynamically update to reflect the two new pages so I don't have to go through and manually alter each individual page number.

@stolksdorf

This comment has been minimized.

Copy link
Collaborator

commented Jan 29, 2017

I understand what you mean, but I will not build it. Automatically modifying user's content is an easy way to introduce unexpected behaviours that frustrate users.

The two ways I see the TOC being used is A) You use the sippet, which autogenerates it, if you make changes, remove the TOC and use the snippet again. B) You want fine-grain control over what is in the TOC and how it looks, then you will have to manually update it when you make changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.