0

within my subsection I have a figure after which further text should follow. However, the text is shifted after the image and I don't know how to correct this. Here is the latex code:

\documentclass{article}
\usepackage{hyperref}
\usepackage[utf8]{inputenc}
\usepackage{outlines}
\usepackage{float}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{csquotes}% Recommended

\usepackage[style=authoryear-ibid,backend=biber]{biblatex}

\title{Title}

\author{...}

\date{26.02.2024}

\usepackage{graphicx}

\begin{document} \maketitle

\section{Sec1} \subsection{SubSec1} Text... \begin{figure}[H] \centering \includegraphics[width=1\textwidth]{example-image.png} \caption{...} \end{figure} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. \end{document}

enter image description here

David Carlisle
  • 757,742
Erbas
  • 1
  • 1
  • 2
    the image clearly isn't made by the code shown, but have you defined the non-standard H float type, if not you should get an error message and it will act as a normal float so "float" to a different position (which is the only reason to include anything in a figure environment) – David Carlisle Feb 26 '24 at 21:19
  • 1
    please try to give sensible tags to your question, neither overleaf nor biblatex are useful tags for this post. – David Carlisle Feb 26 '24 at 21:20
  • @DavidCarlisle this is literally the code of the shown image. I needed the H to put the picture in the middle of the section. Otherwise the image would be in front of the entire subsection – Erbas Feb 26 '24 at 21:22
  • no. Your input has Text and Text2 the output is mock latin Lorem Ipsum. You should provide a small complete document that shows the problem not a fragment we can not run and output from a different document. – David Carlisle Feb 26 '24 at 21:24
  • I didn't ask if you used H I asked if you had defined it. It is not a standard figure option. do you get an error saying it's not defined, did you load the float package (which is usually how people do define it). As you have shown no code it's impossible to guess. – David Carlisle Feb 26 '24 at 21:25
  • why do you need [H] why not the standard [htp] ? – David Carlisle Feb 26 '24 at 21:28
  • No i do not get an error and i load the float package. I updated the whole code. The problem occurs exactly like in the image with the following code – Erbas Feb 26 '24 at 21:28
  • Are you asking about the indentation at the start of the line? – samcarter_is_at_topanswers.xyz Feb 26 '24 at 21:28
  • When i use htp some of the Lorem ipsum text is shown above the image and some under it. – Erbas Feb 26 '24 at 21:29
  • Yes exactly @samcarter_is_at_topanswers.xyz – Erbas Feb 26 '24 at 21:29
  • your image was still not generated by the same document (figure 2...) I fixed it this time. – David Carlisle Feb 26 '24 at 21:32
  • This marks the start of a new paragraph. If you don't like this, you could use locally remove it with \noindent or you could change it globally e.g. by loading \usepackage{parskip} to replace the indent with some vertical space. – samcarter_is_at_topanswers.xyz Feb 26 '24 at 21:34
  • 1
    the indent is unrelated to the figure, every paragraph not following a section heading will be indented – David Carlisle Feb 26 '24 at 21:34
  • the parskip package worked. Thank you guys – Erbas Feb 26 '24 at 21:35

0 Answers0