Template:SubatomicParticle

A templates to be used for displaying subatomic particles with or without a link.

Arguments

 * {| border=0


 * 1 || The word "link" (optional), this creates a link for the symbol
 * 1 or 2 || The name of the particle for which to return the symbol
 * }
 * }

Examples


See User:SkyLined/List of particles for a complete list of supported particles

Dependencies

 * This template uses SubatomicParticle/symbol to get the symbols for the individual particles.
 * This template uses SubatomicParticle/link to get the wikipedia page to link to for the individual particles.

Adding new particles
Not all particles have been added yet. Feel free to add new particles when you find they do not yet exist. Here's how to do that:

Add Symbol
Go to Template:SubatomicParticle/symbol and edit it to see the code for the template. There is a switch statement there that has an entry for each particle which allows this template to return how to display each symbol. You should decide upon a good name for the particle and create a new entry for the it. The entries do not need to be in a particular order for the template to work, but it makes finding them a lot easier if you put all similar particles grouped close to eachother. If there are multiple ways of spelling the name or there are multiple names for a particle, consider making multiple entries with the same info. The entry should look like this:

Have a look at Template:PhysicsParticle to see what you can do with it. Here are two examples of entries for the electron, which is relatively simple and for the neutral anti meson , which is named "antibs0" and one of the more complex particles to create:

Add Link
Go to Template:SubatomicParticle/link and edit it. Here you need to create a entry to specify where to link to for each particle, just like in the previous step. Use the same name for you particle here that you used in SymbolForSubatomicParticle or the link argument will not work! If you created multiple entries for the same particle under different names in SymbolForSubatomicParticle, you should do the same here. Editing this is a lot simpler, you just specify the name and the page to link to like so:

Here's the examples entries for electron and anti meson again:

Check changes
Go to User:SkyLined/List of particles and see if it still renders correctly. If not, you've screwed things up badly and half of wikipedia has become unreadable. Go back to Template:SubatomicParticle/Symbol and Template:SubatomicParticle/link and undo your changes immediately. After you've undone the damage, you can try to find out what you did wrong and try again. (At some point we'll probably need to create some kind of sandbox for this.) If all is well, you can test your new particle by adding it to this page, this should be fairly simple and self explantory; just copy+paste an existing entry and modify the copy to display your new particle. Again, please put it in a logical place, grouping similar particles together. Let me know if you feel I need to create a step by step explanation of this as well. Please do not omit this step, because people will end up adding the same particle multiple times if they do not know it exists!