Difference between revisions of "Template:DeltaTHC/doc"

From blackwiki
Jump to navigation Jump to search
imported>Meteor sandwich yum
(Created doc page, with tweaks)
 
imported>Vanisaac
m (→‎Closing notes: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
Line 47: Line 47:
  
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
+
<includeonly>{{Sandbox other||
 
<!-- Categories go here, and interwikis go in Wikidata -->
 
<!-- Categories go here, and interwikis go in Wikidata -->
 
[[Category:Typing-aid templates]]
 
[[Category:Typing-aid templates]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 23:14, 24 April 2020

Working on Tetrahydrocannabinol, I noticed THC has a lot of isomers. Minus signs, capital deltas, superscript, & italic hyphenated chemical indicators are all really hard to type without messing up, so I made this as a typing aid for quick, formatted notation of isomers of various chiral centers of the cannabinoid family.

Usage

I grabbed examples from THC and noticed there were chiral centers notation, (−)/(+) notation, and (R,S) notation. I focused on writing the script, so am probably getting the terminology wrong. Anyway, I coded support for all of them depending on the parameters given and content in them. It takes up to three:

Parameters
Parameter 1 Parameter 2 Parameter 3
Chiral center bridge (optional); if not present uses superscript superscript (required) none
(−)/(+) notation (-) or (+) (required) bridge (required) superscript (required)
(R),(S) notation (R) or (S) (required) bridge (optional); if not present uses superscript superscript (required)

hyphens are acceptable

Examples

Chiral center only
  • {{DeltaTHC|9}} becomes Δ9-transhydrocannabinol
(+)/(−) notation
  • {{DeltaTHC|-|trans|9}} becomes (−)-trans9-transhydrocannabinol
  • {{DeltaTHC|+|cis|8a}} becomes (+)-cis8a-transhydrocannabinol
(R/S) notation with and chiral centers
  • {{DeltaTHC|6a,10a}} becomes Δ6a,10a-transhydrocannabinol
  • {{DeltaTHC|6aR,10aR|9}} becomes 6aR,10aR-Δ9-transhydrocannabinol
  • {{DeltaTHC|6aR,10aR|trans|9}} becomes 6aR,10aR-Δ9-transhydrocannabinol

Closing notes

May not be useful, since {{DELTA}}, {{sup}}, and &minus; exist as alternatives. Open to suggestions (message me or fix it yourself). If you see this in the future not being used, go head and delete it Template:NbhyphTemplate:Nbhyph meteor_sandwich_yum (talk)