Hello,
I have to typeset a solution manual using a description list. The labels are of variable length -- "Q1." to "Q30." (that is 3 to 4 characters). By default, the description lists are left aligned so that "Q9." when followed by "Q10." aligns the Q's at left margin. Is there a simple way to right align them such that the `.' following the question numbers are perfectly aligned? Any URLs where it is discussed will be helpful. Thanks in advance.
General ⇒ Right aligning description list labels
NEW: TikZ book now 40% off at Amazon.com for a short time.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Right aligning description list labels
You can use the new defined xlist environment, which is introduced in another topic [1]. Pay attention to the hints for its usage.
[1] vertically aligning text of an interview so it looks good
Best regards and welcome to the board
Thorsten¹
[1] vertically aligning text of an interview so it looks good
Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Right aligning description list labels
The enumitem package also lets you do that. You just use the enumerate environment,specifying the label as
label=Q\arabic*.
The parameter align=right is the default.
B.A.
label=Q\arabic*.
The parameter align=right is the default.
B.A.
- Stefan Kottwitz
- Site Admin
- Posts: 10321
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Right aligning description list labels
Hi,
this question was also posted to comp.text.tex and has got an answer redefining \descriptionlabel.
Stefan
this question was also posted to comp.text.tex and has got an answer redefining \descriptionlabel.
Stefan
LaTeX.org admin