Skip to main content
replaced http://tex.stackexchange.com/ with https://tex.stackexchange.com/
Source Link

My question is about declaring a "newcommand" with an option.

I have defined

\newcommand{\bforall}[2]{\forall #1\, (#2)} 

so that $\bforall{x}{x \in A}$ writes $\forall x (x \in A)$.

I would like some control over the brackets. Namely, I would like

\bforall[s]{x}{x \in A} 

to use square braces, and

\bforall[c]{x}{x \in A} 

to use curly braces.

How can this be accomplished?

I've search the forum and found 1/ Different command definitions with and without optional argumentDifferent command definitions with and without optional argument and 2/ Optional argument for newcommand?Optional argument for newcommand? and neither helped me.

My question is about declaring a "newcommand" with an option.

I have defined

\newcommand{\bforall}[2]{\forall #1\, (#2)} 

so that $\bforall{x}{x \in A}$ writes $\forall x (x \in A)$.

I would like some control over the brackets. Namely, I would like

\bforall[s]{x}{x \in A} 

to use square braces, and

\bforall[c]{x}{x \in A} 

to use curly braces.

How can this be accomplished?

I've search the forum and found 1/ Different command definitions with and without optional argument and 2/ Optional argument for newcommand? and neither helped me.

My question is about declaring a "newcommand" with an option.

I have defined

\newcommand{\bforall}[2]{\forall #1\, (#2)} 

so that $\bforall{x}{x \in A}$ writes $\forall x (x \in A)$.

I would like some control over the brackets. Namely, I would like

\bforall[s]{x}{x \in A} 

to use square braces, and

\bforall[c]{x}{x \in A} 

to use curly braces.

How can this be accomplished?

I've search the forum and found 1/ Different command definitions with and without optional argument and 2/ Optional argument for newcommand? and neither helped me.

improved formatting
Source Link
Sverre
  • 21.2k
  • 18
  • 96
  • 219

My question is about declaring a "newcommand" with an option.

I have defined

\newcommand{\bforall}[2]{\forall #1\, (#2)} 

so that $\bforall{x}{x \in A}$$\bforall{x}{x \in A}$ writes $\forall x (x \in A)$$\forall x (x \in A)$.

I would like some control over the brackets. Namely, I would like

\bforall[s]{x}{x \in A} 

to use square braces, and

\bforall[c]{x}{x \in A} 

to use curly braces.

How can this be accomplished?

I've search the forum and found 1/ Different command definitions with and without optional argument and 2/ Optional argument for newcommand? and neither helped me.

My question is about declaring a "newcommand" with an option.

I have defined

\newcommand{\bforall}[2]{\forall #1\, (#2)} 

so that $\bforall{x}{x \in A}$ writes $\forall x (x \in A)$.

I would like some control over the brackets. Namely, I would like

\bforall[s]{x}{x \in A} 

to use square braces, and

\bforall[c]{x}{x \in A} 

to use curly braces.

How can this be accomplished?

I've search the forum and found 1/ Different command definitions with and without optional argument and 2/ Optional argument for newcommand? and neither helped me.

My question is about declaring a "newcommand" with an option.

I have defined

\newcommand{\bforall}[2]{\forall #1\, (#2)} 

so that $\bforall{x}{x \in A}$ writes $\forall x (x \in A)$.

I would like some control over the brackets. Namely, I would like

\bforall[s]{x}{x \in A} 

to use square braces, and

\bforall[c]{x}{x \in A} 

to use curly braces.

How can this be accomplished?

I've search the forum and found 1/ Different command definitions with and without optional argument and 2/ Optional argument for newcommand? and neither helped me.

Source Link
vrbatim
  • 741
  • 1
  • 6
  • 14

\newcommand with options

My question is about declaring a "newcommand" with an option.

I have defined

\newcommand{\bforall}[2]{\forall #1\, (#2)} 

so that $\bforall{x}{x \in A}$ writes $\forall x (x \in A)$.

I would like some control over the brackets. Namely, I would like

\bforall[s]{x}{x \in A} 

to use square braces, and

\bforall[c]{x}{x \in A} 

to use curly braces.

How can this be accomplished?

I've search the forum and found 1/ Different command definitions with and without optional argument and 2/ Optional argument for newcommand? and neither helped me.