1

I have tables inserted in the starting of the section in landscape orientation, however the new section shows up only when a portrait page is in use. How should I fix this problem? The following is the link of the zip file wherein I am using ULL thesis class: https://interval.louisiana.edu/thesis-class/ULL-thesis-class-explanation.html

enter image description here Section 5.2 starts on portrait page (Pg. 406) enter image description here However section should start from Pg. 216. All pages before pg. 406 are landscape pages.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
%%%%landscape table %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{longtable} % for 'longtable' environment
\usepackage{everypage}
\newcommand{\Lpagenumber}{\ifdim\textwidth=\linewidth\else\bgroup
  \dimendef\margin=0 %use \margin instead of \dimen0
  \ifodd\value{page}\margin=\oddsidemargin
  \else\margin=\evensidemargin
  \fi
  \raisebox{\dimexpr -\topmargin-\headheight-\headsep-0.5\linewidth}[0pt][0pt]{%
    \rlap{\hspace{\dimexpr \margin+\textheight+\footskip}%
    \llap{\rotatebox{90}{\thepage}}}}%
\egroup\fi}
\AddEverypageHook{\Lpagenumber}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{trial1}
\author{Abhijeet Chodankar}
\date{June 2018}

\begin{document}

\maketitle

\section{Introduction}
\afterpage{%
    \clearpage% Flush earlier floats (otherwise order might not be correct)
   \thispagestyle{empty}% empty page style (?)
   \begin{landscape}% Landscape page
       \centering % Center table
\begin{table}[]
\centering
\caption{Natural frequency change patterns of Shear beam as the number of modes increases from n = 1 to n = 5 for axial compression load = $1.6*10^5$, $1.6*10^8$ N for stiffness increment value of $10^{13}$ $\frac{N}{m}$}
\label{tab:5.242}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
\textbf{} & \multicolumn{8}{c|}{\textbf{Change in Natural Frequency}} \\ \hline
\textbf{} & \multicolumn{2}{c|}{\textbf{cl = 1.5}} & \multicolumn{2}{c|}{\textbf{cl = 2}} & \multicolumn{2}{c|}{\textbf{cl = 2.5}} & \multicolumn{2}{c|}{\textbf{cl = 3}} \\ \hline
\textbf{Mode No} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -1.6*10\textasciicircum{}5\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -1.6*10\textasciicircum{}8\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P = \\ -1.6*10\textasciicircum{}5\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -1.6*10\textasciicircum{}8\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -1.6*10\textasciicircum{}5\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -1.6*10\textasciicircum{}8\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -1.6*10\textasciicircum{}5\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -1.6*10\textasciicircum{}8\end{tabular}} \\ \hline
1 &  &  &  &  &  &  &  &  \\ \hline
2 & constant & increase & increase & increase & constant & increase & constant & increase \\ \hline
3 & decrease & decrease & decrease & decrease & constant & decrease & constant & decrease \\ \hline
4 & constant & increase & constant & increase & constant & increase & constant & increase \\ \hline
5 & increase & increase & constant & increase & constant & increase & constant & increase \\ \hline
\end{tabular}
\end{table}
\begin{table}[]
\centering
\caption{Natural frequency change patterns of Shear beam as the number of modes increases from n = 1 to n = 5 for axial compression load = $2.4*10^5$, $2.4*10^8$ N for stiffness increment value of $10^{13}$ $\frac{N}{m}$}
\label{tab:5.243}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
\textbf{} & \multicolumn{8}{c|}{\textbf{Change in Natural Frequency}} \\ \hline
\textbf{} & \multicolumn{2}{c|}{\textbf{cl = 1.5}} & \multicolumn{2}{c|}{\textbf{cl = 2}} & \multicolumn{2}{c|}{\textbf{cl = 2.5}} & \multicolumn{2}{c|}{\textbf{cl = 3}} \\ \hline
\textbf{Mode No} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -2.4*10\textasciicircum{}5\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -2.4*10\textasciicircum{}8\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -2.4*10\textasciicircum{}5\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -2.4*10\textasciicircum{}8\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P = \\ -2.4*10\textasciicircum{}5\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -2.4*10\textasciicircum{}8\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -2.4*10\textasciicircum{}5\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}P =\\ -2.4*10\textasciicircum{}8\end{tabular}} \\ \hline
1 &  &  &  &  &  &  &  &  \\ \hline
2 & increase & increase & increase & increase & constant & increase & constant & increase \\ \hline
3 & decrease & decrease & decrease & decrease & constant & decrease & decrease & decrease \\ \hline
4 & constant & increase & constant & increase & constant & increase & constant & increase \\ \hline
5 & increase & increase & constant & increase & constant & increase & increase & increase \\ \hline
\end{tabular}
\end{table}
            \end{landscape}
   \clearpage% Flush page
}
\begin{figure}
\includegraphics[scale=0.25]{zero_papercutbalance.PNG}
\end{figure}
\end{document}

The figures are printed on portrait page. Since the section was started prior the tables were inserted and figures appear after the tables are placed, the section starts on the portrait page

  • 1
    please provide small but complete document which demonstrate your problem. – Zarko Jun 23 '18 at 19:35
  • I have elaborated and edited the question now – Abhijeet Jun 23 '18 at 19:46
  • 1
    sorry, this is only image of your document fragment, not code of document. this is not very helpful. we need short code beginning with \documentclass{...} and ending with \end{document} with some dummy text and tables, which we can compile. – Zarko Jun 23 '18 at 19:57
  • I won't be able to insert the entire code from documentclass since its a very large document. I have added a snippet of the code to elaborate the problem clearly. – Abhijeet Jun 23 '18 at 20:23
  • 1
    you have put the landscape table in \afterpage so it will be inserted after the current page is filled with normal text but in this example you have no text. As I said on your previous question you do not want \afterpage or \clearpage here. – David Carlisle Jun 23 '18 at 21:17
2

to long that can be comment ...

  • with small, but complete document, it is called minimal working example: mwe, is expected a document's code which looks like the following:

    \documentclass{article}
    \usepackage{graphicx}
    \usepackage{pdflscape}
    \usepackage{afterpage}
    
    \usepackage{lipsum}
    
    \begin{document}
    \section{first section}
    \lipsum[1-3]
    
    \section{second section}
    \afterpage{
    \begin{landscape}
        \begin{table}[htb]
    \caption{My landscape table}
        \begin{tabular*}{\linewidth}{|@{\extracolsep{\fill}}*{8}{c|}}
        \hline
    1   &   2   &   3   &  4   &   5   &   6   &   7   &   8   \\
        \hline
        \end{tabular*}
        \end{table}
    \end{landscape}
    }
    \lipsum[4-5]
    \begin{figure}[htb]
        \centering
    \includegraphics{example-image-duck}
    \caption{image which follows landscape table}
    \end{figure}
    \lipsum[6-7]
    
    \end{document}
    
  • please test this code and wee, if it gives result as you expected. if not, please describe, how result should differ from your expectation.

  • table on landscape page is inserted immediately after section title, which is on the portrait oriented page

  • in result, table is on new page, however after section tile is text which in code is after table.
  • here can arise mess, if you have immediately after table on landscape page a figure and if for it is not enough space after section title to be placed immediately after it. in such a case image will be placed after section title but on the new page before landscape page.
  • note: anything outside of landscape environment can not appear in its inside. landscape environment always start on the new page.
  • Say if the page before the new section begins is filled completely. The section should start on landscape page as the table is inserted before the figure. Since the previous page had some space left, the section got printed on the portrait page in your sample code. – Abhijeet Jun 23 '18 at 21:07
  • no, it is not in landscape environment! anything outside of landscape can not appear in it inside. and landscape always star new page. – Zarko Jun 23 '18 at 21:23
  • This clears my doubt. Thanks a ton, Zarko!!!!! I really appreciate your help and for your valuable time. – Abhijeet Jun 24 '18 at 2:19
  • @Abhijeet, if this answer help you, you can accept it (by clicking on check mark at the top left side of the answer). – Zarko Jun 24 '18 at 7:57
  • My reputation points is below 15, hence it doesn't allow me to vote. Thanks Zarko!! – Abhijeet Jun 27 '18 at 23:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.