Document Classes ⇒ enumerate with horizontal align
enumerate with horizontal align
Dear LC members,
I spent more than a hour for searching how to align items horizontally instead of vertically, but I could not find any examples.
Would you please help me having a list as follows?
1. Item 1....2. Item 2....3. Item 3
Thanks a lot.
bkarpuz
I spent more than a hour for searching how to align items horizontally instead of vertically, but I could not find any examples.
Would you please help me having a list as follows?
1. Item 1....2. Item 2....3. Item 3
Thanks a lot.
bkarpuz
Last edited by bkarpuz on Sat Mar 26, 2011 1:28 am, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
enumerate with horizontal align
LaTeX.org admin
enumerate with horizontal align
Thanks Stefan_K, but I still need help.
I use the following preamble.
When I use enumerate for my questions as follows
I can refer those items in answers in itemize as follows
But when I use inparaenum instead of enumerate as follows,
I dont get the same output in answers.
Is it possible to fix it?
Moreover, the distance between '(a)' and 'Question 1' when inparaenum is used is not the same as enumerate gives.
Thanks.
bkarpuz
I use the following preamble.
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage{amsmath}\usepackage{paralist}\usepackage{enumitem}
Code: Select all
Code, edit and compile here:
\textbf{Questions}.\begin{enumerate}[label={(\alph*)},leftmargin=*,ref=(\alph*)]\item\label{q1a} Question~1.\item\label{q1b} Question~2.\end{enumerate}
Code: Select all
Code, edit and compile here:
\textbf{Answers}.\begin{itemize}\item[\ref{q1a}] Answer~1.\item[\ref{q1b}] Answer~2.\end{itemize}
I dont get the same output in answers.
Code: Select all
Code, edit and compile here:
\textbf{Questions}.\begin{inparaenum}[(a)]\item\label{q1a} Question~1. \item\label{q1b} Question~2.\end{inparaenum}
Moreover, the distance between '(a)' and 'Question 1' when inparaenum is used is not the same as enumerate gives.
Thanks.
bkarpuz
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
enumerate with horizontal align
You could simply write (\ref{...}) with your own parentheses. The paralist documentation does that.
Regarding the distance: those packages use different distances. Instead of programming, you could also simply write
or use another spacing command instead of ~.
Stefan
Regarding the distance: those packages use different distances. Instead of programming, you could also simply write
Code: Select all
\begin{inparaenum}[(a)~] ...
Stefan
LaTeX.org admin
enumerate with horizontal align
Since I also use hyperref they exactly differ from each other in the output.Stefan_K wrote:You could simply write (\ref{...}) with your own parentheses. The paralist documentation does that.
Is there another way for this to look them identically same as enumerate generated items?
Thanks this works very well.Stefan_K wrote: Regarding the distance: those packages use different distances. Instead of programming, you could also simply write
or use another spacing command instead of ~.Code: Select all
\begin{inparaenum}[(a)~] ...
Your help is really appreciated.
bkarpuz
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
enumerate with horizontal align
You didn't mention hyperref before., 
Ok, here's another way:
Stefan

Ok, here's another way:
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage{paralist}\usepackage{hyperref}\renewcommand*{\theenumi}{(\alph{enumi})}\renewcommand*{\labelenumi}{\theenumi~}\begin{document}\textbf{Questions}.\begin{inparaenum}\item\label{q1a} Question~1. \item\label{q1b} Question~2.\end{inparaenum}\textbf{Answers}.\begin{itemize}\item[\ref{q1a}] Answer~1.\item[\ref{q1b}] Answer~2.\end{itemize}\end{document}
LaTeX.org admin
enumerate with horizontal align
This is awesome!Stefan_K wrote:You didn't mention hyperref before.,
Ok, here's another way:
StefanCode: Select all
Code, edit and compile here:\documentclass{article}\usepackage{paralist}\usepackage{hyperref}\renewcommand*{\theenumi}{(\alph{enumi})}\renewcommand*{\labelenumi}{\theenumi~}\begin{document}\textbf{Questions}.\begin{inparaenum}\item\label{q1a} Question~1. \item\label{q1b} Question~2.\end{inparaenum}\textbf{Answers}.\begin{itemize}\item[\ref{q1a}] Answer~1.\item[\ref{q1b}] Answer~2.\end{itemize}\end{document}
Thanks a lot Stefan.
bkarpuz