I am a beginner in Latex. This is my problem.
I would like to type set a dialogue between three characters. I found the dialogue
environment but it does not exactly cope with what I expect. The following solution almost do what I want :
% arara: pdflatex
\documentclass{article}
\usepackage{blindtext}
\usepackage{enumitem}
\usepackage{xparse}
\DeclareDocumentCommand \dia { o m } {%
\begin{itemize}[%
,label=\IfNoValueTF {#1} {}{#1:}
,nosep % optional
,font=\color{red}
]
\item #2
\end{itemize}%
}
\begin{document}
\dia[First guy]{Hi, how are you?}
\dia[Second guy]{Fine and you?}
\dia[Guy with long hair]{My god, this dialogue is so boring.}
\dia[first guy]{Indeed, but have you heard that \blindtext}
\end{document}
[
But I would like to do some adjustments and therefore need to understand how it works.
- I would like to enlarge the space between the character's name (
label
) and the speech. - what are the
o
andm
in the\declareDocumentCommand
- how the
\IfNoValueTF
works ?
Thanks for your help.