I'm trying to compile a file for which I need titling.sty:

! LaTeX Error: File `titling.sty` not found.

The two biggest issues are 1) it's on a Windows machine (I'm really only "comfortable" with the Unix command line) and 2) the machine cannot be connected to the internet (so automatic approaches are impossible).

Assuming the error means I'm missing a package and following some related advice (e.g., here), I downloaded the file here, transferred it to the offline machine, and unzipped it, then tried to run:

latex titling.ins

But this gave me an error (given I can't copy-paste, I'm including what I think may be relevant):


* No Configuration file found, using default settings. *




* Could not find your \batchfile=titling.ins.


\processbatchFile ...****************************}

\fi \else \ifDefault \Msg ...

1.1092 \process@first@batchfile

I have no idea how to proceed from this.

How can I install titling.sty on this machine?

  • Which distribution do you use? – Bernard Apr 4 '17 at 22:36
  • titling is in both miktex and texlive so you should not have to install it by hand like this – David Carlisle Apr 4 '17 at 22:37
  • I believe the compiler is trying to use pdflatex, but it's through miktex. Oddly enough I was able to get the latex titling.ins command to work using the Git Bash installed with Git. Now I need to figure out where to put the damn .sty file. But first trying @DavidCarlisle's advice and re-installing miktex first. – MichaelChirico Apr 4 '17 at 22:46
  • 1
    you can always put the .sty file in the working directory alongside the document, but updating miktex via its package manager thing (I don't use miktex) should install it automatically, re-installing miktex shouldn't be needed – David Carlisle Apr 4 '17 at 23:03
  • @DavidCarlisle as I mentioned this is offline, so I can't update via package manager. Re-installing MiKTeX didn't fix anything, and indeed I don't see titling in /MiKTeX 2.9/tex/latex/ which is where I presume it should be. Copying titling.sty to the document folder for now, thanks! – MichaelChirico Apr 4 '17 at 23:05

Assuming that you have other means to transfer files to the machine:

  1. Go to some CTAN mirror to the miktex package folder http://mirror.ctan.org/tex-archive/systems/win32/miktex/tm/packages.
  2. Download all packages you want to install (e.g. with wget).
  3. Download also the databases miktex-zzdb1-2.9.tar.lzma and miktex-zzdb2-2.9.tar.lzma
  4. Put everything in one folder (outside miktex) on your offline windows.
  5. Start the package manager and choose this folder as "local repository".
  6. Install the packages.

Be aware that the package manager will show all packages recorded in the database but that you naturally can only install the packages you actually downloaded.

Also keep the databases (the miktex-zz-files) and the packages in sync.

  • It seems using this approach messed up my MikTeX installation in a strange way, such that using knit on an Rmd document failed (error same as here, but different root cause), but compiling from TeXworks worked without error. Couldn't figure out what's going on, but a clean uninstall/reinstall/restart actually fixed my initial issue (compiling now works even without the .sty file stored locally) – MichaelChirico Apr 23 '17 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.