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

Submitter:  Jeroen Wouters <jeronim>
Submitted:  Tue 24 Nov 2020 10:47:57 PM UTC
   
 
Category:  None Priority:  5 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  vdhoeven
Originator Name:  Open/Closed:  Closed
Release:  None Release: 
Fixed Release:  None Fixed Release: 
Keywords: 

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>
Group administrator
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)

Jeroen Wouters <jeronim>
Group Member
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:

<assign|folded|<\macro|x|y>
  <\render-folded-std|<unfold-button|<resize|<with|mode|math|<op|\<circ\>>>|||<maximum|1r|1.5fn>|>|lorem
  ipsum>>
    <arg|x>

    <hidden|<arg|y>>
  </render-folded-std>
</macro>>

<assign|unfolded|<\macro|x|y>
  <\render-folded-std|<fold-button|<resize|<with|mode|math|\<bullet\>>|||<maximum|1r|1.5fn>|>|lorem
  ipsum>>
    <arg|x>

    <arg|y>
  </render-folded-std>
</macro>>

Jeroen Wouters <jeronim>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    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.13-f8d8.
    Corresponding source code