Math & Science[empheq] tag misplaced

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

[empheq] tag misplaced

Post by thomasb »

Hello,
In attachment, a minimal non working example. Would you know how to place the tag at the end of the line?

Code: Select all

\documentclass{jnm}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[cmex10]{amsmath}
\usepackage{array}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{hyperref}
\usepackage{empheq}

\newcommand\lr[1]{\left(#1\right)}

\begin{document}
Text
  \begin{empheq}[]{align*}
    \tag{$E_x$} E_x =& \phantom{+} \frac{1}{16\lr{1-\frac{1}{\pi}\alpha_x}} \\
    &\times\left[4\lr{1-\frac{2}{\pi}\alpha_x} \lr{E_{x,1}^{\rm blue} + E_{x,2}^{\rm blue} + E_{x,3}^{\rm blue} + E_{x,4}^{\rm blue}}\right. \notag \\
      &+ \lr{\frac{2}{\pi}\alpha_x} \lr{E_{x,1}^{\rm orange} + E_{x,2}^{\rm orange} + E_{x,3}^{\rm orange} + E_{x,4}^{\rm orange}} \notag \\
      &+ \left.\lr{\frac{2}{\pi}\alpha_x} \lr{E_{x,1}^{\rm green} + E_{x,2}^{\rm green} + E_{x,3}^{\rm green} + E_{x,4}^{\rm green}}\right] \notag \\
    %&\rule[10pt]{100pt}{0.1pt}\\
    E_y =& \phantom{+} \frac{1}{16\lr{1-\frac{1}{\pi}\alpha_y}} \\
    &\times\left[ \lr{\frac{2}{\pi}\alpha_y}\lr{E_{y,1}^{\rm blue} + E_{y,2}^{\rm blue} + E_{y,3}^{\rm blue} + E_{y,4}^{\rm blue}} \right. \notag \\
    &+ 4\lr{1-\frac{2}{\pi}\alpha_y}\lr{E_{y,1}^{\rm orange} + E_{y,2}^{\rm orange} + E_{y,3}^{\rm orange} + E_{y,4}^{\rm orange}} \notag \\
      &+ \left.\lr{\frac{2}{\pi}\alpha_y}\lr{E_{y,1}^{\rm green} + E_{y,2}^{\rm green} + E_{y,3}^{\rm green} + E_{y,4}^{\rm green}}\right] \notag \\
    %&\rule[10pt]{100pt}{0.1pt}\\
    E_z =& \frac{1}{16\lr{1-\frac{1}{\pi}\alpha_z}} \\
    & \times \left[\lr{\frac{2}{\pi}\alpha_z}\lr{E_{z,1}^{\rm blue} + E_{z,2}^{\rm blue} + E_{z,3}^{\rm blue} + E_{z,4}^{\rm blue}}\right. \notag \\
      &+ \lr{\frac{2}{\pi}\alpha_z}\lr{E_{z,1}^{\rm orange} + E_{z,2}^{\rm orange} + E_{z,3}^{\rm orange} + E_{z,4}^{\rm orange}} \notag \\
      &+ \left.4\lr{1-\frac{2}{\pi}\alpha_z}\lr{E_{z,1}^{\rm green} + E_{z,2}^{\rm green} + E_{z,3}^{\rm green} + E_{z,4}^{\rm green}} \right. \notag
  \end{empheq}
Text
\end{document}
Attachments
test.tex
(2.1 KiB) Downloaded 328 times
jnm.cls
(3.18 KiB) Downloaded 397 times
Last edited by Stefan Kottwitz on Mon Dec 13, 2021 11:20 am, edited 1 time in total.
Reason: code from attachment inserted

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10319
Joined: Mon Mar 10, 2008 9:44 pm

[empheq] tag misplaced

Post by Stefan Kottwitz »

Hi Thomas,

that's because jnm documents are in two-column mode. The tag is at the end of the column.

You can see it if you place \onecolumn before \begin{document}.

Stefan
LaTeX.org admin
thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

[empheq] tag misplaced

Post by thomasb »

Cool, thank you very much
Post Reply