8

I am writing an article in the Journal of the Optical Society of America B (JOSA B) and I have used the journal's LaTeX template.

Unfortunately, I have a problem with the output PDF. Instead of capital Greek letters I get a black square and I cannot figure out what the problem is. This problem is exclusively for capital Greek letters. Other letters and mathematical signs are shown properly. I only use the amsmath package.

\documentclass[9pt,twocolumn,twoside]{osajnl} % http://www.opticsinfobase.org/josab/submit/templates/pc/osajnl_2015.zip (*.zip-file, 581 kB) ‎
\usepackage{amsmath}
\usepackage{breqn}
\usepackage{subfigure} 
\journal{josab} % Choose journal (ao‎, ‎josaa‎, ‎josab)‎ 
\setboolean{shortarticle}{false} % true = letter‎, ‎false = research article‎ ‎

\begin{document}
\begin{subequations}
\begin{equation}
\left[\tilde{V}^{-^{(n)}}\right]=\left[\Gamma^{(n)}\right]\left[\tilde{V}^{+^{(n)}}\right],
\end{equation}
\begin{align}
‎\left[V_m^{(n)}(z) \right]=\left[ P^{(n)} \right]‎
 ‎\left( \left[ \exp \left(‎ -‎j k ^{(n)} \left( z-z_n \right) \right) \right] \left[ \tilde{V}^{+^{(n)}} \right]‎ + \\
 ‎\left[ \exp \left(‎ +‎j k ^{(n)} \left( z-z_{n+1} \right) \right) \right] \left[ \tilde{V}^{-^{(n)}} \right] \right)
\end{align}
\end{subequations}
\end{document}
  • 6
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Mar 23 '15 at 17:04
  • 2
    In addition, please add the whole comment MWE stuff into your original question above, not as a comment. A comment is limited to about 500 characters and does not really have nice markup, contrary to the question tool above – user31729 Mar 23 '15 at 19:57
  • 1
    unrelated: subfigure is obsolete for quite a while. subfig is the official successor. subcaption is the only package supporting hyperref in a satisfying way. – Johannes_B Mar 23 '15 at 22:27
  • 1
    The culprit is breqn. Don't use it. – egreg Mar 23 '15 at 22:30
  • 1
    @user3276054 Trust me: none of the \left and \right you're using in the example align is necessary. – egreg Mar 24 '15 at 16:12
11

Remove the call of the breqn package.

After the operation I get

enter image description here

Note that subfigure has been obsolete for several years. The official replacement is subfig. Alternatively, use subcaption. Note that the class already loads caption, so subcaption should probably be chosen.

I add a version without \left and right, which don't seem necessary (they rarely are in cases like this) and where the superscripts (n) are similar to the one for Gamma. More importantly, the two consecutive equations are together in a gather environment: two equation environments should never appear immediately after one another.

\begin{subequations}
\begin{gather}
[ \tilde{V}^{-^{(n)}} ] = [ \Gamma^{(n)} ] [ \tilde{V}^{+^{(n)}} ],
\\
[ \tilde{V}^{-\,(n)} ] = [ \Gamma^{(n)} ] [ \tilde{V}^{+\,(n)} ],
\end{gather}
\end{subequations}

enter image description here

In order to accommodate the split formula where you use \left and \right across lines, just remove all of them; for better clarity, some of the fences can be made \big, but not more than that. Note that multline is the environment of choice for this.

\begin{multline}
[V_m^{(n)}(z)]=[ P^{(n)} ]
 \bigl( \bigl[ \exp \bigl( -j k ^{(n)} ( z-z_n) \bigr) \bigr] [ \tilde{V}^{+^{(n)}}] + \\
\bigl[ \exp \bigl( +j k ^{(n)} ( z-z_{n+1} ) \bigr) \bigr] [ \tilde{V}^{-^{(n)}} ]\bigr)
\end{multline}

enter image description here

  • Thank you so much. But, I must break an equation! I have written this equation instead of Eq. 2 in the MWE above. This equation should be broken between two pairs of \left( and \right). I tried the environments align and gather, but both result in errors. You mean that the best environment for multi-line equations is gather? – user3276054 Mar 24 '15 at 15:56
  • 1
    @user3276054 You can't split \left and \right across the various parts of an alignment. Just use \bigl, \bigr and friends. But, as I showed you, \left and \right are seldom necessary. – egreg Mar 24 '15 at 16:04
  • Does this mean anything? \tilde{V}^{+^{(n)}}. Couldn't it be {\tilde{V}^{+}}^{(n)} (don't know, just that +^{..} seems weird). – Manuel Mar 24 '15 at 16:31
  • These formulas are for a multilayer structure. + means forward and - means backward moving waves. (n) shows layer number n.Yes, it can also be like \tilde{V}^{+\,(n)} (what egreg mentioned). – user3276054 Mar 24 '15 at 21:47
6

@egreg has already identified the source of the main problem: the breqn package.

In addition, you may want to make all three (n) superscript particles have the same size and vertical displacement (relative to the baseline). Currently, two of the three are in so-called "scriptscript" style while one is in "script" style. All three (n) particles should probably be in "script" style and should also feature the same vertical displacement.

I the first row below, I use _{\mathstrut} to insert an invisible particle (a "math strut") in the subscript position. This serves to raise the (n) particles a bit. If that's not what you need, just omit the _{\mathstrut} bits -- as is done in the second row below.

enter image description here

\documentclass[9pt,twocolumn,twoside]{osajnl}
\usepackage{amsmath} 
\journal{josab} 
\setboolean{shortarticle}{false}

\begin{document}
\begin{subequations}
\begin{gather}
\left[\tilde{V}^{-}{}_{\mathstrut}^{(n)}\right]=
\left[\Gamma_{\mathstrut}^{(n)}\right]
\left[\tilde{V}^{+}{}_{\mathstrut}^{(n)}\right]\\
\left[\tilde{V}^{-}{}^{(n)}\right]=
\left[\Gamma^{(n)}\right]
\left[\tilde{V}^{+}{}^{(n)}\right]
\end{gather}
\end{subequations}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.