0

I have a large matrix that does not fit on a single line (for a paper that is split in two columns).

So far I haven't been able to figure out a way of using adjustbox to shrink the size.

Here is the code I'd like to shrink:

\begin{align*}
\frac{\hbar} {2} \left( \begin{array}{cccc}
 2 w_1 & 0 & \wp_{13} E_p e^{i \phi_p} & \wp_{14} E_a e^{i \phi_a}\\
 0 & 2 (-w_{p} + w_2 + w_{s}) & \wp_{23} E_c e^{\phi_c} & \wp_{24} E_s e^{i \phi_s} e^{i \Delta t}\\
 (\wp_{13} E_p e^{i \phi_p})^* & (\wp_{23} E_s e^{i \phi_s})^* & -2 w_p + 2 w_3 & 0\\
  (\wp_{14} E_a e^{i \phi_a})^* & (\wp_{24} E_c e^{i \phi_c})^* &  0 & -2 w_{s} + 2 w_4\\
 \end{array} \right)   
\end{align*}

For a two-column paper this ends up being clipped off the page. Here's a screenshot:

enter image description here

How do I shrink this?

(also, clean code formatting tips are always appreciated :) )

1 Answers1

1

You may scale the display to fit, but it should be the last resort, for the formula can become very difficult to read.

\documentclass[twocolumn]{article}
\usepackage{amsmath,graphicx}

\usepackage{lipsum} % for mock text

\begin{document}

\lipsum[1][1-4]
\[
\resizebox{\columnwidth}{!}{$\displaystyle
\frac{\hbar} {2} \begin{pmatrix}
 2 w_1 & 0 & \wp_{13} E_p e^{i \phi_p} & \wp_{14} E_a e^{i \phi_a}\\
 0 & 2 (-w_{p} + w_2 + w_{s}) & \wp_{23} E_c e^{\phi_c} & \wp_{24} E_s e^{i \phi_s} e^{i \Delta t}\\
 (\wp_{13} E_p e^{i \phi_p})^* & (\wp_{23} E_s e^{i \phi_s})^* & -2 w_p + 2 w_3 & 0\\
  (\wp_{14} E_a e^{i \phi_a})^* & (\wp_{24} E_c e^{i \phi_c})^* &  0 & -2 w_{s} + 2 w_4\\
\end{pmatrix}
$}
\]
\lipsum[2-6]

\end{document}

enter image description here

egreg
  • 1,121,712
  • Thank you for your answer. Any tips on what works for resize box? For example, you switched the arrayfunction to "pmatrix": was that because array doesn't talk well with resizebox, or for some other reason? – Steven Sagona Mar 07 '20 at 01:13
  • @StevenSagona I used pmatrix because it does a slightly better job and is easier to employ, not needing to specify the number of columns. – egreg Mar 07 '20 at 09:23