I'm trying to make small CPP tutorial and try to show function type, name, arguments and body:
First code
Code: Select all
\begin{eqnarray*}
\begin{aligned}
\overbrace{int}^{\text{TYpe}} \overbrace{sqequation}^{\text{Name}} &
\overbrace{(const\ double\& \ a, const\ double\& \ a,const\ double\&\ a)}^{\text{Parameters}} \\
\end{aligned}
\\
\left.
\begin{aligned}
\{& \\
&\boxed {\phantom{a+b}}\\
&\boxed {\substack{\text{program} \\ \text{code}} } \\
&\boxed {\phantom{a+b}}\\
\}& \\
\end{aligned} \right\}\quad\text{ Body}
\end{eqnarray*}
Code: Select all
\begin{eqnarray*}
\left.
\begin{aligned}
\overbrace{int}^{\text{ტიპი}} \overbrace{sqequation}^{\text{name}} &
\overbrace{(const\ double\& \ a, const\ double\& \ a,const\ double\&\ a)}^{\text{Parameters}} \\
\{& \\
&\boxed {\phantom{a+b}}\\
&\boxed {\substack{\text{Program} \\ \text{code}} } \\
&\boxed {\phantom{a+b}}\\
\}& \\
\end{aligned} \right\}\quad \text{ Body}
\end{eqnarray*}
with one code \right} is "too high"--it must be below function.
with another one function body is shifted .
any ideas?
maybe matrix approach can give right solution?