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

Submitter:  Jeroen Wouters <jeronim>
Submitted:  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:  None Release:  1.99.12
Fixed Release:  None Fixed Release: 
Keywords: 

Wed 18 May 2022 08:47:59 AM UTC, comment #4: 

It has been reported on the forum that a similar behaviour happens with the export to LaTeX.

http://forum.texmacs.cn/t/exporting-projects-multifile-documents/944

Jeroen Wouters <jeronim>
Project Member
Mon 29 Nov 2021 07:13:06 PM UTC, comment #3: 

I have found out that files included with `<include*|file.tm>` do get exported. They are somehow expanded into the tree before it reaches the html converter. I don't yet understand where this happens. `<include|file.tm>` is not expanded, although this is a simple combination of `include*` and `part-info`.

Jeroen Wouters <jeronim>
Project Member
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)

Jeroen Wouters <jeronim>
Project Member
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.

Jeroen Wouters <jeronim>
Project Member
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.

Jeroen Wouters <jeronim>
Project Member

 

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

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

    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 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.9