18 ms·
How TeX made it to the iOS App Store - running on DOS, inside an emulator
- NonEUCitizen 14y agothey should replace MSDOS with FreeDOS ?
- steeleduncan 14y agoor even use linux . . .
- justincormack 14y agoOr run it natively on iOS... it sounds incompetent to me.
- seclorum 14y agoHah hah. Run TeX natively on iOS. Good one. :)
- chris_wot 14y agoThere is something I've missed here... What is so funny about running TeX natively on iOS?
- ch0wn 14y agoThere was an article on HN last year: The price of a messy codebase: No LaTeX for the iPad http://vallettaventures.tumblr.com/post/13124883568/the-price-of-a-messy-codebase-no-latex-for-the-ipad http://vallettaventures.tumblr.com/post/13124883568/the-pric...
- vetinari 14y agoTeX is an interpreter. It can interpret the user supplied scripts. Interpreters than can run code supplied by user or downloaded from internet are verboten on iOS.
- darkstalker 14y agoPut it on Cydia?
- jahewson 14y agoThis has not been true since late 2010, the rule is now that applications cannot interpret scripts downloaded from sources external to the app. Embedding an interpreter in an app is fine.
- prodigal_erik 14y agoIf this is at all useful, it can render a downloaded .tex document, which equates to running a script from an external source (because TeX macros are Turing-complete even if not convenient).
- deleted 14y ago[deleted]
- shiven 14y agoDoes Microsoft even care anymore about MS-DOS to go after such IP infringement?
- steeleduncan 14y agoHopefully not, it is nice to see Tex on pad at last
- ams6110 14y agoWhether they care or not I don't know; I would say if you asked them they would care; I don't see any evidence that they've put the OS into the public domain or anything. I believe they do still distribute MS-DOS via MSDN, and it's still used for some legacy and embedded applications. I still see a lot of retail POS systems that appear to be running in DOS or at least in a full-screen character mode. Wonder why DOS was chosen instead of Linux?
- tomrod 14y agoGPL issues, maybe?
- StavrosK 14y agoWhy didn't he just use Bochs to boot the image?
- sproketboy 14y agoSounds like Apple will remove this if they find out about it.
- jdleesmiller 14y agoThat is an impressive feat of emulation, but it's worth noting that there are some good online alternatives, if you really want to write LaTeX on your iPad (from somewhere with an Internet connection). Here's one that I wrote: http://www.writelatex.com http://www.writelatex.com (At least I think it works on iPad... I haven't tested it recently.) And there's also http://www.scribtex.com http://www.scribtex.com and http://www.sharelatex.com http://www.sharelatex.com
- pygy_ 14y agoTo answer several comments who suggest to use Free software: You can't run GPLed software on iOS. The App store has its own license with term incompatible with the "no other restrictions" of the GPL, and Apple, who is the distributor, is not willing to provide the source anyway. This means No FreeDos, no Linux, no DOSBox, no QEMU(which is has no interpreter, only a dynamic compiler, which also rules it out), no BOCHS... I don't think that there are non-native, non-GPL, non-proprietary solution to run TeX on iOS. To run TeX on iOS, you'd have to port the WEB/Pascal compiler (the language in which TeX is written) to ARM+iOS...
- ksherlock 14y agoweb2c converts the TeX web/pascal source code to C code which is what actually gets compiled for teTex, TeXLive, etc. http://www.tug.org/svn/texlive/trunk/Build/source/texk/web2c/ http://www.tug.org/svn/texlive/trunk/Build/source/texk/web2c...
- deleted 14y ago[deleted]
- smashing 14y ago> You can't run GPLed software on iOS. This is 100% not true. GPL v1 and v2 are fine and v3 has some questions that most people avoid by sticking to v2 of the license. There are, however, GPL v3 licensed apps in the Apple App Store which you can find if you only looked.
- tzs 14y agoNo, GPLv2 is not fine. GPLv2 software can only be legally distributed via the iOS App Store if the owners of the copyright to the GPLv2 portions grant Apple a separate non-GPL license. This is necessary because the App Store TOS imposes restrictions on the user that conflict with GPLv2 section 6. This is also the reason GPLv3 doesn't work for the App Store, although there is a common misconception that the GPLv3 incompatibility arises from the anti-Tivo provisions. Those provisions are not applicable to the App Store, since the App Store is only distributing add-on software for the device. The anti-Tivo provision in GPLv3 is narrow, only applying to GPLv3 software that is distributed WITH the hardware. Yes, there is GPL software on the App Store. That can happen in two ways: 1\. The copyright owner of the GPL code is the party that submitted the app to the App Store. In this case, they are in effect dual licensing their GPL code. Apple gets a non-GPL license to make and distribute copies. Everyone else gets a GPL license. 2\. Some developer took third party GPL code and used it in his app. The copyright owner of the GPL code has not agreed to dual license the code for Apple. In the second case, Apple WILL pull the app from the store if the copyright owner of the GPL code notifies them of the violation. Note that the above analysis is specifically for the Apple store. I don't know how other stores work. A key aspect of the Apple store is that Apple makes and distributes copies of the apps on its store. The developer uploads one copy, and then when Apple approves that and users start purchasing copies of it, it is Apple that is making and distributing those copies. Hence, Apple needs copyright permission. A store when the store operator did not make and distribute copies would require different analysis.
- tomrod 14y agoWould it be possible to make a MathML writer that typesets?
- thebooktocome 14y agoMathML is not a substitute for TeX.
- tomrod 14y agoIt isn't yet, but for the basics it may well be usable.
- thebooktocome 14y agoI'd be greatly surprised if MathML ever overtook LaTeX as a math authoring tool. XML is not friendly to humans, and I don't see career mathematicians being comfortable with a bazaar of half-constructed WYSIWYG editors. After all, most choose to write LaTeX by hand now!
- tomrod 14y ago> most choose to write LaTeX by hand now! Really? I haven't come across that. Cool, if so.
- duaneb 14y agoSure, but that just covers certain math typesetting - a small subset of TeX.
- tomrod 14y agoOnly 1 out of the hundreds of TeX users I know use TeX specifically for math typesetting. I'm unfortunately not able to contribute at this time in that community, but I'd be the second if I had the available time.
- chj 14y agoDeveloper here. Take this as a proof of concept. New update (a native one) will change everything. Btw: 1. The 486 emulation engine I have been working on is intended for DOS game emulation. It happens to be fast enough to run TeX, although it is at least ten times slower than the native version. 2. Next time, don't pretend to be a customer in the email. Be clear that you are a developer (working on TeX apps), I'll be more open to your questions.
- ghost91 14y agoIt would be interesting to hear your standpoint on the IP infringements (DOS, GPL License...)
- chj 14y agoFirst of all, No GPL violation here. The BIOS rom is licensed under LGPL, as long as you do not build it in the executable, you are not violating anything. Users can replace this component freely. The disk image is formatted with "/S" option. I am not sure if that counts as shipping DOS.
- pygy_ 14y agoYou're distributing files copyrighted by Microsoft, namely msdos.sys, io.sys and possibly command.com (IIRC you could override it by setting the SHELL environment variable in config.sys). They may be small, but they since pack the core functionality of MS-DOS, I don't know if a fair use defense would fly... You should also distribute the source of the BIOS with the app (because Apple is the distributor, not you). Otherwise, very cool project. Is your x86 emulator available somewhere? What will differentiate it from DOSBox?
- chj 14y agoYes, these files are the essential part of a boot disk. Did MS forbid people transfer boot disks when they were still selling DOS? The emulator only runs on ARM cpu(at present works only for jailbroken iPad/iPhone). You can download it (free) at www.aemula.net/download.html This is much less than DOSBox in terms of features, but when it runs, it runs fast.
- radarsat1 14y agoI understand this as a good hack, but I don't really get why anyone would want to run TeX on an iPad/iPhone. I mean, phones and tablets seem to be good at everything except for extensive typing. I would never want to work on a paper on my tablet, I can barely type out a long email on it without getting frustrated.
- cyrus_ 14y agoYou can use Bluetooth keyboards with iOS.
- duaneb 14y agoI do most of my typing on my iPad via a bluetooth keyboard.
- podperson 14y agoI read somewhere a bunch of people (teenagers / college students) saying that they could type at normal speed on iPad glass keyboards, so I did an experiment and with no practice could achieve over 40wpm (and I suck -- I get about 60wpm on a "proper" keyboard, which is fine since I don't compose prose or code faster than that). I suspect that it's partially an acclimatization issue, and getting over the hump just requires time. (My "hump" for getting to be as productive with a trackpad as with a mouse, by comparison, was about 12 years...)
- FrojoS 14y agoI don't get it. The OP pretends to like the app and is glad someone achieved to build one for iOS. But then, why suggest the author, chj did something potentially illegal or at least against the rules of the app store? In Germany we say: "Don't wake up sleeping dogs."
- oo 14y agoLaTeX=TeX+some macroes+some fonts. Make a Web service backend for kpathsea, then you can ship a single native TeX binary, and download fonts, format, macroes and other support files from the Web service on demand, cache them on your iPhone/iPad. Over the years the whole TeX ecosystem has developed into a huge, bloated mess (ever noted the size of latest TeX Live release?) and most users only use (and understand) a tiny part of it, and there is always something broken unless you install the full distribution. I actually miss the simplicity of those old DOS ports such as EmTeX. I used to conciously choose to run a DOS TeX (compiled with Turbo Pascal from the Tangle'd original WEB source) in my OS's DOS emulator. It's simple, fast and beautiful, unlike those modern monstrosities. The whole post-Web2C TeX world is just an ugly hack. I wish someone could go back to the root of Knuth's original WEB distribution and make a minimal TeX, which could then be relatively easily ported to major mobile platforms. If you must stick with the bloat ware way, at least hide its ugly butt in the cloud. It's 6AM here and I'm typing this longer than necessary comment when my girlfriend is sleeping besides me. It's OK because I'm typing this on my iPhone's touch screen with sounds turned off. If nothing else, that could be one excuse to port TeX to touch screen devices!
- chj 14y agoApp has been updated: http://litchie.com/blog/?p=406 http://litchie.com/blog/?p=406 Cleared of copyright issues.