styling the TOC to indicate which page you are on

11 views
Skip to first unread message

Alex Jordan

unread,
Jul 4, 2024, 1:24:32 AMJul 4
to prete...@googlegroups.com
Here's a screenshot of the TOC when I am on a certain page. Is it clear just from the styling which page I am currently on?

Screenshot 2024-07-03 at 10.17.18 PM.png

I'm on 3.10, and you can deduce that if you think about why would 3.10 be shaded at all when 3.9 is not. But at a glance, it almost feels like I'm on "Appendices" because that one stands out as different.

Or how about here?

Screenshot 2024-07-03 at 10.19.18 PM.png

I'm actually on 4, but you can't really tell a difference between being on 3 and being on 4.

How could we style the TOC differently to make the current page you are on stand out?





Jason Siefken

unread,
Jul 4, 2024, 11:27:54 AMJul 4
to prete...@googlegroups.com
This is indeed confusing. For my own book, I changed the styles quite a bit:



Hopefully it's obvious that 2.3 is what is currently being viewed!
--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/CA%2BR-jrfUoi3GP%2BGNfYKPXgxSC%2B54nz1y%2B8ab-ktx%2BUx0e5fzFg%40mail.gmail.com.

Andrew Scholer

unread,
Jul 5, 2024, 11:33:17 AMJul 5
to prete...@googlegroups.com
Alex - 

For reproducing purposes, what color scheme are you using? What level is the TOC set to?

The color schemes define 'chaptertoc' and 'sectiontoc' as well as 'active' variants of both of those. (Despite their names, they are not necessarily used for those elements - think of them as primary division color and secondary division color.) That looks like the active color is the same as one of the plain ones, which seems like a bug in that color scheme.

But I do agree that many of the existing color schemes end up a TOC that is hard to read. When too many colors are in play for those 4 different values, or if the colors used for 'active' TOC elements don't noticeably stand out, the display gets confusing. Especially if the base colors are distinct and bold - like red and blue - it gets really hard to find an active color that stands out without inducing eye bleed.

My book uses the same palate for everything in the TOC with the brightest tint used for the active item.

image.png


Maybe it would be good to simplify color usage in the TOC a bit.


Andrew Scholer (he/him/his)
Computer Science Instructor/Program Chair
Chemeketa Community College


Alex Jordan

unread,
Jul 5, 2024, 2:11:57 PMJul 5
to prete...@googlegroups.com
That screenshot was taken with all default settings for everything about CSS and TOC. The chunk level is whatever the default is for book, which corresponds to chunking at the section level.

Andrew Scholer

unread,
Jul 15, 2024, 1:12:38 AM (9 days ago) Jul 15
to prete...@googlegroups.com
Doing a bit of thread necromancy here, but I am just cycling back to playing with colors.

Right now that styling is trying to use two colors (red & blue) to distinguish chapters from parts and active things from non-active.

I would fix it by doing something like what the focused TOC does (shown in my screen shot in earlier post). uses a parts color which defaults to slightly darker version of the chapter color. Using that in the traditional TOC would look like below. I think it does a nice job of retaining some difference between the parts and chapters while also making it clear that something is very special about 2.3 (the active section).

image.png

Happy to PR that change if you like it.

Andrew Scholer (he/him/his)
Computer Science Instructor/Program Chair
Chemeketa Community College

Reply all
Reply to author
Forward
0 new messages