TeXworksCompletely confused about ubuntu installs

Information and discussion about TeXworks, an integrated LaTeX environment for several platforms
Post Reply
chromatic
Posts: 7
Joined: Thu Sep 27, 2012 9:59 pm

Completely confused about ubuntu installs

Post by chromatic »

Hi,

Originally I think I tried a bunch of methods for installing LaTeX, eventually finding by far the easiest method was to type

Code: Select all

sudo apt-get install texworks
and hey presto there it is.

When it came to installing packages I realised that texworks only comes with a handful, and that "texlive" was a better bet. So I tried "sudo apt-get install texlive"

Then I ended up with texworks having a totally different set of directories to texlive. When I wanted to use a particular package I could tell texworks where to find the package but it would forget every time I wanted to compile. So in order to ease this frustration I tried to move the package into the directory I thought texworks was using:

Code: Select all

/usr/share/texmf-texlive/
Of course, texworks didn't recognise that I had put the package here, so I figured there must be some system files that need to tell latex to go look for the package. My next genius idea was to merge what I thought was the texlive files:

Code: Select all

/usr/local/texlive/2013/texmf-dist/
With the directory texworks seemed to recognise.

Right now I have several 100mb of packages scattered around my ubuntu partition, texworks has totally stopped working (won't recognise any control sequences) and I have pulled out most of my hair.

I tried to "sudo apt-get remove --purge" both texlive and texworks but it didn't really do much. After reinstalling texlive I am in exactly in the same position.

Could anyone explain to me how to get Texworks to play ball? Any help would be hugely appreciated.

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
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Completely confused about ubuntu installs

Post by Johannes_B »

Hi and welcome to the community,

texworks is just an editor for LaTeX-documents. The real program latex needs to be installed as well. This is done by dependencies in the repositoriies.
In the past, those repositories were a little outdated, so installing texlive manually was adviced.
The easiest way might be to install via a script, please see here Easy Installation of TeX Live 2013 on Ubuntu.

At first, you have to remove the packages you just installed.

Best regards
Johannes

PS: A complete installation of Texlive can take up to 3 or 4 GB.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
chromatic
Posts: 7
Joined: Thu Sep 27, 2012 9:59 pm

Re: Completely confused about ubuntu installs

Post by chromatic »

Hey thanks for the response.

You think I should sudo rm /usr/local/tex* and /usr/share/tex* and just try again with the installation method you posted?

I'm a bit worried about leaving hidden files everywhere, and it seems kind of a waste to have to delete them all and re-download them.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Completely confused about ubuntu installs

Post by Johannes_B »

You can use apt-get or aptitude to remove all texlive-related files.

But it sure is a good idea to wait for another opinion to arise.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
chromatic
Posts: 7
Joined: Thu Sep 27, 2012 9:59 pm

Completely confused about ubuntu installs

Post by chromatic »

Well I've run

Code: Select all

sudo apt-get remove texlive
sudo apt-get remove texworks
sudo apt-get autoremove
and that seems to have cleared out most of the old files. I've now extracted the script from

https://github.com/scottkosty/install-tl-ubuntu

and am running

Code: Select all

sudo ./install-tl-ubuntu
Hopefully this works, estimated time to complete is 9hrs...! Hopefully I don't run out of drive space, really all I needed was the mchem and the pgfplots packages -.-
chromatic
Posts: 7
Joined: Thu Sep 27, 2012 9:59 pm

Completely confused about ubuntu installs

Post by chromatic »

Seems like the installation fails every time it tries to 'untar' a file. Seems to have restarted 11 times then stopped.

Now it wont reinstall, error reads

Code: Select all

install-tl-ubuntu: checking for TeX Live environment variables...
install-tl-ubuntu: running apt and dpkg commands...
install-tl-ubuntu: downloading and extracting install-tl for time number 1...
install-tl-ubuntu: install-tl downloaded and extracted successfully.
install-tl-ubuntu: ERROR: cannot find install-tl dir to cd into.
Anyone know how I can get texworks installed with pgfplots and mhchem packages?
Post Reply