2

I'm trying to use LaTeX, fresh install of MiKTeX and TeXworks, and so far looking this issue up I get:

  • "Use double spaces after paragraphs", which I'm already doing.
  • \parindent parameter must be set, which I put

    \setlength{\parindent}{24 pt}
    

in the preamble, and still there's no indent.

  • Put

    \usepackage{indentfirst}
    

in the preamble, and no indents.

  • Use \indent (which doesn't do anything either)

I've been using Wikibooks as a reference. I've been at this for a while, and my document has it's images and other formatting, but one of the only things that's making it incomplete is the lack of indents.

If it helps, my preamble looks like:

\documentclass{report}
\usepackage[margin=0.5in]{geometry}
\usepackage{xcolor}  % different font colors.
\usepackage{fontspec}% use system installed fonts.
\usepackage{graphicx}% import images.
\usepackage{multirow}% tables with nonuniform row:columns.
\usepackage{multicol}% dual column for text body.
\usepackage{indentfirst}
\usepackage[bookmarks]{hyperref}%
% suppress section numbering
% this is so bookmarks appear from hyperref
% and still have no numbering.
\makeatletter
\renewcommand\@seccntformat[1]{}
\makeatother
% for indenting
% default is 15pt.
\setlength{\parindent}{24 pt}
\setmainfont{Times New Roman}
\graphicspath{{images/}}

Minimal example:

\documentclass{report}  
\usepackage[margin=0.5in]{geometry}  
\usepackage{xcolor}  
\usepackage{multicol}  
\usepackage{indentfirst}  
\setlength{\parindent}{24 pt}  

\begin{document}
\pagecolor[rgb]{0,0,0}
\color{white}
\raggedright

\begin{multicols}{2}

    first filler paragraph filler   filler  filler  filler  filler  filler  filler  filler.


    second filler paragraph filler  filler  filler  filler  filler  filler  filler  filler.


    third filler paragraph filler filler    filler  filler  filler  filler  filler  filler.


\end{multicols}
\end{document}

Looks like compiled on my end

  • 1
    If you are asking about indenting a paragraph it would be more helpful to show an example of a paragraph rather than examples setting graphicspath etc. You are using indentfirst so all paragraphs should normally be indented (except in minipages and parboxes where it defaults to 0) if you are not seeing that, make a small complete example that shows the problem. – David Carlisle Dec 20 '15 at 13:38
  • 1
    Oh note that indent is the horizontal space at the start of teh first line. Your refer to "double space after paragraph" the vertical space beyween paragraphs is \parskip not \parindent. – David Carlisle Dec 20 '15 at 13:40
  • Welcome, can you please collect all the snippets in a compilable example? That way, we see the same output you see. – Johannes_B Dec 20 '15 at 13:48
  • 1
    @amph It's not the text that's important, it's having a short example that reproduces the problem: see details on creating a minimal working example (MWE) – Joseph Wright Dec 20 '15 at 13:59
  • 1
    \raggedright sets the parindent to 0. see why we need an example, your original question did not mention that. – David Carlisle Dec 20 '15 at 16:43
3

Use the ragged2e package: it allows for some hyphenation, and defines a \RaggedRightParindent length (0pt by default):

\documentclass{report}
\usepackage[margin=0.5in]{geometry}
\usepackage{xcolor}
\usepackage{multicol}
\usepackage{indentfirst}
\usepackage{ragged2e}
\RaggedRightParindent = 24 pt

\begin{document}

\RaggedRight
\begin{multicols}{2}

   First filler paragraph filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler.

    Second filler paragraph filler filler filler filler filler filler filler filler.

   Third filler paragraph filler filler filler filler filler filler filler filler.

\end{multicols}

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.