2

I just bought a Nexus 7 2013. It's very good and I'd like to use it to (in case of emergency) edit some of my latex documents using TexPortal.

Some latex documents of mine get compiled properly only by Latex and not by PDFLatex. As a result, I get a valid .ps file.

I'd like to install somehow ps2pdf (or even better, ps2pdf13) by some tool like, e.g., apt-get. And use some terminal emulator to run it.

Is this possible without rooting the device?

1

No, even though Android is based on the Linux kernel, programs for GNU/Linux need to be ported to the Android user-space environment. They usually require some source code changes, and to be compiled linking against the appropriate runtime libraries. You can find some command-line programs that have already been ported to Android on open-source sites like GitHub, but there's nothing like APT.

The closest thing to an APT repository is F-droid, but that's mainly for GUI apps: it's an alternative to Google Play for downloading open-source apps. I've already searched there and there's nothing like ps2pdf.

  • I know this topic is a few years old, but I just ran across it while looking for sources for ps2pdf in order to build it on my Android. In short, using the Termux teminal (and I'm sure others, the android port of Debian comes to mind) on Android, there IS an "apt" command line utility available. (However, ps2pdf is not currently part of the already ported packages.) – Ken Mar 27 '17 at 19:14
  • Neither is groff at present, but I have just made some source updates (path corrections, all), and have successfully compiled a command-line groff/nroff/troff on my Android. The resulting binary even handles my custom tmac files just fine. I'm hoping that a similar just-fix-the-paths type of source update will make easy work of a port for ps2pdf as well. – Ken Mar 27 '17 at 19:14
  • That's very interesting. If you manage it then please do come back and write that up as an answer. – Dan Hulme Mar 28 '17 at 8:52
1

I am also a happy user of Termux on Android. If you are familiar with Linux commandline tools, you will love to have this on Android.

As far as I know ps2pdf, and also ps2pdf13, ps2pdf14, etc, (on my Linux laptop) are not standalone executable binary programs, but convenience shellscripts that are part of the Ghostscript distribution, which call gs with the correct parameters and options. If you take a look at the Github pages for Termux you can see that porting Ghostscript (at the time of me writing) for Termux is a work in progress that has not been succesful yet. Ghostscript is a powerful but complex package to compile. But there is hope ...

An alternative is using your (android) webbrowser and use an online ps2pdf converter like https://www.ps2pdf.com. (which is powered by Ghostscript on the server)

0

Termux has texitopdf to confert a latex file to pdf

0

M. Tarenskeen is correct. When you install Ghostscript in Termux, you automatically get a whole slew of valuable utility programs with it, including ps2pdf. Once gs is installed, just type `which pf2pdf' and there it is!

Gnuplot supports both PostScript and PDF "terminals." Just select the one you like best. If it's PS, then ps2pdf makes short work of the PDF output. Choosing the PDF terminal bypasses the explicit conversion step. What I've done is put a symlink called "storage0" from my Termux home directory to /storage/emulated/0. I can copy the finished plot into the symlinked directory, and voila! It's right there, immediately accessible to any Android utility.

I happen to be running the FBreader ebook reader with a PDF plug-in, which so far is doing a nice job of displaying the finished PDF plots.

I currently am running my Samsung Galaxy J3 phone without an SD card, but as soon as I get one I'll try the same trick on "storage1".

-1

No. You can not easily install Linux native application on an Android platform. In order to do so you'll have to compile your files with the Linux kernel and not the Java virtual machine that runs all your Android applications.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.