When putting figures in my text, I always get weird, short, horizontal lines around the picture (see attached). I'm new to Latex, so I'm using very basic scripts to put figures in:
\begin{figure}[!ht] |\\
\centering|\\
\includegraphics[width=\textwidth]{fig/Knipsel2.PNG}|\\
\caption{Velocity components through the vehicle \cite{zhao-2006}}|\\
\label{fig:Velocity components through the vehicle}|\\
\end{figure}|
This is the script to the attached image.
Does anyone know how to fix it? Thanks!
Graphics, Figures & Tables ⇒ Weird lines around figures
-
- Posts: 2
- Joined: Thu Feb 24, 2022 5:49 pm
Weird lines around figures
- Attachments
-
- horizontal lines.PNG (53.65 KiB) Viewed 3462 times
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
Weird lines around figures
Without a correct as code marked
minimal working example I can only suggest to remove all the

|\\
from your code.Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. 

-
- Posts: 2
- Joined: Thu Feb 24, 2022 5:49 pm
Weird lines around figures
Aah yes indeed, I saw my mistake. I copied what uni gave as an example, (\verb| \begin{figure}[!ht] |\\) And I only deleted the \verb| part. So indeed, with the |\\ gone, it is fixed. Thanks a lot!Ijon Tichy wrote:Without a correct as code markedminimal working example I can only suggest to remove all the
|\\
from your code.