1

I want to have more control over the placement of a figure in a landscape orientation. For some reason the usual options (t, b, etc.) have no effect in my document. Latex just places it at the bottom of the page. Specifically I would like to know:

  1. How can you edit the vertical and horizontal alignment. Currently I can only shove the picture into the middle with \centering but would like to place it anywhere I like (particularly I want to align it at the top so that when printed the space between the left side of the paper is like the text in non-landscape orientation)
  2. How can I align the caption so that it sits flush with the side of the image? Currently I can only get it to go right to the edge of the page

.

\documentclass[12pt,a4paper,oneside]{scrartcl}

\usepackage{graphicx}
\usepackage{lscape}
\usepackage{pdflscape}
\usepackage[bf,hang,nooneline,justification=justified]{caption}

\begin{document}

\begin{landscape}
    \begin{figure}[t]
        \centering
        \includegraphics[width=\textwidth]{example-image-duck}
        \caption{Caption}
        \label{fig:my_label}
    \end{figure}
\end{landscape}

\clearpage

\end{document}
8
  • Example Project: overleaf.com/read/nhvkjgxpdcqy
    – Lukas
    May 14, 2021 at 11:29
  • 1
    Please, provide minimal example of your document, which reproduce your problem, in the question. After while your link can be death and people will not able to see, what is your problem.
    – Zarko
    May 14, 2021 at 11:36
  • @Zarko I added a comment but now it is in the question too :)
    – Lukas
    May 14, 2021 at 12:14
  • 1
    No link, please code of small but complete, self contained document!!! Copy it from your LaTeX editor (or from Overleaf, if you use it) and past it in your question. As I ask you in my first comment. People here (including me) are reluctant to browse for some MWE or additional information. Please help us to help you.
    – Zarko
    May 14, 2021 at 12:43
  • Now is better! Thank you for providing MWE! Do you have only image in this page? Why use in landscape orientation of page if image can be fit in portrait page?
    – Zarko
    May 14, 2021 at 13:16

2 Answers 2

1

It is not enterally clear what is your problem. Placement options for figure have sense, if on the page is present also a some text. In such a case options h and t works as expected, b doesn't work. Option p always put figure on the middle of the page.

If for some reason you like to have only image on the page at its top left side, than after \end{figure} insert \mbox{}

One example based on guessing what is your problem:

enter image description here

\documentclass[12pt,a4paper,oneside]{scrartcl}
\usepackage{graphicx}
\usepackage{pdflscape}
\usepackage[labelfont=bf,justification=justified]{caption}

\usepackage{lipsum}    % for dummy text
\begin{document}

\begin{landscape}
\lipsum[1]
\begin{figure}[t]
    \begin{minipage}{\textwidth}
        \includegraphics[width=\linewidth, height=0.5\linewidth]{example-image-duck}
        \caption{\lipsum[66]}
        \label{fig:my_label}
   \end{minipage}
    \end{figure}
\end{landscape}

\begin{landscape}
\begin{figure}[t]
    \begin{minipage}{\textwidth}
        \includegraphics[width=\linewidth, height=0.5\linewidth]{example-image-duck}
        \caption{\lipsum[66]}
        \label{fig:my_label}
   \end{minipage}
    \end{figure}
\mbox{}
\end{landscape}

\end{document}

Edit: From you comments can be concluded, that you after following (what you already get with your MWE):

enter image description here

\documentclass[12pt,a4paper,oneside]{scrartcl}
\usepackage{graphicx}
\usepackage{pdflscape}
\usepackage[labelfont=bf,justification=justified]{caption}

\usepackage{lipsum}    % for dummy text
\begin{document}

\begin{landscape}
\begin{figure}[hp]
        \includegraphics[width=\linewidth, height=0.5\linewidth]{example-image-duck}
        \caption{\lipsum[66]}
        \label{fig:my_label}
    \end{figure}

\begin{figure}[hp]
        \includegraphics[width=\linewidth, height=0.5\linewidth]{example-image-duck}
        
\begin{minipage}{\textwidth}
        \caption{\lipsum[66]}
        \label{fig:my_label}
\end{minipage}
     \end{figure}
\end{landscape}

\end{document}
1

If You want full page picture and captio try this code:

\documentclass[12pt,a4paper,oneside,landscape]{scrartcl}

\usepackage{graphicx}
\usepackage{lscape}
\usepackage{pdflscape}
\usepackage[bf,hang,nooneline,justification=justified,font=small,skip=18pt]{caption}

\usepackage[margin=0cm]{geometry}
\begin{document}
        \begin{figure}[t]
            \centering
            \vspace*{-.35cm}
            \includegraphics[width=\textwidth]{example-image-duck}
            \caption{Quisque ullamcorper placerat ipsum. Cras nibh. Morbi vel justo vitae lacus tincidunt ult rices. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Inhac habitasse platea dictumst. Integer tempus convallis augue. Etiam facilisis.Nunc elementum fermentum wisi. Aenean placerat. Ut imperdiet, enim sed              gravida sollicitudin, felis odio placerat quam, ac pulvinar elit purus eget enim. Nunc vitae tortor.Aenean placerat. Ut imperdiet, enim sed gravida sollicitudin, felis odio placerat quam, ac pulvinar elit purus eget enim.}
            \vspace{-.3cm}
            \label{fig:my_label}
        \end{figure}
    \clearpage  
\end{document}

Output:

enter image description here

You can joke with \vspace and skip to suit your real image and caption lenght.

You must log in to answer this question.

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