1

I have a matrix size 25 and I need to rotate it in LaTeX so that it fits the page. How do I do??

PS.: I tried the landscape command, but it did not work because rotated the page but not its contents, that is, the array does not rotated.

Somebody help me??

My LaTex document:

\documentclass[a4paper, 12pt]{report}

\usepackage{graphicx,url}
\usepackage[active]{srcltx} %habilita busca reversa
\usepackage[brazil]{babel}
\usepackage[normalem]{ulem}
\usepackage{float}
\usepackage[latin1]{inputenc}
\usepackage{enumerate} %permite definir o tipo dos itens no ambiente enumerate
\usepackage{indentfirst, amsfonts, amsmath, amsthm, amssymb, amscd}
\usepackage{amsmath,amsfonts,amscd,bezier}
\usepackage[a4paper,left=1.5cm,right=1.5cm,top=2.5cm]{geometry}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{lscape}
\usepackage{pdflscape}

\begin{document}


$$\textbf{D}_{euc} = \left[
\begin{array}{cccccccccccccccccccccccc}

23.18 & & & & & & & & & & & & & & & & & & & & & & & \\

15.47 & 31.95 & 32.68 & 4.87 & 23.98 & 39.87 & 33.28 & 39.33 & 33.72
& 18.75 & 17.61 & 37.95 & 20.72 & 37.97 \\

\end{array}\right].$$

\end{document}
9
  • So this is a classical request for a minimal working example (MWE)
    – Holene
    Nov 29, 2015 at 2:42
  • Btw, Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    – Holene
    Nov 29, 2015 at 2:42
  • Sorry, I don't speak english very well. Nov 29, 2015 at 2:47
  • 2
    Submit the simplest code that produces or may illustrate your problem 😊
    – Holene
    Nov 29, 2015 at 3:02
  • 1
    Perhaps \rotatebox{90}{$\begin{array} \textbf{D}_{euc} = \left[ ... \end{array}\right].$}? Nov 29, 2015 at 5:37

1 Answer 1

1

The matrix in your MWE has size only 2x14, not 2x25, so it can be fit in normal page orientation:

\documentclass[a4paper, 12pt]{report}

\usepackage{graphicx}
%\usepackage[active]{srcltx} %habilita busca reversa
%\usepackage[brazil]{babel}
\usepackage[normalem]{ulem}
\usepackage{float}
\usepackage[latin1]{inputenc}
\usepackage{enumerate} %permite definir o tipo dos itens no ambiente enumerate
\usepackage{indentfirst, amsfonts, amsmath, amsthm, amssymb, amscd}
\usepackage{bezier}
\usepackage[a4paper,
            left=1.5cm,right=1.5cm,top=2.5cm,
            showframe]{geometry}
\usepackage{booktabs,multirow}
\usepackage{multicol}
\usepackage{lscape}
\usepackage{pdflscape}
\usepackage{url}

\setcounter{MaxMatrixCols}{20}% <---
\begin{document}

\[\setlength{\arraycolsep}{3pt}% <---
\mathbf{D}_{euc} = 
\begin{bmatrix}% <---
23.18 & & &   & & & &  & & & &  & & \\
15.47 & 31.95 & 32.68 & 4.87
    & 23.98 & 39.87 & 33.28 & 39.33
        & 33.72 & 18.75 & 17.61 & 37.95
            & 20.72 & 37.97         \\
\end{bmatrix}.
\]%end{equation}

\end{document}

In above MWE I commented out two of your packages which I haven't installed. As you can see, I use \bmatrix instead array. For which I increased the number of columns with \setcounter{MaxMatrixCols}{20} and also reduced inter-column space with \setlength{\arraycolsep}{3pt}. Result is:

enter image description here

If real matrices is really so big as you mentioned in your question, then you have two possibilities of how to write it:

1
  • @ak123, thank you for editing of my answer. Before it was in awful English :-(
    – Zarko
    Nov 29, 2015 at 13:37

You must log in to answer this question.

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