mailing-list for TeXmacs Users

Text archives Help


Re: Foldable proofs


Chronological Thread 
  • From: TeXmacs <address@hidden>
  • To: address@hidden
  • Subject: Re: Foldable proofs
  • Date: Sun, 30 May 2021 13:10:36 +0200

Hi Pierre-Henri,

On Sun, May 30, 2021 at 12:08:58PM +0200, Pierre-Henri Jondot wrote:
> For my math lessons, I distribute the main topics to students, including
> definitions, theorems, remarks, exercices but of course I leave out the
> proofs and answers to exercises, so that we can look for them together.
>
> They do have access to complete documents online, if they got sick and
> missed a lesson, or if they are unsure of one argument they copied
> though... So I am looking for a way to show/hide the proofs of theorems and
> answers of exercises.

Does this mean that you convert the TeXmacs files into Html,
or are your students assumed to use TeXmacs themselves?

> The simple, but very dirty way I have found so far is to redefine the proof
> macro in the preamble to just do nothing... and remove the definition for
> the proofs to come back. My first idea would have been to reproduce what I
> have been used to do with latex, which is to define the proof environment
> to respond to the value of a boolean, with a conditional branching if but,
> I am not sure, from what I could read in the Jolly Writer, that this would
> be a better approach...
>
> The education->course style already has something in that regard, only with
> respect with problems,exercise/solutions and Questions/answers.
>
> I tried to have a look at the style definitions, but it is a bit daunting :
> the course.ts file invokes many packages, including std-edu.ts, which does
> define the folding environment and it seems the change of the menus comes
> from the scheme script : edu-menu.scm, although I am not sure how this last
> module gets loaded...

The recommended way for this is to use

Insert -> Fold -> Folded -> Environment

In the "always visible" branch, you put the theorem itself.
In the "unfolded branch", you put the proof.
You may click on the circle in the margin to fold/unfold.
You might prefer to send the "margins on screen" to '10mm' instead of '5mm'.

If you want to export the folded environments to Html,
then you should also select the 'html-fold' package.

Best wishes, --Joris



Archive powered by MHonArc 2.6.19.

Top of page