ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Berend de Boer <berend@pobox.com>
Subject: Installing ConTeXt under Unix
Date: Thu, 21 May 1998 14:22:46 +0200	[thread overview]
Message-ID: <01BD84C3.EE9C9410.berend@pobox.com> (raw)

Hai All,

Here my first version of installing ConTeXt under Unix. Let me know what you thing of it.

*************************START*************************

This guide `Installing ConTeXt under Unix for dummies' tries to give
you all the information you might need to successful install ConTeXt
on Unix based TeX implementations.

Note: if you get the TeX Live CD no 3 (not yet available), ConTeXt
will be preinstalled.

Assumptions:
1. You have a web2c based TeX implementation. If you don't know, we
try to find this out in the first step.
2. You use kpathsea file searching. If you have web2c you probably
have kpathsea file searching. 
3. Your system uses the TeX Directory Structure (TDS). This is not
necessary, but if you have it your directory structure will probably
be closer to mine, so some examples might be easier to follow.
4. Your system is close enough to BSD derived systems so my examples
work. I've tested this guide on FreeBSD, so if something doesn't work
on your Unix flavor, let me know.

Step 1: do you have web2c?

We try to find this out by locating texmf.cnf, the main TeX
configuration file. The fastest way to find this file is using the
`locate' command, but you need to have an up-to-date locate
database. If you don't have a locate database or have just installed
TeX this command won't help you, but see the next command `find'.

Using locate, you simply can type `locate texmf.cnf'. On my system
this gives quite some entries, I show you some of it's output:

----------output----------------
/home/berend# locate texmf.cnf
/usr/local/share/texmf/source/web2c-7.2/kpathsea/texmf.cnf
/usr/local/share/texmf/web2c/texmf.cnf
/usr/local/share/texmf/web2c/texmf.cnf.berend
-------end output---------------

If you don't have locate, you can find it by typing `find / -name
texmf.cnf'. On my system this gives:

----------output----------------
/home/berend# find / -name texmf.cnf
/usr/local/share/texmf/source/web2c-7.2/kpathsea/texmf.cnf
/usr/local/share/texmf/web2c/texmf.cnf
-------end output---------------

If you didn't find texmf.cnf, this guide probably isn't of no
help. You don't have a web2c based TeX implemtentation.

Step 2: modify texmf.cnf with special ConTeXt features

ConTeXt is quite a large system, so with the default settings you
can't use ConTeXt. You need to modify texmf.cnf and add the following
entries somewhere. You could add them to the end of this file:

---------------------------
buf_size.context = 50000
hash_extra.context = 15000
main_memory.context = 1100000
max_strings.context = 55000
nest_size.context = 500
param_size.context = 1500
pool_free.context = 47500
pool_size.context = 500000
save_size.context = 5000
stack_size.context = 1500
string_vacancies.context = 45000
---------------------------

You probably need superuser privileges to modify this file so either
use the `su' command to become superuser, or login under the `root'
account before modifying this file. You also need superuser priviliges
for the remaining steps.

Step 3: create the context command

Instead of calling TeX with the context format file everytime you want
to compile a ConTeXt file, it's much easier to create a special
command which autoloads the ConTeXT format file.

First, you need to know where your tex commands are installed. I.e. if
you type `latex' or `tex' or `initex', where are these commands
stored? You can use `locate latex' or `whereis latex' or 
`find / -name latex' to find the directory where these commands are
installed. For example, on my system they are in
/usr/local/bin/i586-freebsd2.2, but on your system they might be in
/usr/local/bin or in some other +directory.

If you have found the directory, cd to it and create a symbolic
link. Example is below:

----------output----------------
/home/berend$ cd /usr/local/bin/i586-freebsd2.2      
/usr/local/bin/i586-freebsd2.2$ ln -s tex context
-------end output---------------

Step 4: unpack your context distribution

But where? Assuming you have the TDS, my main TeX directory is in
/usr/local/share/texmf. My local TeX directory is in
/usr/local/texmf. I've installed context in my local
directory. Example:

----------output----------------
/usr/local/texmf/tex$ mkdir context
-------end output---------------

So go to your local TeX directory, `/usr/local/texmf' in my case. Make
sure you have a subdirectory called `tex' there, else create it. Next
go to the `tex' subdirectory and create the `context'
subdirectory. And go to the context subdirectory.

Assuming you have the unzip command, you can simply unzip the context
distribution by saying something like `unzip
/home/berend/download/context.zip'. Replace the directory
`/home/berend/download' by the directory where you have stored the
context distribution.

Step 5: creating the context format file

If TeX would have to parse and compile the context.tex file everytime
you want to compile a context program, it would easily take minutes to
compile a program if you don't have a PIII at 1GHz. So TeX has the
ability to precompile the context main macro's and load them very fast
at startup. This process is called creating a format file.

If you encounter problems somewhere in this process, see below this
section to the paragraph starting with 'Problems:'.

Type `context -ini context' to create the format file. Two questions
are asked, press Enter twice to install the dutch interface to ConText
or enter `english' twice to install the english language interface or
`german' to install the german language interface.

If this command completes there exists a new file in your directory
called `context.fmt'. Check this by using `ls context.fmt'. You should
see output similar to mine:

----------output----------------
9042 words of font info for 28 preloaded fonts
15 hyphenation exceptions
Hyphenation trie of length 20024 has 577 ops out of 1501
  70 for language 9
  139 for language 3
  181 for language 2
  187 for language 1
Output written on context.dvi (1 page, 280 bytes).
Transcript written on context.log.
/usr/local/texmf/tex/context# ls context.fmt
context.fmt
-------end output---------------

In this example I also have shown the last lines of the context
compilation process, before typing 'ls context.fmt'.

Problems:

Problem 1: "If I type `context -ini context' I get a command not found
error"

You probably see something like
----------output----------------
/usr/local/texmf/tex/context# context -ini context
bash: context: command not found
-------end output---------------

Either you didn't create the `context' command (see step 3) or your
`context' command isn't in your path. You can check your path my
typing `echo $PATH'. The directory where your context command is
stored should be listed here.

Problem 2: "`context -ini context' did start, but it didn't finish
properly, but said something about pool sizes"

Your context command isn't started with enough memory. Make sure you
did modify texmf.cnf (see step 2) and that you did modify the correct
texmf.cnf.

Step 6: Move the context format file to its correct destination

You need to move the `context.fmt' file to its proper location. On my
system this is the main TeX directory tree in the web2c directory. So
I need to type:

----------output----------------
/usr/local/texmf/tex/context$ mv context.fmt /usr/local/share/texmf/web2c/
-------end output---------------

If you don't know the location of your format files (all format files
are in one directory) either use `locate latex.fmt' or `find / -name
latex.fmt' to find this location.

Step 7: adjust your kpathsea searching database

TeX does quite some directory searching. To speed them up a special
database is used with all files TeX uses. So although context.fmt is
in the correct location, it still might not be found. cd to your main
TeX directory and use `mktexlsr' to update your database. mktexlsr may
also be called differently like `MakeTeXlsR'.

----------output----------------
/usr/local/share/texmf$ mktexlsr
mktexlsr: Updating /usr/local/texmf/ls-R... 
mktexlsr: Updating /usr/local/share/texmf/ls-R... 
mktexlsr: Updating /var/tmp/fonts/ls-R... 
mktexlsr: Done.
-------end output---------------

Make sure both your main TeX tree (/usr/local/share/texmf in my case)
and your local TeX tree (/usr/local/texmf in my case) are updated.

Step 8: test it

Now create a simple context file and try to compile it. A simple
context file is:

---------------------------
\starttekst
\stoptekst
---------------------------

Compile it with `context test.tex'. Your output should be like this:

----------output----------------
home/berend/tmp$ context test
This is TeX, Version 3.14159 (Web2C 7.2)
(test.tex

Dit is CONTEXT versie <1998.5.21 > interface <dutch> meldingen <dutch>

..

Copyright 1990-1998 / PRAGMA / J. Hagen - A.F. Otten

korps          : 12pt romaan wordt geladen
specials       : postscript,yandy,dviwindo,pdf geladen
systeem        : aanmaken basale hulpfile
[1.2] )
Output written on test.dvi (1 page, 272 bytes).
Transcript written on test.log.
-------end output---------------

This is it. I would like to know about problems you encounter or
suggestions to clarify certain matter. Mail your comments to the
context mailing list (ntg-context@ntg.nl) or to Berend de Boer
(berend@pobox.com)

*************************END*************************

Groetjes,

Berend.


             reply	other threads:[~1998-05-21 12:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-21 12:22 Berend de Boer [this message]
1998-05-21 20:43 Tobias Burnus
1998-05-24 11:43 Hans Hagen
1998-05-24 11:48 Hans Hagen
1998-05-25 16:44 Hans Hagen
1998-05-27  5:31 Thomas Esser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01BD84C3.EE9C9410.berend@pobox.com \
    --to=berend@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).