# How do I create the universe of discourse symbol with LyX?

I've been using OpenOffice and/or MS Word to do my college assignments, but since I started this new discrete math course, I'm finding myself very annoyed with the math formula options in those programs. I learned about LaTeX and figured it would be my best option. Since I really just want to get my college assignments done with it and not use it for printing books I've written or anything, I decided to go with LyX. It has a quick and easy preview option, and isn't so different from what I'm used to. I still can't find a way to make the fancy, cursive script "U" that represents universe or universe of discourse that is used in set theory. Is there a specific package I need, or did I just miss it somehow. Also, if I do need a new package, how is that even done with LyX. Anyone with assistance has my gratitude.

-
Insert an ERT and type $\mathcal{U}$. You'll notice the difference in the output (once you compile). –  Werner Jan 28 '13 at 21:29
That gives me an italicized lowercase u after previewing it in a PDF. What I'm looking for is a capital U that looks more like it was written in cursive. –  Dave Jan 28 '13 at 21:32
a more cursive script font is provided with \usepackage{mathrsfs}. (this is "ralph smith's formal script".) –  barbara beeton Jan 28 '13 at 21:35
@Dave: You need to use a capital U, not a lowercase u. Alternatively, edit your preamble (Document > Settings ... > LaTeX preamble) and add \usepackage{mathrsfs} (as suggested by barbara), which will change \mathcal to be more cursive. –  Werner Jan 28 '13 at 21:37
@egreg maybe not. I think this question should be reworded to "How to write math symbols/formulas in LyX"... –  e-birk Jan 28 '13 at 22:54

One advantage of LyX over LaTeX is that mathematical formulas can be displayed quite similar to as the will appear in the PDF.

• To type a math formula or symbol open a "math area" by <Control>-m or by the menu item "Insert" > "Math" > "Inline Formula". You will see a blue rectangle with pink edges and a new toolbar will appear. (If not see menu "View" > "Toolbars" > "Math Panel (auto)".)

• The fourth botton of this toolbar has four capital A's (one in black, three of them in blue). Click on it and find a list of different styles.

• Choose "Italic - \mathit" or "Calligraphic - \mathcal" or ... "Formal Script - \mathscr" to meet your needs... Type your letter U.

Note: LyX will take care which package to include. There is no need for "\usepackage" in this case.

(By the way, after typing "U", "right cursor key" once will get you out of the new font style and you can continue with normal math style. A second "right cursor key" will leave the math mode.)

-
One of the advantages of LaTeX over LyX is that you don't have blue rectangles and infinitely many menu entries. ;-) –  egreg Jan 28 '13 at 22:56
@egreg Let Dave, who is writing about set theory, decide whether the menu entries of LyX form an infinite set ;-) –  e-birk Jan 28 '13 at 23:08
If you want math to appear exactly how it will appear in PDF, go to Tools > Preferences > Display and set Instant Preview to "on". –  scottkosty Jan 29 '13 at 4:56