Page 1 of 1

Showing TEX-Files?

Posted: Sun Jun 02, 2024 11:39 pm
by OlafSch
Hello,

great Latex plugin

propably stupid question but perhaps there is a simple solution

I want integrate tex file support in my distribution. For that I want to read a .tex file and then show it with hollywood (or save it to pdf or png). Is there a simple code I could use for that?

Re: Showing TEX-Files?

Posted: Wed Jun 05, 2024 6:31 pm
by phipslk
just a quick guess without having tried it yet:

in your code, require the tex-plugin, load a .tex file with Readfile() and then display it as a TextObject.
This should work if I understood the manual right.

Re: Showing TEX-Files?

Posted: Fri Jun 07, 2024 11:22 pm
by airsoftsoftwair
OlafSch wrote: Sun Jun 02, 2024 11:39 pm I want integrate tex file support in my distribution. For that I want to read a .tex file and then show it with hollywood (or save it to pdf or png). Is there a simple code I could use for that?
Tex files can have multiple pages but hTeX only supports rendering of single pages so you'd have to come up with a parser that scans the tex file, puts the individual pages in a table and then renders those pages using TextOut() as described in the hTeX manual. Shouldn't be too difficult to implement.