Difference between revisions of "Ubuntu"

From Wiki
Jump to navigation Jump to search
(Updated for Ubuntu 10.10, rest of the page is probably obsolete at this point.)
(15 intermediate revisions by 6 users not shown)
Line 1: Line 1:
Here are instructions grouped according to the version of Ubuntu you are running.
+
Here are instructions for ConTeXt installation on Ubuntu and its derivatives [K/X/L]ubuntu.
  
== Maverick (10.10) ==
+
== Precompiled / Packaged Nightly Builds From PPA ==
  
TeX Live and ConTeXt have been part of Ubuntu's main repositories since Ubuntu 7.10, so you can simply <code>apt-get install context</code> to install ConTeXt and its dependencies.
+
Adam Reviczky was most generous to provide us with an Ubuntu PPA (Personal Package Archive) that contains precompiled Ubuntu packages for both ConTeXt and LuaTeX nightlies. Instructions for your version of Ubuntu are available for [https://launchpad.net/~reviczky/+archive/context-daily ConTeXt] and [https://launchpad.net/~reviczky/+archive/luatex-daily LuaTeX].
 +
 
 +
== With Ubuntu packages – should work with Ubuntu 7.10 and above ==
 +
 
 +
Note that Ubuntu's packaged version of ConTeXt is quite old (circa 2009), so a better option is the ConTeXt Standalone
 +
 
 +
TeX Live and ConTeXt have been part of Ubuntu's main repositories since Ubuntu 7.10, so you can simply  
 +
 
 +
  apt-get install context
 +
 
 +
to install ConTeXt and its dependencies.
  
 
The dependencies pull in various PDF utilities which you will probably find useful, including <code>pdfcrop</code>.
 
The dependencies pull in various PDF utilities which you will probably find useful, including <code>pdfcrop</code>.
  
If you would like to use the [http://www.tug.org/texworks/ TeXworks] GUI-based TeX editing environment usually included with TeX Live CDs, it is available via <code>apt-get install texworks</code> and will appear under Applications, Science & Math.
+
If you would like to use the [http://www.tug.org/texworks/ TeXworks] GUI-based TeX editing environment usually included with TeX Live CDs, it is available via
 +
 
 +
  apt-get install texworks
 +
 
 +
and will appear under Applications, Science & Math.
  
 
See also:
 
See also:
* [[Setting up TeXworks]]  
+
* Setting up [[TeXworks]]  
* [[Using LuaTeX in Ubuntu]]
+
 
 +
=== Adding the system fonts ===
 +
 
 +
The standard Ubuntu LuaTeX package does not scan any of your installed system fonts. Therefore you will want to set up the OSFONTDIR environment variable to point to all the font paths. For example:
 +
 
 +
  export OSFONTDIR=~/.fonts:/usr/share/fonts:/usr/share/texmf/fonts/opentype/:/opt/libreoffice/basis3.3/share/fonts/
 +
 
 +
Once you have done that, run
 +
 
 +
    mtxrun --script fonts --reload
 +
 
 +
If you have an error do this
 +
 
 +
    luatools --generate
 +
 
 +
to scan all the font directories. Then run
 +
 
 +
    mtxrun --script fonts --list --all --pattern=*
 +
 
 +
to list all the fonts LuaTeX now knows about. Finally, run
 +
 
 +
    context --reload
 +
 
 +
to make sure ConTeXt's font cache is up to date.
 +
 
 +
If you are using TeXworks, you need to make sure that OSFONTDIR is set in the environment TeXworks runs in, because ConTeXt may decide it needs to rescan fonts.
 +
 
 +
== With ConTeXt Standalone – should work with all Ubuntu versions==
  
== Gutsy (7.10) ==
+
Example of setting up [[ConTeXt Standalone]]:
  
Gutsy will be released in October 2007. Its repositories, which came from Debian unstable just after feisty (7.04) was released, already have the texlive 2007 and recent ConTeXt packages. So you could use them now (if you are brave).
+
  sudo mkdir /usr/local/context
 +
  sudo chown yourusername /usr/local/context
 +
  cd /usr/local/context
 +
  wget http://minimals.contextgarden.net/setup/first-setup.sh
 +
  sh first-setup.sh
 +
  vi ~/.bashrc
  
== Edgy (6.10) and Feisty (7.04) ==
+
Add these three lines:
  
Unfortunately, you cannot use the repository given in [[Debian installation]] because the Debian packages were compiled with a (very very slightly) newer libc6 than the one that comes with Ubuntu 7.04.  Here instead are slightly tested packages backported for Ubuntu 6.10 (edgy); they also work on my Feisty (7.04) laptop.  To use them put these two lines in your <tt>/etc/apt/sources.list</tt>:
+
  export OSFONTDIR=~/.fonts:/usr/share/fonts                                                     
 +
  export TEXROOT=/usr/local/context/tex                                       
 +
  export PATH=/usr/local/context/tex/texmf-linux-64/bin:/usr/local/context/bin:$PATH
  
  <nowiki>deb    http://web.mit.edu/download/sanjoy/texlive-backports/ edgy/
+
Note that the order of items in the PATH is significant. If you put /usr/local/context/bin in the path first, you will get an error at run time.
  deb-src http://web.mit.edu/download/sanjoy/texlive-backports/ edgy/</nowiki>
 
  
Then you can install the texlive 2007 and recent context packages. See the [[Debian installation]] instructions for the details, but here is the quickstart:
+
Also, remember that you have to source ~/.bashrc after changing it, in order to have the changes take effect in your current shell. (Either that, or start a new shell.)
  
  apt-get update
+
===Installing third party modules in ConTeXt Standalone ===
  apt-get install cm-super texlive-fonts-recommended context context-nonfree context-doc-nonfree
 
  
That command also installs the needed texlive packages for pdftex, metapost, lmodern etc.  The <tt>cm-super</tt> package is in the ''universe'' repository so you'll need that enabled in your <tt>sources.list</tt>.  You should not need to chase down the old teTeX 3.0 packages, which will be removed automatically by the above installation line.  To test whether the basics of ConTeXt are working after the upgrade, try:
+
See here: [[ConTeXt_Standalone#Installing_third_party_modules|Installing third party modules]]
  
   ctxtools --contextversion
+
===Updating ConTeXt Standalone===
 +
The update procedure is similar to [[ConTeXt_Standalone#Updating|the normal procedure]]. If you installed the ConTeXt Standalone with the commands from above, you can update to a new (beta) version like this:
 +
   cd /usr/local/context
 +
  wget http://minimals.contextgarden.net/setup/first-setup.sh
 +
  ./first-setup.sh --keep
  
Let me (Sanjoy) know if you find anything broken.
+
{{Installation navbox}}

Revision as of 19:33, 14 April 2020

Here are instructions for ConTeXt installation on Ubuntu and its derivatives [K/X/L]ubuntu.

Precompiled / Packaged Nightly Builds From PPA

Adam Reviczky was most generous to provide us with an Ubuntu PPA (Personal Package Archive) that contains precompiled Ubuntu packages for both ConTeXt and LuaTeX nightlies. Instructions for your version of Ubuntu are available for ConTeXt and LuaTeX.

With Ubuntu packages – should work with Ubuntu 7.10 and above

Note that Ubuntu's packaged version of ConTeXt is quite old (circa 2009), so a better option is the ConTeXt Standalone

TeX Live and ConTeXt have been part of Ubuntu's main repositories since Ubuntu 7.10, so you can simply

 apt-get install context

to install ConTeXt and its dependencies.

The dependencies pull in various PDF utilities which you will probably find useful, including pdfcrop.

If you would like to use the TeXworks GUI-based TeX editing environment usually included with TeX Live CDs, it is available via

 apt-get install texworks

and will appear under Applications, Science & Math.

See also:

Adding the system fonts

The standard Ubuntu LuaTeX package does not scan any of your installed system fonts. Therefore you will want to set up the OSFONTDIR environment variable to point to all the font paths. For example:

  export OSFONTDIR=~/.fonts:/usr/share/fonts:/usr/share/texmf/fonts/opentype/:/opt/libreoffice/basis3.3/share/fonts/

Once you have done that, run

   mtxrun --script fonts --reload

If you have an error do this

   luatools --generate

to scan all the font directories. Then run

   mtxrun --script fonts --list --all --pattern=*

to list all the fonts LuaTeX now knows about. Finally, run

   context --reload

to make sure ConTeXt's font cache is up to date.

If you are using TeXworks, you need to make sure that OSFONTDIR is set in the environment TeXworks runs in, because ConTeXt may decide it needs to rescan fonts.

With ConTeXt Standalone – should work with all Ubuntu versions

Example of setting up ConTeXt Standalone:

 sudo mkdir /usr/local/context
 sudo chown yourusername /usr/local/context
 cd /usr/local/context
 wget http://minimals.contextgarden.net/setup/first-setup.sh
 sh first-setup.sh
 vi ~/.bashrc

Add these three lines:

 export OSFONTDIR=~/.fonts:/usr/share/fonts                                                      
 export TEXROOT=/usr/local/context/tex                                         
 export PATH=/usr/local/context/tex/texmf-linux-64/bin:/usr/local/context/bin:$PATH

Note that the order of items in the PATH is significant. If you put /usr/local/context/bin in the path first, you will get an error at run time.

Also, remember that you have to source ~/.bashrc after changing it, in order to have the changes take effect in your current shell. (Either that, or start a new shell.)

Installing third party modules in ConTeXt Standalone

See here: Installing third party modules

Updating ConTeXt Standalone

The update procedure is similar to the normal procedure. If you installed the ConTeXt Standalone with the commands from above, you can update to a new (beta) version like this:

 cd /usr/local/context
 wget http://minimals.contextgarden.net/setup/first-setup.sh
 ./first-setup.sh --keep