-
Notifications
You must be signed in to change notification settings - Fork 407
Indentation sub-mode for moodle.sty documents #2020
Description
This is a very low priority indentation request. The objective is to support moodle.sty, a package used to prepare tests and quizzes that can be automatically added to the online-teaching platform Moodle.
Basically, there are two types of environments. The first one is a simple
\begin{quiz}[options]{Title/with/slashes}
\end{quiz}into which all the other environments are to be embedded, and can be used as a flag to activate all the other environments. I would probably prefer NOT to indent its content, as it happens for document, because it can be only top-level.
The other environments are mostly of the form:
\begin{type}[options]{Title}
Description, one or more paragraphs with a restricted set of commands and environments,
\[formulas\] and maybe also pictures (both `includegraphics` and `tikzpictures`).
\item [options] blah blah
\item * the star is the correct one
\item etcetera
\end{type}where type can be one of multi, essay, truefalse, numerical, shortanswer, matching.
As an exception, the environment cloze has the same general structure, but instead of enclosing directly the \items, it allows for nested multi, numerical or shortanswer but without the {Title} argument.
\begin{cloze}{Cloze}
Question text
More paragraphs of question text
\[ formula \]
\begin{tikzpicture}[scale=0.5]
\draw (0,0) -- (1,1);
\end{tikzpicture}
\begin{multi}[horizontal,shuffle=false]
Question text
\item[feedback={AAA}]* A
\item[feedback={BBB},fraction=10] B
\item[feedback={CCC}] C
\end{multi}
\begin{shortanswer}[tolerance=1]
Question text
\item[feedback={1}] aaa
\item[feedback={3},fraction=0] bbb
\end{shortanswer}
\end{cloze}Finally, inside quiz, the description environment is redefined as
\begin{description}{Title}
Description text
\end{description}I add a file here with an example of (in my opinion!) a well-indented document and the current indentation:
One possible solution is to have a kind of "extended" itemize-type environment that can accept a first paragraph that is not \item-ized.