Wikiversity:Semantic templates/Mathematical relation chains/Latex
\newcommand{\mathrelationchain}[4]{$ #1 #2 #3#4$}
\newcommand{\mathrelationchaindisplay}[4]{\[ #1 #2 #3 #4 \]}
\newcommand{\mathrelationchaindisplaylong}[4]{\[ #1 #2 #3 #4 \]}
\newcommand{\mathrelationchainalign}[4]{ \begin{eqnarray*} #1 #2 #3 #4 \end{eqnarray*} }
\newcommand{\relationchain}[9]{ #1 \, #2 \, #3 \ifthenelse {\equal {#4}{ }} {} {\, #4 \, #5 } \ifthenelse {\equal {#6}{ } }{} {\, #6 \, #7 } \ifthenelse {\equal {#8}{ }}{} {\, #8 \, #9 } }
\newcommand{\relationchainlong}[9]{ #1 \, #2 \, #3 \ifthenelse {\equal {#4}{ }} {} {\, #4 \, #5 } \ifthenelse {\equal {#6}{ } }{} {\, #6 \, #7 } \ifthenelse {\equal {#8}{ }}{} {\, #8 \, #9 } }
\newcommand{\relationchainextension}[8]{ \, #1 \, #2 \ifthenelse {\equal {#3}{ }} {} {\, #3 \, #4 } \ifthenelse {\equal {#5}{ } }{} {\, #5 \, #6 } \ifthenelse {\equal {#7}{ }}{} {\, #7 \, #8 } }
\newcommand{\relationchainalign}[9]{ #1 & #2 & #3 \ifthenelse {\equal {#4}{ }} {} {\cr & #4 & #5 } \ifthenelse {\equal {#6}{ } }{} {\cr & #6 & #7 } \ifthenelse {\equal {#8}{ }}{} {\cr & #8 & #9 } }
\newcommand{\relationchainextensionalign}[8]{ \cr & #1 & #2 \ifthenelse {\equal {#3}{ }} {} {\cr & #3 & #4 } \ifthenelse {\equal {#5}{ } }{} {\cr & #5 & #6 } \ifthenelse {\equal {#7}{ }}{} {\cr & #7 & #8 } }
\newcommand{\mathrelationchainalignprintleft}[4]{ \begin{eqnarray*} #1 #2 #3 #4 \end{eqnarray*} }
\newcommand{\relationchainalignprintleft}[9]{ & & #1 \cr & #2 & #3 \ifthenelse {\equal {#4}{ }} {} {\cr & #4 & #5 } \ifthenelse {\equal {#6}{ } }{} {\cr & #6 & #7 } \ifthenelse {\equal {#8}{ }}{} {\cr & #8 & #9 } }
\newcommand{\mathrelationchainalignhandleft}[4]{ \begin{eqnarray*} #1 #2 #3 #4 \end{eqnarray*} }
\newcommand{\relationchainalignhandleft}[9]{ #1 & #2 & #3 \ifthenelse {\equal {#4}{ }} {} {\cr & #4 & #5 } \ifthenelse {\equal {#6}{ } }{} {\cr & #6 & #7 } \ifthenelse {\equal {#8}{ }}{} {\cr & #8 & #9 } }
\newcommand{\mathrelationchaindisplayhandleft}[4]{ \[ #1 #2 #3 #4 \] }
\newcommand{\relationchaindisplayhandleft}[9]{ #1 \, #2 \, #3 \ifthenelse {\equal {#4}{ }} {} {\, #4 \, #5 } \ifthenelse {\equal {#6}{ } }{} {\, #6 \, #7 } \ifthenelse {\equal {#8}{ }}{} {\, #8 \, #9 } }
\newcommand{\rowwithpart}[2]{ \ifthenelse {\equal {#2} {} } {#1} { #1 \cr & & #2} }
\newcommand{\mathrelationchainb}[4]{$ #1 #2 #3#4$}
\newcommand{\relationchainb}[9]{ #1 \, #2 \, #3 \ifthenelse {\equal {#4}{ }} {} {\, #4 \, #5 } \ifthenelse {\equal {#6}{ } }{} {\, #6 \, #7 } \ifthenelse {\equal {#8}{ }}{} {\, #8 \, #9 } }
\newcommand{\relationchainextensionb}[8]{ \, #1 \, #2 \ifthenelse
{\equal {#3}{ }} {} {\, #3 \, #4 } \ifthenelse {\equal {#5}{ } }{}
{\, #5 \, #6 } \ifthenelse {\equal {#7}{ }}{} {\, #7 \, #8 } }