Time-stamp: <2020-07-04 10:40:52 pbpal>
bangtex installation

How to install bangtex

Palash Baran Pal


Bangtex First released January 2001
Latest revision August 2003
Latest revision of this help page July 2020

Go to the main bangtex page

Contents

Installation in Linux systems
Installation for non-superusers in Linux
Installation on Unix systems
Installation of Postscript fonts
Installation of seicor
Installation on Windows systems
Installation on Mac systems
Words of advice for all systems

Installation in Linux systems

The necessary files

When you are reading this, you must have already downloaded the following files from the source of bangtex:
If you have not, please go back to the source of bangtex by clicking here and download these files. Save them in any directory. For the sake of definiteness, we will call this directory /BT. This can be a directory in a user's area, or in the system area. These are all tarred zipped files. You need to unzip them before they can be used. But first, we need to identify the directory where they ought to be unzipped.

Identifying a certain directory

For this, you need to be the superuser. (If you do not have access to the superuser account, you have to go to a different section.) Log in as the superuser. Go to the topmost directory (usually denoted just by a `/') and issue the command

find -name cmr10.mf

This will tell you where the file cmr10.mf is located. This is one of the files in the TeX/ LaTeX distribution system. If the computer cannot find this file, there is something wrong with the installation of TeX/ LaTeX in your system. In this case, forget about installing bangtex and rather have TeX/ LaTeX installed in your computer properly. In the rest, I assume that this is not the case, and the computer has given you some reply to the find command issued above. Unfortunately, the answer would vary from computer to computer, depending on the version and distribution of TeX/ LaTeX installed. However, all answers should have the following generic structure:

/AAA/texmf/fonts/source/public/cm/cmr10.mf

where /AAA is a symbolic representation. This is the part which varies from one computer to another. For example, on one computer that I use frequently, /AAA is /usr/share. This means that the answer to the `find' command on this computer should yield

/usr/share/texmf/fonts/source/public/cm/cmr10.mf

But in another computer, the answer could be

/usr/lib/teTeX/texmf/fonts/source/public/cm/cmr10.mf

which would mean that /AAA is /usr/lib/teTeX on this computer. Whatever it may be, you need to remember the name of the /AAA directory for the rest of the installation. In everything that follows, replace /AAA by the name of the directory that you have just determined for your computer.

Installing the font files

Go to the directory /AAA/texmf/fonts/source by issuing the command

cd    /AAA/texmf/fonts/source

where /AAA stands for the directory/subdirectory determined above. In this directory, copy the file bfonts.tar.gz (which was originally stored in the directory called /BT) by issuing the command

cp   -p  /BT/bfonts.tar.gz     .

(Don't forget the dot at the end!) And then unpack the contents of the zipped file by giving the command

tar xvfz bfonts.tar.gz

This command will create a subdirectory for keeping the bangla font files, unpack the font files and keep them there.

Installing the macro files for LaTeX

LaTeX needs extra macro files for formatting a document. For a document written in Bangla, we need to have the macros such that the headings for chapters, sections, etc appear in Bangla, and so do the captions for tables and figures. For this, extra files need to be installed. You now need to go to another directory. Issue the command

cd   -p  /AAA/texmf/tex/latex

where, as before, /AAA is symbolic here. In this directory, copy the file bsty.tar.gz (which was originally stored in the directory called /BT) by issuing the command

cp   -p   /BT/bsty.tar.gz .

And then unpack the contents of the zipped file by giving the command

tar xvfz bsty.tar.gz

This command will create a subdirectory for keeping the bangla font files, unpack the font files and keep them there.

If you are updating...

If this is the first time you are installing bangtex on your computer, ignore this part and go to the next section. If you already have an earlier version of bangtex installed, you must eliminate some files of that earlier version so that the new ones work. For this, you need to identify two more directories. Go to the topmost directory and issue the commands in succession:

find   /   -name   bang*.tfm
find   /   -name   bang*.*pk

Suppose they show you that you have some tfm files in the directory /TTT and some pk files in the directory PPP. Then issue the commands

rm   -f   /TTT/bang*.tfm
rm   -f   /PPP/bang*.*pk

Of course the directory names are symbolic, and you need to substitute the real names in the commands.

Initializing the files

You now have all the files in their proper places. You still have to pass on this information to the computer. In other words, when the computer will run TeX or LaTeX, it should know to look for the files in these locations. This can be done by going to the top directory through the command

cd    /

and issuing the command

texhash

You will see the names of a lot of files flashing on the screen. Finally, when it is done, the installation is complete. If for some reason, texhash does not work, you can instead issue the command

texconfig

This will open a window with many options. You can choose the option

rebuild ls-R database

with the arrow keys on your keyboard and hit the enter key. This has the same effect as the command texhash. Once you are done, choose the exit option and hit return to exit texconfig and finish installation.

Checking the installation

As we mentioned, all the operations mentioned after the downloading of the source files must be performed by logging in as the superuser. Now that the installation is complete, this restriction does not apply any more. In fact, any user now should be able to use the Bangla fonts. To know how to do that as well as to check that the installation was successful, we have provided some sample files in bsample.tar.gz, which includes the manual. So, in any directory where the file bsample.tar.gz resides, issue the command

tar xvfz bsample.tar.gz

As this unpacks, you will see the names of some files, including one called manual.tex. This is a LaTeX file containing the manual. Run LaTeX on it:

latex manual

In the process, you will see the computer creating the fonts. It might give some error messages during this stage. Ignore them. None of them is serious. When it is done, you can see the dvi file on the screen or print it out as you would print any file formatted by LaTeX. This will give you instructions about how to use the Bangla fonts. See also the other files that came out of bsample.tar.gz in order to learn various features of creating a Bangla document. Before leaving this page, please read the sections on the installation of postscript fonts, and on some advisory remarks which also appear on this page.

Top of page


Installation for non-superusers in Linux

If you do not have the power of the superuser, you can still use bangtex, but with some restrictions. The installation in this case is easier. You merely download the following files in a directory
If you have not done so already, do it now from the source of bangtex by clicking here. We suggest that you keep them in a directory where there are no other files. Now unpack them, issuing the command

tar   xvfz   b*.tar.gz

This completes the installation. You can now check the installation and try to print out the manual for using bangtex. Before leaving this page, please read the sections on the installation of postscript fonts, and on some advisory remarks which also appear on this page.

Although the installation is much simpler this way, there is a serious disadvantage of this method. You will be able to use bangtex only in the directory where you had unpacked the tarred files mentioned above. You cannot use it even from any other directory in your own user area. Needless to say, we recommend that you do not install bangtex this way unless all possibilities of getting superuser access fails.

Top of page


Installation on Unix systems

You need to follow the instructions provided for Linux systems. The only difference is in unpacking the downloaded files. For example, when you come to the stage in the installation where you have to unpack the file bfonts.tar.gz, issue the series of commands

gunzip bfonts.tar.gz
tar -xvf bfonts.tar

Keeping this in mind, go to the section on Linux systems.

Top of page


Installation of Postscript fonts

The postscript fonts, as well as the related instruction material, has been created by Ananda Kumar Samaddar. I thank him for allowing me to include this program in the main bangtex distribution.

The entire package can be downloaded as a single tarred & zipped file called bpsf.tar.gz. If you have not already downloaded this file, please go back to the source of bangtex by clicking here and download it. I assume that you have kept it in the directory we have denoted by /BT. Go to that directory and issue the command

tar xvfz bpsf.tar.gz

Once this is done, you will notice that a new subdirectory called bpsf has been created under the directory /BT. It should contain 11 files. Go through the file called README first. That should answer other questions like how the postscript fonts have to be installed, and why they are useful. Any question, comment and appreciation on the installation or use of this program should be sent directly to the its creator by clicking on his name above.


Installation of seicor

This program has been created by Somendra Mohan Bhattacharjee. I thank him for allowing me to include this program in the main bangtex distribution.

If you have not already downloaded seicor, I recommend that you go back to the source of bangtex by clicking here and download it. Then click here on the name of the program seicor to find out how to install it. Once installed, you can also see some detailed instructions about its use. Any question, comment and appreciation on the installation or use of this program should be sent directly to the its creator by clicking on his name above.


Installation on Windows systems

(Courtesy: Pradipta Bandopadhyay)

Prerequisites

In the instructions below, I am assuming that you are using the MikTeX installation of TeX and LaTeX. Though not absolutely essential, I recommend that you get some familiarity with the program itself if you do not have it already, without worrying about the Bangla files or fonts. Now, to use the Bangla fonts, first make sure that you have already downloaded the following files from the source of bangtex:
If you have not, please go back to the source of bangtex by clicking here and download these files. Save them on your Desktop. Don't be bothered if they clutter your Desktop. Once the installation is complete, you can delete them.

Identifying a certain directory

In everything that follows in this section, a click should mean clicking the left button of the mouse. Start by the following clicks:

Start Find Files or Folders

It means that you start by clicking the Start button at the lower left corner of the screen with the left button of your mouse. Among the possibilities which open up, choose the Find option, followed by Files or Folders by clicking on them. This kind of abbreviation for clicks will be used throughout this section. The clicks described above will open a box where you can put in the name of a file you want to search. Type the name

cmr10.mf

in that box and ask it to search it in the C: directory. Then click the button for Find now. This will tell you where the file cmr10.mf is located. This is one of the files in the TeX/ LaTeX distribution system. If the computer cannot find this file, there is something wrong with the installation of TeX/ LaTeX in your system. In this case, forget about installing bangtex and rather have TeX/ LaTeX installed in your computer properly. In the rest, I assume that this is not the case, and the computer has given you some reply to the commands issued above. The answer might vary from one computer to another, depending on the version and distribution of TeX/ LaTeX installed. However, all answers should have a common generic structure, viz., you should see that the file cmr10.mf is sitting in a directory whose name is of the form

AAA\texmf\fonts\source\public\cm

where AAA is a symbolic representation. This is the part which varies from one computer to another. For example, on one computer that I have checked, AAA is C:. This means that the answer to the `find now' command on this computer gave me the folder name

C:\texmf\fonts\source\public\cm

But in another computer, the answer could be different. Whatever it may be, you need to remember the name of the AAA directory for the rest of the installation. In everything that follows, replace AAA by the name of the directory that you have just determined for your computer.

Installing the font files

Now go back to your Desktop and double click on the file bfonts.tar.gz that had been sitting there. This is a zipped file, so the double click will cause WinZip to start working. Choose the Extract option. It will ask you which folder to extract the file into. In the box provided for the answer to this question, write

AAA\texmf\fonts\source

Remember that AAA is symbolic here. It should be replaced by the appropriate thing, as described above. If you now click on Extract again, the fonts files will be unpacked and placed in proper places.

Installing the macro files for LaTeX

LaTeX needs extra macro files for formatting a document. For a document written in Bangla, we need to have the macros such that the headings for chapters, sections, etc appear in Bangla, and so do the captions for tables and figures. For this, extra files need to be installed. For this, double click on the file bsty.tar.gz on your Desktop and follow exactly the same steps as for installing the font files, with the exception that you put in the folder name

AAA\texmf\tex\latex

when you are asked for one. Here also, AAA is symbolic as before.

If you are updating...

If this is the first time you are installing bangtex on your computer, ignore this and go to the next section. If you already have an earlier version of bangtex installed, you must eliminate some files of that earlier version so that the new ones work. For this, do

Start Find Files or Folders

once again. This time, ask the computer to search for the following file:

bang10.tfm

Again, it will show you the folder where this file is in. For example, on my computer, it returns with the following folder name:

C:\localtexmf\fonts\tfm\bangla

Start clicking on the My Computer widget on your desktop until you see this folder. Then drag the entire folder to the Recycle bin on your desktop. Now go one level up in the folder list by clicking the Up symbol on the window. You should see two folders now, one called tfm and the other called pk. Double click on the pk folder. You should see a folder called ljfour. Double click on it. There should be a folder called Bangla sitting here. Drag this entire folder to the Recycle bin as well.

Initializing the files

You now have all the files in their proper places. You still have to pass on this information to the computer. In other words, when the computer will run TeX or LaTeX, it should know to look for the files in these locations. This can be done by clicking the following buttons in succession:

Start Programs MikTeX MikTeX options

This will open a box. It has several pages. Hopefully it will open on a page titled General. If not, click on the name of that page and it will open. You will see different things on this page. One of them is called File Name Database. It should have a button called Refresh now. Click on this button. Wait until the computer does the refreshing. Once it is done, click on the cross button on the upper right to close the window for MikTeX options.

Checking the installation

The installation is now complete. Bangtex is now ready to be used. To know how to use it as well as to check that the installation was successful, we have provided some sample files in bsample.tar.gz, which includes the manual. It is best first to try to print the manual out, which will give you further instructions for creating documents on your own. For this, double click on the name of the file bsample.tar.gz sitting on your Desktop. Store the extracted files in any folder you want, but it is recommended that you do not store it in the texmf or localtexmf folders, or any other system folder like C:\Windows. For the sake of definiteness, let us say that you have saved the extracted files on a directory named C:\btfiles. If you have chosen some other name instead, change the ensuing instructions accordingly. It is now best to go to the MS-DOS prompt by clicking

Start Programs MS-DOS prompt

At the prompt, type

cd    C:\btfiles

Once in the directory, issue the command

latex manual

and let the computer do what it wants to do. It will take a while, because it will have to create all the Bangla fonts. This will happen only the first time. If you run latex subsequently, it will be much faster because the fonts will then already be there on the disk. Once this is done, you can go back to the Windows Desktop and click

Start Programs MikTeX Dvi viewer

This will open a window to view the file. Click on the `File' option, and then the `Open' option. In the window provided, either type in the name of your file, e.g.,

C:\btfiles\manual

and then click `Open', or double click on the folder name on top successively until you double click your folder and your file. Now you can see the file as it would appear in print. If you want, you can print it out. If you have come to this point successfully, the installation is complete and perfect, and you can throw away the files tar.gz files that you had downloaded.

Top of page


Installation on MacOS

(Courtesy: Suratna Das)

It will be assumed that MacTex is installed on your computer. This is the basic step for using TeX/LaTeX in MacOS. The distribution files for bangtex can be downloaded before you start the procedure outlined below, or can be downloaded during the installation, as indicated in these instructions.

Global installation for all users on a given computer

You will need superuser privileges for doing this. Either log in as superuser, or use sudo in front of every command shown below.
  1. Check whether the folders /Library/texmf/tex/latex and /Library/texmf/fonts/source exist on your computer. They should. If not, create them with the command mkdir.
  2. Download bfonts.tar.gz and move it to the /Library/texmf/fonts/source folder by using the command

    mv   bfonts.tar.gz   /Library/texmf/fonts/source/

  3. Go to the folder /Library/texmf/fonts/source and untar the fonts file by issuing the commands

    cd /Library/texmf/fonts/source
    tar xvfz bfonts.tar.gz

  4. Similarly download bsty.tar.gz, move it to the folder /Library/texmf/tex/latex, go to that folder and untar it:

    cd /Library/texmf/tex/latex
    tar xvfz bsty.tar.gz

  5. At this stage, you can delete the files bsty.tar.gz and bfonts.tar.gz if you want. They will not be needed again.
That completes the installation. To check whether the installation has been successful, download bsample.tar.gz in any folder. Let us say the name of this folder is /SAM. Go to that folder and untar this file:

cd /SAM
tar xvfz bsample.tar.gz

You will see a few files coming out in the process. Run LaTeX on any one of these sample files. The most important one is the manual file, which you should run LaTeX on, and read for preliminary instructions for using bangtex.

Installation for a single user

This kind of installation is not recommended. But, if you do not have superuser access and are desperate to install bangtex, you can follow these steps.
  1. Create two folders ~/Library/texmf/tex/latex and ~/Library/texmf/fonts/source. Note that, initially the ~/Library folder will not have the texmf folder. So you will have to create the folder sequentially. For example, to create the first one, issue the commands

    cd ~/Library
    mkdir texmf
    cd texmf
    mkdir tex
    cd tex
    mkdir latex

    For the other one, the commands are similar, with obvious change of some names.
  2. Now follow the steps for superuser installation starting from step 2, except that anywhere you see the directory name /Library, replace it by ~/Library.

Words of advice for all systems

Whether you are using the program in Linux or Unix or Windows, the following remarks may be of help.
  1. Latex files with cross references need to be run at least twice before the cross references are properly displayed. This applies for the file manual.tex included in the distribution, and any file with cross references that you might prepare.
  2. The sample file called samptex.tex has to be run with plain TeX rather than LaTeX. All other sample files in the distribution, including the manual file, are LaTeX files.
  3. You can look into the sample files to learn some tricks. For example, if you are preparing a plain TeX document and don't know how to make the page numbers appear in Bangla, look into the file samptex.tex to find out the solution.

Top of page