Wikipedia:Reference desk/Archives/Mathematics/2012 November 27

= November 27 =

I Can't Post!!!
The LaTeX code that I have input as part of a post that I have been working on for this reference desk won't display in the section creator's preview area most of the time!!! It doesn't matter whether I set my "Appearance → Math" preferences to either "Always render PNG" or use "MathJax (experimental; best for most browsers)" because the former setting results in an error message of "Failed to parse (Lexing error):" followed by my original LaTeX and the latter surrounds my code in dollar signs without rendering it. I've been trying to use my family's iMac, which is a mid-2007, 24" model running Safari 5.0.6 over the Intel version of Mac OS X 10.5.8 Leopard without a local LaTeX installation, to post my question for a few days now, so if anyone can help me figure out what's going on, that would be marvelous! BCG999 Out.   (talk) 20:30, 27 November 2012 (UTC)
 * There might be a problem with the LaTeX code your using. Wikipedia only supports a subset of LaTeX code and does not suport any packages. See Help:Formula for wikipedia specific LaTex help. If you post the latex your using here, either in plain text or with errors we might be able to help you.--Salix (talk): 21:04, 27 November 2012 (UTC)
 * I wasn't using any packages, and LaTeX usually renders for me even though I don't personally have it installed on my family's machine, though that probably doesn't matter and is the case because Wikipedia most likely has LaTeX installed on its servers. Here's the code that I was using in the other post that I was going to add to the reference desk as a new question:
 * $$P(E)={}^{\[\text{Number of outcomes in event}\]}/{}_{\[\text{Total number of outcomes in sample space}\]}$$
 * $$\[\text{Rolling an even number}\]=\{2, 4, 6\}$$
 * $$\[\text{Sample space over a 6-sided die}\]=\{1, 2, 3, 4, 5, 6\}$$
 * $$\[\text{Number of outcomes in event}\]$$
 * $$\[Total number of outcomes in sample space}\]$$

\[\text{Number of outcomes in event}\]=\|A\| \[Total number of outcomes in sample space}\]=\|S\| $$


 * Shouldn't this render fine?


 * BCG999 Out.  (talk) 21:58, 27 November 2012 (UTC)


 * Firstly you need \left[ or just [ rather than \[ . there also a couple of unmatched {} brackets. The following should render fine.--Salix (talk): 22:25, 27 November 2012 (UTC)
 * $$P(E)={}^{\left[\text{Number of outcomes in event}\right]}/{}_{\left[\text{Total number of outcomes in sample space}\right]}$$
 * $$\left[\text{Rolling an even number}\right]=\{2, 4, 6\}$$
 * $$\left[\text{Sample space over a 6-sided die}\right]=\{1, 2, 3, 4, 5, 6\}$$
 * $$\left[\text{Number of outcomes in event}\right]$$
 * $$\left[\text{Total number of outcomes in sample space}\right]$$

\left[\text{Number of outcomes in event}\right]=\|A\| \left[\text{Total number of outcomes in sample space}\right]=\|S\| $$


 * Thanks a lot, Salix; I should have double checked my code manually instead of just selecting the "Fix Math" command provided by WikiEd. I'll be posting my actual question with this revised LaTeX code soon, thanks again to you.


 * BCG999 Out.  (talk) 00:23, 28 November 2012 (UTC)