I recently had to download the package adjustbox from CTAN and when I ran the .tex file, I had this error above . The ydocstrip is the first line of the .tex file in the adjustbox backage. Does anyone have a clue how to fix this?

  • 1
    What TeX distribution do you run? In general it's discouraged to download from CTAN, because it's better to use the method provided by the distribution. Is it MiKTeX or TeX Live? On what operating system?
    – egreg
    Nov 10 '14 at 19:07
  • in general (as @egreg says) it’s best to use your distribution’s copies of these things. the ydoc package is available on ctan, but installing package straight from the archive isn’t everyone's idea of fun ... and ydoc is available in the major distributions. Nov 10 '14 at 23:16
  • (and in any case, what do you have that needs ydoc? it’s a pretty unlikely thing for any run of the mill package to ask for.) Nov 10 '14 at 23:17
  • Hi :I needed to use "adjustbox" but it did not run because I do not have the package. When I got the package from CTAN, I saved the .dtx files and the .tex file, then I ran the .tex in Latex; I use texmaker and miktex2.9. My computer is 64 bit but the texmaker and miktex I downloaded was the same for 32 and 64 bit.
    – Naema
    Nov 11 '14 at 0:21
  • It looks like the ydoc is written in the first line of the .tex adjustbox file. My question now is, if I get a new installation for Miktex, will that affect my thesis files?, in the past months I downloaded several packages from CTAN. So, will doing a new installation affect my previous chapters?. And, if it does not , can you give me the right link to download miktex from?.
    – Naema
    Nov 11 '14 at 0:22

To install adjustbox package:

  • run Start\MikTeX 2.9\Maintenance (Admin)\Package manager (Admin)

  • write adjustbox into the "Name" field and press Enter

  • click on + symbol and confirm installation

and you're ready to use it!

If this doesn't work you should install adjustbox manually.

  • You can find adjustbox.sty here: adjustbox.tds.zip

  • unpack the whole content directly into MikTeX 2.9 folder

  • run Start\MikTeX 2.9\Maintenance (Admin)\Settings (Admin)

  • execute Refresh FNDB and Update Formats

and you're ready to use it!

  • @Naema did you try this?
    – RicoRally
    Nov 12 '14 at 15:34
  • Is this the procedure on Windows-MikTeX? Please add this piece of info to your answer! (OS was not specified in the question...) Nov 12 '14 at 18:51
  • RicoRally, I tried the first solution and after I pressed (+) to update the installation, another window appeared asking me for name and password (proxy authentication required)! what are those name and password?
    – Naema
    Nov 14 '14 at 3:04
  • @Naema I think this is something related to your computer, not LaTeX. Is it a MAC OSX? Maybe it is your name and password.
    – RicoRally
    Nov 14 '14 at 7:32
  • 1
    Glad to help. I hope you'll find those name and password for further installations on your OS. @MattAllegro MikTeX is specifically built to be used in MS Windows. In this case the OS was somewhat implied.
    – RicoRally
    Nov 14 '14 at 15:08

ydocstrip is only required if you want to unpack the .sty file from the .dtx file yourself. If you really want to do this you need to install the ydoc package first. However, both MikTeX and TeX Live provide all my packages (I'm the author of adjustbox and ydoc) as installable packages, so there should be no need for this.

Also I provide a TDS Zip file with the final .sty on CTAN which can be used for manual installs like mentioned in RicoRally's answer. Simply unpack it over your TEXMF directory (under Linux usually ~/texmf).

Linux users might want to consider installing TeX Live directly ( How to install "vanilla" TeXLive on Debian or Ubuntu?) and simply use tlmgr install adjustbox.

  • Unfortunately the TeX Live version of some older but still used OS (like Ubuntu 12.04) do not contain adjustbox, so there might be situations where manual installation is the only reasonable choice. If someone is not familiar with TDS archives the second solution in RicoRally's answer might mistakenly interpreted as MikTex (i.e. Windows) specific (it happened to me). @Martin_Scharrer: Thanks for making that point more clear. Anyway, IMHO it would be useful to mention the ydoc dependency somewhere. And of course: Thanks for the devolpment work!
    – cknoll
    Sep 10 '15 at 20:50

I had the same problem (I can't find file 'ydocstrip.tex' when running latex adjustbox.ins). However, RicoRally's solution did not apply as I am using Kubuntu (12.04 LTS).

My solution (or workarround): downloading the package ydoc: by Martin Scharrer (the author of adjustbox), and copy the file to the adjustbox directory. Then latex adjustbox.ins run without problems. Next step: copy all the .sty-files and tc-pgf.def to ~/texmf/tex/latex/adjustbox/

To use the adjustbox package, I had also apply that same procedure to the package collectbox, which is a dependency of adjustbox.

Background (for search engines): This was necessary to compile the latex output from nbconvert (IPython notebook).

  • @Martin_Scharrer: Is this behavior a problem with my configuration or is the file ydocstrip.tex indeed missing from the adjustbox package.
    – cknoll
    Sep 10 '15 at 12:19
  • 1
    This is not an answer, you should probably ask a new question instead Sep 10 '15 at 12:24
  • In my opinion this is a solution to the problem or, in other words, an answer to the original question 'Does anyone have a clue how to fix this?'. It shows a possibility how to install the adjustbox package.
    – cknoll
    Sep 10 '15 at 13:30

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.