Why does indent disappear in lists?
Consider this small document:
documentclass{article}
usepackage{blindtext}
begin{document}
blindtext
blindtext
begin{enumerate}
item%
blindtext
blindtext
end{enumerate}
end{document}
This has two paragraphs outside a list environment, and two paragraphs inside a list environment. I've noticed in this situation that paragraphs outside lists have their first line indented, whereas paragraphs inside lists do not have any indent:
Why does this occur? Can I restore the indentation inside a list?
EDIT: I notice that in lists, by default paragraphs are separated by blank lines. Preferably a solution should also get rid of that. (For context, I'm writing up a solution to an assignment, and nearly every paragraph is inside an enumerate
or similar.)
lists indentation paragraphs
New contributor
add a comment |
Consider this small document:
documentclass{article}
usepackage{blindtext}
begin{document}
blindtext
blindtext
begin{enumerate}
item%
blindtext
blindtext
end{enumerate}
end{document}
This has two paragraphs outside a list environment, and two paragraphs inside a list environment. I've noticed in this situation that paragraphs outside lists have their first line indented, whereas paragraphs inside lists do not have any indent:
Why does this occur? Can I restore the indentation inside a list?
EDIT: I notice that in lists, by default paragraphs are separated by blank lines. Preferably a solution should also get rid of that. (For context, I'm writing up a solution to an assignment, and nearly every paragraph is inside an enumerate
or similar.)
lists indentation paragraphs
New contributor
2
Welcome to TeX.SE!
– Kurt
Mar 28 at 1:06
2
"why" questions are hard to answer, the list paragraph shape is settable as are the outer paragraphs the standard latex classes chose choose that layout as presumably the original author preferred it that way. you can set listparindent` and other list parameters to achieve other shapes
– David Carlisle
Mar 28 at 1:23
@Kurt Thank you!
– bradrn
Mar 28 at 1:24
add a comment |
Consider this small document:
documentclass{article}
usepackage{blindtext}
begin{document}
blindtext
blindtext
begin{enumerate}
item%
blindtext
blindtext
end{enumerate}
end{document}
This has two paragraphs outside a list environment, and two paragraphs inside a list environment. I've noticed in this situation that paragraphs outside lists have their first line indented, whereas paragraphs inside lists do not have any indent:
Why does this occur? Can I restore the indentation inside a list?
EDIT: I notice that in lists, by default paragraphs are separated by blank lines. Preferably a solution should also get rid of that. (For context, I'm writing up a solution to an assignment, and nearly every paragraph is inside an enumerate
or similar.)
lists indentation paragraphs
New contributor
Consider this small document:
documentclass{article}
usepackage{blindtext}
begin{document}
blindtext
blindtext
begin{enumerate}
item%
blindtext
blindtext
end{enumerate}
end{document}
This has two paragraphs outside a list environment, and two paragraphs inside a list environment. I've noticed in this situation that paragraphs outside lists have their first line indented, whereas paragraphs inside lists do not have any indent:
Why does this occur? Can I restore the indentation inside a list?
EDIT: I notice that in lists, by default paragraphs are separated by blank lines. Preferably a solution should also get rid of that. (For context, I'm writing up a solution to an assignment, and nearly every paragraph is inside an enumerate
or similar.)
lists indentation paragraphs
lists indentation paragraphs
New contributor
New contributor
edited Mar 28 at 1:00
bradrn
New contributor
asked Mar 28 at 0:31
bradrnbradrn
1186
1186
New contributor
New contributor
2
Welcome to TeX.SE!
– Kurt
Mar 28 at 1:06
2
"why" questions are hard to answer, the list paragraph shape is settable as are the outer paragraphs the standard latex classes chose choose that layout as presumably the original author preferred it that way. you can set listparindent` and other list parameters to achieve other shapes
– David Carlisle
Mar 28 at 1:23
@Kurt Thank you!
– bradrn
Mar 28 at 1:24
add a comment |
2
Welcome to TeX.SE!
– Kurt
Mar 28 at 1:06
2
"why" questions are hard to answer, the list paragraph shape is settable as are the outer paragraphs the standard latex classes chose choose that layout as presumably the original author preferred it that way. you can set listparindent` and other list parameters to achieve other shapes
– David Carlisle
Mar 28 at 1:23
@Kurt Thank you!
– bradrn
Mar 28 at 1:24
2
2
Welcome to TeX.SE!
– Kurt
Mar 28 at 1:06
Welcome to TeX.SE!
– Kurt
Mar 28 at 1:06
2
2
"why" questions are hard to answer, the list paragraph shape is settable as are the outer paragraphs the standard latex classes chose choose that layout as presumably the original author preferred it that way. you can set listparindent` and other list parameters to achieve other shapes
– David Carlisle
Mar 28 at 1:23
"why" questions are hard to answer, the list paragraph shape is settable as are the outer paragraphs the standard latex classes chose choose that layout as presumably the original author preferred it that way. you can set listparindent` and other list parameters to achieve other shapes
– David Carlisle
Mar 28 at 1:23
@Kurt Thank you!
– bradrn
Mar 28 at 1:24
@Kurt Thank you!
– bradrn
Mar 28 at 1:24
add a comment |
2 Answers
2
active
oldest
votes
item
properties can be formatted with enumitem
. Then you can use listparindent
for enumerate
environment:
documentclass{article}
usepackage{blindtext}
usepackage{enumitem}
setlist[enumerate]{parsep=0pt}
begin{document}
blindtext
blindtext
begin{enumerate}[listparindent=1.5em]
item
blindtext
blindtext
end{enumerate}
end{document}
EDIT: Thanks to @David, you can also set parsep
to 0
if you want to get rid of that space.
Nice! Unfortunately, this doesn't entirely answer my question: I also asked why this behaviour happens. I also notice that this method still preserves that extra horizontal space between paragraphs in the list; do you have any idea how to get rid of that?
– bradrn
Mar 28 at 0:56
@bradrn AFAIKenumerate
is kind of old andenumitem
gives you more advantage and options comparing to list environments such asitemize
andenumerate
. However my understanding isenumerate
eliminates the paragraph indentation by default. Regarding that horizontal space, I'll have a look.
– Majid Abdolshah
Mar 28 at 1:16
@bradrn You can always use something like thisvspace{-0.1cm}
after the paragraph. But it's not the best solution of course.
– Majid Abdolshah
Mar 28 at 1:24
@bradrn the paragraph space isparsep
(orparsep
in the enumitem interface) so you can set that to 0pt
– David Carlisle
Mar 28 at 1:26
1
@MajidAbdolshah In my 'real' code, I'm already usingenumitem
.
– bradrn
Mar 28 at 1:27
|
show 1 more comment
The reason for this behaviour is that inside enumerate
the length parindent
is set to zero. So you can not use a simple indent
as usual in normal text to get the space of parindent
set.
You can simulate the ususal behaviour in normal text with the following code (See <=====
for important code):
documentclass{article}
usepackage{blindtext}
usepackage{enumitem} % <===============================================
newlength{enumerateparindent} % <=====================================
begin{document}
setlength{enumerateparindent}{parindent} % <=========================
blindtext
blindtext
begin{enumerate}
setlength{parindent}{enumerateparindent} % <=========================
%showparindent
%value{parindent}
item%
blindtext
blindtext
end{enumerate}
Version 2:
begin{enumerate}[listparindent=enumerateparindent] % <================
item%
blindtext
blindtext
end{enumerate}
end{document}
and the wished result:
Please see that setlength{parindent}{enumerateparindent}
does only work in that enumerate
list you placed the command inside ...
If you are already using package enumitem
-- as mentioned in an comment -- you can use it to use the same indent defined in parindent
with version 2 in my mwe.
The you get the resulting version 2:
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
bradrn is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f481815%2fwhy-does-indent-disappear-in-lists%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
item
properties can be formatted with enumitem
. Then you can use listparindent
for enumerate
environment:
documentclass{article}
usepackage{blindtext}
usepackage{enumitem}
setlist[enumerate]{parsep=0pt}
begin{document}
blindtext
blindtext
begin{enumerate}[listparindent=1.5em]
item
blindtext
blindtext
end{enumerate}
end{document}
EDIT: Thanks to @David, you can also set parsep
to 0
if you want to get rid of that space.
Nice! Unfortunately, this doesn't entirely answer my question: I also asked why this behaviour happens. I also notice that this method still preserves that extra horizontal space between paragraphs in the list; do you have any idea how to get rid of that?
– bradrn
Mar 28 at 0:56
@bradrn AFAIKenumerate
is kind of old andenumitem
gives you more advantage and options comparing to list environments such asitemize
andenumerate
. However my understanding isenumerate
eliminates the paragraph indentation by default. Regarding that horizontal space, I'll have a look.
– Majid Abdolshah
Mar 28 at 1:16
@bradrn You can always use something like thisvspace{-0.1cm}
after the paragraph. But it's not the best solution of course.
– Majid Abdolshah
Mar 28 at 1:24
@bradrn the paragraph space isparsep
(orparsep
in the enumitem interface) so you can set that to 0pt
– David Carlisle
Mar 28 at 1:26
1
@MajidAbdolshah In my 'real' code, I'm already usingenumitem
.
– bradrn
Mar 28 at 1:27
|
show 1 more comment
item
properties can be formatted with enumitem
. Then you can use listparindent
for enumerate
environment:
documentclass{article}
usepackage{blindtext}
usepackage{enumitem}
setlist[enumerate]{parsep=0pt}
begin{document}
blindtext
blindtext
begin{enumerate}[listparindent=1.5em]
item
blindtext
blindtext
end{enumerate}
end{document}
EDIT: Thanks to @David, you can also set parsep
to 0
if you want to get rid of that space.
Nice! Unfortunately, this doesn't entirely answer my question: I also asked why this behaviour happens. I also notice that this method still preserves that extra horizontal space between paragraphs in the list; do you have any idea how to get rid of that?
– bradrn
Mar 28 at 0:56
@bradrn AFAIKenumerate
is kind of old andenumitem
gives you more advantage and options comparing to list environments such asitemize
andenumerate
. However my understanding isenumerate
eliminates the paragraph indentation by default. Regarding that horizontal space, I'll have a look.
– Majid Abdolshah
Mar 28 at 1:16
@bradrn You can always use something like thisvspace{-0.1cm}
after the paragraph. But it's not the best solution of course.
– Majid Abdolshah
Mar 28 at 1:24
@bradrn the paragraph space isparsep
(orparsep
in the enumitem interface) so you can set that to 0pt
– David Carlisle
Mar 28 at 1:26
1
@MajidAbdolshah In my 'real' code, I'm already usingenumitem
.
– bradrn
Mar 28 at 1:27
|
show 1 more comment
item
properties can be formatted with enumitem
. Then you can use listparindent
for enumerate
environment:
documentclass{article}
usepackage{blindtext}
usepackage{enumitem}
setlist[enumerate]{parsep=0pt}
begin{document}
blindtext
blindtext
begin{enumerate}[listparindent=1.5em]
item
blindtext
blindtext
end{enumerate}
end{document}
EDIT: Thanks to @David, you can also set parsep
to 0
if you want to get rid of that space.
item
properties can be formatted with enumitem
. Then you can use listparindent
for enumerate
environment:
documentclass{article}
usepackage{blindtext}
usepackage{enumitem}
setlist[enumerate]{parsep=0pt}
begin{document}
blindtext
blindtext
begin{enumerate}[listparindent=1.5em]
item
blindtext
blindtext
end{enumerate}
end{document}
EDIT: Thanks to @David, you can also set parsep
to 0
if you want to get rid of that space.
edited Mar 28 at 1:35
answered Mar 28 at 0:50
Majid AbdolshahMajid Abdolshah
71828
71828
Nice! Unfortunately, this doesn't entirely answer my question: I also asked why this behaviour happens. I also notice that this method still preserves that extra horizontal space between paragraphs in the list; do you have any idea how to get rid of that?
– bradrn
Mar 28 at 0:56
@bradrn AFAIKenumerate
is kind of old andenumitem
gives you more advantage and options comparing to list environments such asitemize
andenumerate
. However my understanding isenumerate
eliminates the paragraph indentation by default. Regarding that horizontal space, I'll have a look.
– Majid Abdolshah
Mar 28 at 1:16
@bradrn You can always use something like thisvspace{-0.1cm}
after the paragraph. But it's not the best solution of course.
– Majid Abdolshah
Mar 28 at 1:24
@bradrn the paragraph space isparsep
(orparsep
in the enumitem interface) so you can set that to 0pt
– David Carlisle
Mar 28 at 1:26
1
@MajidAbdolshah In my 'real' code, I'm already usingenumitem
.
– bradrn
Mar 28 at 1:27
|
show 1 more comment
Nice! Unfortunately, this doesn't entirely answer my question: I also asked why this behaviour happens. I also notice that this method still preserves that extra horizontal space between paragraphs in the list; do you have any idea how to get rid of that?
– bradrn
Mar 28 at 0:56
@bradrn AFAIKenumerate
is kind of old andenumitem
gives you more advantage and options comparing to list environments such asitemize
andenumerate
. However my understanding isenumerate
eliminates the paragraph indentation by default. Regarding that horizontal space, I'll have a look.
– Majid Abdolshah
Mar 28 at 1:16
@bradrn You can always use something like thisvspace{-0.1cm}
after the paragraph. But it's not the best solution of course.
– Majid Abdolshah
Mar 28 at 1:24
@bradrn the paragraph space isparsep
(orparsep
in the enumitem interface) so you can set that to 0pt
– David Carlisle
Mar 28 at 1:26
1
@MajidAbdolshah In my 'real' code, I'm already usingenumitem
.
– bradrn
Mar 28 at 1:27
Nice! Unfortunately, this doesn't entirely answer my question: I also asked why this behaviour happens. I also notice that this method still preserves that extra horizontal space between paragraphs in the list; do you have any idea how to get rid of that?
– bradrn
Mar 28 at 0:56
Nice! Unfortunately, this doesn't entirely answer my question: I also asked why this behaviour happens. I also notice that this method still preserves that extra horizontal space between paragraphs in the list; do you have any idea how to get rid of that?
– bradrn
Mar 28 at 0:56
@bradrn AFAIK
enumerate
is kind of old and enumitem
gives you more advantage and options comparing to list environments such as itemize
and enumerate
. However my understanding is enumerate
eliminates the paragraph indentation by default. Regarding that horizontal space, I'll have a look.– Majid Abdolshah
Mar 28 at 1:16
@bradrn AFAIK
enumerate
is kind of old and enumitem
gives you more advantage and options comparing to list environments such as itemize
and enumerate
. However my understanding is enumerate
eliminates the paragraph indentation by default. Regarding that horizontal space, I'll have a look.– Majid Abdolshah
Mar 28 at 1:16
@bradrn You can always use something like this
vspace{-0.1cm}
after the paragraph. But it's not the best solution of course.– Majid Abdolshah
Mar 28 at 1:24
@bradrn You can always use something like this
vspace{-0.1cm}
after the paragraph. But it's not the best solution of course.– Majid Abdolshah
Mar 28 at 1:24
@bradrn the paragraph space is
parsep
(or parsep
in the enumitem interface) so you can set that to 0pt– David Carlisle
Mar 28 at 1:26
@bradrn the paragraph space is
parsep
(or parsep
in the enumitem interface) so you can set that to 0pt– David Carlisle
Mar 28 at 1:26
1
1
@MajidAbdolshah In my 'real' code, I'm already using
enumitem
.– bradrn
Mar 28 at 1:27
@MajidAbdolshah In my 'real' code, I'm already using
enumitem
.– bradrn
Mar 28 at 1:27
|
show 1 more comment
The reason for this behaviour is that inside enumerate
the length parindent
is set to zero. So you can not use a simple indent
as usual in normal text to get the space of parindent
set.
You can simulate the ususal behaviour in normal text with the following code (See <=====
for important code):
documentclass{article}
usepackage{blindtext}
usepackage{enumitem} % <===============================================
newlength{enumerateparindent} % <=====================================
begin{document}
setlength{enumerateparindent}{parindent} % <=========================
blindtext
blindtext
begin{enumerate}
setlength{parindent}{enumerateparindent} % <=========================
%showparindent
%value{parindent}
item%
blindtext
blindtext
end{enumerate}
Version 2:
begin{enumerate}[listparindent=enumerateparindent] % <================
item%
blindtext
blindtext
end{enumerate}
end{document}
and the wished result:
Please see that setlength{parindent}{enumerateparindent}
does only work in that enumerate
list you placed the command inside ...
If you are already using package enumitem
-- as mentioned in an comment -- you can use it to use the same indent defined in parindent
with version 2 in my mwe.
The you get the resulting version 2:
add a comment |
The reason for this behaviour is that inside enumerate
the length parindent
is set to zero. So you can not use a simple indent
as usual in normal text to get the space of parindent
set.
You can simulate the ususal behaviour in normal text with the following code (See <=====
for important code):
documentclass{article}
usepackage{blindtext}
usepackage{enumitem} % <===============================================
newlength{enumerateparindent} % <=====================================
begin{document}
setlength{enumerateparindent}{parindent} % <=========================
blindtext
blindtext
begin{enumerate}
setlength{parindent}{enumerateparindent} % <=========================
%showparindent
%value{parindent}
item%
blindtext
blindtext
end{enumerate}
Version 2:
begin{enumerate}[listparindent=enumerateparindent] % <================
item%
blindtext
blindtext
end{enumerate}
end{document}
and the wished result:
Please see that setlength{parindent}{enumerateparindent}
does only work in that enumerate
list you placed the command inside ...
If you are already using package enumitem
-- as mentioned in an comment -- you can use it to use the same indent defined in parindent
with version 2 in my mwe.
The you get the resulting version 2:
add a comment |
The reason for this behaviour is that inside enumerate
the length parindent
is set to zero. So you can not use a simple indent
as usual in normal text to get the space of parindent
set.
You can simulate the ususal behaviour in normal text with the following code (See <=====
for important code):
documentclass{article}
usepackage{blindtext}
usepackage{enumitem} % <===============================================
newlength{enumerateparindent} % <=====================================
begin{document}
setlength{enumerateparindent}{parindent} % <=========================
blindtext
blindtext
begin{enumerate}
setlength{parindent}{enumerateparindent} % <=========================
%showparindent
%value{parindent}
item%
blindtext
blindtext
end{enumerate}
Version 2:
begin{enumerate}[listparindent=enumerateparindent] % <================
item%
blindtext
blindtext
end{enumerate}
end{document}
and the wished result:
Please see that setlength{parindent}{enumerateparindent}
does only work in that enumerate
list you placed the command inside ...
If you are already using package enumitem
-- as mentioned in an comment -- you can use it to use the same indent defined in parindent
with version 2 in my mwe.
The you get the resulting version 2:
The reason for this behaviour is that inside enumerate
the length parindent
is set to zero. So you can not use a simple indent
as usual in normal text to get the space of parindent
set.
You can simulate the ususal behaviour in normal text with the following code (See <=====
for important code):
documentclass{article}
usepackage{blindtext}
usepackage{enumitem} % <===============================================
newlength{enumerateparindent} % <=====================================
begin{document}
setlength{enumerateparindent}{parindent} % <=========================
blindtext
blindtext
begin{enumerate}
setlength{parindent}{enumerateparindent} % <=========================
%showparindent
%value{parindent}
item%
blindtext
blindtext
end{enumerate}
Version 2:
begin{enumerate}[listparindent=enumerateparindent] % <================
item%
blindtext
blindtext
end{enumerate}
end{document}
and the wished result:
Please see that setlength{parindent}{enumerateparindent}
does only work in that enumerate
list you placed the command inside ...
If you are already using package enumitem
-- as mentioned in an comment -- you can use it to use the same indent defined in parindent
with version 2 in my mwe.
The you get the resulting version 2:
edited Mar 28 at 1:53
answered Mar 28 at 1:13
KurtKurt
40.5k850164
40.5k850164
add a comment |
add a comment |
bradrn is a new contributor. Be nice, and check out our Code of Conduct.
bradrn is a new contributor. Be nice, and check out our Code of Conduct.
bradrn is a new contributor. Be nice, and check out our Code of Conduct.
bradrn is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f481815%2fwhy-does-indent-disappear-in-lists%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Welcome to TeX.SE!
– Kurt
Mar 28 at 1:06
2
"why" questions are hard to answer, the list paragraph shape is settable as are the outer paragraphs the standard latex classes chose choose that layout as presumably the original author preferred it that way. you can set listparindent` and other list parameters to achieve other shapes
– David Carlisle
Mar 28 at 1:23
@Kurt Thank you!
– bradrn
Mar 28 at 1:24