Page Layoutleft margin not able to set to zero

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
alain
Posts: 2
Joined: Mon Sep 26, 2022 12:10 pm

left margin not able to set to zero

Post by alain »

Hi,

I'm new to Latex world and I'm trying to understand why I can not set left margin to 0.
I read several tutorials on internet but none of them work in my case and I was thinking what's going wrong.

I want to use a A4 paper with no margin at top, left, right, bottom sides. So my code is:

Code: Select all

\documentclass{article}

\usepackage[a4paper,total={210mm,297mm},margin=0mm]{geometry}



\begin{document}
\hspace{0pt}Hello world
\end{document}
but the result includes left margin and I do not know from where it's coming:
Screenshot_20220926_121539.png
Screenshot_20220926_121539.png (32.26 KiB) Viewed 2731 times
I even tried to remove space between left margin and start of document with hspace command.

Any idea what is wrong ?
thx

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Bartman
Posts: 366
Joined: Fri Jan 03, 2020 2:39 pm

left margin not able to set to zero

Post by Bartman »

Nothing goes wrong.

The showframe option of the already used geometry package can show you that the margins have been set as specified.

The first line of a paragraph is always indented in a standard class. You can change this setting on a paragraph preceded by the \noindent command or use the parskip package.

The \hspace command with this argument allows hyphenation in the first word of the paragraph but doesn't affect its indentation.
Post Reply