Personal tools
Help:Shortcut templates
From Learn Chemistry Wiki
This page lists a few of the templates that provide useful shortcuts for common operations.
Contents |
Generating substance names
{{S$|SubstanceName}} generates [[Substance:SubstanceName|SubstanceName]], i.e., a link to the substance page for the compound called SubstanceName.
Example
{{S$|Acetophenone}} produces Acetophenone.
Retrieving data from ChemSpider
- {{GetCSID|SUBSTANCENAME}} can be used to retrieve the ChemSpiderID, given the substance name. The main ChemSpider substance name (the page name) is given highest priority; if there is no match found at this level, then synonyms are searched.
- {{DataBox|SUBSTANCENAME}} retrieves a standard data box (ChemSpider link, formula, etc.). If the substance has a space in the name, as with benzyl chloride, it seems to give an error. In such cases GetDataBox must be used instead.
- {{GetDataBox|12345}} produces a DataBox for the substance with CSID=12345.
Examples
{{GetCSID|Toluene}} now produces 1108
{{DataBox|Toluene}} produces
- Main ChemSpider page
- Molecular formula: C7H8
- Molar mass: 92.138
- CAS Registry Number: 108-88-3
- Appearance: Toluene, Environmental Grade, 99.8+%; Toluene, anhydrous, 99.8%, packaged under Argon in resealable ChemSeal^t bottles; Toluene, anhydrous, 99.8%; Toluene, ACS, 99.5%; Toluene, HPLC Grade, 99.7% min; Toluene, 99%; Toluene, Environmental Grade, 99.8+%; Toluene, anhydrous, 99.8%, packaged under Argon in resealable ChemSeal^t bottles; Toluene, anhydrous, 99.8%; Toluene, ACS, 99.5%; Toluene, HPLC Grade, 99.7% min; Toluene, 99%; Colorless liquid with a sweet, pungent, benzene-like odor.; Colourless liquid with a benzene-like odour (odour threshold 0.17 ppm)
- Melting point: -95 to -93 °C
- Boiling point: 110.6 °C
- Solubility: Water, 526 mg/L (25 deg C)
- Safety sheet: Not available
- Spectra: ChemSpider (IR (1, 2), 1H NMR (1, 2, 3), 13C NMR (1, 2), UV), NMRShiftDB 13C NMR, Massbank MS (1, 2, 3, 4), also check on SDBS. Add Spectra (Help).
Retrieving images from ChemSpider
- {{CSIDStart}} generates a link beginning with http://www.chemspider.com/ImagesHandler.ashx?logo=1&id=
- {{CSIDEnd}} generates the end for the above link, i.e., &w=150&h=150&.png
- The CSIDEnd template is normally not used - instead a parameter is used with another template that includes the CSIDEnd text, so as to allow the size to be specified by the user.
- {{GetImage|SUBSTANCENAME|140}} retrieves an image for the compound called SUBSTANCENAME, sized at 140px x 140px. If size is not specified, 150px x 150px is used.
- {{ChemSpiderImage|12345|150}} retrieves an image of the structure sized at 150px x 150px, for the substance with ChemSpiderID 12345. If size is not specified, 150px x 150px is used.
- {{FullImage|12345|180}} retrieves an image of a full structure with all atoms shown explicitly, for the substance with ChemSpiderID 12345.
- {{GetCSID|SUBSTANCENAME}} can be used to retrieve the ChemSpiderID, given the substance name. The main ChemSpider substance name (the page name) is given highest priority; if there is no match found at this level, then synonyms are searched.
Examples
{{GetImage|Toluene|140}} now produces
Text formatting templates
These are simply shortcuts for making it quicker and simpler to create certain text forms commonly found in chemistry, for example:
- {{sup|2}} produces 2
- {{sub|4}} produces 4
- {{cm3}} produces cm3
- {{cm-1}} produces cm–1
- {{Molar}} produces mol dm–3
Content transclusion templates
These templates are used to place blocks of content inside other pages. {{LabResources}}, inside a page in the Lab namespace, lists the related resources in other namespaces (TeacherLab, and Expt), and generates links to the related PDF resources. This template uses the the PAGENAME "magic word".
Example
See the resources section on the Lab:Extracting limonene from oranges by steam distillation page.