Re: HTML rendering issue

Scott Kostyshak <[email protected]>
Newsgroups gmane.editors.lyx.general
Message-ID <qpdhq772slgxwamhmfoubdkdwk75vpi5hhi7kygcdlule6fi6l@22exkiarpr2h>
On Wed, Dec 03, 2025 at 09:36:57PM +0530, Akhilesh Singh wrote:
> Dear Lyx,
> 
> I am using Lyx 2.4.4 on Opensuse Tumbleweed as well as on Windows 10.
> 
> I have written and successfully rendered a book in pdf on Statistics
> containing a lot of data based examples and computations using R, with the
> help of 'knitr' modules.
> 
> While I sent the book for publication in pdf format, publishers are also
> asking for the same in HTML format too, for their website.
> 
> However, the same book successfully rendered in pdf (luatex as well as
> pdflatex) is not being rendered in HTML format.
> 
> The problem that is shown, is that Lyx is not able to fetch the figures
> created by 'knitr' modules, scattered all over the book, in the figure/
> subdirectory in the working directory automatically.
> 
> While the Lyx is able to fetch these figures from the same sub-directory
> successfully for the pdf format, but it CAN NOT fetch the same for
> rendering into HTML format.
> 
> The same problem happens on Opensuse tumbleweed as well as on Windows.
> 
> For reproducing the problem I am attaching below a minimal example Lyx file
> from the same book.

Dear Akhilesh,

I'm sorry you didn't get a response for a couple of weeks.

I use knitr quite extensively, and I just tested and indeed HTML export
does not work well. I tried both with built-in LyX's HTML export as well
as using an external tool.

In theory, the export using LyX's built-in HTML export should be
fixable. That said, we would need a developer who is interested enough
(if a LyX dev is interested enough, I will be happy to provide examples
and testing) and my guess is that won't happen any time soon.

Unfortunately, I only have a hackish proposal, which is to try to
convert the PDF itself to HTML. I think there are such tools that work
reasonably well these days. I don't have experience with them though.

Sorry I don't have better news, maybe someone else will. It is quite
unfortunate you are "punished" for using the excellent workflow of
knitr.

Best of luck!

Scott

-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEMfkICpsJzYuNuGlOA4ZnarZHC+sFAmlDtGYACgkQA4ZnarZH
C+sMoAf/bpCCsiYRAte0gyV77GFrFAGrmkPe+gP0vDNCcVWMzLmS+pPR9I8h+Khu
a9h/k5Jzt/96lIzhjn8ETW1sMNgTem/et8KV8HPoAz8dueqU/Pv6UZRG3AB+L27I
FXxZq4/4WpJ56JXsJrk+osMAv678wSMzkmXBbwN8d0LDmHmwB4lhgIveR3veLQPQ
3J9ElShlk9cmpLvzt5DUJj06HYD5hJvszSYHKnLcFJHVyJBqyvuP6bQ9dBVgSA2F
A32UjKjD5136ZaN1s/A9cCWsIeeD0WsjtCSodIugj5VcT5qEHttpny6jDw7zx06a
E55mtYDFFm9tk/MnANTTJuC4wTTIVA==
=DXxt
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.