texPreview icon indicating copy to clipboard operation
texPreview copied to clipboard

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

Open friendly opened this issue 1 year ago • 1 comments

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.

friendly avatar Sep 06 '24 16:09 friendly

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

yonicd avatar Sep 06 '24 18:09 yonicd