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

Superscript by FindChangBy.JSX

Community Beginner ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

Hi all,

I have a file containing 

^{2}  OR _{2}

I want matter in {.....} Superscript. 

I have added below line in FindChangeBy supporting file

Where and how to add Superscript/Subscript.

 

grep {findWhat:"(\\^\\{)(.+?)(\\})"} {changeTo:"$2"} ...

 

Suryakant

TOPICS
How to

Views

250

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 ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

I would say first check your grep from the find change dialog and when you see it working then use the FindChange file. Now if your requirement is just to find text within {} and replacing if with the text without {} then the following should work

Find 

\{([^{}]+)\}

Change To

$1

If this does not work then please share the text and explain what you wanted and what you are getting

-Manan

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 Beginner ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

Thanks,

I tried FindChange. It is working fine.

The reason I ask is  IN same file I have make many changes, and keep 1-set ready for future use also.

Suryakant

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 ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

So you mean that the query I gave worked with FindChange dialog and now you want that to work through the FindChangeByList file?

-Manan

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 Beginner ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

Sorry. What you gave is selecting everything between  {.....}

But my matter sequence is    ^{2}   OR     _{2}

 

(A) $\mathrm{km} / \mathrm{s}$\\
(C) $\mathrm{km} / \mathrm{s}^{2}$\\
(B) $\mathrm{km} \mathrm{s}$\\
(D) $\mathrm{km} \mathrm{s}^{2}$

 

Your command is selecting {km} also.   My commend is selecting matter correctly.  Only problem is make superscript or subscript. 

 

Suryakant

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 Beginner ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

Mistakenly Marked as Correct Answer.   How to Undo it??

 

Added to above

Your command is selecting {km} also.   My commend is selecting matter correctly.  Only problem is make superscript or subscript by FindChangeByList. 

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 ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

Apply a character style with the superscript/subscript set. That should work I think

-Manan

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 Beginner ,
Apr 10, 2024 Apr 10, 2024

Copy link to clipboard

Copied

Yes. I am doing same.

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 ,
Apr 10, 2024 Apr 10, 2024

Copy link to clipboard

Copied

quote

Yes. I am doing same.


By @suryakant256115023evw

 

Not sure if it is working for you now - but if not - can you post screenshots of BEFORE and AFTER? Examples of what exactly are you trying to achieve.

 

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 ,
Apr 10, 2024 Apr 10, 2024

Copy link to clipboard

Copied

LATEST

Please send us a sample INDD file and the sample txt file with your query and we can test it. A statement saying it does not work with no supporting data isn't too helpfull to identify the problem

-Manan

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