Template talk:EquationRef

Space before equations
Hello, very recently I got interested in the EquationRef template: it would be interesting to add a bit of space (say, the size of a TAB, for example) even when the equation number (or reference) is placed before the equation. Is it possible to modify according to this requirement? Best Regards, Daniele.tampieri (talk) 19:05, 25 June 2009 (UTC)
 * What's wrong with  :$$ $$x^2-2x+1=0$$ ? It renders as
 * $$ $$x^2-2x+1=0$$
 * there's space (5 of them) after the label, as requested. Alternatively, you can put the spaces outside the template, as in  :$$    $$x^2-2x+1=0$$ . That gives you:
 * $$    $$x^2-2x+1=0$$
 * Do either of those work for you? &mdash;TedPavlic (talk) 20:49, 25 June 2009 (UTC)
 * Well, they are just fine: thank you. Daniele.tampieri (talk) 06:03, 26 June 2009 (UTC)

Invalid HTML
When EquationRef is used with the same name multiple times, it results in duplicate HTML ids and invalid HTML output. Examples: ---— Gadget850 (Ed)  talk 15:35, 28 September 2011 (UTC)

Duplicated &lt;cite&gt; tags
Also when this template is used with NumBlk, it causes the &lt;cite&gt; tag to prematurely be closed and reopened, also causing duplicate identifiers. Apparently it is because both templates are trying to add bold formatting.

Simplified wiki code: ""

HTML (spacing added): ""

I’m not sure if it’s a bug and Media Wiki should be able to handle it, or if it’s just an abuse of the markup. A workaround would be to use the option. Or you could give the id parameter to the &lt;span&gt; element and remove the &lt;cite&gt; tag; what’s the point of it anyway? Or remove the bold markup from this template. Vadmium (talk, contribs) 03:05, 13 June 2012 (UTC).
 * Fixed now. I've replace the  with a span style. So the two templates should nest well.--Salix alba (talk): 11:25, 15 February 2014 (UTC)

Automatic numbering possible?
Is it possible to automatically number the equations in the order they appear like in TEX?Ciro.santilli (talk) 08:47, 24 January 2012 (UTC)

Cite
This template is wrapped in . Under HTML5, which we will migrate to someday, is only for titles. Recommend that this be changed to. ---— Gadget850 (Ed)  talk 00:24, 26 January 2012 (UTC)
 * Fixed now. I've merged the and  into a single .--Salix alba (talk): 11:27, 15 February 2014 (UTC)

Error checking
Adding User:Gadget850/EquationRefErrors.js to your JS will show errors associated with these templates. For example: Additive synthesis equations 1 and 2 do not link to a matching EquationNote. ---— Gadget850 (Ed)  talk 00:28, 26 January 2012 (UTC)

Incompatability with Template:NumBlk
This was spotted at Wikipedia:VisualEditor/Feedback. There was an incompatibility of this template and NumBlk. Basically both used  to put the equation number in bold, but when nested you basically got

Which can either be interpreted as  (normal renderer) or   (VE).

I've changed the template to use an explicit style in span which should eliminate problems. I've also removed the  as its an incorrect usage of tag in html and put the id and style in the span.--Salix alba (talk): 11:16, 15 February 2014 (UTC)

Link to EquationNote
The combination of this template with EquationNote creates a link from EquationNote to EquationRef, as expected, but also a link back from EquationRef to EquationNote. The link back is not explained in the documentation, as far as I could see, and it is also rather surprising to me. Besides, the link back does not quite work if there are multiple instance of EquationNote refering to the same EquationRef. Therefore, I propose to remove the link back. -- Jitse Niesen (talk) 09:40, 4 September 2014 (UTC)


 * Having received no comments, I now made this change. -- Jitse Niesen (talk) 12:22, 6 September 2014 (UTC)

Incorrect italics
Why is the parenthesized digit italicized? That is not done in standard systems such as TeX, LaTeX, and MathJax? Michael Hardy (talk) 04:12, 4 December 2014 (UTC)

No bold?
To recent editors Mikhail_Ryazanov, Daviddwd and any others. Is there a version of this without the bold? I saw this being used in Carnot cycle for Figures, so have adopted it in Electron diffraction. The only partial issue is that the Bold is not exactly WP:MOS, apart from that it looks good. Any suggestions, or is there another template (I could not find one). Ldm1954 (talk) 21:25, 30 October 2023 (UTC)
 * There is without bold but with other problems (centering inconsistent with the usual layout; wrongly italicized number) and very small usage (I guess, all these should be weeded out). MOS:MATH doesn't tell anything about equation numbering, only referring to WP:MATH, which in turn recommends (see WP:DISPLAYTAG) just this set of, , . I suggest rising this issue about formatting at the MOS:MATH talk page (I'd support removing bold from both  and , as it's really unnecessary, unusual for mathematics/physics texts, and is indeed inconsistent with MOS:BOLD), then modify these templates accordingly. — Mikhail Ryazanov (talk) 22:25, 30 October 2023 (UTC)
 * Thanks. I am an archaic coder (Fortran 90) so I just used the template decoder at https://en.wikipedia.org/wiki/Special:ExpandTemplates to reverse engineer them, then used the css without the bold and better positioning for Figure links. Works nicely. Ldm1954 (talk) 02:15, 4 November 2023 (UTC)

Dark Mode Incompatibility
Some pages have equationref used in an equation box, like in Conditional entropy. In dark mode, the text colour stays black making it hard to read. Not sure if this is a problem with the equationref template or with Template:Equation box 1. StrategyPanda30 (talk) 00:50, 12 July 2024 (UTC)