GeneralRight aligning description list labels

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Lehrer
Posts: 2
Joined: Thu Sep 18, 2008 7:45 am

Right aligning description list labels

Post by Lehrer »

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.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Right aligning description list labels

Post by localghost »

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¹
balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Right aligning description list labels

Post by balf »

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.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Re: Right aligning description list labels

Post by Stefan Kottwitz »

Hi,

this question was also posted to comp.text.tex and has got an answer redefining \descriptionlabel.

Stefan
LaTeX.org admin
Post Reply