Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Summary

Converts LaTeX files to Moodle GIFT format

Install to Claude Code

/plugin install latex-moodle@latex-moodle

Run in Claude Code. Add the marketplace first with /plugin marketplace add Schneggera/latex-moodle-skill if you haven't already.

README.md

latex-moodle

A Claude Code plugin that converts LaTeX quiz files to Moodle GIFT format.

What it does

The latex-to-gift skill reads a .tex file containing multiple-choice quiz questions and writes a .gift file in the same directory, ready for import into Moodle.

Supported question types:

| Type | Detection | |---|---| | True/False | Answer choices are exactly "True" and "False" | | Single correct | Exactly one \textbf{(x)} in the solution | | Multiple correct | Two or more \textbf{(x)} in the solution. Partial credit applied automatically |

Expected LaTeX structure

\setcounter{number}{4}   % quiz number

\begin{enumerate}[label=\arabic*]
  \item Question text here.
  \begin{enumerate}[label=(\alph*)]
    \item Answer A
    \item Answer B
    \item Answer C
    \item Answer D
  \end{enumerate}
  \begin{solution}
    The correct answer is \textbf{(b)} because ...
  \end{solution}
\end{enumerate}

Installation

Via marketplace (recommended)

First add this repo as a marketplace, then install the plugin by name:

/plugin marketplace add Schneggera/latex-moodle-skill
/plugin install latex-moodle

Locally

git clone https://github.com/Schneggera/latex-moodle-skill
claude plugin install ./latex-moodle-skill/plugins/latex-moodle

Usage

/latex-to-gift path/to/quiz.tex

The output file is written to the same directory with a .gift extension (e.g. quiz04.texquiz04.gift) and starts with a // Generated from <filename> comment.

GIFT output format

Title line for every question:

::Quiz N, Q<i>::

True/False

::Quiz N, Q<i>:: <question text>
{TRUE}

{FALSE} is used when False is the correct answer.

Single correct answer

The correct choice is listed first (prefixed =), wrong choices follow (prefixed ~):

::Quiz N, Q<i>:: <question text>
{
=<correct answer>
~<wrong answer>
~<wrong answer>
}

Multiple correct answers

Correct answers receive partial credit; wrong answers receive a %-100% penalty to discourage selecting all options:

| Correct answers | Credit per correct | |---|---| | 2 | %50% | | 3 | %33.33333% | | 4 | %25% |

::Quiz N, Q<i>:: <question text>
{
~%50%<correct answer 1>
~%50%<correct answer 2>
~%-100%<wrong answer 1>
~%-100%<wrong answer 2>
}

Text transformations applied

  • Inline math $...$\( ... \), display math $$...$$\[ ... \]
  • \textbf{}, \emph{}, \text{}, \textrm{} wrappers stripped (content kept)
  • Common symbols: \rightarrow, \leftarrow, \ldots / \dots
  • GIFT control characters (~, =, #, {, }, :) escaped in plain text regions
  • Whitespace normalised (leading/trailing stripped, internal runs collapsed)

License

MIT

Related plugins

Browse all →