I'm attempting to compile a separate file with callable equations which feature the ability to be portions of equations, almost acting like an object.
For example, in an external file (call it "equations.tex"), I want to create generic mxn matrices A and B:
Code: Select all
\begin{equation}\label{generic_A}
\begin{pmatrix}
a_{1, 1} &\; .\; .\; . & a_{1, n} \\
. &\; .\; .\; . & . \\
. &\; .\; .\; . & . \\
. & \; .\; .\; . & . \\
a_{m, 1} & \; .\; .\; . & a_{m, n}
\end{pmatrix}
\end{equation}
\begin{equation}
\begin{pmatrix}\label{generic_B}
b_{1, 1} &\; .\; .\; . & b_{1, n} \\
. &\; .\; .\; . & . \\
. &\; .\; .\; . & . \\
. & \; .\; .\; . & . \\
b_{m, 1} & \; .\; .\; . & b_{m, n}
\end{pmatrix}
\end{equation}
1) To call a single matrix in another file
2) To combine matrices in equations in another file
How this would look is:
1) Every time I want to create a generic matrix, I don't want to have to type in the full matrix equation. It should look something along the lines of:
Code: Select all
\call{generic_A}
Code: Select all
\begin{equation}
\call{generic_A} + \call{generic_B}
\end{equation}
\call{generic_A}
There appears to be several different workarounds posted on coding forums, but they seem convoluted to me. I'm somewhat new to LaTeX, but I feel like there has to be a simple solution to this.
Thoughts? Recommendations?
Thank you!