Jump to content

Help talk:Displaying a formula/Archive 3

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Lowercase sigmabot III (talk | contribs) at 03:03, 7 December 2018 (Archiving 2 discussion(s) from Help talk:Displaying a formula) (bot). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Archive 1Archive 2Archive 3

LaTeX Incorrect Rendering

(In reference to edit Special:Diff/811387351 on the triangular numbers page) Under what conditions could/would the LaTeX markup (eg "<math></math>") be displayed instead of the intended formula? Specifically, what could cause all the LaTeX markup in a single section of a page to render that way? (It's possible the issue was caused by my browser not fully loading the page) If possible, please point me to any "best practices" documentation for Wikipedia's LaTeX implemention. —Leopardpaw (talk) 09:02, 21 November 2017 (UTC)

@Leopardpaw: Your Math settings in the appearance section of the preferences would cause that if it were set to "LaTeX source", instead of MathML with SVG and PNG. —TheDJ (talkcontribs) 09:26, 21 November 2017 (UTC)
@TheDJ: Thank you for the quick response. In this case, I am primarily using a mobile browser (which may be part of the issue). It might have been due to a combination of interacting with Wikipedia's mobile site and my browser's setting, since as soon as I pushed my edit, the LaTeX rendered properly.

As a note, I did check the settings you referrenced, and it is set to render MathML. Thanks again. —Leopardpaw 09:48, 21 November 2017 (UTC)

@Leopardpaw what likely happened, is that when you added it, the page was rendered before the math fragment was finished. In theory this should not happen, but sometimes it does. Reloading the page, or making a WP:NULLEDIT usually fixes the problem. —TheDJ (talkcontribs) 09:47, 5 December 2017 (UTC)

Work around for LaTeX \phantom?

I intend to re-use given structures for displaying formulas by (slightly) modifying the existing content, without spending much effort on redesigning an elaborate alignment. This quick-and-dirty method seems reasonable to me, especially when considering the rate of acceptance for changes in WP. Cleaning up LaTeX-source may be scheduled for times after establishing content, possibly carried out by expert gnomes.

Since I am no expert in LaTeX, I humbly ask for cheap tricks, possibly saving me to, e.g., dig into arrays with elaborate aligning. Best regards, Purgy (talk) 09:08, 5 December 2017 (UTC)

Do you have an example of the expression you would like to display. --Salix alba (talk): 09:36, 5 December 2017 (UTC)
@Purgy Purgatorio Note that we don't support full LaTeX, only the math subset of LaTeX (specifically amsmath). —TheDJ (talkcontribs) 09:50, 5 December 2017 (UTC)
We don't even fully support amsmath: \genfrac, \substack, and \operatorname* all don't work, for example. –Deacon Vorbis (carbon • videos) 13:46, 5 December 2017 (UTC)
... yes, I got to learn this already (\dddots -> \overset), nevertheless I ask the experts for some work around. Purgy (talk) 19:50, 5 December 2017 (UTC)

I would enjoy most a generic answer to Howto mimic \phantom in WP?, but I do understand that this is maybe too much or meaningless to ask for. The last encounter with this problem was the following:

Having this:

and wanting something, approximated by this:

but not by using the ridiculous and unsatisfactory "\;\;\" but rather "\phantom {-}", or possibly "\phantom {{}-}". Aligning with the rude "&" did not work for me because of the minimally introduced whitespace, and \mspace does not work either. I mused about this already in other environments, but started to ask around on this occasion. As said, I am no expert, but really, I do like experts' answers. Purgy (talk) 19:50, 5 December 2017 (UTC)

Well, \phantom would certainly be nice to have for other things too, but here, you can achieve the same effect using the array environment, which is essentially what cases does. (Note, use \text{} here, not \mbox{}).
Deacon Vorbis (carbon • videos) 20:22, 5 December 2017 (UTC)
Thank you for having done the work, which I so eagerly strive to avoid. As mentioned in the thread starter I search for a quick-and-dirty method to re-use, as extensively as possibly, existing structures and definitely want to avoid re-casting the whole environment.
Mournfully, by your suggestion, I see my chances, for some artifice of \LaTex (you cannot have even this in its full glory) to trick WP-rendering to my desires, dramatically degrading. Any more sages around, please? Purgy (talk) 08:42, 6 December 2017 (UTC)