latex

How To Use Landscape Page in LaTeX

A landscape mode on any document processor is essential in efficiently representing large images, tables, and texts. Portrait mode has a few limitations, such as being unable to fit wide photos. Technical documents like research papers require large tables and diagrams to provide in-depth information. That’s why document processors, like LaTeX, provide methods to turn your pages from portrait to landscape.

Read this tutorial if you are also interested in learning how to use a landscape page in LaTeX. This tutorial will explain creating and using a landscape page in LaTeX.

How To Use Landscape Page in LaTeX

To add a landscape page to your LaTeX document, you can use the lscape package and the following source code as an example:

\documentclass{article}
\usepackage{lscape}
\begin{document}
\begin{landscape}
\textbf{LaTeX has easy to use usepackage to create a landscape page}
\end{landscape}
\end{document}

Output:

As shown in the previous source code, you only require the \lscape usepackage and \begin{landscape} source to add information. To add an image on a landscape page, use the following source code:

\documentclass{article}
\usepackage{rotating}
\begin{document}
\begin{sideways}
\includegraphics[width=\textwidth]{Images/Linuxhint.jpg}
\end{sideways}
\end{document}

Output:

You can also rotate the table and other objects to show them on the landscape page. So, let’s take an example to rotate a table in the document processor:

\documentclass{article}
\usepackage{rotating}
\usepackage{lscape}
\begin{document}
\begin{landscape}
\centering
\label{tab: Details}
\begin{tabular}{ |c|c|c|c|c| }
       \hline
     Factors & A & B & C & D \\ \hline
     Amount  & 1 & 2 & 3 & 4 \\ \hline
\end{tabular}
\end{landscape}
\end{document}

Output:

You can also modify the previous source to add images and tables without manually turning them.

\documentclass{article}
\usepackage{rotating}
\usepackage{lscape}
\usepackage{graphics}
\begin{document}
\begin{landscape}
\centering
\includegraphics[width=0.8\textwidth]{Images/Linuxhint.jpg}
\label{fig: logo}
\label{tab: Details}
\begin{tabular}{ |c|c|c|c|c| }
       \hline
     Factors & A & B & C & D \\ \hline
     Amount  & 1 & 2 & 3 & 4 \\ \hline
\end{tabular}
\end{landscape}
\end{document}

Output:

Conclusion

In LaTeX, you can use the lscape usepackage to rotate a complete page or sideways to rotate a specific segment. However, if you only require a landscape, we recommend using the lscape usepackage. We hope the previous examples help you rotate elements or a page in your article, research paper, and any technical document.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.