I am getting started with WinEdt 7.1 and TEX in general on a windows platform. I have a file where I've defined custom commands. Its current contents are:
\newcommand{\avgE}{\bar{E}}
\newcommand{\setE}{\mathcal{A}}
\newcommand{\enum}[1]{\begin{enumerate} #1 \end{enumerate}}
\newcommand{\eqa}[1]{\begin{eqnarray} #1\end{eqnarray}}
\newcommand{\par}[1]{\left(#1\right)}
\newcommand{\brac}[1]{\left[#1\right]}
\newcommand{\eq}[1]{\begin{align*}#1\end{align*}}
\newcommand{\eqn}[1]{\begin{align}#1\end{align}}
\newcommand{\lf}[2]{\parenth {\frac {#1} {#2} } }
I'd like to place this file in my C:/Users/myName/.dotfiles
folder which is currently under version control (git), and be able to reference this from whatever latex project I'm currently working on wherever it is. Im not exactly sure how to go about doing this? Do I just have to say
\input{C:\Users\diego\.dotfiles\customCommands.txt}
on every file or is there some "best practices" I'm missing?
\input{customCommands}
(Make it a.tex
file not a.txt
file). On unix that directory is~/lib/texmf/tex/inputs
, on Mac it's~/Library/texmf/tex/inputs
, and the reason this comment is not an answer is that I don't know what it is on Windows.