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

Attachment: signature.asc
Description: PGP signature

-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to