My favorites | Sign in
Logo
                
Search
for
Updated Aug 22, 2009 by st.loeffler
Building  
Notes on building TeXworks on various distributions.

Building TeXworks on typical GNU/Linux systems should be fairly straightforward. You just need standard build tools (gcc, make, etc.), and the development files (not just runtime libraries) for Qt4, poppler, hunspell, and dbus. The exact set of packages needed will depend how your distribution arranges things; some examples are given here.

For Windows users wanting to try a build, see the page about installing and using the MinGW tools on WinXP. There is also a page about using Visual C++ 2005, although this compiler is no longer being distributed. Thanks to Stefan Löffler, Alain Delmotte, and Tomek for researching and documenting these Windows build procedures.

Fedora 9

# yum install poppler-devel qt4-devel hunspell-devel
$ svn checkout http://texworks.googlecode.com/svn/trunk/ texworks-read-only
$ cd texworks-read-only
$ qmake
$ make
$ ./texworks

(Thanks to Dave Crossland for this.)

Fedora 10

$ sudo yum groupinstall x-software-development development-tools
$ sudo yum install subversion poppler-devel poppler-qt4-devel qt-devel hunspell-devel dbus-devel
$ svn checkout http://texworks.googlecode.com/svn/trunk/ texworks-read-only
$ cd texworks-read-only
$ qmake-qt4
$ make
$ ./texworks

(Thanks to Dave Crossland for this.)

Ubuntu (Hardy and later) & Debian

$ sudo aptitude install build-essential subversion libpoppler-qt4-dev libhunspell-dev libdbus-1-dev
$ svn checkout http://texworks.googlecode.com/svn/trunk/ texworks-read-only
$ cd texworks-read-only
$ qmake-qt4
$ make
$ ./texworks

(I hope this is OK; have not checked on a completely virgin Ubuntu system, so it is possible I missed something in the dependencies.)

Another option would be to use the Ubuntu package repository announced by Stefan Löffler, thus avoiding the need to compile from source.

OpenSUSE 11.1

Reported by msiniscalchi:

Under OpenSUSE 11.1, I had to install the following devel packages:

gcc
make
hunspell-devel
poppler-devel
libqt4-devel
libpoppler-qt4-devel

Issuing qmake TeXworks.pro and then make left me with a working binary.


Comment by gpsjelle, Sep 16, 2008

Re: Martin Sievers Ubuntu package. If you add it to your Software Sources new builds of TeXworks? will be automatically installed with Update Manager. System > Administration > Software Sources > Third Party Software > Add... > APT line: deb http://ppa.launchpad.net/martin-texberatung/ubuntu hardy main

Comment by song.oppslee, Dec 08, 2008

Under Ubuntu 8.10, your building suggestion is right..... Using it right now, great work! Thanks.

Comment by msiniscalchi, Jan 30, 2009

Under OpenSUSE 11.1, I had to install the following devel packages:

gcc make hunspell-devel poppler-devel libqt4-devel libpoppler-qt4-devel

Issuing qmake TeXworks?.pro and then make left me with a working binary. Works great (minus a couple of annoyances I'll file a bug report about).

Comment by msiniscalchi, Jan 30, 2009

To clarify: "gcc" and "make" are needed to compile pretty much anything: they are not specific to TeXworks?. Also, I literally mean "gcc" and "make", not e.g. "gcc-devel".

Comment by meborc, Mar 03, 2009

BRILLIANT :) texworks is now my main latex editor... going to use it for my master thesis

Comment by joseph.w...@morningstar2.co.uk, Apr 05, 2009

On Ubuntu Intrepid you also need subversion (sudo apt-get install subversion). Otherwise, all spot on.

Comment by ptspts, May 12, 2009

You can move the built texworks binary to another Ubuntu Hardy machine if it has

sudo apt-get install libpoppler-qt4-2 libhunspell-1.1-0 libdbus-1-3
Comment by microlatex, May 31, 2009

Build on Mac OS X seems difficult to me. Not even got to the step of building poppler library: building fontconfig-2.60 has been a failure with thousands of errors, the leading error messages being

In file included from fcftint.h:26,

from fcfreetype.c:48:
../fontconfig/fcfreetype.h:27:22: error: ft2build.h: No such file or directory ../fontconfig/fcfreetype.h:28:10: error: #include expects "FILENAME" or <FILENAME> In file included from fcftint.h:26,
from fcfreetype.c:48:
../fontconfig/fcfreetype.h:37: error: syntax error before ‘FcFreeTypeCharIndex?’ ...

(this is with Mac OS X 10.5.7, the the process to build on this platform was found in issue 107)

So, either a more detailed description for building on Mac OS X or a prebuilt Max OS X binary of the most recent svn is needed. Many thanks for looking into this.

Comment by joseph.c.slater, Jul 01, 2009

The Fedora 10 directions are failing for me at the "make" with the error: make: g++: Command not found Indeed, it's not there. Before make, at some point, you have to: yum install gcc-c++ However, while it builds, it will not launch giving the error: QGtkStyle cannot be used together with the GTK_Qt engine.

Comment by joseph.c.slater, Jul 01, 2009

Ahhh! It worked. I did all of my installations, compilation as root. ./texworks wouldn't run as root, but ran fine from my regular account.

Comment by mike.wil...@warwick.ac.uk, Jul 10, 2009

I've built an rpm for use with SLED 11 and openSUSE 11.1. I've also created a script which automates the process of creating the rpm in order to make it easy to update.

Details can be found at http://go.warwick.ac.uk/mikewillis/texworks

Comment by jcurole, Aug 05, 2009

Downloaded and compiled without problems on Ubuntu 9.04. Subversion is not installed by default on a fresh Ubuntu installation so you may want to add that to the install list for aptitude.

Online I listened to the TUG talk on Texworks and there was a feature to move to a point in the pdf by clicking on the tex text and vice versa. Can't find this in the version of Texworks I compiled.

Comment by werbungfuerroy, Aug 15, 2009

> there was a feature to move to a point in the pdf by clicking on the tex text and vice versa. > Can't find this in the version of Texworks I compiled.

This feature (Synctex support) depends on TeX-binaries generating .synctex-files. The TeXlive? 2007 binaries that come with Ubuntu 8.10 (and, I believe, 9.4) don't; you'll have to install TeXlive? 2008 which is available from the TUG website.

Comment by zachnorwood, Aug 25, 2009

Stefan Löffler's installation went smoothly under Jaunty, and TeXworks? has run bug-free so far. This is a great project---well done!

Comment by wtx358, Sep 16, 2009

Slackware

1.build and install the hunspell.download from http://hunspell.sourceforge.net/

tar xf hunspell-1.2.8.tar.gz
cd hunspell-1.2.8
./configure && make && make install

2.get and make the TeXWorks

svn checkout http://texworks.googlecode.com/svn/trunk/ texworks-read-only
cd texworks-read-only
qmake
make
./texworks

on slackware 13.0 is OK.

Comment by st.loeffler, Sep 16, 2009

@wtx358: Thanks for the report. How about dependencies (qt, gcc, make, etc.)? Which are needed, and how does one get them?

Comment by wtx358, Sep 18, 2009

when I install slackware 13.0,I full install the "d" and "l",so gcc-4.3.3,qt4,make,Poppler,libdbus are all install expect hunspell. When I exec qmake,it tell me not found the hunspell.so I install the hunspell,and then all is OK.

Comment by admsimat, Oct 07, 2009

On Slackware 13.0, there is something strange. After following the instructions, the executable complains that it does not find libhunspell-1.2.so.0. It is in /usr/local/lib, but I can't figure out how to tell texworks to find it...

Comment by admsimat, Oct 07, 2009

Sorry, a simple matter of LD_LIBRARY_PATH...

Comment by jfkthame, Oct 07, 2009

Alternatively, I think there are linker flags you can add to make it record the library path in the executable, so that LD_LIBRARY_PATH is not required. (I think it's called -rpath, IIRC.)


Sign in to add a comment
Hosted by Google Code