Crea tus propios comandos de LaTeX
Crear tus propios comandos sin parametros o con varios para ejecutar ordenes de cosas repetitivas en LaTeX.
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{amsfonts, amsmath}
\newcommand{\pcnl}{problema de complementariedad no lineal(PCNL)}
\newcommand{\zi}{\mathbb{Z}}
\newcommand{\Rm}[1]{\mathbb{R}^{#1}}
\newcommand{\vectori}[2]{$\left(#1_{1},#1_{2},\dots,#1_{#2} \right)$}
\newcommand{\deffun}[3]{$ #1 \colon #2 \rightarrow #3 $}
\newcommand{\plineal}[3]{
\begin{equation}\label{#1}
\begin{array}{cl}
\min & #2 (x) \
sujeto\, a: & #3(x)=0
\end{array}
\end{equation}
}
\begin{document}
Hoy hablaremos de \pcnl
sea $n \in \zi$
sea $x \in \Rm{n}$
sea $x \in \Rm{3}$
considere el programa lineal \plineal{clave}{f}{g}
consideremos el vector \vectori{x}{n}
Sea \deffun{f}{\zi}{\Rm{2}}
\end{document}