Hints for using Moodle LaTeX

The following is the template I use:

% See http://tug.ctan.org/macros/latex/contrib/moodle/moodle.pdf
% use \sa as a new command then do a search and replace in TeX Studio with regular expression: search= "\\sa\{([^\}]*)\}" and replace = "\begin{shortanswer} \item \1 \end{shortanswer}"
%
\documentclass[12pt]{article}
\usepackage{moodle}
\usepackage{graphicx}

\newcommand{\sa}[1]{\begin{shortanswer}#1\end{shortanswer}}

\begin{document}
\begin{quiz}{Quiz Name}

\end{quiz}
\end{document}

Here are the Macros that I use:

\begin{cloze}[feedback={}]{x.y}
        
\end{cloze}

\begin{multi}[multiple,feedback={}]{x.y}
        question
        \item* True
        \item False
\end{multi}

\begin{numerical}[feedback={}]{x.y}
        \item[] answer
\end{numerical

\begin{matching}[shuffle=true,feedback={}]{x.y feedback={}}
        \item question \answer answer
        \item question \answer answer
        \item \answer answer
\end{matching}

Process to include images or .svg files in a quiz

First create the file and convert it to a .png

Make sure it does not have a "." in in it.

Use

b64.exe -e X.png X.enc

Re-run the LaTeX command and see if you get this in the output:

<IMG width=517 height=212 SRC="data:image/png;base64,iVBORw0KGgoAA...

MoodleLaTeX (last edited 2017-10-19 01:40:49 by scot)