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

Automation of Chemical Formulas

New Here ,
Nov 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

Hello Everyone,

I've many chemical formulas in my brochure. I've to manually superscript and subscript the nos. 

Screenshot attached

eg. 

(NH4)2[Pt(SCN)6]
(NH4)2[PtCl6]
(NH4)2C2O4
(NH4)2Ce(NO3)6
(NH4)2CO3
(NH4)2Cr2O7
(NH4)2CrO4
(NH4)2Hg(SCN)4
(NH4)2SO4
(NH4)3N
(NH4)3PO4
(NH4)H2ASO4
[Cu(H2O)4]SO4 · H2O

and many more...

 

Can I automate all the formulas using a script or GREP express or any other method to avoid manual work?

 

Thank you,

Swati

TOPICS
Print , Scripting

Views

598

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 ,
Nov 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

You certainly can. You can make a character style for the subscripts. I suggest, of there isn’t already a subscript available in the font you bump the weight up a bit. I also suggest using horizontal and vertical sclaing rather than changing the point size. You get finer control and the scaling will scale with the point size.

 

In the bleow image I have three columns. On the left is your supplied text with no formatting applied. In the middle I have changed all the numbers to use the Subscript/Inferior form included in the font Minion Pro I applied this style using GREP Styles. On the right I created a character style for the subscript by adjusting the baseline, horizontal and vertical scale, and weight. I applied the subscript using GREP.

Screen Shot 2020-11-03 at 9.17.02 PM.png

You can view the GREP expression below. I just used the wildcard for any digit.

Screen Shot 2020-11-03 at 9.17.22 PM.png

You can view the InDesign file here.

https://www.dropbox.com/s/c8ntjhypps5comd/Subscripts.idml?dl=0

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
New Here ,
Nov 05, 2020 Nov 05, 2020

Copy link to clipboard

Copied

LATEST

Hi Scott,

Thanks for the reply!

 

But my problem is still not solved...

I have a document which has nos. init but they are not a part of chemical formulas. Example: we have category nos (A297C12, N3034F1) which I don't need any subscript and we have the chemical formulas all over the document, and it's around a 100-page brochure. 

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