Home > math mode > latex error mathbb allowed only in math mode

Latex Error Mathbb Allowed Only In Math Mode

Contents

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About

\hat Allowed Only In Math Mode

Us Learn more about Stack Overflow the company Business Learn more about hiring developers math mode latex or posting ads with us TeX - LaTeX Questions Tags Users Badges Unanswered Ask Question _ TeX - LaTeX Stack Exchange mathcal latex is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question

Missing $ Inserted

Anybody can answer The best answers are voted up and rise to the top What is Math Mode up vote 3 down vote favorite I'm new to Tex and tried to enter an equation using \mathbb. I received a prompt LaTeX Error: \mathbb allowed only in math mode. See the LaTeX manual or LaTeX Companion for explanation. I thought I would try here for an explanation math-mode share|improve this question

In Latex

asked Apr 12 '11 at 20:20 Brig 118114 1 Phil's answer below is correct, but a further tip: the macro \mathbb typesets capital letters as "black-board bold" symbols, such as the symbol ℝ which usually denotes the set of real numbers (and which is produced by \mathbb{R} in math mode). –Niel de Beaudrap Apr 14 '11 at 6:48 add a comment| 2 Answers 2 active oldest votes up vote 7 down vote accepted You enter math mode by typing a dollar sign $, and you leave math mode by typing another dollar sign $. You should take a look at Chapter 3 of The Not So Short Introduction to LaTeX share|improve this answer answered Apr 12 '11 at 20:27 Phil Hirschhorn 5,8291024 add a comment| up vote 2 down vote I guess that an even better way to enter math mode is to use \( and \), as discussed in this answer. share|improve this answer answered Aug 30 '11 at 9:37 Dror 9,0941059130 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discar

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss latex matrix the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us TeX - LaTeX Questions Tags Users Badges Unanswered Ask Question _ TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; http://tex.stackexchange.com/questions/15662/what-is-math-mode it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top “\bar allowed only in math mode” error up vote 2 down vote favorite When I run \begin{align*} \textit{m}(A) &=a&, \\ \textit{\bar{A}} &=1-a& \\ \textit{m}(B) &=0& &\text{for} B \neq A \text{ or} http://tex.stackexchange.com/questions/112360/bar-allowed-only-in-math-mode-error B \neq \bar{A} \end{align*} I get the following error: ! Package amsmath Error: \bar allowed only in math mode.See the amsmath package documentation for explanation.Type H for immediate help.... \end{align} Using \overline instead of \bar doesn't help either. What command should I use to get an overline? math-mode amsmath share|improve this question edited May 4 '13 at 13:01 Jubobs 34.7k10122197 asked May 4 '13 at 12:20 Pratap Dheeraj 2822715 add a comment| 2 Answers 2 active oldest votes up vote 5 down vote accepted There is no need to use \textit (actually it's wrong): \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} m(A) &= a, \\ \bar{A} &= 1-a,\\ m(B) &= 0,\quad\text{for $B \neq A$ or $B \neq \bar{A}$} \end{align*} \end{document} Notice how math mode is used inside \text to get spacing right without doing strange things. I don't think it's good to move the textual condition much to the right as you seem to want. share|improve this answer answered May 4 '13 at 12:33 egreg 514k5913792437 add a comment| up vote 4 down vote \bar is not accepted because you have put

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or http://tex.stackexchange.com/questions/302354/bar-only-allowed-in-math-mode-error posting ads with us TeX - LaTeX Questions Tags Users Badges Unanswered Ask Question _ TeX - http://www.tug.org/pipermail/tug-support/2002-June/000934.html LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top \bar only allowed in math mode error up vote 4 down vote favorite I am trying math mode to type up an equation for my discrete math class but I keep on getting the "\bar allowed only in math mode" error. My previous usage of \bar worked out fine. $p( \bar{E} \cap \bar{F}) = p( \bar{E \cup F}) = 1 - p(E \cup F) = 1 - p(E) - p(F) + p(E \cap F) = 1 - p(E) - p(F) + p(E)p(F\) = (1-p(E))(1-p(F)) = p( \bar{E})p( \bar{F})$ math-mode amsmath share|improve this question edited Apr 4 at 4:14 Au101 3,24711033 asked Apr allowed only in 4 at 4:07 fairyfantasy 232 A warm welcome to TeX.SE! –A Feldman Apr 4 at 4:55 add a comment| 1 Answer 1 active oldest votes up vote 4 down vote accepted Your problem is: $p( \bar{E} \cap \bar{F}) = p( \bar{E \cup F}) = 1 - p(E \cup F) = 1 - p(E) - p(F) + p(E \cap F) = 1 - p(E) - p(F) + % ------------------- p(E)p(F\) %right here % ------------------- = (1-p(E))(1-p(F)) = p( \bar{E})p( \bar{F})$ p(E)p(F\). That's your problem. \) exits math mode. \( ... \) is an alternative to $ ... $. Where you've put \), it's exited math mode. And then when you have \bar afterwards, you're outside of math mode, and: \bar allowed only in math mode If we correct that, then it compiles, however, \bar{E \cup F} is not going to work out very well, you probably want \overline{E \cup F} Might I also recommend something more like: \begin{flalign*} p(\bar{E} \cap \bar{F}) &= p(\,\overline{E \cup F}\,) \\[\parskip] &= 1 - p(E \cup F) \\[\parskip] &= 1 - p(E) - p(F) + p(E \cap F) \\[\parskip] &= 1 - p(E) - p(F) + p(E)p(F) \\[\parskip] &= (1-p(E))(1-p(F)) \\[\parskip] &= p(\bar{E})p(\bar{F}) \end{flalign*} share|improve this answer edited Apr 4 at 4:34 answered Apr 4 at 4:16 Au101 3,24711033 Thanks so much! –fairyfantasy Apr 4 at 4:26 1 @fairyfantasy no problem, it's an easy mistake to make, if you invest in a good editor, hopefully the mistake will jump out more ea

#198 - 1 msg Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Dear TUG-support: I'm sorry to disturb you. I'm now writting the thesis. My advisor suggest me to put one whole chapter as appendix. The problem with me is that if I put the chapter as normal one , it complies well, if I use the following commands: \appendix \chapter{my appendix} \input{chapte_nine} The following error came out: ! LaTeX Error: \mathrm allowed only in math mode. I checked and found that .e.g. \textit{fully connected neural network}, if I don't use \textit, it works, if I use, then the above error comes out. SO what's the problem? Thank you for your time! Sincerely yours, S.yu __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com Previous message: [tug-support] Installing a new bst file Next message: [tug-support] Re: tug-support digest, Vol 1 #198 - 1 msg Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] More information about the tug-support mailing list

 

Related content

latex error mathcal allowed only in math mode

Latex Error Mathcal Allowed Only In Math Mode table id toc tbody tr td div id toctitle Contents div ul li a href Math Mode Latex a li li a href In Latex a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have relatedl Meta Discuss the workings and policies of this site About hat allowed only in math mode Us Learn more about Stack Overflow the company Business Learn more about hiring developers p h id Math Mode Latex p or posting ads

package amsmath error hat allowed only in math mode

Package Amsmath Error Hat Allowed Only In Math Mode table id toc tbody tr td div id toctitle Contents div ul li a href Package Amsmath Error Erroneous Nesting Of Equation Structures Align a li li a href In Latex a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss relatedl the workings and policies of this site About Us Learn more mathit allowed only in math mode about Stack Overflow the company Business Learn more about hiring developers or posting ads