bugGNU TeXmacs - Bugs: bug #59435, html export: files linked with...

 
 

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

bug #59435: html export: files linked with <include|file.tm> are not exported

Submitted by:  JW <jeronim>
Submitted on:  Mon 09 Nov 2020 03:54:29 PM UTC  
 
Category:  Conversion Priority:  5 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  1.99.12 Release:  None
Fixed Release:  None Fixed Release: 
Keywords: 

Wed 31 Mar 2021 08:22:54 PM UTC, comment #2: 

The origin of the problem is that the included file is not expanded  as the main tree is.

When converting the main tree, it is passed through buffer_export in new_buffer.cpp, which calls exec_html on it. This is not done for the included file.

Calling html-expand on the included tree has the same effect (see attached patch) and partially fixes the problem.

The remaining problem now is that the main and included trees are expanded separately, so section numbers don't increment as they should.

(file #51169)

JW <jeronim>
Mon 14 Dec 2020 04:07:12 PM UTC, comment #1: 

Some experimenting has shown that inline math in the main file causes "tmhtml-with" to be called which in turn causes "tmhtml-with-mode" to be called.

In an included file this doesn't happen.

If I load an include file as is done in tmhtml-include:

(define myinc (with u "testinclude.tm"
        (if (not (url-exists? u)) '()
            (with-global current-save-source u
              (with t (tree-inclusion u)
                (tm->stree t))))))

then the variable myinc contains

(document (concat "Include file " (math "c=d") "."))

If I then do "(texmacs->html myinc '())" the math is left out of the result.

If instead I call

(texmacs->html '(document (concat "Include file " (with "mode" "math" "c=d") ".")) '()))`

the math is included.

JW <jeronim>
Mon 09 Nov 2020 03:54:29 PM UTC, original submission:  

The contents of included files are not properly converted when linking .tm files using the <include|file.tm> command and exporting to html. Only parts appear in the html file. Chapter titles and equations seem to get dropped. Pdf export works as expected.

JW <jeronim>

 

Attached Files
file #50230:  main-file.tm added by jeronim (946B - text/x-texmacs.doc)
file #50231:  chapter2.tm added by jeronim (858B - text/x-texmacs.doc)
file #50232:  chapter1.tm added by jeronim (814B - text/x-texmacs.doc)
file #50233:  main-file.html added by jeronim (2KiB - text/html)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-31 jeronim Attached File- => Added html-include-linked-files.diff, #51169
    2020-11-09 jeronim Attached File- => Added main-file.tm, #50230
        Attached File- => Added chapter2.tm, #50231
        Attached File- => Added chapter1.tm, #50232
        Attached File- => Added main-file.html, #50233

    Back to the top


    Powered by Savane 3.6