1

I have an equation in a double column context. As can be seen from the picture below, the equation is just a little bit wider than a single column. I do not want to create a span-column equation for it. Is there a way I can change it to a smaller font size so it will fit in one column?

I am editing the file in LyX, so it would be great if there is a way to do it directly in Lyx. If not, LaTeX codes are also acceptable.

enter image description here

After changing to \bmatrix as suggested by @daleif, it look like enter image description here

Can the space between the two matrices on the left hand side and the spaces between columns of the first matrix be further reduced?

12
  • 1
    You really should not, and if this is for example for a journal article, such things would be unacceptable for the journal style. Writing in a two column style is a big hassle. There are a few things you can do here, use the bmatrix env for the matrices, don't do them by hand using array etc. This should reduce the spacing around the [] s, next break the line, here I'd probably wrap the inner contents in a gathered env and break the line (\\) before the =. I don't know if there are good interfaces for this in LyX (it is a rather limited writing environment)
    – daleif
    Commented Mar 6, 2017 at 18:59
  • please, be so kind and provide small, complete document (in LaTeX) which we can compile/modify that equation will fit one column. or the daleif comment already solved your problem?
    – Zarko
    Commented Mar 6, 2017 at 19:15
  • This will need some more effort to fix, since the equation is quite a bit too wide. Observe that the equation is also labeled with (31) which also should go into the same line. So in addition to using bmatrix etc as suggested by @daleif consider to replace the N-vector by N (maybe in boldface or with some other vector marker), and likewise the zero vector by zero (maybe with a vector marker). As a last resort, use a smaller font (no matter whether the publisher deems this acceptable or not): contents and readability is more important than editor rules.
    – gernot
    Commented Mar 6, 2017 at 21:00
  • Thanks @daleif, changing from \array to \bmatrix solves the problem. I have added the appearance after the alteration in my question. Can you suggest if there is a way to further reduce the spacing between the two matrices on its left hand side? The spacing looks a little wide right now after the matrices themselves are tighter.
    – nanjun
    Commented Mar 6, 2017 at 21:26
  • Did you change the image?
    – daleif
    Commented Mar 6, 2017 at 21:27

2 Answers 2

2

You can either reduce the value \arraycolsep and use the fleqn environment from nccmath, or use the medsize environment, also from nccmath, which reduces the font size to about 80 % of \displaystyle.

\documentclass{ieeetran}
\usepackage{amsmath, nccmath}
\usepackage{lipsum}

 \begin{document}

\lipsum[1]

\begin{fleqn}
  \begin{equation}
    \setlength{\arraycolsep}{3pt}
    \begin{bmatrix}
      -k_w + \sin α₁ & -k_w +1 & -k_w + \sin α₁ \\
      \sin 5α₁ & 1 & \sin 5α₁ \\
      \sin 7α₁ & -11 & \sin7α₁ \\
    \end{bmatrix}
    \!
    \begin{bmatrix}
      N₁ \\ N₂ \\ N₃
    \end{bmatrix}
    =
    \begin{bmatrix}
      0 \\ 0 \\ 0
    \end{bmatrix}
  \end{equation}
\end{fleqn}

\lipsum[3]

\begin{equation}
  \begin{medsize}
    \begin{bmatrix}
      -k_w + \sin α₁ & -k_w +1 & -k_w + \sin α₁ \\
      \sin 5α₁ & 1 & \sin 5α₁ \\
      \sin 7α₁ & -11 & \sin7α₁ \\
    \end{bmatrix}
    \!
    \begin{bmatrix}
      N₁ \\ N₂ \\ N₃
    \end{bmatrix}
    =
    \begin{bmatrix}
      0 \\ 0 \\ 0
    \end{bmatrix}
  \end{medsize}
\end{equation}
\lipsum[3]

\end{document} 

enter image description here

3
  • Thank you for the answer. The first one looks great for this particular equation while the second one works for some equations that are a little bit longer than a column width.
    – nanjun
    Commented Mar 7, 2017 at 17:22
  • Hi @Bernard, when I was trying to cite the equation defined by the fleqn environment, it shows the section number (something like III-C) instead of the equation number. To properly cite the equation (1) in your answer above, where should I insert the equation label? I have tried to put the equation label before \end{equation} and other places, but it did not work.
    – nanjun
    Commented Mar 10, 2017 at 19:05
  • If I place a label inside the equation environment (not between fleqn and equation), I have no problem.
    – Bernard
    Commented Mar 10, 2017 at 22:42
1

I can reproduce the second picture in the question with

\documentclass[11pt]{IEEEtran}
\usepackage{amsmath}
\usepackage{newtxtext,newtxmath}

\usepackage{lipsum}

\begin{document}

\setcounter{equation}{30} % to reproduce the example

\lipsum*[2]
\begin{equation}
\begin{bmatrix}
  -k_w + \sin \alpha_1 & -k_w +1 & -k_w + \sin \alpha_1 \\
  \sin 5\alpha_1 & 1 & \sin 5\alpha_1 \\
  \sin 7\alpha_1 & -11 & \sin7\alpha_1 \\
\end{bmatrix}
\begin{bmatrix}
  N_1 \\ N_2 \\ N_3
\end{bmatrix}
=
\begin{bmatrix}
0 \\ 0 \\ 0
\end{bmatrix}
\end{equation}
\lipsum

\end{document} 

enter image description here

I find it unacceptable that a big organization like IEEE still uses

\renewcommand{\rmdefault}{ptm}

and Computer Modern for math.

An immediate improvement can be obtained by doing \usepackage{mathptmx} together with a trick for pushing the equation far left and decreasing locally \arraycolsep:

\documentclass[11pt]{IEEEtran}
\usepackage{amsmath}
\usepackage{mathptmx}

\usepackage{lipsum}

\begin{document}

\setcounter{equation}{30} % to reproduce the example

\lipsum*[2]
\begin{equation}
\addtolength{\arraycolsep}{-3pt}
\hfilneg
\begin{bmatrix}
  -k_w + \sin \alpha_1 & -k_w +1 & -k_w + \sin \alpha_1 \\
  \sin 5\alpha_1 & 1 & \sin 5\alpha_1 \\
  \sin 7\alpha_1 & -11 & \sin7\alpha_1 \\
\end{bmatrix}
\begin{bmatrix}
  N_1 \\ N_2 \\ N_3
\end{bmatrix}
=
\begin{bmatrix}
0 \\ 0 \\ 0
\end{bmatrix}
\hspace{1000 pt minus 1fil}
\end{equation}
\lipsum

\end{document} 

enter image description here

Better yet with

\usepackage{newtxtext,newtxmath}

instead of \usepackage{mathptmx}:

enter image description here

You must log in to answer this question.

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