0

In the following code I have mad a table but the table is to large for the page. I am wondering how I change the formatting of the page or table to make the table fit.

I have included a screenshot of my workenter image description here

\documentclass{article}
\usepackage{amsmath} 
\begin{document}
\[ J = 
\begin{bmatrix}
-\mu_H-\mu_{H-AVD}-\mu_{H-AND} - w     & \gamma e & 0 & 0 & 0 & 0 & 0 \\ 
w      & bp_H \frac{I_M}{N_H} - \gamma e -\mu_H & 0 & \sigma & 0 & 0 & -bp_H \frac{S_H}{N_H} \\ 
0      & bp_H \frac{I_M}{N_H} & - \left( \mu_H + \mu_{H-YF} +  r \right) & 0 & 0 & 0 & bp_H \frac{S_H}{N_H} \\ 
0      & 0 & r  & -\mu _ H - \sigma & 0 & 0 & 0 \\ 
    0      & 0 & -bp_H \frac{S_M}{N_H}  & 0 & -bp_M \frac{I_H}{N_H} - \mu_M & \alpha_M & \alpha_M \\ 
    0      & 0 & bp_M \frac{S_M}{N_H}  & 0 & bp_M \frac{I_H}{N_H} & -\beta -\mu_M & 0 \\ 
  0      & 0 & 0  & 0 & 0 & \beta & -\mu _M
\end{bmatrix}
\]

\end{document}
1
  • 1
    BTW, what kind are the indices? E.g. H-AND is a subtraction, where the product A * N * D is subtracted from H, or it is more textual, the minus is rather a hyphen and should be typeset as \text{H-AND}, for example? Mar 31, 2018 at 21:52

1 Answer 1

4

enter image description here

\documentclass{article}
\usepackage{amsmath} 
\begin{document}
\[ J = 
\begin{bmatrix}
A    & \gamma e & 0 & 0 & 0 & 0 & 0 \\ 
w      & B & 0 & \sigma & 0 & 0 & -bp_H \frac{S_H}{N_H} \\ 
0      & bp_H \frac{I_M}{N_H} & C & 0 & 0 & 0 & bp_H \frac{S_H}{N_H} \\ 
0      & 0 & r  & D & 0 & 0 & 0 \\ 
    0      & 0 & -bp_H \frac{S_M}{N_H}  & 0 & E & \alpha_M & \alpha_M \\ 
    0      & 0 & bp_M \frac{S_M}{N_H}  & 0 & bp_M \frac{I_H}{N_H} & F & 0 \\ 
  0      & 0 & 0  & 0 & 0 & \beta & G
\end{bmatrix}
\]
where
\begin{align*}
A&=-\mu_H-\mu_{H-AVD}-\mu_{H-AND} - w \\
B&=bp_H \frac{I_M}{N_H} - \gamma e -\mu_H\\
C&= - \left( \mu_H + \mu_{H-YF} +  r \right)\\
D&=-\mu _ H - \sigma\\
E&=-bp_M \frac{I_H}{N_H} - \mu_M\\
F&=-\beta -\mu_M\\
G&=-\mu _M
\end{align*}
\end{document}
4
  • 1
    you beat me for 11 second with the same answer as i prepare :-) +1
    – Zarko
    Mar 31, 2018 at 21:48
  • is there anyway to fit it all on one page though?
    – user123
    Mar 31, 2018 at 21:50
  • @user123 as one matrix? you need a bigger page or a font so small that no one can read it (latex will let you do either of those things, but do you really want to?) as above it fits on one page doesn't it? Mar 31, 2018 at 21:51
  • yes I think you have done it properly, thanks again!
    – user123
    Mar 31, 2018 at 21:54

You must log in to answer this question.

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