Here is my MWE:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[all]{xy}
\makeatletter
\newcommand{\test}{\xymatrix@M=-.3pt@=10pt}
\newcommand{\testt}[2][1]{\ar@[|(1)]@#1{-}[#2]}
\makeatother
\begin{document}
\begin{align*}
&f=\test{
& \bullet \testt{dl} \testt{dr} \\
\bullet & & \circ }
&g=\test{
& & \bullet \testt{dl}\testt{d}\testt{dr}\\
& \bullet & \bullet \testt{d} & \bullet \testt{d}\\
& & \circ & \circ }
\end{align*}
\end{document}
Please help!!!!!
related to this Is that a bug between `xymatrix`, the `input` command and .sty file? but solution not working

\makeatletterand\makeatoher?? – New to latex Feb 14 '20 at 06:26\makeatletter"switched on"? – Feb 14 '20 at 06:28\makeatletterand\makeatother– New to latex Feb 14 '20 at 06:35\makeatletteris "switched on" automatically. Then you need to switch it of for the purpose of these command definitions. That is, inside a package you need\makeatother \newcommand{\test}{\xymatrix@M=-.3pt@=10pt} \newcommand{\testt}[2][1]{\ar@[|(1)]@#1{-}[#2]} \makeatletter. – Feb 14 '20 at 06:39