Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package resolver #5

Closed
Bakaniko opened this issue Dec 5, 2017 · 5 comments
Closed

Package resolver #5

Bakaniko opened this issue Dec 5, 2017 · 5 comments

Comments

@Bakaniko
Copy link

Bakaniko commented Dec 5, 2017

I tested TinyTex with some file I thought will be simple (I was wrong).

I was 2 letters, one using letter.cls, the other moderncv.cls

I knew I had to install several package to get them, I forgot I also need french packages in addition.
So far I used those commands and I get only errors (I tested with previously compiled files with full TexLive) because of missing packages.

Tinitex is not at fault there, but I was thinking that a package resolver might be handy before running a document. Especially with this minimalist tool.

I don't know enough LaTeX, and TinyTex, to see if it is possible, reasonable or not. So I make this suggestion.

Best regards from France,

Nicolas

@yihui
Copy link
Member

yihui commented Dec 6, 2017

tinytex::latexmk() and friends do have a package resolver that will automatically figure out the missing packages and install them for you. Could you tell me more about how exactly you compiled your files?

@Bakaniko
Copy link
Author

Bakaniko commented Dec 6, 2017

I compiled the the file by hand with pdflatex in a regular ubuntu terminal. Mostly because I only saw that line in the doc:

tinytex::pdflatex('test.tex')

In my defense, I only work from the main doc yesterday (not the FAQ) for two reasons:

  1. to put myself as a newcomer who discovers the package (which I was)
  2. I was really tired (and missed the link to the FAQ)

Although I located the pdflatex bin (symlink actually) in /home/niko/bin and skim the folder, I didn't see a latexmk bin at that time. And it is not in the user path for that reason I guess.

Now, reading your comment, and remembering red something about it (after a little research, it was in your call for testing, that i red a couple days ago), I think there is two child issues now:

  1. tinytex::latexmk() is not documented in the doc
  2. latexmk doesn't appears in the user path

For the second issue, I don't know if it is meant to be in the path. You said in the test call :

The R companion package tinytex contains functions to emulate latexmk

So it might be too R dependent, and that should be documented as well.

I tested latexmk() on a few simple documents (letters and resumes) and it worked really fine installing missing packages.

I need to test with more complex document (lab reports, pandoc generated docs), but it is already a good start.
Thanks :)

Sorry if I appears being a fool/tool.

@yihui
Copy link
Member

yihui commented Dec 6, 2017

No need to apologize. Your testing and feedback were extremely helpful to me!

For the R function tinytex::latexmk(), you don't need to install the LaTeX package latexmk, and in fact, I don't recommend that you install it. But if you do install it, you need to run tlmgr path add to create the symlink (tinytex::tlmgr_install('latexmk') will do it automatically).

Yes, tinytex::latexmk() is tied to R. Ideally I should provide a more portable solution (e.g. implement it in Perl or Go or Rust instead of R), but I lack the skills, and I'm better motivated by R users. Currently the significant advantage of tinytex::latexmk() over the LaTeX package latexmk is the automatic installation of missing LaTeX packages. If you want to reimplement this R function in other languages, I'll be happy to walk you through the code and ideas.

@Bakaniko
Copy link
Author

Didn't had time to spend more time on tinytex yet.

But I agree with you, sadly I have less coding skills than you. I don't even know how to make a R package and I'm just slightly better with python. But I'll keep that idea in the back of my mind.

@Bakaniko
Copy link
Author

Time to close I guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants