liao961120 / rmdtk

R Markdown Toolkit (Personal R Package)
https://liao961120.github.io/rmdtk/
GNU General Public License v3.0
0 stars 0 forks source link

`rmdtk::donwload_font()`: apply globally? #2

Closed liao961120 closed 5 years ago

liao961120 commented 5 years ago

If the current working dir is the home directory, then executing rmdtk::donwload_font() will install fonts into C:/Users/<user>/Documents/R/win-library/3.5/rmdtk/rmarkdown/templates/document/skeleton/latex on Windows, provided that no other header.tex is found.

rmdtk::donwload_font() was designed to run every time after an R Markdown template is imported. Would it be reasonable to run rmdtk::donwload_font() only once & apply it to the source template file, instead of running it every time when importing the template?

liao961120 commented 5 years ago

Also, this may be combined with a wrapper of rmarkdown::draft().

liao961120 commented 5 years ago

ToDo: Test this on Windows

liao961120 commented 5 years ago

ToDo

liao961120 commented 5 years ago

ToDo: Test this on Windows

Test Result

It seems that if I renamed the file to kaiti.ttf, LaTeX can't find the file. (This somehow brokes the file on windows)

ToDo: Use original font file name

liao961120 commented 5 years ago

Fixed in 0db06c8 & 6ba03ba.