Re: Displaying images for html output
On Wed, Nov 18, 2020 at 09:47:09PM +, Gavin Smith wrote: > > I doubt that relative names beginning "../" were much considered > when @image was implemented (or even file names with directory parts > at all). > > I haven't thought of a clear answer for this issue yet. I think that > for split output, the image files need to be copied into the output > directory and the file names should be given under that, not beginning > "../". Alternatively, you could create a symbolic link to a directory > containing the image files under the output directory. > > It's odd that the include path should be searched for image files. > This makes sense for TeX but not for other formats, as there is no > search path for image files for HTML or Info. It would only make sense > if texi2any was going to copy the image files to the output location. I think that if the path does not starts with . or .. or is an absolute path, it would make sense 1) to search in include directories (I think that the current directory is always in front of of the search path) 2) to check if the directories and image file exist in the destination directory and if not copy the file For point 2), there could be a customization variable to prevent the copy, that would be off in the default case, but can be turned on for the users who want backward compatibility or do something else by themselves, for instance use links. -- Pat
Re: Displaying images for html output
> Sent: Thursday, November 19, 2020 at 11:10 PM > From: "Patrice Dumas" > To: "Gavin Smith" > Cc: "Christopher Dimech" , "help-texinfo gnu" > > Subject: Re: Displaying images for html output > > On Wed, Nov 18, 2020 at 09:47:09PM +, Gavin Smith wrote: > > > > I doubt that relative names beginning "../" were much considered > > when @image was implemented (or even file names with directory parts > > at all). > > > > I haven't thought of a clear answer for this issue yet. I think that > > for split output, the image files need to be copied into the output > > directory and the file names should be given under that, not beginning > > "../". Alternatively, you could create a symbolic link to a directory > > containing the image files under the output directory. > > > > It's odd that the include path should be searched for image files. > > This makes sense for TeX but not for other formats, as there is no > > search path for image files for HTML or Info. It would only make sense > > if texi2any was going to copy the image files to the output location. > > I think that if the path does not starts with . or .. or is an absolute > path, it would make sense > 1) to search in include directories (I think that the current directory > is always in front of of the search path) > 2) to check if the directories and image file exist in the destination > directory and if not copy the file > > For point 2), there could be a customization variable to prevent the > copy, that would be off in the default case, but can be turned on for > the users who want backward compatibility or do something else by > themselves, for instance use links. Yes, that would be very sensible. > -- > Pat >
Re: Paragraph vertical space
Fantastic. - Christopher Dimech General Administrator - Naiad Informatics - GNU Project (Geocomputation) - Geophysical Simulation - Geological Subsurface Mapping - Disaster Preparedness and Mitigation - Natural Resource Exploration and Production - Free Software Advocacy Sent: Thursday, November 19, 2020 at 8:45 PM From: "Hilaire Fernandes" To: "Christopher Dimech" , "Gavin Smith" Cc: "help-texinfo@gnu.org" Subject: Re: Paragraph vertical space I wrote it too early in the document source tree. Fine now. Thanks! Hilaire -- GNU Dr. Geo http://drgeo.eu https://pouet.chapril.org/@hilaire
Re: Paragraph vertical space
I wrote it too early in the document source tree. Fine now. Thanks! Hilaire -- GNU Dr. Geo http://drgeo.eu https://pouet.chapril.org/@hilaire
Re: Paragraph vertical space
Works for me as well. > Sent: Thursday, November 19, 2020 at 8:22 PM > From: "Gavin Smith" > To: "Hilaire Fernandes" > Cc: "help-texinfo@gnu.org" > Subject: Re: Paragraph vertical space > > On Thu, Nov 19, 2020 at 08:19:55PM +0100, Hilaire Fernandes wrote: > > Doesn't work either. > > > > Le 19/11/2020 à 19:40, Gavin Smith a écrit : > > > Try > > > > > > @tex > > > \global\parskip=3em > > > @end tex > > > > > > instead. > > Works for me, we must be doing something differently. > >
Re: Paragraph vertical space
On Thu, Nov 19, 2020 at 08:19:55PM +0100, Hilaire Fernandes wrote: > Doesn't work either. > > Le 19/11/2020 à 19:40, Gavin Smith a écrit : > > Try > > > > @tex > > \global\parskip=3em > > @end tex > > > > instead. Works for me, we must be doing something differently.
Re: Paragraph vertical space
Doesn't work either. Le 19/11/2020 à 19:40, Gavin Smith a écrit : Try @tex \global\parskip=3em @end tex instead. -- GNU Dr. Geo http://drgeo.eu https://pouet.chapril.org/@hilaire
Re: Width and Height in @image for Html Output fail
On Thu, Nov 19, 2020 at 07:51:30PM +0100, Christopher Dimech wrote: > It occurs to me that one requires two image versions: > (1) An image for high-resolution pdf; and (2) Another > image for low resolution image html. > > Can we think of only having one command that calls > @image, rather than two (i.e. rather than having @iftex > and @ifhtml)? I don't know how you do it, but if you can convert the hi-res file to a PDF somehow, then FILENAME.pdf should be used for PDF output while FILENAME.png is used for HTML.
Re: Width and Height in @image for Html Output fail
On Thu, Nov 19, 2020 at 07:40:40PM +0100, Christopher Dimech wrote: > Choosing the maximum number of horizontal pixel to be 500 gets acceptable > results. If you were serving these files from a server, using smaller files would also save bandwidth.
Re: Width and Height in @image for Html Output fail
It occurs to me that one requires two image versions: (1) An image for high-resolution pdf; and (2) Another image for low resolution image html. Can we think of only having one command that calls @image, rather than two (i.e. rather than having @iftex and @ifhtml)? For instance, @image{../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png} For pdf output will use the file ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.png For html output will use ../Ideogr/Ch03b--Chmed/igc03--01--Sicl--CircAmRg.html.png Or the like. Regards Christopher > Sent: Thursday, November 19, 2020 at 7:40 PM > From: "Christopher Dimech" > To: "Gavin Smith" > Cc: "help-texinfo gnu" > Subject: Re: Width and Height in @image for Html Output fail > > Choosing the maximum number of horizontal pixel to be 500 gets acceptable > results. > > > Sent: Thursday, November 19, 2020 at 5:48 PM > > From: "Gavin Smith" > > To: "Christopher Dimech" > > Cc: "Patrice Dumas" , "help-texinfo gnu" > > > > Subject: Re: Width and Height in @image for Html Output fail > > > > > > On Thu, Nov 19, 2020 at 08:20:13AM +0100, Christopher Dimech wrote: > > > Can't the large image be downsized with the height and width attributes in > > > html? > > > > No, I mean changing the actual files themselves. > > > >
Re: Width and Height in @image for Html Output fail
Choosing the maximum number of horizontal pixel to be 500 gets acceptable results. > Sent: Thursday, November 19, 2020 at 5:48 PM > From: "Gavin Smith" > To: "Christopher Dimech" > Cc: "Patrice Dumas" , "help-texinfo gnu" > > Subject: Re: Width and Height in @image for Html Output fail > > > On Thu, Nov 19, 2020 at 08:20:13AM +0100, Christopher Dimech wrote: > > Can't the large image be downsized with the height and width attributes in > > html? > > No, I mean changing the actual files themselves. >
Re: Paragraph vertical space
On Thu, Nov 19, 2020 at 07:23:51PM +0100, Hilaire Fernandes wrote: > Hi, > > In the PDF output, I want to augment the minimum vertical space between > paragraph. > > I tried without success this naive approach: > > @tex > \usepackage{parskip} > \setlength{\parskip}{3em} > @end tex > > Hilaire This is completely wrong, looks like LaTeX or something which you can't use. Try @tex \global\parskip=3em @end tex instead.
Re: Paragraph vertical space
You can use @vskip 3mm - Christopher Dimech General Administrator - Naiad Informatics - GNU Project (Geocomputation) - Geophysical Simulation - Geological Subsurface Mapping - Disaster Preparedness and Mitigation - Natural Resource Exploration and Production - Free Software Advocacy > Sent: Thursday, November 19, 2020 at 7:23 PM > From: "Hilaire Fernandes" > To: "help-texinfo@gnu.org" > Subject: Paragraph vertical space > > Hi, > > In the PDF output, I want to augment the minimum vertical space between > paragraph. > > I tried without success this naive approach: > > @tex > \usepackage{parskip} > \setlength{\parskip}{3em} > @end tex > > Hilaire > > -- > GNU Dr. Geo > http://drgeo.eu > https://pouet.chapril.org/@hilaire > > >
Paragraph vertical space
Hi, In the PDF output, I want to augment the minimum vertical space between paragraph. I tried without success this naive approach: @tex \usepackage{parskip} \setlength{\parskip}{3em} @end tex Hilaire -- GNU Dr. Geo http://drgeo.eu https://pouet.chapril.org/@hilaire
Re: Error with macro use case where arguments span in several lines
On Wed, Nov 18, 2020 at 09:46:00AM +0100, Hilaire Fernandes wrote: > Hi, > > With a figure macro defined as: > > @c Figure with caption @macro figure{caption,file,width} @ifnotplaintext > @float Figure,\file\ @center @image{\file\,\width\cm} @caption{\caption\} > @end float @end ifnotplaintext @ifplaintext @float Figure > @caption{\caption\} @end float @end ifplaintext @iftex @sp 1 @end iftex > @end macro > > It is fined when used as: > > @figure{The File List tool@comma{} to install a change set and > more,ch10-FileListChangeSet,11} > > But got error when used and formated in two lines: > > @figure{The File List tool@comma{} to install a change set and more, > ch10-FileListChangeSet,11} > > It is strange because with some other macro I don't have issue to put the > arguments in several lines to improve readability of the source text > document. > > Thanks > > Hilaire The problem seems to be with the \xeatspaces macro. This is barfing at being given an argument beginning with a newline (as the comma is right before the newline, that is included in the argument). With @tracingmacros=1: @floatlabel ->@xeatspaces { ch10-FileListChangeSet} @xeatspaces ->@eatspaces @eatspaces #1->@expandafter @trim@ @expandafter {#1 } #1<- ch10-FileListChangeSet ->@par @trim@ #1->@trim@@ @#1 @ #1 @ @@ Runaway argument? { ! Paragraph ended before @trim@ was complete. I tried to give active newline a definition that would make it disappear in this context, but this didn't work, as you can't make new definitions in TeX when you are in an expansion-only context. It's related to a recently reported problem: https://lists.gnu.org/archive/html/help-texinfo/2020-10/msg1.html It would ideal if \xeatspaces could be run earlier. I'll think about this again but may not succeed. What could perhaps be done is, when the macro has several parameters, to make ends of lines insignificant. This doesn't conflict with any of the test cases in texinfo-tex-test.texi; however, you could imagine a use case for a @macro where this was important, where the arguments are like @inlinefmt where newlines should be kept in just one of the arguments.
Re: Width and Height in @image for Html Output fail
So what I got to do is reduce the pixel sizes? I will check that out. > Sent: Thursday, November 19, 2020 at 5:48 PM > From: "Gavin Smith" > To: "Christopher Dimech" > Cc: "Patrice Dumas" , "help-texinfo gnu" > > Subject: Re: Width and Height in @image for Html Output fail > > > On Thu, Nov 19, 2020 at 08:20:13AM +0100, Christopher Dimech wrote: > > Can't the large image be downsized with the height and width attributes in > > html? > > No, I mean changing the actual files themselves. >
Re: Width and Height in @image for Html Output fail
> Sent: Thursday, November 19, 2020 at 5:48 PM > From: "Gavin Smith" > To: "Christopher Dimech" > Cc: "Patrice Dumas" , "help-texinfo gnu" > > Subject: Re: Width and Height in @image for Html Output fail > > > On Thu, Nov 19, 2020 at 08:20:13AM +0100, Christopher Dimech wrote: > > Can't the large image be downsized with the height and width attributes in > > html? > > No, I mean changing the actual files themselves. Thusly you suggest I have two files, small ones for html. Is that how things are done for web pages?
Re: Width and Height in @image for Html Output fail
On Thu, Nov 19, 2020 at 08:20:13AM +0100, Christopher Dimech wrote: > Can't the large image be downsized with the height and width attributes in > html? No, I mean changing the actual files themselves.
Re: Error with macro use case where arguments span in several lines
Yeah, the mail agent formatting Hope it will be right now: @c Figure with caption @macro figure{caption,file,width} @ifnotplaintext @float Figure,\file\ @center @image{\file\,\width\cm} @caption{\caption\} @end float @end ifnotplaintext @ifplaintext @float Figure @caption{\caption\} @end float @end ifplaintext @iftex @sp 1 @end iftex @end macro Le 19/11/2020 à 07:44, Gavin Smith a écrit : Ends of lines are missing here, could you send it again so I can test it? -- GNU Dr. Geo http://drgeo.eu https://pouet.chapril.org/@hilaire