I was trying to compile kerTeX on Mac OSX 10.9 and encountered some problem. I downloaded this get_mk_install.sh from the project home and fed it to sh, it worked very well at first for a moment but terminated suddenly, the error message does not make any sense to me:

#========== BUILDING sys/sh1/pkglib
sed -e 's!@@TARGETSHELL@@!/bin/sh!'\
                 -e '/^##PKG_SYS_DEPENDENT/r /Users/user/Temp/kertex/kertex_T/sys/sh1/pkglib/./unix.data' /Users/user/Temp/kertex/kertex_T/sys/sh1/pkglib/sh.data\
             | sed -e 's!@@SYS_FTPC@@!ftp!'\
                         -e 's!@@SYS_HTTPC@@!ftp!'\
      -e 's!@@SYS_SUDOING@@!sudo!'\
                         -e 's!@@SYS_ROOT_ID@@!0!' >pkglib.sh

#========== sys/sh1/pkglib DONE (50/50)
Programs that failed to build:
make: *** [all] Error 1

Can any one help on this, or point me to where solutions can be found.

My purpose is to port some TeX system to mobile platforms such as Android, iOS, etc., to compile TeX scripts locally. Is this the appropriate solution for my task? If there are ones that are better, please let me know.


  • I've never managed to get KerTeX to build on my Mac: I've not tried for a while, but it seemed to me that the scripts were really focussed on other systems.
    – Joseph Wright
    May 4, 2014 at 12:38
  • Scope comment: the issue here is not 'TeX' per se but building binaries, which I guess could well be regarded as more 'on topic' in other places. This looks worth discussion: perhaps raise on meta?
    – Joseph Wright
    May 4, 2014 at 12:39
  • OK, the question is moved to stack overflow, leave this thread for a while and I'll delete it later. May 4, 2014 at 15:11

1 Answer 1


For the mobile use case I created the TeX-- project. Note that it produces DVI files, not PDFs.

A TeX implementation in a single C++11 class.

Based upon version 3.14159265 of tex.web. The main goal was getting TeX’s massive number of symbols out of the global scope; making it easy to embed.

Creation of the header file is done through the tex.sh shell script, so that it can be regenerated at any time. No manual clean-up or restructuring of the code has been done. Some automated transformations of the code are done in the shell script. Primarily to replace certain C constructs with C++ equivalents.

The web/tex.hpp file should be all you need. Feel free to open Github issues on the project.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .