[tex4ht] [bug #611] Random SIGSEGV of tex4ht due to invalid memory accesses

2023-10-14 Thread Oliver Freyermuth
Follow-up Comment #5, bug #611 (project tex4ht):

Hi again Karl,

many thanks! I don't see any problem with the memset call, and can confirm
this also makes valgrind blissfully silent on my end when applying the patches
to tex4ht on my local desktop (Gentoo Linux). I tested with various documents
and various parameters and found no problems. 

Since Gentoo currently seems to package an old snapshot of tex4ht based on a
not-directly-upstream source, I have pinged the corresponding maintainer to
pull in the fixes or ideally just switch to upstream ( for reference:
https://bugs.gentoo.org/915782 ). 

In my CI/CD pipeline which I am running via GitHub actions to produce HTML
pages for deployment with GitHub pages, I am actually relying on Docker
containers based on Alpine Linux with Texlive binaries installed via tlmgr.
Hence, that would be x86_64-linuxmusl binaries. In case those are easy for you
to build, of course that would be appreciated, if not, waiting for TL24 is
also fine for me (it's not that far off, and knowing the issue is fixed for
good makes me very happy :-) ). 

Cheers and many thanks for fixing things so quickly! 

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] How to add custom Css code into the configuration file? @media

2023-10-14 Thread Nasser M. Abbasi

On 10/14/2023 3:24 PM, Michal Hoftich wrote:

Hi Nasser,



It is because it is trying to copy the style file nma.css to the output 
directory!

And so ofcourse there is no folder /styles/css/ on the Linux disk. This is
meant only for the web server to use from its root public_html.



In this case, you can use this configuration instead:

\Configure{@HEAD}{}




Thanks Michal. THis is a very good solution. I removed \Configure{AddCss}
and replaced by the following:

You had small typo, I found I need \Hcode in there. So it is now

\Configure{@HEAD}{\HCode{}}

Now I can use output directory option and no files  needs to be copiled.


Why is make4ht trying to copy to the output_dir what is defined in 
\Configure{AddCss}?


Because that file is registered, and all registered files are copied
to the output directory.

Best regards,
Michal


Thanks
--Nasser


Re: [tex4ht] How to add custom Css code into the configuration file? @media

2023-10-14 Thread Michal Hoftich
Hi Nasser,

>
> It is because it is trying to copy the style file nma.css to the output 
> directory!
>
> And so ofcourse there is no folder /styles/css/ on the Linux disk. This is
> meant only for the web server to use from its root public_html.
>

In this case, you can use this configuration instead:

\Configure{@HEAD}{}


> Why is make4ht trying to copy to the output_dir what is defined in 
> \Configure{AddCss}?

Because that file is registered, and all registered files are copied
to the output directory.

Best regards,
Michal


Re: [tex4ht] How to only remove temporary files after calling make4ht to compile a file?

2023-10-14 Thread Michal Hoftich
Hi Nasser,

>
> make4ht ...  index.tex
> make4ht make4ht -m clean -a info index.tex
>
> This will delete, not on the temporary files (index.log, index.idv, etc...)
> but will also delete the html I just build !
>
> Ofcourse, I could delete these files myself later, since I know
> all the extensions of all these files.

The clean mode deletes all output files, including temporary and
converted HTML files. This is stated in the documentation. I don't
remember why it was set up this way, but it was likely based on a user
request. However, files that you place in the output directory using
the -d option are not deleted by the clean mode. The development
version of make4ht also includes a new option, --build-dir, which
moves all auxiliary files to a temporary directory that can be
deleted. This may be a better solution than the clean mode.

Best regards,
Michal


[tex4ht] How to only remove temporary files after calling make4ht to compile a file?

2023-10-14 Thread Nasser M. Abbasi



I can't figure after looking at https://texdoc.org/serve/make4ht/0  how to only
remove temporary files generated after calling make4ht to compile a file.

If I do

make4ht ...  index.tex
make4ht make4ht -m clean -a info index.tex

This will delete, not on the temporary files (index.log, index.idv, etc...)
but will also delete the html I just build !

Ofcourse, I could delete these files myself later, since I know
all the extensions of all these files.

But I think -m clean should really only delete the temporary
files generated from the compile step and nothing else. No images
and no .css and no htm files should be deleted.

Thank you,
--Nasser


Re: [tex4ht] How to add custom Css code into the configuration file? @media

2023-10-14 Thread Nasser M. Abbasi

On 8/30/2023 2:53 AM, Michal Hoftich wrote:

Hi Nasser,


Ok, fixed. Found my mistake. I forget to escape % and #
when I copied the code from the .css to try it in .cfg !

This now works in the .cfg.



In your case, you can use jurt \Configure{AddCss}{filename.css}. It
will include link to the CSS file, which you need to place somewhere.
The good thing is that you can use also URL. See
https://www.kodymirus.cz/tex4ht-doc/Configurations.html#document-styling-using-css
for more details.

Best regards,
Michal


Hello Michal;

I found small problem using \Configure{AddCss}{...}

I currently have this in my .cfg file

\Configure{AddCss}{/styles/css/nma.css}

Where /styles/css/ is folder that sits under the top of my server site. i.e.
in

public_html/styles/

This has been working great. In the HTML geneated I see it creates this HTML
in the header:



Everything is great so far. Web server can see nma.css since it is under
public_html on the server (external or local server on my PC).

But now I wanted to use --output-dir option for make4ht. But now it gives error

make4ht  --shell-escape -ulm default -d REPORT 

INFO]mkutils: Copy: cp "/styles/css/nma.css" "REPORT/styles/css"
[ERROR]   mkutils: File /styles/css/nma.css doesn't exist
cp: cannot stat '/styles/css/nma.css': No such file or directory

It is because it is trying to copy the style file nma.css to the output 
directory!

And so ofcourse there is no folder /styles/css/ on the Linux disk. This is
meant only for the web server to use from its root public_html.

Why is make4ht trying to copy to the output_dir what is defined in 
\Configure{AddCss}?

Is there a way to not make it not do that? As this file is meant to
be global file sitting in one place and accessed from each web page
and this has to work for when using --output-dir and when not using this option.

Any suggestions how to make this work for both options?

Thank you,
--Nasser