I'm using ShareLaTeX and I have pasted some text from Word into the tool. In some of these sections I am noticing an issue when I compile to PDF. Even though a blank line exists in the LaTeX coding, the compiled PDF does not create an indented new paragraph. It was working and then it stopped but I don't know why or how.

I've added a screen shot to show the code (middle) and how it's compiled (right). As you can see there I have blank spaces yet no indentations.

I've tried copying the text and pasting it into Notepad. This doesn't retain any of the line breaks at all--is it supposed to? I've also tried pasting the text back into Word, saving the file as a plaintext file with UT8 encoding. And the same result occurs when I paste it back into ShareLaTex from the .txt file that Word creates.

Okay, so I just tried creating a new project in ShareLaTeX and then I pasted the text into the new project. The indentation worked when I did that.

I'd love to post the document but it's literally my entire dissertation. It's large and it consists of multiple pages embedded in a master page. I'm certain this behavior has something to do with pasting from Word and I still don't know how to fix it.

I know that it's not a good practice to paste text from Word into ShareLaTex, but is there a workaround to scrub whatever formatting is causing this issue? Any ideas?

I'm trying to paste some code from the actual Notepad++ content. I've cut this text out of ShareLaTeX and pasted into Notepad++. I tried substituting /n with /n/n in Notepad++ based on a user suggestion. Still no luck.

Here is some content from my preamble, which comes from a template that was built 5 years ago by a graduate student I don't know. All of the documents I downloaded from this website.

%\usepackage{hyperref} %comment out for hardcopy

Next the preamble lays out several /newenvironment functions. And then there's a note on spacing, but the document won't double space regardless of what this function says...

%% To produce output with the desired line spacing, the argument of
%% \spacing should be multiplied by 5/6 = 0.8333, so that 1 1/2 spaced
%% corresponds to \spacing{1.5} and double spaced is \spacing{1.66}.
\def\normalspacing{1.5} % default line spacing

Next it lays out a bunch of \newcommand rules. From there the document begins for the 'front matter' of the dissertation--which includes some of the new commands.



\addcontentsline{toc}{chapter}{Certificate of Examination} 
\acknowlege{\makeacknowlege}    %as above
\addcontentsline{toc}{chapter}{Co-Authorship Statement}
\coauthor{\makecoauthor}  %comment this out if none


Next there's a note to insert the chapters here because they are in separate documents.

\include{Chapter etc etc}

Anyway, back to the original issue...I'm trying to paste some code from the actual Notepad++ content. I've cut this text out of ShareLaTeX and pasted into Notepad++. I tried substituting /n with /n/n in Notepad++ based on a user suggestion. Still no luck.

\chapter{Theoretical framework and methodology}
Test paragraph unit. 

Test paragraph unit 2. 

Test paragraph unit 3. 

I've pasted this text and some preamble from a section where the code is working...

Test paragraph1.

Test paragraph2. 

Test paragraph 3… 

EDIT: Add details plus screen shot. EDIT: Added code from chapter not indenting. Added code from chapter that is indenting.

screen shot showing that I have entered the blank lines but that the compiled text isn't indented

  • 1
    what does it produce? no paragraph at all (in which case the line endings were not recognised) or a paragraph with no indentation (in which case the indentation may be zero at that point due to tex settings unconnected with pasting from word? without an example impossible to guess Aug 26, 2015 at 22:58
  • 1
    (In response to a sub-question.) I believe (but can't test) that Notepad (the default plain text editor in Windows) does not preserve things like paragraph breaks by default. It really is a terrible editor. I would recommend using Notepad++. As for the main question, it is quite possible that some package or your .cls file is setting \parskip to 0pt; look for something like \parskip 0pt. Otherwise, we do need to see some minimal code that reproduces the problem.
    – jon
    Aug 27, 2015 at 3:36
  • 1
    ... and (umm, of course) by \parskip, I meant \parindent, which is what (also) seems to be set to 0.
    – jon
    Aug 27, 2015 at 3:48
  • 2
    Please show us what document class you use and what other settings you have in your preamble (this is best done in a MWE, but please make sure it is truly minimal, yet still reproduces the error). From what I can see in the screenshot (it isn't much, I admit) I would have expected everything to work fine. You have a lot of warnings/errors, though, (36); maybe one of those has a knock-on effect (that was a wild guess).
    – moewe
    Aug 27, 2015 at 4:38
  • 2
    Judging by the screenshot you posted, it looks like your ShareLaTeX document not only sets \parindent to 0pt, but also turns off full justification and, instead, executes \raggedright. Do show us the preamble of your document, because that's most likely where these parameters are set.
    – Mico
    Aug 27, 2015 at 4:42

3 Answers 3


Wow. Okay I figured it out. In the body of one of the chapters I wanted to move a book title to be all together on the next page. So I wrapped it in a


However it appears that somehow screwed up the formatting in the entire document. It even stopped paragraphs from indenting in different chapters. So this is a new question I guess . . . but why did this happen?

  • 6
    \raggedright is a switch, not a command that takes arguments. You should instead do {\raggedright randombooktitle} to limit the scope of the switch.
    – Adam Liter
    Aug 28, 2015 at 2:58
  • 3
    Or, type \begin{flushleft} randbooktitle \end{flushleft}\par.
    – Mico
    Aug 28, 2015 at 5:36

To take a wild guess, whatever markup word uses to indicate a paragraph break is rendered as a blank line by the on-screen shareLaTeX text editor, but not by TeX nor by notepad. Another wild guess at a work-around. Do a find/replace in Word to replace all of the paragraph breaks with some improbable text sequence (6843684684, for example), past the file into your text editor, then replace all of the occurrences of the improbable text sequence with \par. Or something like that.


Word uses only single carriage returns at end of paragraph.

Paste into notepad++ or some other decent free text editor

Replace single carriage returns by double returns

In Notepad++ the steps would be:

Search > Replace

Select "extended" in search field type \n in replace field type \n\n

start at the top and select replace all

  • Do you think that solves the problem? In the screen shot it looks like there is a blank line between paragraphs. So we already have \n\n.
    – moewe
    Aug 27, 2015 at 9:52
  • Well there are line returns and carriage returns. ^13 and ^10, CR and LF, Pasting from word into notepad my end does not give the line spaces shown by the question asker -- but that ain't a picture of notepad either. Aug 27, 2015 at 10:28
  • 1
    Likewise, at least with the version of word I use here, pasting into word does not give double line feeds in the sharelatex editor, so yes, you do need to add the extra \n which I think will work. Aug 27, 2015 at 10:41
  • Hey Aubrey. I'll try Notepad++ tonight and get back to you.
    – AllanM
    Aug 27, 2015 at 17:15
  • Indeed, when I copied text from word to sharelatex I got only one line break (and no blank line), but since in the screen shot we can see a blank line this really should not be an issue. (In fact, a short test I just ran showed that my TeX reacted exactly the same to all of those - even in one document. Although I assume that sharelatex is smart enough to normalise all line end formats (LF/CR LF/CR) so that it works in the end.) This might help with the work flow, but I still don't think it answers the TeXnical problem at hand.
    – moewe
    Aug 28, 2015 at 6:59

You must log in to answer this question.

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