Re: Macros inside @displaymath
On Mon, Nov 16, 2020 at 12:43:33AM +0100, Patrice Dumas wrote: > On Sat, Nov 14, 2020 at 05:25:56PM +, Gavin Smith wrote: > > On Sat, Nov 14, 2020 at 05:17:16PM +0100, Patrice Dumas wrote: > > > On Sat, Nov 14, 2020 at 08:49:05AM +, Gavin Smith wrote: > > > > > > > > This works perfectly with TeX as far as I can see, but unfortunately > > > > not with texi2any at present. This could be changed to make > > > > @displaymath more like @example, where Texinfo commands are interpreted, > > > > and less like @verbatim where they are not. > > > > > > I think that even better would be that it is parsed the same way as > > > @math, with braces balanced handled even if not associated with > > > @-commands and @-commands interpreted. > > > > > > I can do that for the perl parser. > > > > Great, thank you. > > It is done. The test results are not synced anymore (in particular because > the @end displaymath disappeared in texis results), but it doesn't make much > sense to sync them, the XS parser should be changed instead. > > A side effect of that change is that the @-commands in general are now > formatted in @displaymath, but I think that we do not really care, > in general @-commands should not appear in @displaymath. I will look it in the next few days but the XS parser and Perl parser need to be kept in sync, otherwise the XS parser will become useless.
Re: Macros inside @displaymath
Patrice, So now we can de the following @macro Exp \\mathop{\\rm exp} @end macro @displaymath @exp @end displaymath I suggest that instead of using @macro, we create an alias so that users write @gdef Exp \\mathop{\\rm exp} @end gdef @displaymath @exp @end displaymath > Sent: Monday, November 16, 2020 at 12:43 AM > From: "Patrice Dumas" > To: "Gavin Smith" > Cc: "Christopher Dimech" , "help-texinfo gnu" > > Subject: Re: Macros inside @displaymath > > On Sat, Nov 14, 2020 at 05:25:56PM +, Gavin Smith wrote: > > On Sat, Nov 14, 2020 at 05:17:16PM +0100, Patrice Dumas wrote: > > > On Sat, Nov 14, 2020 at 08:49:05AM +, Gavin Smith wrote: > > > > > > > > This works perfectly with TeX as far as I can see, but unfortunately > > > > not with texi2any at present. This could be changed to make > > > > @displaymath more like @example, where Texinfo commands are interpreted, > > > > and less like @verbatim where they are not. > > > > > > I think that even better would be that it is parsed the same way as > > > @math, with braces balanced handled even if not associated with > > > @-commands and @-commands interpreted. > > > > > > I can do that for the perl parser. > > > > Great, thank you. > > It is done. The test results are not synced anymore (in particular because > the @end displaymath disappeared in texis results), but it doesn't make much > sense to sync them, the XS parser should be changed instead. > > A side effect of that change is that the @-commands in general are now > formatted in @displaymath, but I think that we do not really care, > in general @-commands should not appear in @displaymath. > > -- > Pat >
Re: Macros inside @displaymath
On Sat, Nov 14, 2020 at 05:25:56PM +, Gavin Smith wrote: > On Sat, Nov 14, 2020 at 05:17:16PM +0100, Patrice Dumas wrote: > > On Sat, Nov 14, 2020 at 08:49:05AM +, Gavin Smith wrote: > > > > > > This works perfectly with TeX as far as I can see, but unfortunately > > > not with texi2any at present. This could be changed to make > > > @displaymath more like @example, where Texinfo commands are interpreted, > > > and less like @verbatim where they are not. > > > > I think that even better would be that it is parsed the same way as > > @math, with braces balanced handled even if not associated with > > @-commands and @-commands interpreted. > > > > I can do that for the perl parser. > > Great, thank you. It is done. The test results are not synced anymore (in particular because the @end displaymath disappeared in texis results), but it doesn't make much sense to sync them, the XS parser should be changed instead. A side effect of that change is that the @-commands in general are now formatted in @displaymath, but I think that we do not really care, in general @-commands should not appear in @displaymath. -- Pat
Re: @value fails with @image for pdf output
You can have both pdf and png files with the same filename in the same folder. For example img1.png and img1.pdf. The pdf one will be pick up first for PDF output and png for html output. That way you just use one command for both. Hilaire Le 15/11/2020 à 19:29, Christopher Dimech a écrit : Please note that the following code fails for pdf output, but works for html if I put dirhtml at the correct relative path to index.html @set dir-pdf ../Ideogr/Ch03b--Chmed @image{@value{dir-pdf}/igc03--01--Sicl--CircAmRg.png} @set dir-html ../../Ideogr/Ch03b--Chmed @image{@value{dir-html}/igc03--01--Sicl--CircAmRgpng} -- GNU Dr. Geo http://drgeo.eu https://pouet.chapril.org/@hilaire
@value fails with @image for pdf output
Please note that the following code fails for pdf output, but works for html if I put dirhtml at the correct relative path to index.html @set dir-pdf ../Ideogr/Ch03b--Chmed @image{@value{dir-pdf}/igc03--01--Sicl--CircAmRg.png} @set dir-html ../../Ideogr/Ch03b--Chmed @image{@value{dir-html}/igc03--01--Sicl--CircAmRgpng}
Re: Displaying images for html output
> Sent: Sunday, November 15, 2020 at 6:42 PM > From: "Gavin Smith" > To: "Christopher Dimech" > Cc: "help-texinfo gnu" > Subject: Re: Displaying images for html output > > On Sun, Nov 15, 2020 at 05:12:13PM +0100, Christopher Dimech wrote: > > > > It is the fifth and I still get the Alt Text Attribute. > > > > The output was > > > > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg > > > > If I put > > > > @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,.png} > > > > I get AltText > > > > But now I have understood the problem, > > > > Although the file exists at > > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png > > because the html index file resides in a subdirectory generated by > > texi2any, the > > code got to be changed to > > > > @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png} > > > > Furthermore, you cannot put ".png" as the fifth argument because for html > > that will > > fail. You have to put "png", without the period dot. > > This would be a bug if it is true. The manual says to include the period: > >* For Info and HTML output, 'makeinfo' uses the optional fifth > argument EXTENSION to '@image' for the filename extension, if it is > specified and the file is found. Any leading period should be > included in EXTENSION. For example: > > @image{foo.xpm} So we should keep the leading period and fix the bug for the html case.
Re: Displaying images for html output
On Sun, Nov 15, 2020 at 05:12:13PM +0100, Christopher Dimech wrote: > > It is the fifth and I still get the Alt Text Attribute. > > The output was > > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg > > If I put > > @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,.png} > > I get AltText > > But now I have understood the problem, > > Although the file exists at > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png > because the html index file resides in a subdirectory generated by texi2any, > the > code got to be changed to > > @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png} > > Furthermore, you cannot put ".png" as the fifth argument because for html > that will > fail. You have to put "png", without the period dot. This would be a bug if it is true. The manual says to include the period: * For Info and HTML output, 'makeinfo' uses the optional fifth argument EXTENSION to '@image' for the filename extension, if it is specified and the file is found. Any leading period should be included in EXTENSION. For example: @image{foo.xpm}
Re: Displaying images for html output
On Sun, Nov 15, 2020 at 05:12:13PM +0100, Christopher Dimech wrote: > > But now I have understood the problem, > > Although the file exists at > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png > because the html index file resides in a subdirectory generated by texi2any, > the > code got to be changed to > > @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png} > > Furthermore, you cannot put ".png" as the fifth argument because for html > that will > fail. You have to put "png", without the period dot. Actually this is problematic as it requires to put an extension and there is an error message stating that the file was not found. It probably should be documented that * the file should be relative to the location where texi2any is called if it is a file starting with ., .. or there will be a message * the file should be relative to the final directory to be found by browsers. Probably the way to go in the case of a split manual is to * prepopulate the directory where the split manual will be with the images. Can be in a subdirectory. * use names in @image without leading ., like @image{images_subdir/my_image} * call texi2any with a -I for the final directory, like texi2any --html -I my_manual my_manual.texi Should it be documented? -- Pat
Re: Displaying images for html output
It is the fifth and I still get the Alt Text Attribute. The output was ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg If I put @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,.png} I get AltText But now I have understood the problem, Although the file exists at ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png because the html index file resides in a subdirectory generated by texi2any, the code got to be changed to @image{../../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,8cm,8cm,AltText,png} Furthermore, you cannot put ".png" as the fifth argument because for html that will fail. You have to put "png", without the period dot. > Sent: Sunday, November 15, 2020 at 4:32 PM > From: "Gavin Smith" > To: "Christopher Dimech" > Cc: "help-texinfo gnu" > Subject: Re: Displaying images for html output > > On Sun, Nov 15, 2020 at 03:00:21PM +0100, Christopher Dimech wrote: > > > > This is what I have inputted which for texi2pdf > > > > @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,12cm,,,.png} > > > > In html I simply get the print > > > > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg > > > > But the image is not being displayed. > > This some of the information that you needed to send. According to the > manual, > > Here is the synopsis of the '@image' command: > > @image{FILENAME[, WIDTH[, HEIGHT[, ALTTEXT[, EXTENSION} > > Your extension is the fourth argument when it needs to be the fifth: > > > @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,12cm.png} > > Although you didn't send the contents of the HTML output you got, the .png > was probably output as an alt text attribute. >
Re: Displaying images for html output
On Sun, Nov 15, 2020 at 03:00:21PM +0100, Christopher Dimech wrote: > > This is what I have inputted which for texi2pdf > > @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,12cm,,,.png} > > In html I simply get the print > > ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg > > But the image is not being displayed. This some of the information that you needed to send. According to the manual, Here is the synopsis of the '@image' command: @image{FILENAME[, WIDTH[, HEIGHT[, ALTTEXT[, EXTENSION} Your extension is the fourth argument when it needs to be the fifth: > @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,12cm.png} Although you didn't send the contents of the HTML output you got, the .png was probably output as an alt text attribute.
Re: Displaying images for html output
This is what I have inputted which for texi2pdf @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg,12cm,,,.png} In html I simply get the print ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg But the image is not being displayed. > Sent: Sunday, November 15, 2020 at 10:40 AM > From: "Gavin Smith" > To: "Christopher Dimech" > Cc: "help-texinfo gnu" > Subject: Re: Displaying images for html output > > On Sun, Nov 15, 2020 at 12:40:05AM +0100, Christopher Dimech wrote: > > What is the command for displaying images for html output. When I use > > @image, the image is only being displayed when using texi2pdf. > > > Hello, have you consulted the documentation on the @image command? > > https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Image-Syntax.html > > Some advice on asking questions: > > https://stackoverflow.com/help/minimal-reproducible-example > http://www.catb.org/~esr/faqs/smart-questions.html >
Re: Displaying images for html output
That's what I have done, but I cannot see the output in html. > Sent: Sunday, November 15, 2020 at 10:40 AM > From: "Gavin Smith" > To: "Christopher Dimech" > Cc: "help-texinfo gnu" > Subject: Re: Displaying images for html output > > On Sun, Nov 15, 2020 at 12:40:05AM +0100, Christopher Dimech wrote: > > What is the command for displaying images for html output. When I use > > @image, the image is only being displayed when using texi2pdf. > > > Hello, have you consulted the documentation on the @image command? > > https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Image-Syntax.html > > Some advice on asking questions: > > https://stackoverflow.com/help/minimal-reproducible-example > http://www.catb.org/~esr/faqs/smart-questions.html >
Re: @exdent in @itemize introduces excessive spacing
On Sun, Nov 15, 2020 at 04:10:02AM +0100, Christopher Dimech wrote: > The following section adds excessive vertical space instead of only removing > indentation, > > @itemize @w{} > @item >@exdent @math{H_I(t)}: The Instrumental Transfer Response Function. > @item >@exdent @math{T_G(t)}: The Actual Physical Ground Motion. > @end itemize The manual doesn't show that @exdent works in @itemize, only in @example. Hence, it's unsurprising that it doesn't work (well) in @itemize. I had to check because it wasn't clear from your email, but it does actually work to remove indentation. So it might be possible to remove the extra vertical space, but I haven't investigated why this is. There may not be a need to fix this, though, because @format works just as well for this use case: @format @math{H_I(t)}: The Instrumental Transfer Response Function. @math{T_G(t)}: The Actual Physical Ground Motion. @end format
Re: Displaying images for html output
On Sun, Nov 15, 2020 at 12:40:05AM +0100, Christopher Dimech wrote: > What is the command for displaying images for html output. When I use > @image, the image is only being displayed when using texi2pdf. It is @image. It is documented here https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Image-Syntax.html You should have an error/warning message in html if the image file is not found. -- Pat
Re: Displaying images for html output
On Sun, Nov 15, 2020 at 12:40:05AM +0100, Christopher Dimech wrote: > What is the command for displaying images for html output. When I use > @image, the image is only being displayed when using texi2pdf. Hello, have you consulted the documentation on the @image command? https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Image-Syntax.html Some advice on asking questions: https://stackoverflow.com/help/minimal-reproducible-example http://www.catb.org/~esr/faqs/smart-questions.html
Re: Failure in html output - Reference to nonexistent nodes
On Sat, Nov 14, 2020 at 06:26:07PM +0100, Christopher Dimech wrote: > Still for productivity's sake, output is better than no output. > This is especially important for large works, where the author > does not want complete failure because of some inconsistency. It really depends. In particular for automatic generation, in Makefile, no document, I think, is better than a document if it failed. When calling manually texi2any, it seems to me that it is better if there is systematically an output. > I suggest a variable that can be used for strict checking. I do not understand that one. In general texi2any does strict checking, and the output can be silenced with --no-warn. -- Pat