TeX Live and MacTeXTeXLive 2007 - Ubuntu: updating packages

Information and discussion about TeX Live distribution for all platforms (Windows, Linux, Mac OS X) and the related MacTeX: installing, updating, configuring
Post Reply
-Robin-
Posts: 31
Joined: Tue May 20, 2008 3:07 pm

TeXLive 2007 - Ubuntu: updating packages

Post by -Robin- »

I have an Ubuntu 8.10 system and I installed the TeXLive 2007 distribution on it (2008 is not yet available in the Ubuntu repositories).
Now I need to update the caption package, since my document uses commands only available in the latest version of the caption package.
I googled a bit, found some topics on this forum and saw the following solutions:
1) install TeXLive 2008 manually, and use the package manager. But since I'm also using Kile which requires TexLive 2007 if you install it with the Ubuntu package manager, I'm not so happy with this solution
2) install the MikTeX package manager. Seems a bit overkill for just one package which needs to be updated

But I was wondering: is it possible to manually update a package.
I tried the following approach:
  • Download the latest version of the caption package and run

    Code: Select all

    latex caption.ins
    which generates the files

    Code: Select all

    caption.sty, caption2.sty, caption3.sty, ltcaption.sty, subcaption.sty
  • Replace the contents of the caption folder:

    Code: Select all

    /usr/share/texmf-texlive/tex/latex/caption/caption.sty
    /usr/share/texmf-texlive/tex/latex/caption/caption2.sty
    /usr/share/texmf-texlive/tex/latex/caption/caption3.sty
    
    with the newly generated .sty files
This seems to do something, but not what I wanted. The error message after this, when recompiling my document, stated that it couldn't find the file ltcaption.sty, which I have placed in the caption directory. I think it means it is using the new versions of

Code: Select all

caption.sty, caption2.sty, caption3.sty
but is unaware of the addition of the files

Code: Select all

ltcaption.sty, subcaption.sty
Must I run some extra commands to tell LaTeX the packages have changed ? Or is this a completely wrong manner to update a package ?

Another possible option I thought of was placing the caption folder in my local texmf directory:

Code: Select all

/usr/local/share/texmf/tex/latex/caption
since the MikTeX package manager also puts packages in your local texmf directory. But this didn't worked either. He kept using the old caption package, and I didn't find a way to force LaTeX to first look into my local texmf and use the packages which were placed there.
I think this latest approach, if I could get it working, would be the best and easiest way.

Any suggestions/thoughts ?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

TeXLive 2007 - Ubuntu: updating packages

Post by localghost »

-Robin- wrote:[...] Must I run some extra commands to tell LaTeX the packages have changed ? Or is this a completely wrong manner to update a package ? [...] Any suggestions/thoughts ?
Open a shell and refresh the file name database.

Code: Select all

sudo texhash
Check if this process was successful by searching one of the files.

Code: Select all

kpsewhich subcaption.sty

Best regards
Thorsten¹
-Robin-
Posts: 31
Joined: Tue May 20, 2008 3:07 pm

Re: TeXLive 2007 - Ubuntu: updating packages

Post by -Robin- »

I'll test it first thing in the morning (don't have an Ubuntu system at hand).
But if that works, its just brilliant. Stupid I didn't find that command myself :oops:
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Re: TeXLive 2007 - Ubuntu: updating packages

Post by meho_r »

Just FYI, you can install TeXLive 2008 without need to uninstall 2007, just make sure that when started installation you tick "create system links" option in the main installation screen. After that, you'll be using 2008 AND Kile ;)
-Robin-
Posts: 31
Joined: Tue May 20, 2008 3:07 pm

Re: TeXLive 2007 - Ubuntu: updating packages

Post by -Robin- »

Just tested it and it worked like a charm.
Thanks :D
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

TeXLive 2007 - Ubuntu: updating packages

Post by Stefan Kottwitz »

Hi Robin,

I'm using the MikTeX package manager and I'm very satisfied with it. I've described my installation on Ubuntu Linux here.

Stefan
LaTeX.org admin
Post Reply