General ⇒ Right aligning description list labels
Right aligning description list labels
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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Right aligning description list labels
[1] vertically aligning text of an interview so it looks good
Best regards and welcome to the board
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Right aligning description list labels
label=Q\arabic*.
The parameter align=right is the default.
B.A.
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Right aligning description list labels
this question was also posted to comp.text.tex and has got an answer redefining \descriptionlabel.
Stefan