I have some formula such as \mathbf{x}_{j_{1}}, \mathbf{x}_{j_{2}},..., and \mathbf{x}_{j_{k}}. How can I define one \newcommand for these formulas?
Thanks in advance.
I have some formula such as \mathbf{x}_{j_{1}}, \mathbf{x}_{j_{2}},..., and \mathbf{x}_{j_{k}}. How can I define one \newcommand for these formulas?
Thanks in advance.
I think you intend a command where to change only the variable part...
\documentclass{article}
\usepackage{amsmath, amssymb}
\newcommand{\myf}[1]{\mathbf{x}_{j_{#1}}}
\begin{document}
\[
\myf{1}, \myf{2}, \dots, \myf{k}
\]
\end{document}
\ensuremath. – Skillmon Apr 04 '17 at 19:44\myf{1}to be used without segregating it in a math formula, even if it just consists in$\myf{1}$. – egreg Apr 05 '17 at 08:28