Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Stlyle on only one word

Participant ,
May 18, 2025 May 18, 2025

What is the easiest way to get every time a specifc word appears to be capitilized (first letter only)?

TOPICS
How to
233
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 18, 2025 May 18, 2025

Create a character style and call it's 'Cap first letter' or something similar

EugeneTyson_1-1747587771738.png

 

so then you go to the paragraph style and insert the GREP code and apply the style

 

Style is Cap

code is 

\b(w)(?=ord\b)

 

for whatever word you want - you can replace it like tbps - I think you asked in another thread

so the code would be 

\b(t)(?=bps\b)

 

or if it's concrete

\b(c)(?=oncrete\b)

 

any word you want 

 

if you change the word - say in my example to 'words' or 'wording' then the w reduces back to low

...
Translate
Community Expert ,
May 18, 2025 May 18, 2025

Create a character style and call it's 'Cap first letter' or something similar

EugeneTyson_1-1747587771738.png

 

so then you go to the paragraph style and insert the GREP code and apply the style

 

Style is Cap

code is 

\b(w)(?=ord\b)

 

for whatever word you want - you can replace it like tbps - I think you asked in another thread

so the code would be 

\b(t)(?=bps\b)

 

or if it's concrete

\b(c)(?=oncrete\b)

 

any word you want 

 

if you change the word - say in my example to 'words' or 'wording' then the w reduces back to lowercase, as it no longer matches the string.

 

EugeneTyson_0-1747587267874.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 18, 2025 May 18, 2025

thanks.

but why wouldn't it be working here?

hendy_5450_0-1747591407420.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2025 May 18, 2025

Take out the full stop in your code - not required anyway 

 

\b(t)(?=bsp\b) is sufficient

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 18, 2025 May 18, 2025
LATEST

@hendy_5450

 

Do you need "specific" words - or just everything at the beginning - number of units + type of the unit?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines