Template:Infobox drug/chem styled/doc

From blackwiki
Jump to navigation Jump to search

Template:Tdeprecated

Usage

In the template, add the number of atoms:

{{Infobox drug/chem styled|H=2|O=1|C=}}H2O
  • |charge= can be used. A hyphen (-) will be turned into a minus-sign (−):
{{Infobox drug/chem styled|H=3|O=1|C=|charge=+}}H3O+

Parameter list (elements available)

Full parameter list (copy/paste to use):

{{Infobox drug/chem styled
|C= |H= |Ag= |Al= |As= |Au= |B= 
|Bi= |Br= |Ca= |Cl= |Co= |Cr= |F= 
|Fe= |Gd= |Hg= |I= |K= |Li= |Mg= 
|Mn= |Mo= |N= |Na= |O= |P= |Pt= 
|S= |Sb= |Se= |Si= |Sr= |Tc= |Zn= 
|charge= |default=
}}

A symbol many be empty & absent, like |Hg=, but do not omit the = (equal sign). The order of the symbols is not relevant; the output sequence will be: C-H-all others alphabetically.


There are 35 available, out of 118 elements. Elements not in the template (83/118):

|Ac=|Am=|Ar=|At=|Ba=|Be=|Bh=|Bk=|Cd=|Ce=|Cf= |Cm=|Cn=|Cs=|Cu=|Db=|Ds|Dy=|Er=|Es=|Eu=|Fl=|Fm= |Fr=|Ga=|Ge=|He=|Hf=|Ho=|Hs=|In=|Ir=|Kr=|La=|Lr= |Lu=|Lv=|Md=|Mt=|Nb=|Nd=|Ne=|Ni=|No=|Np=|Os= |Pa=|Pb=|Pd=|Pm=|Po=|Pr=|Pu=|Ra=|Rb=|Re=|Rf= |Rg=|Rh=|Rn=|Ru=|Sc=|Sg=|Sm=|Sn=|Ta=|Tb=|Te= |Th=|Ti=|Tl=|Tm=|U=|V=|W=|Xe=|Y=|Yb=|Zr= |Uuo=|Uup=|Uus=|Uut=

Error handling and tracking category

None of the elements C-H-O-N-S is used
{{Infobox drug/chem styled|Au=2}} → Au2 (Category:Articles with an error using Template:Chem styled, sorted under *)

Some errors are chatched, such as: using an element symbol not defined in the template: |Fl=2: {{Infobox drug/chem styled|Fl=1}} →

In mainspace (articles)

Articles with such an error are listed in Category:Articles with an error using Template:Chem styled (0). The error message shows in preview only.

In other spaces

The error message shows. No categorization.

This error handling is controlled by module:TemplatePar

Known issues

  • This template adds coloring and bolding to the font (element symbols). This may not be within WP:ACCESSIBILITY guidelines.
  • For some reason, only molecules that have C-H-O-N-S elements are shown. This might be an unneeded restriction. (See error handling above).
  • Only 35 elements are listed. This could be ~100. (See error handling above).

See also