Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\begin{itemize}

\item blah blah blah blah

\end{itemize}

As far as I know the main difference between the code above and just writing something like

$\bullet$ blah blah blah blah

is that everything within the "item" gets indented to a point to the right of the bullet.

I'd like to do that with customized bullets instead of just bullets, one of which would look like {\bf Q:} and another like {\bf A:}.

That way when typing a multi-line paragraph after {\bf Q:} or {\bf A:}, the subsequent lines would be vertically aligned with the first one.

How can that be done?

share|improve this question
1  
\usepackage{enumitem} \begin{itemize}[label=\textbf{Q:}]...\end{itemize}? –  Werner Jul 14 '13 at 20:25
    
Not related to the question, but \bf is an obsolete command that shouldn't be used in modern documents. You should use \bfseries instead. –  Gonzalo Medina Jul 14 '13 at 20:32
    
    
related: "Q" and "A" in margin - out of alignment –  cmhughes Jul 14 '13 at 21:01
add comment

1 Answer

up vote 8 down vote accepted

You can use the enumitem package to define a customized list; in the following example, the mylist environment is such that \item will produce as label Q: bold-faced; the newcommand \itema can be used to produce the label A: bold-faced:

\documentclass{article}
\usepackage{enumitem}
\usepackage{lipsum}

\newlist{mylist}{itemize}{1}
\setlist[mylist]{label=\textbf{Q:}}
\newcommand\itema{\item[\textbf{A:}]}

\begin{document}

\begin{mylist}
\item \lipsum[4]\lipsum[4]
\itema \lipsum[4]\lipsum[4]
\end{mylist}

\end{document}

enter image description here

Another option, not requiring packages, is to define two commands using the optional argument for \item to produce the desired labels:

\documentclass{article}
\usepackage{lipsum}

\newcommand\itema{\item[\textbf{A:}]}
\newcommand\itemq{\item[\textbf{Q:}]}

\begin{document}

\begin{itemize}
\itemq \lipsum[4]\lipsum[4]
\itema \lipsum[4]\lipsum[4]
\end{itemize}

\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.