Parameters in `\newcommand`?

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get our expert's

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions.

A community for students.

Parameters in `\newcommand`?

LaTeX Practicing! :)
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions

yes
``\newcommand\cat[4]{^{#1}_{#2}\large\operatorname {\mathcal {UNK}}^{#3}_{#4}} \cat abcd ~\to ~ \cat {\cat defg}{\cat hijk}{\cat lmno}{\cat pqr{\cat {\cat stuv}{\cat wxyz}{\cat \alpha\beta\gamma\delta}{\cat \epsilon\zeta \eta{\cat {\cat \theta\iota \kappa\lambda}{\cat \mu\nu o\pi}{\cat\rho\sigma\tau\upsilon }{\cat \phi\chi\psi\omega}}}}}`` \[\newcommand\cat[4]{^{#1}_{#2}\large\operatorname {\mathcal {UNK}}^{#3}_{#4}} \cat abcd ~\to ~ \cat {\cat defg}{\cat hijk}{\cat lmno}{\cat pqr{\cat {\cat stuv}{\cat wxyz}{\cat \alpha\beta\gamma\delta}{\cat \epsilon\zeta \eta{\cat {\cat \theta\iota \kappa\lambda}{\cat \mu\nu o\pi}{\cat\rho\sigma\tau\upsilon }{\cat \phi\chi\psi\omega}}}}}\]
LOL wow, can you just show me how to make an operator which colors the text green and makes it gold, and then I could give parameters to it? Like a function in javascript. ``` function ranFunction(ranText) { [insert stuff here] } ``` and then running it on a string. ``` ranFunction("Parth"); ```

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

Makes it bold*
`\newcommand\Parth[1]{\bf\color{green}{#1}} 500+abc+\Parth{13} =?` \[\newcommand\Parth[1]{\bf\color{green}{#1}} 500+abc+\Parth{13} =?\]
Yes, that's what I wanted! What does the `#` mean? Does it act like a parameter or something?
after `\newcommand ` and `\Parth` (the operator name) there is a term in square brackets that is the number of variables the operator works with the `#1` is a reference to the first variable
Ah, nice, we have variables in typesets too.
\[\newcommand\Unk[1]{\mathbf{#1}}\\ \Unk{UnkleRhaukus~rocks!}\]
you can leave a variable blank with `{}` `\newcommand\intl[4]{\int\limits_{#1}^{#2}f(#3)\mathrm d#4}` `\intl ab{}z =?` \[\newcommand\intl[4]{\int\limits_{#1}^{#2}f(#3)\mathrm d#4} \intl ab{}z =?\]
I see.
Thanks, gotta go. I owe you a lot. =)
reference for this ?
you can even have a newcommand without variables `\newcommand\something[0]{ {\tiny\color{gray} ? }} \ \something` \[\newcommand\something[0]{ {\tiny\color{gray} ? }} \ \something \]
page 120
1 Attachment
maybe you really want to use `\newenvironment` @ParthKohli I haven't tried that command yet
use \(\text{\ }\boldsymbol{{boldsymbol{}}} \) instead of just \(\bf{\text {\ bf}}\) if you dont want to loose italics ``` \newcommand\Parth[1]{\boldsymbol{\color{green}{#1}}} \Parth{@ParthKohli} ``` \[\newcommand\Parth[1]{\boldsymbol{\color{green}{#1}}} \Parth{@ParthKohli}\]

Not the answer you are looking for?

Search for more explanations.

Ask your own question