bugGNU TeXmacs - Bugs: bug #59537, html export: Counters in folds get...


You are not allowed to post comments on this tracker with your current authentication level.

bug #59537: html export: Counters in folds get incremented twice

Submitted by:  JW <jeronim>
Submitted on:  Tue 24 Nov 2020 10:47:57 PM UTC  
Category:  None Priority:  5 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  Joris van der Hoeven <vdhoeven>
Originator Name:  Open/Closed:  Closed
Release:  Release:  None
Fixed Release:  None Fixed Release: 

Mon 01 Mar 2021 09:40:04 PM UTC, comment #2: 

Fixed in revision 13344.

Note that you may wish to use the html-fold package.

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Wed 25 Nov 2020 11:13:50 AM UTC, comment #1: 

A similar situation happens in pdf export of documents in the beamer style (see attached pdf-export-beamer-counters.tm).

(file #50339, file #50340)

JW <jeronim>
Tue 24 Nov 2020 10:47:57 PM UTC, original submission:  

When using the education "course" style to include problems with hidden answers, the problem counter gets incremented twice when exporting to html.

The result is a html file which contains
- Problem 2
- Problem 4

instead of
- Problem 1
- Problem 2

The problem generally arises when putting counters inside the <folded||> macro. The cause seems to be that the argument 'x' (which contains the counter) appears twice in the definition of folded, once as an argument to 'unfold-button' and once in the body.

Redefining the 'folded' and 'unfolded' macros, removing 'x' in 'unfold-button' seems to fix the issue. I don't fully understand what the function of that 'x' is, but so fat I don't notice any other side-effects, folding and unfolding still work.

My redefined macro's are:





JW <jeronim>


Attached Files
file #50339:  pdf-export-beamer-counters.pdf added by jeronim (11KiB - application/pdf)
file #50340:  pdf-export-beamer-counters.tm added by jeronim (453B - text/x-texmacs.doc)
file #50335:  html-export-counters.tm added by jeronim (624B - text/x-texmacs.doc)
file #50336:  html-export-counters-pseudo-fix.tm added by jeronim (1KiB - text/x-texmacs.doc)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by vdhoeven (Posted a comment)
  • -email is unavailable- added by jeronim (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-01 vdhoeven StatusNone => Fixed
        Assigned toNone => vdhoeven
        Open/ClosedOpen => Closed
    2020-11-25 jeronim Attached File- => Added pdf-export-beamer-counters.pdf, #50339
        Attached File- => Added pdf-export-beamer-counters.tm, #50340
    2020-11-24 jeronim Attached File- => Added html-export-counters.tm, #50335
        Attached File- => Added html-export-counters-pseudo-fix.tm, #50336
        Attached File- => Added html-export-counters.html, #50337

    Back to the top

    Powered by Savane 3.5