yonicd / texPreview

Efficiently iterate, refine and share snippets of LaTeX in R with ease
https://yonicd.github.io/texPreview/
Other
52 stars 7 forks source link

Using `texPreview` in `matlib` pkg / requirement of `TexLive` #58

Open friendly opened 2 months ago

friendly commented 2 months ago

In the matlib package we've developed a suite of functions for generating LaTeX expressions for symbolic / numeric matrices and for doing matrix arithmetic with them for making writing easier. See the vignette LaTeX Equations with latexMatrix, Eqn and matrix2latex for examples.

In this issue, https://github.com/friendly/matlib/issues/64 I raise the possibility of being able to render the results of our functions in an Rstudio viewer pane, and texPreview seems exactly what I'm looking for.

However, AFAICS, texPreview requires a TeXLive / tinytex distribution. I'm using MikTeX on Windows, so I'm a bit reluctant to change just for the purpose of testing.

Your thoughts on this issue would be appreciated.

yonicd commented 2 months ago

texlive is not a requirement. you can set up via tinytex which supports both texlive and miktex and texpreview will run. underneath the build is run via tinytex::latexmk https://github.com/yonicd/texPreview/blob/master/R/tex_build.R#L20

you can see here that there are no issues when running via winos https://github.com/yonicd/texPreview/blob/master/.github/workflows/R-win.yml#L39_L46