2

I have the code

\begin{eqnarray}
    &&\nonumber
    \left.\begin{array}{l}
        & \textbf{E}_{\textrm{tr}}  (x,y,z)= \left(\ts \textbf{s} + \tp \textbf{p}_+\right) \, \exp\lec{i   {\ko} \les\left({x\cos\psi+y\sin\psi}\right)\sin\theta_{\rm inc}+(z-N  P )   \cos \theta_{\rm inc}\ris }\ric
        \\[5pt]
        \textbf{H}_{\textrm{tr}} (x,y,z) = 
        \eta_0^{-1}\left(\ts \textbf{p}_+ - \tp \textbf{s}\right)
        \, \exp\lec{i   {\ko} \les\left({x\cos\psi+y\sin\psi}\right)\sin\theta_{\rm inc} +(z-N P)   \cos \theta_{\rm inc}\ris
        }\ric
    \end{array}\right\}\,,
    \\[5pt]
    &&
    \qquad\qquad\qquad z>N P \,.
\end{eqnarray} 

which produces the output

enter image description here

No matter what I try, I cannot get this to render more nicely. I would like for each equation to break after the plus sign, and for the equation number to appear to the right of the bracket.

1
  • 1
    where is defined \lec, \ts, \ko, etc?. Please provide MWE not just code fragment!
    – Zarko
    Commented Oct 5, 2021 at 5:17

3 Answers 3

3

In order to make your code compilable, I had to come up with emergency definitions of \ts, \tp, \ko, \ric, \ris, \lec, and \les.

I've also simplified your code by replacing the eqnarray environment with a far more flexible aligned environment and by getting rid of all interior \left and \right sizing directives. (Hint: they do nothing except mess up the horizontal spacing.) Next, I replaced the 4 instances of \textbf with \mathbf. Finally, I would state z>N P in ordinary, i.e., inline, math on a line following the displayed equations.

enter image description here

\documentclass{article}
\usepackage{amsmath} % for 'aligned' environment
%% check if the following definitions are appropriate
\providecommand\ts{t_s}
\providecommand\tp{t_p}
\providecommand\ko{k_0}
\providecommand\lec{\bigl\{}
\providecommand\ric{\bigr\}}
\providecommand\les{\bigl[}
\providecommand\ris{\bigr]}
\newcommand\minc{{\mathrm{inc}}}
\newcommand\mtr{{\mathrm{tr}}}

\begin{document}
\begin{equation}
\left.\begin{array}{@{}l}
\begin{aligned}
\textbf{E}_\mtr (x,y,z)
    &= (\ts \mathbf{s} + \tp \mathbf{p}_+)  
      \exp\lec i \ko \les({x\cos\psi+y\sin\psi})\sin\theta_\minc \\
    &\qquad+(z-N P ) \cos \theta_\minc\ris \ric
    \\[\jot]
\textbf{H}_\mtr (x,y,z) 
    &= \eta_0^{-1}(\ts \mathbf{p}_+ - \tp \mathbf{s})
      \exp\lec i \ko \les({x\cos\psi+y\sin\psi})\sin\theta_\minc \\
    &\qquad+(z-N P) \cos \theta_\minc\ris\ric
\end{aligned}
\end{array}\right\}
\end{equation} 
and $z>N P$.
\end{document}
5

I would write your equation as follows:

\documentclass{article}
\usepackage{bm}
\usepackage{mathtools}

\begin{document}
    \begin{gather}
\begin{rcases}
    \bm{E}_{\mathrm{tr}}(x,y,z) = \left(t_s\bm{s} + t_p \bm{p}_{+}\right) A(\psi,\theta)  &   \\
    \bm{E}_{\mathrm{tr}}(x,y,z) = \eta_0^{-1}\left(t_s\bm{p}_{+} - t_p \bm{s}\right) A(\psi,\theta)  
\end{rcases}   
\shortintertext{where}
A(\psi,\theta) = \exp\Bigl\{i k_o\bigl[(x\cos\psi + y\sin\psi)\sin\theta_{\mathrm{inc}} +
                       (z - NP)\cos\theta_{\mathrm{inc}}\bigr]\Bigr\}
    ,\quad    z > N P ,  \notag
    \end{gather} 
\end{document}

enter image description here

3

I would definitely use a shorthand for the long repeated part in the two equations. I'd also avoid the big brace, because the equation number midway will help readers in knowing that the number refers to both.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
  &\begin{alignedat}{2}
    &\mathbf{E}_{\mathrm{tr}}&&(x,y,z)
    = (t_s \mathbf{s} + t_p \mathbf{p}_+)f(x,y,z)
   \\
    &\mathbf{H}_{\mathrm{tr}}&&(x,y,z)
    = \eta_0^{-1}(t_s\mathbf{p}_+ - t_p\mathbf{s})f(x,y,z)
  \end{alignedat}
  \\
  & f(x,y,z)=
    \exp\{ik_0 [(x\cos\psi+y\sin\psi)\sin\theta_{\mathrm{inc}}+(z-NP)\cos\theta_{\mathrm{inc}}]\},
    \notag
  \\
  &z>NP. \notag
\end{align}

\end{document}

I prefer to leave a small gap between Etr and the parenthesis rather than a hole in front of the E.

Note that the input has been simplified a lot, without useless braces and the obfuscation given by \tp, \ts, \ric and so on.

enter image description here

If you really want the big brace:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
  &
  \left.\kern-\nulldelimiterspace\!\! % alignment tricks
  \begin{alignedat}{2}
    &\mathbf{E}_{\mathrm{tr}}&&(x,y,z)
    = (t_s \mathbf{s} + t_p \mathbf{p}_+)f(x,y,z)
   \\
    &\mathbf{H}_{\mathrm{tr}}&&(x,y,z)
    = \eta_0^{-1}(t_s\mathbf{p}_+ - t_p\mathbf{s})f(x,y,z)
  \end{alignedat}
  \right\rbrace,
  \\
  & f(x,y,z)=
    \exp\{ik_0 [(x\cos\psi+y\sin\psi)\sin\theta_{\mathrm{inc}}+(z-NP)\cos\theta_{\mathrm{inc}}]\},
    \notag
  \\
  &z>NP. \notag
\end{align}

\end{document}

enter image description here

Beware that \textbf in equations is generally wrong and that \rm has been deprecated for 30 years.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .