Jiggling & Wiggling

2007/06/14

Easy ConTeXt installation

Filed under: Software — roylez @ 6:31 上午

I have tried the nightmare of struggling to install a usable ConTeXt environment; the documentations or installation guides here and there on the web always deal with the situation that you have a tetex or texlive or some other tex dist installed and you just want add ConTeXt to them, one seldom tells that “how to make a clean installation without a already existing tex environment?”

However, the guide does exist——in the ConTeXt mailing list. Here I will show how to do that according to Hans’ message since nobody has done that before.

cd someplace
mkdir context
cd context
wget http://www.pragma-ade.com/context/install/justtex.zip
wget http://www.pragma-ade.com/context/install/linuxtex.zip
unzip *.zip
cd tex/texmf-local
wget http://www.pragma-ade.com/context/install/cont-tmf.zip
wget http://www.pragma-ade.com/context/install/cont-img.zip
unzip *.zip
cd ..
. setuptex (or sh ./setuptex)
texexec –make –all

What the setuptex does is in fact setting up environment variables. If you want it be done every time when you start a new bash session:

echo ‘#!/bin/bash’ > ~/.context_env
cat tex/setuptex >> ~/.context_env
chmod 755 ~/.context_env
echo “source .context_env $PWD/tex” >> ~/.bashrc

That’s it! Now you have everything, including free fonts like charter, eulervm and more. This approach actually makes a minimum texlive installation (justtex.zip & linuxtex.zip), according to the texlive directory structure (TDS), local files and fonts should better be kept under texmf-local and texmf-fonts. So, the newest ConTeXt(cont-tmf.zip and cont-img.zip) is unziped under texmf-local, and if you want to install new fonts, you should put them in texmf-fonts.

The merits of this installation is obvious: you don’t need root permission to install, and it is easy to upgrade–simply deleting everything in texmf-local and putting new things in.

Hope you enjoy this.

Advertisements

3条评论 »

  1. hi, i wanted to install context on my suse 10.1 and follow your instruction almost exactly. but for me things were not strightfoward and ended up not being able to compile a tex file with texexec.
    can you check my output message and what i was missing? thanks for your great instruction in this webpage and helps in advnace.

    1)
    serine:~/ConTeXt/tex$ . setuptex

    =========

    2)
    serine:~/ConTeXt/tex$ mktexlsr
    mktexlsr: /etc/texmf/ls-R: no write permission. Skipping…
    mktexlsr: Updating /homeX/ipark/ConTeXt/tex/texmf/ls-R…
    mktexlsr: Updating /homeX/ipark/ConTeXt/tex/texmf-local/ls-R…
    mktexlsr: Updating /var/cache/fonts/ls-R…
    mktexlsr: Updating /var/lib/texmf/ls-R…
    mktexlsr: Done.

    =========

    3)
    serine:~/ConTeXt/tex$ perl texmf-local/scripts/context/perl/texexec.pl –make –alone

    TeXExec 5.4.3 – ConTeXt / PRAGMA ADE 1997-2005

    TeX hash binary : mktexlsr
    comment : hashing may take a while …
    mktexlsr: /etc/texmf/ls-R: no write permission. Skipping…
    mktexlsr: Updating /homeX/ipark/ConTeXt/tex/texmf/ls-R…
    mktexlsr: Updating /homeX/ipark/ConTeXt/tex/texmf-local/ls-R…
    mktexlsr: Updating /var/cache/fonts/ls-R…
    mktexlsr: Updating /var/lib/texmf/ls-R…
    mktexlsr: Done.
    assuming engine : pdfetex
    ! I can’t read pdfetex.pool; bad path?

    used engineformatpath : /homeX/ipark/ConTeXt/tex/texmf/web2c/pdfetex/

    assuming engine : pdfetex
    ! I can’t read pdfetex.pool; bad path?

    used engineformatpath : /homeX/ipark/ConTeXt/tex/texmf/web2c/pdfetex/

    assuming engine : mpost

    used formatpath : /homeX/ipark/ConTeXt/tex/texmf/web2c/

    assuming engine : pdfetex
    ! I can’t read pdfetex.pool; bad path?

    used engineformatpath : /homeX/ipark/ConTeXt/tex/texmf/web2c/pdfetex/

    TeX binary : pdfetex
    format(s) : en nl metafun mptopdf

    total run time : 0 seconds

    =========

    4)
    serine:~/ConTeXt/tex$ perl texmf-local/scripts/context/perl/texexec.pl first.tex

    TeXExec 5.4.3 – ConTeXt / PRAGMA ADE 1997-2005

    fixing texformat path : .:/homeX/ipark/texmf/web2c/{$engine,}:/etc/texmf/web2c:/var/lib/texmf/web2c:{/homeX/ipark/texmf,!!/etc/texmf,!!/var/lib/texmf,!!/homeX/ipark/ConTeXt/tex/texmf,!!/homeX/ipark/ConTeXt/tex/texmf-local,!!/usr/share/texmf/contrib}/web2c
    fixing engine variable : pdfetex
    executable : pdfetex
    format : cont-en
    inputfile : first
    output : standard
    interface : en
    current mode : none
    TeX run : 1

    This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
    \write18 enabled.
    (/homeX/ipark/ConTeXt/tex/texmf/web2c/natural.tcx)
    kpathsea: Running mktexfmt cont-en.fmt
    /usr/bin/mktexfmt: line 333: /homeX/ipark/ConTeXt/tex/texmf/texconfig/tcfmgr: No such file or directory
    fmtutil: config file `fmtutil.cnf’ not found.
    Sorry, I can’t find the format `cont-en.fmt’; will try `context.fmt’.
    kpathsea: Running mktexfmt context.fmt
    /usr/bin/mktexfmt: line 333: /homeX/ipark/ConTeXt/tex/texmf/texconfig/tcfmgr: No such file or directory
    fmtutil: config file `fmtutil.cnf’ not found.
    I can’t find the format file `context.fmt’!

    return code : 256
    run time : 0 seconds

    total run time : 0 seconds

    warning : use ‘texmfstart texexec’ instead

    条评论 由 inhee park — 2007/06/22 @ 12:10 上午

  2. Hi inhee park,

    I guess your problem was that the $PATH variable was not set correctly. The script setuptex adds the context binary path to your $PATH, so if installed correctly, texexec can be executed without putting “perl ” thing in the command line. I suggest you directly try

    texexec -check

    if it echoes “command not found”, then you have to run setuptex again. In my case, I use zsh instead of bash, the command ‘. setuptex’ did not run, so I input “sh ./setuptex” and got everything okay.

    Have you tried putting “source .context_env $PWD/tex” into your bashrc? This is actually a safer approach. If done, every time when you open a new rxvt/xterm/gnome-terminal window, you will get a working context environment.

    Good luck!

    条评论 由 roylez — 2007/06/22 @ 2:57 上午

  3. […] Easy ConTeXt installation […]

    Pingback 由 ConTeXt手动安装 | 江天一色 — 2012/10/18 @ 7:15 下午


RSS feed for comments on this post. TrackBack URI

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

通过访问 WordPress.com 创建免费网站或博客.

%d 博主赞过: