2

I use texstudio in Ubuntu and I would like to use svg package:

\usepackage{svg}

File `svg.sty' not found. ^^M

The only thing I found is a closed thread.

My attempt for installation of this package has failed:

$ tlmgr install svg
(running on Debian, switching to user mode!)
cannot setup TLPDB in /home/ar2015/texmf at /usr/bin/tlmgr line 5336.

Where am I wrong?

Update

This is my code:

\begin{figure}[ht!]
\centering
\includesvg[width=140mm]{images/pos_before.svg}
\caption{Previous output \label{overflow}}
\end{figure}

Please avoid linking to posts which do not solve the problem straight forward.

ar2015
  • 962
  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. The best thing to do is to figure out in which package Debian puts the package svg. That is, Debian will put a bunch of related LaTeX packages into one Debian package. Find out which one and install that using your regular package manager (not tlmgr). That is, if you wish to use Debian's packages for TeX Live, stick to them. – cfr Mar 17 '15 at 00:03
  • 1
    The svg CTAN package is part of your distribution's texlive-latex-extra package. Install that (texlive-latex-extra) with your distribution's package manager. – Paul Gessler Mar 17 '15 at 00:05
  • @PaulGessler texlive-latex-extra is 558 MB so I used --no-install-recommends switch to reduce it into 48 MB. Now there is no error on latex package calling but I see this problem Unknown graphics extension: .svg. ...raphics[width=140mm]{images/pos_after.svg} – ar2015 Mar 17 '15 at 00:10
  • Did you read the documentation for the svg package? You should not use \includegraphics but \includesvg[<options>]{<svg filename>} instead, for SVG files. – Paul Gessler Mar 17 '15 at 00:12
  • @PaulGessler I think it looks for a .pdf_tex file. – ar2015 Mar 17 '15 at 00:19
  • I will ask again (sorry): did you read the documentation? Omit the SVG file's extension. Do you compile with the -shell-escape flag? Do you have InkScape installed? These are all things that are needed for the package svg to do what it does. – Paul Gessler Mar 17 '15 at 00:24
  • @PaulGessler I didnt read any SVG documentation. I just followed this URL. Even dropping SVG file extention did not help. I use TexStudio. I have not heard about -shell-escape – ar2015 Mar 17 '15 at 00:30
  • @PaulGessler I had seen that post. It did not solve my problem. – ar2015 Mar 17 '15 at 00:36
  • @ar2015 the solution at that post (use apt-get to install the appropriate distro package) is precisely what you have done in your answer below, so it did solve your problem. – Paul Gessler Mar 17 '15 at 00:37
  • @PaulGessler I know that I should install the related package but is texlive-latex-extra mentioned there? – ar2015 Mar 17 '15 at 00:38

1 Answers1

2

The problem was solved according to the suggestion of Paul Gessler

I just added --no-install-recommends to reduce the size of the installed Ubuntu package:

sudo apt-get --no-install-recommends install  texlive-latex-extra
ar2015
  • 962