“LATEX NEWCMAND” Respostas de código

LaTex NewCommand

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\newcommand{\aut}[2]{#1~\textsc{#2}}
\begin{document}
\aut{Pierre}{Durant}
\end{document}
bougui

LATEX NEWCMAND

\newcommand{\plusbinomial}[3][2]{(#2 + #3)^#1} %we have 3 params, 
% and 2 is the optional value of the 1st param

To save some time when writing too many expressions 
with exponents is by defining a new command to make simpler:

\[ \plusbinomial{x}{y} \]

And even the exponent can be changed

\[ \plusbinomial[4]{y}{y} \] %here we override the optional val of the 1st param with the 4
Jeff Spicoli

LATEX NEWCMAND

\newcommand{commandName}[#ofParams]{commandDefinition}
# Where in the 'commandDefinition', use #1, #2, ... to represent
#	first, second, ... argument
Tictac

LATEX NEWCMAND

If you use a command multiple times create e shortcut, like for example:
...
\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
...
\begin{document}
...
MitchAloha

Respostas semelhantes a “LATEX NEWCMAND”

Procure respostas de código populares por idioma

Procurar outros idiomas de código