8

This is my first time here and I did my best to figure out if such a question is in place here. If I missed something I apologize.

My questions is how can I mark a power set in the lyx document editor?

For example: I'd like to write P(A) when A represents a set, but in the special marking normally used for the power set. I assume there should be a '\shortcut' kind of thing, but I'm new to lyx and can't find one.

Thanks in advance...

4
  • Welcome to TeX.SX! You have been migrated here. Please register to this site with the same account as on mathoverflow.net! Could you please explain a bit, how you would like the P(A) to look like? If necessary, draw a picture. I can't help you on LyX, but many people will be able to write some LaTeX \shortcut (called macro) for you.
    – LaRiFaRi
    Commented Nov 24, 2014 at 13:49
  • 5
    There are several common ways to denote power set, for example $\mathcal{P}(A)$, even plain $P(A)$ is fine. Just please do not abuse for this purpose the Weierstraß elliptic function symbol $\wp$, as many clueless people do. Commented Nov 24, 2014 at 15:20
  • 2
    Thank you both very much. @EmilJeřábek, $\mathcal{P}(A)$ was exactly what I was looking for - Would make a valid answer... That's how it looks in my homework pages. @LaRiFaRi, thanks for naming the macro for me, this will help me a lot in future questions. I was afraid this group didn't like ignorant LYX users as myself, Thanks for the nice welcome... Commented Nov 25, 2014 at 9:49
  • 1
    @EmilJeřábek consider transforming your comment into an answer. It will make it more noticeable for others (and you will get the reputation you deserve). Commented Apr 2, 2017 at 9:19

3 Answers 3

11

I find that $\mathcal{P} (\mathbb{A})$ gives me the result I want:

rendered

3

$\frak{P} (\mathbb{A})$ also works.

1

Let's assume you want the output of your power set to resemble something like this:

enter image description here

The above requires amssymb to show the special P. For this, "load always" Document > Settings > Math Options > amssymb:

enter image description here

Now, there are a couple of ways to do this:

  1. Pure LyX

    At the start of your document, Insert > Math > Macro... For the newcommandname, type powerset. For the TeX component of the math macro, type \mathbb P, , (\#1). Leave the LyX component of the math macro empty.

    Now when you type a regular (inline) math formula (Insert > Math > Inline Formula), typing \powerset changes the input to use your macro:

    enter image description here

  2. Pure LaTeX

    In your Document > Settings... > LaTeX Preamble, add

    \newcommand{\powerset}[1]{\mathbb{P}(#1)}
    

    Within any (inline) math formula, insert an ERT

    enter image description here

For more information, see How to enter Math Macros.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .