User:Jkasd/Sandbox

From Wikipedia, the free encyclopedia

I created Template:EquationRef and Template:EquationNote, in response to silly rabbit's question on WT:WPM. Let's say that you have a lot of equations in an article, and that you want to add a note about a certain one at the end.

Contents

[edit] Basic use

For example, to create this:

[1] 2 = 2

use this:

:{{EquationRef|twoplustwo}} <math> 2 = 2 </math>

The twoplustwo, is an id tag for a link at the bottom of the page. Each number links to an ==Equations== section at the bottom of the page.

[edit] Some examples

The EquationRef template can go before anything you would like to use as an equation.

[2] Euler's identity
[3] Jkasd 14:52, 20 May 2008 (UTC)
[4]  - \frac {\hbar ^2}{2m} \frac {d ^2 \psi}{dx^2} = E \psi

[edit] Numbers

Every equation is automatically numbered.

[edit] Recycling

If you want to reuse an equation, just use the same id tag. (Note: does not work yet.) [5] 2 = 2

[edit] Using Notes

At the bottom of the page, you can write notes about each equation using the EquationNote template. I hope to add a way to make it automatically list all of them, like {{reflist}} .
If I implement this, you would add the note like this:
{{EquationRef|Euler|This equation is also known as [[Euler's identity]].}}

[edit] A little bug

The notes will still link to the proper equation, but will be numbered wrong, if you don't put them in the same order as the equations.

[edit] Equations

[{{{2}}}]  Known since ancient times, this identity is essential for proving the fact that... [{{{2}}}]  To make this note, I used {{EquationNote|Euler}} . Make sure to use the exact same id tag. [{{{2}}}]  If you click on the little arrow to the left, it will take you up to the corresponding equation. [{{{2}}}]  See Schrodinger's equation. [{{{2}}}]  Not supposed to be here. At least it still links to the first one.

Hopefully this will be sufficient for most purposes, please report in bugs or recommendations on my page. If you don't like how it looks, I could try changing it.