“Newcommand Latex” Code-Antworten

Latex Newcommand

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

Newcommand Latex

\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

Newcommand Latex

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

Newcommand Latex

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

Ähnliche Antworten wie “Newcommand Latex”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen