# Align Equations Without Align Environment

I know this question sounds ridiculous, but I wonder if there is a way to align equations without using the align, gather, or any environment in general. Basically using TeX and LaTeX primitive to not-package-related commands.

The reason is because a package I'm using does not allow for my usage of equations inside separate blocks or in most environments. The package I'm using is called RyDarab, which unfortunately has very little documentation.

EDIT: Here's what I'm trying to do:

\begin{align*}
\amsin{Z} &= {\frac{1}{\amcsc{Z}}} \amcos{Z} &= {\frac{1}{\amsec{Z}}}  \amtan{Z} &= {\frac{1}{\amcot{Z}}} \\
\amcsc{Z} &= {\frac{1}{\amsin{Z}}} \amsec{Z} &= {\frac{1}{\amcos{Z}}} \amcot{Z} &= {\frac{1}{\amtan{Z}}}
\end{align*}


All these trig. functions are redefined in the preamble since RyDarab defines them, but I dislike the default font it uses. I don't know if it's necessary, but just in case:

\renewcommand{\amsin}[1]{\ensuremath{{#1} \ \text{جا}}}
\renewcommand{\amcos}[1]{\ensuremath{{#1} \ \text{جتا}}}
\renewcommand{\amtan}[1]{\ensuremath{{#1} \ \text{ظا}}}

\renewcommand{\amcsc}[1]{\ensuremath{{#1} \ \text{قتا}}}
\renewcommand{\amsec}[1]{\ensuremath{{#1} \ \text{قا}}}
\renewcommand{\amcot}[1]{\ensuremath{{#1} \ \text{ظتا}}}


I'm using XeLaTeX to write in Arabic. Of course, polyglossia is used.

Now, in theory, this should work, but it reveals a very annoying error:

\let \split \insplit@ \DN@ {\align@ \st@rredtrue }\fi \fi \collect@body \ETC.
! Paragraph ended before \amrlpard was complete.
\par


This error appears A LOT. Here's how \amrlpard is defined under the hood:

\def\amrlpard#1$${\testr#1\eqno\eqno\testr} \def\testr#1\eqno#2\eqno#3\testr{\if!#3!\testl#1\leqno\leqno\testl\else\amrl{#1}\eqno#2$$\fi}
\def\testl#1\leqno#2\leqno#3\testl{\if!#3!\amrl{#1}$$\else\amrl{#1}\leqno#2$$\fi}


Now I have no idea what this does, it's completely incomprehensible for me.

Yes, I know the package is not found everywhere. It needs a lot of updating (last time it was updated was 2008 I guess), and more documentation. But it's the only package that does what I want it to do.

If you want to install RyDarab to find the sty file, here's the link, I don't think there's any other way to look at the internal files without installing it.

UPDATE 2: I read the answer, but I do not understand then why this piece of code doesn't work:

$${\amsin{Z}} & { = {\frac{1}{\amcsc{Z}}}} {\amcos{Z}} & { = {\frac{1}{\amsec{Z}}}} {\amtan{Z}} & { = {\frac{1}{\amcot{Z}}}} \cr {\amcsc{Z}} & { = {\frac{1}{\amsin{Z}}}} {\amsec{Z}} & { = {\frac{1}{\amcos{Z}}}} {\amcot{Z}} & { ={ \frac{1}{\amtan{Z}}}}$$


UPDATE 3: Here's the full code:

\documentclass[a4paper, 12pt]{article}

\usepackage{amsmath}
\usepackage{fontspec}
\usepackage{polyglossia}

%\usepackage{ramzarab}
\usepackage{rydarab}
\input amarabiwords % required for XeLateX to mention this explicitly
\funwithdots % required for XeLateX to mention this explicitly

\setmainlanguage{arabic}
\setmainfont[Script=Arabic]{Amiri}

\renewcommand{\amsin}[1]{\ensuremath{{#1} \ \text{جا}}}
\renewcommand{\amcos}[1]{\ensuremath{{#1} \ \text{جتا}}}
\renewcommand{\amtan}[1]{\ensuremath{{#1} \ \text{ظا}}}

\renewcommand{\amcsc}[1]{\ensuremath{{#1} \ \text{قتا}}}
\renewcommand{\amsec}[1]{\ensuremath{{#1} \ \text{قا}}}
\renewcommand{\amcot}[1]{\ensuremath{{#1} \ \text{ظتا}}}

\begin{document}

$${\amsin{Z}} & { = {\frac{1}{\amcsc{Z}}}} {\amcos{Z}} & { = {\frac{1}{\amsec{Z}}}} {\amtan{Z}} & { = {\frac{1}{\amcot{Z}}}} \cr {\amcsc{Z}} & { = {\frac{1}{\amsin{Z}}}} {\amsec{Z}} & { = {\frac{1}{\amcos{Z}}}} {\amcot{Z}} & { ={ \frac{1}{\amtan{Z}}}}$$

\end{document}


• Please show us a minimal example of what you're trying to achieve. For example, do you need the equations to be numbered so you can reference them? Where can we find this mystic package (the link is a PDF) and the link within the PDF doesn't point to a .sty...?
– Werner
Commented Mar 28, 2021 at 18:46
• It certainly is possible --- otherwise packages like amsmath couldn't do it either! Can you share an example of what you've currently got, using the RyDarab package?
– chsk
Commented Mar 28, 2021 at 18:46
• Double  are depreciated. Commented Mar 28, 2021 at 21:26 • I can't use  with this package. I tried, but it gives me the same error that I mentioned. Commented Mar 28, 2021 at 21:37 • The tabstackengine package allows for aligned constructs as a macro command...doesn't even have to be in an equation, but works fine inside a normal equation environment. Commented Mar 29, 2021 at 0:32 ## 1 Answer The documentation of RyDarab has an example of aligned equations {\system{
{5c - 4s + 6} & { = 8s} \cr
{5c - 7s + 9} & { = 3} \cr
{5c - 7s + 9T} & { = {12}c} \cr }} \eqno (1a)


• I can't use this in the document, it's giving me an error. Commented Mar 28, 2021 at 20:04
• @BoredComedy Please, can you edit your question and to put a complete compilable code? Thank you very much. Commented Mar 28, 2021 at 21:07
• Have you tried to latex the examples from ucam.ac.ma/fssm/rydarab ? Commented Mar 28, 2021 at 21:17
• Yes, I did. Some of them require some tweaking in order to run without errors (like the one with cases), but this one doesn't run in the first place. Commented Mar 28, 2021 at 21:34