auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: enhance tex-fold to include the exam class


From: Arash Esbati
Subject: Re: enhance tex-fold to include the exam class
Date: Mon, 13 May 2024 11:14:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Uwe Brauer <oub@mat.ucm.es> writes:

> Please consider this minimal example 
>
> \documentclass[addpoints,12pt]{exam}
> \usepackage[utf8]{inputenc}
> \usepackage[T1]{fontenc}
>
> \begin{document}
>
> \begin{questions}
>   \titledquestion{Chevalier de Méré and the dices}
>   \label{sec:org8ae33b2}
>   \droptotalpoints
>
>   The following game was quite popular in the 17th century.
>   The famous «Chevalier de Méré» is the most well known player of that
>   epoch.
>
>   \begin{parts}%Parts
>     \label{sec:orgec24546}
>
>     \part[1]
>     \label{sec:orgdd21b38}
>     ¿What is the probability of obtaining at least one 6 if you throw
>     the dice 4 times?
>   \end{parts}
>   \titledquestion{Statistical testing}
> \end{questions}
> \end{document}
>
> I want to include titledquestion into the folding syntax
>
> So that TeX-fold-buffer fold result in 
>   \titledquestion{Chevalier de Méré and the dices}....
>   \titledquestion{Statistical testing}...
>
> That would help me quite a bit to change the order of questions in an
> exam.

Maybe I'm getting this wrong, but the requirement above sounds like your
looking for outlining and not folding.  You could something like this:

--8<---------------cut here---------------start------------->8---
(setq TeX-outline-extra
      '(("[ \t]*\\\\titledquestion\\b" 5)))
--8<---------------cut here---------------end--------------->8---

and then activate `outline-mode' in your .tex buffer.

Best, Arash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]