0

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.

Sebastiano
  • 54,118
Fahim B
  • 661

1 Answers1

7

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}

enter image description here

CarLaTeX
  • 62,716