# my matrix is not showing complete in pdf,

code is here

 $\setlength{\arraycolsep}{0pt} \renewcommand{\arraystretch}{0} \begin{pmatrix} \begin{array}{*{20}{c}} {x + \cosh \left[ {2t} \right]}&0&{\frac{{ - 3x + \sinh \left[ {2t} \right]}}{{\sqrt 2 }}}&0&{ - \frac{{x + \sinh \left[ {2t} \right]}}{{\sqrt 2 }}}&0\\ 0&{x + \cosh \left[ {2t} \right]}&0&{ - \frac{{ - 3x + \sinh \left[ {2t} \right]}}{{\sqrt 2 }}}&0&{\frac{{x + \sinh \left[ {2t} \right]}}{{\sqrt 2 }}}\\ {\frac{{ - 3x + \sinh \left[ {2t} \right]}}{{\sqrt 2 }}}&0&{\frac{1}{2}\left( {1 + 9x + \cosh \left[ {2t} \right]} \right)}&0&{\frac{1}{2}\left( {1 + 3x - \cosh \left[ {2t} \right]} \right)}&0\\ 0&{ - \frac{{ - 3x + \sinh \left[ {2t} \right]}}{{\sqrt 2 }}}&0&{\frac{1}{2}\left( {1 + 9x + \cosh \left[ {2t} \right]} \right)}&0&{\frac{1}{2}\left( {1 + 3x - \cosh \left[ {2t} \right]} \right)}\\ { - \frac{{x + \sinh \left[ {2t} \right]}}{{\sqrt 2 }}}&0&{\frac{1}{2}\left( {1 + 3x - \cosh \left[ {2t} \right]} \right)}&0&{\frac{1}{2}\left( {1 + x + \cosh \left[ {2t} \right]} \right)}&0\\ 0&{\frac{{x + \sinh \left[ {2t} \right]}}{{\sqrt 2 }}}&0&{\frac{1}{2}\left( {1 + 3x - \cosh \left[ {2t} \right]} \right)}&0&{\frac{1}{2}\left( {1 + x + \cosh \left[ {2t} \right]} \right)} \end{array} \end{pmatrix}$

• How much sense does an array inside a matrix make?
– user121799
Commented Jan 2, 2019 at 18:41
• Please turn this into a minimal working example. And what does this have to do with biblatex? Commented Jan 2, 2019 at 18:42
• last two column are missing in pdf Commented Jan 2, 2019 at 18:44
• @marmot last two coloumn are missing? Commented Jan 2, 2019 at 18:44
• @Teepeemm plzz help me to overcome this problem Commented Jan 2, 2019 at 18:51

it is simple to lost in your code fragment. i try to clean up only first three row, other i left to you that you clean-up others rows on the similar way as i do in the first three rows...

\documentclass{article}
\usepackage{nccmath}
\usepackage{makecell}

\begin{document}
$\setcellgapes{3pt} \makegapedcells \begin{pmatrix} x + \cosh[2t] & 0 & \mfrac{-3x + \sinh[2t]}{\sqrt{2}} & 0 & - \mfrac{x + \sinh[2t]}{\sqrt{2}} & 0 \\ 0 & x + \cosh[2] & 0 & - \mfrac{- 3x + \sinh[2t]}{\sqrt{2}} & 0 & \mfrac{x + \sinh[2t]}{\sqrt{2}} \\ 0 & x + \cosh[2] & 0 & - \mfrac{-3x + \sinh[2t]}{\sqrt{2}} & 0 & \mfrac{x + \sinh[2t]}{\sqrt{2}} \end{pmatrix}$
\end{document}


edit:

• package nccmath is used for medium size fractions (\mfrac) in the matrix
• package makecell is used for (unusual) determining vertical space between matrix rows
• note, the matrix is very wide, so it can happen that it will not be within text width. if this is a case, it might help to use math environment mmatrix, i.e.:

\left(\begin{mmatrix}  % <--- observe double m
<content of matrix>
\end{mmatrix}\right)


First of all to better show the whole matrix in your pdf sheet, I set the side margins to 1in with the geometry package:

\usepackage[margin=1in]{geometry}


After I have used the nicematrix package with the same strategy as on page 13 of the manual and of which I also enclose a screenshot.

The MWE output is:

\documentclass[a4paper,12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amssymb}
\usepackage{nicematrix}
\begin{document}
\begin{pNiceMatrix} x + \cosh[2t] & 0 & \dfrac{-3x + \sinh[2t]}{\sqrt{2}} & 0 &-\dfrac{x + \sinh[2t]}{\sqrt{2}} & 0\\ \noalign{\kern.5mm} 0 & x + \cosh[2] & 0 & -\dfrac{- 3x + \sinh[2t]}{\sqrt{2}} & 0 & \dfrac{x + \sinh[2t]}{\sqrt{2}}\\ \noalign{\kern.5mm} 0 & x + \cosh[2] & 0 & -\dfrac{-3x + \sinh[2t]}{\sqrt{2}} & 0 & \dfrac{x + \sinh[2t]}{\sqrt{2}} \end{pNiceMatrix}
\end{document}


You have a very bulky matrix with repeating entries. So you may typeset it as

\documentclass[fleqn]{article}
\usepackage{amsmath}
\begin{document}
$\begin{pmatrix} a&0&b&0&-e&0\\ 0&a&0&b&0&e\\ b&0&c&0&d&0\\ 0&b&0&c&0&d\\ -e&0&d&0&f&0\\ 0&e&0&d&0&f \end{pmatrix}$
where
\begin{align*}
a&=x + \cosh \left[ {2t} \right]\;, &
b&=\frac{{ - 3x + \sinh \left[ {2t} \right]}}{{\sqrt 2 }}\;,\\
c&=\frac{1}{2}\left( {1 + 9x + \cosh \left[ {2t} \right]} \right)\;, &
d&=\frac{1}{2}\left( {1 + 3x - \cosh \left[ {2t} \right]} \right)\;,\\
e&=  \frac{{x + \sinh \left[ {2t} \right]}}{{\sqrt 2 }}\;,&
f&=\frac{1}{2}\left( {1 + x + \cosh \left[ {2t} \right]} \right)\;.
\end{align*}
\end{document}


This solves the problem and makes the readers a bit happier. Of course, you could write it as block matrix of 2x2 matrices to further improve the presentation,

\documentclass[fleqn]{article}
\usepackage{amsmath}
\DeclareMathOperator{\diag}{diag}
\begin{document}
$\begin{pmatrix} A & B & E\\ B & C & D \\ E & D & F \\ \end{pmatrix}$
where $A=\diag(a,a)$, $B=\diag(b,b)$, $C=\diag(c,c)$, $D=\diag(d,d)$,
$E=\diag(e,-e)$ and $F=\diag(f,f)$ with
\begin{align*}
a&=x + \cosh \left[ {2t} \right]\;, &
b&=\frac{{ - 3x + \sinh \left[ {2t} \right]}}{{\sqrt 2 }}\;,\\
c&=\frac{1}{2}\left( {1 + 9x + \cosh \left[ {2t} \right]} \right)\;, &
d&=\frac{1}{2}\left( {1 + 3x - \cosh \left[ {2t} \right]} \right)\;,\\
e&=  \frac{{x + \sinh \left[ {2t} \right]}}{{\sqrt 2 }}\;,&
f&=\frac{1}{2}\left( {1 + x + \cosh \left[ {2t} \right]} \right)\;.
\end{align*}
\end{document}


• It may be better to say $A=(x+cosh[2t])I_2$, etc. And maybe $E=diag(1,-1)(x+sinh[2t])/\sqrt2$. Commented Jan 4, 2019 at 4:49