Template talk:Equation box 1
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||
|
Thumb right?
[edit]Thumbnail boxes for images have a "right" or "left" function that moves the image-box all the way to the right or left page border. In LaTeX or for this template "Equation Box 1" that works fine for the LEFT border. But what to do, if you'd like a boxed equation (or even a non-boxed one) to go to the RIGHT border, as (for example) part of the introductory infobox-like illustration of an article? Turns out this is hard. You can use enough colons in the Equation Box 1 template to move your equation "all the way over to the right" but if you do, you find that with some other browser your equation box is now not displayed where you wanted it, but is either too far right or not far enough. There is no function to get an equation to display all the way to the right border in any browser, that I can find.
Anybody know of a way to do this? SBHarris 01:35, 25 April 2013 (UTC)
- You could use a
< div >
like this:
- That is:
<div align="right">{{equation box 1|indent=|equation=<math>E=mc^2</math>}}</div>
- without indenting the line including the div. Is this what you mean? M∧Ŝc2ħεИτlk 05:31, 25 April 2013 (UTC)
"Indentation"
[edit]A leading colon is not a valid way of indenting anything. It introduces a description list, and using them this way is first of all invalid HTML (definitions must be preceded by at least one term), and second it is an accessibility error (see MOS:INDENTGAP). Hairy Dude (talk) 12:50, 3 March 2019 (UTC)
- Agree. We should use CSS for this kind of things. --Franklin Yu (talk) 18:26, 26 June 2019 (UTC)
- @Franklin Yu: We now do use CSS for this! (Since this edit.) Even if you as the user pass
:
or::
to theindent
parameter it is automatically translated to a CSS margin property; no definition list should be generated. User:GKFXtalk 18:49, 30 June 2019 (UTC)
- @Franklin Yu: We now do use CSS for this! (Since this edit.) Even if you as the user pass
Dark mode
[edit]The equation text is in white over a white background in the android app using the dark theme. You can see this visiting Definite matrix in the android app. Miguelsxvi (talk) 10:50, 31 May 2023 (UTC)
- @Ladsgroup also seems broken on https://wiki.riteme.site/wiki/Diffusion_equation ? Jon (WMF) (talk) 18:16, 19 July 2024 (UTC)
- Ignore - turns out the template accepts background colors so the article was the issue. I just fixed this. 🐸 Jdlrobson (talk) 02:24, 20 July 2024 (UTC)
- The
title
parameter defaults to black text and isn't configurable. This creates a black title on a black background as in Dirac Equation. JScherer-WMF (talk) 16:59, 22 July 2024 (UTC) - @Jdlrobson The change you made did not seem to help in Android dark mode for me. Johnjbarton (talk) 15:28, 14 August 2024 (UTC)
- The issue does not occur when the automatic dark mode feature of Chrome devtools is enabled on the device simulator views. So this isn't a simple CSS issue but something specific to Android. Johnjbarton (talk) 17:31, 14 August 2024 (UTC)
- The
- Ignore - turns out the template accepts background colors so the article was the issue. I just fixed this. 🐸 Jdlrobson (talk) 02:24, 20 July 2024 (UTC)
- Maybe we should give up on background color so just the box, its border, and the equation number. Johnjbarton (talk) 01:42, 15 August 2024 (UTC)
- Or alternatively, remove that equation box and replace it with TeX alongside the parameter
display="block"
. Yet, I have no idea why would somebody create this template. Dedhert.Jr (talk) 08:46, 15 August 2024 (UTC)- The template has about 400 uses so someone thinks it is useful. I think the idea is to make particular equations standout when in an article has many equations. Johnjbarton (talk) 15:06, 15 August 2024 (UTC)
- I removed the background-colour feature and verified that the equation appears no my Android phone now. Johnjbarton (talk) 16:19, 15 August 2024 (UTC)
- Or alternatively, remove that equation box and replace it with TeX alongside the parameter