4

I am trying to build a huge latex project on my system - I downloaded everything, and did not touch anything. XeLaTeX tells me that datetime2.sty is missing, and I guess I just have to download it, and put it in the project folder?

But I can not find it online: Either I end up with pdf files that tell me something about other languages, or I get the link to CTAN, and it has only files with other endings, so I don't really understand why I get linked there?

(This happens quite often and this CTAN thing NEVER had a useful file for me, so I figure I just don't know how to use it, and it certainly doesn't seem intuitive.)

  • 1
    Re "what is CTAN", see my short paragraph here: https://latex.zeef.com/sean.allred#block_58836_what-s-ctan- – Sean Allred May 24 '15 at 15:15
  • 1
    What distribution do you have? Both TeXLive and MiKTeX include the package, so you can use their package managers to install it. – Sean Allred May 24 '15 at 15:16
  • So it doesn't actually have the packages, only the documentation? – Maxim Moloshenko May 24 '15 at 15:16
  • The package is actually embedded in the documentation. The 'ins' file is an 'install' file; running latex on it will extract the necessary files from the dtx (Documented (La)TeX). But again, I would use your package manager; there are GUI managers in both TeXLive and MiKTeX. It would help greatly if you let us know which distribution you have :) – Sean Allred May 24 '15 at 15:19
  • About the distribution ... how can I find it out? I guess I installed something along with Texmaker a long time ago, but I do not really know what. Also where can I find it? I thought it was something for the "background" like fonts? – Maxim Moloshenko May 24 '15 at 15:19
  • A distribution is like an organization that collects TeX-related files (like datetime2), tools (like TeXmaker), and TeX engines/formats (like pdflatex). You could just search your computer for 'MiKTeX' or 'TeXLive' (or 'MacTeX', etc.) – Sean Allred May 24 '15 at 15:21
  • Ohhh ... so thats how it works ... Ok, I definitely do not know enough about this stuff ... How can i run latex? On a file? Sorry, I am completely confused ... I always only used it to produce some documents :/ – Maxim Moloshenko May 24 '15 at 15:21
  • Please, please, please use your package manager :( When you downloaded LaTeX, where did you download it from? – Sean Allred May 24 '15 at 15:22
  • datetime2 is pretty new, and has only recently superseded datetime. Is the project you are typesetting one that has been updated very recently? – Joseph Wright May 24 '15 at 15:24
  • Oh boy ... I have no idea, and a simple search returns no results for neither TexLive nor MikTex ... In the part where it shows the installed software on windows I also dont see neither. And in Texmaker on all options and paths I dont seem to also find a hint on what I installed. – Maxim Moloshenko May 24 '15 at 15:27
  • Yes, the project is very recent, in fact it is this one: [https://github.com/rjl20/hpmor/ ] – Maxim Moloshenko May 24 '15 at 15:27
  • 2
    OK, what does pdftex --version at the command line/terminal print? – Joseph Wright May 24 '15 at 15:28
  • MiKTeX-pdfTeX 2.9.4902 (1.40.14) (MiKTeX 2.9 64-bit) Copyright (C) 1982 D. E. Knuth, (C) 1996-2012 Han The Thanh TeX is a trademark of the American Mathematical Society. – Maxim Moloshenko May 24 '15 at 15:29
  • There you are; you're using MiKTeX. MiKTeX's package manager will be in the Start Menu; find it, run the 'admin' version, search for datetime2 in the program, and install it. – Sean Allred May 24 '15 at 15:31
  • OK, you have an up-to-date MiKTeX. What you need to do is synchronize the package database then run the update wizard. Do that both in 'normal' and 'admin' modes, if you have 'admin' mode. That should find datetime2 without you needing to do a manual install. – Joseph Wright May 24 '15 at 15:31
  • Related: http://tex.stackexchange.com/a/187728/17423 – Sean Allred May 24 '15 at 15:34
  • Oh wow, that was it! Thank you for your solutions and especially your patience! – Maxim Moloshenko May 24 '15 at 16:26
  • I've tried to `latex datetime2.ins' and gotten !Undefined control sequence: \preamble. I'm running Tex Live on Ubuntu. What am I doing wrong? – jdc Apr 06 '16 at 23:53

1 Answers1

2

Ok, in case another dummy like me has the same problem, here are some most important comments that helped me:

"The package is actually embedded in the documentation. The 'ins' file is an 'install' file; running latex on it will extract the necessary files from the dtx (Documented (La)TeX). But again, I would use your package manager; there are GUI managers in both TeXLive and MiKTeX. It would help greatly if you let us know which distribution you have :)" by Sean Alfred

"OK, what does pdftex --version at the command line/terminal print?" by Joseph Wright

What did I do, step by step: Press windows key, and press the arrow down - this is apparently where all the programs are hidden now, I had no idea. There I found the MikTex Package manager, named only "Package Manager", so it was not findable through search previously. Synchronize database, then find datetime2 and install it.