If you’re an Android user looking for a complete TEX system in a tablet, here is a glad news waiting for you . An application namely, TEXPortal in combination with TEXpert will make a complete TEX system in your Android tablet or smart phone. TEXPortal is a complete TEXLive distribution ported for Android and TEXpert is a full fledged text editor and integrated development environment within which the user can create, edit, run the compiler, view and debug without leaving it. The user interface is uncluttered, elegantly simple and very easy to use that will put to shame some of the cloud based frameworks that have germinated in the fertile soil of Internet in recent times.
The big advantage of TEXPortal is that any non-geeky user can set it up without any feeling of intimidation and is as breezy as the installation of any other Android application. As such anybody who has a user knowledge of TEX can make a try confidently. Standard TEXLive installation in desktops need around 300 Meg space while TEXPortal needs only 2 Meg for pdfTEX alone plus 40 Meg for LATEX, half of which will be installed on the fly as and when need arises. Hence, this is a big boon for limited storage devices.
The main features include:
- TEXPortal is optimized for mobile devices.
- It is a complete TEXLive distribution ported for Android, keeping a minimal installation to begin with. However, as and when the submitted documents require more and more advanced packages, those will be downloaded dynamically from CTAN and installed as and when needed, provided the device is connected to the Internet.
- All popular macro libraries like LATEX and ConTEXt are available.
Figure 2: A screen shot of source and compiled output of a document that uses a relatively complicated document class and supporting packages.
- All standard compilers like TEX, pdfTEX, XeTEX and LuaTEX are available.
- Internet connection is not mandatory for TEXPortal to work if the user does not want to download any package from CTAN.
- The output shown on the right is not in PDF format, but is a
.pngversion of the output which makes the loading and refreshing output with repeated runs of TEX faster. TEXpert has its own integrated viewer.
Given below is a screen shot (Figure 3) of a document written in Malayalam (a language with complex script spoken in Kerala, southern India where I live) and compiled using XeLATEX. I have used a nice custom font, viz., Rachana and XeTEX did its job very well without any hassles. To install this font in my Android devices, I just needed to create a sub-directory Fonts in the sd card and copy the
.otf version of the font to the
Fonts directory. Once this is completed, we need to regenerate the font cache afresh by pressing the menu item Generate Fonts Cache in the left panel of TEXPortal interface (See Figure 5) to facilitate XeTEX to access system fonts.
- TEXPortal provides a big advantage of keeping document sources locally in user’s devices, instead of uploading to or authoring in a remote server controlled by third parties.
- Since there is no need to send document sources to a remote server and run it from there, the output generation is faster, debugging is easier and no data charges are incurred. Edit–compile–view–debug cycle is relatively hassle-free than in a cloud based framework.
- Confidentiality of data, which is of paramount importance for researchers till the article is published or released in a preprint server like arXiv, is seldom compromised. Additionally, the system works fine even if you’re on a plane.
- No rooting of the device is necessary.
All the fonts that are downloadable from CTAN can be installed in TEXPortal as with any packages. I have tested many fonts like Libertine, Charter, mathpazo, Source Sans Pro, Inconsolata, newtxmath, and many more. Everything worked like a charm to my entire satisfaction.
Functionality of TEXPortal
The screen shot in Figure 5 shows how TEXPortal downloads and installs missing packages when a document is typeset. In this case, when I tried to typeset the Malayalam document shown in Figure 3, packages like,
l3packages, etc., were not found in the device and hence those are being installed (see the right panel).
The interface has been vertically divided into two — left and right panels. The left panel is further divided into four parts:
- Kill Process
The screen shots of a smart phone showing various menus are available here. It might be useful to take a look at these shots.
- The Compilation menu has two items, the first line is a choice menu where one can choose from,
eps2pdf. One can see that most of the binary programs needed are covered in the above list except TEX4ht and related stuff. We need to explore further so that
htmlgeneration from TEX sources becomes a handy affair. On the right of this we have a start button to start a compilation job with the chosen compiler.
- The second line where the submitted file name with path is given, which when touched, will open up a file dialog box through which the user can easily select the desired input file.
- The Kill button allows to terminate a process if you know the
pidof that process which can be provided left of the button.
- The user can install individual packages from CTAN if he desires so by providing the package name at Packages to install and the Install button does the job.
- Open button helps to see the TEX installation location with File Manager application (or similar one, a choice of apps available are presented from which users might choose) and do any kind of file operations. The tree structure is compliant with TDS.
- The Management menu provides four buttons:
- Grant Storage Permission — to grant TEXPortal necessary permission to a folder to execute its job.
- Generate Fonts Cache — refresh system
fonts cachewhen new fonts are installed in the device.
- Reload ConTEXt Fonts — refresh font list for ConTEXt.
- Edit pdfTEX Font Map — edit font map file used by pdfTEX.
The screen shot in Figure 6 provides the scenario when a compilation of a document is finished. Users at their will can open the
log file by pressing on the pencil icon found at the right top of the window. Other icons are self explanatory (clockwise from top left): refresh (can be used for recompile also); view
TEXpert, the integrated editor
The action panel as shown in the screen shot in Figure 7 can be activate by swiping from left edge to right of the display. The panel provides several icons that are self-explanatory. The only thing that needs to be pointed out is that the panel also provides headings of various sectional units and graphic files names of included as in an outline.
- Compile document: click to compile with primary engine (pdfLATEX by default), long click to do BibTEX.
- Open document: click on the button to browse your SD card, Google Drive or Dropbox for the document to open, long click to pick up a document from a list of recently opened document.
- View PDF: click to view PDF (either split the screen or show the PDF full screen, depending on how you last close the PDF viewer), when the PDF viewer opens, it will attempt to jump to the position corresponding to the cursor position, long click to view PDF in external app such as Adobe Reader.
- Extra keyboard: can select which keys to show in the Settings.
Following commands are available if compatible keyboard is chosen. The
application namely, Hackers’ Keyboard is the one that I used for this
- File commands
Ctrl+NCreate new document
Ctrl+OOpen existing document (from SD card, Google Drive or Dropbox)
Ctrl+SSave current document
F1Compile main document using the primary engine
(pdfLATEX by default, change in Settings).
Ctrl+PView PDF: either split the screen to show the editor and PDF side-by-side or show PDF in full screen. Then jump to the PDF position corresponding to the code location at the editor’s cursor.
- Editing commands
Ctrl+KComment the selected block
Ctrl+Shift+KUncomment the selected block
TabExpand the word at cursor using defined expansion pattern
Ctrl+IGo to next insertion point
#INS#in the expanded text
Ctrl+TabInsert tab character to the text
Shift+Arrowkeys Select block for copy/paste/comment
TEXpert provides an embedded PDF viewer that can be displayed along side with the document. It provides fast syntax highlighting with little lagging. Noteworthy capability is mathematical formula highlighting, a feature rarely provided by editors.
Beyond that, TEXpert understands LATEX unlike general purpose text editors. It offers easy access to frequently used symbols in LATEX documents such as dollar and backslash, hierarchical document outline (i.e.
\subsection, etc.), annotated log, etc. TEXpert also provides smart code completion and is user configurable.
A few additional applications are useful to make the TEXPortal setup more productive and convenient. Dropsync and Foldersync help user to sync a designated folder in Dropbox or a variety of cloud frameworks to sync with a folder in the Android devices.
Dropsync lets you automatically sync and share unlimited files and folders with Dropbox and with your other trusted devices. Sync and share any files! Photos, videos, documents, PDF, MP3, ebooks, backups, …
- Full two-way auto-sync running in background, just like Dropbox on desktop.
- Many sync modes. Not only two-way, you can also choose Upload only, Upload then delete, Download only, Download mirror, …
- Instant upload: new files are uploaded to Dropbox immediately.
- Very efficient, consumes almost no battery.
- Easy to set up. Once set up files will be kept in sync without any effort from users.
- Works reliably under ever changing network conditions on your phone.
- Monitors battery level, WiFi/3G/4G/LTE/WiMax connectivity and adapts its behavior according to user preferences.
- Configurable auto-sync interval: 15 minutes, 30 minutes, every hour,…
- Tasker plugin to allow power users to define sophisticated sync schedules and conditions.
FolderSync enables simple sync to cloud based storage to and from local folders on the device SD cards. It support a wide range of different cloud providers and file protocols, and support for more platforms are added continuously. Root file access also supported on rooted devices.
Supported cloud providers
- Amazon Cloud Drive
- Amazon S3 Simple Storage Service
- CloudMe (using WebDAV)
- Cubby (using WebDAV)
- Digitalbucket.net (using WebDAV)
- Dump Truck (using WebDAV)
- GoDaddy (using WebDAV)
- Google Drive
- HiDrive (using WebDAV)
- Livedrive Premium (using WebDAV)
- MyDrive.ch (using WebDAV)
- NetDocuments (using WebDAV)
- WEB.DE (using WebDAV)
- Yandex Disk (using WebDAV)
- FTPS (SSL/TLS implicit)
- FTPES (SSL/TLS explicit)
- SFTP (SSH File Transfer)
- Samba/CIFS/Windows Share
- WebDAV (HTTP/HTTPS)
Hacker’s Keyboard is very much needed as many commands in TEXPortal is a combination of control and alt with other keys which are provided by this application (see the keyboard in Figure 1). Also, it has tab, escape, arrow keys, braces and backslash as in a standard keyboard which is very hand makes editing TEX documents a pleasure.
A few hours of tinkering with the application ended up in a sleek TEXLive installation in my Nexus 9 tablet and OnePlusOne phone that can compile any document in my desktop seamlessly. It is indeed a pleasure to tweak a macro and/or a package on the road without the need for a desktop.
The big advantage of this application is its ability to keep my data and packages confined to my devices till they are published instead of allowing it to be transported to a cloud server controlled by others. Even in terms of money, the cost of Pro version of TEXPortal is $10 and for TEXpert is another $ 10 which I happily paid for its efficient functionality and as an expression of my gratitude to the developers who did a great work in porting TEXLive to Android. Still it is far economical than maintaining a paid account in Overleaf or ShareLATEX.