FarsiTeX Logo, English FarsiTeX Logo, Persian

Installing FarsiTeX 1.0pre1 under teTeX/Unix/Linux/...

So you read the manual and release notes, and want to give it a shot on Linux, eh? Ok, here are the instructions, but, if you have any problems following them, please do not contact me. Chances are high that I don't know what is wrong on your system. Feel free to write to the farsitex-user list though.

Make sure you read this page to the end before starting your install. These have been tested on Fedora Core 6. They should work on Ubuntu and other modern systems. Make sure you have teTeX and WINE installed before continuing.

Installing the Engine

  1. Grab and unpack the tarball (16M) into your home directory (It will create ~/texmf, if it doesn't exist):
    cd ~
    wget http://internap.dl.sourceforge.net/sourceforge/farsitex/farsitex-1.0pre1.tar.bz2
    tar jxf farsitex-1.0pre1.tar.bz2
    
  2. Copy or symlink these files into PATH, eg. in ~/bin (You may need to rebuild the first two for your architecture. Just change to their directory and run make clean all):
    mkdir -p ~/bin
    ln -f -s ~/texmf/source/farsitex/ftx2tex/ftx2tex ~/bin
    ln -f -s ~/texmf/source/farsitex/fmakeidx/fmakeidx ~/bin
    ln -f -s ~/texmf/scripts/farsitex/bin/* ~/bin
    
  3. Copy the farsitex.map file into its new location under teTeX 3.0. After this, it should work with all versions of teTeX (you may get some warnings. Just ignore them.):
    mkdir -p ~/texmf/fonts/map/dvips
    cp -r ~/texmf/dvips/farsitex ~/texmf/fonts/map/dvips/
    
  4. Recent versions of teTeX use pdfeTeX as their default TeX engine, and FarsiTeX detects that and enables PDF output. To fix this we need to shuffle some bits around. In short, duplicate farsitex.ini so we can modify it for DVI output but not PDF; turn PDF off, by removing the first line of fadvitex.ini; and create a new fmtutil.cnf to use the new fadvitex.ini file:
    tail -n +2 ~/texmf/tex/farsitex/config/farsitex.ini > ~/texmf/tex/farsitex/config/fadvitex.ini
    echo "farsitex etex - *fadvitex.ini" > ~/texmf/tetex/fmtutil.cnf
    echo "fapdftex pdfetex - *farsitex.ini" >> ~/texmf/tetex/fmtutil.cnf
    
  5. Now, update teTeX's file database by running:
    texhash
    
  6. Build the formats:
    fmtutil --cnffile ~/texmf/tetex/fmtutil.cnf --byfmt farsitex
    fmtutil --cnffile ~/texmf/tetex/fmtutil.cnf --byfmt fapdftex
    
  7. Enable the font mappings:
    updmap --enable MixedMap=farsitex.map
    
  8. That's it. Test your brand new FarsiTeX installation:
    # convert FTX to TEX
    ftx2tex ~/texmf/doc/persian/farsitex/base/ftexthes/test.ftx
    # create DVI
    farsitex ~/texmf/doc/persian/farsitex/base/ftexthes/test.tex
    # create PDF
    fapdftex ~/texmf/doc/persian/farsitex/base/ftexthes/test.tex
    
    If everything went as expected, these should create ./test.dvi, demonstrating various new features of FarsiTeX, and its PDF version with shiny embedded vector fonts.

    Read ~/texmf/doc/persian/farsitex/base/ftexthes/ftexthes.pdf for features in this FarsiTeX version.

    You can use the ftex script that calls both of ftx2tex and farsitex for you, but note that its --out argument is not implemented and does not work, so you cannot create PDF using the ftex script.

Editor

The ftexed editor can be run under WINE.

With older versions of WINE, you needed to install this farsitex.bdf font and tweak your WINE configuration to make sure it finds and uses it. It was not easy though.

The good news is, with recent versions of WINE (eg. 0.9.27), it uses the Windows font installed by the installer and it all Just Works.

  1. Start by downloading and installing the Windows installer (644K) (Select Next in every step, and finally Finish):
    wget http://umn.dl.sourceforge.net/sourceforge/farsitex/farsitex-editor-alpha9.1.exe
    wine farsitex-editor-alpha9.1.exe
    
  2. We need to update the font editor uses to one that reflects changes in farsitex-1.0pre1. This is only necessary if you didn't have to get the farsitex.bdf font working. This step depends a bit on your WINE configuration. Move the font manually if it doesn't work.
    wget http://farsitex.org/files/farsitex.fon
    mv farsitex.fon ~/.wine/*/[Ww]indows/[Ff]onts/
    rm -f ~/.wine/*/[Ww]indows/[Ff]onts/FarsiTeX.fon
    
  3. Create a shell script named ftexed to launch it. We need to find where the installer placed Ftexed.exe, and run it under WINE. This depends on your WINE configuration. Tweak if this doesn't work:
    echo "wine ~/.wine/*/Program\ Files/MikTeX/miktex/bin/Ftexed.exe" > ~/bin/ftexed
    chmod a+x ~/bin/ftexed
    
  4. That's almost it! You should even find a launch icon on your desktop. The items in the Run menu don't work yet. Use command-line tools instead. Launch it:
    ftexed
    
  5. Making the Run menu launchers work needs some more involved magic. So I'll don't write it down here. Just grab the script and let it do. The ftex-to-unicode item still doesn't work as the converter doesn't quite exist, but the rest should work nicely. Uses xdvi to view DVI:
    wget http://farsitex.org/files/install-ftexed-cmd-launchers.sh
    bash install-ftexed-cmd-launchers.sh
    

All in One

The instructions above can also be all run using this shell script:
wget http://farsitex.org/files/install-farsitex-1.0pre1.sh
sh install-farsitex-1.0pre1.sh
If you have already downloaded the tarball, download and tweak the script to suite your situation.

Troubleshooting

The editor installer does not start, errs about visuals and libGL
I've seen this on a AIGLX-enabled X with intel graphics card. Try turning AIGLX off. Probably a driver issue.
Something else doesn't work
Try figuring out what failed. If you can't, you probably shouldn't be running FarsiTeX on Linux. Anyway, please DON'T MAIL ME. Write to the farsitex-user list.

Revision History

May 15, 2007
Added editor Run menu launcher setup script.
January 2007
Initial write-up.

Copyright © 2000--2007 Behdad EsfahbodCopyright © 2017 Persian Computing CommunityHosted on GitHub