Hi there! In this video we’re going to learn to
type in the chemical formulae in InDesign, so let’s get started.
I already have some of the formulae typed in here, so I’m going to ensure that nothing is selected,
and then click the small plus button at the bottom of the character styles panel to create a style.
Double-click the new style, and rename it ‘superscript.’ So basically I need
the charges to be superscripted, which means, a little raised from the baseline.
Let’s go to ‘basic character formats’, and in the position dropdown list,
select either ‘superscript’, or ‘opentype superscript’, both should work just fine,
and hit okay. Similarly create another character style, and rename it ’subscript.’
We’ll need this for the valences. Now go to ‘basic character formats’ tab, and from the ‘position’
dropdown menu, select ‘subscript’, or ‘opentype subscript’, and hit okay.
Time to move on to paragraph styles, so click the small plus button at the bottom of the paragraph
styles panel, and then double-click the new style, and rename it, should you want to, I’ll keep it
as it is. Let’s click the ‘GREP style’ tab on the left, and then click ‘new grep style.’ From
the ‘apply style’ dropdown, select ‘superscript’ character style that we created a few moments ago.
Click the ‘to text’ option, and type in these symbols, without any spaces: \(\d*(\-|\+)\)
That’s backslash, then open parenthesis, then another backslash, then the letter d,
then the asterisk sign, then another open parenthesis, then a backslash,
then a hyphen, then pipe, then another backslash, then a plus sign,
then close parenthesis, then a backslash, and finally close parenthesis.
You don’t have to remember that, that’s why I just copied and pasted here, because even
I don’t remember that. So once you’ve fed the code in, click ‘new grep style’ to create another one.
From the ‘apply style’ dropdown, select ‘subscript’ character style
that we created a few moments ago. Click the ‘to text’ option, and type in these symbols,
without any spaces: (?<=[A-Z]|[a-z])\d{1,2}
That’s open parenthesis, then a question mark, then less than sign, then equal sign, then open
bracket, then a capital A, then a hyphen, then a capital Z, then closed bracket, then pipe,
then open bracket, then a lower case ‘a’, then a hyphen, then a lower case ‘z’,
then closed bracket, then close parenthesis, then a backslash, then the letter d,
then open brace, then 1, then a comma, then 2, and finally, close brace.
Like I mentioned earlier, you don’t have to remember that, that’s why even I just copied, and
pasted here, because even I don’t remember that. So once you’ve fed the code in, click okay. Now
select the text box, and then click the paragraph style you’ve just created, and you’ve got yourself
the chemical formulae typed in InDesign. Let’s add some leading space, and we’re done.
Alright guys! That’s all for now, I’m going to see you in the next one pretty soon. Good bye!