Talk:LaTeX/Mathematics

Various talk
Instead of images to illustrate math you can use some wikitex. It is not perfect, but is good enough for an illustration. If somebody wants to revert they are free to do so.Juliusross 23:43, 31 October 2005 (UTC)


 * wikitex looks better (the primary reason for using latex) than .png's but if .png must be used, make sure that final size and the original size are the same. MPR

Any good introduction to latex will tell you *not* to use $$...$$ for displayed maths


 * why do you say this? Juliusross 12:42, 30 November 2005 (UTC)


 * according to this website the reason is that if an error was to occur while using the $ sign, it would give an incomprehensible message. (TKelly 23:22, 6 March 2006 (UTC))


 * and many people recommend not to use $$...$$ because it interferes with other functions. See for example.

Refering to subequations
Could someone write in the subequations section of the article how it is possible to refer to subequations, please? 128.214.205.5 (talk) 10:36, 20 March 2008 (UTC)
 * Check out LaTeX/Labels and Cross-referencing, where it describes this and shows examples. It doesn't show examples specifically to subequations, but the rules don't change. Using the existing example:


 * +[[User:Mwtoews|mt] ] 00:55, 24 March 2008 (UTC)

Math Symbol Index
An index or table(s) of math symbols such as would be a nice addition.
 * I tend to use w:Help:Displaying a formula for this. Perhaps it should be forked and included here. +mt  01:03, 24 February 2008 (UTC)

describing ams-math
Is it really a good idea to describe ams-math on it's own in a separate section or would it be more appropriate to describe the relevant features as the text goes along? I've added the multiline stuff about ams to the multiline equation environments already (not so much as an example but because I didn't notice the ams-math specific section). As a reference guide, were I to want to remember what I should use for multiline equations, I would look under multiline equations and not think of the ams-math section at first. This could push me to quickly get the wrong result. Thoughts? Basenga 05:59, 29 June 2006 (UTC)

AMS-math section
After teaching how LaTeX works, I think we should give some good guidelines about using it properly. As an example, I don't think there is any point in using {math} and {displaymath} environments if you are using the amsmath package, since you should use the {equation*}, it is more consistent with any other way of displaying math you should use. It wouldn't make sense to say "{displaymath} exists but don't use it", so I suggest: we could write a "Basic Mathematics" page teaching all that LaTeX can do without amsmath, then we make another page titled "Advanced Mathematics" teaching how to use all the features of amsmath and saying all the commands that is better to use when writing a document with a lot of Maths. I'm referring to \begin{equation*} instead of \begin{displaymath}, or \text{...} instead of \mbox{...}, etc. What do you think about it?? Alejo2083 19:19, 22 September 2006 (UTC)

Removed TODO points

 * introduce eqnarray from ?

all the environments discussed to insert formulas are enough, I think I have considered any possible situation. eqnarray is redundant if you use flalign and all the other environments.


 * show how to create large matrix from and

AMS matrix environments are enough, there is no difference between big or small matrix, LaTeX takes care of it. Andy Roberts used the array anvironment, but it is pointless if you can use the ones of AMS.

I agree about inserting the Mathematical symbols (the only point left in the TODO list), but we'd better add them in a different page, this one is long enough. Alessio Damato 18:13, 19 January 2007 (UTC)


 * By "large" matrix I ment a matrix with dots meaning omitted columns/rows. It's not obvious how to make these dots and you use them very often. --Derbeth talk 19:35, 19 January 2007 (UTC)


 * ah, you meant that. Well, there isn't any particular formatting for it, you just have to use the right symbols in the right places (such as \cdots). Anyway, if it's not clear from the context, I will add an example as soon as I have some time. Alessio Damato 13:40, 21 January 2007 (UTC)


 * The point is that \vdots (I don't remember exact code) hasn't been introduced in this tutorial). --Derbeth talk 13:51, 21 January 2007 (UTC)


 * I added something about it. It is already better than the original version by Andy Roberts, but I can think I can add few things more. Any suggestion is welcome :-) Alessio Damato 14:09, 22 January 2007 (UTC)

properly scaled integral
I don't know if this is an issue in the latex wikipedia uses, but regular latex on Linux doesn't scale the \int symbol to fit the equation it refers to. If anyone knows how to do this, please add it to the article. Thanks. --64.81.59.211 (talk) 22:05, 6 December 2007 (UTC)


 * it's not meant to. Moreover, \int is just a symbol with no argument, so it doesn't refer to anything and couldn't be scaled according to anything. I know that other programs do scale the integral symbol to fit the argument, but it's not such a good idea: if you write several formulae, the scaled integral would look different on each formula, that's definitely not elegant. If LaTeX does it by default, it might be the best choice (otherwise it would have been implemented differently). If you want to scale the integral, you can use modifiers such as \big and \huge to do it by hand. Alessio Damato (talk) 10:39, 9 December 2007 (UTC)


 * The \big and \huge commands don't work on a \int sign. If you want to force an \int to take on it's normally larger size (for example whilst in-line or within an array in an equation) then place \displaystyle before the \int


 * You can use, e.g., \mathlarger{\int}, which would make the symbol larger than its usual size.

set symbols
Just letting whoever edits this page, the \mathbb didn't work here without amssymb loaded

but still, thanks for the great docs :) --75.34.28.161 (talk) 02:32, 25 January 2008 (UTC)


 * I'll point it out in the document, thanks Alessio Damato (talk) 16:32, 26 January 2008 (UTC)

Negative space
While I'm pretty sure that negative space is there to do something, the example concerning binomial is a bit overstretched. There is a "\binom" macro. Are there not a proper example for negative space? --213.229.135.66 (talk) 15:06, 10 March 2008 (UTC) \pmod, try it and see for yourself 94.208.111.0 (talk) 20:07, 30 October 2008 (UTC)

Position of the Mathematical Symbols
Should the symbols be included in the text chapter or as an appendix? --ElectroKid (talk) 16:27, 11 April 2008 (UTC)

align or flalign
Other webpages suggest using align for multiline math. What exactly is the difference between flalign and align? The documentation doesn't say, but my testing seems to indicate that flaalign forces multicolumn displays (i.e. where more than two & symbols are used per line) to be the far-left and far-right of the screen. Is that correct? If so, I think it would be more appropriate to use align as the recommended environment.-3mta3 (talk) 16:47, 18 April 2008 (UTC)

Also, I think the extended detail should be moved to a subpage. It is rather repetitive at the moment -3mta3 (talk) 17:38, 18 April 2008 (UTC)

I think there is a typo in the flalign examples in the sections with names that start with "Several formulas, any alignment". They read like this: foo = bar = = baz = = quux

But, shouldn't the equal sign either come at the end of the line or start of the next line instead of both?

mathit
We should mention   somewhere.

Split page
This page is becoming unwieldy, and I have created a new page called LaTeX/Advanced Mathematics, and started to move some of the content over there. Any ideas on what should be kept on each page? -3mta3 (talk) 15:56, 9 November 2008 (UTC)

Array Example
The begin array {l l} looks a lot like {1 1}. Can this be fixed somehow? —Preceding unsigned comment added by 66.167.250.209 (discuss • contribs) 00:53, 1 March 2009


 * It looks all right in my browser (Opera on Linux). Probably just a question of fonts. You can always be bold and add or reference a note on alignment options. --Swift (talk) 04:13, 1 March 2009 (UTC)

Partial derivative symbol
I think   should be included on this page.

Discussion of integrals is problematic
The d before the integration variable is usually (most physics texts) italicized like the rest of the equation. One could use units (e.g. km) to illustrate the usage of \mathrm... Boeremoer (talk) 20:04, 23 November 2009 (UTC)

Indeed---my math texts also use normal math-mode text. --Lucasreddinger (talk) 07:04, 8 December 2009 (UTC)

Agreed. Although I know of some publications that do the \mathrm{d}, the 'house style' of the mathematics research journal that I am an editor for (and, for example, the American Math Soc journals) do not do this.

Extend closing root
The closing root does not work correctly when specifying a magnitude. While this is explained in the text, the following code allows the magnitude to be specified and displayed correctly:

This is a slightly refined version of the code presented in the roots section and adds a small space after the closing tick, which helps especially when there is a closing parenthesis touching the sqrt. If the community agrees that this version works, then it ought to replace the code currently in the roots section.

\Alpha, \Beta ...
I do believe the greek letters whitch are equal to our characters aren't made in LaTeX. If you want to use the \Alpha command, you get an error, you have to use A. I saw this by translating the page to dutch. --Sanderd17 (talk) 16:01, 18 January 2010 (UTC)


 * This is already mentioned on the page: LaTeX/Mathematics. --Swift (talk) 17:35, 18 January 2010 (UTC)


 * I think he refers to section LaTeX/Mathematics. It confused me as well. It is good that it is mentioned in LaTeX/Mathematics, but should still be corrected in section LaTeX/Mathematics. -- Matthias


 * I agree, this is an important error that should be corrected both in Greek Letters and in the List of Mathematical Symbols. For a reference, see ftp://ftp.di.uminho.pt/pub/ctan/info/symbols/comprehensive/symbols-a4.pdf, page 50.

\mathrm vs. \text
This suggests using \text to put text in equations. But the examples I have seen of actual math in Wikipedia (i.e., when editing the article) use \mathrm. Are these equivalent, or if not, which should be used when? Asmeurer (talk) 04:20, 12 December 2010 (UTC)
 * It's a mess. \mathrm changes the typeface and stays in mathmode and so normally should not be used in order to set text, for example it treats "-" as minus instead of hyphen. \text is the Latex solution, but does not work correctly in mediawiki, as it cannot display umlauts, whereas umlauts can be emulated in mathmode via the \ddot notation. \mbox works with umlauts, but for sure also has issues.
 * \mu\mathrm{-fast\;\ddot uberall} $$\quad\leftrightarrow\quad\mu\mathrm{-fast\;\ddot uberall} $$
 * \mu\mbox{-fast überall} $$\quad\leftrightarrow\quad\mu\mbox{-fast überall}$$
 * \mu\text{-fast ueberall} $$\quad\leftrightarrow\quad\mu\text{-fast ueberall} $$
 * --Erzbischof (talk) 11:16, 5 January 2011 (UTC)

"closed" roots
The trick to make square root signs "close" over their contents (http://en.wikibooks.org/wiki/LaTeX/Mathematics#Roots) _can_ be made to work with multiple roots. See: http://tex.stackexchange.com/questions/29834/closed-square-root-symbol Maybe this can be updated?

\mathrm vs. \textup
Many times I read that "symbol xyz should be typeset upright to make clear it's not an ordinary variable" (e.g., for the differential d), and then the example goes on to use \mathrm. A better approach would be to use \textup which expresses exactly what you want to have, namely upright text. In addition to clarity, the added advantage is that -- unlike \mathrm -- it doesn't change other properties of the font and would work properly in, e.g., sans-serif texts.

Unfortunately, Mediawiki doesn't seem to support \textup now (2012-06-07).

Spacing in simple slanted fractions
I'd suggest adding a negative space after a numenator in a slanted fraction. That would be

versus

The former one seems to me somewhat nicer (even that sfrac/nicefrac). 78.109.185.204 (discuss) 01:46, 28 August 2012 (UTC)

Isn't the equation environment different from equation*?
The article barely mentions the equation environment, which I believe is a Latex environment. Yet the equation* environment is prominent even though it's an amsmath exclusive. The article should clearly distinguish between them. 71.163.58.61 (discuss) 23:16, 28 September 2012 (UTC)

Colors
I added the color section to this, but couldn't add my parts on fixing the spacing around parts of equations, because it looks like Wikibooks doesn't support things like \mathbin. Any ideas on improving this section would be helpful. Ntypanski (discuss • contribs) 23:49, 30 October 2012 (UTC)

Limits example doesn't render as shown here on my MikTeX 2.9
Under LaTeX/Mathematics an example is given for using \lim:

but I get something like

unless I do

I'm happy to correct/update this, but just wanted to check that it's not a quirk of my setup (some unusual package perhaps). The behvaiour is the same with and without the amsmath package, which is the only explicitly maths-related package I call.

Also this post as stackexchange implies that what I need to do is right: 

--ChrisHodgesUK (discuss • contribs) 15:25, 8 August 2013 (UTC)

The answer to this might be you are in an inline formula, where the subscript is placed as subscript. To get the maths, are you using \(…\) or $…$, or \[…\] or $$…$$? If you are using one of the first two, see if \displaystyle before \lim has the same effect as \limits after it. If it does, the answer is you are using inline math, which is not displayed, and has no default underscripts but only subscripts. \limits forces the underscript. \displaystyle forces the math to be displayed rather than inline. $$…$$ \[…\] mean displayed math, so see if \lim with neither \limits nor \displaystyle in there gets the expected output. If everything goes as I predicted, your question is answered. Otherwise, try asking it on stack exchange. Btw \limits is obligatory with integrals even in displayed math. MGorrone (discuss • contribs) 14:11, 28 December 2013 (UTC)

\nexists isn't in mathtools anymore
At least on my PC, latex complains that \nexists is an undefined control sequence. --Zilti (discuss • contribs) 17:05, 29 September 2013 (UTC)

\mathscr
The \mathscr command from the mathrsfs package covers only uppercase letters. For lowercase letters, you must define a math font, otherwise the letters will not get typesetted, but just completely vanish from the output pdf. For example, you can add

\usepackage{unicode-math}

\setmathfont{XITS Math}

\setmathfont[version=setB,StylisticSet=1]{XITS Math}

to the preamble. Of course, supposing you have XITS Math installed on you computer. MGorrone (discuss • contribs) 15:00, 28 December 2013 (UTC)

Reference to Text Formatting (\textbf)
Section LaTeX/Mathematics refers to in LaTeX/Text Formatting, which is not explained there (anymore?) --Azaël (discuss • contribs) 19:13, 3 February 2015 (UTC)

Typesetting intervals
As far as I notice there is absolutely no difference between the examples in 'Typesetting intervals'. Is this a wiki issue or did I miss anything?--129.69.61.80 (discuss) 11:27, 3 March 2015 (UTC)
 * Partially confirmed. I downloaded the three images and diff'ed them.    and   are byte-by-byte-identical.    is indeed different, with the comma slightly offset to the right.  I haven't tried with DVI/PDF, but I think we can say this is not important for PNG output.  Anyways, I doubt whether this make a difference for average users.  If we end up deciding to keep it, at least we should move it to Advanced Mathematics section(chapter?).  sheep0x (discuss • contribs) 19:04, 23 February 2016 (UTC)

Typesettings intervals with forthcoming SimpleMathAjax extension or \mathop malfunctionning with Math extension
It seems that the following command

should render as {{LaTeX/Example|code= \mathop{\iiint\limits_{\Pi-\varpi} u(y){\partial a(y) \over \partial y_i}\,\mathrm{d} y_i $$\iiint\limits_{\Pi-\varpi} u(y){\partial a(y) \over \partial y_i}\,\mathrm{d} y_i$$ }} and it doesn't. The mathop operand is not taken into account in current Math extension, but it seems that it will work with the next SimpleMathAjax extension (as far as I have tested it successfully on more updated wiki).--Nbrouard (discuss • contribs) 18:00, 27 April 2016 (UTC)
 * render=

Math coding (Hyperbolic function)
Can someone finish the job and code  ? יהודה שמחה ולדמן (discuss • contribs) 14:41, 9 November 2016 (UTC)

Laplace Operator vs Delta
The symbols for Delta and for the laplace operator both look like a triangle pointing up, but should look different when both are used in the same text. There are some solutions to this problem posted over on stackexchange: https://tex.stackexchange.com/questions/76553/correct-symbol-for-the-laplace-operator-delta

Simultaneous equation symbol {
How can I use a simultaneous equation symbol, {? Ljyfree1004 (discuss • contribs) 12:58, 2 January 2021 (UTC)

Power (superscript) and indices (subscript): always use curly braces with commands?
LaTeX/Mathematics currently says that can be used as an exponent without curly braces:

But even though there are no errors, shouldn't this be strongly discouraged due to potential breakage in the future, just like what has been done with by beamer? See this discussion in the tex-live list. — Vincent Lefèvre (discuss • contribs) 10:46, 18 February 2022 (UTC)