Difference between revisions of "Debian installation"

From Wiki
Jump to navigation Jump to search
Line 1: Line 1:
<font color="red"><b>Warning</b></font>: the repositories have been changed on 2007-01-17. Please update <code>/etc/apt/sources.list</code> appropriately.
 
 
 
 
 
== Use TeXLive packages ==
 
== Use TeXLive packages ==
  

Revision as of 23:34, 1 December 2010

Use TeXLive packages

The context packages depend on TeXLive, so if you are using the Debian teTeX packages (e.g. see whether tetex-base is installed by doing dpkg -l tetex-base), it's time to change to TeXLive.

If you are switching from teTeX, it's important to purge, not just remove the tetex-* packages before installing the TeXLive packages. Otherwise the teTeX configuration files, including those in /etc/texmf/texmf.d/ and /etc/texmf/fmt.d/, will haunt the system like a ghost. To purge:

 apt-get --purge remove tetex-{extra,doc,bin,base}

The full directions for using TeXLive are at http://www.tug.org/texlive/debian.html or Debian TeXlive install, though if you are brave you can just try:

 apt-get update && apt-get install texlive

Once you've installed the basic packages, you'll need a few extras:

 apt-get install lmodern cm-super texlive-fonts-recommended

Check for shadowing formats and macros

These installation instructions describe a system-wide install. But individual users may have followed the old directions on this page and (sorry!) made a per-user ConTeXt installation; or as root you may have done a system-wide install in, for example, /usr/local/share/texmf or other directory that shadows /usr/share/texmf. In either case, the system-wide install from the packages won't be seen.

If individual users prefer to shadow the system-wide install and to run their downloaded versions, that's fine. But if they want to use the system-wide install (recommended except for those who are testing Hans's latest versions...), then there are two issues.

The first issue is old format files. If a user has format files in ~/.texmf-var/web2c/engine where engine is typically pdfetex, then these will shadow the ones installed by the context package. So the user should delete the ConTeXt-related ones, such as cont-*.fmt, mptopdf.fmt, and metafun.mem.

To find them, the user can do:

 kpsewhich cont-en.fmt

or

 kpsewhich -engine pdfetex cont-en.fmt

(and similarly for the other formats). Run it from a 'typical' directory (e.g. ~), rather than from ~/.texmf-var/web2c/pdfetex/ (adjust for your engine), otherwise it will find the newly created formats before any others even if they are not shadowing anything else.

The second issue is the ConTeXt macros. If a user has installed them a directory that shadows /usr/share/texmf, then they will be found rather than the system-wide ones. So move the shadowing context installations out of the way. The user can check with

 kpsewhich cont-new.tex

and make sure that it's not finding any (until you do the system-wide install, of course).

Install the ConTeXt packages

Norbert Preining has produced reliable, complete ConTeXt packages for Debian, and they use very recent versions of ConTeXt.

If you are running Debian sid or later, then the context package should already be visible (and the context-nonfree and context-doc-nonfree packages are in the nonfree repository). then do

 apt-get update
 apt-get install context context-nonfree context-doc-nonfree

and apt will download and install the latest ConTeXt packages.

Finished!

That should do it! The output of ctxtools --contextversion is hopefully like this:

CtxTools | context version: 2008.05.21 15:21 (/usr/share/texmf/tex/context/base/context.tex)
CtxTools | context version: 2008.05.21 15:21 (/usr/share/texmf/tex/context/base/cont-new.tex)

The long path to context.tex and cont-new.tex show where the system thinks the context macros are installed. Make sure your installation is finding those versions!

Postscript: Mark IV

(README.MarkIV)

Mark IV is the name of the LuaTeX-aware part of ConTeXt; that is, when you use ConTeXt over the LuaTeX engine instead of PDFTeX or XeTeX. You run it with texexec --lua.

Currently the integration of Mark IV into Debian is not completely done, especially because the details are currently worked out (see the dev-context mailing list).

If you want to start using Mark IV the following the following few points should get you started:

1) Right versions:

   luatex >= 0.20.2
   context >= 2007.12.20

2) environment variables and luatex-cache. Mark IV ships its own implementation of file searching and doesn't use the ls-R databases, but luatex-cache. You have to tell luatools where to find texmf.cnf, and then generate the cache:

       export TEXMFCNF=/usr/share/texmf/web2c                        
       luatools --generate --verbose                                 

This will generate the luatex-cache in $HOME. If you want to put it somewhere else set (and export) the TEXMFCACHE variable:

  export TEXMFCACHE=/tmp

3) Generate a Mark IV format. This is not integrated into the usual format building process, and probably will need some time to be worked out completely as the current fmtutil cannot cope with Mark IV formats. Call

       luatools --ini --compile cont-en

4) Now you can try some simple document like (thanks to Arthur Reutenauer)

       \starttext
       \ctxlua{a = 1.5 ; b = 1.8 ; c = a*b ; tex.print(c) ;}
       % or the equivalent:
       \startlua
       a = 1.5
       b = 1.8
       c = a*b
       tex.print(c)
       \stoplua
       % You can also do more elaborate calculations with the lua math library:
       \ctxlua{tex.print("$\string\\sqrt{2} = " .. math.sqrt(2) .. "$")}
       \stoptext

and run it with

       texexec --lua filename.tex

See also

the Debian TeXlive install page.