mittelmark / shtmlview

A simple standalone viewer and a Tcl/Tk widget to display basic HTML and Markdown files
BSD 2-Clause "Simplified" License
5 stars 2 forks source link

Critcl error #6

Open mittelmark opened 1 year ago

mittelmark commented 1 year ago

Recently in comp.lang.tcl an error about critcl loading and missing svg conversion was reported.

The viewer should work as well without svg support and not refuse to start.

package require critcl package require shtmlview::shtmlview

I get the error output:

Error: no svg conversion available, neither critcl and librsvg2-dev or the terminal applications rsvg-convert or cairosvg are available! Please install one of the tools to support svg display!

But critcl is already loaded. And folowing test works fine:

::shtmlview::shtmlview .help -toolbar false .help browse C:/Tcl/lib/shtmlview/shtmlview.html pack .help -fill both -expand true -side left

How can it be that the critcl package is loaded but shtmlview thinks it's not?

mittelmark commented 1 year ago

I fixed that writing on stderr in case of missing svg conversionon my Github project

https://github.com/mittelmark/shtmlview/archive/refs/heads/main.zip

So:

tclsh sthmlview/shtmlview.tcl gives not an error to the terminal anymore.

tclsh shtmlview/shtmlview.tcl --help indicates now if Markdown support and svg conversion is available.

Please check if this works for you as expected.