Above is the command I'm using, and it mostly works, i.e., the subsection # and title appear in the appropriate part of the footer for all pages EXCEPT the first page of the first subsection of each section. The subsequent pages of the first subsection have the correct footer --- it is only the 1st page that is incorrect. This problem is repeated after starting each new section. Note there are no issues (or shouldn't be as I understand them) of having multiple subsections on the same page (thus redefining the \rightmark), as a \newpage command is given immediately before each \subsection command (except for the first subsection in each section).
Am I being confusing enough? Here's an example to clarify.
For this example, the first section ``James Blunt'' will have two songs, each appearing on there own page(s). The first ``1973" will not have a footer on the first page, but the second page of lyrics will have something like ``1.1 1973'' in the footer. The next page will be a single page of lyrics and the footer will read ``1.2 You're Beautiful''.
The next section ``Tom McRae'' will also have two songs (subsections). The first titled ``The Ballad of Amelia Earhart'' will not have a footer. The next, titled ``Bright Lights'' will have the footer ``2.2 Bright Lights'' appear on BOTH pages of lyrics (as I want it to).
Is it clear now?
Any ideas on how to get the \rightmark to appear on ALL pages?
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Okay, no bites so far. Maybe I can restate the question in order to get what I need.
I can avoid the above problem if I use \thesubsection in the footer instead of \rightmark ... BUT then I don't get the title of the subsection - just the number. Soooo .... how do I get at the subsection title? What is that called?
My guess is that I could create a footer with {\thesubsection~~\thesubsectiontitle} and have it solve my problem. The problem is \thesubsectiontitle isn't a real command, but is there the equivalent command already out there? If so, what is the name of it?
Yes, I could create the command, but the problem with that is then, whenever I create a new subsection, I would have to follow it with the custom \thesubsectiontitle command with an argument (i.e., title) that is identical to that which is already in the \subsection argument ... redundant and cumbersome .
Still no ideas? Well, I thought I'd post my solution to getting the footer that I want. It is a bit of a hack as it means that I have to use my custom defined command \subsec in place of the \subsection command.
In my preamble I define the \subsec & \subsectiontitle commands:
This doesn't need to be in the main body, but here I have different footers for different parts of my document, thus this appears at the beginning of the "song lyrics" part of my guitar chordbook.
The other thing to note is that whenever the \subsection command would normally be used, you have to use \subsec in its place. The way it is defined above means that it does exactly the same thing (even shows up appropriately in the table of contents) but gives access to the actual title of the subsection ... or song in my case.
I still don't really like this, and think it is a hackish solution, but I can't figure out why I am getting the current behavior from \rightmark. If anyone knows the answer to that and has a nonhackish solution, let me know.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p