# Unwanted indent on numbered paragraphs

I'm writing a book and then using LaTeX to create a personal review version because I like to have a specific look when editing. (I'm just using article class. I'm a beginner at LaTeX .

I want the text with no indent, a single line between the paragraphs, and the paragraphs manually numbered with the number in the left margin. I can get the line break fine, but the manual numbering is causing a slight indent of each paragraph. The problem disappears when I remove my numbering, but I prefer to be able to number the paragraphs manually.

My poor code:

\documentclass{article}

%Page
\usepackage[a4paper, left=6cm, right=5cm, top=2.5cm, top=4cm, showframe=true]{geometry}
\setlength{\parindent}{0em}
\setlength{\parskip}{1em}

%Fonts
\usepackage{fontspec}
\setmainfont{Equity Text B}

%Numbering
\reversemarginpar
\newcounter{paranum}
\newcommand{\xx}{%
\leavevmode
\refstepcounter{paranum}
\marginpar{\normalsize\textbf{[\arabic{paranum}]}.}}

• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – samcarter_is_at_topanswers.xyz Feb 13 '17 at 12:46
• You are inserting a space after \refstepcounter{paranum}. – Ulrike Fischer Feb 13 '17 at 12:53

You have added a space here

\leavevmode
\refstepcounter{paranum} %<<<<< one word space


You need a % after } if you have a newline in the source there.

As David pointed out, it is problem of this tiny space.

Let me add some information here. If you make a new line, a space is added there.

This code

\mbox{}
\mbox{}
\mbox{}
T
e
x
t


produces

   T e x t


whereas

\mbox{}%
\mbox{}%
\mbox{}%
T%
e%
x%
t%


produces

Text


The % ignores ALL characters until endOfline including eol. So it also ignores the character, that produces a space.