4

I'm trying to convert a tex document to pdf.

But when I did pdflatex doc.tex, I got

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./doc.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))

! LaTeX Error: File `cmap.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: X

From here I got to know that I need to do apt-get install texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra. But this says it will download 656 MB of archive.

Due lack of space in my ubuntu partition, Is there a way to install only required packages for cmap.sty

Abhisek
  • 4,610
  • 3
  • 17
  • 27

2 Answers2

8

On Ubuntu 18.04, apt install texlive-latex-extra worked.

gerardw
  • 5,822
  • 46
  • 39
  • I see this message, which makes me think it doesn't answer the original question very well: `After this operation, 1362 MB of additional disk space will be used.` – kelloti Aug 26 '21 at 18:21
  • 2
    Since the documentation is very big (327 MB), I installed it with `sudo apt-get install texlive-latex-extra --no-install-recommends` – Michele Feb 15 '23 at 13:06
3

If your native texlive distribution is properly configured you should be able to install a package with tlmgr

tlmgr install cmap

should be enough to install the cmap package and its dependencies. Let us know how much space do you save...

eMMe
  • 569
  • 5
  • 16
  • 2
    To install `cmap`, it required `xzdec`. I did `apt-get install xzdec`(49.9KB) and then `cmap`(6KB). Still it didn't work for `pdflatex doc.tex`. `ecrm1000` font was missing. So from [here](https://github.com/jgm/pandoc/issues/2206#issuecomment-107980127) I did `apt-get install texlive-fonts-recommended`(24.4MB). Now it's working! – Abhisek May 20 '18 at 07:09