Coming from the programming language side, I am used to the very regular syntax of these languages. E.g. in Python a function call has to be like below:
callfun(arg1,arg2,key1=val1,key2,val=2)
This makes understanding the code easy.
In LaTeX, I see much more free usages of syntax.
\multirow{3}{*}{\parbox{1cm}{...
or like
\acommand[options]{content}
which I find confusing. So far to me it seems writers of these \command s can define whatever syntax they want for their commands. Is that right?
So, what are the rules of command syntax in latex?
{}and optional arguments in[]– David Carlisle Jan 20 '14 at 11:20xcoffins, where the keyval interface doesn't seem anything like as useful/popular as the standard LaTeX optional argument one.) – Joseph Wright Jan 20 '14 at 11:31\def\joinInMatrimony#1 and #2{#1 and~#2 are now married.}. Using the pattern matching-based definitions you can implement more convenient and robust APIs, like e.g. TikZ's key-value interface. – Jan 20 '14 at 11:46