1

I am having issues indenting.

Below is my code/text:

\documentclass[12pt]{report}
\usepackage{sectsty}
\begin{document}
\newpage
\allsectionsfont{\centering}
\setcounter{chapter}{0}
\begin{center}
  \chapter{Introduction}
\end{center}
\setlength{\parindent}{1.5em} \Indent A major feature of moral
psychology has been its focus on assessing moral judgments, with moral
judgments defined as an ``evaluation of the actions and character of
others'' (Avramova `I\&' Inbar, 2013). Taking influence from
philosophical questions, a typical design for moral judgment is to
present participants with a moral dilemma that involves choosing to
harm either one or many individuals. For example, a prevalent dilemma
used to study moral judgment is the trolley problem (Foot, 1967;
Thomson, 1986), in which a train conductor loses control of a train
that is hurtling towards five individuals repairing the track. A lone
individual is repairing the adjacent set of tracks. The conductor can
steer the trolley onto the adjacent tracks, but doing so would kill
the lone worker (Foot, 1967). Foot (1967) developed the problem the
query the difference between harm perpetrated with the direct
intention to inflict harm, compared to harm perpetrated as an
unintended effect of an act. Thomson (1975; 1985) followed with two
popular variants of the trolley problem. One variant is the \emph{Fat
  Man} in which pushing a fat individual over a footbridge is the only
way to stop the trolley (Thomson, 1975). The second variant is the
\emph{Bystander at the switch} in which a passerby comes upon the
scene and can divert the trolley towards the lone worker (Thomson,
1985). Findings suggest the act of switching the rails to adjacent
tracks in which one individual is killed to be more permissible than
pushing a man off a footbridge to stop the train (Hauser, Cushman,
Young, Jin, `I\&' Mikhail, 2007).
\end{document}

I would like to add an indent at the start of the paragraph so it reads:

     A major feature of moral psychology has been its focus on assessing moral
judgments, with moral judgments defined as.....

Oh, also I've read that LaTeX indents the first line automatically without requiring the \setlength....\indent... code. I tried that and it didn't work.

Au101
  • 10,278
  • 1
    don't do \begin{center} \chapter{Introduction} \end{center} !! \Indent is not defined by default? – David Carlisle Dec 24 '16 at 22:22
  • 2
    By default (following standard practice in many typographic disciplines) latex does not indent the first paragraph of each section. You can use the indentfirst package if you want to indent such paragraphs – David Carlisle Dec 24 '16 at 22:23
  • Welcome to TeX.SX! When adding code to the question, it's a good idea to highlight it and hit ctrl + k (or use the code sample button, which is the one that looks like {}). This will add the proper highlighting and everything. It will also interpret spaces and line breaks in the question literally and print them in the output (hence why I used it for your example of how the paragraph should look). Stackexchange uses a markdown system and it actually works a little bit like TeX in some ways, for example, a single line break is treated as a space and multiple spaces are treated as one space – Au101 Dec 24 '16 at 22:30
  • i've also taken the liberty of hard-wrapping your code for you so that it fits in the question horizontally and you don't have to scroll through. Otherwise, one paragraph with no hard line breaks in it will be treated as one massive long line, which you don't really want. Anyway, I'm a bit confused by `I&' -- what does that mean and do you really want 'I&' ? – Au101 Dec 24 '16 at 22:32
  • Hello @Au101

    The purpose of `I&' is to add the ampersand & into the text. Without it LaTeX gives me errors

    – user121761 Dec 24 '16 at 22:37
  • LaTeX will surely give you errors for just & but \I&'is very very bizarre, I don't know how it looks for you, but you just need&` – Au101 Dec 24 '16 at 22:38
  • I also wondered what I\& was supposed to mean, although I left it in my answer – David Carlisle Dec 24 '16 at 22:50
  • Hello. Thanks @Aug101 you are right. Works without the additional characters. I went literal with what LaTeX indicated I should use, which is why I added the quotation marks as well. – user121761 Dec 24 '16 at 23:39
  • No problem, we're asking because we genuinely wanna know how you came up with that idea so we can help, because, well, I couldn't imagine where you got that from! In any case, I think you must have slightly misunderstood the error message you got, although I'm not quite sure what that error message would have been, perhaps it came through an editor, because the standard error message I get is ! Misplaced alignment tab character &. – Au101 Dec 24 '16 at 23:47
  • 1
    @Au101 type h to that error and read the help text..... – David Carlisle Dec 24 '16 at 23:49
  • @werner well yes the question in the title is a duplicate but it seemed worth answering to fix the other issues. – David Carlisle Dec 24 '16 at 23:51
  • @DavidCarlisle: Agreed. – Werner Dec 24 '16 at 23:52
  • @DavidCarlisle Oh!! Tirefire, what that text means is that you should not edit your file and write, literally, `I&' . What it means is that, there and then, in the Terminal, you should type I and then type &. I is insert, it allows you to insert something at that point, one use only, and then & is what you're inserting, so it's a way of editing the code on the fly to replace & with &. This is a throwback to the days when compiling took ages, and starting all over again would have been a real nightmare. – Au101 Dec 24 '16 at 23:52
  • If you put \strut directly before the text that you wish to indent, does it help? Under certain circumstances it works for me, but that's not the same situation as your question. –  Dec 25 '16 at 02:09
  • @RobtA what???, no. – David Carlisle Dec 25 '16 at 11:19
  • @DavidCarlisle I discovered that indent may not be able to "push" against text that uses \smash. Placing \strut in front works. Obvious why, in that case. Wasn't sure if there were other situations. –  Dec 26 '16 at 16:40
  • @RobtA a \strut is for controlling vertical space issues any effect on indentation is more or less accidental but shouldn't really have \strut or \smash mid-document anyway:-) – David Carlisle Dec 26 '16 at 16:45
  • @DavidCarlisle Ah. I fix my bad code by adding more bad code. Thought it might work for someone else. Never mind. –  Dec 26 '16 at 23:03

1 Answers1

6

I added indentfirst and commented out some errors in the example.

\documentclass[12pt]{report}
\usepackage{sectsty}
\usepackage{indentfirst}
\begin{document}
% does nothing \newpage
\allsectionsfont{\centering}
% does nothing \setcounter{chapter}{0}
% no!\begin{center}
  \chapter{Introduction}
%no"\end{center}
% possible, but standard is already indented \setlength{\parindent}{1.5em} 
% undefined command \Indent 
A major feature of moral
psychology has been its focus on assessing moral judgments, with moral
judgments defined as an ``evaluation of the actions and character of
others'' (Avramova 
%`I\&'
\&
Inbar, 2013). Taking influence from
philosophical questions, a typical design for moral judgment is to
present participants with a moral dilemma that involves choosing to
harm either one or many individuals. For example, a prevalent dilemma
used to study moral judgment is the trolley problem (Foot, 1967;
Thomson, 1986), in which a train conductor loses control of a train
that is hurtling towards five individuals repairing the track. A lone
individual is repairing the adjacent set of tracks. The conductor can
steer the trolley onto the adjacent tracks, but doing so would kill
the lone worker (Foot, 1967). Foot (1967) developed the problem the
query the difference between harm perpetrated with the direct
intention to inflict harm, compared to harm perpetrated as an
unintended effect of an act. Thomson (1975; 1985) followed with two
popular variants of the trolley problem. One variant is the \emph{Fat
  Man} in which pushing a fat individual over a footbridge is the only
way to stop the trolley (Thomson, 1975). The second variant is the
\emph{Bystander at the switch} in which a passerby comes upon the
scene and can divert the trolley towards the lone worker (Thomson,
1985). Findings suggest the act of switching the rails to adjacent
tracks in which one individual is killed to be more permissible than
pushing a man off a footbridge to stop the train (Hauser, Cushman,
Young, Jin, 
%`I\&'
\&
Mikhail, 2007).
\end{document}
David Carlisle
  • 757,742
  • I am working on my thesis, and I open with – user121761 Dec 24 '16 at 23:40
  • a quotation in my first sentence. I read, in writing a quotation, I start with two single `` and end with two single ''. – user121761 Dec 24 '16 at 23:41
  • @Tirefire That much is correct, at least without loading extra passages. You should open quotes with `` and close with '' otherwise you will not get the correct curly quotes, you will have two "ninety-nines" as we would have said in primary school – Au101 Dec 24 '16 at 23:49
  • @David Later on in my thesis I have to show tables and and figures and such. How do I turn off the Indentfirst package? – user121761 Dec 25 '16 at 03:02
  • @Tirefire it doesn't really make sense to turn it on or off, the choice to indent the first paragraph of a section is a style choice independent of the document. tables and figures are normally centred anyway so indentation isn't relevant. – David Carlisle Dec 25 '16 at 11:18