ConTeXt中文TTF字体安装

Linux下最小化安装ConTeXt

LiYanrui posted @ 2007年12月17日 06:02 in ConTeXt之旅 with tags ConTeXt tex , 5215 阅读

1  安装

首先创建一个ConTeXt安装目录(譬如 $HOME/context),并进入该目录(下文以context-installation-directory指代该目录)。操作如下:

$ mkdir context-installation-directory
$ cd context-installation-directory

从 pargma-ade 网站上下载 justtex.zip 和 linuxtex.zip 包:

$ wget http://pragma-ade.com/context/install/justtex.zip \
     http://pragma-ade.com/context/install/linuxtex.zip

所下载的包,前者是ConTeXt的一些格式文件(配置文件),后者是可以在GNU/Linux运行的ConTeXt程序集(二进制包)。

这两个包下载完后,对其解压缩:

$ for f in justtex.zip linuxtex.zip; do unzip $f; done;

在解压缩时,终端会输出一些提示信息,问你是否要覆盖三个文件,回答 "yes" 即可。解压缩后会在context-installation-directory目录下生成一个tex目录,所有关于ConTeXt的文件都存放在该目录下。

2  配置

下面开始配置ConTeXt环境变量,并保证在你每次登录系统时使这些环境变量生效。

context-installation-directory/tex目录下有一个名为setuptex的脚本文件,使用它可以减轻繁杂的ConTeXt环境配置工作量。具体操作如下:

$ echo '#!/bin/bash' > ~/.context_env
$ cat tex/setuptex >> ~/.context_env
$ chmod 755 ~/.context_env
$ echo "source $HOME/.context_env $PWD/tex" >> ~/.bashrc

运行一次所配置的.context_env脚本文件,这样即便在不重新启动系统的情况下也可以拥有正确的ConTeXt环境配置。操作如下:

$ source ~/.context_env $PWD/tex

最后一步要刷新一下 ConTeXt 文件数据库,并生成ConTeXt文档编译时所需的格式文件:

$ mktexlsr
$ texexec --make --alone

3  测试

试着运行下面的命令:

$ texexec --version

应当输出类似下面的信息:

TeXExec | version 6.2.0 - 1997-2006 - PRAGMA ADE/POD

下面通过编译一份文档来测试ConTeXt环境是否可以正常使用。首先建立一份名为first.tex的TeX源文档,内容如下:

\starttext
Hello, world!
\stoptext

使用texexec命令将该源文档编译为pdf文档:

$ texexec first.tex

使用 pdf 阅读器浏览上述命令输出的 first.pdf 文件,你所看到的是 ConTeXt 的第一声问候。

4 更新

ConTeXt经常发布更新,这一点深得自由/开源软件开发精髓。对于已经安装正确的ConTeXt环境,更新是很容易的。

首先进入context-installation-directory/tex/texmf-local目录:

$ cd context-installation-directory/tex/texmf-local

然后下载cont-tmf.zip包并解压,操作如下:

$ wget http://www.pragma-ade.com/context/current/cont-tmf.zip
$ unzip cont-tmf.zip

最后重新生成ConTeXt的格式文件:

$ texexec --make --alone --all

参考文献

Linux User Installation——http://wiki.contextgarden.net/Linux_User_Installation

Avatar_small
cleaning companies i 说:
2019年9月22日 20:05

From time to time you simply have to have the house clean instantly. Whether it’s some sort of post-party cleansing, unexpected guests on their way or a range of other good reasons, you’ll inevitably be in some sort of pinch that has a dirty, untidy home. The majority of the Maids offices develop the staff measurement, equipment in addition to proven strategy to handle your complete last-minute house cleaning quickly in addition to thoroughly. Let us get those place bright and clean so as to handle ones other accountabilities.

Avatar_small
siberyan health 说:
2019年11月16日 18:04

well balanced diet indicates eating the best proportions or even servings of every food. Should you eat mainly protein meals but not many fruits or even vegetables, your diet plan isn't well balanced. Following the right portion sizes of every food team: 3-4 ounce (greeting card deck size) associated with protein.

Avatar_small
mv home inspections 说:
2020年3月26日 23:08

A building inspection, like defined, is really an examination for the physical construct and systems from the home, which offers a detailed 'snapshot' of the health of the home in the course of the assessment. The intent behind a place inspection is in lowering some for the risk part of purchasing a building; however, the software cannot terminate those disadvantages, nor may well the inspector hope future parties or transformations in performance attributable to changes in use or occupancy. <a href="http://www.mvhomeinspections.com">www.mvhomeinspections.com</a>

Avatar_small
uk cleaning director 说:
2020年3月26日 23:09

All of us can watch the comfort from the clean and additionally well secured home. Home cleaning is mostly a necessity and the majority people cannot keep their apartment cleans as a result of their occupied schedules. Homes have to be cleaned regularly to help unpleasant smells and vermin infestations that should be prevented. <a href="http://www.ukcleaningdirectory.com">www.ukcleaningdirectory.com</a>

Avatar_small
mentholatum home 说:
2020年3月26日 23:09

Almost all people define high class majorly in the case of price but there may a lot more to luxury than just how much money did you use. It could be very hard to make sure you define high class homes with an exact solution because this is exactly something made up of several points. <a href="http://www.mentholatumhome.com">www.mentholatumhome.com</a>

Avatar_small
I sell pittsburgh ho 说:
2020年3月26日 23:10

If you happen to buying a building that was once inspected then you must have your personally own inspection done that should be protected like fully that they can. If anyone tells you it to be fine to try the original home assessment report they are simply wrong. You're not sheltered well ın any way. When Habitation Researching does a building inspection the shopper is able to get any 18 week warranty for those fee about 12 times. <a href="http://www.isellpittsburghhomes.com">www.isellpittsburghhomes.com</a>

Avatar_small
wanamassa reale stat 说:
2020年3月26日 23:10

So you prefer to be a triumph real property investor? Certainly, you must contain your goal setting tools in tier. In order to have the greatest chance for achieving any goals you need to setting SHARP goals. At this time, not all the Webster quality of sharp, but very SMART as being a definite acronym just for Specific, Measurable, Readily attainable, Realistic, and additionally Timely. <a href="http://www.wanamassarealestate.com">www.wanamassarealestate.com</a>

Avatar_small
full time maids in d 说:
2020年4月30日 19:30

Maids are likely to be looked along as minimal income class, unglamorous along with unadventurous folks. But, with a bit of imagination along with creativity you'll be able to turn yourself right very scorching and ambitious maid. Your current sensuous dress-up costume would create other women highly envious of anyone. Conversely, this specific sexy clothe would create men your current willing slaves. They will gather around that suits you worker bees expecting your order placed and prefers.

Avatar_small
painting company in 说:
2020年4月30日 19:30

Should you be wondering why the average joe should look at hiring a new painter, you should uncover the major reasons for using these kinds of professional. You could be surprised with the reasoning guiding paying someone to paint your own home for anyone. Consider various reasons before spending money on this sort of expert.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter