Subject: mailing-list for TeXmacs Users
List archive
From : David Allouche <address@hidden>- To: address@hidden
- Subject: Generated content and multicolumn documents
- Date: Wed, 26 Dec 2001 03:55:27 +0100
I have noticed that TeXmacs do not handle properly generated content in
multicolumn documents. More generally, generated content is actually
generated only if it is located at the root of the document. In particular,
multicolumn text is done by using a <with|nr columns|2|...>, so
bibliographies, table of contents, etc. are not generated if they are placed
in a multicolumned region of the document.
I also noticed that when you regenerate the automatic text, the cursor gets
moved to the end of the last generated element. I understand that can be
considered a feature when you regenerate a specific part of the document, you
are moved to the part that have just changed. But I find it inappropriate
when, like me, you are just lazy and always do "Update All".
So, surprise, I made a patch that fixes it all.
Enjoy.
*** TeXmacs-0.3.5.11-src/src/Edit/Process/edit_process.gen.h --- TeXmacs-0.3.5.11-src/src/Edit/Process/edit_process.gen.h *************** *** 50,55 **** --- 50,58 ---- void generate_index (string idx); void generate_glossary (string glo); void generate_aux (string which= ""); + + private: + void generate_aux_recursively (string which, tree tt, path ip); }; #endmodule // edit_process *** TeXmacs-0.3.5.11-src/src/Edit/Process/edit_aux.gen.cc --- TeXmacs-0.3.5.11-src/src/Edit/Process/edit_aux.gen.cc *************** *** 332,349 **** } void ! edit_process_rep::generate_aux (string which) { ! int i, n= N(et); ! /* ! path p= start_forward (et); ! path bp, ep; ! */ ! ! for (i=0; i<n; i++) ! if (is_aux (et[i])) { ! tree t= et[i]; ! assign (path (i, N(t)-1), tree (DOCUMENT, "")); ! go_to (path (i, path (N(t)-1, path (0, 0)))); /* cout << "et= " << et << "\n"; --- 332,348 ---- } void ! edit_process_rep::generate_aux_recursively (string which, tree tt, path ip) { ! int n= N(tt); ! for (int i=0; i<n; i++) ! if (! is_aux (tt[i])) { ! if (is_compound (tt[i])) ! generate_aux_recursively (which, tt[i], path(i, ip)); ! } else { ! tree t= tt[i]; ! path doc_ipath (N(t)-1, path (i, ip)); ! assign (revert (doc_ipath), tree (DOCUMENT, "")); ! go_to (revert (path (0, path (0, doc_ipath)))); /* cout << "et= " << et << "\n"; *************** *** 369,374 **** --- 368,381 ---- cout << "------------------------------------------------------\n\n\n"; */ } + + } + + void + edit_process_rep::generate_aux (string which) { + path saved_path= tp; + generate_aux_recursively (which, et, path()); + if (which == "") go_to (saved_path); } #endmodule // code_edit_aux
- Generated content and multicolumn documents, David Allouche, 12/26/2001
- Re: Generated content and multicolumn documents, Joris van der Hoeven, 12/30/2001
Archive powered by MHonArc 2.6.19.