Enumitem: Right align the label

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












I am trying to use the enumitem package to create the following



 Farmer: It is a hard day today. The sun is
burning and we still haven't brought
in all the crop.
Farmer's Neighbour: Yes, it will be a long day!
Farmer: ...


I want the label to be right aligned and the text to wrap at that point too.



I tried the following solution (SetLabelAlignparrightparbox[t]labelwidthraggedleft#1, but then my label and text overlap.



documentclassarticle
usepackageenumitem
SetLabelAlignparrightparbox[t]labelwidthraggedleft#1
setlist[enumerate]
align=parright,
leftmargin=0pt,
labelindent=20pt,
listparindent=40pt,
labelwidth=20pt,
itemindent=!


begindocument
beginenumerate[label=Farmer:]
item It is a hard day today. The sun is burning and we still haven't brought in all the crop.
endenumerate
beginenumerate[label=Farmer's Neigbour:]
item Yes, it will be a long day!
endenumerate
enddocument









share|improve this question



















  • 2




    Why are you using an enumerate list when you want a description type list?
    – Alan Munn
    Aug 8 at 2:36











  • Just try align=left, It should work.
    – javadr
    Aug 8 at 2:41














up vote
1
down vote

favorite












I am trying to use the enumitem package to create the following



 Farmer: It is a hard day today. The sun is
burning and we still haven't brought
in all the crop.
Farmer's Neighbour: Yes, it will be a long day!
Farmer: ...


I want the label to be right aligned and the text to wrap at that point too.



I tried the following solution (SetLabelAlignparrightparbox[t]labelwidthraggedleft#1, but then my label and text overlap.



documentclassarticle
usepackageenumitem
SetLabelAlignparrightparbox[t]labelwidthraggedleft#1
setlist[enumerate]
align=parright,
leftmargin=0pt,
labelindent=20pt,
listparindent=40pt,
labelwidth=20pt,
itemindent=!


begindocument
beginenumerate[label=Farmer:]
item It is a hard day today. The sun is burning and we still haven't brought in all the crop.
endenumerate
beginenumerate[label=Farmer's Neigbour:]
item Yes, it will be a long day!
endenumerate
enddocument









share|improve this question



















  • 2




    Why are you using an enumerate list when you want a description type list?
    – Alan Munn
    Aug 8 at 2:36











  • Just try align=left, It should work.
    – javadr
    Aug 8 at 2:41












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am trying to use the enumitem package to create the following



 Farmer: It is a hard day today. The sun is
burning and we still haven't brought
in all the crop.
Farmer's Neighbour: Yes, it will be a long day!
Farmer: ...


I want the label to be right aligned and the text to wrap at that point too.



I tried the following solution (SetLabelAlignparrightparbox[t]labelwidthraggedleft#1, but then my label and text overlap.



documentclassarticle
usepackageenumitem
SetLabelAlignparrightparbox[t]labelwidthraggedleft#1
setlist[enumerate]
align=parright,
leftmargin=0pt,
labelindent=20pt,
listparindent=40pt,
labelwidth=20pt,
itemindent=!


begindocument
beginenumerate[label=Farmer:]
item It is a hard day today. The sun is burning and we still haven't brought in all the crop.
endenumerate
beginenumerate[label=Farmer's Neigbour:]
item Yes, it will be a long day!
endenumerate
enddocument









share|improve this question















I am trying to use the enumitem package to create the following



 Farmer: It is a hard day today. The sun is
burning and we still haven't brought
in all the crop.
Farmer's Neighbour: Yes, it will be a long day!
Farmer: ...


I want the label to be right aligned and the text to wrap at that point too.



I tried the following solution (SetLabelAlignparrightparbox[t]labelwidthraggedleft#1, but then my label and text overlap.



documentclassarticle
usepackageenumitem
SetLabelAlignparrightparbox[t]labelwidthraggedleft#1
setlist[enumerate]
align=parright,
leftmargin=0pt,
labelindent=20pt,
listparindent=40pt,
labelwidth=20pt,
itemindent=!


begindocument
beginenumerate[label=Farmer:]
item It is a hard day today. The sun is burning and we still haven't brought in all the crop.
endenumerate
beginenumerate[label=Farmer's Neigbour:]
item Yes, it will be a long day!
endenumerate
enddocument






horizontal-alignment enumitem






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 8 at 2:35









Alan Munn

155k27414686




155k27414686










asked Aug 8 at 2:25









Jo-

5816




5816







  • 2




    Why are you using an enumerate list when you want a description type list?
    – Alan Munn
    Aug 8 at 2:36











  • Just try align=left, It should work.
    – javadr
    Aug 8 at 2:41












  • 2




    Why are you using an enumerate list when you want a description type list?
    – Alan Munn
    Aug 8 at 2:36











  • Just try align=left, It should work.
    – javadr
    Aug 8 at 2:41







2




2




Why are you using an enumerate list when you want a description type list?
– Alan Munn
Aug 8 at 2:36





Why are you using an enumerate list when you want a description type list?
– Alan Munn
Aug 8 at 2:36













Just try align=left, It should work.
– javadr
Aug 8 at 2:41




Just try align=left, It should work.
– javadr
Aug 8 at 2:41










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










For a list-by-list basis, you can use the options below between [..]. Notice that calc package is required to measure the width of the widest label automatically. If you need the same settings for all description lists, use this command



setlist[description]style=multiline, labelwidth=widthofFarmer's Neigbour: ,%
font=normalfont, leftmargin=labelwidth, align=right


in preamble.



documentclassarticle
usepackageenumitem
usepackagecalc

begindocument

begindescription[style=multiline, labelwidth=widthofFarmer's Neigbour: ,%
font=normalfont, leftmargin=labelwidth, align=right]
item[Farmer:] It is a hard day today. The sun is burning and we still haven't brought in all the crop.
item[Farmer's Neigbour:] Yes, it will be a long day!
enddescription

enddocument


enter image description here






share|improve this answer






















  • If you want to keep the regular description list, you can define a new list, e.g. newlistdialoguedescription1 and then use setlist[dialogue]style=multiline, labelwidth=widthofFarmer's Neigbour: ,font=normalfont, leftmargin=labelwidth, align=right
    – Alan Munn
    Aug 8 at 3:04










  • Is there a way to dynamically update `widthofFarmer's Neighbour:? So the list can be reused?
    – Jo-
    Aug 8 at 3:05










  • This will require more work, in such a case, a longtable or just a tabular may be preferred.
    – AboAmmar
    Aug 8 at 3:10






  • 1




    @Jo- Not completely automatic, but if you define a new list, then for any particular instance of that environment you can just specify a new value for the labelwidth, e.g. begindialogue[labelwidth=widthofFarmer's son: ].
    – Alan Munn
    Aug 8 at 3:17










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',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f445066%2fenumitem-right-align-the-label%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










For a list-by-list basis, you can use the options below between [..]. Notice that calc package is required to measure the width of the widest label automatically. If you need the same settings for all description lists, use this command



setlist[description]style=multiline, labelwidth=widthofFarmer's Neigbour: ,%
font=normalfont, leftmargin=labelwidth, align=right


in preamble.



documentclassarticle
usepackageenumitem
usepackagecalc

begindocument

begindescription[style=multiline, labelwidth=widthofFarmer's Neigbour: ,%
font=normalfont, leftmargin=labelwidth, align=right]
item[Farmer:] It is a hard day today. The sun is burning and we still haven't brought in all the crop.
item[Farmer's Neigbour:] Yes, it will be a long day!
enddescription

enddocument


enter image description here






share|improve this answer






















  • If you want to keep the regular description list, you can define a new list, e.g. newlistdialoguedescription1 and then use setlist[dialogue]style=multiline, labelwidth=widthofFarmer's Neigbour: ,font=normalfont, leftmargin=labelwidth, align=right
    – Alan Munn
    Aug 8 at 3:04










  • Is there a way to dynamically update `widthofFarmer's Neighbour:? So the list can be reused?
    – Jo-
    Aug 8 at 3:05










  • This will require more work, in such a case, a longtable or just a tabular may be preferred.
    – AboAmmar
    Aug 8 at 3:10






  • 1




    @Jo- Not completely automatic, but if you define a new list, then for any particular instance of that environment you can just specify a new value for the labelwidth, e.g. begindialogue[labelwidth=widthofFarmer's son: ].
    – Alan Munn
    Aug 8 at 3:17














up vote
3
down vote



accepted










For a list-by-list basis, you can use the options below between [..]. Notice that calc package is required to measure the width of the widest label automatically. If you need the same settings for all description lists, use this command



setlist[description]style=multiline, labelwidth=widthofFarmer's Neigbour: ,%
font=normalfont, leftmargin=labelwidth, align=right


in preamble.



documentclassarticle
usepackageenumitem
usepackagecalc

begindocument

begindescription[style=multiline, labelwidth=widthofFarmer's Neigbour: ,%
font=normalfont, leftmargin=labelwidth, align=right]
item[Farmer:] It is a hard day today. The sun is burning and we still haven't brought in all the crop.
item[Farmer's Neigbour:] Yes, it will be a long day!
enddescription

enddocument


enter image description here






share|improve this answer






















  • If you want to keep the regular description list, you can define a new list, e.g. newlistdialoguedescription1 and then use setlist[dialogue]style=multiline, labelwidth=widthofFarmer's Neigbour: ,font=normalfont, leftmargin=labelwidth, align=right
    – Alan Munn
    Aug 8 at 3:04










  • Is there a way to dynamically update `widthofFarmer's Neighbour:? So the list can be reused?
    – Jo-
    Aug 8 at 3:05










  • This will require more work, in such a case, a longtable or just a tabular may be preferred.
    – AboAmmar
    Aug 8 at 3:10






  • 1




    @Jo- Not completely automatic, but if you define a new list, then for any particular instance of that environment you can just specify a new value for the labelwidth, e.g. begindialogue[labelwidth=widthofFarmer's son: ].
    – Alan Munn
    Aug 8 at 3:17












up vote
3
down vote



accepted







up vote
3
down vote



accepted






For a list-by-list basis, you can use the options below between [..]. Notice that calc package is required to measure the width of the widest label automatically. If you need the same settings for all description lists, use this command



setlist[description]style=multiline, labelwidth=widthofFarmer's Neigbour: ,%
font=normalfont, leftmargin=labelwidth, align=right


in preamble.



documentclassarticle
usepackageenumitem
usepackagecalc

begindocument

begindescription[style=multiline, labelwidth=widthofFarmer's Neigbour: ,%
font=normalfont, leftmargin=labelwidth, align=right]
item[Farmer:] It is a hard day today. The sun is burning and we still haven't brought in all the crop.
item[Farmer's Neigbour:] Yes, it will be a long day!
enddescription

enddocument


enter image description here






share|improve this answer














For a list-by-list basis, you can use the options below between [..]. Notice that calc package is required to measure the width of the widest label automatically. If you need the same settings for all description lists, use this command



setlist[description]style=multiline, labelwidth=widthofFarmer's Neigbour: ,%
font=normalfont, leftmargin=labelwidth, align=right


in preamble.



documentclassarticle
usepackageenumitem
usepackagecalc

begindocument

begindescription[style=multiline, labelwidth=widthofFarmer's Neigbour: ,%
font=normalfont, leftmargin=labelwidth, align=right]
item[Farmer:] It is a hard day today. The sun is burning and we still haven't brought in all the crop.
item[Farmer's Neigbour:] Yes, it will be a long day!
enddescription

enddocument


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Aug 8 at 3:01

























answered Aug 8 at 2:55









AboAmmar

30.5k22780




30.5k22780











  • If you want to keep the regular description list, you can define a new list, e.g. newlistdialoguedescription1 and then use setlist[dialogue]style=multiline, labelwidth=widthofFarmer's Neigbour: ,font=normalfont, leftmargin=labelwidth, align=right
    – Alan Munn
    Aug 8 at 3:04










  • Is there a way to dynamically update `widthofFarmer's Neighbour:? So the list can be reused?
    – Jo-
    Aug 8 at 3:05










  • This will require more work, in such a case, a longtable or just a tabular may be preferred.
    – AboAmmar
    Aug 8 at 3:10






  • 1




    @Jo- Not completely automatic, but if you define a new list, then for any particular instance of that environment you can just specify a new value for the labelwidth, e.g. begindialogue[labelwidth=widthofFarmer's son: ].
    – Alan Munn
    Aug 8 at 3:17
















  • If you want to keep the regular description list, you can define a new list, e.g. newlistdialoguedescription1 and then use setlist[dialogue]style=multiline, labelwidth=widthofFarmer's Neigbour: ,font=normalfont, leftmargin=labelwidth, align=right
    – Alan Munn
    Aug 8 at 3:04










  • Is there a way to dynamically update `widthofFarmer's Neighbour:? So the list can be reused?
    – Jo-
    Aug 8 at 3:05










  • This will require more work, in such a case, a longtable or just a tabular may be preferred.
    – AboAmmar
    Aug 8 at 3:10






  • 1




    @Jo- Not completely automatic, but if you define a new list, then for any particular instance of that environment you can just specify a new value for the labelwidth, e.g. begindialogue[labelwidth=widthofFarmer's son: ].
    – Alan Munn
    Aug 8 at 3:17















If you want to keep the regular description list, you can define a new list, e.g. newlistdialoguedescription1 and then use setlist[dialogue]style=multiline, labelwidth=widthofFarmer's Neigbour: ,font=normalfont, leftmargin=labelwidth, align=right
– Alan Munn
Aug 8 at 3:04




If you want to keep the regular description list, you can define a new list, e.g. newlistdialoguedescription1 and then use setlist[dialogue]style=multiline, labelwidth=widthofFarmer's Neigbour: ,font=normalfont, leftmargin=labelwidth, align=right
– Alan Munn
Aug 8 at 3:04












Is there a way to dynamically update `widthofFarmer's Neighbour:? So the list can be reused?
– Jo-
Aug 8 at 3:05




Is there a way to dynamically update `widthofFarmer's Neighbour:? So the list can be reused?
– Jo-
Aug 8 at 3:05












This will require more work, in such a case, a longtable or just a tabular may be preferred.
– AboAmmar
Aug 8 at 3:10




This will require more work, in such a case, a longtable or just a tabular may be preferred.
– AboAmmar
Aug 8 at 3:10




1




1




@Jo- Not completely automatic, but if you define a new list, then for any particular instance of that environment you can just specify a new value for the labelwidth, e.g. begindialogue[labelwidth=widthofFarmer's son: ].
– Alan Munn
Aug 8 at 3:17




@Jo- Not completely automatic, but if you define a new list, then for any particular instance of that environment you can just specify a new value for the labelwidth, e.g. begindialogue[labelwidth=widthofFarmer's son: ].
– Alan Munn
Aug 8 at 3:17

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f445066%2fenumitem-right-align-the-label%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491