Re: [help-texinfo] texi2html trouble
On Tue, Dec 27, 2011 at 11:29:13AM +0100, Andreas Falkenhahn wrote: > > Sure, check out the attached mini test texi. The call goes like this: > $ texi2html -frames -split node test.texi > > test_frame.html will then reference the file test.html but test.html won't > be created at all. Indeed, texi2html-1.82 seems to be broken in that respect. I checked that texinfo/tp works well. > Testing new versions is not that easy for me because I'm on cygwin and > I'm not sure if I can simply drop new versions into my cygwin installation. My experience with cygwin is that packages following the GNU standards may be installed quite easily. You should be able to download the source and do ./configure && make && make install If you want to try the cvs version, you have to have automake/autoconf/gettext installed, and you could do something along cvs -z3 -d:pserver:anonym...@cvs.savannah.gnu.org:/sources/texinfo co texinfo cd texinfo ./autogen.sh ./configure && make && make check && make install > Why is the new version bumped to 5.0 by the way? Is it a complete > rewrite or something? No, but the idea was to synchronize version with texinfo before merging. In the end texi2html is in texinfo, but the next release will be based on a new implementation, the Parser. > Is it possible to get rid of the "Section" links in the Index? In my document, > index entries and section entries use identical names. Thus, the index looks > kind of redundant because it goes like this: > > Index Entry Section > An index entry 5.7 An index entry > Another index entry 5.3 Another index entry > Last index entry10.9 Last index entry > > It would be totally sufficient for my purposes if there was only the left > column > (Index Entry) in the Index. The section entries could be left out altogether. That would require that you redefine the function reference that does the indes entry formatting. For menu entry there is something along what you ask for, but not for index entries, since your case should be pretty rare. -- Pat
Re: [help-texinfo] texi2html trouble
On 27.12.2011 at 01:15 Patrice Dumas wrote: >On Tue, Dec 27, 2011 at 12:39:30AM +0100, Andreas Falkenhahn wrote: >> On 26.12.2011 at 23:47 Patrice Dumas wrote: >> >> Thanks a lot, now it's working indeed! There's just one minor problem >left: >> For foo.texi, texi2html creates an entry file named foo_frame.html and >this >> file references foo.html for the main frame in this line: >> >> >> >> foo.html, however, is not created by texi2html so opening foo_frame.html >> in a browser leads to a 404 error in the right frame. > >That looks like a bug. Can you send an example manual any >required init file (I guess none are needed) and the call >of texi2html? Sure, check out the attached mini test texi. The call goes like this: $ texi2html -frames -split node test.texi test_frame.html will then reference the file test.html but test.html won't be created at all. > >Also, you could try the latest almost released version of >texi2html >http://download.savannah.gnu.org/releases/texi2html/texi2html-5.0.tar.gz >or even the texi2html version inside of the texinfo cvs... >But if you go that far, you could as well turn to the >new implementation that should be released someday, and >use texi2any... Testing new versions is not that easy for me because I'm on cygwin and I'm not sure if I can simply drop new versions into my cygwin installation. Why is the new version bumped to 5.0 by the way? Is it a complete rewrite or something? > >This also (with version 1.82, at least) requires using an init file. >You need to redefine the program_string function reference, like Thanks, works like a charm. Another question: Is it possible to get rid of the "Section" links in the Index? In my document, index entries and section entries use identical names. Thus, the index looks kind of redundant because it goes like this: Index Entry Section An index entry 5.7 An index entry Another index entry 5.3 Another index entry Last index entry10.9 Last index entry It would be totally sufficient for my purposes if there was only the left column (Index Entry) in the Index. The section entries could be left out altogether. Andreas test.texi Description: Binary data
Re: [help-texinfo] texi2html trouble
On Tue, Dec 27, 2011 at 12:39:30AM +0100, Andreas Falkenhahn wrote: > On 26.12.2011 at 23:47 Patrice Dumas wrote: > > Thanks a lot, now it's working indeed! There's just one minor problem left: > For foo.texi, texi2html creates an entry file named foo_frame.html and this > file references foo.html for the main frame in this line: > > > > foo.html, however, is not created by texi2html so opening foo_frame.html > in a browser leads to a 404 error in the right frame. That looks like a bug. Can you send an example manual any required init file (I guess none are needed) and the call of texi2html? Also, you could try the latest almost released version of texi2html http://download.savannah.gnu.org/releases/texi2html/texi2html-5.0.tar.gz or even the texi2html version inside of the texinfo cvs... But if you go that far, you could as well turn to the new implementation that should be released someday, and use texi2any... > Also, another question: Is there a way to get rid of the footer that says: > This document was generated by U-MACHINAE\Andreas on December 27, 2011 using > texi2html 1.82. > > It is appended to the end of every document automatically but I'd prefer to > leave this out no offense meant of course :) This also (with version 1.82, at least) requires using an init file. You need to redefine the program_string function reference, like $program_string= \&my_noop; sub my_noop { return ''; } -- Pat
Re: [help-texinfo] texi2html trouble
On 26.12.2011 at 23:47 Patrice Dumas wrote: >> Thanks, book.init seems to do the trick but there's still one flaw: When >I >> select the first chapter in the left frame, the whole TOC appears again >> in the right frame and the contents of the first chapter are at the very >end >> of the TOC. So the user has to scroll all the way down to see the >> chapter's contents because it is preceded by the TOC. But this is only >> the case for the first chapter. All other chapters are working fine. Any >> ideas why this is happening? > >It's because it is the Top element, which is treated especially. I >just read the code, and indeed, it is not very easy to prevent the >contents to be output there. I think that you need an init file this time. > >The init file just needs to unset the unconditional contents formatting. >you could try a file, called for example no_content.init containing only: > >$DO_CONTENTS = 0; >1; > >Then you'll call texi2html like > >texi2html --init book.init --init no_content.init .. Thanks a lot, now it's working indeed! There's just one minor problem left: For foo.texi, texi2html creates an entry file named foo_frame.html and this file references foo.html for the main frame in this line: foo.html, however, is not created by texi2html so opening foo_frame.html in a browser leads to a 404 error in the right frame. Also, another question: Is there a way to get rid of the footer that says: This document was generated by U-MACHINAE\Andreas on December 27, 2011 using texi2html 1.82. It is appended to the end of every document automatically but I'd prefer to leave this out no offense meant of course :) Andreas
Re: [help-texinfo] texi2html trouble
Why does texi2html suddenly begin to lament about it when texi2pdf deals with it just fine? The basic answer to this question is that texi2html and texi2pdf are two completely different implementations of Texinfo (one in Perl and one in TeX), and texi2pdf (i.e., texinfo.tex) does not care a whit for node relationships, while that is fundamental to texi2html (and makeinfo). Why should I use @menu here? What is it good for? Wouldn't it be kind of redundant if I added all the sections of a chapter into a menu again? You are right that it is "kind of redundant" when all you are generating is HTML. But they are still useful because they explicitly show readers (of the output) the sections under a given chapter. And menus are fundamental to Info navigation. But since it seems you and Patrice can get book.init to work satisfactorily with enough tweaks, more power to you :). Hope this helps, karl P.S. Regarding texi2html being obsolete ... well, when texinfo 5.0 hits the streets, sort of. (No ETA.) Definitely not obsolete related to makeinfo 4.13.
Re: [help-texinfo] texi2html trouble
On Mon, Dec 26, 2011 at 10:09:56PM +0100, Andreas Falkenhahn wrote: > > > >texi2html --set-init-variable USE_NODES=1 > > Hmm, -set-init-variable isn't recognized here. Indeed, it appeared only very recently (in an unreleased version, in fact, which is not that helpful...). > and so on. Why should I use @menu here? What is it good for? > Wouldn't it be kind of redundant if I added all the sections of > a chapter into a menu again? It is to let you decide the layout and description used for each menu entry. This is especially important for the Info output format but less important for other formats. Hopefully, not in the next release of Texinfo, but in the following, the need to do a menu should be gone. With the version of texi2html you have, you can use --no-menu. > Thanks, book.init seems to do the trick but there's still one flaw: When I > select the first chapter in the left frame, the whole TOC appears again > in the right frame and the contents of the first chapter are at the very end > of the TOC. So the user has to scroll all the way down to see the > chapter's contents because it is preceded by the TOC. But this is only > the case for the first chapter. All other chapters are working fine. Any > ideas why this is happening? It's because it is the Top element, which is treated especially. I just read the code, and indeed, it is not very easy to prevent the contents to be output there. I think that you need an init file this time. The init file just needs to unset the unconditional contents formatting. you could try a file, called for example no_content.init containing only: $DO_CONTENTS = 0; 1; Then you'll call texi2html like texi2html --init book.init --init no_content.init .. -- Pat
Re: [help-texinfo] texi2html trouble
On 26.12.2011 at 21:20 ilusionoflife wrote: >On Monday 26 December 2011 21:09:19 Andreas Falkenhahn wrote: >> t why? How to fix that? There are zero warnings when running texi2pdf on >> this document... and it's over 700 pages! Why does texi2html suddenly >> begin to lament about it when texi2pdf deals with it just fine? >As far as I know, texi2html is deprecated. >Probably, you should use makeinfo --html? Thanks for the hint. I just tried makeinfo but it doesn't accept my texi file at all. Instead I get tons of these errors: foo.texi:1234: Node `bar' requires a sectioning command (e.g., @unnumberedsubsec). The error doesn't make sense to me because I'm actually using a sectioning command right after the node, e.g. @node foo @section Foo @findex foo Text starts here Still, I get tons of errors telling me to put a sectioning command after @node!? Andreas
Re: [help-texinfo] texi2html trouble
On Monday 26 December 2011 21:09:19 Andreas Falkenhahn wrote: > t why? How to fix that? There are zero warnings when running texi2pdf on > this document... and it's over 700 pages! Why does texi2html suddenly > begin to lament about it when texi2pdf deals with it just fine? As far as I know, texi2html is deprecated. Probably, you should use makeinfo --html?
Re: [help-texinfo] texi2html trouble
On 26.12.2011 at 19:24 Patrice Dumas wrote: >Which version of texi2html are you using? 1.82 >That looks possibly correct, however, keep in mind that texi2html, by >default, uses sectioning commands, and not nodes to delimitate the >elements output. If you want nodes to be used, from the top of my >head, you could do something along > >texi2html --set-init-variable USE_NODES=1 Hmm, -set-init-variable isn't recognized here. >That's simply because the @chapter element correspond to the text >between the @chapter (and maybe the previous @node) and the next >sectioning command. My guess is that it is more or less empty in >your document (in the classical case, there should be a @menu). I've now read up on @menu in the texinfo manual but I don't really get why I would need this in my document. The structure in my document is always as this: @chapter Chapter 1 @node Chapter1Section1 @section First section This is the first section @node Chapter1Section2 @section Second section This is the second section @chapter Chapter 2 @node Chapter2Section1 @section First section and so on. Why should I use @menu here? What is it good for? Wouldn't it be kind of redundant if I added all the sections of a chapter into a menu again? >No need to write an init file for your case. If you don't want to >bother with @menu, you could try to use book.init and see if it >suits you need as it should add automatically directions for >sections below (and up). Thanks, book.init seems to do the trick but there's still one flaw: When I select the first chapter in the left frame, the whole TOC appears again in the right frame and the contents of the first chapter are at the very end of the TOC. So the user has to scroll all the way down to see the chapter's contents because it is preceded by the TOC. But this is only the case for the first chapter. All other chapters are working fine. Any ideas why this is happening? Andreas
Re: [help-texinfo] texi2html trouble
Which version of texi2html are you using? On Mon, Dec 26, 2011 at 06:09:19PM +0100, Andreas Falkenhahn wrote: > > Hi, > > Thus, I'm running texi2html like this: > > texi2html -frames -split node foo.texi That looks possibly correct, however, keep in mind that texi2html, by default, uses sectioning commands, and not nodes to delimitate the elements output. If you want nodes to be used, from the top of my head, you could do something along texi2html --set-init-variable USE_NODES=1 > The result is gazillions of these warnings: > > ** fooNode doesn't appear in menus > ** `fooChapter' is up for fooNode', but has no menu entry for this node > > I have the feeling that I'm getting these two warnings for every node in my > document. > But why? How to fix that? There are zero warnings when running texi2pdf on > this > document... and it's over 700 pages! Why does texi2html suddenly begin to > lament > about it when texi2pdf deals with it just fine? Those warnings are about the menu structure of the document which is incorrect. If you want to have the menu structure ignored (as what texi2pdf does), you can pass texi2html --set-init-variable SHOW_MENU=0 Otherwise you'll have to do @menu as explained in the texinfo manual. > Nevertheless, the conversion to HTML somewhat works and 800 single HTML > files are written to the current directory, including a foo_frame.html entry > point. > However, when I select a chapter now in the left frame (e.g. Chapter 1), the > sections of that very chapter are NOT shown! The HTML page that is displayed > in the right frame when I click on a chapter in the left frame is simply a > dummy > HTML that doesn't contain anything more than the heading of the chapter! The > chapter's section aren't listed on this page which looks very confusing! That's simply because the @chapter element correspond to the text between the @chapter (and maybe the previous @node) and the next sectioning command. My guess is that it is more or less empty in your document (in the classical case, there should be a @menu). > So could anyone help me to get this working correctly? I've read through the > documentation a bit and it seems that a lot can be achieved with these init > files, but honestly, that looks far too complex for my purposes! I think what > I > want should be quite trivial: texi2html should just give me a two-framed HTML > with the TOC on the left and the contents on the right. I hope this can be > achieved > without having to write a customized init file first... No need to write an init file for your case. If you don't want to bother with @menu, you could try to use book.init and see if it suits you need as it should add automatically directions for sections below (and up). > What is even more strange is that the CHM target works perfectly and > absolutely > none of the warnings cited above appear!! When I use chm.init as the init > file, texi2html creates a complete, ready to use HTML Help project. That was > surely very convenient! I'd just wish that it could also give me a nice > two-framed > HTML version of my texi doc this easily... The base for the html part of the chm output is the same as what you do (with indeed SHOW_MENU=0), but the whole structure is done using chm specific files. -- Pat
[help-texinfo] texi2html trouble
Hi, I'm currently experiencing some trouble trying to convert my *.texi documentation into the HTML format. I want to convert my *.texi doc into a framed HTML version. The table of contents should be in the left frame and I want the actual contents in the right frame. Each node in my texi file should be stored as a separate *.html file. Thus, I'm running texi2html like this: texi2html -frames -split node foo.texi The result is gazillions of these warnings: ** fooNode doesn't appear in menus ** `fooChapter' is up for fooNode', but has no menu entry for this node I have the feeling that I'm getting these two warnings for every node in my document. But why? How to fix that? There are zero warnings when running texi2pdf on this document... and it's over 700 pages! Why does texi2html suddenly begin to lament about it when texi2pdf deals with it just fine? Nevertheless, the conversion to HTML somewhat works and 800 single HTML files are written to the current directory, including a foo_frame.html entry point. However, when I select a chapter now in the left frame (e.g. Chapter 1), the sections of that very chapter are NOT shown! The HTML page that is displayed in the right frame when I click on a chapter in the left frame is simply a dummy HTML that doesn't contain anything more than the heading of the chapter! The chapter's section aren't listed on this page which looks very confusing! So could anyone help me to get this working correctly? I've read through the documentation a bit and it seems that a lot can be achieved with these init files, but honestly, that looks far too complex for my purposes! I think what I want should be quite trivial: texi2html should just give me a two-framed HTML with the TOC on the left and the contents on the right. I hope this can be achieved without having to write a customized init file first... What is even more strange is that the CHM target works perfectly and absolutely none of the warnings cited above appear!! When I use chm.init as the init file, texi2html creates a complete, ready to use HTML Help project. That was surely very convenient! I'd just wish that it could also give me a nice two-framed HTML version of my texi doc this easily... Tks, Andreas