2

My first problem was just trying to get the table to look OK. I did this by adding a "double align" (two &'s between elements) and a \tiny font size. When I put the table in landscape mode, I get a blank page before the table is displayed. I have tried fixing it by using many of the other answers to this problem, but none of them have worked.

Here is the partial code, without the complete table.

\begin{landscape}
\tiny
\setcounter{MaxMatrixCols}{80}
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\begin{alignat*}{80}
0,&&0,&&0,&&0,..........
....
....
\end{alignat*}

I realize there might not be an elegant solution to this, and that the table is probably overflowing. I am happy enough with the resut as it is displayed, but the blank page before it needs to be removed. How can I do this?

1 Answers1

1

Here I use a TABstack. Key points for the first MWE (alternative form given later in the answer):

  1. I invoke uniform column width with \fixTABwidth{T}

  2. One can set the column gap with \setstacktabbedgap{length}

  3. I have demonstrated a few 2-digit entries, to demonstrate right-alignment of matrix columns.

  4. If you don't like the parens on the matrix, replace \parenMatrixstack with a \tabbedCenterstack.

Here is the MWE.

\documentclass{article}
\usepackage[landscape]{geometry}
\usepackage{tabstackengine}
\stackMath
\setstacktabbedgap{3pt}
\fixTABwidth{T}
\begin{document}
\footnotesize\[
\parenMatrixstack[r]{
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,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0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~
}
\]
\end{document}

enter image description here


In response to the OP's comment about several wide columns, horizontal space can be conserved by turning off \fixTABwidth{T} and going from \footnotesize to \tiny. One can also reduce the value of \setstacktabbedgap.

\documentclass{article}
\usepackage[landscape]{geometry}
\usepackage{tabstackengine}
\stackMath
\setstacktabbedgap{2pt}
\begin{document}
\tiny\[
\tabbedCenterstack[r]{
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&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0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~
}
\]
\end{document}

enter image description here

If one needs for the matrix to exceed the horizontal margins in a symmetric fashion, one can force the extra-wide matrix into a box of the \textwidth:

\documentclass{article}
\usepackage{tabstackengine}
\stackMath
\setstacktabbedgap{2pt}
\setstackgap{L}{1.3\baselineskip}
\begin{document}
\noindent\hrulefill\par
Above shows the margin width
\tiny\[
\makebox[\textwidth]{\tabbedCenterstack[r]{
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&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0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~\\
0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&
   0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0,&0~
}}
\]
\end{document}

enter image description here

  • This looks like a step in the right direction. I should have mentioned in my original question that I have some 6 digit entries, which makes this solution overflow by a lot, even with \tiny, \setstacktabbedgap{1pt} and landscape. I think part of what made the alignat8 version OK was that I wasn't getting uniform colums. So the coulmns with entries that were all small, would just stay small. As is, the page cuts off at around the 25th column. – bigtextable Mar 03 '15 at 03:32
  • @bigtextable To make column widths fit the data, remove the fixTABwidths{T} macro. I will edit. – Steven B. Segletes Mar 03 '15 at 03:33
  • Great. It just baaaaaaaarely fits now, which is as good as I can hope for. Can I set a larger gap in between rows? – bigtextable Mar 03 '15 at 03:40
  • @bigtextable Does the "barely fit" refer to horizontal or vertical? There are methods for extending past margins on a case-by-case basis. – Steven B. Segletes Mar 03 '15 at 03:42
  • In landscape mode, I'm referring to the horizontal which is just barely fitting now. It looks like there is an inch between the last column and the page edge. I don't see how this can be improved, and it is good enough for me. I am asking about rows because I have extra space there that I would to use to make the table less crammed. – bigtextable Mar 03 '15 at 03:45
  • 1
    @bigtextable the vertical spacing can be adjusted or stretched by using \renewcommand{\Lstackgap}{1.5\baselineskip}. Increase or decrease the value 1.5\baselineskip as you wish. Place the renewcommand before \tabbedCenterstack[r]{. – corporal Mar 03 '15 at 04:23