Skip to main content
Removed thanks + signature.
Source Link
Werner
  • 625.1k
  • 145
  • 1.5k
  • 2.4k

I want to make macro which do not require curly brackets to accepts an argument. Lets invent an example. Say I want a macro which accepts an optional argument f and an argumentx:

\dd[f]{x} 

And which is equivalent to writing:

\frac{\mathrm{d} f }{\mathrm{d} x } 

The question is, can make a macro such that iI dont have to write the brackets, but which will still accept the argument?

It would be very conventient if I could avoid using the brackets. Something like this would be excellent:

\dd f,x 

Is there any way of avoiding writing the brackets? Thank you for your time.

Kind regards, Marius

I want to make macro which do not require curly brackets to accepts an argument. Lets invent an example. Say I want a macro which accepts an optional argument f and an argumentx:

\dd[f]{x} 

And which is equivalent to writing:

\frac{\mathrm{d} f }{\mathrm{d} x } 

The question is, can make a macro such that i dont have to write the brackets, but which will still accept the argument?

It would be very conventient if I could avoid using the brackets. Something like this would be excellent:

\dd f,x 

Is there any way of avoiding writing the brackets? Thank you for your time.

Kind regards, Marius

I want to make macro which do not require curly brackets to accepts an argument. Lets invent an example. Say I want a macro which accepts an optional argument f and an argumentx:

\dd[f]{x} 

And which is equivalent to writing:

\frac{\mathrm{d} f }{\mathrm{d} x } 

The question is, can make a macro such that I dont have to write the brackets, but which will still accept the argument?

It would be very conventient if I could avoid using the brackets. Something like this would be excellent:

\dd f,x 

Is there any way of avoiding writing the brackets?

Source Link
Mikkel Rev
  • 637
  • 1
  • 7
  • 19

Macro take argument without wrapping in brackets?

I want to make macro which do not require curly brackets to accepts an argument. Lets invent an example. Say I want a macro which accepts an optional argument f and an argumentx:

\dd[f]{x} 

And which is equivalent to writing:

\frac{\mathrm{d} f }{\mathrm{d} x } 

The question is, can make a macro such that i dont have to write the brackets, but which will still accept the argument?

It would be very conventient if I could avoid using the brackets. Something like this would be excellent:

\dd f,x 

Is there any way of avoiding writing the brackets? Thank you for your time.

Kind regards, Marius