Most introductory textbooks on the modular group begin with an introduction of it as the group generated by the two Möbius transformations:
\begin{gather*} z'=z+1 \\ z'=-\frac{1}{z} \end{gather*}
and immediately after that, they describe the canonical fundamental domain of the modular group as a certain hyperbolic triangle with angles $\pi/3$, $\pi/3$, $0$, which under the action of the modular group tiles up the whole hyperbolic plane. My question refers to the opposite process: given an arbitrary hyperbolic triangle with angles $\pi/n$, $\pi/m$, $\pi/l$ (where $n$, $m$, $l$ are positive integers), how to construct the generators $T$, $S$ of the group of Möbius transformations such that this triangle is its fundamental domain?
I'd also like to see at least one computational example in addition to an explicit formula, with special emphasis on "symmetric" (equilateral) hyperbolic triangles, such as the simplest equilateral hyperbolic triangle — a triangle with angles $\pi/4$, $\pi/4$, $\pi/4$. If someone knows a good source with explicit formula, it will be blessed if he will write it here!