I've created a table with http://www.tablesgenerator.com/ and wrapped it with
\afterpage{
\begin{landscape}
\begin{longtabu}{X}
to rotate the table and fit it to as many pages it needs.
My code looks like the following:
\afterpage{
\begin{landscape}
\begin{longtabu}{X}
\begin{tabularx}{0.5\textheight}{X|l}
\begin{tabular}{|l|l|l|l|l|l|l|l|}
% Header
% Content
\end{tabular}
\end{tabularx}
\end{longtabu}
\end{landscape}
}
The problem is: it's not being rotated and it's overflowing the page space. What should I do?
EDIT
I forgot to mention. The first lines of my document are:
\documentclass[a4paper,12pt,oneside,openany]{book}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{float}
\usepackage{listings}
\usepackage{color}
\usepackage{tabularx}
\restylefloat{table}
\usepackage{pdflscape}
\usepackage{longtable}
\usepackage{tabu}
\usepackage{afterpage}
\input{TesePack}
\begin{document}
\frontmatter
\thispagestyle{empty}
\input{Capa}
\cleardoublepage
\pagebreak
% Table of Contents
% ---------------------------------------------------------------
\tableofcontents
% ---------------------------------------------------------------
\mainmatter
\cleardoublepage
EDIT
Ok, maybe it's wasn't clear enough. The code it's here:
\documentclass[a4paper,12pt,oneside,openany]{book}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{float}
\usepackage{listings}
\usepackage{color}
\usepackage{tabularx}
\restylefloat{table}
\usepackage{pdflscape}
\usepackage{longtable}
\usepackage{tabu}
\usepackage{afterpage}
\input{TesePack}
\begin{document}
\frontmatter
\thispagestyle{empty}
\input{Capa}
\cleardoublepage
\pagebreak
% Table of Contents
% ---------------------------------------------------------------
\tableofcontents
% ---------------------------------------------------------------
\mainmatter
\cleardoublepage
% ---------------------------------------------------------------
% Chapter 1 - Descrição do estudo de caso
% ---------------------------------------------------------------
\chapter{Descrição do estudo de caso}
\label{descricao}
\input{descricao}
\end{document}
And the "descricao" file, which my table is included, it's here:
\afterpage{
\begin{landscape}
\begin{longtabu}{X}
\begin{tabularx}{0.5\textheight}{X|l}
\begin{tabular}{|l|l|l|l|l|l|l|l|}
\hline
\multicolumn{1}{|c}{\multirow{2}{*}{\textbf{Atividade de Suporte}}} & \multicolumn{1}{|c|}{\multirow{2}{*}{\textbf{Ligação com a cadeia de fornecedores (insumos)}}} & \multicolumn{5}{c}{\textbf{Atividades Primárias}} & \multicolumn{1}{|c|}{\multirow{2}{*}{\textbf{Ligação com a cadeia de distribuidores}}} \\ \cline{3-7}
& & \multicolumn{1}{|c}{\textbf{Logística Interna}} & \multicolumn{1}{|c}{\textbf{Operações}} & \multicolumn{1}{|c}{\textbf{Logística Externa}} & \multicolumn{1}{|c}{\textbf{Marketing e Vendas}} & \multicolumn{1}{|c|}{\textbf{Serviços}} & \\ \hline
\textbf{Aquisição} & Dados das Agências de Saúde & \begin{tabular}[c]{@{}c@{}}<span style="line-height: 1.5em;">Equipe</span>\\ <span style="line-height: 1.5em;">Hardware</span>\end{tabular} & Subentende-se a utilização de um software de gerenciamento do workflow & Não se aplica & Não se aplica & Realização de parcerias com Agências Internacionais de Saúde & Não se aplica \\ \hline
\textbf{Tecnologia e Desenvolvimento} & Agrega valor com os dados fornecidos das empresas parceiras & Transferência de tecnologia agregando valor ao conhecimento & Não se aplica & Não se aplica, pois o produto próprio & Não se aplica, pois o projeto está no inicio & Melhorar o algoritmo para dar mais precisão as previsões & Permitir um acesso mais rápido a informação sobre as previsões \\ \hline
\textbf{Administração de Recursos Humanos} & Estabelecer parcerias com agências de saúde & Recrutamento de profissionais qualificados & Manter atualização constante de treinamento especializado & Não se aplica & Não se aplica & Tornar transparente as formas de acesso dos clientes à empresa para a correção do problema & Não se aplica \\ \hline
\textbf{Sistemas de Administração} & Garantir a privacidade dos usuários & Controle dos dados fornecidos pelas Agências de Saúde & Acompanhamento dos dados atualizados sobre gripe no mundo & Não se aplica & Acompanhamento de notícias relacionadas ao produto para & Apresentação dos resuldados através do site próprio & Não se aplica \\ \hline
\end{tabular}
\end{tabularx}
\end{longtabu}
\end{landscape}
}
As I told in the comments section, I'm new to Latex, so I don't really know what I'm doing. I want to create a landscaped table and it's a long one. I've created the code with tablesgenerator.com, as I told you, and I though wrapping it around \begin{landscape} would rotate it. But it doesn't and I don't know why
\documentclass{...}
,\begin{document}
, and\end{document}
. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.