Two line labels in the description items
up vote
2
down vote
favorite
I would like to have two lines for long description names in the description environment. The only help I could find is here. Where they have the following code.
begin{description}
% won't work
item[first line\second line]
% won't work
item[first linenewline second line]
% will work
item[{parbox[t]{3cm}{first line\second line}}]
end{description}
But this doesn't look nice, I have a long paragraph on the item and the second line of the paragraph starts below the second line of the item label.
description
add a comment |
up vote
2
down vote
favorite
I would like to have two lines for long description names in the description environment. The only help I could find is here. Where they have the following code.
begin{description}
% won't work
item[first line\second line]
% won't work
item[first linenewline second line]
% will work
item[{parbox[t]{3cm}{first line\second line}}]
end{description}
But this doesn't look nice, I have a long paragraph on the item and the second line of the paragraph starts below the second line of the item label.
description
2
Please show your preamble part, i.e., documentclass{...}...begin{document}...
– MadyYuvi
Nov 30 at 11:40
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I would like to have two lines for long description names in the description environment. The only help I could find is here. Where they have the following code.
begin{description}
% won't work
item[first line\second line]
% won't work
item[first linenewline second line]
% will work
item[{parbox[t]{3cm}{first line\second line}}]
end{description}
But this doesn't look nice, I have a long paragraph on the item and the second line of the paragraph starts below the second line of the item label.
description
I would like to have two lines for long description names in the description environment. The only help I could find is here. Where they have the following code.
begin{description}
% won't work
item[first line\second line]
% won't work
item[first linenewline second line]
% will work
item[{parbox[t]{3cm}{first line\second line}}]
end{description}
But this doesn't look nice, I have a long paragraph on the item and the second line of the paragraph starts below the second line of the item label.
description
description
asked Nov 30 at 11:23
MetalMathician
956
956
2
Please show your preamble part, i.e., documentclass{...}...begin{document}...
– MadyYuvi
Nov 30 at 11:40
add a comment |
2
Please show your preamble part, i.e., documentclass{...}...begin{document}...
– MadyYuvi
Nov 30 at 11:40
2
2
Please show your preamble part, i.e., documentclass{...}...begin{document}...
– MadyYuvi
Nov 30 at 11:40
Please show your preamble part, i.e., documentclass{...}...begin{document}...
– MadyYuvi
Nov 30 at 11:40
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
For single-line item data, use stackunder{}{}
. For multi-line item data, use smash{stackunder{}{}}
.
Also shown is the use of smash{Longunderstack{...\...\...}}
in the event the label gets to be longer than 2 lines.
documentclass{article}
usepackage[usestackEOL]{stackengine}
usepackage{lipsum}
begin{document}
renewcommandstackalignment{r}% RIGHT ALIGNED STACKS
renewcommandstacktype{L}% MAKE STACKS OBEY FIXED BASELINESKIP
strutlongstacks{T}% TO GET PROPER SPACING FOR SINGLE-LINE ITEMS
begin{itemize}
item[stackunder{first line}{second line}] blah blah
item[smash{stackunder{first line}{second line}}] lipsum[4]
item[smash{Longunderstack{first\second\third}}] lipsum[3]
end{itemize}
end{document}
You could add bfseries
before the stack, if you wanted it in boldface.
As Bernard notes, the title bleeds into the left margin, which is a standard behavior for itemize
. The way to alleviate that is to select leftmargin
that allows for the widest label:
documentclass{article}
usepackage[pass,showframe]{geometry}
usepackage[usestackEOL]{stackengine}
usepackage{lipsum,enumitem}
begin{document}
renewcommandstackalignment{r}% RIGHT ALIGNED STACKS
renewcommandstacktype{L}% MAKE STACKS OBEY FIXED BASELINESKIP
strutlongstacks{T}% TO GET PROPER SPACING FOR SINGLE-LINE ITEMS
begin{itemize}[leftmargin=53pt]
item[stackunder{first line}{second line}] blah blah
item[smash{stackunder{first line}{second line}}] lipsum[4]
item[smash{Longunderstack{first\second\third}}] lipsum[3]
end{itemize}
end{document}
The labels flow into the left margin.
– Bernard
Nov 30 at 13:11
@Bernard Addressed.
– Steven B. Segletes
Nov 30 at 13:29
Really beautiful!
– Bernard
Nov 30 at 13:33
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
For single-line item data, use stackunder{}{}
. For multi-line item data, use smash{stackunder{}{}}
.
Also shown is the use of smash{Longunderstack{...\...\...}}
in the event the label gets to be longer than 2 lines.
documentclass{article}
usepackage[usestackEOL]{stackengine}
usepackage{lipsum}
begin{document}
renewcommandstackalignment{r}% RIGHT ALIGNED STACKS
renewcommandstacktype{L}% MAKE STACKS OBEY FIXED BASELINESKIP
strutlongstacks{T}% TO GET PROPER SPACING FOR SINGLE-LINE ITEMS
begin{itemize}
item[stackunder{first line}{second line}] blah blah
item[smash{stackunder{first line}{second line}}] lipsum[4]
item[smash{Longunderstack{first\second\third}}] lipsum[3]
end{itemize}
end{document}
You could add bfseries
before the stack, if you wanted it in boldface.
As Bernard notes, the title bleeds into the left margin, which is a standard behavior for itemize
. The way to alleviate that is to select leftmargin
that allows for the widest label:
documentclass{article}
usepackage[pass,showframe]{geometry}
usepackage[usestackEOL]{stackengine}
usepackage{lipsum,enumitem}
begin{document}
renewcommandstackalignment{r}% RIGHT ALIGNED STACKS
renewcommandstacktype{L}% MAKE STACKS OBEY FIXED BASELINESKIP
strutlongstacks{T}% TO GET PROPER SPACING FOR SINGLE-LINE ITEMS
begin{itemize}[leftmargin=53pt]
item[stackunder{first line}{second line}] blah blah
item[smash{stackunder{first line}{second line}}] lipsum[4]
item[smash{Longunderstack{first\second\third}}] lipsum[3]
end{itemize}
end{document}
The labels flow into the left margin.
– Bernard
Nov 30 at 13:11
@Bernard Addressed.
– Steven B. Segletes
Nov 30 at 13:29
Really beautiful!
– Bernard
Nov 30 at 13:33
add a comment |
up vote
2
down vote
accepted
For single-line item data, use stackunder{}{}
. For multi-line item data, use smash{stackunder{}{}}
.
Also shown is the use of smash{Longunderstack{...\...\...}}
in the event the label gets to be longer than 2 lines.
documentclass{article}
usepackage[usestackEOL]{stackengine}
usepackage{lipsum}
begin{document}
renewcommandstackalignment{r}% RIGHT ALIGNED STACKS
renewcommandstacktype{L}% MAKE STACKS OBEY FIXED BASELINESKIP
strutlongstacks{T}% TO GET PROPER SPACING FOR SINGLE-LINE ITEMS
begin{itemize}
item[stackunder{first line}{second line}] blah blah
item[smash{stackunder{first line}{second line}}] lipsum[4]
item[smash{Longunderstack{first\second\third}}] lipsum[3]
end{itemize}
end{document}
You could add bfseries
before the stack, if you wanted it in boldface.
As Bernard notes, the title bleeds into the left margin, which is a standard behavior for itemize
. The way to alleviate that is to select leftmargin
that allows for the widest label:
documentclass{article}
usepackage[pass,showframe]{geometry}
usepackage[usestackEOL]{stackengine}
usepackage{lipsum,enumitem}
begin{document}
renewcommandstackalignment{r}% RIGHT ALIGNED STACKS
renewcommandstacktype{L}% MAKE STACKS OBEY FIXED BASELINESKIP
strutlongstacks{T}% TO GET PROPER SPACING FOR SINGLE-LINE ITEMS
begin{itemize}[leftmargin=53pt]
item[stackunder{first line}{second line}] blah blah
item[smash{stackunder{first line}{second line}}] lipsum[4]
item[smash{Longunderstack{first\second\third}}] lipsum[3]
end{itemize}
end{document}
The labels flow into the left margin.
– Bernard
Nov 30 at 13:11
@Bernard Addressed.
– Steven B. Segletes
Nov 30 at 13:29
Really beautiful!
– Bernard
Nov 30 at 13:33
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
For single-line item data, use stackunder{}{}
. For multi-line item data, use smash{stackunder{}{}}
.
Also shown is the use of smash{Longunderstack{...\...\...}}
in the event the label gets to be longer than 2 lines.
documentclass{article}
usepackage[usestackEOL]{stackengine}
usepackage{lipsum}
begin{document}
renewcommandstackalignment{r}% RIGHT ALIGNED STACKS
renewcommandstacktype{L}% MAKE STACKS OBEY FIXED BASELINESKIP
strutlongstacks{T}% TO GET PROPER SPACING FOR SINGLE-LINE ITEMS
begin{itemize}
item[stackunder{first line}{second line}] blah blah
item[smash{stackunder{first line}{second line}}] lipsum[4]
item[smash{Longunderstack{first\second\third}}] lipsum[3]
end{itemize}
end{document}
You could add bfseries
before the stack, if you wanted it in boldface.
As Bernard notes, the title bleeds into the left margin, which is a standard behavior for itemize
. The way to alleviate that is to select leftmargin
that allows for the widest label:
documentclass{article}
usepackage[pass,showframe]{geometry}
usepackage[usestackEOL]{stackengine}
usepackage{lipsum,enumitem}
begin{document}
renewcommandstackalignment{r}% RIGHT ALIGNED STACKS
renewcommandstacktype{L}% MAKE STACKS OBEY FIXED BASELINESKIP
strutlongstacks{T}% TO GET PROPER SPACING FOR SINGLE-LINE ITEMS
begin{itemize}[leftmargin=53pt]
item[stackunder{first line}{second line}] blah blah
item[smash{stackunder{first line}{second line}}] lipsum[4]
item[smash{Longunderstack{first\second\third}}] lipsum[3]
end{itemize}
end{document}
For single-line item data, use stackunder{}{}
. For multi-line item data, use smash{stackunder{}{}}
.
Also shown is the use of smash{Longunderstack{...\...\...}}
in the event the label gets to be longer than 2 lines.
documentclass{article}
usepackage[usestackEOL]{stackengine}
usepackage{lipsum}
begin{document}
renewcommandstackalignment{r}% RIGHT ALIGNED STACKS
renewcommandstacktype{L}% MAKE STACKS OBEY FIXED BASELINESKIP
strutlongstacks{T}% TO GET PROPER SPACING FOR SINGLE-LINE ITEMS
begin{itemize}
item[stackunder{first line}{second line}] blah blah
item[smash{stackunder{first line}{second line}}] lipsum[4]
item[smash{Longunderstack{first\second\third}}] lipsum[3]
end{itemize}
end{document}
You could add bfseries
before the stack, if you wanted it in boldface.
As Bernard notes, the title bleeds into the left margin, which is a standard behavior for itemize
. The way to alleviate that is to select leftmargin
that allows for the widest label:
documentclass{article}
usepackage[pass,showframe]{geometry}
usepackage[usestackEOL]{stackengine}
usepackage{lipsum,enumitem}
begin{document}
renewcommandstackalignment{r}% RIGHT ALIGNED STACKS
renewcommandstacktype{L}% MAKE STACKS OBEY FIXED BASELINESKIP
strutlongstacks{T}% TO GET PROPER SPACING FOR SINGLE-LINE ITEMS
begin{itemize}[leftmargin=53pt]
item[stackunder{first line}{second line}] blah blah
item[smash{stackunder{first line}{second line}}] lipsum[4]
item[smash{Longunderstack{first\second\third}}] lipsum[3]
end{itemize}
end{document}
edited Nov 30 at 14:59
answered Nov 30 at 12:27
Steven B. Segletes
152k9192399
152k9192399
The labels flow into the left margin.
– Bernard
Nov 30 at 13:11
@Bernard Addressed.
– Steven B. Segletes
Nov 30 at 13:29
Really beautiful!
– Bernard
Nov 30 at 13:33
add a comment |
The labels flow into the left margin.
– Bernard
Nov 30 at 13:11
@Bernard Addressed.
– Steven B. Segletes
Nov 30 at 13:29
Really beautiful!
– Bernard
Nov 30 at 13:33
The labels flow into the left margin.
– Bernard
Nov 30 at 13:11
The labels flow into the left margin.
– Bernard
Nov 30 at 13:11
@Bernard Addressed.
– Steven B. Segletes
Nov 30 at 13:29
@Bernard Addressed.
– Steven B. Segletes
Nov 30 at 13:29
Really beautiful!
– Bernard
Nov 30 at 13:33
Really beautiful!
– Bernard
Nov 30 at 13:33
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f462549%2ftwo-line-labels-in-the-description-items%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
Please show your preamble part, i.e., documentclass{...}...begin{document}...
– MadyYuvi
Nov 30 at 11:40