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...

  • 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 Nov 24 '14 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. – Emil Jeřábek supports Monica Nov 24 '14 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... – Yekhezkel Yovel Nov 25 '14 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). – Stefan van den Akker Apr 2 '17 at 9:19

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


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


    Within any (inline) math formula, insert an ERT

    enter image description here

For more information, see How to enter Math Macros.


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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.