# Template talk:Chem

WikiProject Chemistry (Rated Template-class)
This template is within the scope of WikiProject Chemistry, a collaborative effort to improve the coverage of chemistry on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Template  This template does not require a rating on the project's quality scale.

## Protection & charges

This template should be protected soon, since almost 150 articles allready use it. Also, I would like to have a feature for writing charges (something like if you start the number with a + or a -, it will put it automatically as sup instead of sub). Or possibly add another option such as the link one, say charge, which will come automatically at the end as a superscript. Thanks, and great template. Nergaal (talk) 04:49, 30 January 2008 (UTC)

There's a version in the sandpit which can handle charges. If there is no objection, I'll put it in after a bit of testing. It can also handle atomic number & mass number. P.S. not if it starts but if it ends with a + or - (hyphen not a minus sign).
 *{{chem/sandbox|H|2|O}} *{{chem/sandbox|2|H|2|O}} *{{chem/sandbox|H|3|O|+|link=hydronium}} *{{chem/sandbox|1|2|A}} *{{chem/sandbox|1|A}} *{{chem/sandbox|14|2|A|3}} *{{chem/sandbox|1|A|3}} *{{chem/sandbox|1|2|A|3|2+}} *{{chem/sandbox|1|A|3|-}} *{{chem/sandbox|A|1|B|2|C|3|D|4|E|5|F|6|G|7|H|8|I|9|J|10}} *{{chem/sandbox|A|1|B|2|C|3|D|4|E|5|F|6|G|7|H|8|I|9|J}} *{{chem/sandbox|A|1|B|2|C|3|D|4|E|5|F|6|G|7|H|8|I|9}} *{{chem/sandbox|A|1|B|2|C|3|D|4|E|5|F|6|G|7|H|8|I}} *{{chem/sandbox|A|1|B|2|C|3|D|4|E|5|F|6|G|7|H|8}} *{{chem/sandbox|A|1|B|2|C|3|D|4|E|5|F|6|G|7|H}} *{{chem/sandbox|A|1|B|2|C|3|D|4|E|5|F|6|G|7}} *{{chem/sandbox|A|1|B|2|C|3|D|4|E|5|F|6|G}} *{{chem/sandbox|A|1|B|2|C|3|D|4|E|5|F|6}} *{{chem/sandbox|A|1|B|2|C|3|D|4|E|5|F}} *{{chem/sandbox|A|1|B|2|C|3|D|4|E|5}} *{{chem/sandbox|A|1|B|2|C|3|D|4|E}} *{{chem/sandbox|A|1|B|2|C|3|D|4}} *{{chem/sandbox|A|1|B|2|C|3|D}} *{{chem/sandbox|A|1|B|2|C|3}} *{{chem/sandbox|A|1|B|2|C}} *{{chem/sandbox|A|1|B|2}} *{{chem/sandbox|A|1|B}} *{{chem/sandbox|A|1}} *{{chem/sandbox|A}}  H 2O 2H 2O H 3O+ 2 1A 1A 14 2A 3 1A 3 2 1A2+ 3 1A− 3 A 1B 2C 3D 4E 5F 6G 7H 8I 9J 10 A 1B 2C 3D 4E 5F 6G 7H 8I 9J A 1B 2C 3D 4E 5F 6G 7H 8I 9 A 1B 2C 3D 4E 5F 6G 7H 8I A 1B 2C 3D 4E 5F 6G 7H 8 A 1B 2C 3D 4E 5F 6G 7H A 1B 2C 3D 4E 5F 6G 7 A 1B 2C 3D 4E 5F 6G A 1B 2C 3D 4E 5F 6 A 1B 2C 3D 4E 5F A 1B 2C 3D 4E 5 A 1B 2C 3D 4E A 1B 2C 3D 4 A 1B 2C 3D A 1B 2C 3 A 1B 2C A 1B 2 A 1B A 1 A
It's working. JIMp talk·cont 00:42, 15 July 2009 (UTC)

## No-subscript (implied 1) breaks rest of formula

I just noticed someone correcting mis-rendering on noble gas. Having to play special games to make the formula display correctly goes against the point of having the template to do it automatically. Say we want "XeF8". The page previously had {{chem|Xe||F|8}}. I assume that worked at one time.[cite needed] But now the result of that is just "Xe". None of the other likely chemically correct approaches work either: {{chem|Xe|F|8}} breaks the template badly, but one shouldn't expect it to work once one reads the template docs, and {{chem|Xe|1|F|8}} actually displays the 1, which again makes sense with respect to parsing.

The "solution" was {{chem|XeF|8}}, but that's weird from a chemistry standpoint. "XeF" isn't anything real except a text string (suppose some day we want to enable auto-linking to each element's webpage?). Is it possible to make {{chem|Xe||F|8}} work correctly? The template syntax appears to use an undefined parameter to indicate the end of the formula...could it look ahead a second position as well. Or could fix {{chem|Xe|1|F|8}} by having subscript be omitted if it's "1" (which could be over-ridden by some allsubscripts=yes template parameter if there are cases where one wants to see it).

I reverted it to the previous setup. Nergaal (talk) 22:56, 16 July 2009 (UTC)
Hmm, was it intended for every atom to be specifically delineated in this manner? Perhaps I came late to the scene, but I had assumed that the formula only needed to be separated when subscripts (or superscripts) are needed, i.e., {{chem|CH|3|COOH}} rather than {{chem|C|H|3|C|O|O|H}}, which seems to be a very cumbersome way to type a formula. Besides, I question the value of autolinking every element in a formula, especially if the same elements occur multiple times (IMHO that would qualify as a case of WP:overlink).—Tetracube (talk) 01:02, 17 July 2009 (UTC)
Linking is not necessary. The problem with Xe||F|4 typw formulas is that this template was started quite a while ago and that way worked well; so in many instances it is used like that. Is it hard to fix that? Can't you say to ignore the fields that have nothing in them? Nergaal (talk) 01:38, 17 July 2009 (UTC)
I don't know how hard it is to fix that, since I wasn't the one who made the changes. Just sayin' that many articles use the template the other way, including some that are now broken because they use the new superscript feature. Maybe User:Jimp could fix the new version of the template to ignore empty arguments, then we'll both be happy. :-)—Tetracube (talk) 15:46, 17 July 2009 (UTC)
Linking indeed is not necessary, was more of a "future idea" supporting why I thought keeping it "chemistry-like" was worthwhile. Another future-feature that relies on keeping each element distinct is the ability to automatically color each one using standard colors (a style used in some infoboxes). Again, "I wouldn't want it that way in many cases" and I don't think the limited present us of this format makes it worth implementing in such a potentially widely used template. DMacks (talk) 19:43, 18 July 2009 (UTC)

XeF
8

It seems to be fixed. I'm putting the new version in before we get people wondering what's going on. JIMp talk·cont 17:17, 17 July 2009 (UTC)

sweet! Nergaal (talk) 17:53, 17 July 2009 (UTC)
I saw that the new addition is a minor one; I am pretty sure it does not fix all the instances: I remember putting myself formulas like "{chem|C|x|H|y|N||O|}". Can you make sure the instances get fixed for all empty spots in use? Nergaal (talk) 18:01, 17 July 2009 (UTC)
Or request a bot to fix those uses. Nergaal (talk) 18:02, 17 July 2009 (UTC)
Here are some tests:
HSO
4
H
2
PO2−
4
(NH+
4
)
3
PO
4
(CH
3
NH+
3
)
2
SO2−
4
NH+
3
CH
2
CO
Looks OK to me. Thanks Jimp!—Tetracube (talk) 18:32, 17 July 2009 (UTC)

The new addition you saw was a minor one. The dozen or so which you didn't see were also minor. As for linking individual elements, {{chem|[[Hydrogen|H]]|2|[[Oxygen|O]]}} does a fine job. Optionally colouring the elements in standard colours is also possible. As for the case of using lower case letter in place of numbers, I'm afraid it would probably be best to fix these by bot. It's not that it's not possible to accommodate this; the software can tell a lower case from an upper case & so could treat the lower case as a plain number. The problem is that if we have {{chem|C|x|H|y}} give us "CxHy", then people are going to expect {{chem|Fe|a+}} to give "Fea+" and come here complaining that the template is broken when they get "Fea+" (we can't read the "+" after a letter, same goes for a "-") ... then there's A
Z
X. JIMp talk·cont 09:41, 25 July 2009 (UTC)

Make sure these tips go into the documentation of the template. Nergaal (talk) 16:52, 25 July 2009 (UTC)
Is there a way to make italicized subscripts (e.g. {{chem|Si|''n''|O|2''n''}})? Last I checked, this doesn't produce the expected result.—Tetracube (talk) 17:17, 27 July 2009 (UTC)
It's working. Si
n
O
2n
JIMp talk·cont 20:09, 29 July 2009 (UTC)
Thanks!!—Tetracube (talk) 14:35, 30 July 2009 (UTC)

## Not quite working with italicized subscripts

The formula S2−
n−1
isn't quite working: S2−
n−1
. No idea how to fix it, though. Jimp? :-)—Tetracube (talk) 00:03, 18 September 2009 (UTC)

Hmm, the above formula is now working, but something seems to have been broken in Tetrafluoroammonium (template error halfway down the article).—Tetracube (talk) 16:56, 23 September 2009 (UTC)

Is it working all right now? JIMp talk·cont 21:06, 24 September 2009 (UTC)

Let's see:
Si4−
n+1
Sim-
n+1
Sim+
2
Si4+
2m
Si
n+m
O2−
Hmm, better than before, for sure, but not quite there yet. The last case is messed up; and also, variable charges like Sin+ aren't working, with or without simultaneous subscripts (is it too hard to do variable charges?).—Tetracube (talk) 21:48, 24 September 2009 (UTC)

## NuclideTemplates

I was building similar functionality when I noticed this template. It seems some of the work on Category:Nuclide templates could be merged with this template into one set of templates. Reusing code reduces the time it takes to maintain these templates and maybe there are some features in one that could benefit the other and vice versa. For instance, I think this template could benefit from the automatic linking in NuclideTemplates (you specify only the element's name or symbol and the "link" argument and the right link for that element is automatically added).    — SkyLined (talk) 12:30, 27 November 2009 (UTC)

There are a couple of things to sort out but I think it's very doable. JIMp talk·cont 06:30, 23 December 2010 (UTC)

## IE6 support?

Someone using the very old and antiquated IE6 browser noted that simultaneous sub/superscripts (like SO2−
4
) don't show up correctly
. Any hope of making this work? Or is IE6 just too outdated and too non-standards-compliant?—Tetracube (talk) 00:13, 1 April 2010 (UTC)

That wasn't you I was talking about (it was another user who encountered the same problem), but the problem stands: IE6 doesn't properly display whatever it is the physics template is being used to do that simultaneous super/subscript thingy. I think it looks neat when it does work, but we really should implement a fallback mechanism so that it doesn't fail horribly when it doesn't work. Whatever happened to graceful degradation in HTML and all that?—Tetracube (talk) 16:33, 22 April 2010 (UTC)
I have just discovered the same problem. This is serious. It means that anyone using a system that they are not allowed to update will get the wrong formulas. Q Science (talk) 21:16, 20 December 2010 (UTC)
• The superscript output for parameter {3} is supposed to occur in Template:Su as parameter {p}, but only the subscript output for parameter {2} as {b} is appearing, such as "4". As a quick fix, I can edit Template:Su to display parameter {p} as a superscript in typical wiki-format:
<sup><span style="font-size:98%">{{{p|super}}}</span></sup>
Using the font-size as 98% will match the font size of the subscript "4" which seems like a logical fix. The result will appear as: "SO
4
2-. I realize that some prefer the aligned superscript+subscript format, but it does not work in IE6. Are there any objections to supporting users of Internet Explorer 6 with this change? -Wikid77 03:24, 21 December 2010 (UTC)
Here's one hearty vote of encouragement! It looks fine to me. Now if they should just fix the fonts, so that IE6 users see the correct rams-horn upsilon (ϒ) as a letter that is different from a Y, without having to resort to LaTeX. SBHarris 03:45, 21 December 2010 (UTC)
{{su}} is used by many other templates, please do not make random changes to it without checking the consequences.     — SkyLined (talk) 10:02, 22 December 2010 (UTC)
The whole point of using {{su}} here was to align the subscripts and superscripts. I think that's the whole point of {{su}}'s existence. JIMp talk·cont 01:38, 23 December 2010 (UTC)
This issue has been resolved in {{su}}, see the talk page for details.     — SkyLined (talk) 08:40, 23 December 2010 (UTC)

## Problem with CH3F and CH4

Such uses as CH
3
F
and CF
4
do not work. I changed what I thought to be a bug, but this does not help. Incnis Mrsi (talk) 21:23, 28 February 2012 (UTC)

You say the edits you made don't work. I've reverted them (at least till we figure out what's going wrong). JIMp talk·cont 00:34, 29 February 2012 (UTC)
This is not actually a bug, though. If you use {{chem|CH|3|F}} (i.e. no pipe between letters like in the sulphate example on the doc), everything should be fine. I guess we should make this more clear. JIMp talk·cont 04:35, 29 February 2012 (UTC)
However, if you must separate them, a double pipe, e.g. {{chem|C||H|3|F}}, will work. JIMp talk·cont 04:50, 29 February 2012 (UTC)
Thanks. I did not consider a possibility that such intricate code may be not ready to handle Symbol-Symbol sequences. Such intended syntax for, say, SO2 as {{chem|SO|2}} is absolutely counter-intuitive to me and undermines the legitimation of this template because makes future semantic-based customization unlikely. Why not recommend to use a double separation for this case? Incnis Mrsi (talk) 04:58, 29 February 2012 (UTC)
I see where you're coming from. Yes, it is somewhat counter intuitive. I'll see what can be done to remedy this. JIMp talk·cont 05:18, 29 February 2012 (UTC)
I've completely rewritten the template. The version in the sandbox handles {{chem|C|H|3|F}}. I've also made an adjustment so that it will handle metastable isomers e.g. {{chem/sandbox|58m|27|Co}}58m
27
Co
. JIMp talk·cont 05:55, 1 March 2012 (UTC)
This version has problems; Uranium#Aqueous chemistry, for example: fails on sup-tags. Alarbus (talk) 12:45, 1 March 2012 (UTC)
Alarbus was referring to sup tags within the template parameter. These actually shouldn't have been there; superscripting is automatic (one of the main points of the template). I fixed that. The other problem was that it would stumble when there was non-numeric input to be superscripted (e.g. Sim+
2
). That's also been fixed. JIMp talk·cont 16:35, 1 March 2012 (UTC)

## Parentheses

{{chem|Th(NO|3|)|4}}Th(NO
3
)
4
but should be similar to Th(NO3)4 - see recent edit to Thorium. --Redrose64 (talk) 22:38, 3 March 2012 (UTC)

Fixed. JIMp talk·cont 16:23, 4 March 2012 (UTC)
Square brackets work too thanks to Headbomb. JIMp talk·cont 16:24, 5 March 2012 (UTC)
Thank you Smashing. --Redrose64 (talk) 19:39, 5 March 2012 (UTC)

## Subscripts not working

Based on some edits on March 20, there appears to be a problem with how subscripts in formulas are displayed for some users. The specific example there is the "2" in H
2
O
generated by {{chem|[[hydrogen|H]]|<sub>2</sub>|[[oxygen|O]]}}. The editor who inserted the explicit <sub> tag left the following note on my talkpage:

Yeah, {{tchem| without the <sub></sub> tags is not causing my browser (Firefox 3.6.28 with a bunch of add-ons on Windows 2000) to render the formulae properly. It does render correctly in Chrome. I'm too security-conscious to even launch IE. St John Chrysostom Δόξατω Θεώ 17:52, 20 March 2012 (UTC)

The results look correct for me (Firefox 11.0 OS X, and also tried Firefox 3.6.28 (an X11 manual build) on OS X). The actual subscripting happens via {{su}}, which uses small fontsize and shifted baseline rather than "actual" HTML subscript, so maybe simply a stylesheet platform-portability issue (or conflict with third-party browser extensions? DMacks (talk) 15:06, 21 March 2012 (UTC)

I tried disabling Noscript, Requestpolicy, Adblock, Tamperdata, and Ghostery (stuff that can potentially interfere with rendering using JS, CSS, etc., even though it's all set to allow Wikipedia's operation) and still receive the same result. I tried a clean install of Firefox 11.0 (ugh! what an interface! that's why I stick with 3.x.x) in process sandbox, with no add-ons. It renders correctly. On some formulae (it seems that H2O renders correctly, as does H2O2, but CH3, CH4 and TiO2 don't - maybe something to do with two letters back-to-back?). A clean install of 3.6.28 does not render correctly. The latest version of Chrome renders correctly as well. (So it's not my archaic Windows install - at least it doesn't seem to be). St John Chrysostom Δόξατω Θεώ 23:43, 21 March 2012 (UTC)

## It would have been more useful...

• simple reactions
• represent polymers

Now this template has no meaning than just being an alternative to the sup and sub syntax, I think. It might be complex and hard to do, but would be of great use. 11:46, 13 July 2012 (UTC)

What <sub></sub> & <sup></sup> can't do is align the sub- & superscripts. What exactly were you hoping for? JIMp talk·cont 06:02, 9 June 2013 (UTC)

## Inconsistent subscript size

Viewing {{chem|H|9|O|4|+}}

H
9
O+
4

in IE 9 the subscript "9" is much smaller than the "4". It looks ugly.
—DIV (138.194.11.244 (talk) 00:49, 24 July 2012 (UTC))

The template now uses {{su}} for all sub- & superscripts (instead of only where you have both). This should fix the problem. JIMp talk·cont 05:58, 9 June 2013 (UTC)

## Superscripts are a bit too tall

This template is wonderful (perhaps the only template in all Wikipedia that is actually good). However it has a bad effect on line spacing, because the formulas come out a bit too tall. This problem does not occur with ordinary <sup>...</sup> See:

Lorem ipsum blabla gallia omnia
Lorem ipsum blabla gallia omnia
Lorem ipsum blabla gallia omnia
Lorem ipsum CH+
3
gallia omnia
Lorem ipsum blabla gallia omnia
Lorem ipsum blabla CH+ omnia
Lorem ipsum blabla gallia omnia

I can provide a screenshot if you can't see the problem above. (I am using Chrome with the default "vector" skin for Wikipedia.)
Would it be possible to reduce the font size of sub/sup scripts, and/or push them closer together, and/or lie to the browser about the height of the result to avoid this problem?
(I have just left this request on the {{su}} talk page, but perhaps it is just a matter of setting some parameter?)
Thanks, and all the best, --Jorge Stolfi (talk) 01:04, 22 February 2013 (UTC)

I don't think this template is that helpful. I think sub and super script make more sense to the untrained reader than knowing this template. And it messes up line spacing (I had to delete on in an article and do it the old fashioned way). Kind of a solution looking for a problem.TCO (talk) 01:58, 7 June 2013 (UTC)
It's nice if you are writing reactions (could use math text also), but definitely causes problems when in lined text. (Like using math text in regular prose would.)TCO (talk) 19:57, 8 June 2013 (UTC)
What this template does that can't be done simply with <sup></sup> and <sub></sub> is align the super- and subscripts. This is done using {{su}} so if there's a problem to be fixed, it'll obviously have to be tackled over there. I'm afraid I can't really help much. My knowledge of the workings of this template only expends as far as its own subpages (i.e. not as far as the workings of {{su}}). JIMp talk·cont 05:42, 9 June 2013 (UTC)

I get that, that is what it does. But it messes up the line spacing. That is a much worse reading faux pas than SO42-. People type all the time in Word or the like and never notice an issue with it. This template is like cramming LaTex into regular prose lines. You can't do it. Needs to be on a separate line. Well, if you keep it there, then fine.

Actually part of the main problem is that Wiki has such tight line spacing from line to line and then between paras. Look how much nicer the space is between paras in edit mode as compared to display mode. This, I think, is similar to the way over-tiny font. It is because Wikipedia thinks it makes them look smarter.TCO (talk) 06:43, 9 June 2013 (UTC)

Well, we can only hope they get it right someday. Of course, in the meantime do we use the template and hope for the best, wait till things are fixed and then go through and start adding it or what? JIMp talk·cont 07:01, 9 June 2013 (UTC)
I would get rid of it. It is OK only when in reactions (on separate lines). But people are using it in regular text as if it were a convert template. And the damage from messing up the line spacing, to the eye, is much more than SO42-. Honest, people never even notice that being off. I just went and culled all the tempates out of an article that I am sweating over. They make it look worse. Sorry, man.  :-( TCO (talk) 07:29, 9 June 2013 (UTC)

In the subtemplate {{su}} of {{chem}}, I have changed the default sub/superscript size to 70% from 85%, eliminating the extra line spacing. Also fixed passing the fontsize parameter, in case this appears too small for other applications. −Woodstone (talk) 09:04, 22 July 2013 (UTC)

## Wikipedia API

This template break something for the wikipedia API. See [ http://en.wikipedia.org/w/api.php?action=query&prop=description&titles=Water&prop=extracts&exintro&explaintext&exsentences=10&format=xml query of the first sentence]. And query of the lead section. Yug (talk) 23:45, 17 October 2013 (UTC)

Agreed. the Chem template isn't properly parsing in the Wikipedia API. It appears that in some cases, subscript markup is converted into line breaks. -- Preston stone (talk) 19:30, 4 December 2013 (UTC)

## Mg2+

In the article on eclampsia, the magnesium ion appears to absorb the following space, Mg2+
like so.
Perhaps this effect is specific to my browser, which is IE.
99.247.1.157 (talk) 03:25, 16 December 2013 (UTC)

## Electron?

How to write an electron? Instead of "e" (or "e"), {{chem|e|-}} produces a very strange result "-
e
" (-
e
), and {{chem|e||-}} produces "e

" (e

). — Mikhail Ryazanov (talk) 22:10, 20 December 2013 (UTC)

Mikhail Ryazanov; Use {{Subatomic particle}}, for an electron use {{Subatomic particle|Electron}} which gives
e
. If a link is wanted add the parameter link=yes Christian75 (talk) 14:00, 5 February 2014 (UTC)

## Using subscript and superscript characters

Maybe spacing problems can be resolved using subscript characters as ₁₂₃₄₅₆₇₈₉₀ instead of characters in subscript tag (1234567890), the same for superscript (¹²³⁴⁵⁶⁷⁸⁹⁰⁺⁻ instead of 1234567890+-)? --Sbisolo (talk) 09:55, 4 April 2014 (UTC)

## Recent undo

I undid the recent change to the font size for superscript characters; the change meant that linespacing is increased in text using this template. To see an example, preview radiocarbon dating with the version I reverted from. Mike Christie (talk - contribs - library) 17:02, 30 December 2014 (UTC)

## Line spacing?

This template still seems to have the problems with line spacing mentioned in the above discussions - see, for example, Tungsten carbide. Have there been any recent changes that might have reintroduced the problem, or was the problem not fixed in the first place? I'm seeing the issue in both Monobook and Vector, using IE11 and Chrome. Tevildo (talk) 19:18, 25 August 2015 (UTC)

Pinging @Jimp and Woodstone as active contributors. Tevildo (talk) 22:14, 30 August 2015 (UTC)

### Examples

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Using {{chem}} - H
2
SO
4
. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Using <sub> - H2SO4. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Tevildo (talk) 19:29, 25 August 2015 (UTC)

I thought it was fixed some time ago but if not, the problem is probably with {{su}}. Jimp 06:28, 9 September 2015 (UTC)

It was fixed at the cost of too small font sizes, which makes it inconsistent and illegible. Using {{su}} has inherent spacing requirements, but should generally not be noticable (especially since the typography update). If you do notice increased line height, your default font may be at fault, or too small. -- [[User:Edokter]] {{talk}} 13:46, 28 February 2016 (UTC)
@Edokter: I see you reverted the font size change. Take a look at radiocarbon dating, which looks to me much worse now; the line spacing is visibly erratic. I'm using Vector on Chrome, if that makes a difference. Mike Christie (talk - contribs - library) 16:15, 28 February 2016 (UTC)
The more important issue is legibility. At default font sizes, 70% beccomes unreadable. What I could do is tweak the lineheight, asuming only numbers are used in the sub/sup values. But readability should not suffer because of a purely aesthetic reason. -- [[User:Edokter]] {{talk}} 18:59, 28 February 2016 (UTC)
I'm tweaking {{su}} to allow for a vertical-align parameter. Please stand by. -- [[User:Edokter]] {{talk}} 19:32, 28 February 2016 (UTC)
@Edokter: Are you still tweaking? I have to say it still looks ugly to me. Is there more that can be done? Mike Christie (talk - contribs - library) 10:57, 1 March 2016 (UTC)
Yes, but need a little help in LUA syntax. -- [[User:Edokter]] {{talk}} 19:24, 1 March 2016 (UTC)

Should be fixed now. -- [[User:Edokter]] {{talk}} 17:05, 28 March 2016 (UTC)

That looks good. Thank you! Mike Christie (talk - contribs - library) 17:31, 28 March 2016 (UTC)

## Right superscript and subscript alignment rationale

Why is the aligned style used (CO2−
3
) when so many other resources, as far as I've researched, don't (SO42-[1])? Is there a standard form? Fizzwhiz (talk) 13:57, 11 November 2016 (UTC)

A latex option would be pretty obvious:

{chem|H|2|O|latex=true} → < math>H_2 O < /math> → ${\displaystyle H_{2}O}$

A readable text option would be:

{chem|H|2|O|text=true} → H Subscript 2 O

I'm not going to touch it unless I get a go-ahead. Is this an acceptable idea?

Akiva.avraham (talk) 12:35, 15 November 2016 (UTC)

A more appropriate tag than $ for using LaTeX would be <chem>. For example: <chem>H_2O</chem>${\displaystyle {\ce {H_2O}}}$ while [itex]H_2O$${\displaystyle H_{2}O}$.
See Help:Displaying a formula#Chemistry. —Kri (talk) 15:23, 25 June 2017 (UTC)

## How to write this?

How do I write ${\displaystyle {\ce {_{+1}^0\beta}}}$ (i.e. a positively charged beta particle) with this template? I've tried {{chem|0|+1}}β and {{chem|+1|0}}β but they result in +1
0
β and +1
0
β (i.e. the same, incorrect notation). —Kri (talk) 14:58, 25 June 2017 (UTC)