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
4 hours ago
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
4 hours ago
@Kurt Thank you!
– bradrn
4 hours ago
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 4 hours ago
bradrn
New contributor
asked 5 hours ago
bradrnbradrn
1186
1186
New contributor
New contributor
2
Welcome to TeX.SE!
– Kurt
4 hours ago
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
4 hours ago
@Kurt Thank you!
– bradrn
4 hours ago
add a comment |
2
Welcome to TeX.SE!
– Kurt
4 hours ago
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
4 hours ago
@Kurt Thank you!
– bradrn
4 hours ago
2
2
Welcome to TeX.SE!
– Kurt
4 hours ago
Welcome to TeX.SE!
– Kurt
4 hours ago
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
4 hours ago
"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
4 hours ago
@Kurt Thank you!
– bradrn
4 hours ago
@Kurt Thank you!
– bradrn
4 hours ago
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
4 hours ago
@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
4 hours ago
@bradrn You can always use something like thisvspace{-0.1cm}
after the paragraph. But it's not the best solution of course.
– Majid Abdolshah
4 hours ago
@bradrn the paragraph space isparsep
(orparsep
in the enumitem interface) so you can set that to 0pt
– David Carlisle
4 hours ago
1
@MajidAbdolshah In my 'real' code, I'm already usingenumitem
.
– bradrn
4 hours ago
|
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:
settinglistparindent
is the intended way to define the shape of list paragraphs.
– David Carlisle
4 hours ago
@DavidCarlisle Thanks, I added it.
– Kurt
3 hours ago
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
4 hours ago
@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
4 hours ago
@bradrn You can always use something like thisvspace{-0.1cm}
after the paragraph. But it's not the best solution of course.
– Majid Abdolshah
4 hours ago
@bradrn the paragraph space isparsep
(orparsep
in the enumitem interface) so you can set that to 0pt
– David Carlisle
4 hours ago
1
@MajidAbdolshah In my 'real' code, I'm already usingenumitem
.
– bradrn
4 hours ago
|
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
4 hours ago
@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
4 hours ago
@bradrn You can always use something like thisvspace{-0.1cm}
after the paragraph. But it's not the best solution of course.
– Majid Abdolshah
4 hours ago
@bradrn the paragraph space isparsep
(orparsep
in the enumitem interface) so you can set that to 0pt
– David Carlisle
4 hours ago
1
@MajidAbdolshah In my 'real' code, I'm already usingenumitem
.
– bradrn
4 hours ago
|
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 4 hours ago
answered 5 hours ago
Majid AbdolshahMajid Abdolshah
68328
68328
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
4 hours ago
@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
4 hours ago
@bradrn You can always use something like thisvspace{-0.1cm}
after the paragraph. But it's not the best solution of course.
– Majid Abdolshah
4 hours ago
@bradrn the paragraph space isparsep
(orparsep
in the enumitem interface) so you can set that to 0pt
– David Carlisle
4 hours ago
1
@MajidAbdolshah In my 'real' code, I'm already usingenumitem
.
– bradrn
4 hours ago
|
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
4 hours ago
@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
4 hours ago
@bradrn You can always use something like thisvspace{-0.1cm}
after the paragraph. But it's not the best solution of course.
– Majid Abdolshah
4 hours ago
@bradrn the paragraph space isparsep
(orparsep
in the enumitem interface) so you can set that to 0pt
– David Carlisle
4 hours ago
1
@MajidAbdolshah In my 'real' code, I'm already usingenumitem
.
– bradrn
4 hours ago
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
4 hours ago
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
4 hours ago
@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
4 hours ago
@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
4 hours ago
@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
4 hours ago
@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
4 hours ago
@bradrn the paragraph space is
parsep
(or parsep
in the enumitem interface) so you can set that to 0pt– David Carlisle
4 hours ago
@bradrn the paragraph space is
parsep
(or parsep
in the enumitem interface) so you can set that to 0pt– David Carlisle
4 hours ago
1
1
@MajidAbdolshah In my 'real' code, I'm already using
enumitem
.– bradrn
4 hours ago
@MajidAbdolshah In my 'real' code, I'm already using
enumitem
.– bradrn
4 hours ago
|
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:
settinglistparindent
is the intended way to define the shape of list paragraphs.
– David Carlisle
4 hours ago
@DavidCarlisle Thanks, I added it.
– Kurt
3 hours ago
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:
settinglistparindent
is the intended way to define the shape of list paragraphs.
– David Carlisle
4 hours ago
@DavidCarlisle Thanks, I added it.
– Kurt
3 hours ago
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 4 hours ago
answered 4 hours ago
KurtKurt
39.9k850164
39.9k850164
settinglistparindent
is the intended way to define the shape of list paragraphs.
– David Carlisle
4 hours ago
@DavidCarlisle Thanks, I added it.
– Kurt
3 hours ago
add a comment |
settinglistparindent
is the intended way to define the shape of list paragraphs.
– David Carlisle
4 hours ago
@DavidCarlisle Thanks, I added it.
– Kurt
3 hours ago
setting
listparindent
is the intended way to define the shape of list paragraphs.– David Carlisle
4 hours ago
setting
listparindent
is the intended way to define the shape of list paragraphs.– David Carlisle
4 hours ago
@DavidCarlisle Thanks, I added it.
– Kurt
3 hours ago
@DavidCarlisle Thanks, I added it.
– Kurt
3 hours ago
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
4 hours ago
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
4 hours ago
@Kurt Thank you!
– bradrn
4 hours ago