Copy link to clipboard
Copied
Hello!
I am creating a brand guide where the chaper headings are in small caps (e.g. typography) and in the TOC, I need it to be in Sentence Case (e.g. Typography). I am wondering how to achieve this. Thank you!
Okay... so do you have autonumbering on the Chapter Head style? Or are you applying numbering on the TOC style?
If the whole TOC string begins with chapter head numbering, the GREP style will have to bypass that to reach the first actual letter. That can get involved, but this should select one digit plus a following white space and ignore it, then apply the uppercase style to the first letter: (?<=\d\t)[\l]
I think your combination of styles, styling and text layout might be a little convol
...Copy link to clipboard
Copied
It is more or less a glitch that ID pulls in all character styles and spot changes from TOC source paragraphs. I have books where a word is properly bolded or italicized, for example, in a chapter heading, and getting this gloss out of the TOC entry proves nearly impossible.
It's possible GREP styles could override character settings, but my recollection is that ID is really stubborn about bringing those styles with the paragraph. The only good solution may be to use a phantom chapter title (1pt white or no-color type) above or below the actual chapter title, and link the TOC to that.
Copy link to clipboard
Copied
I have seen solutions in the community for changing all caps text (by typign in sentence case and applying all caps to the paragraph style) in the spreads to sentence case in TOC, which seems easier to achieve. But ID doesn't have a Small case option to apply to the paragraph style, which is making it harder.
Copy link to clipboard
Copied
ID supports small caps in paragraph styles; Style menu | Basic | Case setting. 🙂
And interesting, at that level the case setting does not come through. This may be a solution but only if the paragraph style sets small caps and not a character style.
Copy link to clipboard
Copied
Yes, there is a small caps in the basic setting but that is basically a smaller version of the caps instead actual smaller case of the alphabets. Isn't it? Or is there an option to set the alphabets to its smaller case?
Copy link to clipboard
Copied
I don't quite get your question. There are two options that can be applied via either Paragraph or Character styles, 'Small Caps' and "OpenType Small Caps.' They vary slightly but are otherwise consistent, and both appear to use small-caps glyphs (at least, with a font that contains them, such as Minion Pro).
The difference seems to be that Small Caps applies only to lowecase letters, leaving the caps as caps, while the opentype version reduces all to small cap glyphs. I think the OP would want to use the latter setting for the chapter headings, but type the actual content in Sentence or Title Case so it appears that way in the TOC.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
If you want all small caps in the chapter header, tick the 'Opentype Small Caps' option and that's what you'll get.
To get Sentence or Title case in the TOC, set the TOC entry style to whatever you like WITHOUT any small caps gloss, and type the chapter header in the case style you want.
The chapter header will be all small caps, the TOC will be whatever case you typed.
As nearly as I can tell, both SC options use the actual small-caps letter forms if the font has them. I'm not following your comment about substituting small letters instead.
Copy link to clipboard
Copied
I am sorry, I think I am using the term small caps in a wrong way here. I want Sentence Case in TOC and all Lowercase in the document.
Copy link to clipboard
Copied
That's exactly what the answer above will give you. However, you have to use the 'OpenType Small Caps' option on the chapter heading Paragraph Style to get it to suppress the capital letters there.
Chapter head without small caps applied:
Chapter head with opentype small caps applied:
TOC with TOC level style applied:
Did that come out correctly?
ETA: sorry, the penny just dropped. Unfortunately, there is no way to have one case in the heading (all lower case) and a different case in the TOC, other than using this small caps trick.
No easy way, I should say. I think a GREP style could be used to do this, applied to the TOC style, but it might be fussy and demanding. Let me start a new post.
Copy link to clipboard
Copied
I am sorry, this is where went wrong in explaining what I wanted. I don't want Small Caps. I am looking to 'Lowercase' and 'Sentence Case'.
This is the example of what I want:
Chapter headings:
typography
colour
TOC:
1.1 Typography................................01
1.2 Colour............................................08
Does it makes sense?
Copy link to clipboard
Copied
If your chapter heading is all lowercase, you could convert the TOC to sentence or title case using a GREP style... I think. I GREP but weakly, but here's a style that might work:
This should force the first character of your TOC entry to uppercase.
This could also be adapted to uppercase each first letter, giving you Title Case.
Sorry for going down a side road on this. 🙂
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Yes, that \l selects a lowercase letter as the first letter of the string. It should skip any autonumbering, though, and a digit should not require conversion. Are you using autonumbering for your TOC entries, or manually including those numbers?
A GREP string has to exactly match a sequence and location.
Copy link to clipboard
Copied
It's picking up the contents of the Chapter Heading paragraph style.
Copy link to clipboard
Copied
Okay... so do you have autonumbering on the Chapter Head style? Or are you applying numbering on the TOC style?
If the whole TOC string begins with chapter head numbering, the GREP style will have to bypass that to reach the first actual letter. That can get involved, but this should select one digit plus a following white space and ignore it, then apply the uppercase style to the first letter: (?<=\d\t)[\l]
I think your combination of styles, styling and text layout might be a little convoluted; this all might work better if it's simplified.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I'm attaching a cheat sheet I have found useful as my GREP understanding grew; if nothing else, it does a nice job of summarizing all but a few of the most esoteric commands and options. But if you really want to learn and master GREP, there's one and only one master reference: Peter Kahrel's GREP In InDesign, available from fine book sources everywhere.
(There are more comprehensive guides to GREP in general, up to the coding god level, but Peter's book is 100% focused on InDesign's implementation and uses, which reduces the confusion quite a bit.)
Copy link to clipboard
Copied
And yes, I do have a complex TOC but I wanted to give it a try to make it possible.
Copy link to clipboard
Copied
Complex is fine. I'm just wondering if it could be less convoluted between numbering here and there and so forth. Use the simplest set of styles and styling that get you there, instead of doing A in one place and having to undo it to apply B in another — in general.
Copy link to clipboard
Copied
Awesome! Thank you! I was able to capitalize each word.
Thanks for the help again!
Copy link to clipboard
Copied
Careful of that rabbit hole... GREP styles can get crazy addictive. 😄
Copy link to clipboard
Copied
Yes, I am already finding that haha!