Highlighted

Automation of Chemical Formulas

New Here ,
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

63

Likes

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

Automation of Chemical Formulas

New Here ,
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

64

Likes

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
Nov 03, 2020 0
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Nov 03, 2020 0
New Here ,
Nov 05, 2020

Copy link to clipboard

Copied

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. 

Likes

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
Reply
Loading...
Nov 05, 2020 0