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

Searching for a String with a Single Character Format

Explorer ,
Oct 04, 2022 Oct 04, 2022

Copy link to clipboard

Copied

Hello!

 

I'm pretty familiar with Adobe's search options, including searching for a specific character format, searching for a specific string, or searching for a string + copied character formats, but is there any way to search for a specific string while specifying a single character format?

 

For example, I'm trying to capture all instances of the word "analyze" that appear in Roman type so that I can conver them to italics.

 

I can search for "analyz*" using a wildcard search or "\banalyz*\b" using a regexp search, but I can't specify the character style (Roman type) this way. If I copy "analyz" and search for text and character formats on clipboard, it won't capture variations in, for example, font size.

 

Is there a way to do what I want to do that I'm just not seeing? I was hoping at first that there might be a regexp flag for this, but I can't find anything online...

 

Thanks!

Matt

Views

211

Translate

Translate

Report

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 ,
Oct 04, 2022 Oct 04, 2022

Copy link to clipboard

Copied

There isn't in FrameMaker itself (one of the few times Word is better). Klaus may have added it to his super-duper find/change utility he's been working on. Reminds me, I should see if that's been updated ...

Votes

Translate

Translate

Report

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
Explorer ,
Oct 04, 2022 Oct 04, 2022

Copy link to clipboard

Copied

Super-duper find/change utility you say? 🙂

Votes

Translate

Translate

Report

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 ,
Oct 04, 2022 Oct 04, 2022

Copy link to clipboard

Copied

Sorry, Lin, FMfindRepl does not have the required function... Even worse, I have left out the search for arbitrary character formats (not catalogued).

And what does "Roman" mean in the context of format?

Votes

Translate

Translate

Report

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
Explorer ,
Oct 04, 2022 Oct 04, 2022

Copy link to clipboard

Copied

I should have said "Regular" with respect to angle. Sorry for the confusion!

Votes

Translate

Translate

Report

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 ,
Oct 04, 2022 Oct 04, 2022

Copy link to clipboard

Copied

Well, pooh. Is it even possible in a script to combine a search for letters with a search for a paragraph or character tag?

Votes

Translate

Translate

Report

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 ,
Oct 04, 2022 Oct 04, 2022

Copy link to clipboard

Copied

IMHO the case could be solved in a script - we have all the required building blocks:

  • Find something based on the character format. If it is not a catalogued one, it could be catalogued with an arbitrary name.
  • Find something as text (RegEx included)

It is not currently availabele as a 'ready to use' script - but Rick Quatro obviously could provide this - but not for free (in contrast to me he needs the money, but I have currently no time for such an effort).

Votes

Translate

Translate

Report

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 ,
Oct 04, 2022 Oct 04, 2022

Copy link to clipboard

Copied

You should be able to export your file to MIF, use (any text editor...I use NotePad++) to search for the MIF string that has your character format. Change as needed, then open the file again in Fm.

-Matt Sullivan
FrameMaker Course Creator, Author, Trainer, Consultant

Votes

Translate

Translate

Report

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 ,
Oct 05, 2022 Oct 05, 2022

Copy link to clipboard

Copied

«I'm trying to capture all instances of the word "analyze" that appear in Roman type so that I can conver them to italics.»

This morning during shaving I imagined an extension to my evolving FMfindRepl script. I always try to first find an UI for the case - how to tell the script what I want:FMfindRepl-extension.png

The idea is to add a second line in the Find what field starting with &&& and a space after it. Then the text to be found (which in this example is a RegEx).

The primary Find object is a Character Tag (a catalogued style) which is selected from the drop-down list (x-title). If you are looking for an arbitrary character format, just create a catalogue entry from it (e.g. zzz) which you can remove from the catalogue after the work.

After finding the text in a defined character format you want to change the character format - not the text. You would select this also from a drop down list (which contains the same items at the one on top).

→ I will try to develop this starting towards the end of next week ...

Edit 2022-10-10

For more than reason I will not try to develop this...

  • To search for something in plain text or search for a character tag are two very different thins - and hence my idea does not fulfill the requirement of the user.
  • I’m not a fan of to specific solutions in this general script.

The task could be achieved like this:

  • Find the first text occurrence and check visually whether it is already italic - if not, apply the format with the appropriate dialogue.
  • Find the next text occurrence (F3). If required apply the format italic by simply hitting F6 (repeat last action).
  • Applying italics could be achieved by repeating (F6) application of the character format. The simple searching for the string and visually checking whether it is already italic or not would solve the requirement.

Votes

Translate

Translate

Report

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 ,
Oct 05, 2022 Oct 05, 2022

Copy link to clipboard

Copied

LATEST

I have a script that could be modified to do what you want. See Textformatter at http://frameexpert.com/store/index.html.

Votes

Translate

Translate

Report

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