This a follow-up on my previous question Using `environ` to make a list of environments?
Eventually I ended up with the following code using tocloft. I have tried to make it a MWE.
\documentclass[11pt]{scrartcl}
\usepackage{amsmath, amsthm}
%% Begin question thingies
\usepackage{tocloft} % http://ctan.org/pkg/tocloft
\newtheorem{xquestion}{Question}
\newtheorem{xquestionu}[xquestion]{Question (unanswered)}
\newtheorem{xremark}[xquestion]{Remark}
\newcommand\listxquestionsname{List of Remarks and Questions}
\newlistof{questionsandremarks}{qlist}{\listxquestionsname}
% Add the answered questions
\newcommand\qdescription[1]{%
\addcontentsline{qlist}{questionsandremarks}%
{\protect\makebox[2.5em][l]{{Q.}~\hfill\thexquestion\hspace{12pt}}#1}}
% Add the unanswered questions
\newcommand\qdescriptionu[1]{%
\addcontentsline{qlist}{questionsandremarks}%
{\protect\makebox[2.5em][l]{\textit{{Q.}}~\hfill\thexquestionu\hspace{12pt}}#1}}
% Add the remarks
\newcommand\raddlist{%
\addcontentsline{qlist}{questionsandremarks}%
{\protect\makebox[2.5em][l]{{R.}~\hfill\thexremark\hspace{12pt}}}}
\newenvironment{question}[1][]{\begin{xquestion}\qdescription{#1}}{\end{xquestion}}
\newenvironment{questionu}[1][]{\begin{xquestionu}\qdescriptionu{#1}}{\end{xquestionu}}
\newenvironment{remark}{\begin{xremark}\raddlist}{\end{xremark}}
\setlength{\cftafterqlisttitleskip}{\parskip}
\renewcommand{\cftafterqlisttitle}{\\[\baselineskip] A cursive \textit{Q} means that this entry is about a question that is not (yet) answered in the text.}
%% End question thingies
\begin{document}
\begin{questionu}[A test]
Here is my question.
\end{questionu}
\begin{remark}
I also like to make remarks!
\end{remark}
\end{document}
I believe there are some issues with the number which is not properly aligned. How can I fix that?
So, now my question: is this good practice or am I doing it wrong? Furthermore, a bigger problem is the numbering of \thex.... They don't seem to be properly aligned. How do I change the dotted line to say something else (perhaps nothing)? Hitting me with good code hygiene is more than welcome as well! Furthermore, how do I properly wrap the description if it becomes longer than a line?
